@intentic/sandbox-contract 1.316.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 +616 -1
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +1134 -29
- 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/capabilities.contract.d.ts +16 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +10 -1
- package/dist/contracts/capabilities.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 +39 -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 +534 -0
- package/dist/contracts/needs.contract.d.ts.map +1 -0
- package/dist/contracts/needs.contract.js +80 -0
- package/dist/contracts/needs.contract.js.map +1 -0
- 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 +193 -2
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +53 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +31 -2
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +83 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +33 -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 +177 -356
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +13 -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 +330 -0
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +13 -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 +3 -2
- 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/need-wake.d.ts +17 -0
- package/dist/events/need-wake.d.ts.map +1 -0
- package/dist/events/need-wake.js +34 -0
- package/dist/events/need-wake.js.map +1 -0
- 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 +84 -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 +508 -0
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +12 -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 +3474 -1163
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -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 -5
- package/dist/protocol/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw-routes.js +4 -1
- 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 +119 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +45 -0
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/automations.d.ts +37 -0
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/capabilities.d.ts +21 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +50 -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 +91 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +23 -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 +4 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +3 -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 +664 -0
- package/dist/schemas/needs.d.ts.map +1 -0
- package/dist/schemas/needs.js +203 -0
- package/dist/schemas/needs.js.map +1 -0
- 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 +84 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +70 -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 +44 -2
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +30 -4
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/state-plan.d.ts +1 -0
- package/dist/schemas/state-plan.d.ts.map +1 -1
- package/dist/schemas/state-plan.js +3 -1
- package/dist/schemas/state-plan.js.map +1 -1
- package/dist/schemas/system.d.ts +20 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +7 -0
- package/dist/schemas/system.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/updates.d.ts +39 -0
- package/dist/schemas/updates.d.ts.map +1 -0
- package/dist/schemas/updates.js +31 -0
- package/dist/schemas/updates.js.map +1 -0
- 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 +28 -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 +10 -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 +4 -5
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +1 -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 +140 -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/capabilities.contract.ts +14 -1
- package/src/contracts/device.contract.ts +5 -0
- package/src/contracts/endpoints.contract.ts +20 -4
- package/src/contracts/needs.contract.ts +103 -0
- package/src/contracts/secrets.contract.ts +45 -3
- package/src/contracts/settings.contract.ts +29 -0
- package/src/contracts/system.contract.ts +19 -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 +22 -1
- package/src/events/agent-words.ts +6 -2
- package/src/events/land-breakage.ts +3 -4
- package/src/events/need-wake.test.ts +55 -0
- package/src/events/need-wake.ts +71 -0
- 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 +23 -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 +18 -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 +6 -3
- 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 +72 -5
- package/src/schemas/automations.ts +2 -2
- package/src/schemas/capabilities.ts +72 -7
- package/src/schemas/ci.ts +56 -11
- package/src/schemas/context-trim.ts +11 -6
- package/src/schemas/devices.ts +55 -2
- package/src/schemas/environment.ts +39 -0
- package/src/schemas/git/git.ts +20 -2
- package/src/schemas/hosts.ts +7 -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 +301 -0
- package/src/schemas/personas.ts +8 -3
- package/src/schemas/providers/provider-oauth.ts +35 -0
- package/src/schemas/secrets.ts +93 -0
- package/src/schemas/settings-history.ts +2 -0
- package/src/schemas/settings.test.ts +19 -1
- package/src/schemas/settings.ts +66 -9
- package/src/schemas/speaker.ts +5 -5
- package/src/schemas/state-plan.ts +8 -1
- package/src/schemas/system.ts +15 -0
- package/src/schemas/terminal.ts +19 -6
- package/src/schemas/updates.ts +56 -0
- 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 +19 -0
- package/src/state/runtime-state.ts +0 -3
- package/src/state/workspace-state.ts +4 -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 +170 -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,16 +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
|
+
import { needRowText } from "../events/need-wake.js";
|
|
20
|
+
import { noticeCode, sandboxNoticeOf } from "../events/sandbox-notice.js";
|
|
19
21
|
|
|
20
22
|
// Folds a turn's frames into rows once, live and for the settled record alike, so a reopened chat matches what was on
|
|
21
|
-
// screen.
|
|
22
|
-
//
|
|
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.
|
|
23
25
|
//
|
|
24
26
|
// Every subagent lands on the card of the call that started it, whichever mechanism started it. An in-process one (the
|
|
25
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
|
|
@@ -30,6 +32,7 @@ export type TurnEnding = "settled" | "stopped";
|
|
|
30
32
|
|
|
31
33
|
// A compaction's row, live and restored from the provider's store alike.
|
|
32
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" }) });
|
|
33
36
|
|
|
34
37
|
// Where a tool card lives: its row, and the parent card it nests under when it's a helper's own call.
|
|
35
38
|
interface CardPlace {
|
|
@@ -77,7 +80,8 @@ const empty = (row: TranscriptRow): boolean =>
|
|
|
77
80
|
!holdsRequest(row);
|
|
78
81
|
|
|
79
82
|
// Clause appended to the landed notice for a workspace dependency change, or empty when there is none. Reports the
|
|
80
|
-
// 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.
|
|
81
85
|
const dependencyLine = (deps: { missing: number; started: string[]; deferred: boolean } | undefined): string => {
|
|
82
86
|
if (deps === undefined || deps.missing === 0) {
|
|
83
87
|
return ``;
|
|
@@ -85,10 +89,40 @@ const dependencyLine = (deps: { missing: number; started: string[]; deferred: bo
|
|
|
85
89
|
// `missing` counts versions the turn bumped as well as names it added, so the sentence names both.
|
|
86
90
|
const what = `${deps.missing} ${deps.missing === 1 ? `dependency` : `dependencies`} it added or changed`;
|
|
87
91
|
return deps.deferred
|
|
88
|
-
? ` ${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.`
|
|
89
93
|
: ` Installing ${what}; the project's checks run when that finishes, and the outcome lands in Activity.`;
|
|
90
94
|
};
|
|
91
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
|
+
|
|
92
126
|
// One line reporting the daemon's rebase of this agent's branch onto the current workspace; `blocked` names repos it
|
|
93
127
|
// couldn't rebase, where the turn ran from an older base.
|
|
94
128
|
const syncLine = (sync: { commits: number; blocked: readonly string[] }): string => {
|
|
@@ -103,30 +137,57 @@ const syncLine = (sync: { commits: number; blocked: readonly string[] }): string
|
|
|
103
137
|
return [moved, blocked].filter((line) => line !== undefined).join(` `);
|
|
104
138
|
};
|
|
105
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
|
+
|
|
106
157
|
// Row for a finished turn: held on its branch, landed automatically, or conflicted. A landed turn that changed
|
|
107
158
|
// dependencies appends dependencyLine, since the Changes diff can't show that.
|
|
108
159
|
const landedRow = (event: Extract<AgentEvent, { kind: "landed" }>): TranscriptRow => {
|
|
160
|
+
if (event.into !== undefined) {
|
|
161
|
+
return intoParentRow(event);
|
|
162
|
+
}
|
|
109
163
|
if (event.held === true) {
|
|
110
|
-
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" }) };
|
|
111
165
|
}
|
|
112
166
|
if (!event.landed) {
|
|
113
167
|
// Per-file cause (your edits, a moved main line, a binary) is spelled out in the review, not named here.
|
|
114
168
|
const conflicts = event.conflicts ?? [];
|
|
169
|
+
const files = conflicts.flatMap((conflict) => conflict.paths).length;
|
|
170
|
+
const repos = conflicts.map((conflict) => conflict.repo).join(`, `);
|
|
115
171
|
return {
|
|
116
172
|
role: "notice",
|
|
117
|
-
text: `${
|
|
118
|
-
|
|
119
|
-
.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 } }),
|
|
120
175
|
};
|
|
121
176
|
}
|
|
122
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;
|
|
123
179
|
return {
|
|
124
180
|
role: "notice",
|
|
125
181
|
text: `Changes landed in your workspace: review them in the Changes panel.${dependencyLine(event.deps)}`,
|
|
126
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 } }),
|
|
127
184
|
};
|
|
128
185
|
};
|
|
129
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
|
+
|
|
130
191
|
// The clause after a refusal that ran nothing. A turn somebody typed is held in its conversation's queue for another
|
|
131
192
|
// press; a turn that started itself — an automation, a loop, a watch wake — has no typed message and nobody watching,
|
|
132
193
|
// so promising a resend there names a composer the reader is not looking at. Neither version promises a retry: whether
|
|
@@ -147,6 +208,7 @@ const memoryPress = (event: Extract<AgentEvent, { kind: "error" }>): "sendAnyway
|
|
|
147
208
|
const heldRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow => {
|
|
148
209
|
const unattended = event.unattended === true;
|
|
149
210
|
const memory = event.code === "sandbox-memory-low";
|
|
211
|
+
const said = failureOf(event);
|
|
150
212
|
if (event.held !== undefined && !unattended) {
|
|
151
213
|
return {
|
|
152
214
|
role: "notice",
|
|
@@ -155,55 +217,95 @@ const heldRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow =
|
|
|
155
217
|
: `${event.message} Nothing has run yet: the message above is kept here to send again once that is sorted.`,
|
|
156
218
|
noticeAction: memory ? memoryPress(event) : "sendAgain",
|
|
157
219
|
sandboxHeld: true,
|
|
220
|
+
noticeCode: noticeCode({ code: "kept", params: { ...said, memory: memory || undefined } }),
|
|
158
221
|
};
|
|
159
222
|
}
|
|
160
223
|
if (!memory || unattended) {
|
|
161
|
-
return {
|
|
224
|
+
return {
|
|
225
|
+
role: "notice",
|
|
226
|
+
text: `${event.message} ${undelivered(unattended)}`,
|
|
227
|
+
noticeCode: noticeCode({ code: "undelivered", params: { ...said, unattended: unattended || undefined } }),
|
|
228
|
+
};
|
|
162
229
|
}
|
|
163
230
|
return {
|
|
164
231
|
role: "notice",
|
|
165
232
|
text: `${event.message} Your message is held: send it again to start anyway.`,
|
|
166
233
|
noticeAction: memoryPress(event),
|
|
234
|
+
noticeCode: noticeCode({ code: "memoryHeld", params: said }),
|
|
167
235
|
};
|
|
168
236
|
};
|
|
169
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
|
+
|
|
170
244
|
// Row for a turn-ending error: the provider's own message plus one clause on what happens next. The live wait itself is
|
|
171
245
|
// drawn by the chat, not stored here.
|
|
172
246
|
const errorRow = (event: Extract<AgentEvent, { kind: "error" }>): TranscriptRow => {
|
|
173
247
|
const { message, code } = event;
|
|
248
|
+
const said = failureOf(event);
|
|
174
249
|
switch (code) {
|
|
175
|
-
case "provider-outage":
|
|
176
|
-
|
|
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
|
+
}
|
|
177
260
|
case "claude-token-refused":
|
|
178
261
|
return event.autoResume === "scheduled"
|
|
179
262
|
? {
|
|
180
263
|
role: "notice",
|
|
181
|
-
text: `${message}
|
|
264
|
+
text: `${message} ${RENEWING}`,
|
|
182
265
|
noticeWait: "credentialRenewal",
|
|
266
|
+
noticeCode: noticeCode({ code: "renewing", params: said }),
|
|
183
267
|
}
|
|
184
|
-
: {
|
|
268
|
+
: {
|
|
269
|
+
role: "notice",
|
|
270
|
+
text: `${message} Reconnect the account to pick this conversation back up.`,
|
|
271
|
+
noticeCode: noticeCode({ code: "reconnect", params: said }),
|
|
272
|
+
};
|
|
185
273
|
case "rate_limit":
|
|
186
274
|
return { role: "notice", text: message };
|
|
187
275
|
default:
|
|
188
276
|
break;
|
|
189
277
|
}
|
|
190
278
|
if (!turnedAwayCode(code)) {
|
|
191
|
-
const
|
|
192
|
-
|
|
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 }) };
|
|
193
286
|
}
|
|
194
287
|
return heldRow(event);
|
|
195
288
|
};
|
|
196
289
|
|
|
197
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.
|
|
198
|
-
const retryClause = (event: Extract<AgentEvent, { kind: "error" }>): string | undefined => {
|
|
291
|
+
const retryClause = (event: Extract<AgentEvent, { kind: "error" }>): { text: string; code: NonNullable<TranscriptRow["noticeCode"]> } | undefined => {
|
|
199
292
|
const { retries } = event;
|
|
200
293
|
if (retries === undefined) {
|
|
201
294
|
return undefined;
|
|
202
295
|
}
|
|
296
|
+
const said = failureOf(event);
|
|
203
297
|
if (event.autoResume === "scheduled") {
|
|
204
|
-
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
|
+
};
|
|
205
302
|
}
|
|
206
|
-
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;
|
|
207
309
|
};
|
|
208
310
|
|
|
209
311
|
// The turn's opening user row: text, timestamp, attachments, the message's id, and whatever the daemon later stamps onto
|
|
@@ -236,10 +338,7 @@ export class TranscriptFold {
|
|
|
236
338
|
// Set by `retract`: this turn was refused before it ran, and its message went back to the conversation's queue.
|
|
237
339
|
private unrun = false;
|
|
238
340
|
|
|
239
|
-
constructor(
|
|
240
|
-
opening: readonly TranscriptRow[],
|
|
241
|
-
private readonly tag?: string,
|
|
242
|
-
) {
|
|
341
|
+
constructor(opening: readonly TranscriptRow[]) {
|
|
243
342
|
for (const row of opening) {
|
|
244
343
|
this.rows.push(row);
|
|
245
344
|
}
|
|
@@ -250,7 +349,7 @@ export class TranscriptFold {
|
|
|
250
349
|
/** Folds one frame in; returns the patches it produced, in order. */
|
|
251
350
|
apply(event: AgentEvent): TranscriptPatch[] {
|
|
252
351
|
const parent = "parentToolUseId" in event ? event.parentToolUseId : undefined;
|
|
253
|
-
if (parent !==
|
|
352
|
+
if (parent !== undefined) {
|
|
254
353
|
return this.applyChild(event, parent);
|
|
255
354
|
}
|
|
256
355
|
switch (event.kind) {
|
|
@@ -345,22 +444,25 @@ export class TranscriptFold {
|
|
|
345
444
|
case "prompt_cache": {
|
|
346
445
|
// Only a conversation the sandbox kept warm gets a row: every other turn's cache is its own business.
|
|
347
446
|
const line = keptWarmLine(event);
|
|
348
|
-
|
|
447
|
+
const notice = keptWarmNotice(event);
|
|
448
|
+
return line === undefined || notice === undefined ? [] : this.pushRow({ role: "notice", text: line, noticeCode: noticeCode(notice) });
|
|
349
449
|
}
|
|
350
450
|
case "context_trim":
|
|
351
451
|
// A row of its own rather than a stamp on the message: what was left out is not part of what was sent,
|
|
352
452
|
// and the fold beside the message only ever lists notes that actually rode.
|
|
353
|
-
return this.pushRow({ role: "notice", text: contextTrimLine(event) });
|
|
453
|
+
return this.pushRow({ role: "notice", text: contextTrimLine(event), noticeCode: noticeCode(contextTrimNotice(event)) });
|
|
354
454
|
case "worktree":
|
|
355
455
|
return event.sync === undefined ? [] : this.synced(event.sync);
|
|
356
456
|
case "landed":
|
|
357
457
|
return this.pushRow(landedRow(event));
|
|
358
458
|
case "compact":
|
|
359
|
-
return this.pushRow(
|
|
459
|
+
return this.pushRow(compactedRow());
|
|
460
|
+
case "install":
|
|
461
|
+
return this.pushRow(installRow(event));
|
|
360
462
|
case "error":
|
|
361
463
|
// Keeps a refusal (no prose from the provider) from reading as a session that ended mid-question.
|
|
362
464
|
// A refusal that ran nothing takes its message back out ahead of the notice standing in for it.
|
|
363
|
-
return [...this.retract(event), ...this.pushRow(errorRow(event))];
|
|
465
|
+
return [...this.retract(event), ...this.withdrawRenewal(event), ...this.pushRow(errorRow(event))];
|
|
364
466
|
case "plan": {
|
|
365
467
|
// Folds a plan into an identical retired prose bubble instead of drawing the same markdown twice.
|
|
366
468
|
const adjacent = this.rows.at(-1);
|
|
@@ -408,6 +510,9 @@ export class TranscriptFold {
|
|
|
408
510
|
return this.park(event.requestId, { paymentOffer: { requestId: event.requestId, offer: event.offer, status: "pending" } });
|
|
409
511
|
case "credential_offer":
|
|
410
512
|
return this.park(event.requestId, { credentialOffer: { requestId: event.requestId, offer: event.offer, status: "pending" } });
|
|
513
|
+
case "need":
|
|
514
|
+
// A row of its own, not a park: the turn goes on, and the card reads the need's live state by its id.
|
|
515
|
+
return this.pushRow({ role: "notice", text: needRowText(event.need), need: event.need });
|
|
411
516
|
case "resolved":
|
|
412
517
|
// Releases the card; the answering window already froze it locally, so this is a no-op there.
|
|
413
518
|
return this.patchParked(event.requestId, (row) => Object.assign(row, settledRequests(row, event.reply)));
|
|
@@ -530,6 +635,29 @@ export class TranscriptFold {
|
|
|
530
635
|
return [{ op: "drop", index: opener }];
|
|
531
636
|
}
|
|
532
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
|
+
|
|
533
661
|
/**
|
|
534
662
|
* Ends the turn: closes the open bubble, freezes every still-pending card as nobody's decision, and notes a user
|
|
535
663
|
* stop.
|
|
@@ -543,17 +671,17 @@ export class TranscriptFold {
|
|
|
543
671
|
}
|
|
544
672
|
}
|
|
545
673
|
if (ending === "stopped") {
|
|
546
|
-
patches.push(...this.pushRow({ role: "notice", text: `Stopped
|
|
674
|
+
patches.push(...this.pushRow({ role: "notice", text: `Stopped.`, noticeCode: noticeCode({ code: "stopped" }) }));
|
|
547
675
|
}
|
|
548
676
|
return patches;
|
|
549
677
|
}
|
|
550
678
|
|
|
551
|
-
// Routes a frame from a child stream onto the card that spawned it
|
|
552
|
-
//
|
|
553
|
-
// frame is dropped.
|
|
554
|
-
private applyChild(event: AgentEvent, parent: string
|
|
555
|
-
const place =
|
|
556
|
-
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) {
|
|
557
685
|
return [];
|
|
558
686
|
}
|
|
559
687
|
// Only the new words travel: the card whole, children and all, would go out again for every token.
|
|
@@ -710,8 +838,10 @@ export class TranscriptFold {
|
|
|
710
838
|
// saying so again one row under its own errand only repeats it. What did move is still told.
|
|
711
839
|
private synced(sync: { commits: number; blocked: readonly string[] }): TranscriptPatch[] {
|
|
712
840
|
const opener = this.opener === undefined ? undefined : this.rows[this.opener];
|
|
713
|
-
const
|
|
714
|
-
|
|
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 } }) });
|
|
715
845
|
}
|
|
716
846
|
|
|
717
847
|
private stampOpener(mutate: (row: TranscriptRow) => void): TranscriptPatch[] {
|
|
@@ -728,13 +858,8 @@ export class TranscriptFold {
|
|
|
728
858
|
}
|
|
729
859
|
|
|
730
860
|
/** Folds a whole turn at once: opening rows, every frame, and how it ended; what a settled turn reads back as. */
|
|
731
|
-
export const foldTurn = (
|
|
732
|
-
|
|
733
|
-
events: readonly AgentEvent[],
|
|
734
|
-
ending: TurnEnding = "settled",
|
|
735
|
-
tag?: string,
|
|
736
|
-
): TranscriptRow[] => {
|
|
737
|
-
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);
|
|
738
863
|
for (const event of events) {
|
|
739
864
|
fold.apply(event);
|
|
740
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"}
|