@intentic/sandbox-contract 1.428.0 → 1.430.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/dist/contracts/accounts.contract.d.ts +7 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +24 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +84 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/bookmarks.contract.d.ts +101 -0
- package/dist/contracts/bookmarks.contract.d.ts.map +1 -0
- package/dist/contracts/bookmarks.contract.js +51 -0
- package/dist/contracts/bookmarks.contract.js.map +1 -0
- package/dist/contracts/browser.contract.d.ts +176 -0
- package/dist/contracts/browser.contract.d.ts.map +1 -0
- package/dist/contracts/browser.contract.js +150 -0
- package/dist/contracts/browser.contract.js.map +1 -0
- package/dist/contracts/capabilities.contract.d.ts +36 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +60 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +4 -0
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/remote.contract.d.ts +120 -0
- package/dist/contracts/remote.contract.d.ts.map +1 -0
- package/dist/contracts/remote.contract.js +80 -0
- package/dist/contracts/remote.contract.js.map +1 -0
- package/dist/contracts/runner.contract.d.ts +14 -14
- package/dist/contracts/seal.contract.d.ts +20 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +26 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +150 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +57 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts +7 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/events/failure-rows.d.ts +2 -2
- package/dist/events/failure-rows.d.ts.map +1 -1
- package/dist/events/failure-rows.js +13 -13
- package/dist/events/failure-rows.js.map +1 -1
- package/dist/events/resume.d.ts.map +1 -1
- package/dist/events/resume.js +12 -12
- package/dist/events/resume.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts.map +1 -1
- package/dist/events/sandbox-notice.js.map +1 -1
- package/dist/events/system-events.d.ts +16 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/netd/browser-wire.d.ts +50 -1
- package/dist/netd/browser-wire.d.ts.map +1 -1
- package/dist/netd/browser-wire.js +22 -0
- package/dist/netd/browser-wire.js.map +1 -1
- package/dist/netd/generated/browser-wire.d.ts +135 -0
- package/dist/netd/generated/browser-wire.d.ts.map +1 -1
- package/dist/netd/generated/wire.d.ts +14 -0
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +6 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +1 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +18 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +4 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agent.d.ts +16 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +3 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +8 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +12 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/bookmarks.d.ts +85 -0
- package/dist/schemas/bookmarks.d.ts.map +1 -0
- package/dist/schemas/bookmarks.js +56 -0
- package/dist/schemas/bookmarks.js.map +1 -0
- package/dist/schemas/browser-tools.d.ts +167 -0
- package/dist/schemas/browser-tools.d.ts.map +1 -0
- package/dist/schemas/browser-tools.js +121 -0
- package/dist/schemas/browser-tools.js.map +1 -0
- package/dist/schemas/browsing.d.ts +139 -0
- package/dist/schemas/browsing.d.ts.map +1 -0
- package/dist/schemas/browsing.js +83 -0
- package/dist/schemas/browsing.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +36 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +3 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/context-trim.js +3 -3
- package/dist/schemas/context-trim.js.map +1 -1
- package/dist/schemas/device-remote.d.ts +84 -0
- package/dist/schemas/device-remote.d.ts.map +1 -0
- package/dist/schemas/device-remote.js +54 -0
- package/dist/schemas/device-remote.js.map +1 -0
- package/dist/schemas/hosts.d.ts +6 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +6 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/keep-warm.d.ts.map +1 -1
- package/dist/schemas/keep-warm.js +2 -3
- package/dist/schemas/keep-warm.js.map +1 -1
- package/dist/schemas/providers/handoff.d.ts.map +1 -1
- package/dist/schemas/providers/handoff.js +11 -11
- package/dist/schemas/providers/handoff.js.map +1 -1
- package/dist/schemas/providers/provider-oauth.d.ts +14 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/providers/provider-oauth.js +6 -2
- package/dist/schemas/providers/provider-oauth.js.map +1 -1
- package/dist/schemas/providers/switched.js +1 -1
- package/dist/schemas/providers/switched.js.map +1 -1
- package/dist/schemas/queued-trial-retry.d.ts +7 -0
- package/dist/schemas/queued-trial-retry.d.ts.map +1 -0
- package/dist/schemas/queued-trial-retry.js +8 -0
- package/dist/schemas/queued-trial-retry.js.map +1 -0
- package/dist/schemas/remote-access.d.ts +137 -0
- package/dist/schemas/remote-access.d.ts.map +1 -0
- package/dist/schemas/remote-access.js +71 -0
- package/dist/schemas/remote-access.js.map +1 -0
- package/dist/schemas/seal.d.ts +1 -1
- package/dist/schemas/seal.d.ts.map +1 -1
- package/dist/schemas/seal.js +1 -1
- package/dist/schemas/seal.js.map +1 -1
- package/dist/schemas/settings.d.ts +26 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +5 -0
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts +136 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +41 -1
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +1 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +52 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/runtime-state.d.ts +3 -0
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -0
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/text/land-rows.d.ts.map +1 -1
- package/dist/text/land-rows.js +13 -17
- package/dist/text/land-rows.js.map +1 -1
- package/dist/text/notice-rows.js +6 -6
- package/dist/text/notice-rows.js.map +1 -1
- package/package.json +5 -5
- package/src/contracts/bookmarks.contract.ts +66 -0
- package/src/contracts/browser.contract.ts +181 -0
- package/src/contracts/device.contract.ts +15 -0
- package/src/contracts/remote.contract.ts +104 -0
- package/src/contracts/system.contract.ts +78 -0
- package/src/events/failure-rows.ts +13 -14
- package/src/events/resume.test.ts +3 -3
- package/src/events/resume.ts +12 -18
- package/src/events/sandbox-notice.ts +2 -0
- package/src/index.ts +15 -6
- package/src/netd/browser-wire.ts +84 -0
- package/src/netd/generated/browser-wire.json +894 -0
- package/src/netd/generated/browser-wire.ts +62 -3
- package/src/netd/generated/netd-wire.json +75 -0
- package/src/netd/generated/wire.ts +11 -2
- package/src/netd/wire-manifests.test.ts +76 -1
- package/src/protocol/ingress-contract.fixture.json +4 -0
- package/src/protocol/raw/raw-json-routes.ts +3 -0
- package/src/protocol/raw/raw-routes.ts +11 -0
- package/src/schemas/agent.ts +3 -4
- package/src/schemas/bookmarks.ts +79 -0
- package/src/schemas/browser-tools.ts +164 -0
- package/src/schemas/browsing.ts +129 -0
- package/src/schemas/capabilities.ts +9 -0
- package/src/schemas/context-trim.test.ts +6 -6
- package/src/schemas/context-trim.ts +3 -3
- package/src/schemas/device-remote.ts +106 -0
- package/src/schemas/hosts.ts +13 -0
- package/src/schemas/keep-warm.test.ts +1 -1
- package/src/schemas/keep-warm.ts +2 -3
- package/src/schemas/providers/handoff.test.ts +8 -10
- package/src/schemas/providers/handoff.ts +11 -12
- package/src/schemas/providers/provider-oauth.ts +10 -2
- package/src/schemas/providers/switched.test.ts +6 -6
- package/src/schemas/providers/switched.ts +1 -1
- package/src/schemas/queued-trial-retry.ts +14 -0
- package/src/schemas/remote-access.ts +140 -0
- package/src/schemas/seal.ts +2 -1
- package/src/schemas/settings.ts +9 -0
- package/src/schemas/terminal.ts +59 -1
- package/src/state/auth-state.ts +3 -0
- package/src/state/runtime-state.ts +4 -0
- package/src/text/land-rows.ts +13 -18
- package/src/text/notice-rows.ts +6 -6
- package/src/text/transcript-fold.test.ts +37 -37
|
@@ -15,7 +15,7 @@ const SENT_AT = 1_767_225_600_000;
|
|
|
15
15
|
const openingOf = (prompt: string): TranscriptRow[] => [userRow(prompt, SENT_AT, [])];
|
|
16
16
|
const foldOf = (prompt: string, events: readonly AgentEvent[]): TranscriptRow[] => foldTurn(openingOf(prompt), events);
|
|
17
17
|
// What an armed credential renewal's row promises.
|
|
18
|
-
const RENEWING_TEXT = "
|
|
18
|
+
const RENEWING_TEXT = "Renewing the credential; the turn continues by itself.";
|
|
19
19
|
// The same row as a code, which an app words in its reader's language (sandbox-notice.ts).
|
|
20
20
|
const RENEWING_CODE = { code: "renewing", params: { message: "Token refused.", error: "claude-token-refused" } };
|
|
21
21
|
|
|
@@ -347,13 +347,13 @@ describe("foldTurn", () => {
|
|
|
347
347
|
// the chat card's, asked once (ChatContinueStrip), not a second switch on a transcript line.
|
|
348
348
|
expect(foldOf("hi", outage).at(-1)).toEqual({
|
|
349
349
|
role: "notice",
|
|
350
|
-
text: "Anthropic is down. Retrying
|
|
350
|
+
text: "Anthropic is down. Retrying: attempt 2 of 6.",
|
|
351
351
|
noticeCode: { code: "retrying", params: { message: "Anthropic is down.", error: "provider-outage", attempt: 2, of: 6 } },
|
|
352
352
|
});
|
|
353
353
|
const renewal: AgentEvent[] = [{ kind: "error", code: "claude-token-refused", message: "Token refused.", autoResume: "scheduled" }];
|
|
354
354
|
expect(foldOf("hi", renewal).at(-1)).toEqual({
|
|
355
355
|
role: "notice",
|
|
356
|
-
text: "Token refused.
|
|
356
|
+
text: "Token refused. Renewing the credential; the turn continues by itself.",
|
|
357
357
|
noticeWait: "credentialRenewal",
|
|
358
358
|
noticeCode: RENEWING_CODE,
|
|
359
359
|
});
|
|
@@ -370,7 +370,7 @@ describe("foldTurn", () => {
|
|
|
370
370
|
// The code moves with the words, so an app wording the row itself says the stop too, not the old promise.
|
|
371
371
|
const withdrawn: TranscriptRow = {
|
|
372
372
|
role: "notice",
|
|
373
|
-
text: "Token refused. The
|
|
373
|
+
text: "Token refused. The renewal didn't resume the turn: press Continue to pick it up.",
|
|
374
374
|
noticeCode: { code: "renewalWithdrawn", params: { message: "Token refused.", error: "claude-token-refused" } },
|
|
375
375
|
};
|
|
376
376
|
// The live window hears the rewrite as a patch on the row it already drew, then the stop's own row.
|
|
@@ -398,13 +398,13 @@ describe("foldTurn", () => {
|
|
|
398
398
|
const booked: AgentEvent[] = [{ kind: "error", message: timedOut, autoResume: "scheduled", nextAt: 1, retries: { made: 1, max: 3 } }];
|
|
399
399
|
expect(foldOf("hi", booked).at(-1)).toEqual({
|
|
400
400
|
role: "notice",
|
|
401
|
-
text: `${timedOut} Retrying
|
|
401
|
+
text: `${timedOut} Retrying: attempt 2 of 3.`,
|
|
402
402
|
noticeCode: { code: "retrying", params: { message: timedOut, attempt: 2, of: 3 } },
|
|
403
403
|
});
|
|
404
404
|
const spent: AgentEvent[] = [{ kind: "error", message: timedOut, autoResume: "available", retries: { made: 3, max: 3 } }];
|
|
405
405
|
expect(foldOf("hi", spent).at(-1)).toEqual({
|
|
406
406
|
role: "notice",
|
|
407
|
-
text: `${timedOut} Retried 3 of 3 times
|
|
407
|
+
text: `${timedOut} Retried 3 of 3 times; no more retries.`,
|
|
408
408
|
noticeCode: { code: "retried", params: { message: timedOut, made: 3, of: 3 } },
|
|
409
409
|
});
|
|
410
410
|
// An outage nobody armed says so, instead of promising the breaker's retry.
|
|
@@ -420,7 +420,7 @@ describe("foldTurn", () => {
|
|
|
420
420
|
];
|
|
421
421
|
expect(foldOf("hi", unarmed).at(-1)).toEqual({
|
|
422
422
|
role: "notice",
|
|
423
|
-
text: "Anthropic is down.
|
|
423
|
+
text: "Anthropic is down. Not retrying; the turn waits here.",
|
|
424
424
|
noticeCode: { code: "outageWaiting", params: { message: "Anthropic is down.", error: "provider-outage" } },
|
|
425
425
|
});
|
|
426
426
|
});
|
|
@@ -431,13 +431,13 @@ describe("foldTurn", () => {
|
|
|
431
431
|
const sync = cause === undefined ? { commits: 1, blocked: [] } : { commits: 1, blocked: [], cause };
|
|
432
432
|
return { kind: "worktree", branch: "agent/x", base: "abc1234", sync };
|
|
433
433
|
};
|
|
434
|
-
const waited = "
|
|
434
|
+
const waited = "Rebased onto your latest 1 commit while this agent waited.";
|
|
435
435
|
expect(foldOf("go", [frame()]).at(-1)?.text).toBe(waited);
|
|
436
436
|
expect(foldOf("go", [frame("turn-open")]).at(-1)?.text).toBe(waited);
|
|
437
437
|
expect(foldOf("go", [frame("answer")]).at(-1)?.text).toBe(waited);
|
|
438
438
|
expect(foldOf("go", [frame("between-tools")]).at(-1)).toEqual({
|
|
439
439
|
role: "notice",
|
|
440
|
-
text: "
|
|
440
|
+
text: "Rebased mid-turn onto 1 new commit, none of its files touched (base abc1234).",
|
|
441
441
|
noticeCode: { code: "synced", params: { commits: 1, cause: "between-tools", base: "abc1234" } },
|
|
442
442
|
});
|
|
443
443
|
});
|
|
@@ -452,21 +452,21 @@ describe("foldTurn", () => {
|
|
|
452
452
|
expect(foldOf("go", events).slice(1)).toEqual([
|
|
453
453
|
{
|
|
454
454
|
role: "notice",
|
|
455
|
-
text: "
|
|
455
|
+
text: "Rebased onto your latest 2 commits while this agent waited.",
|
|
456
456
|
noticeCode: { code: "synced", params: { commits: 2 } },
|
|
457
457
|
},
|
|
458
458
|
{ role: "assistant", text: "on it" },
|
|
459
459
|
{ role: "notice", text: "Context compacted to free up space.", noticeCode: { code: "compacted" } },
|
|
460
460
|
{
|
|
461
461
|
role: "notice",
|
|
462
|
-
text: "
|
|
462
|
+
text: "Landed in your workspace. Installing 1 changed dependency, then checks.",
|
|
463
463
|
noticeAction: "depsInstall",
|
|
464
464
|
noticeCode: { code: "landed", params: { deps: 1 } },
|
|
465
465
|
},
|
|
466
466
|
]);
|
|
467
467
|
expect(foldOf("go", [{ kind: "landed", landed: true, held: true }]).at(-1)).toEqual({
|
|
468
468
|
role: "notice",
|
|
469
|
-
text: "Finished:
|
|
469
|
+
text: "Finished: ready to land from this agent's review.",
|
|
470
470
|
noticeCode: { code: "landHeld" },
|
|
471
471
|
});
|
|
472
472
|
});
|
|
@@ -492,25 +492,25 @@ describe("foldTurn", () => {
|
|
|
492
492
|
it("says where an agent's own install writes, naming its projects", () => {
|
|
493
493
|
expect(foldOf("go", [{ kind: "install", reach: "own-copy", projects: ["video"] }]).at(-1)).toEqual({
|
|
494
494
|
role: "notice",
|
|
495
|
-
text: "Installing packages in video/ into this conversation's own copy.
|
|
495
|
+
text: "Installing packages in video/ into this conversation's own copy.",
|
|
496
496
|
noticeCode: { code: "installing", params: { ownCopy: true, projects: "video/" } },
|
|
497
497
|
});
|
|
498
498
|
expect(foldOf("go", [{ kind: "install", reach: "main-tree", projects: [""] }]).at(-1)).toEqual({
|
|
499
499
|
role: "notice",
|
|
500
|
-
text: "Installing packages in the workspace root in the main tree
|
|
500
|
+
text: "Installing packages in the workspace root in the main tree.",
|
|
501
501
|
noticeCode: { code: "installing", params: { ownCopy: false, root: true } },
|
|
502
502
|
});
|
|
503
503
|
// The workspace root is named first, and counts toward the three named.
|
|
504
504
|
expect(foldOf("go", [{ kind: "install", reach: "main-tree", projects: ["a", "", "b", "c", "d"] }]).at(-1)).toEqual({
|
|
505
505
|
role: "notice",
|
|
506
|
-
text: "Installing packages in the workspace root, a/, b/ and 2 more in the main tree
|
|
506
|
+
text: "Installing packages in the workspace root, a/, b/ and 2 more in the main tree.",
|
|
507
507
|
noticeCode: { code: "installing", params: { ownCopy: false, root: true, projects: "a/, b/", more: 2 } },
|
|
508
508
|
});
|
|
509
509
|
expect(foldOf("go", [{ kind: "install", reach: "main-tree", projects: ["a", "b", "c", "d", "e"] }]).at(-1)?.text).toBe(
|
|
510
|
-
"Installing packages in a/, b/, c/ and 2 more in the main tree
|
|
510
|
+
"Installing packages in a/, b/, c/ and 2 more in the main tree.",
|
|
511
511
|
);
|
|
512
512
|
expect(foldOf("go", [{ kind: "install", reach: "own-copy", projects: [] }]).at(-1)?.text).toBe(
|
|
513
|
-
"Installing packages into this conversation's own copy.
|
|
513
|
+
"Installing packages into this conversation's own copy.",
|
|
514
514
|
);
|
|
515
515
|
});
|
|
516
516
|
|
|
@@ -519,7 +519,7 @@ describe("foldTurn", () => {
|
|
|
519
519
|
it("says a land's dependency install is on its way, not waiting for other agents", () => {
|
|
520
520
|
expect(foldOf("go", [{ kind: "landed", landed: true, deps: { missing: 3, started: [], deferred: true } }]).at(-1)).toEqual({
|
|
521
521
|
role: "notice",
|
|
522
|
-
text: "
|
|
522
|
+
text: "Landed in your workspace. 3 changed dependencies queued to install.",
|
|
523
523
|
noticeCode: { code: "landed", params: { deps: 3, queued: true } },
|
|
524
524
|
});
|
|
525
525
|
});
|
|
@@ -527,7 +527,7 @@ describe("foldTurn", () => {
|
|
|
527
527
|
// A home's land is named on its row, so the commit its card files under that name is told on the same row.
|
|
528
528
|
it("names a home's land on its row", () => {
|
|
529
529
|
expect(foldOf("go", [{ kind: "landed", landed: true, land: "land-1" }]).at(-1)).toMatchObject({
|
|
530
|
-
text: "Landed
|
|
530
|
+
text: "Landed and committed.",
|
|
531
531
|
noticeCode: { code: "landed", params: { land: "land-1" } },
|
|
532
532
|
});
|
|
533
533
|
});
|
|
@@ -536,7 +536,7 @@ describe("foldTurn", () => {
|
|
|
536
536
|
it("marks a home's fresh session with a row of its own", () => {
|
|
537
537
|
expect(foldOf("go", [{ kind: "fresh_start", why: "budget", from: 182_000, summarized: true, model: "haiku" }]).at(-1)).toEqual({
|
|
538
538
|
role: "notice",
|
|
539
|
-
text: "
|
|
539
|
+
text: "Memory full at ~182k tokens: fresh session, from a summary by haiku.",
|
|
540
540
|
noticeCode: { code: "freshStart", params: { why: "budget", from: "182k", model: "haiku", summarized: true } },
|
|
541
541
|
});
|
|
542
542
|
});
|
|
@@ -546,12 +546,12 @@ describe("foldTurn", () => {
|
|
|
546
546
|
it("marks a turn's switch with a row of its own, coded for the reader's language", () => {
|
|
547
547
|
expect(foldOf("go", [{ kind: "switched", segment: "provider", provider: "codex", model: "gpt-5-codex", loop: "Codex", fresh: true }]).at(-1)).toEqual({
|
|
548
548
|
role: "notice",
|
|
549
|
-
text: "Switched to Codex:
|
|
549
|
+
text: "Switched to Codex: fresh session, conversation carried over.",
|
|
550
550
|
noticeCode: { code: "switched", params: { segment: "provider", provider: "codex", model: "gpt-5-codex", loop: "Codex", fresh: true } },
|
|
551
551
|
});
|
|
552
552
|
expect(foldOf("go", [{ kind: "switched", segment: "model", provider: "claude", model: "claude-sonnet-5", fresh: false }]).at(-1)).toEqual({
|
|
553
553
|
role: "notice",
|
|
554
|
-
text: "Switched to Claude Sonnet 5: same session,
|
|
554
|
+
text: "Switched to Claude Sonnet 5: same session, re-read once.",
|
|
555
555
|
noticeCode: { code: "switched", params: { segment: "model", provider: "claude", model: "claude-sonnet-5", fresh: false } },
|
|
556
556
|
});
|
|
557
557
|
});
|
|
@@ -561,13 +561,13 @@ describe("foldTurn", () => {
|
|
|
561
561
|
it("says a child's work went into its parent's checkout, or was held off it by a clash", () => {
|
|
562
562
|
expect(foldOf("go", [{ kind: "landed", landed: true, into: "p1" }]).at(-1)).toEqual({
|
|
563
563
|
role: "notice",
|
|
564
|
-
text: "Changes went into the parent agent's checkout
|
|
564
|
+
text: "Changes went into the parent agent's checkout; they land with it.",
|
|
565
565
|
noticeCode: { code: "intoParent" },
|
|
566
566
|
});
|
|
567
567
|
const clash: AgentEvent = { kind: "landed", landed: false, into: "p1", conflicts: [{ repo: "root", paths: [{ path: "app.ts", reason: "diverged" }], clean: 0 }] };
|
|
568
568
|
expect(foldOf("go", [clash]).at(-1)).toEqual({
|
|
569
569
|
role: "notice",
|
|
570
|
-
text: "1 file
|
|
570
|
+
text: "1 file clashes with the parent agent's edits; the parent was told.",
|
|
571
571
|
noticeCode: { code: "intoParentClash", params: { files: 1 } },
|
|
572
572
|
});
|
|
573
573
|
});
|
|
@@ -582,7 +582,7 @@ describe("foldTurn", () => {
|
|
|
582
582
|
expect(foldOf("go", [blocked]).slice(1)).toEqual([
|
|
583
583
|
{
|
|
584
584
|
role: "notice",
|
|
585
|
-
text: "Couldn't rebase
|
|
585
|
+
text: "Couldn't rebase in intentic; its land may need a resolve.",
|
|
586
586
|
noticeCode: { code: "synced", params: { commits: 0, blocked: "intentic" } },
|
|
587
587
|
},
|
|
588
588
|
]);
|
|
@@ -591,7 +591,7 @@ describe("foldTurn", () => {
|
|
|
591
591
|
expect(foldOf(resolve, [mixed]).slice(1)).toEqual([
|
|
592
592
|
{
|
|
593
593
|
role: "notice",
|
|
594
|
-
text: "
|
|
594
|
+
text: "Rebased onto your latest 3 commits while this agent waited.",
|
|
595
595
|
noticeCode: { code: "synced", params: { commits: 3 } },
|
|
596
596
|
},
|
|
597
597
|
]);
|
|
@@ -1026,7 +1026,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1026
1026
|
|
|
1027
1027
|
it(`tells the reader that sending again starts it, and offers both presses when there is a ceiling to raise`, () => {
|
|
1028
1028
|
const row = foldOf(`land it`, [lowMemory]).at(-1);
|
|
1029
|
-
expect(row?.text).toBe(`${lowMemory.message}
|
|
1029
|
+
expect(row?.text).toBe(`${lowMemory.message} Message held: send again to start anyway.`);
|
|
1030
1030
|
expect(row?.noticeAction).toBe(`sandboxMemory`);
|
|
1031
1031
|
});
|
|
1032
1032
|
|
|
@@ -1034,7 +1034,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1034
1034
|
const { memory: _stalled, ...noReading } = lowMemory;
|
|
1035
1035
|
const row = foldOf(`land it`, [noReading]).at(-1);
|
|
1036
1036
|
expect(row?.noticeAction).toBe(`sendAnyway`);
|
|
1037
|
-
expect(row?.text).toContain(`send
|
|
1037
|
+
expect(row?.text).toContain(`send again to start anyway`);
|
|
1038
1038
|
});
|
|
1039
1039
|
|
|
1040
1040
|
it(`offers nothing on a background turn, which has no message to send`, () => {
|
|
@@ -1120,7 +1120,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1120
1120
|
expect(fold.rows.map((row) => row.role)).toEqual([`user`, `assistant`, `notice`]);
|
|
1121
1121
|
expect(fold.rows.at(-1)).toEqual({
|
|
1122
1122
|
role: `notice`,
|
|
1123
|
-
text: `${SPENT.message}
|
|
1123
|
+
text: `${SPENT.message} Stopped partway, changes kept: continue with another model.`,
|
|
1124
1124
|
noticeAction: `switchModel`,
|
|
1125
1125
|
noticeCode: { code: `stoppedPartway`, params: { message: SPENT.message, error: `trial-exhausted`, switchModel: true } },
|
|
1126
1126
|
});
|
|
@@ -1132,7 +1132,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1132
1132
|
const disk = { kind: `error`, code: `sandbox-disk-low`, message: `The sandbox's disk is full.` } as const satisfies AgentEvent;
|
|
1133
1133
|
expect(foldOf(`change the heading`, [...EDITED, disk]).at(-1)).toEqual({
|
|
1134
1134
|
role: `notice`,
|
|
1135
|
-
text: `${disk.message}
|
|
1135
|
+
text: `${disk.message} Stopped partway, changes kept: send a message to go on.`,
|
|
1136
1136
|
noticeCode: { code: `stoppedPartway`, params: { message: disk.message, error: `sandbox-disk-low` } },
|
|
1137
1137
|
});
|
|
1138
1138
|
});
|
|
@@ -1141,7 +1141,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1141
1141
|
expect(foldOf(`change the heading`, [SPENT])).toEqual([
|
|
1142
1142
|
{
|
|
1143
1143
|
role: `notice`,
|
|
1144
|
-
text: `${SPENT.message}
|
|
1144
|
+
text: `${SPENT.message} Not delivered: held for you to send again.`,
|
|
1145
1145
|
noticeCode: { code: `undelivered`, params: { message: SPENT.message, error: `trial-exhausted` } },
|
|
1146
1146
|
},
|
|
1147
1147
|
]);
|
|
@@ -1164,7 +1164,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1164
1164
|
|
|
1165
1165
|
it(`offers to send it again, as the sandbox's to run rather than the composer's`, () => {
|
|
1166
1166
|
const row = foldOf(`land it`, [kept]).at(-1);
|
|
1167
|
-
expect(row?.text).toBe(`${REFUSED.message} Nothing
|
|
1167
|
+
expect(row?.text).toBe(`${REFUSED.message} Nothing ran; the message above is kept to send again.`);
|
|
1168
1168
|
expect(row).toMatchObject({ noticeAction: `sendAgain`, sandboxHeld: true });
|
|
1169
1169
|
});
|
|
1170
1170
|
|
|
@@ -1178,7 +1178,7 @@ describe(`a refusal that ran nothing`, () => {
|
|
|
1178
1178
|
held: { ran: false },
|
|
1179
1179
|
} as const satisfies AgentEvent;
|
|
1180
1180
|
const row = foldOf(`land it`, [lowMemory]).at(-1);
|
|
1181
|
-
expect(row?.text).toBe(`${lowMemory.message} Nothing
|
|
1181
|
+
expect(row?.text).toBe(`${lowMemory.message} Nothing ran; send the message above anyway to start it.`);
|
|
1182
1182
|
expect(row).toMatchObject({ noticeAction: `sandboxMemory`, sandboxHeld: true });
|
|
1183
1183
|
});
|
|
1184
1184
|
});
|
|
@@ -1215,7 +1215,7 @@ describe(`the code beside a notice's words`, () => {
|
|
|
1215
1215
|
it(`names each land outcome, with the counts and repos its sentence was worded from`, () => {
|
|
1216
1216
|
expect(lastOf([{ kind: `landed`, landed: true }])).toEqual({
|
|
1217
1217
|
role: `notice`,
|
|
1218
|
-
text: `
|
|
1218
|
+
text: `Landed in your workspace.`,
|
|
1219
1219
|
noticeCode: { code: `landed` },
|
|
1220
1220
|
});
|
|
1221
1221
|
expect(lastOf([{ kind: `landed`, landed: true, deps: { missing: 2, started: [], deferred: true } }])?.noticeCode).toEqual({
|
|
@@ -1228,7 +1228,7 @@ describe(`the code beside a notice's words`, () => {
|
|
|
1228
1228
|
];
|
|
1229
1229
|
expect(lastOf([{ kind: `landed`, landed: false, conflicts }])).toEqual({
|
|
1230
1230
|
role: `notice`,
|
|
1231
|
-
text: `3
|
|
1231
|
+
text: `3 files couldn't land in root, web: resolve in the agent's review.`,
|
|
1232
1232
|
noticeCode: { code: `landConflict`, params: { files: 3, repos: `root, web` } },
|
|
1233
1233
|
});
|
|
1234
1234
|
});
|
|
@@ -1264,7 +1264,7 @@ describe(`the code beside a notice's words`, () => {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
expect(lastOf([{ kind: `error`, code: `claude-token-refused`, message: `Token refused.` }])).toEqual({
|
|
1266
1266
|
role: `notice`,
|
|
1267
|
-
text: `Token refused. Reconnect the account to
|
|
1267
|
+
text: `Token refused. Reconnect the account to continue.`,
|
|
1268
1268
|
noticeCode: { code: `reconnect`, params: { message: `Token refused.`, error: `claude-token-refused` } },
|
|
1269
1269
|
});
|
|
1270
1270
|
});
|
|
@@ -1471,7 +1471,7 @@ describe("transcriptIncidents", () => {
|
|
|
1471
1471
|
it("words the move with both accounts' names, and codes it", () => {
|
|
1472
1472
|
expect(moved).toEqual({
|
|
1473
1473
|
role: "notice",
|
|
1474
|
-
text: "Ran on radarsu@gmail.com:
|
|
1474
|
+
text: "Ran on radarsu@gmail.com: Work's plan or organization doesn't allow it.",
|
|
1475
1475
|
noticeCode: { code: "accountMoved", params: { why: "refused", from: "Work", to: "radarsu@gmail.com", said: ORG_OFF } },
|
|
1476
1476
|
});
|
|
1477
1477
|
expect(sandboxNoticeOf(accountMovedRow({ why: "cold", from: "Work", to: "Home" }))).toEqual({ code: "accountMoved", params: { why: "cold", from: "Work", to: "Home" } });
|