@opencode-ai/protocol
Advanced tools
+3
-0
@@ -59,2 +59,5 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| readonly "integration.attempt.cancel": "attemptCancel"; | ||
| readonly "session.context.entry.list": "listContextEntries"; | ||
| readonly "session.context.entry.put": "putContextEntry"; | ||
| readonly "session.context.entry.remove": "removeContextEntry"; | ||
| readonly "session.revert.stage": "revertStage"; | ||
@@ -61,0 +64,0 @@ readonly "session.revert.clear": "revertClear"; |
+3
-0
@@ -43,2 +43,5 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| "integration.attempt.cancel": "attemptCancel", | ||
| "session.context.entry.list": "listContextEntries", | ||
| "session.context.entry.put": "putContextEntry", | ||
| "session.context.entry.remove": "removeContextEntry", | ||
| "session.revert.stage": "revertStage", | ||
@@ -45,0 +48,0 @@ "session.revert.clear": "revertClear", |
@@ -5,2 +5,3 @@ import { SessionMessage } from "@opencode-ai/schema/session-message"; | ||
| import { Session } from "@opencode-ai/schema/session"; | ||
| import { SessionContextEntry } from "@opencode-ai/schema/session-context-entry"; | ||
| import { Project } from "@opencode-ai/schema/project"; | ||
@@ -283,2 +284,36 @@ import { AbsolutePath, NonNegativeInt, PositiveInt, RelativePath, statics } from "@opencode-ai/schema/schema"; | ||
| }))) | ||
| .add(HttpApiEndpoint.get("session.context.entry.list", "/api/session/:sessionID/context-entry", { | ||
| params: { sessionID: Session.ID }, | ||
| success: Schema.Struct({ data: Schema.Array(SessionContextEntry.Info) }), | ||
| error: SessionNotFoundError, | ||
| }) | ||
| .middleware(sessionLocationMiddleware) | ||
| .annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.session.context.entry.list", | ||
| summary: "List context entries", | ||
| description: "List API-managed context entries attached to the session's system context.", | ||
| }))) | ||
| .add(HttpApiEndpoint.put("session.context.entry.put", "/api/session/:sessionID/context-entry/:key", { | ||
| params: { sessionID: Session.ID, key: SessionContextEntry.Key }, | ||
| payload: Schema.Struct({ value: Schema.Json }), | ||
| success: HttpApiSchema.NoContent, | ||
| error: SessionNotFoundError, | ||
| }) | ||
| .middleware(sessionLocationMiddleware) | ||
| .annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.session.context.entry.put", | ||
| summary: "Put context entry", | ||
| description: "Attach or replace one durable context entry. The value is rendered into the session's system context; changes announce as updates at the next turn boundary.", | ||
| }))) | ||
| .add(HttpApiEndpoint.delete("session.context.entry.remove", "/api/session/:sessionID/context-entry/:key", { | ||
| params: { sessionID: Session.ID, key: SessionContextEntry.Key }, | ||
| success: HttpApiSchema.NoContent, | ||
| error: SessionNotFoundError, | ||
| }) | ||
| .middleware(sessionLocationMiddleware) | ||
| .annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.session.context.entry.remove", | ||
| summary: "Remove context entry", | ||
| description: "Remove one context entry; the removal is announced to the model at the next turn boundary.", | ||
| }))) | ||
| .add(HttpApiEndpoint.get("session.history", "/api/session/:sessionID/history", { | ||
@@ -285,0 +320,0 @@ params: { sessionID: Session.ID }, |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-next-14708", | ||
| "version": "0.0.0-next-14709", | ||
| "type": "module", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-14708", | ||
| "@opencode-ai/schema": "0.0.0-next-14709", | ||
| "effect": "4.0.0-beta.83" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1666714
0.26%27998
0.24%+ Added
- Removed