diff --git a/src/pages/sdk/agent-vercel/README.mdx b/src/pages/sdk/agent-vercel/README.mdx index 205a20e..deee975 100644 --- a/src/pages/sdk/agent-vercel/README.mdx +++ b/src/pages/sdk/agent-vercel/README.mdx @@ -12,10 +12,8 @@ export const metadata = { ## Interfaces - [AgentContext](interfaces/AgentContext.mdx) -- [FleetClient](interfaces/FleetClient.mdx) - [OcToolInput](interfaces/OcToolInput.mdx) - [OcToolWrapped](interfaces/OcToolWrapped.mdx) -- [PostActionResult](interfaces/PostActionResult.mdx) - [StampToolCallInput](interfaces/StampToolCallInput.mdx) - [VercelToolCall](interfaces/VercelToolCall.mdx) @@ -23,7 +21,6 @@ export const metadata = { - [canonicalizeToolCall](functions/canonicalizeToolCall.mdx) - [ocTool](functions/ocTool.mdx) -- [postActionToFleet](functions/postActionToFleet.mdx) - [stampToolCall](functions/stampToolCall.mdx) - [toolCallActionId](functions/toolCallActionId.mdx) - [toolCallHash](functions/toolCallHash.mdx) diff --git a/src/pages/sdk/agent-vercel/functions/ocTool.mdx b/src/pages/sdk/agent-vercel/functions/ocTool.mdx index 88a0ea9..188fd12 100644 --- a/src/pages/sdk/agent-vercel/functions/ocTool.mdx +++ b/src/pages/sdk/agent-vercel/functions/ocTool.mdx @@ -15,7 +15,7 @@ export const metadata = { function ocTool(input: OcToolInput): OcToolWrapped; ``` -Defined in: [index.ts:192](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L192) +Defined in: [index.ts:189](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L189) Wrap a tool() definition so its execute path is scope-checked and envelope-emitting. The exact glue depends on which AI-SDK release you're diff --git a/src/pages/sdk/agent-vercel/functions/postActionToFleet.mdx b/src/pages/sdk/agent-vercel/functions/postActionToFleet.mdx deleted file mode 100644 index e508f3b..0000000 --- a/src/pages/sdk/agent-vercel/functions/postActionToFleet.mdx +++ /dev/null @@ -1,35 +0,0 @@ -export const metadata = { - title: "Function: postActionToFleet()", - description: "Auto-generated API reference for Function: postActionToFleet(). Source: TypeScript types in oc-packages.", -}; - -[**@orangecheck/agent-vercel**](../README.mdx) - -*** - -[@orangecheck/agent-vercel](../README.mdx) / postActionToFleet - -# Function: postActionToFleet() - -```ts -function postActionToFleet(action: ActionEnvelope, client: FleetClient): Promise; -``` - -Defined in: [index.ts:253](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L253) - -POST a stamped action envelope to fleet.ochk.io/api/actions. The -fleet re-derives the action id, validates agent-must-match- -delegation, persists, fans out to Nostr (kind 30084), submits to -OC Stamp, and triggers any subscribed webhooks. Throws on non-2xx -with the server's reason string. - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `action` | `ActionEnvelope` | -| `client` | [`FleetClient`](../interfaces/FleetClient.mdx) | - -## Returns - -`Promise`\<[`PostActionResult`](../interfaces/PostActionResult.mdx)\> diff --git a/src/pages/sdk/agent-vercel/interfaces/FleetClient.mdx b/src/pages/sdk/agent-vercel/interfaces/FleetClient.mdx deleted file mode 100644 index 6ca5a23..0000000 --- a/src/pages/sdk/agent-vercel/interfaces/FleetClient.mdx +++ /dev/null @@ -1,23 +0,0 @@ -export const metadata = { - title: "Interface: FleetClient", - description: "Auto-generated API reference for Interface: FleetClient. Source: TypeScript types in oc-packages.", -}; - -[**@orangecheck/agent-vercel**](../README.mdx) - -*** - -[@orangecheck/agent-vercel](../README.mdx) / FleetClient - -# Interface: FleetClient - -Defined in: [index.ts:229](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L229) - -## Properties - -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| <a id="property-apitoken"></a> `apiToken` | `string` | Bearer token from /settings § 03 (`ock_`). | [index.ts:233](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L233) | -| <a id="property-baseurl"></a> `baseUrl?` | `string` | Defaults to https://fleet.ochk.io. | [index.ts:231](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L231) | -| <a id="property-fetch"></a> `fetch?` | (`input`: `RequestInfo` \| `URL`, `init?`: `RequestInit`) => `Promise`\<`Response`\> | Optional fetch override for runtimes that need it. | [index.ts:237](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L237) | -| <a id="property-projectid"></a> `projectId` | `string` | Project the action belongs to (proj_*). | [index.ts:235](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L235) | diff --git a/src/pages/sdk/agent-vercel/interfaces/OcToolWrapped.mdx b/src/pages/sdk/agent-vercel/interfaces/OcToolWrapped.mdx index 27ae775..f093ebe 100644 --- a/src/pages/sdk/agent-vercel/interfaces/OcToolWrapped.mdx +++ b/src/pages/sdk/agent-vercel/interfaces/OcToolWrapped.mdx @@ -25,6 +25,6 @@ Defined in: [index.ts:142](https://github.com/orangecheck/oc-packages/blob/main/ | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | | <a id="property-description"></a> `description?` | `string` | - | [index.ts:145](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L145) | -| <a id="property-execute"></a> `execute` | (`args`: `TArgs`, `ctx`: [`AgentContext`](AgentContext.mdx) & \{ `callId`: `string`; `fleet?`: [`FleetClient`](FleetClient.mdx); \}) => `Promise`\<\{ `action`: `ActionEnvelope`; `posted`: [`PostActionResult`](PostActionResult.mdx) \| `null`; `result`: `TResult`; \}\> | The execute fn the AI SDK calls. Receives args + a callId (the AI SDK passes its own callId through — adapter glue passes it via context). Optional `fleet` field on the context tells the wrapper to fire-and-forget POST the stamped action to fleet. ochk.io/api/actions after the underlying execute() returns. | [index.ts:153](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L153) | +| <a id="property-execute"></a> `execute` | (`args`: `TArgs`, `ctx`: [`AgentContext`](AgentContext.mdx) & \{ `callId`: `string`; \}) => `Promise`\<\{ `action`: `ActionEnvelope`; `result`: `TResult`; \}\> | The execute fn the AI SDK calls. Receives args + a callId (the AI SDK passes its own callId through — adapter glue passes it via context). | [index.ts:151](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L151) | | <a id="property-parameters"></a> `parameters?` | `unknown` | - | [index.ts:144](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L144) | | <a id="property-verb"></a> `verb` | `string` | - | [index.ts:143](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L143) | diff --git a/src/pages/sdk/agent-vercel/interfaces/PostActionResult.mdx b/src/pages/sdk/agent-vercel/interfaces/PostActionResult.mdx deleted file mode 100644 index 7fb22d5..0000000 --- a/src/pages/sdk/agent-vercel/interfaces/PostActionResult.mdx +++ /dev/null @@ -1,22 +0,0 @@ -export const metadata = { - title: "Interface: PostActionResult", - description: "Auto-generated API reference for Interface: PostActionResult. Source: TypeScript types in oc-packages.", -}; - -[**@orangecheck/agent-vercel**](../README.mdx) - -*** - -[@orangecheck/agent-vercel](../README.mdx) / PostActionResult - -# Interface: PostActionResult - -Defined in: [index.ts:240](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L240) - -## Properties - -| Property | Type | Defined in | -| ------ | ------ | ------ | -| <a id="property-delegation_id"></a> `delegation_id` | `string` | [index.ts:243](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L243) | -| <a id="property-id"></a> `id` | `string` | [index.ts:241](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L241) | -| <a id="property-project_id"></a> `project_id` | `string` | [index.ts:242](https://github.com/orangecheck/oc-packages/blob/main/agent-vercel/src/index.ts#L242) |