@intentic/sandbox-contract 1.344.0 → 1.345.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/contracts/accounts.contract.d.ts +24 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +214 -6
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +13 -2
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +656 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +5 -3
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/device.contract.d.ts +242 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +5 -1
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts +2 -0
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +1 -0
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/push.contract.d.ts +11 -0
- package/dist/contracts/push.contract.d.ts.map +1 -1
- package/dist/contracts/push.contract.js +10 -1
- package/dist/contracts/push.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +15 -0
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +169 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +35 -0
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +2 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +33 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +133 -30
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.d.ts +24 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +11 -0
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +11 -1
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +17 -0
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +2 -1
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-transcript.d.ts +727 -0
- package/dist/events/agent-transcript.d.ts.map +1 -0
- package/dist/events/agent-transcript.js +34 -0
- package/dist/events/agent-transcript.js.map +1 -0
- package/dist/events/agent-words.d.ts +5 -0
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +9 -0
- package/dist/events/agent-words.js.map +1 -1
- package/dist/events/requests.d.ts +143 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +35 -1
- package/dist/events/requests.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts +7 -0
- package/dist/events/sandbox-notice.d.ts.map +1 -1
- package/dist/events/sandbox-notice.js +1 -0
- package/dist/events/sandbox-notice.js.map +1 -1
- package/dist/events/system-events.d.ts +88 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +20 -720
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +17 -19
- package/dist/events/transcript.js.map +1 -1
- package/dist/events/undelivered.d.ts +4 -0
- package/dist/events/undelivered.d.ts.map +1 -1
- package/dist/events/undelivered.js +13 -0
- package/dist/events/undelivered.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts +2 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +2 -0
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/row-ids.d.ts +3 -0
- package/dist/ids/row-ids.d.ts.map +1 -0
- package/dist/ids/row-ids.js +11 -0
- package/dist/ids/row-ids.js.map +1 -0
- package/dist/index.d.ts +1281 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/models/agent-lanes.d.ts.map +1 -1
- package/dist/models/agent-lanes.js +3 -2
- package/dist/models/agent-lanes.js.map +1 -1
- package/dist/models/agent-standing.d.ts +4 -0
- package/dist/models/agent-standing.d.ts.map +1 -1
- package/dist/models/agent-standing.js +2 -1
- package/dist/models/agent-standing.js.map +1 -1
- package/dist/models/plan-pools.d.ts +5 -1
- package/dist/models/plan-pools.d.ts.map +1 -1
- package/dist/models/plan-pools.js +57 -21
- package/dist/models/plan-pools.js.map +1 -1
- package/dist/netd/generated/wire.d.ts +5 -0
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/policy/command-classes.d.ts +1 -1
- package/dist/policy/command-classes.d.ts.map +1 -1
- package/dist/policy/command-classes.js +2 -2
- package/dist/policy/command-classes.js.map +1 -1
- package/dist/policy/keyring-origins.d.ts +27 -0
- package/dist/policy/keyring-origins.d.ts.map +1 -0
- package/dist/policy/keyring-origins.js +213 -0
- package/dist/policy/keyring-origins.js.map +1 -0
- package/dist/policy/keyring-seal.d.ts +9 -0
- package/dist/policy/keyring-seal.d.ts.map +1 -1
- package/dist/policy/keyring-seal.js +18 -6
- package/dist/policy/keyring-seal.js.map +1 -1
- package/dist/policy/safety-policy.d.ts +1 -1
- package/dist/policy/safety-policy.d.ts.map +1 -1
- package/dist/policy/safety-policy.js +1 -1
- package/dist/policy/safety-policy.js.map +1 -1
- package/dist/policy/turned-away.d.ts +1 -0
- package/dist/policy/turned-away.d.ts.map +1 -1
- package/dist/policy/turned-away.js +10 -0
- package/dist/policy/turned-away.js.map +1 -1
- package/dist/protocol/doors/host-protocol.d.ts +1 -0
- package/dist/protocol/doors/host-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/host-protocol.js +1 -0
- package/dist/protocol/doors/host-protocol.js.map +1 -1
- package/dist/protocol/doors/webext-links.d.ts +1 -0
- package/dist/protocol/doors/webext-links.d.ts.map +1 -1
- package/dist/protocol/doors/webext-links.js +1 -0
- package/dist/protocol/doors/webext-links.js.map +1 -1
- package/dist/protocol/peer-dial.d.ts +2 -0
- package/dist/protocol/peer-dial.d.ts.map +1 -1
- package/dist/protocol/peer-dial.js +62 -29
- package/dist/protocol/peer-dial.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +176 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +5 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +31 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +8 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agent-place.d.ts +10 -0
- package/dist/schemas/agent-place.d.ts.map +1 -0
- package/dist/schemas/agent-place.js +15 -0
- package/dist/schemas/agent-place.js.map +1 -0
- package/dist/schemas/agent.d.ts +116 -83
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +26 -39
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +38 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +117 -16
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +19 -21
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/attach.d.ts +8 -0
- package/dist/schemas/attach.d.ts.map +1 -0
- package/dist/schemas/attach.js +14 -0
- package/dist/schemas/attach.js.map +1 -0
- package/dist/schemas/command-admission.d.ts +71 -0
- package/dist/schemas/command-admission.d.ts.map +1 -0
- package/dist/schemas/command-admission.js +27 -0
- package/dist/schemas/command-admission.js.map +1 -0
- package/dist/schemas/conversation-links.d.ts +44 -0
- package/dist/schemas/conversation-links.d.ts.map +1 -0
- package/dist/schemas/conversation-links.js +35 -0
- package/dist/schemas/conversation-links.js.map +1 -0
- package/dist/schemas/data-protection.d.ts +1 -1
- package/dist/schemas/data-protection.d.ts.map +1 -1
- package/dist/schemas/devices.d.ts +4 -1
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +1 -0
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/hosts.d.ts +2 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +2 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/keyring-native.d.ts +137 -0
- package/dist/schemas/keyring-native.d.ts.map +1 -0
- package/dist/schemas/keyring-native.js +69 -0
- package/dist/schemas/keyring-native.js.map +1 -0
- package/dist/schemas/keyring.d.ts +413 -0
- package/dist/schemas/keyring.d.ts.map +1 -1
- package/dist/schemas/keyring.js +139 -4
- package/dist/schemas/keyring.js.map +1 -1
- package/dist/schemas/phone-passwords.d.ts +186 -0
- package/dist/schemas/phone-passwords.d.ts.map +1 -0
- package/dist/schemas/phone-passwords.js +25 -0
- package/dist/schemas/phone-passwords.js.map +1 -0
- package/dist/schemas/providers/plan-limits.d.ts +74 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +31 -0
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/provider-oauth.d.ts +24 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/providers/usage.d.ts +1 -0
- package/dist/schemas/providers/usage.d.ts.map +1 -1
- package/dist/schemas/providers/usage.js +1 -0
- package/dist/schemas/providers/usage.js.map +1 -1
- package/dist/schemas/push.d.ts +13 -0
- package/dist/schemas/push.d.ts.map +1 -1
- package/dist/schemas/push.js +11 -1
- package/dist/schemas/push.js.map +1 -1
- package/dist/schemas/sandbox-passwords.d.ts +288 -0
- package/dist/schemas/sandbox-passwords.d.ts.map +1 -0
- package/dist/schemas/sandbox-passwords.js +66 -0
- package/dist/schemas/sandbox-passwords.js.map +1 -0
- package/dist/schemas/secrets.d.ts +2 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +4 -0
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings-savings.d.ts +709 -0
- package/dist/schemas/settings-savings.d.ts.map +1 -0
- package/dist/schemas/settings-savings.js +53 -0
- package/dist/schemas/settings-savings.js.map +1 -0
- package/dist/schemas/settings.d.ts +3 -671
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +3 -50
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts +5 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +4 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/work-assurance.d.ts +24 -0
- package/dist/schemas/work-assurance.d.ts.map +1 -0
- package/dist/schemas/work-assurance.js +23 -0
- package/dist/schemas/work-assurance.js.map +1 -0
- package/dist/schemas/workspace/workspace-tree.d.ts +23 -0
- package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-tree.js +20 -0
- package/dist/schemas/workspace/workspace-tree.js.map +1 -1
- package/dist/state/auth-state.d.ts +4 -0
- package/dist/state/auth-state.d.ts.map +1 -0
- package/dist/state/auth-state.js +37 -0
- package/dist/state/auth-state.js.map +1 -0
- package/dist/state/definition.d.ts +4 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/history-state.d.ts.map +1 -1
- package/dist/state/history-state.js +17 -1
- package/dist/state/history-state.js.map +1 -1
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/text/transcript-fold.js +5 -5
- package/dist/text/transcript-fold.js.map +1 -1
- package/dist/webext/index.d.ts +1 -0
- package/dist/webext/index.d.ts.map +1 -1
- package/dist/webext/index.js +1 -0
- package/dist/webext/index.js.map +1 -1
- package/package.json +6 -5
- package/src/contracts/agent.contract.ts +13 -1
- package/src/contracts/agents.contract.ts +4 -3
- package/src/contracts/device.contract.ts +16 -0
- package/src/contracts/endpoints.contract.ts +3 -0
- package/src/contracts/push.contract.ts +23 -1
- package/src/contracts/secrets.contract.ts +39 -0
- package/src/contracts/workspace.contract.ts +16 -0
- package/src/events/agent-events.ts +4 -1
- package/src/events/agent-transcript.ts +48 -0
- package/src/events/agent-words.ts +13 -0
- package/src/events/requests.ts +41 -3
- package/src/events/sandbox-notice.ts +3 -0
- package/src/events/transcript.ts +30 -28
- package/src/events/undelivered.ts +18 -0
- package/src/ids/conversation-ids.ts +7 -0
- package/src/ids/row-ids.ts +20 -0
- package/src/models/agent-lanes.ts +9 -3
- package/src/models/agent-standing.ts +9 -1
- package/src/models/plan-pools.test.ts +128 -20
- package/src/models/plan-pools.ts +114 -31
- package/src/netd/generated/netd-wire.json +25 -0
- package/src/netd/generated/wire.ts +1 -1
- package/src/policy/command-classes.ts +2 -2
- package/src/policy/keyring-origins.test.ts +132 -0
- package/src/policy/keyring-origins.ts +287 -0
- package/src/policy/keyring-seal.test.ts +37 -2
- package/src/policy/keyring-seal.ts +33 -7
- package/src/policy/safety-policy.ts +1 -1
- package/src/policy/tests/safety-policy.test.ts +1 -1
- package/src/policy/turned-away.ts +15 -0
- package/src/protocol/doors/host-protocol.ts +3 -0
- package/src/protocol/doors/webext-links.ts +3 -0
- package/src/protocol/peer-dial.test.ts +90 -4
- package/src/protocol/peer-dial.ts +83 -39
- package/src/protocol/raw/raw-json-routes.ts +13 -0
- package/src/protocol/raw/raw-routes.ts +12 -1
- package/src/schemas/agent-place.ts +22 -0
- package/src/schemas/agent.ts +42 -78
- package/src/schemas/agents.ts +41 -46
- package/src/schemas/attach.ts +23 -0
- package/src/schemas/command-admission.ts +57 -0
- package/src/schemas/conversation-links.ts +62 -0
- package/src/schemas/data-protection.ts +1 -1
- package/src/schemas/devices.ts +4 -4
- package/src/schemas/hosts.ts +4 -0
- package/src/schemas/keyring-native.test.ts +13 -0
- package/src/schemas/keyring-native.ts +101 -0
- package/src/schemas/keyring.ts +202 -4
- package/src/schemas/phone-passwords.ts +51 -0
- package/src/schemas/providers/plan-limits.ts +49 -2
- package/src/schemas/providers/usage.ts +2 -0
- package/src/schemas/push.ts +19 -3
- package/src/schemas/sandbox-passwords.ts +88 -0
- package/src/schemas/secrets.ts +4 -0
- package/src/schemas/settings-savings.ts +125 -0
- package/src/schemas/settings.ts +8 -116
- package/src/schemas/terminal.ts +8 -0
- package/src/schemas/work-assurance.ts +36 -0
- package/src/schemas/workspace/workspace-tree.ts +32 -0
- package/src/state/auth-state.ts +89 -0
- package/src/state/history-state.ts +44 -1
- package/src/state/runtime-state.ts +5 -4
- package/src/text/transcript-fold.test.ts +67 -0
- package/src/text/transcript-fold.ts +6 -6
- package/src/webext/index.ts +2 -0
|
@@ -113,6 +113,22 @@ describe("foldTurn", () => {
|
|
|
113
113
|
]);
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
+
// What a reader needs once nothing in memory remembers the subagent: the card the turn settles into keeps it.
|
|
117
|
+
it("keeps where the runtime holds an in-process subagent's own record on its card", () => {
|
|
118
|
+
const events: AgentEvent[] = [
|
|
119
|
+
{ kind: "tool_call", id: "task-1", name: "Agent", category: "other", status: "in_progress" },
|
|
120
|
+
{ kind: "subagent", id: "task-1", subagentKind: "subagent", agentType: "Explore" },
|
|
121
|
+
{ kind: "subagent_update", id: "task-1", sdk: { sessionId: "ses-1", agentId: "a1b2" } },
|
|
122
|
+
{ kind: "subagent_update", id: "task-1", status: "completed" },
|
|
123
|
+
];
|
|
124
|
+
expect(foldOf("delegate", events).at(-1)?.tools?.[0]?.subagent).toEqual({
|
|
125
|
+
kind: "subagent",
|
|
126
|
+
agentType: "Explore",
|
|
127
|
+
status: "completed",
|
|
128
|
+
sdk: { sessionId: "ses-1", agentId: "a1b2" },
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
116
132
|
// A spawned subagent is named by its own conversation, not the call that started it; the spawn answers with that
|
|
117
133
|
// name, which is how its card is found, so it reads on its card exactly as an in-process one does.
|
|
118
134
|
it("puts a spawned subagent on the card of the call whose result names it", () => {
|
|
@@ -931,6 +947,57 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
931
947
|
expect(fold.ranNothing).toBe(false);
|
|
932
948
|
});
|
|
933
949
|
|
|
950
|
+
// The reported row (onboarding review 2026-10-18, F07): the trial ran out on a later step of a turn that had already
|
|
951
|
+
// edited a file, and the row said the message was not delivered and held to send again. Neither was true: the turn
|
|
952
|
+
// ran, nothing holds its words (turn-runs keeps only a turn turned away at the door), and a resend repeats its edits.
|
|
953
|
+
describe(`arriving after the turn already ran`, () => {
|
|
954
|
+
const SPENT = {
|
|
955
|
+
kind: `error`,
|
|
956
|
+
code: `trial-exhausted`,
|
|
957
|
+
message: `Free trial used up for today: every free agent step is spent. Connect a model to keep going.`,
|
|
958
|
+
} as const satisfies AgentEvent;
|
|
959
|
+
const EDITED: readonly AgentEvent[] = [
|
|
960
|
+
{ kind: `tool_call`, id: `t1`, name: `Edit`, category: `edit`, status: `completed`, target: `src/page.tsx` },
|
|
961
|
+
];
|
|
962
|
+
|
|
963
|
+
it(`says the run stopped partway with its changes kept, and offers another model rather than a resend`, () => {
|
|
964
|
+
const fold = new TranscriptFold(openingOf(`change the heading`));
|
|
965
|
+
for (const event of EDITED) {
|
|
966
|
+
fold.apply(event);
|
|
967
|
+
}
|
|
968
|
+
fold.apply(SPENT);
|
|
969
|
+
|
|
970
|
+
expect(fold.rows.map((row) => row.role)).toEqual([`user`, `assistant`, `notice`]);
|
|
971
|
+
expect(fold.rows.at(-1)).toEqual({
|
|
972
|
+
role: `notice`,
|
|
973
|
+
text: `${SPENT.message} The run stopped partway. The changes it made so far are kept: continue with another model to pick up from here.`,
|
|
974
|
+
noticeAction: `switchModel`,
|
|
975
|
+
noticeCode: { code: `stoppedPartway`, params: { message: SPENT.message, error: `trial-exhausted`, switchModel: true } },
|
|
976
|
+
});
|
|
977
|
+
expect(fold.ranNothing).toBe(false);
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
// Another model does not clear a full disk; the row still never claims the words are held.
|
|
981
|
+
it(`offers no model switch for a refusal another model would not get past`, () => {
|
|
982
|
+
const disk = { kind: `error`, code: `sandbox-disk-low`, message: `The sandbox's disk is full.` } as const satisfies AgentEvent;
|
|
983
|
+
expect(foldOf(`change the heading`, [...EDITED, disk]).at(-1)).toEqual({
|
|
984
|
+
role: `notice`,
|
|
985
|
+
text: `${disk.message} The run stopped partway. The changes it made so far are kept: send a message to pick up from here.`,
|
|
986
|
+
noticeCode: { code: `stoppedPartway`, params: { message: disk.message, error: `sandbox-disk-low` } },
|
|
987
|
+
});
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
it(`keeps the not-delivered row for the same refusal when nothing had run`, () => {
|
|
991
|
+
expect(foldOf(`change the heading`, [SPENT])).toEqual([
|
|
992
|
+
{
|
|
993
|
+
role: `notice`,
|
|
994
|
+
text: `${SPENT.message} Your message was not delivered: it is held for you to send again.`,
|
|
995
|
+
noticeCode: { code: `undelivered`, params: { message: SPENT.message, error: `trial-exhausted` } },
|
|
996
|
+
},
|
|
997
|
+
]);
|
|
998
|
+
});
|
|
999
|
+
});
|
|
1000
|
+
|
|
934
1001
|
// The sandbox, not a composer, keeps a turn it started itself (a fix press, a peer's message): the frame says so
|
|
935
1002
|
// with `held`. The bug this exists for: such a refusal took the fix prompt out, and no queue anywhere held a copy.
|
|
936
1003
|
describe(`of a turn the sandbox keeps`, () => {
|
|
@@ -15,8 +15,8 @@ import { contextTrimLine, contextTrimNotice } from "../schemas/context-trim.js";
|
|
|
15
15
|
import { keptWarmLine, keptWarmNotice } from "../schemas/keep-warm.js";
|
|
16
16
|
import { handedOffLine, handedOffNotice } from "../schemas/providers/handoff.js";
|
|
17
17
|
import { isLandConflict } from "../events/land-conflict.js";
|
|
18
|
-
import { turnedAwayCode } from "../policy/turned-away.js";
|
|
19
|
-
import { undeliveredRow } from "../events/undelivered.js";
|
|
18
|
+
import { anotherModelClears, turnedAwayCode } from "../policy/turned-away.js";
|
|
19
|
+
import { stoppedPartwayRow, undeliveredRow } from "../events/undelivered.js";
|
|
20
20
|
import { mentionedPathTokens } from "./mentions.js";
|
|
21
21
|
import { unspokenPromptRow } from "../events/agent-words.js";
|
|
22
22
|
import { needRowText } from "../events/need-wake.js";
|
|
@@ -239,8 +239,8 @@ const RENEWAL_WITHDRAWN =
|
|
|
239
239
|
"The credential was being renewed, but the turn stopped before it could continue: it will not carry on by itself, so press Continue to pick it back up.";
|
|
240
240
|
|
|
241
241
|
// Row for a turn-ending error: the provider's own message plus one clause on what happens next. The live wait itself is
|
|
242
|
-
// drawn by the chat, not stored here.
|
|
243
|
-
const errorRow = (event: Extract<AgentEvent, { kind: "error" }
|
|
242
|
+
// drawn by the chat, not stored here. `ran`: an assistant row stands, so a door refusal stopped the turn partway.
|
|
243
|
+
const errorRow = (event: Extract<AgentEvent, { kind: "error" }>, ran: boolean): TranscriptRow => {
|
|
244
244
|
const { message, code } = event;
|
|
245
245
|
const said = failureOf(event);
|
|
246
246
|
switch (code) {
|
|
@@ -281,7 +281,7 @@ const errorRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow
|
|
|
281
281
|
// provider's own uncoded words are only ever themselves.
|
|
282
282
|
return code === undefined ? { role: "notice", text: message } : { role: "notice", text: message, noticeCode: noticeCode({ code: "failed", params: said }) };
|
|
283
283
|
}
|
|
284
|
-
return heldRow(event);
|
|
284
|
+
return ran && event.held === undefined ? stoppedPartwayRow(said, anotherModelClears(code)) : heldRow(event);
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
// What a laddered wall's automatic re-runs are doing, said on the failure's own row so the count stays in the record.
|
|
@@ -488,7 +488,7 @@ export class TranscriptFold {
|
|
|
488
488
|
case "error":
|
|
489
489
|
// Keeps a refusal (no prose from the provider) from reading as a session that ended mid-question.
|
|
490
490
|
// A refusal that ran nothing takes its message back out ahead of the notice standing in for it.
|
|
491
|
-
return [...this.retract(event), ...this.withdrawRenewal(event), ...this.pushRow(errorRow(event))];
|
|
491
|
+
return [...this.retract(event), ...this.withdrawRenewal(event), ...this.pushRow(errorRow(event, this.rows.some((row) => row.role === "assistant")))];
|
|
492
492
|
case "plan": {
|
|
493
493
|
// Folds a plan into an identical retired prose bubble instead of drawing the same markdown twice.
|
|
494
494
|
const adjacent = this.rows.at(-1);
|
package/src/webext/index.ts
CHANGED
|
@@ -9,3 +9,5 @@ export * from "../protocol/doors/webext-protocol.js";
|
|
|
9
9
|
export * from "../schemas/webext.js";
|
|
10
10
|
export * from "../schemas/loopback-catch.js";
|
|
11
11
|
export * from "../schemas/peer-enrollment.js";
|
|
12
|
+
// What the extension says to `intentic-keyring native-host` (the Passwords app's browser capture and fill).
|
|
13
|
+
export * from "../schemas/keyring-native.js";
|