@quantiya/codevibe-core 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/prompt-parser.test.d.ts +1 -0
- package/dist/adapter/registry.d.ts +69 -2
- package/dist/appsync/__tests__/appsync-client-event-source-filter.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-task-group.test.d.ts +1 -0
- package/dist/appsync/__tests__/cleanup-subscription.test.d.ts +1 -0
- package/dist/appsync/__tests__/coerce-awsjson-and-review-summary.test.d.ts +1 -0
- package/dist/appsync/__tests__/cp1f-quorum-sdk.test.d.ts +1 -0
- package/dist/appsync/__tests__/event-throttle.test.d.ts +1 -0
- package/dist/appsync/appsync-client.d.ts +621 -10
- package/dist/appsync/event-throttle.d.ts +28 -0
- package/dist/appsync/index.d.ts +3 -0
- package/dist/appsync/queries.d.ts +19 -0
- package/dist/audit-keys/index.d.ts +32 -0
- package/dist/auth/auth-service.d.ts +32 -2
- package/dist/auth/auth-telemetry.d.ts +19 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/companion-mode/__tests__/detect-parallel.test.d.ts +1 -0
- package/dist/companion-mode/index.d.ts +4 -3
- package/dist/companion-mode/persist-preference.d.ts +1 -1
- package/dist/config/config.d.ts +8 -1
- package/dist/continuation/__tests__/dirty-state-collector.test.d.ts +1 -0
- package/dist/continuation/__tests__/integration.test.d.ts +1 -0
- package/dist/continuation/__tests__/packet-reader.test.d.ts +1 -0
- package/dist/continuation/__tests__/packet-writer.test.d.ts +1 -0
- package/dist/continuation/__tests__/parity.test.d.ts +1 -0
- package/dist/continuation/__tests__/status-cli.test.d.ts +1 -0
- package/dist/continuation/dirty-state-collector.d.ts +46 -0
- package/dist/continuation/index.d.ts +8 -0
- package/dist/continuation/packet-reader.d.ts +33 -0
- package/dist/continuation/packet-writer.d.ts +86 -0
- package/dist/continuation/types.d.ts +239 -0
- package/dist/credential-broker/__tests__/broker.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/canonical.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/scrubber.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/upstream-client.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/vendor-key-store.test.d.ts +1 -0
- package/dist/credential-broker/audit-sink.d.ts +69 -0
- package/dist/credential-broker/broker-config.d.ts +39 -0
- package/dist/credential-broker/broker-token.d.ts +123 -0
- package/dist/credential-broker/broker.d.ts +165 -0
- package/dist/credential-broker/canonical.d.ts +119 -0
- package/dist/credential-broker/index.d.ts +15 -0
- package/dist/credential-broker/scrubber.d.ts +45 -0
- package/dist/credential-broker/types.d.ts +141 -0
- package/dist/credential-broker/upstream-client.d.ts +20 -0
- package/dist/credential-broker/vendor-key-store.d.ts +54 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +427 -124
- package/dist/keychain/__tests__/keychain-backend.test.d.ts +1 -0
- package/dist/keychain/keychain-backend.d.ts +82 -0
- package/dist/local-executor/__tests__/agentic-disposable-repo.test.d.ts +1 -0
- package/dist/local-executor/__tests__/agentic-resolve.test.d.ts +1 -0
- package/dist/local-executor/__tests__/agentic-resolver-flag.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class-a-sign.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class1-reconcilers.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class2-resolver.test.d.ts +1 -0
- package/dist/local-executor/__tests__/confined-model-caller.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-classifier.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-resolution-durable-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-resolution-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/cp1f-quorum-consumer.test.d.ts +1 -0
- package/dist/local-executor/__tests__/cp7-audit-writer.test.d.ts +1 -0
- package/dist/local-executor/__tests__/durable-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/git-lock-retry.test.d.ts +1 -0
- package/dist/local-executor/__tests__/implementor-argv.test.d.ts +1 -0
- package/dist/local-executor/__tests__/local-executor-teams.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-extract.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-git.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-resolve-agentic.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-resolve.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-journal-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-agentic-recovery.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-w3.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-waveb.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train.test.d.ts +1 -0
- package/dist/local-executor/__tests__/promote-wal-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/revert-reconcile.test.d.ts +1 -0
- package/dist/local-executor/__tests__/revert-runner.test.d.ts +1 -0
- package/dist/local-executor/__tests__/shared-contract-detector.test.d.ts +1 -0
- package/dist/local-executor/__tests__/substrate-engage.test.d.ts +1 -0
- package/dist/local-executor/__tests__/team-execution-flag.test.d.ts +1 -0
- package/dist/local-executor/__tests__/track-registry.test.d.ts +1 -0
- package/dist/local-executor/__tests__/wb2-review-bundle.test.d.ts +1 -0
- package/dist/local-executor/__tests__/wb2-substrate-spawn.live.test.d.ts +1 -0
- package/dist/local-executor/__tests__/workspace-shadow.test.d.ts +1 -0
- package/dist/local-executor/__tests__/worktree-merge.test.d.ts +1 -0
- package/dist/local-executor/agentic-disposable-repo.d.ts +52 -0
- package/dist/local-executor/agentic-resolve.d.ts +54 -0
- package/dist/local-executor/agentic-resolver-flag.d.ts +9 -0
- package/dist/local-executor/authority.d.ts +33 -1
- package/dist/local-executor/class-a-emit.d.ts +3 -1
- package/dist/local-executor/class-a-sign.d.ts +57 -0
- package/dist/local-executor/class-b-consumer.d.ts +159 -4
- package/dist/local-executor/class-b-verify.d.ts +30 -0
- package/dist/local-executor/class1-reconcilers.d.ts +58 -0
- package/dist/local-executor/class2-resolver.d.ts +74 -0
- package/dist/local-executor/confined-model-caller.d.ts +39 -0
- package/dist/local-executor/conflict-classifier.d.ts +21 -0
- package/dist/local-executor/conflict-resolution-durable-store.d.ts +61 -0
- package/dist/local-executor/conflict-resolution-store.d.ts +210 -0
- package/dist/local-executor/conflict-types.d.ts +86 -0
- package/dist/local-executor/cp7-audit-writer.d.ts +152 -0
- package/dist/local-executor/durable-store.d.ts +334 -0
- package/dist/local-executor/git-lock-retry.d.ts +40 -0
- package/dist/local-executor/hook-bridge.d.ts +1 -1
- package/dist/local-executor/implementor-argv.d.ts +183 -0
- package/dist/local-executor/index.d.ts +44 -3
- package/dist/local-executor/local-executor-impl.d.ts +645 -4
- package/dist/local-executor/merge-conflict-extract.d.ts +34 -0
- package/dist/local-executor/merge-conflict-resolve.d.ts +101 -0
- package/dist/local-executor/merge-journal-store.d.ts +311 -0
- package/dist/local-executor/merge-train.d.ts +713 -0
- package/dist/local-executor/promote-wal-store.d.ts +301 -0
- package/dist/local-executor/resolution-set-index.d.ts +51 -0
- package/dist/local-executor/revert-reconcile.d.ts +89 -0
- package/dist/local-executor/revert-runner.d.ts +17 -0
- package/dist/local-executor/shared-contract-detector.d.ts +57 -0
- package/dist/local-executor/spawn.d.ts +29 -1
- package/dist/local-executor/task-group-types.d.ts +346 -0
- package/dist/local-executor/team-execution-flag.d.ts +21 -0
- package/dist/local-executor/track-registry.d.ts +50 -0
- package/dist/local-executor/types.d.ts +238 -4
- package/dist/local-executor/wb2-review-bundle.d.ts +59 -0
- package/dist/local-executor/workspace-shadow.d.ts +290 -0
- package/dist/local-executor/worktree-merge.d.ts +601 -0
- package/dist/local-model/__tests__/installer.test.d.ts +1 -0
- package/dist/local-model/__tests__/manager.test.d.ts +1 -0
- package/dist/local-model/__tests__/ollama.test.d.ts +1 -0
- package/dist/local-model/__tests__/runtime.test.d.ts +1 -0
- package/dist/local-model/__tests__/state.test.d.ts +1 -0
- package/dist/local-model/manager.d.ts +119 -0
- package/dist/local-model/ollama.d.ts +27 -0
- package/dist/local-model/runtime.d.ts +27 -0
- package/dist/local-model/state.d.ts +32 -0
- package/dist/orchestration/detect-agents.d.ts +15 -2
- package/dist/orchestration/setup-types.d.ts +2 -1
- package/dist/orchestration-shell/__tests__/attachments.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/audit-browser.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/audited-path-fixes.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/bracketed-paste.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-group-halt-wiring.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-orchestration-session-bootstrap.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-probe-group-status.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-quorum-loop-tier.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-verdict-classifier-wiring.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/context-store.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-accept-echo-target.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-prompts.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp12-w2b-team-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp12-w4-team-recovery.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp1f-quorum-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp606-team-track-user-resolved.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp7-reviewer-substrate.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/declared-test-runner.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/familiarize-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-decision-submit.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-details-panel.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-verdict-details-dispatch.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/group-decision-submit.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/image-attach-e2e.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/input-bar-autocomplete.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/live-region-cap.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/live-static-order.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/model-cli.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/non-gate-prompt-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/orchestration-app-group-decision-transport.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/orchestration-app-layout.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reissue-team-retained-spec.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/review-summary-render.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reviewer-wizard.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reviewers-format.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/root-discovery.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/serialize-submissions.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/slash-suggest.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/status-format.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/task-progress.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose-types.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-e2e-smoke.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/tier2-reviewer-selection.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/web-browsing.test.d.ts +1 -0
- package/dist/orchestration-shell/attachments.d.ts +152 -0
- package/dist/orchestration-shell/audit-browser.d.ts +115 -0
- package/dist/orchestration-shell/audit-runner.d.ts +59 -0
- package/dist/orchestration-shell/bracketed-paste.d.ts +26 -0
- package/dist/orchestration-shell/cli.d.ts +336 -1
- package/dist/orchestration-shell/cli.js +40580 -4692
- package/dist/orchestration-shell/components/AuditLogPanel.d.ts +11 -0
- package/dist/orchestration-shell/components/ConversationPane.d.ts +7 -1
- package/dist/orchestration-shell/components/GateDetailsPanel.d.ts +57 -0
- package/dist/orchestration-shell/components/GatePanelEntry.d.ts +9 -0
- package/dist/orchestration-shell/components/GatePromptEntry.d.ts +7 -0
- package/dist/orchestration-shell/components/InputBar.d.ts +17 -3
- package/dist/orchestration-shell/components/LiveProgressLine.d.ts +8 -0
- package/dist/orchestration-shell/components/MultiTrackStatusNode.d.ts +8 -0
- package/dist/orchestration-shell/components/OrchestrationApp.d.ts +81 -15
- package/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +24 -0
- package/dist/orchestration-shell/components/StatusBar.d.ts +15 -2
- package/dist/orchestration-shell/context-store.d.ts +389 -0
- package/dist/orchestration-shell/declared-test-runner.d.ts +84 -0
- package/dist/orchestration-shell/emit-shell-event.d.ts +1 -1
- package/dist/orchestration-shell/gate-decision-submit.d.ts +245 -0
- package/dist/orchestration-shell/gate-prompts.d.ts +361 -3
- package/dist/orchestration-shell/index.d.ts +613 -1
- package/dist/orchestration-shell/ink-runtime.d.ts +21 -1
- package/dist/orchestration-shell/live-region-cap.d.ts +70 -0
- package/dist/orchestration-shell/live-static-order.d.ts +22 -0
- package/dist/orchestration-shell/non-tty-fallback.d.ts +21 -0
- package/dist/orchestration-shell/quorum-loop.d.ts +1900 -0
- package/dist/orchestration-shell/root-discovery.d.ts +25 -0
- package/dist/orchestration-shell/route-browse.d.ts +20 -0
- package/dist/orchestration-shell/slash-router.d.ts +20 -1
- package/dist/orchestration-shell/slash-routes/continuation.d.ts +71 -0
- package/dist/orchestration-shell/slash-routes/reviewers.d.ts +41 -0
- package/dist/orchestration-shell/slash-suggest.d.ts +29 -0
- package/dist/orchestration-shell/status-format.d.ts +59 -0
- package/dist/orchestration-shell/task-progress.d.ts +122 -0
- package/dist/orchestration-shell/team-decompose.d.ts +196 -0
- package/dist/orchestration-shell/types.d.ts +363 -3
- package/dist/orchestration-shell/vendor/ink-parse-keypress.d.ts +42 -0
- package/dist/orchestration-shell/web/extract.d.ts +11 -0
- package/dist/orchestration-shell/web/fetch.d.ts +15 -0
- package/dist/orchestration-shell/web/ip.d.ts +26 -0
- package/dist/orchestration-shell/web/sanitize.d.ts +14 -0
- package/dist/orchestration-shell/web/search.d.ts +16 -0
- package/dist/planner/__tests__/local-gemma.test.d.ts +1 -0
- package/dist/planner/index.d.ts +2 -0
- package/dist/planner/local-advisory.d.ts +84 -0
- package/dist/planner/local-gemma.d.ts +23 -0
- package/dist/planner/types.d.ts +16 -6
- package/dist/reviewer/__tests__/antigravity-provider.test.d.ts +1 -0
- package/dist/reviewer/__tests__/claude-provider-json.test.d.ts +1 -0
- package/dist/reviewer/__tests__/cp7-reviewer-sandbox.test.d.ts +1 -0
- package/dist/reviewer/__tests__/output-parser-classifier-helpers.test.d.ts +1 -0
- package/dist/reviewer/__tests__/verdict-classifier.test.d.ts +1 -0
- package/dist/reviewer/index.d.ts +2 -0
- package/dist/reviewer/output-parser.d.ts +48 -12
- package/dist/reviewer/provider.d.ts +107 -3
- package/dist/reviewer/providers/__tests__/failure-classifier.test.d.ts +1 -0
- package/dist/reviewer/providers/antigravity.d.ts +49 -0
- package/dist/reviewer/providers/claude.d.ts +19 -4
- package/dist/reviewer/providers/codex.d.ts +47 -5
- package/dist/reviewer/providers/failure-classifier.d.ts +26 -0
- package/dist/reviewer/providers/gemini.d.ts +5 -4
- package/dist/reviewer/registry.d.ts +5 -5
- package/dist/reviewer/subprocess.d.ts +37 -0
- package/dist/reviewer/token-usage.d.ts +32 -0
- package/dist/reviewer/types.d.ts +5 -5
- package/dist/reviewer/verdict-classifier.d.ts +62 -0
- package/dist/session/__tests__/prepare-event-timestamp.test.d.ts +1 -0
- package/dist/session/index.d.ts +1 -0
- package/dist/session/prepare-event-timestamp.d.ts +30 -0
- package/dist/substrate/__tests__/docker.test.d.ts +1 -0
- package/dist/substrate/__tests__/forwarder.test.d.ts +1 -0
- package/dist/substrate/__tests__/git-proxy.test.d.ts +1 -0
- package/dist/substrate/__tests__/sandbox-exec.test.d.ts +1 -0
- package/dist/substrate/__tests__/substrate-e2e.integration.test.d.ts +1 -0
- package/dist/substrate/command-runner.d.ts +19 -0
- package/dist/substrate/docker.d.ts +134 -0
- package/dist/substrate/errors.d.ts +33 -0
- package/dist/substrate/forwarder.d.ts +67 -0
- package/dist/substrate/git-proxy.d.ts +35 -0
- package/dist/substrate/index.d.ts +12 -0
- package/dist/substrate/relay-script.d.ts +27 -0
- package/dist/substrate/sandbox-exec.d.ts +116 -0
- package/dist/substrate/types.d.ts +218 -0
- package/dist/substrate-launch/__tests__/apikey-bootstrap.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/creditless-loop.integration.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/engage-substrate.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/fallback-ladder.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/le-env-scrub.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/sanitized-env.test.d.ts +1 -0
- package/dist/substrate-launch/apikey-bootstrap.d.ts +84 -0
- package/dist/substrate-launch/engage-substrate.d.ts +102 -0
- package/dist/substrate-launch/fallback-ladder.d.ts +49 -0
- package/dist/substrate-launch/index.d.ts +12 -0
- package/dist/substrate-launch/le-env-scrub.d.ts +77 -0
- package/dist/substrate-launch/sanitized-env.d.ts +73 -0
- package/dist/types/auth.d.ts +6 -1
- package/dist/types/events.d.ts +3 -1
- package/dist/types/reviewer.d.ts +6 -6
- package/package.json +7 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Session } from '../types/session';
|
|
2
2
|
import type { StructuralSummary } from '../structural-summary/types';
|
|
3
|
-
import type { GatePromptEnvelope } from './gate-prompts';
|
|
3
|
+
import type { GatePromptEnvelope, ReviewSummaryPanelModel } from './gate-prompts';
|
|
4
|
+
import type { TaskProgressEvent } from './task-progress';
|
|
5
|
+
import type { ReviewerAgentSpec } from '../types/reviewer';
|
|
4
6
|
/**
|
|
5
7
|
* Engine's reply to `applyUserDecision`. Surfaced by the SDK as
|
|
6
8
|
* `Promise<PostDecisionAction>`. Discriminated by `kind`; payload
|
|
@@ -17,7 +19,68 @@ export type PostDecisionAction = {
|
|
|
17
19
|
kind: 'restart_proposal';
|
|
18
20
|
} | {
|
|
19
21
|
kind: 'abort_task';
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'final_approval_resolved';
|
|
24
|
+
decision: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'continuation_switch_accepted';
|
|
27
|
+
target_agent: string;
|
|
28
|
+
next_gate_id: string;
|
|
29
|
+
next_round: number;
|
|
30
|
+
offer_id: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'continuation_switch_declined';
|
|
33
|
+
offer_id: string;
|
|
20
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* CP-1.f execute-first (D5): does this `applyUserDecision` outcome mean the
|
|
37
|
+
* task's workspace shadow must be DISCARDED?
|
|
38
|
+
*
|
|
39
|
+
* ONLY genuinely non-authorize terminals discard:
|
|
40
|
+
* - `abort_task` — user aborted the task entirely.
|
|
41
|
+
* - `restart_proposal` — user rejected + restarted; a fresh round gets a
|
|
42
|
+
* fresh shadow.
|
|
43
|
+
*
|
|
44
|
+
* Everything else MUST NOT discard:
|
|
45
|
+
* - `terminate_gate` — the engine's reply for Accept/AcceptWithNotes on a
|
|
46
|
+
* halted/escalated gate ("gate terminally closed",
|
|
47
|
+
* codevibe-revision user_decision.rs) — an AUTHORIZE
|
|
48
|
+
* outcome. Discarding here raced the async
|
|
49
|
+
* TaskAuthorized promote and destroyed an approved
|
|
50
|
+
* diff (live dogfood 2026-06-10, task 5e16b2f9
|
|
51
|
+
* "promote no-op — no in-memory shadow"). On accept
|
|
52
|
+
* the shadow's fate belongs to the TaskAuthorized
|
|
53
|
+
* edge alone (#PR-1/#PR-3); promote cleans up, and a
|
|
54
|
+
* lost packet never reaps a pending shadow (#PR-4).
|
|
55
|
+
* - `open_new_round` — revise; the shadow persists across rounds (D6).
|
|
56
|
+
* - `final_approval_resolved` — promote via the TaskAuthorized edge.
|
|
57
|
+
*/
|
|
58
|
+
export declare function postActionDiscardsShadow(kind: PostDecisionAction['kind']): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* #606 (FACE A) — map a per-track `applyUserDecision` `postAction` to the
|
|
61
|
+
* team-track RENDER-terminal state, MIRRORING the engine's authoritative
|
|
62
|
+
* `apply_user_decision::fire_deferred_track_terminal` disposition map so the
|
|
63
|
+
* desktop render flips out of `InFlight` the moment the user resolves the
|
|
64
|
+
* track's own gate (the #469 "stuck InFlight" gap):
|
|
65
|
+
*
|
|
66
|
+
* - `terminate_gate` → Accept/AcceptWithNotes on an escalation gate
|
|
67
|
+
* (→ engine `Passed`) → 'Passed'
|
|
68
|
+
* - `final_approval_resolved` → FinalApproval: Approve (→ `Passed`) vs Cancel
|
|
69
|
+
* (→ `Failed`), distinguished by `decision` →
|
|
70
|
+
* 'Passed' / 'Failed'
|
|
71
|
+
* - `abort_task` → AbortTask on an escalation (→ `Failed`) →
|
|
72
|
+
* 'Failed'
|
|
73
|
+
* - everything else (`open_new_round` / `restart_proposal` /
|
|
74
|
+
* `continuation_switch_*`) → a NEW gate follows; the track keeps working and
|
|
75
|
+
* the engine fires NO terminal mark → null
|
|
76
|
+
*
|
|
77
|
+
* `null` means "do NOT flip" — the render stays `InFlight` (the next gate's user
|
|
78
|
+
* edge resolves it). The `final_approval_resolved` `decision` discriminator
|
|
79
|
+
* matches the engine: `handle_final_approval` synthesizes the SAME
|
|
80
|
+
* `final_approval_resolved` kind for BOTH Approve and Cancel, carrying the
|
|
81
|
+
* submitted decision string; the engine maps Approve→Passed, Cancel→Failed.
|
|
82
|
+
*/
|
|
83
|
+
export declare function postActionTeamTrackState(postAction: PostDecisionAction): 'Passed' | 'Failed' | null;
|
|
21
84
|
/**
|
|
22
85
|
* CP-1.a §2 LOCK. The literal union used for sticky-preference, mode
|
|
23
86
|
* selection, and the `MODE_SELECTED` EventType `metadata.mode` field.
|
|
@@ -36,17 +99,24 @@ export type Mode = 'companion' | 'orchestration';
|
|
|
36
99
|
* line 967-972 (CP-2 Stage A finalises shape).
|
|
37
100
|
*/
|
|
38
101
|
export interface PlannerDecision {
|
|
39
|
-
action: 'start_task' | 'summarize_current_status' | 'advisory_response' | 'ask_user' | 'refuse';
|
|
102
|
+
action: 'start_task' | 'summarize_current_status' | 'advisory_response' | 'ask_user' | 'refuse' | 'team_decompose' | 'familiarize' | 'brainstorm' | 'browse';
|
|
40
103
|
rationale: string;
|
|
41
104
|
clarifying_question?: string;
|
|
42
105
|
advisory_summary?: string;
|
|
106
|
+
/** WEB-BROWSING — explicit http(s) URLs to read. */
|
|
107
|
+
browseUrls?: string[];
|
|
108
|
+
/** WEB-BROWSING — a web-search query when no explicit URL is given. */
|
|
109
|
+
browseQuery?: string;
|
|
43
110
|
/**
|
|
44
111
|
* Opaque per §6 line 967-972; CP-1 NEVER inspects fields. CP-2 Stage A
|
|
45
112
|
* locks shape.
|
|
46
113
|
*/
|
|
47
114
|
gateRequest?: Record<string, unknown>;
|
|
48
115
|
}
|
|
49
|
-
export
|
|
116
|
+
export interface BrainstormContextMetadata {
|
|
117
|
+
needsRepositoryContext: boolean;
|
|
118
|
+
}
|
|
119
|
+
export type AgentKind = 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
|
|
50
120
|
/**
|
|
51
121
|
* Health-state surface from §8. CP-1.a stores this in
|
|
52
122
|
* `OrchestrationState.plannerHealth`; CP-1.b's state machine drives
|
|
@@ -166,12 +236,54 @@ export type EventStreamEntry = ExecutionEventEntry | RefusalEventEntry | BypassE
|
|
|
166
236
|
* freeze in scrollback (migrate from `<ConversationPane>` into `<Static>`
|
|
167
237
|
* per design line 441-447).
|
|
168
238
|
*/
|
|
239
|
+
/**
|
|
240
|
+
* A LOCAL image-file reference attached to a user turn (IMAGE-ATTACHMENT-DESIGN.md
|
|
241
|
+
* §5). Desktop-only — carries a path + validated metadata, NEVER the bytes and
|
|
242
|
+
* NEVER an s3Key (bytes stay on disk; they reach the local model as base64 and the
|
|
243
|
+
* implementor as an in-worktree copy, both on-device). The strict planner
|
|
244
|
+
* text-in/JSON-out contract is unchanged — attachments ride on the runtime turn /
|
|
245
|
+
* task-scoped state, never on `PlannerDecision`/`PlannerInput`.
|
|
246
|
+
*/
|
|
247
|
+
export interface ImageAttachment {
|
|
248
|
+
/** ulid. */
|
|
249
|
+
id: string;
|
|
250
|
+
/**
|
|
251
|
+
* Resolved LEXICAL absolute path on the user's machine (the `O_NOFOLLOW` copy
|
|
252
|
+
* source, §4/§7.3). DISPLAY-only otherwise — never placed in the prompt/brief.
|
|
253
|
+
*/
|
|
254
|
+
sourcePath: string;
|
|
255
|
+
/**
|
|
256
|
+
* EVERY exact matched SPAN that referenced this file — across the original turn
|
|
257
|
+
* AND clarification-answer turns — INCLUDING surrounding quotes/escapes
|
|
258
|
+
* (`~/foo.png`, `'…/a b.png'`, `/a\ b.png`). A LIST: the same file can be typed
|
|
259
|
+
* two ways; the COPY is deduped by `sourcePath` but the canonical-brief
|
|
260
|
+
* replacement (§8) must rewrite EVERY occurrence or an absolute span leaks.
|
|
261
|
+
*/
|
|
262
|
+
rawTokens: string[];
|
|
263
|
+
/**
|
|
264
|
+
* Raw basename — DISPLAY-ONLY (the conversation chip). NEVER used in the
|
|
265
|
+
* in-worktree path or the prompt (a basename can carry control chars/newlines →
|
|
266
|
+
* injection). The in-worktree copy is named `<id>.<ext-from-sniffed-mime>`.
|
|
267
|
+
*/
|
|
268
|
+
filename: string;
|
|
269
|
+
/** From the bounded magic-byte sniff (`image/png`, …), NOT the extension. */
|
|
270
|
+
mime: string;
|
|
271
|
+
sizeBytes: number;
|
|
272
|
+
}
|
|
169
273
|
export type ConversationEntry = {
|
|
170
274
|
kind: 'user-message';
|
|
171
275
|
id: string;
|
|
172
276
|
timestamp: string;
|
|
173
277
|
final: true;
|
|
174
278
|
text: string;
|
|
279
|
+
attachments?: ImageAttachment[];
|
|
280
|
+
/**
|
|
281
|
+
* §13 Option-2 — the ordered-with-DUPLICATES resolved carried-path list for this
|
|
282
|
+
* turn's `[Image #N]` chips (index N-1 ↔ chip #N). Distinct from `attachments`
|
|
283
|
+
* (deduped by `sourcePath`): dedup loses the count/order the number-based chip
|
|
284
|
+
* rewrite needs. Carried into `pending.attachmentPaths` when a clarification mints.
|
|
285
|
+
*/
|
|
286
|
+
imagePaths?: string[];
|
|
175
287
|
} | {
|
|
176
288
|
kind: 'planner-decision';
|
|
177
289
|
id: string;
|
|
@@ -180,6 +292,7 @@ export type ConversationEntry = {
|
|
|
180
292
|
action: PlannerDecision['action'];
|
|
181
293
|
rationale: string;
|
|
182
294
|
taskId?: string;
|
|
295
|
+
brainstorm?: BrainstormContextMetadata;
|
|
183
296
|
} | {
|
|
184
297
|
kind: 'subagent-event';
|
|
185
298
|
id: string;
|
|
@@ -235,6 +348,23 @@ export type ConversationEntry = {
|
|
|
235
348
|
phase: 'resolved';
|
|
236
349
|
postAction: PostDecisionAction;
|
|
237
350
|
resolvedBy: 'self';
|
|
351
|
+
} | {
|
|
352
|
+
phase: 'resolved';
|
|
353
|
+
resolvedBy: 'server';
|
|
354
|
+
serverDecision: string | null;
|
|
355
|
+
};
|
|
356
|
+
reviewSummary?: ReviewSummaryPanelModel;
|
|
357
|
+
} | {
|
|
358
|
+
kind: 'gate-panel';
|
|
359
|
+
id: string;
|
|
360
|
+
timestamp: string;
|
|
361
|
+
final: true;
|
|
362
|
+
panel: {
|
|
363
|
+
variant: 'prompt';
|
|
364
|
+
envelope: GatePromptEnvelope;
|
|
365
|
+
} | {
|
|
366
|
+
variant: 'summary';
|
|
367
|
+
reviewSummary: ReviewSummaryPanelModel;
|
|
238
368
|
};
|
|
239
369
|
};
|
|
240
370
|
/**
|
|
@@ -262,6 +392,135 @@ export interface PendingClarification {
|
|
|
262
392
|
answer?: string;
|
|
263
393
|
}>;
|
|
264
394
|
conversationEntryId: string;
|
|
395
|
+
/**
|
|
396
|
+
* Accumulated image attachments across the ORIGINAL turn + every
|
|
397
|
+
* clarification-answer turn (IMAGE-ATTACHMENT-DESIGN.md §5, rev-4). The final
|
|
398
|
+
* task attachment set = original ∪ answer-turn attachments, deduped by
|
|
399
|
+
* `sourcePath`; `composeImplementationBrief` reads this when the task launches
|
|
400
|
+
* so an image attached before a planner question isn't lost.
|
|
401
|
+
*/
|
|
402
|
+
attachments?: ImageAttachment[];
|
|
403
|
+
/**
|
|
404
|
+
* §13 Option-2 — the ordered-with-DUPLICATES resolved carried-path list ACCUMULATED
|
|
405
|
+
* across the original turn + every clarification-answer turn (index N-1 ↔ the globally
|
|
406
|
+
* cross-turn-renumbered chip #N). The number-based `[Image #N]` rewrite keys on this
|
|
407
|
+
* (path → deduped attachment) so a duplicate same-file drag and a multi-turn image
|
|
408
|
+
* both resolve to the correct ref. Grows by exactly this turn's `imagePaths` each turn.
|
|
409
|
+
*/
|
|
410
|
+
attachmentPaths?: string[];
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* [ADDITIVE WIDENING — CP-12 W3, per PHASE-CP-12-DESIGN.md §3.5 "minimal
|
|
414
|
+
* multi-track status node; rich UX is #469"]. Per-track lifecycle state as the
|
|
415
|
+
* status node renders it. The deep 6-class failure UX + rich per-track timeline
|
|
416
|
+
* are [DEFERRED → CP-8 #469] — this carries ONLY the compact node's inputs.
|
|
417
|
+
*
|
|
418
|
+
* [ADDITIVE WIDENING — PHASE-589/469 W2] `Revising` — a transient NON-terminal
|
|
419
|
+
* state while a team track auto-revises (the engine minted a round-N+1 REVISE
|
|
420
|
+
* round on a revisable verification-failed marker, cap permitting). The track
|
|
421
|
+
* flips back to `InFlight` machinery on the re-spawn and resolves to
|
|
422
|
+
* `Passed`/`Failed` later; on cap-exhaust it terminal-fails to `Failed` (W1's
|
|
423
|
+
* render). NOT a terminal state — the group-terminal check treats only
|
|
424
|
+
* `Passed`/`Failed` as terminal.
|
|
425
|
+
*/
|
|
426
|
+
export type TeamTrackState = 'Pending' | 'InFlight' | 'Passed' | 'Failed' | 'Revising' | 'AwaitingDecision';
|
|
427
|
+
/**
|
|
428
|
+
* [ADDITIVE WIDENING — CP-12 W3] The group MergeGate status as the compact
|
|
429
|
+
* status node renders it. `'none'` until a MergeGateDispatch arrives.
|
|
430
|
+
*/
|
|
431
|
+
export type TeamMergeGateStatus = 'none' | 'pending' | 'pass' | 'fail';
|
|
432
|
+
/**
|
|
433
|
+
* Human label for a `TeamMergeGateStatus` — the SINGLE source of truth shared by
|
|
434
|
+
* the `<MultiTrackStatusNode>` header and the `/status` (`buildStatusSummary`)
|
|
435
|
+
* text, so the two never drift.
|
|
436
|
+
*/
|
|
437
|
+
export declare const MERGE_GATE_STATUS_LABEL: Record<TeamMergeGateStatus, string>;
|
|
438
|
+
/**
|
|
439
|
+
* [ADDITIVE WIDENING — CP-12 W3] Minimal per-track entry for the status node.
|
|
440
|
+
*/
|
|
441
|
+
export interface TeamTrackEntry {
|
|
442
|
+
state: TeamTrackState;
|
|
443
|
+
taskId?: string;
|
|
444
|
+
agent?: string;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* [ADDITIVE WIDENING — CP-12 W3] Minimal team state. `null` for
|
|
448
|
+
* single-track/Companion/stub sessions (no team → no status node). Populated
|
|
449
|
+
* when `/team` accepts a task group + per-track W2.b shell events arrive.
|
|
450
|
+
*/
|
|
451
|
+
export interface TeamState {
|
|
452
|
+
taskGroupId: string;
|
|
453
|
+
/** track_index → minimal track entry. */
|
|
454
|
+
tracks: Map<number, TeamTrackEntry>;
|
|
455
|
+
mergeGate: TeamMergeGateStatus;
|
|
456
|
+
/** Set when a TaskGroupHalted is surfaced (status node shows a halt line). */
|
|
457
|
+
haltReason: string | null;
|
|
458
|
+
/**
|
|
459
|
+
* [ADDITIVE WIDENING — PHASE-589+469 W1] `true` once the group's MergeGate
|
|
460
|
+
* resolves to a terminal outcome (the desktop consumed the AUTHORITATIVE
|
|
461
|
+
* `{ outcome }` returned by `submitMergeGateVerdict`). Drives the
|
|
462
|
+
* `MultiTrackStatusNode` footer (`Team complete` / `Team halted — <class>`).
|
|
463
|
+
* Stays `false` for an in-flight group.
|
|
464
|
+
*/
|
|
465
|
+
groupResolved: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* [ADDITIVE WIDENING — PHASE-589+469 W1] The AUTHORITATIVE engine outcome
|
|
468
|
+
* string (`"complete"` or a `halted_reason` const) once `groupResolved` is
|
|
469
|
+
* set; `undefined` until then. The footer renders `complete` vs the failure
|
|
470
|
+
* class from this value.
|
|
471
|
+
*/
|
|
472
|
+
outcome?: string;
|
|
473
|
+
/**
|
|
474
|
+
* [ADDITIVE WIDENING — TUI-LIVE-TASK-STATUS-PHASE-1B-2 P1b] ISO wall-clock
|
|
475
|
+
* anchor stamped (strictly-monotonic, LE-side) when the merge gate first goes
|
|
476
|
+
* `'pending'`; carried forward and used to tick the merge-gate elapsed timer on
|
|
477
|
+
* `MultiTrackStatusNode`. Re-anchored on a genuine re-drain (strictly-newer
|
|
478
|
+
* `started_at`); undefined until the first `'pending'`.
|
|
479
|
+
*/
|
|
480
|
+
mergeGateStartedAt?: string;
|
|
481
|
+
/**
|
|
482
|
+
* [ADDITIVE WIDENING — TUI-LIVE-TASK-STATUS-PHASE-1B-2 P1b] Frozen final elapsed
|
|
483
|
+
* (ms) of the merge gate. WRITE-ONCE: set by the FIRST terminal (convergence
|
|
484
|
+
* pass/fail, the local attempt-end, or the groupResolved/halted fallback) and
|
|
485
|
+
* never overwritten by a later shared-convergence emit; cleared (→ undefined) on
|
|
486
|
+
* a re-drain so the next generation can write. `null`/undefined ⇔ still ticking.
|
|
487
|
+
*/
|
|
488
|
+
mergeGateElapsedMs?: number;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* [ADDITIVE WIDENING — CP-1.f live progress surfacing] The single EPHEMERAL
|
|
492
|
+
* live status line shown between the StatusBar and the InputBar while a task is
|
|
493
|
+
* busy (implementor running, promote/discard in flight). `null` when idle / when
|
|
494
|
+
* the user is in control (a gate prompt is shown → `waiting_user` clears it).
|
|
495
|
+
* Milestones (diff captured, verdicts received, promoted, …) are NOT stored here
|
|
496
|
+
* — they are appended to `conversation` as persisted scrollback entries. This is
|
|
497
|
+
* desktop-LOCAL only: counts/labels/elapsed, never plaintext (see
|
|
498
|
+
* `task-progress.ts`).
|
|
499
|
+
*/
|
|
500
|
+
export interface LiveProgress {
|
|
501
|
+
/** The phase of the in-flight spinner line. */
|
|
502
|
+
phase: TaskProgressEvent['phase'];
|
|
503
|
+
/** The BOUNDED live label (counts/labels/paths only — no plaintext, no embedded timer). */
|
|
504
|
+
text: string;
|
|
505
|
+
/** When this line was last refreshed. Retained; currently unused (no component reads it). */
|
|
506
|
+
updatedAt: string;
|
|
507
|
+
/** ISO — when THIS busy window opened; the wall-clock timer anchor. */
|
|
508
|
+
startedAt: string;
|
|
509
|
+
/**
|
|
510
|
+
* The per-TASK origin epoch of the event that opened/last-refreshed this window
|
|
511
|
+
* (§2/§3). Undefined ONLY for the direct-dispatched classify/familiarize windows
|
|
512
|
+
* (they carry no epoch). The reducer's straggler guard no-ops any event whose
|
|
513
|
+
* epoch is strictly OLDER than this.
|
|
514
|
+
*/
|
|
515
|
+
epoch?: number;
|
|
516
|
+
/**
|
|
517
|
+
* [ADDITIVE WIDENING — token counter, Phase 2 · P2-4] The per-TASK CUMULATIVE
|
|
518
|
+
* token total carried MONOTONICALLY across same-epoch OPEN/REFRESH builds
|
|
519
|
+
* (`Math.max(cur, event.tokens) || undefined`) so a token-less refresh keeps the
|
|
520
|
+
* prior count and a reopened window preserves it; reset on a new epoch. A bare
|
|
521
|
+
* count (invariant-safe). `undefined` until a source reports (segment omitted).
|
|
522
|
+
*/
|
|
523
|
+
tokens?: number;
|
|
265
524
|
}
|
|
266
525
|
/**
|
|
267
526
|
* §5.1 LOCK lines 463-480. Owned by the orchestration-shell store.
|
|
@@ -291,6 +550,55 @@ export interface OrchestrationState {
|
|
|
291
550
|
* (fail-closed per §4.7); cleared on next successful regeneration.
|
|
292
551
|
*/
|
|
293
552
|
structuralSummaryError: string | null;
|
|
553
|
+
/**
|
|
554
|
+
* `[ADDITIVE WIDENING — CP-12 W3]` per PHASE-CP-12-DESIGN.md §3.5. `null`
|
|
555
|
+
* for single-track/Companion/stub sessions (the status node is hidden).
|
|
556
|
+
* Populated by `/team` (createTaskGroup accepted) + the W2.b per-track shell
|
|
557
|
+
* events. Rich per-track timeline + MergeGate result card are
|
|
558
|
+
* [DEFERRED → CP-8 #469].
|
|
559
|
+
*/
|
|
560
|
+
team: TeamState | null;
|
|
561
|
+
/**
|
|
562
|
+
* `[ADDITIVE WIDENING — CP-1.f live progress surfacing]` The current ephemeral
|
|
563
|
+
* live status line (spinner). `null` when idle / waiting on the user. Updated
|
|
564
|
+
* in place by `TASK_PROGRESS` spinner phases; cleared by `waiting_user` and by
|
|
565
|
+
* the terminal milestone phases (`promoted` / `discarded`). Non-loop /
|
|
566
|
+
* Companion / stub sessions never dispatch `TASK_PROGRESS`, so this stays null.
|
|
567
|
+
*/
|
|
568
|
+
progress: LiveProgress | null;
|
|
569
|
+
/**
|
|
570
|
+
* `[ADDITIVE WIDENING — /reviewer-setup wizard, 2026-06-29]` The active
|
|
571
|
+
* interactive reviewer-panel setup modal, or `null` when no wizard is open
|
|
572
|
+
* (the default — InputBar is shown). Opened by the `/reviewer-setup` slash
|
|
573
|
+
* command (`REVIEWER_WIZARD_OPEN`, after the entrypoint detects installed
|
|
574
|
+
* agents + reads the current policy); cleared on save/cancel
|
|
575
|
+
* (`REVIEWER_WIZARD_CLOSE`). While non-null, `<OrchestrationApp>` renders
|
|
576
|
+
* `<ReviewerSetupWizard>` IN PLACE OF the `<InputBar>` so the wizard owns
|
|
577
|
+
* keyboard focus. Non-team / Companion / CP-1.a sessions never open it.
|
|
578
|
+
*/
|
|
579
|
+
reviewerWizard: ReviewerWizardState | null;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Snapshot threaded into the interactive `/reviewer-setup` wizard when it
|
|
583
|
+
* opens. The entrypoint (`handleShellUserInput`) gathers these BEFORE
|
|
584
|
+
* dispatching `REVIEWER_WIZARD_OPEN` so the wizard renders synchronously from
|
|
585
|
+
* props with no in-component network I/O:
|
|
586
|
+
* - `tier` decides the seat budget (Pro = 2 seats, Max = 3).
|
|
587
|
+
* - `installedAgents` is the host-detected agent set — the wizard offers ONLY
|
|
588
|
+
* these as reviewer choices (mirrors the `codevibe orchestration configure`
|
|
589
|
+
* CLI), so a user can never pick an uninstalled agent.
|
|
590
|
+
* - `currentSeats` is shown as a CONTEXT line at the top of the wizard (the
|
|
591
|
+
* user's existing panel) — display only; the wizard starts fresh at the
|
|
592
|
+
* panel-choice step. Absent → "tier defaults".
|
|
593
|
+
*
|
|
594
|
+
* NB: there is no enable/disable state — the legacy `orchestrationEnabledDefault`
|
|
595
|
+
* opt-in was removed in CP-1 (2.0 orchestration is shell-driven, not a stored
|
|
596
|
+
* flag), so the wizard configures the reviewer PANEL only.
|
|
597
|
+
*/
|
|
598
|
+
export interface ReviewerWizardState {
|
|
599
|
+
tier: Tier;
|
|
600
|
+
installedAgents: Array<'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY'>;
|
|
601
|
+
currentSeats: ReviewerAgentSpec[] | null;
|
|
294
602
|
}
|
|
295
603
|
/**
|
|
296
604
|
* §5.1 LOCK lines 502-513. Discriminated union over every state
|
|
@@ -326,10 +634,13 @@ export interface OrchestrationState {
|
|
|
326
634
|
export type OrchestrationAction = {
|
|
327
635
|
type: 'USER_INPUT';
|
|
328
636
|
text: string;
|
|
637
|
+
attachments?: ImageAttachment[];
|
|
638
|
+
imagePaths?: string[];
|
|
329
639
|
} | {
|
|
330
640
|
type: 'PLANNER_DECISION';
|
|
331
641
|
decision: PlannerDecision;
|
|
332
642
|
taskId?: string;
|
|
643
|
+
brainstorm?: BrainstormContextMetadata;
|
|
333
644
|
} | {
|
|
334
645
|
type: 'EVENT_RECEIVED';
|
|
335
646
|
event: EventStreamEntry;
|
|
@@ -384,11 +695,18 @@ export type OrchestrationAction = {
|
|
|
384
695
|
} | {
|
|
385
696
|
type: 'GATE_PROMPT_RESOLVED';
|
|
386
697
|
promptEntryId: string;
|
|
698
|
+
gateId: string;
|
|
387
699
|
postAction: PostDecisionAction;
|
|
388
700
|
} | {
|
|
389
701
|
type: 'GATE_PROMPT_SUBMIT_FAILED';
|
|
390
702
|
promptEntryId: string;
|
|
703
|
+
gateId: string;
|
|
391
704
|
error: string;
|
|
705
|
+
} | {
|
|
706
|
+
type: 'GATE_PROMPT_RESOLVED_EXTERNALLY';
|
|
707
|
+
promptEntryId: string;
|
|
708
|
+
gateId: string;
|
|
709
|
+
serverDecision: string | null;
|
|
392
710
|
} | {
|
|
393
711
|
type: 'SHELL_ADVISORY';
|
|
394
712
|
text: string;
|
|
@@ -396,6 +714,48 @@ export type OrchestrationAction = {
|
|
|
396
714
|
} | {
|
|
397
715
|
type: 'GATE_PROMPT_NOTES_CANCELLED';
|
|
398
716
|
promptEntryId: string;
|
|
717
|
+
} | {
|
|
718
|
+
type: 'GATE_SUMMARY_LOADED';
|
|
719
|
+
gateId: string;
|
|
720
|
+
panelModel: ReviewSummaryPanelModel;
|
|
721
|
+
} | {
|
|
722
|
+
type: 'TEAM_STARTED';
|
|
723
|
+
taskGroupId: string;
|
|
724
|
+
} | {
|
|
725
|
+
type: 'TEAM_TRACK_ASSIGNED';
|
|
726
|
+
trackIndex: number;
|
|
727
|
+
state: TeamTrackState;
|
|
728
|
+
taskId?: string;
|
|
729
|
+
agent?: string;
|
|
730
|
+
} | {
|
|
731
|
+
type: 'TEAM_MERGE_GATE';
|
|
732
|
+
status: TeamMergeGateStatus;
|
|
733
|
+
startedAt?: string;
|
|
734
|
+
endedAt?: string;
|
|
735
|
+
} | {
|
|
736
|
+
type: 'TEAM_HALTED';
|
|
737
|
+
haltReason: string;
|
|
738
|
+
} | {
|
|
739
|
+
type: 'TEAM_TRACK_TERMINAL';
|
|
740
|
+
trackIndex: number;
|
|
741
|
+
state: TeamTrackState;
|
|
742
|
+
} | {
|
|
743
|
+
type: 'TEAM_TRACK_REVISING';
|
|
744
|
+
trackIndex: number;
|
|
745
|
+
} | {
|
|
746
|
+
type: 'TEAM_TRACK_AWAITING_DECISION';
|
|
747
|
+
trackIndex: number;
|
|
748
|
+
} | {
|
|
749
|
+
type: 'TEAM_GROUP_RESOLVED';
|
|
750
|
+
outcome: string;
|
|
751
|
+
} | {
|
|
752
|
+
type: 'TASK_PROGRESS';
|
|
753
|
+
event: TaskProgressEvent;
|
|
754
|
+
} | {
|
|
755
|
+
type: 'REVIEWER_WIZARD_OPEN';
|
|
756
|
+
wizard: ReviewerWizardState;
|
|
757
|
+
} | {
|
|
758
|
+
type: 'REVIEWER_WIZARD_CLOSE';
|
|
399
759
|
} | {
|
|
400
760
|
type: 'EXIT';
|
|
401
761
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Key names that are NOT printable text — `input` is blanked for these. */
|
|
2
|
+
export declare const nonAlphanumericKeys: string[];
|
|
3
|
+
export interface ParsedKeypress {
|
|
4
|
+
name: string;
|
|
5
|
+
ctrl: boolean;
|
|
6
|
+
meta: boolean;
|
|
7
|
+
shift: boolean;
|
|
8
|
+
option: boolean;
|
|
9
|
+
sequence: string;
|
|
10
|
+
raw: string | undefined;
|
|
11
|
+
code?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Verbatim port of Ink 5.2.1 `parseKeypress` (string input — Ink sets utf8). */
|
|
14
|
+
export declare const parseKeypress: (s?: string | undefined) => ParsedKeypress;
|
|
15
|
+
/** The `key` object shape Ink's `useInput` hands to its handler. */
|
|
16
|
+
export interface InkKey {
|
|
17
|
+
upArrow: boolean;
|
|
18
|
+
downArrow: boolean;
|
|
19
|
+
leftArrow: boolean;
|
|
20
|
+
rightArrow: boolean;
|
|
21
|
+
pageDown: boolean;
|
|
22
|
+
pageUp: boolean;
|
|
23
|
+
return: boolean;
|
|
24
|
+
escape: boolean;
|
|
25
|
+
ctrl: boolean;
|
|
26
|
+
shift: boolean;
|
|
27
|
+
tab: boolean;
|
|
28
|
+
backspace: boolean;
|
|
29
|
+
delete: boolean;
|
|
30
|
+
meta: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Mirror of `ink/build/hooks/use-input.js` (5.2.1) lines 46-80: derive the
|
|
34
|
+
* `(input, key)` pair `useInput` would deliver for a raw data chunk. The Ctrl+C
|
|
35
|
+
* gate + `reconciler.batchedUpdates` dispatch from use-input.js are intentionally
|
|
36
|
+
* NOT here — the caller owns dispatch (Ctrl+C is already handled by Ink's
|
|
37
|
+
* `App.handleInput` before the chunk is emitted).
|
|
38
|
+
*/
|
|
39
|
+
export declare function toInkKey(data: string): {
|
|
40
|
+
input: string;
|
|
41
|
+
key: InkKey;
|
|
42
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ExtractResult {
|
|
2
|
+
title: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
/** Test seam: drop the cached parse5 load so a re-stubbed ESM loader takes effect. */
|
|
6
|
+
export declare function __resetExtractCacheForTest(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Extract a page title + visible body text from HTML via parse5. Async (parse5 is ESM-only) and
|
|
9
|
+
* NEVER throws — returns `{ title:'', text:'' }` on the size cap / load / parse failure.
|
|
10
|
+
*/
|
|
11
|
+
export declare function htmlToText(html: string): Promise<ExtractResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type FetchFailureKind = 'blocked' | 'too_large' | 'timeout' | 'network' | 'bad_content' | 'too_many_redirects' | 'http_error';
|
|
2
|
+
export declare class FetchError extends Error {
|
|
3
|
+
readonly kind: FetchFailureKind;
|
|
4
|
+
constructor(kind: FetchFailureKind, message: string);
|
|
5
|
+
}
|
|
6
|
+
export interface FetchResult {
|
|
7
|
+
finalUrl: string;
|
|
8
|
+
contentType: string;
|
|
9
|
+
body: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Guarded GET with manual redirect following (full guard re-run per hop). Returns
|
|
13
|
+
* decoded text or throws FetchError. `signal` lets the caller (Esc) abort.
|
|
14
|
+
*/
|
|
15
|
+
export declare function guardedFetch(rawUrl: string, signal?: AbortSignal): Promise<FetchResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonicalize + classify an address string. Accepts only a real IPv4/IPv6
|
|
3
|
+
* literal (the fetch guard passes addresses from `dns.lookup`, which are
|
|
4
|
+
* already canonical). Returns false for anything not provably public unicast
|
|
5
|
+
* (fail closed). Decimal/hex/octal "IP" host forms are NOT valid `net.isIP`
|
|
6
|
+
* literals, so they never reach here as a resolved address — and the host-level
|
|
7
|
+
* guard rejects non-IP, non-DNS hosts separately.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isGlobalUnicastIp(addr: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Reject hostnames that are obviously local even before DNS, and normalize a
|
|
12
|
+
* literal-IP host given in a non-canonical encoding (decimal `2130706433`, hex
|
|
13
|
+
* `0x7f000001`, dotted-hex/octal). Returns:
|
|
14
|
+
* - { kind:'ip', addr } when the host is a literal IP (any encoding) → caller
|
|
15
|
+
* validates `isGlobalUnicastIp(addr)` directly (no DNS).
|
|
16
|
+
* - { kind:'name' } when it's a DNS name to resolve.
|
|
17
|
+
* - { kind:'reject' } for `localhost` / `*.local` / unparseable.
|
|
18
|
+
*/
|
|
19
|
+
export declare function classifyHost(rawHost: string): {
|
|
20
|
+
kind: 'ip';
|
|
21
|
+
addr: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'name';
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'reject';
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip terminal control / escape sequences from untrusted text, preserving
|
|
3
|
+
* only printable characters + deliberate whitespace (`\n`, `\t`, space, and CR
|
|
4
|
+
* which is normalized to `\n` by callers). Linear-time, single pass.
|
|
5
|
+
*
|
|
6
|
+
* Removed:
|
|
7
|
+
* - CSI `ESC [ … final` (cursor/screen/SGR manipulation)
|
|
8
|
+
* - OSC `ESC ] … (BEL | ESC \)` (e.g. OSC-52 clipboard, window title)
|
|
9
|
+
* - DCS/SOS/PM/APC `ESC (P|X|^|_) … ST`
|
|
10
|
+
* - two-char escapes `ESC <byte>` (incl. a lone trailing ESC)
|
|
11
|
+
* - C0 controls 0x00–0x1f EXCEPT \t (0x09) and \n (0x0a) (CR 0x0d dropped — callers normalize EOL first)
|
|
12
|
+
* - DEL 0x7f and C1 controls 0x80–0x9f (incl. 8-bit CSI 0x9b / OSC 0x9d)
|
|
13
|
+
*/
|
|
14
|
+
export declare function sanitizeForTerminal(input: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SearchResult {
|
|
2
|
+
url: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Parse DDG HTML result anchors. DDG wraps targets as
|
|
7
|
+
* `//duckduckgo.com/l/?uddg=<encoded-target>&...`; we decode `uddg` to the real
|
|
8
|
+
* URL. Linear scan over anchor tags; tolerant of markup drift. Returns ≤limit
|
|
9
|
+
* http(s) results. NEVER throws.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseDdgResults(html: string, limit?: number): SearchResult[];
|
|
12
|
+
/**
|
|
13
|
+
* Run a keyless web search. Returns ≤limit results, or [] on any failure
|
|
14
|
+
* (network/parse) — the caller decides the advisory. `signal` lets Esc abort.
|
|
15
|
+
*/
|
|
16
|
+
export declare function webSearch(query: string, signal?: AbortSignal, limit?: number): Promise<SearchResult[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/planner/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export * from './adapter';
|
|
|
3
3
|
export { PlannerCacheLayer } from './cache';
|
|
4
4
|
export { PlannerHealthMachine } from './health-state';
|
|
5
5
|
export { BackendPlannerClient, PlannerBudgetExceededError, PlannerTierGateRejectedError, type PlannerAppSyncTransport, type PlannerCryptoBridge, type SessionKeyResolver, type ShellEventEmit, type EmitShellEventFn, } from './client';
|
|
6
|
+
export { LocalGemmaPlannerAdapter, parseLocalGemmaPlannerDecision, renderLocalGemmaPlannerPrompt, type LocalGemmaPlannerRunner, } from './local-gemma';
|
|
7
|
+
export { parseLocalGemmaAdvisorySummary, renderLocalGemmaFamiliarizePrompt, type LocalGemmaAdvisoryRunner, } from './local-advisory';
|