@intentic/sandbox-contract 1.317.0 → 1.318.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 +12 -4
- package/dist/chores/chores.js +1 -1
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/probes.js +1 -1
- package/dist/chores/probes.js.map +1 -1
- package/dist/contracts/accounts.contract.d.ts +75 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/accounts.contract.js +10 -1
- package/dist/contracts/accounts.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +55 -1
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +796 -93
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +12 -12
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts +22 -4
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +38 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +2 -0
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts +23 -0
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +6 -1
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +12 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +2 -0
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/providers.contract.d.ts +4 -0
- package/dist/contracts/providers.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +143 -124
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +37 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +20 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +4 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +31 -2
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +20 -1
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +96 -435
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +2 -12
- 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/contracts/translator.contract.js.map +1 -1
- package/dist/contracts/webext.contract.d.ts +38 -0
- package/dist/contracts/webext.contract.d.ts.map +1 -1
- package/dist/contracts/webext.contract.js +3 -0
- package/dist/contracts/webext.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +1 -80
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +0 -27
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +21 -0
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +11 -0
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-words.d.ts +1 -0
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +1 -1
- package/dist/events/agent-words.js.map +1 -1
- package/dist/events/land-breakage.d.ts.map +1 -1
- package/dist/events/land-breakage.js.map +1 -1
- package/dist/events/resume.d.ts +6 -1
- package/dist/events/resume.d.ts.map +1 -1
- package/dist/events/resume.js +17 -10
- package/dist/events/resume.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts +183 -0
- package/dist/events/sandbox-notice.d.ts.map +1 -0
- package/dist/events/sandbox-notice.js +56 -0
- package/dist/events/sandbox-notice.js.map +1 -0
- package/dist/events/system-events.d.ts +46 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/system-events.js +2 -0
- package/dist/events/system-events.js.map +1 -1
- package/dist/events/transcript.d.ts +24 -0
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +3 -1
- package/dist/events/transcript.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts +1 -3
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +1 -3
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/project-dir.d.ts +6 -0
- package/dist/ids/project-dir.d.ts.map +1 -0
- package/dist/ids/project-dir.js +43 -0
- package/dist/ids/project-dir.js.map +1 -0
- package/dist/index.d.ts +11570 -11030
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +2 -2
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/models/model-roles.d.ts +1 -9
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +1 -9
- package/dist/models/model-roles.js.map +1 -1
- package/dist/policy/command-classes.d.ts.map +1 -1
- package/dist/policy/command-classes.js +52 -3
- package/dist/policy/command-classes.js.map +1 -1
- package/dist/policy/safety-policy.d.ts +7 -1
- package/dist/policy/safety-policy.d.ts.map +1 -1
- package/dist/policy/safety-policy.js +2 -0
- package/dist/policy/safety-policy.js.map +1 -1
- package/dist/policy/secret-hosts.d.ts +13 -0
- package/dist/policy/secret-hosts.d.ts.map +1 -0
- package/dist/policy/secret-hosts.js +41 -0
- package/dist/policy/secret-hosts.js.map +1 -0
- package/dist/policy/turned-away.d.ts.map +1 -1
- package/dist/policy/turned-away.js +1 -0
- package/dist/policy/turned-away.js.map +1 -1
- package/dist/protocol/raw-routes.d.ts +7 -0
- package/dist/protocol/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw-routes.js +4 -0
- package/dist/protocol/raw-routes.js.map +1 -1
- package/dist/protocol/routes.d.ts +2 -6
- package/dist/protocol/routes.d.ts.map +1 -1
- package/dist/protocol/routes.js +2 -3
- package/dist/protocol/routes.js.map +1 -1
- package/dist/protocol/stream-of.d.ts +6 -0
- package/dist/protocol/stream-of.d.ts.map +1 -0
- package/dist/protocol/stream-of.js +4 -0
- package/dist/protocol/stream-of.js.map +1 -0
- package/dist/schemas/activity.js +1 -1
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent.d.ts +19 -2
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +2 -1
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents.d.ts +61 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +36 -0
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/automations.d.ts +18 -0
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/capabilities.d.ts +2 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +34 -4
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/ci.d.ts +69 -9
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +29 -8
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/context-trim.d.ts +5 -1
- package/dist/schemas/context-trim.d.ts.map +1 -1
- package/dist/schemas/context-trim.js +8 -4
- package/dist/schemas/context-trim.js.map +1 -1
- package/dist/schemas/devices.d.ts +23 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +16 -1
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/environment.d.ts +48 -0
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js +15 -0
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +24 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/git/git.d.ts +13 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +11 -1
- package/dist/schemas/git/git.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 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/keep-warm.d.ts +4 -0
- package/dist/schemas/keep-warm.d.ts.map +1 -1
- package/dist/schemas/keep-warm.js +15 -5
- package/dist/schemas/keep-warm.js.map +1 -1
- package/dist/schemas/loopback-catch.d.ts +33 -0
- package/dist/schemas/loopback-catch.d.ts.map +1 -0
- package/dist/schemas/loopback-catch.js +20 -0
- package/dist/schemas/loopback-catch.js.map +1 -0
- package/dist/schemas/maintenance.js +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/needs.d.ts +3 -0
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +10 -3
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/personas.d.ts.map +1 -1
- package/dist/schemas/personas.js +6 -3
- package/dist/schemas/personas.js.map +1 -1
- package/dist/schemas/providers/provider-oauth.d.ts +87 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/providers/provider-oauth.js +20 -0
- package/dist/schemas/providers/provider-oauth.js.map +1 -1
- package/dist/schemas/secrets.d.ts +66 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +50 -0
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings-history.d.ts +1 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +1 -0
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings.d.ts +42 -2
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +26 -4
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts +2 -3
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +12 -4
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/webext.d.ts +3 -0
- package/dist/schemas/webext.d.ts.map +1 -1
- package/dist/schemas/webext.js +1 -0
- package/dist/schemas/webext.js.map +1 -1
- package/dist/schemas/workflows.js +3 -3
- package/dist/schemas/workflows.js.map +1 -1
- package/dist/schemas/workspace/workspace-tree.d.ts +2 -0
- package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-tree.js +4 -0
- package/dist/schemas/workspace/workspace-tree.js.map +1 -1
- package/dist/state/definition.d.ts +12 -4
- 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 +7 -0
- package/dist/state/history-state.js.map +1 -1
- package/dist/state/runtime-state.d.ts +0 -3
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +0 -1
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +0 -5
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +0 -6
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/text/documents.d.ts +3 -0
- package/dist/text/documents.d.ts.map +1 -1
- package/dist/text/documents.js +14 -0
- package/dist/text/documents.js.map +1 -1
- package/dist/text/transcript-fold.d.ts +4 -3
- package/dist/text/transcript-fold.d.ts.map +1 -1
- package/dist/text/transcript-fold.js +137 -31
- 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 +5 -5
- package/src/chores/chores.ts +2 -2
- package/src/chores/probes.ts +1 -1
- package/src/contracts/accounts.contract.ts +12 -0
- package/src/contracts/agents.contract.ts +13 -13
- package/src/contracts/device.contract.ts +5 -0
- package/src/contracts/endpoints.contract.ts +20 -4
- package/src/contracts/secrets.contract.ts +28 -0
- package/src/contracts/settings.contract.ts +29 -0
- package/src/contracts/system.contract.ts +5 -14
- package/src/contracts/translator.contract.ts +2 -1
- package/src/contracts/webext.contract.ts +7 -1
- package/src/contracts/workspace.contract.ts +0 -37
- package/src/events/agent-events.ts +18 -1
- package/src/events/agent-words.ts +4 -1
- package/src/events/land-breakage.ts +3 -4
- package/src/events/resume.test.ts +13 -2
- package/src/events/resume.ts +25 -12
- package/src/events/sandbox-notice.ts +92 -0
- package/src/events/system-events.ts +7 -0
- package/src/events/transcript.ts +7 -1
- package/src/events/verify-nudge.ts +3 -3
- package/src/ids/conversation-ids.test.ts +2 -26
- package/src/ids/conversation-ids.ts +6 -12
- package/src/ids/project-dir.fixture.json +65 -0
- package/src/ids/project-dir.test.ts +60 -0
- package/src/ids/project-dir.ts +70 -0
- package/src/index.ts +12 -4
- package/src/models/agent-catalog.test.ts +7 -1
- package/src/models/agent-runtimes.ts +7 -5
- package/src/models/model-roles.ts +1 -9
- package/src/policy/command-classes.test.ts +39 -0
- package/src/policy/command-classes.ts +70 -3
- package/src/policy/safety-policy.ts +10 -0
- package/src/policy/secret-hosts.test.ts +89 -0
- package/src/policy/secret-hosts.ts +73 -0
- package/src/policy/turned-away.ts +1 -0
- package/src/protocol/raw-routes.ts +5 -1
- package/src/protocol/routes.test.ts +6 -6
- package/src/protocol/routes.ts +2 -9
- package/src/protocol/stream-of.ts +13 -0
- package/src/schemas/activity.ts +1 -1
- package/src/schemas/agent.ts +4 -1
- package/src/schemas/agents.ts +58 -4
- package/src/schemas/automations.ts +2 -2
- package/src/schemas/capabilities.ts +44 -7
- package/src/schemas/ci.ts +56 -11
- package/src/schemas/context-trim.ts +11 -6
- package/src/schemas/devices.ts +38 -2
- package/src/schemas/environment.ts +39 -0
- package/src/schemas/git/git.ts +20 -2
- package/src/schemas/hosts.ts +4 -1
- package/src/schemas/keep-warm.ts +19 -6
- package/src/schemas/loopback-catch.ts +45 -0
- package/src/schemas/maintenance.ts +1 -1
- package/src/schemas/needs.ts +12 -3
- package/src/schemas/personas.ts +8 -3
- package/src/schemas/providers/provider-oauth.ts +35 -0
- package/src/schemas/secrets.ts +70 -0
- package/src/schemas/settings-history.ts +2 -0
- package/src/schemas/settings.test.ts +19 -1
- package/src/schemas/settings.ts +58 -9
- package/src/schemas/speaker.ts +5 -5
- package/src/schemas/terminal.ts +19 -6
- package/src/schemas/webext.ts +3 -0
- package/src/schemas/workflows.ts +5 -5
- package/src/schemas/workspace/workspace-tree.ts +7 -0
- package/src/state/fix-attempt-plan.test.ts +1 -1
- package/src/state/fix-stance.ts +1 -1
- package/src/state/history-state.ts +14 -0
- package/src/state/runtime-state.ts +0 -3
- package/src/state/workspace-state.ts +0 -6
- package/src/text/documents.test.ts +25 -1
- package/src/text/documents.ts +24 -0
- package/src/text/title.ts +1 -1
- package/src/text/transcript-fold.test.ts +218 -25
- package/src/text/transcript-fold.ts +166 -45
- package/src/webext/index.ts +1 -0
- package/dist/schemas/workspace/push-checks.d.ts +0 -222
- package/dist/schemas/workspace/push-checks.d.ts.map +0 -1
- package/dist/schemas/workspace/push-checks.js +0 -97
- package/dist/schemas/workspace/push-checks.js.map +0 -1
- package/dist/state/red-streak.d.ts +0 -7
- package/dist/state/red-streak.d.ts.map +0 -1
- package/dist/state/red-streak.js +0 -11
- package/dist/state/red-streak.js.map +0 -1
- package/src/schemas/workspace/push-checks.test.ts +0 -28
- package/src/schemas/workspace/push-checks.ts +0 -155
- package/src/state/red-streak.test.ts +0 -28
- package/src/state/red-streak.ts +0 -28
|
@@ -10,17 +10,18 @@ import {
|
|
|
10
10
|
type TranscriptSubagent,
|
|
11
11
|
type TranscriptTool,
|
|
12
12
|
} from "../events/transcript.js";
|
|
13
|
-
import { contextTrimLine } from "../schemas/context-trim.js";
|
|
14
|
-
import { keptWarmLine } from "../schemas/keep-warm.js";
|
|
13
|
+
import { contextTrimLine, contextTrimNotice } from "../schemas/context-trim.js";
|
|
14
|
+
import { keptWarmLine, keptWarmNotice } from "../schemas/keep-warm.js";
|
|
15
15
|
import { isLandConflict } from "../events/land-conflict.js";
|
|
16
16
|
import { turnedAwayCode } from "../policy/turned-away.js";
|
|
17
17
|
import { mentionedPathTokens } from "./mentions.js";
|
|
18
18
|
import { unspokenPromptRow } from "../events/agent-words.js";
|
|
19
19
|
import { needRowText } from "../events/need-wake.js";
|
|
20
|
+
import { noticeCode, sandboxNoticeOf } from "../events/sandbox-notice.js";
|
|
20
21
|
|
|
21
22
|
// Folds a turn's frames into rows once, live and for the settled record alike, so a reopened chat matches what was on
|
|
22
|
-
// screen.
|
|
23
|
-
//
|
|
23
|
+
// screen. The main turn's frames are its rows; a frame a subagent produced (tagged with the call that spawned it) nests
|
|
24
|
+
// under that call's card. Rows mutate in place; every patch carries a copy of what it names.
|
|
24
25
|
//
|
|
25
26
|
// Every subagent lands on the card of the call that started it, whichever mechanism started it. An in-process one (the
|
|
26
27
|
// runtime's own Agent/Task tool) is named by that call's id, so its card is found at once. A spawned one is named by its
|
|
@@ -31,6 +32,7 @@ export type TurnEnding = "settled" | "stopped";
|
|
|
31
32
|
|
|
32
33
|
// A compaction's row, live and restored from the provider's store alike.
|
|
33
34
|
export const COMPACTED_NOTICE = "Context compacted to free up space.";
|
|
35
|
+
export const compactedRow = (): TranscriptRow => ({ role: "notice", text: COMPACTED_NOTICE, noticeCode: noticeCode({ code: "compacted" }) });
|
|
34
36
|
|
|
35
37
|
// Where a tool card lives: its row, and the parent card it nests under when it's a helper's own call.
|
|
36
38
|
interface CardPlace {
|
|
@@ -78,7 +80,8 @@ const empty = (row: TranscriptRow): boolean =>
|
|
|
78
80
|
!holdsRequest(row);
|
|
79
81
|
|
|
80
82
|
// Clause appended to the landed notice for a workspace dependency change, or empty when there is none. Reports the
|
|
81
|
-
// install as already started, or
|
|
83
|
+
// install as already started, or as on its way: the daemon starts it within seconds, in the install lane, behind any
|
|
84
|
+
// install already running; never as a request.
|
|
82
85
|
const dependencyLine = (deps: { missing: number; started: string[]; deferred: boolean } | undefined): string => {
|
|
83
86
|
if (deps === undefined || deps.missing === 0) {
|
|
84
87
|
return ``;
|
|
@@ -86,10 +89,40 @@ const dependencyLine = (deps: { missing: number; started: string[]; deferred: bo
|
|
|
86
89
|
// `missing` counts versions the turn bumped as well as names it added, so the sentence names both.
|
|
87
90
|
const what = `${deps.missing} ${deps.missing === 1 ? `dependency` : `dependencies`} it added or changed`;
|
|
88
91
|
return deps.deferred
|
|
89
|
-
? ` ${what} ${deps.missing === 1 ? `is` : `are`}
|
|
92
|
+
? ` ${what} ${deps.missing === 1 ? `is` : `are`} being installed in your tree: the install waits for any other install to finish, appears in Work terminals, and its outcome lands in Activity.`
|
|
90
93
|
: ` Installing ${what}; the project's checks run when that finishes, and the outcome lands in Activity.`;
|
|
91
94
|
};
|
|
92
95
|
|
|
96
|
+
// Said as an agent's own install starts: where it writes and what outlasts it. Names up to three projects, the workspace
|
|
97
|
+
// root first; an install the gate could not place in a project says only where it writes. Coded like every sandbox
|
|
98
|
+
// notice (sandbox-notice.ts `installing`), so the chat can say it in the reader's language.
|
|
99
|
+
const INSTALL_NAMED = 3;
|
|
100
|
+
const installRow = (event: { readonly reach: "own-copy" | "main-tree"; readonly projects: readonly string[] }): TranscriptRow => {
|
|
101
|
+
const root = event.projects.includes(``);
|
|
102
|
+
const dirs = event.projects.filter((dir) => dir !== ``).map((dir) => `${dir}/`);
|
|
103
|
+
const shownDirs = dirs.slice(0, INSTALL_NAMED - (root ? 1 : 0));
|
|
104
|
+
const more = dirs.length - shownDirs.length;
|
|
105
|
+
const named = [...(root ? [`the workspace root`] : []), ...shownDirs].join(`, `);
|
|
106
|
+
const list = more > 0 ? `${named} and ${more} more` : named;
|
|
107
|
+
const where = list === `` ? `` : ` in ${list}`;
|
|
108
|
+
const ownCopy = event.reach === `own-copy`;
|
|
109
|
+
return {
|
|
110
|
+
role: "notice",
|
|
111
|
+
text: ownCopy
|
|
112
|
+
? `Installing packages${where} into this conversation's own copy. The manifest and lockfile land with the work, and the review lists what it adds.`
|
|
113
|
+
: `Installing packages${where} in the main tree, one install at a time.`,
|
|
114
|
+
noticeCode: noticeCode({
|
|
115
|
+
code: "installing",
|
|
116
|
+
params: {
|
|
117
|
+
ownCopy,
|
|
118
|
+
root: root || undefined,
|
|
119
|
+
projects: shownDirs.length === 0 ? undefined : shownDirs.join(`, `),
|
|
120
|
+
more: more > 0 ? more : undefined,
|
|
121
|
+
},
|
|
122
|
+
}),
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
93
126
|
// One line reporting the daemon's rebase of this agent's branch onto the current workspace; `blocked` names repos it
|
|
94
127
|
// couldn't rebase, where the turn ran from an older base.
|
|
95
128
|
const syncLine = (sync: { commits: number; blocked: readonly string[] }): string => {
|
|
@@ -104,30 +137,57 @@ const syncLine = (sync: { commits: number; blocked: readonly string[] }): string
|
|
|
104
137
|
return [moved, blocked].filter((line) => line !== undefined).join(` `);
|
|
105
138
|
};
|
|
106
139
|
|
|
140
|
+
// Row for a spawned child's work gone into its parent's checkout, or held off it by a clash with the parent's edits.
|
|
141
|
+
const intoParentRow = (event: Extract<AgentEvent, { kind: "landed" }>): TranscriptRow => {
|
|
142
|
+
if (event.landed) {
|
|
143
|
+
return {
|
|
144
|
+
role: "notice",
|
|
145
|
+
text: `Changes went into the parent agent's checkout, as its in-process subagents' edits do: they reach your workspace with its land.`,
|
|
146
|
+
noticeCode: noticeCode({ code: "intoParent" }),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const files = (event.conflicts ?? []).flatMap((conflict) => conflict.paths).length;
|
|
150
|
+
return {
|
|
151
|
+
role: "notice",
|
|
152
|
+
text: `${files} file(s) clash with the parent agent's own edits, so nothing was written into its checkout. The parent was told, and can bring the changes in to resolve.`,
|
|
153
|
+
noticeCode: noticeCode({ code: "intoParentClash", params: { files } }),
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
107
157
|
// Row for a finished turn: held on its branch, landed automatically, or conflicted. A landed turn that changed
|
|
108
158
|
// dependencies appends dependencyLine, since the Changes diff can't show that.
|
|
109
159
|
const landedRow = (event: Extract<AgentEvent, { kind: "landed" }>): TranscriptRow => {
|
|
160
|
+
if (event.into !== undefined) {
|
|
161
|
+
return intoParentRow(event);
|
|
162
|
+
}
|
|
110
163
|
if (event.held === true) {
|
|
111
|
-
return { role: "notice", text: `Finished: the work is on this agent's branch, ready to land from its review
|
|
164
|
+
return { role: "notice", text: `Finished: the work is on this agent's branch, ready to land from its review.`, noticeCode: noticeCode({ code: "landHeld" }) };
|
|
112
165
|
}
|
|
113
166
|
if (!event.landed) {
|
|
114
167
|
// Per-file cause (your edits, a moved main line, a binary) is spelled out in the review, not named here.
|
|
115
168
|
const conflicts = event.conflicts ?? [];
|
|
169
|
+
const files = conflicts.flatMap((conflict) => conflict.paths).length;
|
|
170
|
+
const repos = conflicts.map((conflict) => conflict.repo).join(`, `);
|
|
116
171
|
return {
|
|
117
172
|
role: "notice",
|
|
118
|
-
text: `${
|
|
119
|
-
|
|
120
|
-
.join(`, `)}. Open the agent's review to see what blocked them and land from there.`,
|
|
173
|
+
text: `${files} file(s) couldn't land automatically in ${repos}. Open the agent's review to see what blocked them and land from there.`,
|
|
174
|
+
noticeCode: noticeCode({ code: "landConflict", params: { files, repos } }),
|
|
121
175
|
};
|
|
122
176
|
}
|
|
123
177
|
// noticeAction fires only here, right as the auto-behavior ran; an active install takes the slot instead.
|
|
178
|
+
const deps = event.deps === undefined || event.deps.missing === 0 ? undefined : event.deps;
|
|
124
179
|
return {
|
|
125
180
|
role: "notice",
|
|
126
181
|
text: `Changes landed in your workspace: review them in the Changes panel.${dependencyLine(event.deps)}`,
|
|
127
182
|
noticeAction: (event.deps?.started.length ?? 0) > 0 ? "depsInstall" : "landHold",
|
|
183
|
+
noticeCode: noticeCode({ code: "landed", params: deps === undefined ? undefined : { deps: deps.missing, queued: deps.deferred || undefined } }),
|
|
128
184
|
};
|
|
129
185
|
};
|
|
130
186
|
|
|
187
|
+
// A failure's own sentence and code, which every coded error row carries ahead of what it adds.
|
|
188
|
+
const failureOf = (event: Extract<AgentEvent, { kind: "error" }>): { message: string; error?: string } =>
|
|
189
|
+
event.code === undefined ? { message: event.message } : { message: event.message, error: event.code };
|
|
190
|
+
|
|
131
191
|
// The clause after a refusal that ran nothing. A turn somebody typed is held in its conversation's queue for another
|
|
132
192
|
// press; a turn that started itself — an automation, a loop, a watch wake — has no typed message and nobody watching,
|
|
133
193
|
// so promising a resend there names a composer the reader is not looking at. Neither version promises a retry: whether
|
|
@@ -148,6 +208,7 @@ const memoryPress = (event: Extract<AgentEvent, { kind: "error" }>): "sendAnyway
|
|
|
148
208
|
const heldRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow => {
|
|
149
209
|
const unattended = event.unattended === true;
|
|
150
210
|
const memory = event.code === "sandbox-memory-low";
|
|
211
|
+
const said = failureOf(event);
|
|
151
212
|
if (event.held !== undefined && !unattended) {
|
|
152
213
|
return {
|
|
153
214
|
role: "notice",
|
|
@@ -156,55 +217,95 @@ const heldRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow =
|
|
|
156
217
|
: `${event.message} Nothing has run yet: the message above is kept here to send again once that is sorted.`,
|
|
157
218
|
noticeAction: memory ? memoryPress(event) : "sendAgain",
|
|
158
219
|
sandboxHeld: true,
|
|
220
|
+
noticeCode: noticeCode({ code: "kept", params: { ...said, memory: memory || undefined } }),
|
|
159
221
|
};
|
|
160
222
|
}
|
|
161
223
|
if (!memory || unattended) {
|
|
162
|
-
return {
|
|
224
|
+
return {
|
|
225
|
+
role: "notice",
|
|
226
|
+
text: `${event.message} ${undelivered(unattended)}`,
|
|
227
|
+
noticeCode: noticeCode({ code: "undelivered", params: { ...said, unattended: unattended || undefined } }),
|
|
228
|
+
};
|
|
163
229
|
}
|
|
164
230
|
return {
|
|
165
231
|
role: "notice",
|
|
166
232
|
text: `${event.message} Your message is held: send it again to start anyway.`,
|
|
167
233
|
noticeAction: memoryPress(event),
|
|
234
|
+
noticeCode: noticeCode({ code: "memoryHeld", params: said }),
|
|
168
235
|
};
|
|
169
236
|
};
|
|
170
237
|
|
|
238
|
+
// What an armed credential renewal promises, and what its row says instead once a later failure in the same run took
|
|
239
|
+
// that promise back (TranscriptFold.withdrawRenewal).
|
|
240
|
+
const RENEWING = "The credential is being renewed and this turn continues automatically.";
|
|
241
|
+
const RENEWAL_WITHDRAWN =
|
|
242
|
+
"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.";
|
|
243
|
+
|
|
171
244
|
// Row for a turn-ending error: the provider's own message plus one clause on what happens next. The live wait itself is
|
|
172
245
|
// drawn by the chat, not stored here.
|
|
173
246
|
const errorRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow => {
|
|
174
247
|
const { message, code } = event;
|
|
248
|
+
const said = failureOf(event);
|
|
175
249
|
switch (code) {
|
|
176
|
-
case "provider-outage":
|
|
177
|
-
|
|
250
|
+
case "provider-outage": {
|
|
251
|
+
const retry = retryClause(event);
|
|
252
|
+
return retry === undefined
|
|
253
|
+
? {
|
|
254
|
+
role: "notice",
|
|
255
|
+
text: `${message} Nothing is retrying it, so the turn is waiting here.`,
|
|
256
|
+
noticeCode: noticeCode({ code: "outageWaiting", params: said }),
|
|
257
|
+
}
|
|
258
|
+
: { role: "notice", text: `${message} ${retry.text}`, noticeCode: retry.code };
|
|
259
|
+
}
|
|
178
260
|
case "claude-token-refused":
|
|
179
261
|
return event.autoResume === "scheduled"
|
|
180
262
|
? {
|
|
181
263
|
role: "notice",
|
|
182
|
-
text: `${message}
|
|
264
|
+
text: `${message} ${RENEWING}`,
|
|
183
265
|
noticeWait: "credentialRenewal",
|
|
266
|
+
noticeCode: noticeCode({ code: "renewing", params: said }),
|
|
184
267
|
}
|
|
185
|
-
: {
|
|
268
|
+
: {
|
|
269
|
+
role: "notice",
|
|
270
|
+
text: `${message} Reconnect the account to pick this conversation back up.`,
|
|
271
|
+
noticeCode: noticeCode({ code: "reconnect", params: said }),
|
|
272
|
+
};
|
|
186
273
|
case "rate_limit":
|
|
187
274
|
return { role: "notice", text: message };
|
|
188
275
|
default:
|
|
189
276
|
break;
|
|
190
277
|
}
|
|
191
278
|
if (!turnedAwayCode(code)) {
|
|
192
|
-
const
|
|
193
|
-
|
|
279
|
+
const retry = retryClause(event);
|
|
280
|
+
if (retry !== undefined) {
|
|
281
|
+
return { role: "notice", text: `${message} ${retry.text}`, noticeCode: retry.code };
|
|
282
|
+
}
|
|
283
|
+
// A failure the sandbox names by code is coded too, so a reader that words that failure itself can; the
|
|
284
|
+
// provider's own uncoded words are only ever themselves.
|
|
285
|
+
return code === undefined ? { role: "notice", text: message } : { role: "notice", text: message, noticeCode: noticeCode({ code: "failed", params: said }) };
|
|
194
286
|
}
|
|
195
287
|
return heldRow(event);
|
|
196
288
|
};
|
|
197
289
|
|
|
198
290
|
// What a laddered wall's automatic re-runs are doing, said on the failure's own row so the count stays in the record.
|
|
199
|
-
const retryClause = (event: Extract<AgentEvent, { kind: "error" }>): string | undefined => {
|
|
291
|
+
const retryClause = (event: Extract<AgentEvent, { kind: "error" }>): { text: string; code: NonNullable<TranscriptRow["noticeCode"]> } | undefined => {
|
|
200
292
|
const { retries } = event;
|
|
201
293
|
if (retries === undefined) {
|
|
202
294
|
return undefined;
|
|
203
295
|
}
|
|
296
|
+
const said = failureOf(event);
|
|
204
297
|
if (event.autoResume === "scheduled") {
|
|
205
|
-
return
|
|
298
|
+
return {
|
|
299
|
+
text: `Retrying by itself: attempt ${retries.made + 1} of ${retries.max}.`,
|
|
300
|
+
code: noticeCode({ code: "retrying", params: { ...said, attempt: retries.made + 1, of: retries.max } }),
|
|
301
|
+
};
|
|
206
302
|
}
|
|
207
|
-
return retries.made >= retries.max
|
|
303
|
+
return retries.made >= retries.max
|
|
304
|
+
? {
|
|
305
|
+
text: `Retried ${retries.made} of ${retries.max} times by itself; nothing more is sent automatically.`,
|
|
306
|
+
code: noticeCode({ code: "retried", params: { ...said, made: retries.made, of: retries.max } }),
|
|
307
|
+
}
|
|
308
|
+
: undefined;
|
|
208
309
|
};
|
|
209
310
|
|
|
210
311
|
// The turn's opening user row: text, timestamp, attachments, the message's id, and whatever the daemon later stamps onto
|
|
@@ -237,10 +338,7 @@ export class TranscriptFold {
|
|
|
237
338
|
// Set by `retract`: this turn was refused before it ran, and its message went back to the conversation's queue.
|
|
238
339
|
private unrun = false;
|
|
239
340
|
|
|
240
|
-
constructor(
|
|
241
|
-
opening: readonly TranscriptRow[],
|
|
242
|
-
private readonly tag?: string,
|
|
243
|
-
) {
|
|
341
|
+
constructor(opening: readonly TranscriptRow[]) {
|
|
244
342
|
for (const row of opening) {
|
|
245
343
|
this.rows.push(row);
|
|
246
344
|
}
|
|
@@ -251,7 +349,7 @@ export class TranscriptFold {
|
|
|
251
349
|
/** Folds one frame in; returns the patches it produced, in order. */
|
|
252
350
|
apply(event: AgentEvent): TranscriptPatch[] {
|
|
253
351
|
const parent = "parentToolUseId" in event ? event.parentToolUseId : undefined;
|
|
254
|
-
if (parent !==
|
|
352
|
+
if (parent !== undefined) {
|
|
255
353
|
return this.applyChild(event, parent);
|
|
256
354
|
}
|
|
257
355
|
switch (event.kind) {
|
|
@@ -346,22 +444,25 @@ export class TranscriptFold {
|
|
|
346
444
|
case "prompt_cache": {
|
|
347
445
|
// Only a conversation the sandbox kept warm gets a row: every other turn's cache is its own business.
|
|
348
446
|
const line = keptWarmLine(event);
|
|
349
|
-
|
|
447
|
+
const notice = keptWarmNotice(event);
|
|
448
|
+
return line === undefined || notice === undefined ? [] : this.pushRow({ role: "notice", text: line, noticeCode: noticeCode(notice) });
|
|
350
449
|
}
|
|
351
450
|
case "context_trim":
|
|
352
451
|
// A row of its own rather than a stamp on the message: what was left out is not part of what was sent,
|
|
353
452
|
// and the fold beside the message only ever lists notes that actually rode.
|
|
354
|
-
return this.pushRow({ role: "notice", text: contextTrimLine(event) });
|
|
453
|
+
return this.pushRow({ role: "notice", text: contextTrimLine(event), noticeCode: noticeCode(contextTrimNotice(event)) });
|
|
355
454
|
case "worktree":
|
|
356
455
|
return event.sync === undefined ? [] : this.synced(event.sync);
|
|
357
456
|
case "landed":
|
|
358
457
|
return this.pushRow(landedRow(event));
|
|
359
458
|
case "compact":
|
|
360
|
-
return this.pushRow(
|
|
459
|
+
return this.pushRow(compactedRow());
|
|
460
|
+
case "install":
|
|
461
|
+
return this.pushRow(installRow(event));
|
|
361
462
|
case "error":
|
|
362
463
|
// Keeps a refusal (no prose from the provider) from reading as a session that ended mid-question.
|
|
363
464
|
// A refusal that ran nothing takes its message back out ahead of the notice standing in for it.
|
|
364
|
-
return [...this.retract(event), ...this.pushRow(errorRow(event))];
|
|
465
|
+
return [...this.retract(event), ...this.withdrawRenewal(event), ...this.pushRow(errorRow(event))];
|
|
365
466
|
case "plan": {
|
|
366
467
|
// Folds a plan into an identical retired prose bubble instead of drawing the same markdown twice.
|
|
367
468
|
const adjacent = this.rows.at(-1);
|
|
@@ -534,6 +635,29 @@ export class TranscriptFold {
|
|
|
534
635
|
return [{ op: "drop", index: opener }];
|
|
535
636
|
}
|
|
536
637
|
|
|
638
|
+
// A run holds one hold, and each failure replaces it: a later failure in the run that armed a credential renewal is
|
|
639
|
+
// what the sandbox acts on now, so the renewal row's "continues automatically" is no longer true. It says the turn
|
|
640
|
+
// stopped instead, and no longer names a wait nobody is running. A renewal armed again keeps its promise.
|
|
641
|
+
private withdrawRenewal(event: Extract<AgentEvent, { kind: "error" }>): TranscriptPatch[] {
|
|
642
|
+
if (event.code === "claude-token-refused" && event.autoResume === "scheduled") {
|
|
643
|
+
return [];
|
|
644
|
+
}
|
|
645
|
+
const index = this.rows.findLastIndex((row) => row.role === "notice" && row.noticeWait === "credentialRenewal");
|
|
646
|
+
const row = this.rows[index];
|
|
647
|
+
if (row === undefined) {
|
|
648
|
+
return [];
|
|
649
|
+
}
|
|
650
|
+
const { noticeWait: _withdrawn, ...rest } = row;
|
|
651
|
+
const withdrawn: TranscriptRow = { ...rest, text: row.text.replace(RENEWING, RENEWAL_WITHDRAWN) };
|
|
652
|
+
// The code says the same as the words: the row still quotes its failure, and now reports the stop.
|
|
653
|
+
const renewing = sandboxNoticeOf(row);
|
|
654
|
+
if (renewing?.code === "renewing") {
|
|
655
|
+
withdrawn.noticeCode = noticeCode({ code: "renewalWithdrawn", params: renewing.params });
|
|
656
|
+
}
|
|
657
|
+
this.rows[index] = withdrawn;
|
|
658
|
+
return [this.replace(index)];
|
|
659
|
+
}
|
|
660
|
+
|
|
537
661
|
/**
|
|
538
662
|
* Ends the turn: closes the open bubble, freezes every still-pending card as nobody's decision, and notes a user
|
|
539
663
|
* stop.
|
|
@@ -547,17 +671,17 @@ export class TranscriptFold {
|
|
|
547
671
|
}
|
|
548
672
|
}
|
|
549
673
|
if (ending === "stopped") {
|
|
550
|
-
patches.push(...this.pushRow({ role: "notice", text: `Stopped
|
|
674
|
+
patches.push(...this.pushRow({ role: "notice", text: `Stopped.`, noticeCode: noticeCode({ code: "stopped" }) }));
|
|
551
675
|
}
|
|
552
676
|
return patches;
|
|
553
677
|
}
|
|
554
678
|
|
|
555
|
-
// Routes a frame from a child stream onto the card that spawned it
|
|
556
|
-
//
|
|
557
|
-
// frame is dropped.
|
|
558
|
-
private applyChild(event: AgentEvent, parent: string
|
|
559
|
-
const place =
|
|
560
|
-
if (place === undefined
|
|
679
|
+
// Routes a frame from a child stream onto the card that spawned it: its calls and its thinking, never its prose,
|
|
680
|
+
// which is the child's own and reaches the parent as the call's result. A spawning call absent from this stream means
|
|
681
|
+
// there is nothing to nest under, so the frame is dropped.
|
|
682
|
+
private applyChild(event: AgentEvent, parent: string): TranscriptPatch[] {
|
|
683
|
+
const place = this.cards.get(parent);
|
|
684
|
+
if (place === undefined) {
|
|
561
685
|
return [];
|
|
562
686
|
}
|
|
563
687
|
// Only the new words travel: the card whole, children and all, would go out again for every token.
|
|
@@ -714,8 +838,10 @@ export class TranscriptFold {
|
|
|
714
838
|
// saying so again one row under its own errand only repeats it. What did move is still told.
|
|
715
839
|
private synced(sync: { commits: number; blocked: readonly string[] }): TranscriptPatch[] {
|
|
716
840
|
const opener = this.opener === undefined ? undefined : this.rows[this.opener];
|
|
717
|
-
const
|
|
718
|
-
|
|
841
|
+
const told = opener !== undefined && isLandConflict(opener.text) ? { ...sync, blocked: [] } : sync;
|
|
842
|
+
const text = syncLine(told);
|
|
843
|
+
const blocked = told.blocked.length > 0 ? told.blocked.join(`, `) : undefined;
|
|
844
|
+
return text === "" ? [] : this.pushRow({ role: "notice", text, noticeCode: noticeCode({ code: "synced", params: { commits: told.commits, blocked } }) });
|
|
719
845
|
}
|
|
720
846
|
|
|
721
847
|
private stampOpener(mutate: (row: TranscriptRow) => void): TranscriptPatch[] {
|
|
@@ -732,13 +858,8 @@ export class TranscriptFold {
|
|
|
732
858
|
}
|
|
733
859
|
|
|
734
860
|
/** Folds a whole turn at once: opening rows, every frame, and how it ended; what a settled turn reads back as. */
|
|
735
|
-
export const foldTurn = (
|
|
736
|
-
|
|
737
|
-
events: readonly AgentEvent[],
|
|
738
|
-
ending: TurnEnding = "settled",
|
|
739
|
-
tag?: string,
|
|
740
|
-
): TranscriptRow[] => {
|
|
741
|
-
const fold = new TranscriptFold(opening, tag);
|
|
861
|
+
export const foldTurn = (opening: readonly TranscriptRow[], events: readonly AgentEvent[], ending: TurnEnding = "settled"): TranscriptRow[] => {
|
|
862
|
+
const fold = new TranscriptFold(opening);
|
|
742
863
|
for (const event of events) {
|
|
743
864
|
fold.apply(event);
|
|
744
865
|
}
|
package/src/webext/index.ts
CHANGED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const FindingSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
source: z.ZodString;
|
|
5
|
-
text: z.ZodString;
|
|
6
|
-
path: z.ZodOptional<z.ZodString>;
|
|
7
|
-
command: z.ZodOptional<z.ZodString>;
|
|
8
|
-
recheckable: z.ZodBoolean;
|
|
9
|
-
gate: z.ZodOptional<z.ZodEnum<{
|
|
10
|
-
code: "code";
|
|
11
|
-
tidy: "tidy";
|
|
12
|
-
}>>;
|
|
13
|
-
commit: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
sha: z.ZodString;
|
|
15
|
-
subject: z.ZodString;
|
|
16
|
-
}, z.core.$strip>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export type Finding = z.infer<typeof FindingSchema>;
|
|
19
|
-
export declare const RedDecisionKindSchema: z.ZodEnum<{
|
|
20
|
-
dismissed: "dismissed";
|
|
21
|
-
"fix-up": "fix-up";
|
|
22
|
-
reported: "reported";
|
|
23
|
-
resolved: "resolved";
|
|
24
|
-
spent: "spent";
|
|
25
|
-
}>;
|
|
26
|
-
export type RedDecisionKind = z.infer<typeof RedDecisionKindSchema>;
|
|
27
|
-
export declare const RedDecisionSchema: z.ZodObject<{
|
|
28
|
-
kind: z.ZodEnum<{
|
|
29
|
-
dismissed: "dismissed";
|
|
30
|
-
"fix-up": "fix-up";
|
|
31
|
-
reported: "reported";
|
|
32
|
-
resolved: "resolved";
|
|
33
|
-
spent: "spent";
|
|
34
|
-
}>;
|
|
35
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
36
|
-
at: z.ZodNumber;
|
|
37
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
38
|
-
findings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
-
}, z.core.$strip>;
|
|
40
|
-
export type RedDecision = z.infer<typeof RedDecisionSchema>;
|
|
41
|
-
export declare const RedSourceSchema: z.ZodEnum<{
|
|
42
|
-
ci: "ci";
|
|
43
|
-
push: "push";
|
|
44
|
-
}>;
|
|
45
|
-
export type RedSource = z.infer<typeof RedSourceSchema>;
|
|
46
|
-
export declare const RedSchema: z.ZodObject<{
|
|
47
|
-
source: z.ZodEnum<{
|
|
48
|
-
ci: "ci";
|
|
49
|
-
push: "push";
|
|
50
|
-
}>;
|
|
51
|
-
scope: z.ZodString;
|
|
52
|
-
since: z.ZodNumber;
|
|
53
|
-
findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
54
|
-
id: z.ZodString;
|
|
55
|
-
source: z.ZodString;
|
|
56
|
-
text: z.ZodString;
|
|
57
|
-
path: z.ZodOptional<z.ZodString>;
|
|
58
|
-
command: z.ZodOptional<z.ZodString>;
|
|
59
|
-
recheckable: z.ZodBoolean;
|
|
60
|
-
gate: z.ZodOptional<z.ZodEnum<{
|
|
61
|
-
code: "code";
|
|
62
|
-
tidy: "tidy";
|
|
63
|
-
}>>;
|
|
64
|
-
commit: z.ZodOptional<z.ZodObject<{
|
|
65
|
-
sha: z.ZodString;
|
|
66
|
-
subject: z.ZodString;
|
|
67
|
-
}, z.core.$strip>>;
|
|
68
|
-
}, z.core.$strip>>>;
|
|
69
|
-
decisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
70
|
-
kind: z.ZodEnum<{
|
|
71
|
-
dismissed: "dismissed";
|
|
72
|
-
"fix-up": "fix-up";
|
|
73
|
-
reported: "reported";
|
|
74
|
-
resolved: "resolved";
|
|
75
|
-
spent: "spent";
|
|
76
|
-
}>;
|
|
77
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
78
|
-
at: z.ZodNumber;
|
|
79
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
80
|
-
findings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
-
}, z.core.$strip>>>;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
export type Red = z.infer<typeof RedSchema>;
|
|
84
|
-
export declare const PushCheckSchema: z.ZodObject<{
|
|
85
|
-
project: z.ZodString;
|
|
86
|
-
id: z.ZodString;
|
|
87
|
-
at: z.ZodNumber;
|
|
88
|
-
remote: z.ZodOptional<z.ZodString>;
|
|
89
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
90
|
-
base: z.ZodOptional<z.ZodString>;
|
|
91
|
-
head: z.ZodString;
|
|
92
|
-
commits: z.ZodNumber;
|
|
93
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
94
|
-
id: z.ZodString;
|
|
95
|
-
source: z.ZodString;
|
|
96
|
-
text: z.ZodString;
|
|
97
|
-
path: z.ZodOptional<z.ZodString>;
|
|
98
|
-
command: z.ZodOptional<z.ZodString>;
|
|
99
|
-
recheckable: z.ZodBoolean;
|
|
100
|
-
gate: z.ZodOptional<z.ZodEnum<{
|
|
101
|
-
code: "code";
|
|
102
|
-
tidy: "tidy";
|
|
103
|
-
}>>;
|
|
104
|
-
commit: z.ZodOptional<z.ZodObject<{
|
|
105
|
-
sha: z.ZodString;
|
|
106
|
-
subject: z.ZodString;
|
|
107
|
-
}, z.core.$strip>>;
|
|
108
|
-
}, z.core.$strip>>;
|
|
109
|
-
refused: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
-
}, z.core.$strip>;
|
|
111
|
-
export type PushCheck = z.infer<typeof PushCheckSchema>;
|
|
112
|
-
export declare const PushChecksSchema: z.ZodObject<{
|
|
113
|
-
pushed: z.ZodArray<z.ZodObject<{
|
|
114
|
-
project: z.ZodString;
|
|
115
|
-
id: z.ZodString;
|
|
116
|
-
at: z.ZodNumber;
|
|
117
|
-
remote: z.ZodOptional<z.ZodString>;
|
|
118
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
119
|
-
base: z.ZodOptional<z.ZodString>;
|
|
120
|
-
head: z.ZodString;
|
|
121
|
-
commits: z.ZodNumber;
|
|
122
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
123
|
-
id: z.ZodString;
|
|
124
|
-
source: z.ZodString;
|
|
125
|
-
text: z.ZodString;
|
|
126
|
-
path: z.ZodOptional<z.ZodString>;
|
|
127
|
-
command: z.ZodOptional<z.ZodString>;
|
|
128
|
-
recheckable: z.ZodBoolean;
|
|
129
|
-
gate: z.ZodOptional<z.ZodEnum<{
|
|
130
|
-
code: "code";
|
|
131
|
-
tidy: "tidy";
|
|
132
|
-
}>>;
|
|
133
|
-
commit: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
sha: z.ZodString;
|
|
135
|
-
subject: z.ZodString;
|
|
136
|
-
}, z.core.$strip>>;
|
|
137
|
-
}, z.core.$strip>>;
|
|
138
|
-
refused: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
-
}, z.core.$strip>>;
|
|
140
|
-
reds: z.ZodArray<z.ZodObject<{
|
|
141
|
-
source: z.ZodEnum<{
|
|
142
|
-
ci: "ci";
|
|
143
|
-
push: "push";
|
|
144
|
-
}>;
|
|
145
|
-
scope: z.ZodString;
|
|
146
|
-
since: z.ZodNumber;
|
|
147
|
-
findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
148
|
-
id: z.ZodString;
|
|
149
|
-
source: z.ZodString;
|
|
150
|
-
text: z.ZodString;
|
|
151
|
-
path: z.ZodOptional<z.ZodString>;
|
|
152
|
-
command: z.ZodOptional<z.ZodString>;
|
|
153
|
-
recheckable: z.ZodBoolean;
|
|
154
|
-
gate: z.ZodOptional<z.ZodEnum<{
|
|
155
|
-
code: "code";
|
|
156
|
-
tidy: "tidy";
|
|
157
|
-
}>>;
|
|
158
|
-
commit: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
sha: z.ZodString;
|
|
160
|
-
subject: z.ZodString;
|
|
161
|
-
}, z.core.$strip>>;
|
|
162
|
-
}, z.core.$strip>>>;
|
|
163
|
-
decisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
164
|
-
kind: z.ZodEnum<{
|
|
165
|
-
dismissed: "dismissed";
|
|
166
|
-
"fix-up": "fix-up";
|
|
167
|
-
reported: "reported";
|
|
168
|
-
resolved: "resolved";
|
|
169
|
-
spent: "spent";
|
|
170
|
-
}>;
|
|
171
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
172
|
-
at: z.ZodNumber;
|
|
173
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
174
|
-
findings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
175
|
-
}, z.core.$strip>>>;
|
|
176
|
-
}, z.core.$strip>>;
|
|
177
|
-
}, z.core.$strip>;
|
|
178
|
-
export type PushChecks = z.infer<typeof PushChecksSchema>;
|
|
179
|
-
export declare const PushDismissSchema: z.ZodObject<{
|
|
180
|
-
project: z.ZodString;
|
|
181
|
-
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
|
-
restore: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
-
}, z.core.$strip>;
|
|
184
|
-
export type PushDismiss = z.infer<typeof PushDismissSchema>;
|
|
185
|
-
export declare const PushDismissResultSchema: z.ZodObject<{
|
|
186
|
-
changed: z.ZodNumber;
|
|
187
|
-
}, z.core.$strip>;
|
|
188
|
-
export declare const PushRecheckSchema: z.ZodObject<{
|
|
189
|
-
project: z.ZodString;
|
|
190
|
-
}, z.core.$strip>;
|
|
191
|
-
export declare const PushRecheckResultSchema: z.ZodObject<{
|
|
192
|
-
measured: z.ZodBoolean;
|
|
193
|
-
resolved: z.ZodNumber;
|
|
194
|
-
open: z.ZodNumber;
|
|
195
|
-
}, z.core.$strip>;
|
|
196
|
-
export type PushRecheckResult = z.infer<typeof PushRecheckResultSchema>;
|
|
197
|
-
export declare const PushFixSchema: z.ZodObject<{
|
|
198
|
-
project: z.ZodString;
|
|
199
|
-
pick: z.ZodOptional<z.ZodObject<{
|
|
200
|
-
agent: z.ZodString;
|
|
201
|
-
model: z.ZodString;
|
|
202
|
-
account: z.ZodOptional<z.ZodString>;
|
|
203
|
-
harness: z.ZodOptional<z.ZodEnum<{
|
|
204
|
-
"claude-code": "claude-code";
|
|
205
|
-
native: "native";
|
|
206
|
-
}>>;
|
|
207
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
208
|
-
thinking: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
-
fast: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
-
}, z.core.$strip>>;
|
|
211
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
212
|
-
continue: "continue";
|
|
213
|
-
"start-over": "start-over";
|
|
214
|
-
}>>;
|
|
215
|
-
}, z.core.$strip>;
|
|
216
|
-
export type PushFix = z.infer<typeof PushFixSchema>;
|
|
217
|
-
export declare const PushFixResultSchema: z.ZodObject<{
|
|
218
|
-
conversationId: z.ZodString;
|
|
219
|
-
}, z.core.$strip>;
|
|
220
|
-
export declare const pushRedOf: (reds: readonly Red[] | undefined, project: string) => Red | undefined;
|
|
221
|
-
export declare const pushFixBase: (red: Pick<Red, "scope" | "since"> | undefined) => string | undefined;
|
|
222
|
-
//# sourceMappingURL=push-checks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push-checks.d.ts","sourceRoot":"","sources":["../../../src/schemas/workspace/push-checks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;iBAmBxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAGpD,eAAO,MAAM,qBAAqB;;;;;;EAWhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBAS5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAK5D,eAAO,MAAM,eAAe;;;EAAyB,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMpB,CAAC;AACH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAI5C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;iBAE5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;iBASxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,mBAAmB;;iBAE9B,CAAC;AAGH,eAAO,MAAM,SAAS,SAAU,SAAS,GAAG,EAAE,GAAG,SAAS,WAAW,MAAM,KAAG,GAAG,GAAG,SACb,CAAC;AAKxE,eAAO,MAAM,WAAW,QAAS,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,SAAS,KAAG,MAAM,GAAG,SACoC,CAAC"}
|