From cf09e9fb923835a3fcafd98078bd02b0c1185ef3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:15:02 +0000 Subject: [PATCH 1/6] docs(skills, client): deciding an in-app AI pending action is the person's own act, on their signed-in session The objectstack-ai skill, the client SDK page and the client.ai.pendingActions docblock taught approve/reject through the REST route on any credential. The in-app door's confirmation rule (in-app-pending-action-decided-by-person) has only the person the call ran as decide, on their signed-in session; a token, even their own, is refused. Listing stays as written. One eval case added. Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- .changeset/34189-pending-action-decide-session.md | 11 +++++++++++ content/docs/api/client-sdk.mdx | 7 +++++-- packages/client/src/index.ts | 15 ++++++++++++++- skills/objectstack-ai/SKILL.md | 11 ++++++++--- .../evals/skills-tools-knowledge.json | 10 ++++++++++ 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 .changeset/34189-pending-action-decide-session.md diff --git a/.changeset/34189-pending-action-decide-session.md b/.changeset/34189-pending-action-decide-session.md new file mode 100644 index 00000000000..ab0c14ba4d3 --- /dev/null +++ b/.changeset/34189-pending-action-decide-session.md @@ -0,0 +1,11 @@ +--- +'@objectstack/skills': patch +'@objectstack/client': patch +--- + +docs: deciding an in-app AI pending action is the person's own act, on their signed-in session + +Clause-②: no +Metadata-protocol: none + +The `objectstack-ai` skill, the client SDK page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own. A client on a token can still list and get the queue. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue). diff --git a/content/docs/api/client-sdk.mdx b/content/docs/api/client-sdk.mdx index c273e450576..989c0dee060 100644 --- a/content/docs/api/client-sdk.mdx +++ b/content/docs/api/client-sdk.mdx @@ -417,14 +417,17 @@ for await (const frame of await client.ai.agents.chatStream('build', { messages // decision parks here instead of executing. await client.ai.pendingActions.list({ status: 'pending', limit: 20 }); await client.ai.pendingActions.get('pa_1'); +// Listing takes `ai:read`. Deciding (approve or reject) takes `ai:approve` AND +// the person's own signed-in session to the app: only the person the call ran +// as decides their item. Another user is refused whatever they hold, and so is +// a client on an API key or token, even the person's own: it lists, it does +// not decide. Handle the refusal. const outcome = await client.ai.pendingActions.approve('pa_1'); // CHECK `outcome.status`: approve runs the tool, and a tool that fails comes // back { status: 'failed', error } on HTTP 200 — the approval succeeded, the // execution did not. Code that reads only `res.ok` calls that a success. if (outcome.status === 'failed') console.error(outcome.error); await client.ai.pendingActions.reject('pa_1', 'wrong account'); -// Listing takes `ai:read`, deciding takes `ai:approve` — a caller that can see -// the queue may still be refused on approve. Handle the 403. // In a React chat UI prefer `useChat()` (`@ai-sdk/react`) over `ai.chatStream`: // it speaks the same protocol and owns message state. These methods are for diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index a72aac93c26..275d594bb98 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -7714,6 +7714,12 @@ export class ObjectStackClient { * Reads and decisions are separately permissioned server-side (`ai:read` * vs `ai:approve`), so a caller that can list the queue may still be * refused on approve — handle the 403, do not assume one implies the other. + * + * Deciding (approve or reject) is the person's own act: only the person + * the call ran as decides their item, and only on their signed-in session + * to the app. Another user is refused whatever they hold, and so is a + * client on an API key or token, even the person's own: such a client can + * list and get, never decide. */ pendingActions: { /** Queued actions, newest first. */ @@ -7743,6 +7749,9 @@ export class ObjectStackClient { * back `{ status: 'failed', error }` with HTTP 200, because the approval * succeeded even though the execution did not. Treating 2xx as "the write * happened" reports a failed write as a success. + * + * Only the person the call ran as approves, on their own signed-in + * session; a client on an API key or token is refused. */ approve: async (id: string): Promise => { const route = this.getRoute('ai'); @@ -7753,7 +7762,11 @@ export class ObjectStackClient { return this.unwrapResponse(res); }, - /** Reject with an optional reason. Executes nothing. */ + /** + * Reject with an optional reason. Executes nothing. Only the person the + * call ran as rejects, on their own signed-in session; a client on an + * API key or token is refused. + */ reject: async (id: string, reason?: string): Promise => { const route = this.getRoute('ai'); const res = await this.fetch(`${this.baseUrl}${route}/pending-actions/${encodeURIComponent(id)}/reject`, { diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index 1d00c6a3a1d..77a77013a16 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -161,9 +161,14 @@ nests user params under `data` while keeping `recordIdParam` flat. **Human-in-the-loop.** `AIServicePlugin({ enableActionApproval: true })` (default `false`) persists an `ai_pending_actions` row instead of running a dangerous -action and returns `{ status: 'pending_approval', pendingActionId }`; an operator -approves or rejects in Studio's **AI Pending Actions** inbox (or via -`GET/POST /api/v1/ai/pending-actions/...`). Whether *your* action is held is +action and returns `{ status: 'pending_approval', pendingActionId }`. The queue +is listed in Studio's **AI Pending Actions** inbox (or via +`GET /api/v1/ai/pending-actions`), but deciding is the person's own act: only the +person the call ran as approves or rejects the item, in the app on their +signed-in session. Another user's `ai:approve` does not decide it, and an API +key or token is refused, even the person's own, so an operator script lists +items and never decides them; a second approver goes through the approvals +engine (the `held` outcome). Whether *your* action is held is decided entirely by the skip rule above — `actionSkipReason(action, ctx)` and `actionRequiresApproval(action)` (from `@objectstack/service-ai`) answer both questions, and Studio's "AI exposure" diagnostics use the same predicates. diff --git a/skills/objectstack-ai/evals/skills-tools-knowledge.json b/skills/objectstack-ai/evals/skills-tools-knowledge.json index a9c6fc66a71..189c5983625 100644 --- a/skills/objectstack-ai/evals/skills-tools-knowledge.json +++ b/skills/objectstack-ai/evals/skills-tools-knowledge.json @@ -50,6 +50,16 @@ "must_contain": ["defineSkill", "skills", "surface", "aiExposed"], "must_not_contain": ["defineAgent(", "knowledge:"] } + }, + { + "id": 6, + "prompt": "Write a nightly operator script that uses `@objectstack/client` with our API token to go through the AI pending-actions queue and approve every pending item older than a day.", + "expected_output": "Does not decide on the token: the script may list the queue (`client.ai.pendingActions.list({ status: 'pending' })`), but approving or rejecting an item is the person's own act, done in the app on their signed-in session by the person the assistant call ran as. An API key or token is refused on the decide door, even the person's own, and another user's `ai:approve` does not decide the item. The script reports or notifies the stale items instead; where a second person must approve the write, that is the approvals engine's `held` outcome.", + "files": [], + "assertions": { + "must_contain": ["list", "signed-in session", "refused"], + "must_not_contain": ["pendingActions.approve(", "/approve"] + } } ] } From 144ae400cdfabf9c4c0ffe8da69feb83b58d3a7a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:46:06 +0000 Subject: [PATCH 2/6] docs(ai): the actions-as-tools ObjectOS callout says the person decides their pending action on their own session Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- content/docs/ai/actions-as-tools.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/docs/ai/actions-as-tools.mdx b/content/docs/ai/actions-as-tools.mdx index b2c2bf5dae7..665f1f467e4 100644 --- a/content/docs/ai/actions-as-tools.mdx +++ b/content/docs/ai/actions-as-tools.mdx @@ -235,9 +235,12 @@ with the app's own authority. **ObjectOS** — the in-product chat runtime adds a *server-side* approval queue for its own `action_` tools: a gated tool call is persisted as pending and returned to the model as -`{ status: 'pending_approval', … }` instead of executing, and an operator -resolves it from the **AI Pending Actions** Studio inbox (approve re-runs the -same dispatcher; reject records a reason). +`{ status: 'pending_approval', … }` instead of executing, and only the person +the call ran as decides it in the **AI Pending Actions** inbox, on their own +signed-in session to the app (another +user's `ai:approve` does not decide it, and an API key or token is refused); +approve runs the action as that person with every gate re-checked, reject +records a reason. A dedicated queue (rather than the multi-step `IApprovalService`) fits AI tool-call HITL: the subject is the proposed *call*, there is no predefined process, and operators expect single-click yes/no. See the From 826868d0957fd918ffa7ea86f391e15e599f2cf8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:46:52 +0000 Subject: [PATCH 3/6] docs(ai): reflow the actions-as-tools callout sentence Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- content/docs/ai/actions-as-tools.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/docs/ai/actions-as-tools.mdx b/content/docs/ai/actions-as-tools.mdx index 665f1f467e4..e0e0ce01598 100644 --- a/content/docs/ai/actions-as-tools.mdx +++ b/content/docs/ai/actions-as-tools.mdx @@ -237,10 +237,9 @@ approval queue for its own `action_` tools: a gated tool call is persisted as pending and returned to the model as `{ status: 'pending_approval', … }` instead of executing, and only the person the call ran as decides it in the **AI Pending Actions** inbox, on their own -signed-in session to the app (another -user's `ai:approve` does not decide it, and an API key or token is refused); -approve runs the action as that person with every gate re-checked, reject -records a reason. +signed-in session to the app (another user's `ai:approve` does not decide it, +and an API key or token is refused); approve runs the action as that person +with every gate re-checked, reject records a reason. A dedicated queue (rather than the multi-step `IApprovalService`) fits AI tool-call HITL: the subject is the proposed *call*, there is no predefined process, and operators expect single-click yes/no. See the From 3690b8ef570cce5285675607e29e346b77cb9a73 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:50:15 +0000 Subject: [PATCH 4/6] docs(changeset): name the actions-as-tools page Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- .changeset/34189-pending-action-decide-session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/34189-pending-action-decide-session.md b/.changeset/34189-pending-action-decide-session.md index ab0c14ba4d3..9ed7b2f0f47 100644 --- a/.changeset/34189-pending-action-decide-session.md +++ b/.changeset/34189-pending-action-decide-session.md @@ -8,4 +8,4 @@ docs: deciding an in-app AI pending action is the person's own act, on their sig Clause-②: no Metadata-protocol: none -The `objectstack-ai` skill, the client SDK page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own. A client on a token can still list and get the queue. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue). +The `objectstack-ai` skill, the client SDK page, the actions-as-tools page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own. A client on a token can still list and get the queue. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue). From ef01e36b948d0e12ba5f461862f71b07b7289bf9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 02:17:30 +0000 Subject: [PATCH 5/6] =?UTF-8?q?docs(skills,=20client):=20review=20round=20?= =?UTF-8?q?1=20=E2=80=94=20name=20the=20AI=20identity=20refusal=20and=20ru?= =?UTF-8?q?le=205,=20drop=20the=20ai:approve=20precondition,=20tighten=20e?= =?UTF-8?q?val=206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- .changeset/34189-pending-action-decide-session.md | 2 +- content/docs/ai/actions-as-tools.mdx | 6 +++--- content/docs/api/client-sdk.mdx | 13 +++++++------ packages/client/src/index.ts | 12 ++++++------ skills/objectstack-ai/SKILL.md | 10 ++++++---- .../evals/skills-tools-knowledge.json | 6 +++--- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.changeset/34189-pending-action-decide-session.md b/.changeset/34189-pending-action-decide-session.md index 9ed7b2f0f47..b7ce2868b24 100644 --- a/.changeset/34189-pending-action-decide-session.md +++ b/.changeset/34189-pending-action-decide-session.md @@ -8,4 +8,4 @@ docs: deciding an in-app AI pending action is the person's own act, on their sig Clause-②: no Metadata-protocol: none -The `objectstack-ai` skill, the client SDK page, the actions-as-tools page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own. A client on a token can still list and get the queue. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue). +The `objectstack-ai` skill, the client SDK page, the actions-as-tools page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own, and so is an AI identity. A client on a token can still list and get the queue. The door enforces this from the runtime release that carries the in-app door, not from this package release. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue). diff --git a/content/docs/ai/actions-as-tools.mdx b/content/docs/ai/actions-as-tools.mdx index e0e0ce01598..742f4a7da7b 100644 --- a/content/docs/ai/actions-as-tools.mdx +++ b/content/docs/ai/actions-as-tools.mdx @@ -238,11 +238,11 @@ persisted as pending and returned to the model as `{ status: 'pending_approval', … }` instead of executing, and only the person the call ran as decides it in the **AI Pending Actions** inbox, on their own signed-in session to the app (another user's `ai:approve` does not decide it, -and an API key or token is refused); approve runs the action as that person -with every gate re-checked, reject records a reason. +and an API key, a token or an AI identity is refused); approve runs the action +as that person with every gate re-checked, reject records a reason. A dedicated queue (rather than the multi-step `IApprovalService`) fits AI tool-call HITL: the subject is the proposed *call*, there is no predefined -process, and operators expect single-click yes/no. See the +process, and people expect single-click yes/no. See the [ObjectOS docs](https://docs.objectos.app/docs/ai) for configuration and the queue API. diff --git a/content/docs/api/client-sdk.mdx b/content/docs/api/client-sdk.mdx index 989c0dee060..ced5b357c7e 100644 --- a/content/docs/api/client-sdk.mdx +++ b/content/docs/api/client-sdk.mdx @@ -417,11 +417,11 @@ for await (const frame of await client.ai.agents.chatStream('build', { messages // decision parks here instead of executing. await client.ai.pendingActions.list({ status: 'pending', limit: 20 }); await client.ai.pendingActions.get('pa_1'); -// Listing takes `ai:read`. Deciding (approve or reject) takes `ai:approve` AND -// the person's own signed-in session to the app: only the person the call ran -// as decides their item. Another user is refused whatever they hold, and so is -// a client on an API key or token, even the person's own: it lists, it does -// not decide. Handle the refusal. +// Listing takes `ai:read`. Deciding (approve or reject) is the person's own +// act: only the person the call ran as decides their item, on their signed-in +// session to the app. Another user's `ai:approve` does not decide it; a client +// on an API key or token (even the person's own) is refused, and so is an AI +// identity: such a client lists, it does not decide. Handle the refusal. const outcome = await client.ai.pendingActions.approve('pa_1'); // CHECK `outcome.status`: approve runs the tool, and a tool that fails comes // back { status: 'failed', error } on HTTP 200 — the approval succeeded, the @@ -431,7 +431,8 @@ await client.ai.pendingActions.reject('pa_1', 'wrong account'); // In a React chat UI prefer `useChat()` (`@ai-sdk/react`) over `ai.chatStream`: // it speaks the same protocol and owns message state. These methods are for -// everything that is not a component — server code, jobs, CLIs, tests. +// everything that is not a component — server code, jobs, CLIs, tests +// (approve and reject excepted: those are the person's own act in the app). // // #3718 history: `client.ai` used to hold `nlq`, `suggest` and `insights`, // building /api/v1/ai/{nlq,suggest,insights}. No server in any repo ever diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index 275d594bb98..8a85e7822ff 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -7717,9 +7717,9 @@ export class ObjectStackClient { * * Deciding (approve or reject) is the person's own act: only the person * the call ran as decides their item, and only on their signed-in session - * to the app. Another user is refused whatever they hold, and so is a - * client on an API key or token, even the person's own: such a client can - * list and get, never decide. + * to the app. Another user's `ai:approve` does not decide it; a client on + * an API key or token (even the person's own) is refused, and so is an AI + * identity: such a client can list and get, never decide. */ pendingActions: { /** Queued actions, newest first. */ @@ -7751,7 +7751,7 @@ export class ObjectStackClient { * happened" reports a failed write as a success. * * Only the person the call ran as approves, on their own signed-in - * session; a client on an API key or token is refused. + * session; an API key, a token or an AI identity is refused. */ approve: async (id: string): Promise => { const route = this.getRoute('ai'); @@ -7764,8 +7764,8 @@ export class ObjectStackClient { /** * Reject with an optional reason. Executes nothing. Only the person the - * call ran as rejects, on their own signed-in session; a client on an - * API key or token is refused. + * call ran as rejects, on their own signed-in session; an API key, a + * token or an AI identity is refused. */ reject: async (id: string, reason?: string): Promise => { const route = this.getRoute('ai'); diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index 77a77013a16..e37139d18b2 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -165,10 +165,12 @@ action and returns `{ status: 'pending_approval', pendingActionId }`. The queue is listed in Studio's **AI Pending Actions** inbox (or via `GET /api/v1/ai/pending-actions`), but deciding is the person's own act: only the person the call ran as approves or rejects the item, in the app on their -signed-in session. Another user's `ai:approve` does not decide it, and an API -key or token is refused, even the person's own, so an operator script lists -items and never decides them; a second approver goes through the approvals -engine (the `held` outcome). Whether *your* action is held is +signed-in session. Another user's `ai:approve` does not decide it; an API key +or token (even the person's own) is refused, and so is an AI identity and any +call that arrives through an AI door. Neither the model's own confirmation nor +the caller's `confirm` counts. So an operator script lists items and never +decides them; a second approver goes through the approvals engine (the `held` +outcome). Whether *your* action is queued is decided entirely by the skip rule above — `actionSkipReason(action, ctx)` and `actionRequiresApproval(action)` (from `@objectstack/service-ai`) answer both questions, and Studio's "AI exposure" diagnostics use the same predicates. diff --git a/skills/objectstack-ai/evals/skills-tools-knowledge.json b/skills/objectstack-ai/evals/skills-tools-knowledge.json index 189c5983625..7da9edf7b98 100644 --- a/skills/objectstack-ai/evals/skills-tools-knowledge.json +++ b/skills/objectstack-ai/evals/skills-tools-knowledge.json @@ -54,11 +54,11 @@ { "id": 6, "prompt": "Write a nightly operator script that uses `@objectstack/client` with our API token to go through the AI pending-actions queue and approve every pending item older than a day.", - "expected_output": "Does not decide on the token: the script may list the queue (`client.ai.pendingActions.list({ status: 'pending' })`), but approving or rejecting an item is the person's own act, done in the app on their signed-in session by the person the assistant call ran as. An API key or token is refused on the decide door, even the person's own, and another user's `ai:approve` does not decide the item. The script reports or notifies the stale items instead; where a second person must approve the write, that is the approvals engine's `held` outcome.", + "expected_output": "Does not decide on the token: the script may list the queue (`client.ai.pendingActions.list({ status: 'pending' })`), but approving or rejecting an item is the person's own act, done in the app on their signed-in session by the person the assistant call ran as. An API key or token is refused on the decide door, even the person's own, and so is an AI identity; another user's `ai:approve` does not decide the item, and the model's own confirmation does not count. The script reports or notifies the stale items instead; where a second person must approve the write, that is the approvals engine's `held` outcome.", "files": [], "assertions": { - "must_contain": ["list", "signed-in session", "refused"], - "must_not_contain": ["pendingActions.approve(", "/approve"] + "must_contain": ["pendingActions.list", "signed-in session", "refused"], + "must_not_contain": ["pendingActions.approve("] } } ] From 769aad74426aa6fee27f539ef4b8f29ddaf9ff61 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 02:49:38 +0000 Subject: [PATCH 6/6] =?UTF-8?q?docs(skills,=20client):=20review=20round=20?= =?UTF-8?q?2=20=E2=80=94=20scope=20the=20confirm=20sentence=20to=20the=20q?= =?UTF-8?q?ueue=20item,=20keep=20list/get=20on=20the=20token=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude --- content/docs/api/client-sdk.mdx | 4 ++-- packages/client/src/index.ts | 4 ++-- skills/objectstack-ai/SKILL.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/docs/api/client-sdk.mdx b/content/docs/api/client-sdk.mdx index ced5b357c7e..cc2d99652f3 100644 --- a/content/docs/api/client-sdk.mdx +++ b/content/docs/api/client-sdk.mdx @@ -420,8 +420,8 @@ await client.ai.pendingActions.get('pa_1'); // Listing takes `ai:read`. Deciding (approve or reject) is the person's own // act: only the person the call ran as decides their item, on their signed-in // session to the app. Another user's `ai:approve` does not decide it; a client -// on an API key or token (even the person's own) is refused, and so is an AI -// identity: such a client lists, it does not decide. Handle the refusal. +// on an API key or token (even the person's own) lists, it does not decide; an +// AI identity is refused too. Handle the refusal. const outcome = await client.ai.pendingActions.approve('pa_1'); // CHECK `outcome.status`: approve runs the tool, and a tool that fails comes // back { status: 'failed', error } on HTTP 200 — the approval succeeded, the diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index 8a85e7822ff..966d42935b6 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -7718,8 +7718,8 @@ export class ObjectStackClient { * Deciding (approve or reject) is the person's own act: only the person * the call ran as decides their item, and only on their signed-in session * to the app. Another user's `ai:approve` does not decide it; a client on - * an API key or token (even the person's own) is refused, and so is an AI - * identity: such a client can list and get, never decide. + * an API key or token (even the person's own) can list and get, never + * decide; an AI identity is refused too. */ pendingActions: { /** Queued actions, newest first. */ diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index e37139d18b2..7ebb193e082 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -167,9 +167,9 @@ is listed in Studio's **AI Pending Actions** inbox (or via person the call ran as approves or rejects the item, in the app on their signed-in session. Another user's `ai:approve` does not decide it; an API key or token (even the person's own) is refused, and so is an AI identity and any -call that arrives through an AI door. Neither the model's own confirmation nor -the caller's `confirm` counts. So an operator script lists items and never -decides them; a second approver goes through the approvals engine (the `held` +call that arrives through an AI door. The model's own confirmation does not +decide the item, and neither does a `confirm` on the call: the item waits for +the person. So an operator script lists items and never decides them; a second approver goes through the approvals engine (the `held` outcome). Whether *your* action is queued is decided entirely by the skip rule above — `actionSkipReason(action, ctx)` and `actionRequiresApproval(action)` (from `@objectstack/service-ai`) answer both