@quantiya/codevibe-core 2.0.1 → 2.0.2
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/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 +39318 -3436
- 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
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import type { TeamExecution } from './team-execution-flag';
|
|
2
|
+
import type { AgentKind } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A shared-contract reference + access mode (Condition 2, #C12-2).
|
|
5
|
+
* snake_case-irrelevant single words; `access` reuses the lowercase wire
|
|
6
|
+
* values `'write' | 'read'` of `codevibe_policy::ContractAccess`.
|
|
7
|
+
*/
|
|
8
|
+
export interface ContractRefInput {
|
|
9
|
+
path: string;
|
|
10
|
+
access: 'write' | 'read';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The 4 disjointness-condition inputs (#C12-2). **snake_case field names**
|
|
14
|
+
* — deserializes to `codevibe_policy::OwnershipScope` which has no serde
|
|
15
|
+
* rename. See the casing warning at the top of this file.
|
|
16
|
+
*/
|
|
17
|
+
export interface OwnershipScopeInput {
|
|
18
|
+
/** Condition 1 — file paths this track may WRITE. */
|
|
19
|
+
write_paths: string[];
|
|
20
|
+
/** Condition 2 — shared contracts this track touches (tagged write/read). */
|
|
21
|
+
shared_contracts: ContractRefInput[];
|
|
22
|
+
/** Condition 3 — test surfaces this track owns. */
|
|
23
|
+
test_surfaces: string[];
|
|
24
|
+
/** Condition 4 — auto-modified files this track's tooling rewrites. */
|
|
25
|
+
auto_modified_files: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* One ordered work item (§2.1). Each becomes a track. `implementorAgent` is
|
|
29
|
+
* the UPPERCASE `CLAUDE | CODEX | GEMINI` (the `AgentKind` union).
|
|
30
|
+
*/
|
|
31
|
+
export interface WorkItemInput {
|
|
32
|
+
ownershipScope: OwnershipScopeInput;
|
|
33
|
+
implementorAgent: AgentKind;
|
|
34
|
+
isSharedTestOwner: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* CP-12 W4 (#593) §3.1 — the track's brief, E2E-encrypted under the session
|
|
37
|
+
* key (a BARE base64 ciphertext string — NOT a `{ciphertextB64,…}` envelope;
|
|
38
|
+
* recovery already knows the session + key version). The desktop encrypts it
|
|
39
|
+
* at `/team` dispatch and the engine persists it verbatim onto
|
|
40
|
+
* `TrackDescriptor.encrypted_brief` as an OPAQUE pass-through blob (never
|
|
41
|
+
* decrypted server-side). On a desktop restart the recovery handler returns
|
|
42
|
+
* the ciphertext so the desktop re-decrypts the brief (the local
|
|
43
|
+
* `briefsByTrackIndex` map is empty post-restart). NULLABLE — a track may
|
|
44
|
+
* legitimately have no `description`; in that case the desktop sends no
|
|
45
|
+
* ciphertext (→ wire `null` → recovery treats it as "no brief", an empty brief).
|
|
46
|
+
* The PLAINTEXT brief NEVER goes on the wire — only this ciphertext.
|
|
47
|
+
*/
|
|
48
|
+
encryptedBrief?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* User-lowered ceilings (§2.1, §11.4). LOWER-only — the server rejects
|
|
52
|
+
* values above the product max. Both fields optional.
|
|
53
|
+
*/
|
|
54
|
+
export interface UserCeilingsInput {
|
|
55
|
+
maxAutoReviseAttempts?: number;
|
|
56
|
+
maxWallClockMinutes?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* `createTaskGroup` mutation input (§2.1). The server validates disjointness
|
|
60
|
+
* (#C12-2) BEFORE creating any track.
|
|
61
|
+
*/
|
|
62
|
+
export interface CreateTaskGroupInput {
|
|
63
|
+
/** The ONE team Session (`caller_sub == session.userId`). */
|
|
64
|
+
sessionId: string;
|
|
65
|
+
/** Ordered work items (each a future track). */
|
|
66
|
+
workItems: WorkItemInput[];
|
|
67
|
+
/** Lock-row dedup key (#C12-1). */
|
|
68
|
+
groupIdempotencyKey: string;
|
|
69
|
+
/** Option-A re-submission (#C12-3); `undefined` = all tracks eligible. */
|
|
70
|
+
phase0aTrackIndex?: number;
|
|
71
|
+
/** User-lowered ceilings (#C12-11); `undefined` = product defaults. */
|
|
72
|
+
userCeilings?: UserCeilingsInput;
|
|
73
|
+
/**
|
|
74
|
+
* CP-14 P1 (§2.1) — the team EXECUTION MODEL: `'worktree_merge' |
|
|
75
|
+
* ({@link TeamExecution}) — always `'worktree_merge'` since the §10
|
|
76
|
+
* retirement (2026-07-03; strict pre-P1 disjointness,
|
|
77
|
+
* byte-identical). Send `'worktree_merge'` ONLY when this client will run the
|
|
78
|
+
* merge-train (its own `resolveTeamExecution`); that opts the group into
|
|
79
|
+
* overlapping-track dispatch (the merge-train + the server-side shared-contract
|
|
80
|
+
* gate become the authority). Snake_case wire value end-to-end (no GraphQL
|
|
81
|
+
* enum) — typed as the {@link TeamExecution} union for compile-time safety;
|
|
82
|
+
* the GraphQL field is `String`.
|
|
83
|
+
*/
|
|
84
|
+
executionModel?: TeamExecution;
|
|
85
|
+
/**
|
|
86
|
+
* CP-14 P1 (§2.1 / LOCK #C14-INDEP) — requested convergence: `'joint' |
|
|
87
|
+
* 'independent'`. `undefined` ⇒ Joint. SERVER-VALIDATED (a multi-track
|
|
88
|
+
* code-change is forced `joint`). Usually omitted until CP-4 populates it.
|
|
89
|
+
*/
|
|
90
|
+
convergence?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Which disjointness condition failed (abstract, #C12-3, snake_case wire). */
|
|
93
|
+
export type FailingCondition = 'write_path' | 'shared_contract' | 'test_surface' | 'inherently_ordered';
|
|
94
|
+
/** Deterministic recommended resolution option (#C12-3, snake_case wire). */
|
|
95
|
+
export type RecommendedOption = 'phase_lock_then_parallel' | 'assign_shared_test_owner' | 'single_track' | 'serial_owner';
|
|
96
|
+
/**
|
|
97
|
+
* The cited overlap — an externally-tagged enum (no serde rename on
|
|
98
|
+
* `codevibe_policy::DisjointnessViolation`), so on the wire it is an object
|
|
99
|
+
* with a SINGLE variant key. e.g.
|
|
100
|
+
* `{ "WritePathOverlap": { "file": "src/x.ts", "tracks": [0, 1] } }`.
|
|
101
|
+
*/
|
|
102
|
+
export type DisjointnessViolation = {
|
|
103
|
+
WritePathOverlap: {
|
|
104
|
+
file: string;
|
|
105
|
+
tracks: number[];
|
|
106
|
+
};
|
|
107
|
+
} | {
|
|
108
|
+
SharedContractMultiWriter: {
|
|
109
|
+
contract: string;
|
|
110
|
+
writers: number[];
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
TestSurfaceOverlapNoOwner: {
|
|
114
|
+
surface: string;
|
|
115
|
+
tracks: number[];
|
|
116
|
+
};
|
|
117
|
+
} | {
|
|
118
|
+
AutoModifiedFileOverlap: {
|
|
119
|
+
file: string;
|
|
120
|
+
tracks: number[];
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
/** The disjointness rejection (failure arm of `CreateTaskGroupResult`). */
|
|
124
|
+
export interface DisjointnessRejection {
|
|
125
|
+
failing_condition: FailingCondition;
|
|
126
|
+
recommended_option: RecommendedOption;
|
|
127
|
+
cited_overlap: DisjointnessViolation;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* `createTaskGroup` result (§2.1). Returned as an AWSJSON string by the
|
|
131
|
+
* backend resolver (`createTaskGroup.res.vtl` → `$util.toJson($ctx.result)`)
|
|
132
|
+
* and parsed by the SDK. Mirrors `types.rs::CreateTaskGroupOutput`:
|
|
133
|
+
* - accepted arm carries `taskGroupId` + `dispatchedTracks` (+ `rejection: null`).
|
|
134
|
+
* - rejected arm carries `rejection` (failing condition + recommended
|
|
135
|
+
* option + cited overlap, #C12-2 / #C12-3) (+ `taskGroupId: null` +
|
|
136
|
+
* `dispatchedTracks: null`).
|
|
137
|
+
*
|
|
138
|
+
* SERDE FIDELITY (load-bearing): the Rust `CreateTaskGroupOutput` (types.rs)
|
|
139
|
+
* tags `task_group_id` / `dispatched_tracks` / `rejection` with
|
|
140
|
+
* `#[serde(default)]` but NO `skip_serializing_if`, so serde ALWAYS
|
|
141
|
+
* serializes all four keys — the inactive arm's fields are explicit `null`,
|
|
142
|
+
* NOT omitted. Model them as present-but-nullable (`T | null`) rather than
|
|
143
|
+
* optional (`field?:`), and discriminate the arm on `accepted` (the bool),
|
|
144
|
+
* never on key ABSENCE.
|
|
145
|
+
*/
|
|
146
|
+
export interface CreateTaskGroupResult {
|
|
147
|
+
accepted: boolean;
|
|
148
|
+
taskGroupId: string | null;
|
|
149
|
+
dispatchedTracks: number | null;
|
|
150
|
+
rejection: DisjointnessRejection | null;
|
|
151
|
+
}
|
|
152
|
+
/** One track's changed-file set in the LE-signed classification (§2.1). */
|
|
153
|
+
export interface TrackChangedFiles {
|
|
154
|
+
trackIndex: number;
|
|
155
|
+
paths: string[];
|
|
156
|
+
}
|
|
157
|
+
/** MergeGate result discriminator (§2.1). SCREAMING wire values. */
|
|
158
|
+
export type MergeResult = 'PASS' | 'FAIL';
|
|
159
|
+
/** The 6-class MergeGate failure classification (§2.1, #C12-8). */
|
|
160
|
+
export type MergeFailureClass = 'SHARED_FILE_CONFLICT' | 'INTEGRATION_FAILURE' | 'REVIEWER_DISAGREEMENT' | 'SCOPE_VIOLATION' | 'DIRTY_REPO_STATE' | 'BUDGET_EXHAUSTED';
|
|
161
|
+
/** Retry-target kind discriminator (§2.1). SCREAMING wire values. */
|
|
162
|
+
export type MergeRetryTargetKind = 'TRACK' | 'SERIAL_OWNER' | 'NONE';
|
|
163
|
+
/**
|
|
164
|
+
* LE-recommended retry target (§2.1). `trackIndex` is the `TRACK:<idx>` when
|
|
165
|
+
* `kind === 'TRACK'`, else `null`. It is part of the classification's signing
|
|
166
|
+
* domain, so callers send it as explicit `null` (NOT omitted) when absent —
|
|
167
|
+
* mirroring Rust `MergeRetryTarget::track_index: Option<u32>` which serializes
|
|
168
|
+
* to `"trackIndex": null` (no `skip_serializing_if`), matching json-freeze's
|
|
169
|
+
* null output for byte-identical canonicalization.
|
|
170
|
+
*/
|
|
171
|
+
export interface MergeRetryTarget {
|
|
172
|
+
kind: MergeRetryTargetKind;
|
|
173
|
+
trackIndex: number | null;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* EncryptedPayloadInput (2f.4 contract, schema.graphql:986-991). Reused for
|
|
177
|
+
* the human-readable `detail` (E2E-encrypted under the team session key).
|
|
178
|
+
*/
|
|
179
|
+
export interface EncryptedPayloadInput {
|
|
180
|
+
ciphertextB64: string;
|
|
181
|
+
nonceB64?: string;
|
|
182
|
+
sessionId: string;
|
|
183
|
+
keyVersion?: number;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The LE-signed, server-readable MergeGate classification envelope (§2.1,
|
|
187
|
+
* #C12-8). Carries only non-secret structural metadata; the human-readable
|
|
188
|
+
* detail stays E2E-encrypted in `SubmitMergeGateVerdictInput.detail`. The
|
|
189
|
+
* server verifies `signatureB64` (ECDSA P-256, LE Class A key resolved by
|
|
190
|
+
* `(caller_sub, leDeviceId)`) before routing.
|
|
191
|
+
*
|
|
192
|
+
* `signatureB64` is produced by `signMergeClassification` (class-a-sign.ts)
|
|
193
|
+
* over this object MINUS `signatureB64`; `leDeviceId` is INSIDE the signing
|
|
194
|
+
* domain.
|
|
195
|
+
*
|
|
196
|
+
* Mirrors `types.rs::MergeClassificationInput` (`rename_all = "camelCase"`).
|
|
197
|
+
* The Rust `Option` fields use `#[serde(default)]` WITHOUT
|
|
198
|
+
* `skip_serializing_if`, so on the verifier side they serialize to `null`
|
|
199
|
+
* when absent — the LE-side canonicalization MUST include them as `null`
|
|
200
|
+
* too (json-freeze emits nulls), which is why this interface's nullable
|
|
201
|
+
* fields are set to `null` (not omitted) when building the signing object.
|
|
202
|
+
*/
|
|
203
|
+
export interface MergeClassificationInput {
|
|
204
|
+
result: MergeResult;
|
|
205
|
+
failureClass: MergeFailureClass | null;
|
|
206
|
+
failingTrackIndex: number | null;
|
|
207
|
+
sharedFilePath: string | null;
|
|
208
|
+
changedFileSets: TrackChangedFiles[];
|
|
209
|
+
retryTarget: MergeRetryTarget;
|
|
210
|
+
conflictingTracks: number[];
|
|
211
|
+
sharedContractRef: string | null;
|
|
212
|
+
leDeviceId: string;
|
|
213
|
+
signatureB64: string;
|
|
214
|
+
}
|
|
215
|
+
/** `submitMergeGateVerdict` mutation input (§2.1). */
|
|
216
|
+
export interface SubmitMergeGateVerdictInput {
|
|
217
|
+
taskGroupId: string;
|
|
218
|
+
mergeGateId: string;
|
|
219
|
+
sessionId: string;
|
|
220
|
+
verdictIdempotencyKey: string;
|
|
221
|
+
classification: MergeClassificationInput;
|
|
222
|
+
detail: EncryptedPayloadInput;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* `submitMergeGateVerdict` result (§2.1). Returned as an AWSJSON string by
|
|
226
|
+
* `submitMergeGateVerdict.res.vtl`. Mirrors
|
|
227
|
+
* `types.rs::SubmitMergeGateVerdictOutput` — `outcome` is the resolved label
|
|
228
|
+
* (`"complete"` or a `halted_reason` const), and on an idempotent replay it
|
|
229
|
+
* is the stored `TaskGroupRow.merge_gate_verdict.outcome` (#C12-1).
|
|
230
|
+
*/
|
|
231
|
+
export interface SubmitMergeGateVerdictResult {
|
|
232
|
+
outcome: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* PHASE-589/469 W1 — the CONTENT-FREE closed reason set for a team-track local
|
|
236
|
+
* hard-fail. W1 wires EVERY team-track hard-fail dead-end (the 4 pre-submit /
|
|
237
|
+
* promote-time sites), so the closed set has exactly these 4 labels — NEVER raw
|
|
238
|
+
* test output. The engine `submit_track_verification_outcome.rs::VALID_OUTCOMES`
|
|
239
|
+
* is the mirror authority and rejects any value outside this set.
|
|
240
|
+
*
|
|
241
|
+
* W2 routes by the revisable-vs-terminal split: REVISABLE reasons AUTO-REVISE
|
|
242
|
+
* (mint round-N+1; the track stays InFlight + renders `Revising`) while the
|
|
243
|
+
* per-track cap remains, else terminal-fail; TERMINAL reasons ALWAYS
|
|
244
|
+
* terminal-fail (security/IO backstops — NEVER auto-revised):
|
|
245
|
+
* - `verification_failure` — a declared test failed OR the pre-submit
|
|
246
|
+
* re-capture failed. [REVISABLE — W2 auto-revises]
|
|
247
|
+
* - `out_of_scope_write` — the track wrote outside its declared paths.
|
|
248
|
+
* [REVISABLE — W2 auto-revises]
|
|
249
|
+
* - `review_integrity_violation` — the shadow was modified after review/test
|
|
250
|
+
* (the #598 integrity drift, pre-submit AND promote-time). [TERMINAL — a
|
|
251
|
+
* security backstop; NEVER auto-revised]
|
|
252
|
+
* - `promote_failure` — a promote-time capture/IO failure. [TERMINAL]
|
|
253
|
+
*/
|
|
254
|
+
export type TeamTrackFailureReason = 'verification_failure' | 'out_of_scope_write' | 'review_integrity_violation' | 'promote_failure';
|
|
255
|
+
/**
|
|
256
|
+
* No-op UX (#1) — the full set of `submitTrackVerificationOutcome` outcomes: the
|
|
257
|
+
* 4 hard-FAILURE reasons above PLUS the BENIGN `no_change` terminal. A team track
|
|
258
|
+
* that produced an EMPTY diff (nothing to do) reports `no_change` so the engine
|
|
259
|
+
* marks it `Passed` (via `pass_track_and_schedule`) — NOT `Failed` — so the
|
|
260
|
+
* scheduler fires the MergeGate on all-terminal-no-failure and NEVER triggers the
|
|
261
|
+
* all-or-nothing revert of sibling tracks.
|
|
262
|
+
*/
|
|
263
|
+
export type TeamTrackVerificationOutcome = TeamTrackFailureReason | 'no_change';
|
|
264
|
+
/**
|
|
265
|
+
* PHASE-589/469 W1 — `submitTrackVerificationOutcome` mutation input
|
|
266
|
+
* (LOCK #589-F). The desktop reports that ONE team track HARD-FAILED its own
|
|
267
|
+
* local gate (a declared-test failure, an out-of-scope write, a review-integrity
|
|
268
|
+
* drift, or a promote-time failure) so the engine marks the track `Failed` NOW →
|
|
269
|
+
* its existing scheduler drain + group-escalation resolves the group promptly
|
|
270
|
+
* (instead of the slow lease sweeper). A NET-NEW shape: NO proposal /
|
|
271
|
+
* `encProposal` — the marker MUST NOT fan out to reviewers (#598's guarantee).
|
|
272
|
+
* `outcome` is the CONTENT-FREE closed reason label — NEVER raw test output.
|
|
273
|
+
*/
|
|
274
|
+
export interface SubmitTrackVerificationOutcomeInput {
|
|
275
|
+
taskGroupId: string;
|
|
276
|
+
trackIndex: number;
|
|
277
|
+
sessionId: string;
|
|
278
|
+
verdictIdempotencyKey: string;
|
|
279
|
+
/**
|
|
280
|
+
* The CONTENT-FREE closed outcome label (4 failure reasons + the benign
|
|
281
|
+
* `no_change`). The server validates it against the fixed set and rejects an
|
|
282
|
+
* unknown value.
|
|
283
|
+
*/
|
|
284
|
+
outcome: TeamTrackVerificationOutcome;
|
|
285
|
+
/**
|
|
286
|
+
* PHASE-589/469 W2 — the round-N `reviewer_quorum` gate id of the track's
|
|
287
|
+
* CURRENT round (the gate `runImplementorRound` registered). REQUIRED for a
|
|
288
|
+
* REVISABLE outcome (`verification_failure` / `out_of_scope_write`): the engine
|
|
289
|
+
* uses it as the parent for the round-N+1 revise gate + the `REVISE_FEEDBACK`
|
|
290
|
+
* packet's `gateId` (so `taskByGateId` re-resolves the track). Omitted for
|
|
291
|
+
* TERMINAL outcomes (`review_integrity_violation` / `promote_failure`), which
|
|
292
|
+
* never auto-revise.
|
|
293
|
+
*/
|
|
294
|
+
gateId?: string;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* PHASE-589/469 W1 — `submitTrackVerificationOutcome` result. Returned as an
|
|
298
|
+
* AWSJSON string by `submitTrackVerificationOutcome.res.vtl`. Mirrors
|
|
299
|
+
* `types.rs::SubmitTrackVerificationOutcomeOutput` — `trackState` is the
|
|
300
|
+
* track's terminal state label (`"Failed"`), or on an idempotent replay the
|
|
301
|
+
* already-terminal state.
|
|
302
|
+
*/
|
|
303
|
+
export interface SubmitTrackVerificationOutcomeResult {
|
|
304
|
+
trackState: string;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* PHASE-589/469 W3.2 — the closed 5-option group-escalation decision set
|
|
308
|
+
* (position-bound, server-derived — the SAME `SOURCE_OF_TRUTH_LITERALS` 5-tuple
|
|
309
|
+
* `gate-prompts.ts` renders). Mirror of the engine `VALID_DECISIONS`.
|
|
310
|
+
*/
|
|
311
|
+
export type GroupDecisionLabel = 'ACCEPT' | 'ACCEPT_WITH_NOTES' | 'REJECT_WITH_NOTES' | 'REJECT_RESTART' | 'ABORT_TASK';
|
|
312
|
+
/** The CLAIM | COMMIT phase discriminator for the two-phase group decision. */
|
|
313
|
+
export type GroupDecisionPhase = 'claim' | 'commit';
|
|
314
|
+
/**
|
|
315
|
+
* PHASE-589/469 W3.2 — `claimGroupDecision` mutation input (LOCK #589-J). The
|
|
316
|
+
* two-phase group-escalation resolve: CLAIM atomically locks the group to the
|
|
317
|
+
* first acting surface; COMMIT (after the desktop revert side-effect) drives the
|
|
318
|
+
* group terminal. CONTENT-FREE scalars only — NO proposal, NO prose; the
|
|
319
|
+
* optional `*_WITH_NOTES` notes ride E2E-encrypted exactly as
|
|
320
|
+
* `applyUserDecision.notes` do (the engine NEVER decrypts them).
|
|
321
|
+
*/
|
|
322
|
+
export interface ClaimGroupDecisionInput {
|
|
323
|
+
taskGroupId: string;
|
|
324
|
+
sessionId: string;
|
|
325
|
+
phase: GroupDecisionPhase;
|
|
326
|
+
decision: GroupDecisionLabel;
|
|
327
|
+
verdictIdempotencyKey: string;
|
|
328
|
+
/** On COMMIT — the token the CLAIM minted (must match the live claim). Absent on CLAIM. */
|
|
329
|
+
claimToken?: string;
|
|
330
|
+
/** Optional E2E-encrypted advisory notes on an `*_WITH_NOTES` decision. */
|
|
331
|
+
notes?: string;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* PHASE-589/469 W3.2 — `claimGroupDecision` result. On a CLAIM: `phase:"claimed"`
|
|
335
|
+
* + the minted `claimToken`. On a COMMIT: `phase:"committed"` + the group's
|
|
336
|
+
* terminal status label. On an idempotent replay: `already_claimed` /
|
|
337
|
+
* `already_committed`. Returned as an AWSJSON string. Mirrors
|
|
338
|
+
* `types.rs::ClaimGroupDecisionOutput`.
|
|
339
|
+
*/
|
|
340
|
+
export interface ClaimGroupDecisionResult {
|
|
341
|
+
phase: 'claimed' | 'committed' | 'already_claimed' | 'already_committed';
|
|
342
|
+
decision: string;
|
|
343
|
+
claimToken: string;
|
|
344
|
+
/** The group's resulting status label after a COMMIT (`"complete"` | `"halted"`); empty after a CLAIM. */
|
|
345
|
+
groupStatus?: string;
|
|
346
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** The single execution model. `legacy_disjoint` was deleted 2026-07-03 (§10). */
|
|
2
|
+
export type TeamExecution = 'worktree_merge';
|
|
3
|
+
/** The hard default — and only — execution model. */
|
|
4
|
+
export declare const DEFAULT_TEAM_EXECUTION: TeamExecution;
|
|
5
|
+
/**
|
|
6
|
+
* The env var that FORMERLY selected the execution model. Inert since the
|
|
7
|
+
* `legacy_disjoint` deletion (kept exported for the operator-docs surface and
|
|
8
|
+
* so stale dogfood scripts that still set it don't break anything).
|
|
9
|
+
*/
|
|
10
|
+
export declare const TEAM_EXECUTION_ENV_VAR = "CODEVIBE_TEAM_EXECUTION";
|
|
11
|
+
/** Is `v` the (single) valid {@link TeamExecution} label? */
|
|
12
|
+
export declare function isTeamExecution(v: unknown): v is TeamExecution;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the effective `team.execution` model: always `worktree_merge`. The
|
|
15
|
+
* override/env parameters are retained for call-site stability; every input —
|
|
16
|
+
* including a stale `legacy_disjoint` — resolves to the single model (the
|
|
17
|
+
* legacy path no longer exists to be selected).
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveTeamExecution(_override?: TeamExecution | null | undefined, _env?: NodeJS.ProcessEnv): TeamExecution;
|
|
20
|
+
/** True — the merge-before-push model is the only execution model. */
|
|
21
|
+
export declare function isWorktreeMergeEnabled(_override?: TeamExecution | null | undefined, _env?: NodeJS.ProcessEnv): boolean;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ImplementorHandle } from './types';
|
|
2
|
+
/** Composite map key `<task_group_id>::<track_index>` (track identity). */
|
|
3
|
+
export declare function trackKey(taskGroupId: string, trackIndex: number): string;
|
|
4
|
+
/**
|
|
5
|
+
* One tracked track process. `generation` is the `dispatch_generation` that
|
|
6
|
+
* launched this process — used to ignore a duplicate `TrackAssigned` for an
|
|
7
|
+
* already-launched generation (#C12-17) and to allow a NEWER generation
|
|
8
|
+
* (dispute re-dispatch) to supersede a stale one.
|
|
9
|
+
*/
|
|
10
|
+
export interface TrackProcess {
|
|
11
|
+
taskGroupId: string;
|
|
12
|
+
trackIndex: number;
|
|
13
|
+
taskId: string;
|
|
14
|
+
/** The `dispatch_generation` of the `TrackAssigned` that launched it. */
|
|
15
|
+
generation: number;
|
|
16
|
+
/** The isolated per-track state dir (canonicalized realpath). */
|
|
17
|
+
stateDir: string;
|
|
18
|
+
/** The live implementor handle (for stop-on-halt + lease tracking). */
|
|
19
|
+
handle: ImplementorHandle;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* In-memory registry of concurrent track processes, owned by one
|
|
23
|
+
* `LocalExecutorImpl`. NOT process-global (each session/LE has its own), unlike
|
|
24
|
+
* the double-construction registry in local-executor-impl.ts.
|
|
25
|
+
*/
|
|
26
|
+
export declare class TrackRegistry {
|
|
27
|
+
private readonly processes;
|
|
28
|
+
/**
|
|
29
|
+
* Idempotency decision (#C12-17). Returns `true` when a `TrackAssigned` for
|
|
30
|
+
* `(taskGroupId, trackIndex, generation)` should be IGNORED because that
|
|
31
|
+
* generation (or a newer one) is already launched. Returns `false` when the
|
|
32
|
+
* caller should spawn.
|
|
33
|
+
*
|
|
34
|
+
* A STRICTLY NEWER generation is NOT a duplicate — it is a dispute
|
|
35
|
+
* re-dispatch (#C12-19) and is allowed to spawn (the caller replaces the
|
|
36
|
+
* stale entry via `register`). A generation EQUAL to (replay) OR OLDER than
|
|
37
|
+
* (stale outbox re-drain) the launched generation is a duplicate → ignore.
|
|
38
|
+
*/
|
|
39
|
+
isDuplicate(taskGroupId: string, trackIndex: number, generation: number): boolean;
|
|
40
|
+
/** Record a launched track process (overwrites a superseded generation). */
|
|
41
|
+
register(proc: TrackProcess): void;
|
|
42
|
+
/** Lookup by track identity (latest generation). */
|
|
43
|
+
get(taskGroupId: string, trackIndex: number): TrackProcess | undefined;
|
|
44
|
+
/** All in-flight track processes for a group (for stop-on-halt). */
|
|
45
|
+
forGroup(taskGroupId: string): TrackProcess[];
|
|
46
|
+
/** Drop a track entry (e.g., after it terminates). */
|
|
47
|
+
delete(taskGroupId: string, trackIndex: number): void;
|
|
48
|
+
/** Test-only — number of tracked processes. */
|
|
49
|
+
get sizeForTests(): number;
|
|
50
|
+
}
|