sdd-agent-platform 0.1.0 → 0.3.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 +144 -310
- package/dist/packages/cli/src/main.js +1336 -313
- package/dist/packages/cli/src/main.js.map +1 -1
- package/dist/packages/cli/src/options.d.ts +4 -0
- package/dist/packages/cli/src/options.js +35 -0
- package/dist/packages/cli/src/options.js.map +1 -0
- package/dist/packages/core/src/ai-tools.d.ts +19 -2
- package/dist/packages/core/src/ai-tools.js +114 -22
- package/dist/packages/core/src/ai-tools.js.map +1 -1
- package/dist/packages/core/src/index.d.ts +975 -5
- package/dist/packages/core/src/index.js +5267 -369
- package/dist/packages/core/src/index.js.map +1 -1
- package/dist/packages/core/src/instructions.js +35 -34
- package/dist/packages/core/src/instructions.js.map +1 -1
- package/dist/packages/core/src/path-safety.d.ts +4 -0
- package/dist/packages/core/src/path-safety.js +35 -0
- package/dist/packages/core/src/path-safety.js.map +1 -0
- package/package.json +2 -2
|
@@ -20,6 +20,39 @@ export declare const BACKGROUND_EXECUTOR_CONTRACT_VERSION = "phase-3.11-backgrou
|
|
|
20
20
|
export declare const WAVE_EXECUTOR_CONTRACT_VERSION = "phase-3.12-wave-executor-v1";
|
|
21
21
|
export declare const LOCAL_RUN_INDEX_CONTRACT_VERSION = "phase-3.13-local-run-index-v1";
|
|
22
22
|
export declare const GOVERNANCE_POLICY_CONTRACT_VERSION = "phase-3.14-governance-policy-v1";
|
|
23
|
+
export declare const CONTEXT_RESOLVER_CONTRACT_VERSION = "phase-5.1-context-resolver-v1";
|
|
24
|
+
export declare const LIFECYCLE_RISK_GATE_CONTRACT_VERSION = "phase-5.1-lifecycle-risk-gate-v1";
|
|
25
|
+
export declare const OUTPUT_QUALITY_CONTRACT_VERSION = "phase-5.1-output-quality-v1";
|
|
26
|
+
export declare const WORKFLOW_GATE_CONTRACT_VERSION = "phase-5.2-workflow-gate-v1";
|
|
27
|
+
export declare const AGENT_REGISTRY_CONTRACT_VERSION = "phase-5.2-agent-registry-v1";
|
|
28
|
+
export declare const TASK_GRAPH_CONTRACT_VERSION = "phase-5.3-task-graph-v1";
|
|
29
|
+
export declare const TASK_RUN_EVIDENCE_CONTRACT_VERSION = "phase-5.3-task-run-evidence-v1";
|
|
30
|
+
export declare const QUERY_STATUS_CONTRACT_VERSION = "phase-5.4-query-status-v1";
|
|
31
|
+
export declare const SKILL_AGENT_EVAL_CONTRACT_VERSION = "phase-5.5-skill-agent-eval-v1";
|
|
32
|
+
export declare const HARNESS_LEARNING_CONTRACT_VERSION = "phase-5.5-harness-learning-v1";
|
|
33
|
+
export declare const PROJECT_CONTEXT_PACK_CONTRACT_VERSION = "phase-5.5-project-context-pack-v1";
|
|
34
|
+
export declare const AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION = "phase-6.0-agent-skill-team-runtime-v1";
|
|
35
|
+
export declare const CAPABILITY_SOURCE_CATALOG_VERSION = "phase-6.0-capability-source-catalog-v1";
|
|
36
|
+
export declare const EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION = "phase-6.0-external-agent-pack-import-policy-v1";
|
|
37
|
+
export declare const TOOL_PERMISSION_SPEC_VERSION = "phase-6.0-tool-permission-spec-v1";
|
|
38
|
+
export declare const HOST_ADAPTER_CONTRACT_VERSION = "phase-6.0-host-adapter-contract-v1";
|
|
39
|
+
export declare const AGENT_ROUTER_CONTRACT_VERSION = "phase-6.0-agent-router-v1";
|
|
40
|
+
export declare const TEAM_MODE_POLICY_VERSION = "phase-6.0-team-mode-policy-v1";
|
|
41
|
+
export declare const EVIDENCE_INGESTION_CONTRACT_VERSION = "phase-6.0-evidence-ingestion-v1";
|
|
42
|
+
export declare const AGENT_EXECUTION_RECORD_CONTRACT_VERSION = "phase-6.0-agent-execution-record-v1";
|
|
43
|
+
export declare const TEAM_SESSION_RECORD_CONTRACT_VERSION = "phase-6.0-team-session-record-v1";
|
|
44
|
+
export declare const RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION = "phase-6.1-resident-worker-runtime-v1";
|
|
45
|
+
export declare const SDD_EVIDENCE_CONTRACT = "sdd-evidence-v1";
|
|
46
|
+
export declare const SDD_EVIDENCE_VERSION = "1.0.0";
|
|
47
|
+
export declare const ACCEPTANCE_POLICY_RULESET_VERSION = "acceptance-policy-v1";
|
|
48
|
+
export declare const INVOCATION_LEDGER_CONTRACT_VERSION = "phase-6.9-invocation-ledger-v1";
|
|
49
|
+
export declare const ROUTE_CACHE_CONTRACT_VERSION = "phase-6.9-route-cache-v1";
|
|
50
|
+
export declare const RUNTIME_PROFILE_CONTRACT_VERSION = "phase-6.9-runtime-profile-v1";
|
|
51
|
+
export declare const CONTEXT_BUDGET_CONTRACT_VERSION = "phase-6.10-context-budget-v1";
|
|
52
|
+
export declare const COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION = "sdd-command-output-summary-v1";
|
|
53
|
+
export declare const EVIDENCE_SUMMARY_CONTRACT_VERSION = "sdd-evidence-summary-v1";
|
|
54
|
+
export declare const CONTEXT_PACKAGE_CONTRACT_VERSION = "sdd-context-package-v1";
|
|
55
|
+
export declare const LOG_WORKER_SUMMARY_CONTRACT_VERSION = "sdd-log-worker-summary-v1";
|
|
23
56
|
export type DoctorLevel = 'PASS' | 'WARN' | 'FAIL';
|
|
24
57
|
export type RunStatus = 'created' | 'running' | 'completed' | 'blocked' | 'failed' | 'archived';
|
|
25
58
|
export type LifecycleProfile = 'direct' | 'compact' | 'full' | 'research';
|
|
@@ -28,7 +61,14 @@ export type SddResultStatus = 'PASS' | 'PASS_WITH_GAPS' | 'FAIL' | 'BLOCKED' | '
|
|
|
28
61
|
export type DelegationRunMode = 'foreground' | 'background';
|
|
29
62
|
export type DelegationStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'RECOVERABLE' | 'STALE';
|
|
30
63
|
export type GoalVerifyStatus = 'PASS' | 'PASS_WITH_GAPS' | 'FAIL' | 'BLOCKED';
|
|
64
|
+
export type HarnessVerifyStatus = 'PASS' | 'GAPS' | 'BLOCKED' | 'HUMAN_NEEDED';
|
|
31
65
|
export type ArtifactResultIngestionStatus = 'accepted' | 'rejected';
|
|
66
|
+
export type EvidenceCoverageStatus = 'PASS' | 'FAIL' | 'BLOCKED' | 'REFERENCED_ONLY' | 'MISSING';
|
|
67
|
+
export type EvidenceQualityIssue = 'EMPTY_EVIDENCE' | 'TODO_PLACEHOLDER' | 'TEMPLATE_TEXT' | 'MENTION_ONLY' | 'UNSOURCED_PASS' | 'MISSING_COMMAND_OUTPUT' | 'MISSING_ARTIFACT_REFERENCE' | 'MISSING_MATERIAL_REFERENCE' | 'PROVENANCE_GAP' | 'POLICY_RULE_FAILED' | 'DERIVED_SOURCE_EVIDENCE' | 'PARTITION_SCOPE_VIOLATION';
|
|
68
|
+
export type ContextProfile = 'brief' | 'normal' | 'forensic';
|
|
69
|
+
export type ContextBuildMode = 'do' | 'verify' | 'sync-back' | 'doctor';
|
|
70
|
+
export type ContextSourceKind = 'artifact' | 'run_state' | 'ledger' | 'document' | 'command_output' | 'derived';
|
|
71
|
+
export type ContextSummaryStatus = 'PASS' | 'FAIL' | 'BLOCKED' | 'UNKNOWN';
|
|
32
72
|
export type DetectionConfidence = 'high' | 'medium' | 'low';
|
|
33
73
|
export interface DetectionEvidence {
|
|
34
74
|
kind: string;
|
|
@@ -68,6 +108,7 @@ export interface ProjectConfig {
|
|
|
68
108
|
};
|
|
69
109
|
sdd: {
|
|
70
110
|
spec_dir: string;
|
|
111
|
+
default_branch?: string;
|
|
71
112
|
docs_language: string;
|
|
72
113
|
compatible_with: string;
|
|
73
114
|
};
|
|
@@ -87,6 +128,7 @@ export interface ProjectConfig {
|
|
|
87
128
|
decision_required: boolean;
|
|
88
129
|
profiles: LifecycleProfile[];
|
|
89
130
|
};
|
|
131
|
+
agentRuntime?: ProjectAgentRuntimeConfig;
|
|
90
132
|
}
|
|
91
133
|
export type ToolCapabilityCategory = 'runtime' | 'editing' | 'git' | 'validation' | 'browser' | 'artifact' | 'governance';
|
|
92
134
|
export type ToolCapabilitySideEffect = 'read_only' | 'local_write' | 'command_execution' | 'external_interaction';
|
|
@@ -303,6 +345,38 @@ export type ImpactConfidence = 'high' | 'medium' | 'low';
|
|
|
303
345
|
export type ValidationClarity = 'clear' | 'partial' | 'unclear';
|
|
304
346
|
export type OrchestrationUncertainty = 'low' | 'medium' | 'high';
|
|
305
347
|
export type Reversibility = 'reversible' | 'irreversible' | 'unknown';
|
|
348
|
+
export type ContextBranchSource = 'explicit_option' | 'cli_option' | 'project_config' | 'git_branch';
|
|
349
|
+
export interface ContextResolverContract {
|
|
350
|
+
contract: typeof CONTEXT_RESOLVER_CONTRACT_VERSION;
|
|
351
|
+
branch: string;
|
|
352
|
+
partition: string;
|
|
353
|
+
rawBranch: string;
|
|
354
|
+
branchSource: ContextBranchSource;
|
|
355
|
+
currentGitBranch: string | null;
|
|
356
|
+
workingTreeMatched: boolean | null;
|
|
357
|
+
specDir: string;
|
|
358
|
+
}
|
|
359
|
+
export type LifecycleRiskCategory = 'state_machine' | 'concurrency' | 'database_data_loss' | 'security' | 'sql' | 'api_schema' | 'ci_build' | 'external_unknown';
|
|
360
|
+
export type LifecycleRiskExtractionSource = 'from_text' | 'from_file' | 'none';
|
|
361
|
+
export interface LifecycleRiskExtractionEvidence {
|
|
362
|
+
category: LifecycleRiskCategory;
|
|
363
|
+
matched: string;
|
|
364
|
+
riskTag: string;
|
|
365
|
+
}
|
|
366
|
+
export interface LifecycleRiskGateExtraction {
|
|
367
|
+
contract: typeof LIFECYCLE_RISK_GATE_CONTRACT_VERSION;
|
|
368
|
+
source: LifecycleRiskExtractionSource;
|
|
369
|
+
riskTags: string[];
|
|
370
|
+
affectedContracts: string[];
|
|
371
|
+
externalUnknown: boolean;
|
|
372
|
+
architectureDecisionRequired: boolean;
|
|
373
|
+
reversibility?: Reversibility;
|
|
374
|
+
validationClarity?: ValidationClarity;
|
|
375
|
+
impactConfidence?: ImpactConfidence;
|
|
376
|
+
evidence: LifecycleRiskExtractionEvidence[];
|
|
377
|
+
signals: Partial<LifecycleDecisionSignals>;
|
|
378
|
+
}
|
|
379
|
+
export type LifecycleAutonomyCeiling = 'direct_execution_allowed' | 'compact_boundary_only' | 'full_sdd_with_checkpoint' | 'research_before_implementation';
|
|
306
380
|
export interface LifecycleDecisionSignals {
|
|
307
381
|
intent_clarity: SignalClarity;
|
|
308
382
|
acceptance_clarity: SignalClarity;
|
|
@@ -336,6 +410,7 @@ export interface LifecycleDecisionGateResult {
|
|
|
336
410
|
record: LifecycleDecisionRecord;
|
|
337
411
|
checkpointRequired: boolean;
|
|
338
412
|
boundaries: string[];
|
|
413
|
+
autonomyCeiling: LifecycleAutonomyCeiling;
|
|
339
414
|
}
|
|
340
415
|
export interface ArtifactIndexEntry {
|
|
341
416
|
path: string;
|
|
@@ -344,6 +419,13 @@ export interface ArtifactIndexEntry {
|
|
|
344
419
|
agent: string | null;
|
|
345
420
|
createdAt: string;
|
|
346
421
|
}
|
|
422
|
+
export interface RunDocumentSnapshot {
|
|
423
|
+
specHash: string | null;
|
|
424
|
+
planHash: string | null;
|
|
425
|
+
tasksHash: string | null;
|
|
426
|
+
planBasedOnSpecHash: string | null;
|
|
427
|
+
tasksBasedOnPlanHash: string | null;
|
|
428
|
+
}
|
|
347
429
|
export interface RunState {
|
|
348
430
|
contract: typeof RUN_STATE_CONTRACT;
|
|
349
431
|
runtimeVersion: typeof RUNTIME_VERSION;
|
|
@@ -351,6 +433,11 @@ export interface RunState {
|
|
|
351
433
|
status: RunStatus;
|
|
352
434
|
phase: string | null;
|
|
353
435
|
currentTask: string | null;
|
|
436
|
+
partition: string | null;
|
|
437
|
+
gitBranch: string | null;
|
|
438
|
+
taskId: string | null;
|
|
439
|
+
affectedFiles: string[];
|
|
440
|
+
documentSnapshot: RunDocumentSnapshot;
|
|
354
441
|
createdAt: string;
|
|
355
442
|
updatedAt: string;
|
|
356
443
|
projectRoot: string;
|
|
@@ -372,6 +459,8 @@ export interface RunState {
|
|
|
372
459
|
syncBack: {
|
|
373
460
|
mode: 'proposal';
|
|
374
461
|
proposalPath: string | null;
|
|
462
|
+
proposalDigest?: string | null;
|
|
463
|
+
sourceVerifyStatus?: GoalVerifyStatus | SingleTaskLoopStatus | null;
|
|
375
464
|
status: 'not_created' | 'proposed' | 'applied';
|
|
376
465
|
};
|
|
377
466
|
}
|
|
@@ -411,6 +500,15 @@ export interface SddTask {
|
|
|
411
500
|
affectedFiles: string[];
|
|
412
501
|
validation: string[];
|
|
413
502
|
risk: string[];
|
|
503
|
+
acceptanceRefs: string[];
|
|
504
|
+
planRefs: string[];
|
|
505
|
+
fileOwnership: string[];
|
|
506
|
+
agentFit: string[];
|
|
507
|
+
verificationAvailability: string[];
|
|
508
|
+
autonomy: string | null;
|
|
509
|
+
allowedAgents: string[];
|
|
510
|
+
requiredArtifacts: string[];
|
|
511
|
+
gapState: string | null;
|
|
414
512
|
boundary: string | null;
|
|
415
513
|
acceptance: string[];
|
|
416
514
|
implementationNotes: string | null;
|
|
@@ -434,6 +532,13 @@ export interface SddTaskModel {
|
|
|
434
532
|
specExists: boolean;
|
|
435
533
|
planExists: boolean;
|
|
436
534
|
tasksExists: boolean;
|
|
535
|
+
specHash?: string | null;
|
|
536
|
+
planHash?: string | null;
|
|
537
|
+
tasksHash?: string | null;
|
|
538
|
+
planBasedOnSpecHash?: string | null;
|
|
539
|
+
tasksBasedOnPlanHash?: string | null;
|
|
540
|
+
planStale?: boolean;
|
|
541
|
+
tasksStale?: boolean;
|
|
437
542
|
};
|
|
438
543
|
tasks: SddTask[];
|
|
439
544
|
gaps: SddTaskGap[];
|
|
@@ -448,6 +553,15 @@ export interface TaskGraphNode {
|
|
|
448
553
|
affectedFiles: string[];
|
|
449
554
|
risk: string[];
|
|
450
555
|
validation: string[];
|
|
556
|
+
acceptanceRefs: string[];
|
|
557
|
+
planRefs: string[];
|
|
558
|
+
fileOwnership: string[];
|
|
559
|
+
agentFit: string[];
|
|
560
|
+
verificationAvailability: string[];
|
|
561
|
+
autonomy: string | null;
|
|
562
|
+
allowedAgents: string[];
|
|
563
|
+
requiredArtifacts: string[];
|
|
564
|
+
gapState: string | null;
|
|
451
565
|
source: SddTaskSourceLocation;
|
|
452
566
|
}
|
|
453
567
|
export interface TaskGraphEdge {
|
|
@@ -464,6 +578,7 @@ export interface TaskGraphDiagnostic {
|
|
|
464
578
|
recommendation: string;
|
|
465
579
|
}
|
|
466
580
|
export interface TaskGraphPlan {
|
|
581
|
+
contract: typeof TASK_GRAPH_CONTRACT_VERSION;
|
|
467
582
|
version: typeof TASK_GRAPH_PLANNER_CONTRACT_VERSION;
|
|
468
583
|
branch: string;
|
|
469
584
|
valid: boolean;
|
|
@@ -543,6 +658,90 @@ export interface BackgroundExecutorInspection {
|
|
|
543
658
|
valid: boolean;
|
|
544
659
|
issues: ContractValidationIssue[];
|
|
545
660
|
}
|
|
661
|
+
export type ResidentWorkerRuntimeStatus = 'claimed' | 'active' | 'stale' | 'terminal' | 'blocked';
|
|
662
|
+
export interface ResidentWorkerRuntimeRecord {
|
|
663
|
+
version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
|
|
664
|
+
runtimeId: string;
|
|
665
|
+
runId: string;
|
|
666
|
+
taskId: string;
|
|
667
|
+
agent: string;
|
|
668
|
+
workerAdapterId: string;
|
|
669
|
+
delegationId: string;
|
|
670
|
+
queueItemId: string;
|
|
671
|
+
expectedArtifact: string;
|
|
672
|
+
status: ResidentWorkerRuntimeStatus;
|
|
673
|
+
claimedAt: string;
|
|
674
|
+
lastHeartbeatAt: string | null;
|
|
675
|
+
leaseSeconds: number;
|
|
676
|
+
leaseExpiresAt: string;
|
|
677
|
+
updatedAt: string;
|
|
678
|
+
evidenceSummary: string;
|
|
679
|
+
}
|
|
680
|
+
export interface ResidentWorkerRuntimeClaimOptions {
|
|
681
|
+
branch?: string;
|
|
682
|
+
runId?: string;
|
|
683
|
+
taskId: string;
|
|
684
|
+
runtimeId?: string;
|
|
685
|
+
agent?: string;
|
|
686
|
+
workerAdapterId?: string;
|
|
687
|
+
delegationId?: string;
|
|
688
|
+
leaseSeconds?: number;
|
|
689
|
+
}
|
|
690
|
+
export interface ResidentWorkerRuntimeClaimResult {
|
|
691
|
+
version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
|
|
692
|
+
runId: string;
|
|
693
|
+
runtimeId: string | null;
|
|
694
|
+
taskId: string;
|
|
695
|
+
agent: string;
|
|
696
|
+
workerAdapterId: string;
|
|
697
|
+
delegationId: string | null;
|
|
698
|
+
queueItemId: string | null;
|
|
699
|
+
expectedArtifact: string | null;
|
|
700
|
+
status: ResidentWorkerRuntimeStatus;
|
|
701
|
+
leaseExpiresAt: string | null;
|
|
702
|
+
runtime: ResidentWorkerRuntimeRecord | null;
|
|
703
|
+
issues: ContractValidationIssue[];
|
|
704
|
+
message: string;
|
|
705
|
+
}
|
|
706
|
+
export interface ResidentWorkerRuntimeHeartbeatOptions {
|
|
707
|
+
runId: string;
|
|
708
|
+
runtimeId: string;
|
|
709
|
+
leaseSeconds?: number;
|
|
710
|
+
}
|
|
711
|
+
export interface ResidentWorkerRuntimeHeartbeatResult {
|
|
712
|
+
version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
|
|
713
|
+
runId: string;
|
|
714
|
+
runtimeId: string;
|
|
715
|
+
status: ResidentWorkerRuntimeStatus;
|
|
716
|
+
leaseExpiresAt: string | null;
|
|
717
|
+
runtime: ResidentWorkerRuntimeRecord | null;
|
|
718
|
+
issues: ContractValidationIssue[];
|
|
719
|
+
message: string;
|
|
720
|
+
}
|
|
721
|
+
export interface ResidentWorkerRuntimeInspection {
|
|
722
|
+
version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
|
|
723
|
+
runId: string;
|
|
724
|
+
runtimeId: string;
|
|
725
|
+
runtime: ResidentWorkerRuntimeRecord | null;
|
|
726
|
+
queueItem: DelegationQueueItem | null;
|
|
727
|
+
workerAdapter: WorkerAdapterContract | null;
|
|
728
|
+
status: ResidentWorkerRuntimeStatus;
|
|
729
|
+
leaseExpired: boolean;
|
|
730
|
+
valid: boolean;
|
|
731
|
+
issues: ContractValidationIssue[];
|
|
732
|
+
recommendedNextCommand: string;
|
|
733
|
+
}
|
|
734
|
+
export interface ResidentWorkerRuntimeList {
|
|
735
|
+
version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
|
|
736
|
+
runId: string;
|
|
737
|
+
runtimes: ResidentWorkerRuntimeRecord[];
|
|
738
|
+
activeRuntimes: number;
|
|
739
|
+
staleRuntimes: number;
|
|
740
|
+
terminalRuntimes: number;
|
|
741
|
+
blockedRuntimes: number;
|
|
742
|
+
valid: boolean;
|
|
743
|
+
issues: ContractValidationIssue[];
|
|
744
|
+
}
|
|
546
745
|
export type WaveExecutorStrategy = 'fast-stop' | 'safe-continue';
|
|
547
746
|
export type WaveExecutorStatus = 'claimed' | 'completed' | 'failed' | 'blocked';
|
|
548
747
|
export interface WaveExecutorRunOptions {
|
|
@@ -626,6 +825,420 @@ export interface GovernancePolicyDecision {
|
|
|
626
825
|
issues: ContractValidationIssue[];
|
|
627
826
|
policy: GovernancePolicy;
|
|
628
827
|
}
|
|
828
|
+
export type WorkflowGateId = 'spec' | 'plan' | 'tasks' | 'do' | 'verify' | 'doctor';
|
|
829
|
+
export interface WorkflowGateContract {
|
|
830
|
+
version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
|
|
831
|
+
id: WorkflowGateId;
|
|
832
|
+
command: string;
|
|
833
|
+
requiredInputs: string[];
|
|
834
|
+
allowedAgents: string[];
|
|
835
|
+
requiredArtifacts: string[];
|
|
836
|
+
gateConditions: string[];
|
|
837
|
+
gapClosureBehavior: string;
|
|
838
|
+
nextAction: string;
|
|
839
|
+
}
|
|
840
|
+
export interface WorkflowGateRegistry {
|
|
841
|
+
version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
|
|
842
|
+
workflows: WorkflowGateContract[];
|
|
843
|
+
}
|
|
844
|
+
export interface WorkflowGateValidation {
|
|
845
|
+
version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
|
|
846
|
+
valid: boolean;
|
|
847
|
+
workflows: WorkflowGateContract[];
|
|
848
|
+
issues: ContractValidationIssue[];
|
|
849
|
+
}
|
|
850
|
+
export type AgentAutonomyCeiling = 'read_only' | 'foreground_write' | 'validation_only' | 'review_only';
|
|
851
|
+
export interface AgentRegistryEntry {
|
|
852
|
+
version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
|
|
853
|
+
id: string;
|
|
854
|
+
role: string;
|
|
855
|
+
allowedStages: string[];
|
|
856
|
+
capabilities: string[];
|
|
857
|
+
readBoundary: string[];
|
|
858
|
+
writeBoundary: string[];
|
|
859
|
+
toolAllowlist: string[];
|
|
860
|
+
requiredArtifact: string;
|
|
861
|
+
verificationExpectation: string;
|
|
862
|
+
autonomyCeiling: AgentAutonomyCeiling;
|
|
863
|
+
stopCondition: string;
|
|
864
|
+
}
|
|
865
|
+
export interface AgentRegistry {
|
|
866
|
+
version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
|
|
867
|
+
agents: AgentRegistryEntry[];
|
|
868
|
+
}
|
|
869
|
+
export interface AgentRegistryValidation {
|
|
870
|
+
version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
|
|
871
|
+
valid: boolean;
|
|
872
|
+
agents: AgentRegistryEntry[];
|
|
873
|
+
issues: ContractValidationIssue[];
|
|
874
|
+
}
|
|
875
|
+
export type BuiltInAgentProfileId = 'planner' | 'architect' | 'implementer' | 'reviewer' | 'validator' | 'researcher' | 'orchestrator' | 'security' | 'domain_expert';
|
|
876
|
+
export type AgentProfileId = BuiltInAgentProfileId | string;
|
|
877
|
+
export type CapabilityReuseDecision = 'reuse_direct' | 'adapt_via_host_adapter' | 'borrow_mechanism' | 'avoid';
|
|
878
|
+
export type SkillCapabilityKind = 'skill' | 'mcp' | 'cli_tool' | 'host_tool' | 'project_agent' | 'external_pattern';
|
|
879
|
+
export type SkillCapabilitySource = 'project' | 'user_global' | 'claude_code' | 'mcp' | 'open_source' | 'host';
|
|
880
|
+
export type SkillCapabilityEvidenceType = 'none' | 'command_output' | 'test_result' | 'browser_snapshot' | 'artifact' | 'external_source' | 'execution_record';
|
|
881
|
+
export type CapabilitySourceKind = 'native_host' | 'mcp_tool' | 'open_source_material' | 'mechanism_reference' | 'future_adapter' | 'project_material';
|
|
882
|
+
export type ExternalPackImportStatus = 'approved' | 'quarantined' | 'denied';
|
|
883
|
+
export type ExternalPackCheckStatus = 'pass' | 'warn' | 'fail' | 'not_run';
|
|
884
|
+
export type ToolPermissionPolicy = 'allow' | 'ask' | 'deny';
|
|
885
|
+
export type AgentRouterCategory = 'planning' | 'implementation' | 'implementation_review' | 'validation' | 'security_research' | 'external_research' | 'blocked';
|
|
886
|
+
export type TeamModeDecisionStatus = 'disabled' | 'enabled' | 'blocked';
|
|
887
|
+
export type TeamModeActivation = 'auto' | 'force' | 'off';
|
|
888
|
+
export type TeamModeSelection = 'off' | 'inspect' | 'review-lite' | 'hyperplan' | 'security-research';
|
|
889
|
+
export type TeamModeCostClass = 'none' | 'low' | 'medium' | 'high';
|
|
890
|
+
export type TeamModeCostRoute = 'not_applicable' | 'downgraded' | 'no_downgrade' | 'blocked';
|
|
891
|
+
export type AgentExecutionRecordStatus = 'claimed' | 'completed' | 'failed' | 'blocked' | 'skipped';
|
|
892
|
+
export type TeamSessionRecordStatus = 'created' | 'completed' | 'blocked' | 'disabled';
|
|
893
|
+
export interface AgentProfileContract {
|
|
894
|
+
version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
895
|
+
id: AgentProfileId;
|
|
896
|
+
stageScope: string[];
|
|
897
|
+
riskCeiling: LifecycleAutonomyCeiling;
|
|
898
|
+
defaultAutonomy: LifecycleAutonomyCeiling;
|
|
899
|
+
requiredArtifacts: string[];
|
|
900
|
+
toolScope: string[];
|
|
901
|
+
modelPolicyId: string;
|
|
902
|
+
hostCapabilityRequirements: string[];
|
|
903
|
+
boundaries: string[];
|
|
904
|
+
}
|
|
905
|
+
export interface SkillCapabilityContract {
|
|
906
|
+
version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
907
|
+
id: string;
|
|
908
|
+
name: string;
|
|
909
|
+
kind: SkillCapabilityKind;
|
|
910
|
+
source: SkillCapabilitySource;
|
|
911
|
+
sourceRef: string;
|
|
912
|
+
capabilityDomain: string[];
|
|
913
|
+
allowedStages: string[];
|
|
914
|
+
requiredRiskCeiling: LifecycleAutonomyCeiling;
|
|
915
|
+
evidenceType: SkillCapabilityEvidenceType;
|
|
916
|
+
reuseDecision: CapabilityReuseDecision;
|
|
917
|
+
buildExceptionReason: string | null;
|
|
918
|
+
}
|
|
919
|
+
export interface CapabilitySourceCatalogEntry {
|
|
920
|
+
version: typeof CAPABILITY_SOURCE_CATALOG_VERSION;
|
|
921
|
+
id: string;
|
|
922
|
+
name: string;
|
|
923
|
+
kind: CapabilitySourceKind;
|
|
924
|
+
sourceRef: string;
|
|
925
|
+
reuseDecision: CapabilityReuseDecision;
|
|
926
|
+
quarantineRequired: boolean;
|
|
927
|
+
allowedUse: string;
|
|
928
|
+
attribution: string;
|
|
929
|
+
rationale: string;
|
|
930
|
+
}
|
|
931
|
+
export type RuntimeRegistryOrigin = 'built_in' | 'project_config' | 'external_manifest';
|
|
932
|
+
export interface RuntimeRegistryEntrySource {
|
|
933
|
+
id: string;
|
|
934
|
+
kind: 'profile' | 'skill_capability' | 'capability_source';
|
|
935
|
+
origin: RuntimeRegistryOrigin;
|
|
936
|
+
sourceId: string | null;
|
|
937
|
+
quarantineRequired: boolean;
|
|
938
|
+
}
|
|
939
|
+
export interface AgentRuntimeRoutingRuleWhen {
|
|
940
|
+
keywords: string[];
|
|
941
|
+
affectedFileGlobs: string[];
|
|
942
|
+
}
|
|
943
|
+
export interface AgentRuntimeRoutingRule {
|
|
944
|
+
id: string;
|
|
945
|
+
when: AgentRuntimeRoutingRuleWhen;
|
|
946
|
+
preferProfile: AgentProfileId;
|
|
947
|
+
requireCapabilities: string[];
|
|
948
|
+
category: AgentRouterCategory | null;
|
|
949
|
+
}
|
|
950
|
+
export interface AgentRuntimeAdapterMapping {
|
|
951
|
+
profile: AgentProfileId;
|
|
952
|
+
hostAdapter: string;
|
|
953
|
+
projection: string;
|
|
954
|
+
permissionPolicy: string;
|
|
955
|
+
}
|
|
956
|
+
export interface AgentRuntimeAliasResolution {
|
|
957
|
+
input: string;
|
|
958
|
+
resolved: AgentProfileId;
|
|
959
|
+
source: 'built_in' | 'project_config';
|
|
960
|
+
}
|
|
961
|
+
export interface ProjectAgentRuntimeConfig {
|
|
962
|
+
profiles: AgentProfileContract[];
|
|
963
|
+
skillCapabilities: SkillCapabilityContract[];
|
|
964
|
+
capabilitySources: CapabilitySourceCatalogEntry[];
|
|
965
|
+
aliases: Record<string, string>;
|
|
966
|
+
routingRules: AgentRuntimeRoutingRule[];
|
|
967
|
+
adapterMappings: AgentRuntimeAdapterMapping[];
|
|
968
|
+
}
|
|
969
|
+
export interface ExternalAgentPackImportCheck {
|
|
970
|
+
check: string;
|
|
971
|
+
status: ExternalPackCheckStatus;
|
|
972
|
+
evidence: string;
|
|
973
|
+
}
|
|
974
|
+
export interface ExternalAgentPackImportInspection {
|
|
975
|
+
version: typeof EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION;
|
|
976
|
+
sourceId: string;
|
|
977
|
+
status: ExternalPackImportStatus;
|
|
978
|
+
checks: ExternalAgentPackImportCheck[];
|
|
979
|
+
mappingResult: string;
|
|
980
|
+
allowedProfiles: AgentProfileId[];
|
|
981
|
+
riskCeiling: LifecycleAutonomyCeiling;
|
|
982
|
+
reason: string;
|
|
983
|
+
}
|
|
984
|
+
export interface ModelPolicyContract {
|
|
985
|
+
id: string;
|
|
986
|
+
category: string;
|
|
987
|
+
fallbackPolicy: string;
|
|
988
|
+
hostProjection: string;
|
|
989
|
+
}
|
|
990
|
+
export interface ToolPermissionSpec {
|
|
991
|
+
version: typeof TOOL_PERMISSION_SPEC_VERSION;
|
|
992
|
+
profile: AgentProfileId;
|
|
993
|
+
risk: string[];
|
|
994
|
+
toolGroups: string[];
|
|
995
|
+
fileScope: string[];
|
|
996
|
+
policy: ToolPermissionPolicy;
|
|
997
|
+
approvalPolicy: string;
|
|
998
|
+
runtimeValidationRequired: boolean;
|
|
999
|
+
deniedTools: string[];
|
|
1000
|
+
hostPermissionProjection: string;
|
|
1001
|
+
}
|
|
1002
|
+
export interface HostAdapterContract {
|
|
1003
|
+
version: typeof HOST_ADAPTER_CONTRACT_VERSION;
|
|
1004
|
+
id: string;
|
|
1005
|
+
host: string;
|
|
1006
|
+
responsibilities: string[];
|
|
1007
|
+
forbiddenAuthority: string[];
|
|
1008
|
+
projections: string[];
|
|
1009
|
+
}
|
|
1010
|
+
export interface DelegationWavePolicy {
|
|
1011
|
+
id: string;
|
|
1012
|
+
waveKind: 'hyperplan' | 'security_research' | 'implementation_review' | 'validation';
|
|
1013
|
+
memberProfiles: AgentProfileId[];
|
|
1014
|
+
requiredArtifacts: string[];
|
|
1015
|
+
fileOwnershipRequired: boolean;
|
|
1016
|
+
mergeGate: string;
|
|
1017
|
+
}
|
|
1018
|
+
export interface TeamModePolicy {
|
|
1019
|
+
version: typeof TEAM_MODE_POLICY_VERSION;
|
|
1020
|
+
enabled: boolean;
|
|
1021
|
+
decision: TeamModeDecisionStatus;
|
|
1022
|
+
mode: TeamModeSelection;
|
|
1023
|
+
activation: TeamModeActivation;
|
|
1024
|
+
costClass: TeamModeCostClass;
|
|
1025
|
+
reason: string;
|
|
1026
|
+
costRoute: TeamModeCostRoute;
|
|
1027
|
+
downgradeReason: string | null;
|
|
1028
|
+
trustPolicyEnforced: boolean;
|
|
1029
|
+
chiefProfile: AgentProfileId;
|
|
1030
|
+
memberProfiles: AgentProfileId[];
|
|
1031
|
+
allowedWaves: DelegationWavePolicy[];
|
|
1032
|
+
maxMembers: number;
|
|
1033
|
+
requireArtifacts: boolean;
|
|
1034
|
+
blockedReason: string | null;
|
|
1035
|
+
waveRecommendation: string[];
|
|
1036
|
+
}
|
|
1037
|
+
export interface EvidenceIngestionContract {
|
|
1038
|
+
version: typeof EVIDENCE_INGESTION_CONTRACT_VERSION;
|
|
1039
|
+
sourceOutputs: string[];
|
|
1040
|
+
evidenceTargets: string[];
|
|
1041
|
+
canonicalTruth: string;
|
|
1042
|
+
forbiddenTruthSources: string[];
|
|
1043
|
+
}
|
|
1044
|
+
export interface AgentExecutionRecord {
|
|
1045
|
+
version: typeof AGENT_EXECUTION_RECORD_CONTRACT_VERSION;
|
|
1046
|
+
executionId: string;
|
|
1047
|
+
runId: string;
|
|
1048
|
+
taskId: string;
|
|
1049
|
+
profile: AgentProfileId;
|
|
1050
|
+
category: AgentRouterCategory;
|
|
1051
|
+
host: string;
|
|
1052
|
+
hostSessionId: string | null;
|
|
1053
|
+
hostTaskId: string | null;
|
|
1054
|
+
modelPolicy: ModelPolicyContract;
|
|
1055
|
+
toolPermission: ToolPermissionSpec | null;
|
|
1056
|
+
capabilitiesUsed: string[];
|
|
1057
|
+
sourceAttribution: string[];
|
|
1058
|
+
artifacts: string[];
|
|
1059
|
+
status: AgentExecutionRecordStatus;
|
|
1060
|
+
delegationId: string | null;
|
|
1061
|
+
queueItemId: string | null;
|
|
1062
|
+
ingestionStatus: ArtifactResultIngestionStatus | null;
|
|
1063
|
+
resultStatus: SddResultStatus | null;
|
|
1064
|
+
routeId: string;
|
|
1065
|
+
routeDecision: Pick<AgentRouterDecision, 'version' | 'category' | 'recommendedProfile' | 'autonomyCeiling' | 'requiredCapabilities' | 'blockedReason'>;
|
|
1066
|
+
evidenceSummary: string;
|
|
1067
|
+
createdAt: string;
|
|
1068
|
+
updatedAt: string;
|
|
1069
|
+
}
|
|
1070
|
+
export interface TeamMessageRecord {
|
|
1071
|
+
sender: AgentProfileId | 'runtime';
|
|
1072
|
+
receiver: AgentProfileId | 'team' | 'runtime';
|
|
1073
|
+
taskRef: string | null;
|
|
1074
|
+
artifactRefs: string[];
|
|
1075
|
+
blocker: string | null;
|
|
1076
|
+
evidenceSummary: string;
|
|
1077
|
+
createdAt: string;
|
|
1078
|
+
}
|
|
1079
|
+
export interface TeamSessionRecord {
|
|
1080
|
+
version: typeof TEAM_SESSION_RECORD_CONTRACT_VERSION;
|
|
1081
|
+
teamId: string;
|
|
1082
|
+
runId: string;
|
|
1083
|
+
taskId: string | null;
|
|
1084
|
+
status: TeamSessionRecordStatus;
|
|
1085
|
+
chiefProfile: AgentProfileId;
|
|
1086
|
+
memberProfiles: AgentProfileId[];
|
|
1087
|
+
hostLayout: string | null;
|
|
1088
|
+
teamMode: TeamModePolicy;
|
|
1089
|
+
waves: DelegationWavePolicy[];
|
|
1090
|
+
messages: TeamMessageRecord[];
|
|
1091
|
+
artifacts: string[];
|
|
1092
|
+
evidenceSummary: string;
|
|
1093
|
+
createdAt: string;
|
|
1094
|
+
updatedAt: string;
|
|
1095
|
+
}
|
|
1096
|
+
export interface AgentRouterRejectedProfile {
|
|
1097
|
+
profile: AgentProfileId;
|
|
1098
|
+
reason: string;
|
|
1099
|
+
}
|
|
1100
|
+
export interface AgentRouterDecision {
|
|
1101
|
+
version: typeof AGENT_ROUTER_CONTRACT_VERSION;
|
|
1102
|
+
taskId: string;
|
|
1103
|
+
branch: string;
|
|
1104
|
+
category: AgentRouterCategory;
|
|
1105
|
+
recommendedProfile: AgentProfileId | null;
|
|
1106
|
+
allowedProfiles: AgentProfileId[];
|
|
1107
|
+
rejectedProfiles: AgentRouterRejectedProfile[];
|
|
1108
|
+
requiredCapabilities: string[];
|
|
1109
|
+
sourceCapability: string | null;
|
|
1110
|
+
reuseDecision: CapabilityReuseDecision | null;
|
|
1111
|
+
toolPermission: ToolPermissionSpec | null;
|
|
1112
|
+
modelPolicy: ModelPolicyContract;
|
|
1113
|
+
teamMode: TeamModePolicy;
|
|
1114
|
+
autonomyCeiling: LifecycleAutonomyCeiling;
|
|
1115
|
+
requiredArtifacts: string[];
|
|
1116
|
+
blockedReason: string | null;
|
|
1117
|
+
nextAction: string;
|
|
1118
|
+
registrySources?: RuntimeRegistryEntrySource[];
|
|
1119
|
+
resolvedAliases?: AgentRuntimeAliasResolution[];
|
|
1120
|
+
routingRuleHits?: string[];
|
|
1121
|
+
quarantineWarnings?: string[];
|
|
1122
|
+
adapterMapping?: AgentRuntimeAdapterMapping | null;
|
|
1123
|
+
cache?: RouteCacheMetadata;
|
|
1124
|
+
profile?: RuntimeProfileSpan[];
|
|
1125
|
+
}
|
|
1126
|
+
export interface RouteCacheMetadata {
|
|
1127
|
+
contract: typeof ROUTE_CACHE_CONTRACT_VERSION;
|
|
1128
|
+
key: string;
|
|
1129
|
+
status: 'hit' | 'miss' | 'stored';
|
|
1130
|
+
source: 'content_addressed_derived_route';
|
|
1131
|
+
authoritative: false;
|
|
1132
|
+
}
|
|
1133
|
+
export interface RuntimeProfileSpan {
|
|
1134
|
+
contract: typeof RUNTIME_PROFILE_CONTRACT_VERSION;
|
|
1135
|
+
name: string;
|
|
1136
|
+
startedAt: string;
|
|
1137
|
+
endedAt: string;
|
|
1138
|
+
durationMs: number;
|
|
1139
|
+
}
|
|
1140
|
+
export interface AgentSkillTeamRuntimeInspection {
|
|
1141
|
+
version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
1142
|
+
profiles: AgentProfileContract[];
|
|
1143
|
+
skillCapabilities: SkillCapabilityContract[];
|
|
1144
|
+
capabilitySources: CapabilitySourceCatalogEntry[];
|
|
1145
|
+
hostAdapter: HostAdapterContract;
|
|
1146
|
+
evidenceIngestion: EvidenceIngestionContract;
|
|
1147
|
+
teamMode: TeamModePolicy;
|
|
1148
|
+
reusePolicy: string;
|
|
1149
|
+
registrySources?: RuntimeRegistryEntrySource[];
|
|
1150
|
+
aliases?: Record<string, string>;
|
|
1151
|
+
routingRules?: AgentRuntimeRoutingRule[];
|
|
1152
|
+
adapterMappings?: AgentRuntimeAdapterMapping[];
|
|
1153
|
+
}
|
|
1154
|
+
export interface SkillCapabilityRegistry {
|
|
1155
|
+
version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
1156
|
+
capabilities: SkillCapabilityContract[];
|
|
1157
|
+
registrySources?: RuntimeRegistryEntrySource[];
|
|
1158
|
+
}
|
|
1159
|
+
export interface CapabilitySourceCatalog {
|
|
1160
|
+
version: typeof CAPABILITY_SOURCE_CATALOG_VERSION;
|
|
1161
|
+
sources: CapabilitySourceCatalogEntry[];
|
|
1162
|
+
registrySources?: RuntimeRegistryEntrySource[];
|
|
1163
|
+
}
|
|
1164
|
+
export interface AgentSkillTeamRuntimeValidation {
|
|
1165
|
+
version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
1166
|
+
valid: boolean;
|
|
1167
|
+
inspection: AgentSkillTeamRuntimeInspection;
|
|
1168
|
+
issues: ContractValidationIssue[];
|
|
1169
|
+
}
|
|
1170
|
+
export type QuerySurfaceId = 'status' | 'doctor' | 'run_inspect' | 'debug';
|
|
1171
|
+
export interface QueryStatusSurface {
|
|
1172
|
+
id: QuerySurfaceId;
|
|
1173
|
+
command: string;
|
|
1174
|
+
responsibility: string;
|
|
1175
|
+
includes: string[];
|
|
1176
|
+
excludes: string[];
|
|
1177
|
+
nextActionRule: string;
|
|
1178
|
+
}
|
|
1179
|
+
export interface QueryStatusContract {
|
|
1180
|
+
version: typeof QUERY_STATUS_CONTRACT_VERSION;
|
|
1181
|
+
sourceDocument: string;
|
|
1182
|
+
surfaces: QueryStatusSurface[];
|
|
1183
|
+
}
|
|
1184
|
+
export interface QueryStatusValidation {
|
|
1185
|
+
version: typeof QUERY_STATUS_CONTRACT_VERSION;
|
|
1186
|
+
valid: boolean;
|
|
1187
|
+
surfaces: QueryStatusSurface[];
|
|
1188
|
+
issues: ContractValidationIssue[];
|
|
1189
|
+
}
|
|
1190
|
+
export type SkillAgentEvalDimensionId = 'novel_judgment' | 'risk_identification' | 'task_slicing' | 'agent_evidence' | 'output_concision' | 'verification_executability' | 'autonomy_correctness' | 'agent_fit' | 'verification_availability' | 'gap_closure';
|
|
1191
|
+
export interface SkillAgentEvalDimension {
|
|
1192
|
+
id: SkillAgentEvalDimensionId;
|
|
1193
|
+
expectation: string;
|
|
1194
|
+
baselineFinding: string;
|
|
1195
|
+
passThreshold: number;
|
|
1196
|
+
}
|
|
1197
|
+
export interface SkillAgentEvalContract {
|
|
1198
|
+
version: typeof SKILL_AGENT_EVAL_CONTRACT_VERSION;
|
|
1199
|
+
corpus: string[];
|
|
1200
|
+
sourceReport: string;
|
|
1201
|
+
dimensions: SkillAgentEvalDimension[];
|
|
1202
|
+
regressionAssertions: string[];
|
|
1203
|
+
}
|
|
1204
|
+
export interface SkillAgentEvalValidation {
|
|
1205
|
+
version: typeof SKILL_AGENT_EVAL_CONTRACT_VERSION;
|
|
1206
|
+
valid: boolean;
|
|
1207
|
+
contract: SkillAgentEvalContract;
|
|
1208
|
+
issues: ContractValidationIssue[];
|
|
1209
|
+
}
|
|
1210
|
+
export type HarnessLearningSinkId = 'project_context_pack' | 'risk_vocabulary' | 'checklist' | 'doctor_check' | 'eval_assertion' | 'generated_entry_guidance';
|
|
1211
|
+
export interface HarnessLearningSink {
|
|
1212
|
+
id: HarnessLearningSinkId;
|
|
1213
|
+
output: string;
|
|
1214
|
+
boundary: string;
|
|
1215
|
+
}
|
|
1216
|
+
export interface HarnessLearningContract {
|
|
1217
|
+
version: typeof HARNESS_LEARNING_CONTRACT_VERSION;
|
|
1218
|
+
sourceTrial: string;
|
|
1219
|
+
allowedSinks: HarnessLearningSink[];
|
|
1220
|
+
forbiddenOutputs: string[];
|
|
1221
|
+
promotionRule: string;
|
|
1222
|
+
}
|
|
1223
|
+
export interface HarnessLearningValidation {
|
|
1224
|
+
version: typeof HARNESS_LEARNING_CONTRACT_VERSION;
|
|
1225
|
+
valid: boolean;
|
|
1226
|
+
contract: HarnessLearningContract;
|
|
1227
|
+
issues: ContractValidationIssue[];
|
|
1228
|
+
}
|
|
1229
|
+
export interface ProjectContextPackContract {
|
|
1230
|
+
version: typeof PROJECT_CONTEXT_PACK_CONTRACT_VERSION;
|
|
1231
|
+
entryPoint: string;
|
|
1232
|
+
durableContext: string[];
|
|
1233
|
+
runtimeSourcesOfTruth: string[];
|
|
1234
|
+
boundaries: string[];
|
|
1235
|
+
}
|
|
1236
|
+
export interface ProjectContextPackValidation {
|
|
1237
|
+
version: typeof PROJECT_CONTEXT_PACK_CONTRACT_VERSION;
|
|
1238
|
+
valid: boolean;
|
|
1239
|
+
contract: ProjectContextPackContract;
|
|
1240
|
+
issues: ContractValidationIssue[];
|
|
1241
|
+
}
|
|
629
1242
|
export interface SddResult {
|
|
630
1243
|
contract: typeof SDD_RESULT_CONTRACT;
|
|
631
1244
|
version: typeof SDD_RESULT_VERSION;
|
|
@@ -644,9 +1257,179 @@ export interface SddResultValidationReport {
|
|
|
644
1257
|
valid: boolean;
|
|
645
1258
|
result: SddResult | null;
|
|
646
1259
|
issues: ContractValidationIssue[];
|
|
1260
|
+
trust?: ArtifactTrustValidationReport;
|
|
1261
|
+
}
|
|
1262
|
+
export interface EvidenceItem {
|
|
1263
|
+
kind: string;
|
|
1264
|
+
ref: string;
|
|
1265
|
+
summary: string | null;
|
|
1266
|
+
}
|
|
1267
|
+
export interface EvidenceClaim {
|
|
1268
|
+
contract: typeof SDD_EVIDENCE_CONTRACT;
|
|
1269
|
+
version: typeof SDD_EVIDENCE_VERSION;
|
|
1270
|
+
task: string;
|
|
1271
|
+
acceptance: string;
|
|
1272
|
+
status: EvidenceCoverageStatus;
|
|
1273
|
+
claim: string;
|
|
1274
|
+
sourceArtifact: string;
|
|
1275
|
+
evidence: EvidenceItem[];
|
|
1276
|
+
provenance: string[];
|
|
1277
|
+
policy: string[];
|
|
1278
|
+
rawMetadata: Record<string, string | string[]>;
|
|
1279
|
+
}
|
|
1280
|
+
export interface EvidenceReasoning {
|
|
1281
|
+
summary: string;
|
|
1282
|
+
ruleIds: string[];
|
|
1283
|
+
issueCodes: EvidenceQualityIssue[];
|
|
1284
|
+
}
|
|
1285
|
+
export interface PolicyRuleSet {
|
|
1286
|
+
id: typeof ACCEPTANCE_POLICY_RULESET_VERSION;
|
|
1287
|
+
version: string;
|
|
1288
|
+
ruleIds: string[];
|
|
1289
|
+
}
|
|
1290
|
+
export interface PolicyDecision {
|
|
1291
|
+
status: EvidenceCoverageStatus;
|
|
1292
|
+
ruleSet: PolicyRuleSet;
|
|
1293
|
+
passedRules: string[];
|
|
1294
|
+
failedRules: string[];
|
|
1295
|
+
issueCodes: EvidenceQualityIssue[];
|
|
1296
|
+
}
|
|
1297
|
+
export interface EvidenceCoverage {
|
|
1298
|
+
acceptanceId: string;
|
|
1299
|
+
status: EvidenceCoverageStatus;
|
|
1300
|
+
claim?: EvidenceClaim;
|
|
1301
|
+
evidence: EvidenceItem[];
|
|
1302
|
+
reasoning?: EvidenceReasoning;
|
|
1303
|
+
policyDecision: PolicyDecision;
|
|
1304
|
+
}
|
|
1305
|
+
export interface ProvenanceEntity {
|
|
1306
|
+
id: string;
|
|
1307
|
+
kind: 'spec' | 'plan' | 'tasks' | 'artifact' | 'command_output' | 'run_state' | 'material' | string;
|
|
1308
|
+
hash?: string;
|
|
1309
|
+
path?: string;
|
|
1310
|
+
}
|
|
1311
|
+
export interface ProvenanceActivity {
|
|
1312
|
+
id: string;
|
|
1313
|
+
kind: 'inspect' | 'route' | 'do' | 'verify' | 'artifact_validate' | 'sync_back' | 'policy_evaluate' | 'cache' | string;
|
|
1314
|
+
startedAt?: string;
|
|
1315
|
+
endedAt?: string;
|
|
1316
|
+
}
|
|
1317
|
+
export interface ProvenanceAgent {
|
|
1318
|
+
id: string;
|
|
1319
|
+
kind: 'runtime' | 'implementer' | 'reviewer' | 'validator' | 'tool' | string;
|
|
1320
|
+
}
|
|
1321
|
+
export interface ProvenanceLink {
|
|
1322
|
+
relation: 'used' | 'wasGeneratedBy' | 'wasAssociatedWith' | 'wasDerivedFrom' | string;
|
|
1323
|
+
from: string;
|
|
1324
|
+
to: string;
|
|
1325
|
+
}
|
|
1326
|
+
export interface SddEvidenceAttestation {
|
|
1327
|
+
subject: string;
|
|
1328
|
+
materials: ProvenanceEntity[];
|
|
1329
|
+
invocation: ProvenanceActivity;
|
|
1330
|
+
builder: ProvenanceAgent;
|
|
1331
|
+
}
|
|
1332
|
+
export interface ArtifactTrustValidationReport {
|
|
1333
|
+
valid: boolean;
|
|
1334
|
+
claims: EvidenceClaim[];
|
|
1335
|
+
issues: ContractValidationIssue[];
|
|
1336
|
+
}
|
|
1337
|
+
export type InvocationLedgerKind = 'command' | 'tool_invocation' | 'agent' | 'skill' | 'material' | 'policy_evaluation' | 'cache' | 'artifact_hash';
|
|
1338
|
+
export interface InvocationLedgerEntry {
|
|
1339
|
+
contract: 'sdd-invocation-ledger-v1';
|
|
1340
|
+
version: typeof INVOCATION_LEDGER_CONTRACT_VERSION;
|
|
1341
|
+
entryId: string;
|
|
1342
|
+
runId: string;
|
|
1343
|
+
taskId: string | null;
|
|
1344
|
+
branch: string | null;
|
|
1345
|
+
kind: InvocationLedgerKind;
|
|
1346
|
+
ref: string;
|
|
1347
|
+
status: string;
|
|
1348
|
+
timestamp: string;
|
|
1349
|
+
artifactPath?: string | null;
|
|
1350
|
+
inputHash?: string | null;
|
|
1351
|
+
outputHash?: string | null;
|
|
1352
|
+
materialRefs: string[];
|
|
1353
|
+
metadata: Record<string, string | number | boolean | null>;
|
|
1354
|
+
}
|
|
1355
|
+
export interface ContextBudget {
|
|
1356
|
+
contract: typeof CONTEXT_BUDGET_CONTRACT_VERSION;
|
|
1357
|
+
profile: ContextProfile;
|
|
1358
|
+
maxBytes: number;
|
|
1359
|
+
preserve: string[];
|
|
1360
|
+
}
|
|
1361
|
+
export interface ContextSourceRef {
|
|
1362
|
+
path: string;
|
|
1363
|
+
hash: string;
|
|
1364
|
+
kind: ContextSourceKind;
|
|
1365
|
+
}
|
|
1366
|
+
export interface CommandOutputSummary {
|
|
1367
|
+
contract: typeof COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION;
|
|
1368
|
+
authoritative: false;
|
|
1369
|
+
usableForPass: false;
|
|
1370
|
+
source: ContextSourceRef;
|
|
1371
|
+
status: ContextSummaryStatus;
|
|
1372
|
+
highlights: string[];
|
|
1373
|
+
omittedLines: number;
|
|
1374
|
+
}
|
|
1375
|
+
export interface EvidenceSummaryProjection {
|
|
1376
|
+
contract: typeof EVIDENCE_SUMMARY_CONTRACT_VERSION;
|
|
1377
|
+
authoritative: false;
|
|
1378
|
+
usableForPass: false;
|
|
1379
|
+
runId: string;
|
|
1380
|
+
taskId: string | null;
|
|
1381
|
+
sources: ContextSourceRef[];
|
|
1382
|
+
passCount: number;
|
|
1383
|
+
blockedCount: number;
|
|
1384
|
+
failCount: number;
|
|
1385
|
+
issueCodes: EvidenceQualityIssue[];
|
|
1386
|
+
policyRefs: string[];
|
|
1387
|
+
highlights: string[];
|
|
1388
|
+
}
|
|
1389
|
+
export interface ContextBuildPackage {
|
|
1390
|
+
contract: typeof CONTEXT_PACKAGE_CONTRACT_VERSION;
|
|
1391
|
+
profile: ContextProfile;
|
|
1392
|
+
mode: ContextBuildMode;
|
|
1393
|
+
agent: string | null;
|
|
1394
|
+
authoritative: false;
|
|
1395
|
+
usableForPass: false;
|
|
1396
|
+
taskId: string;
|
|
1397
|
+
branch: string;
|
|
1398
|
+
mustRead: ContextSourceRef[];
|
|
1399
|
+
optionalRead: ContextSourceRef[];
|
|
1400
|
+
doNotReadUnlessNeeded: ContextSourceRef[];
|
|
1401
|
+
nextCommands: string[];
|
|
1402
|
+
warnings: string[];
|
|
1403
|
+
}
|
|
1404
|
+
export interface LogWorkerSummary {
|
|
1405
|
+
contract: typeof LOG_WORKER_SUMMARY_CONTRACT_VERSION;
|
|
1406
|
+
authoritative: false;
|
|
1407
|
+
usableForPass: false;
|
|
1408
|
+
runId: string;
|
|
1409
|
+
taskId: string | null;
|
|
1410
|
+
workerId: string;
|
|
1411
|
+
sources: ContextSourceRef[];
|
|
1412
|
+
highlights: string[];
|
|
1413
|
+
forbiddenAuthority: string[];
|
|
1414
|
+
}
|
|
1415
|
+
export interface EvidenceSummaryOptions {
|
|
1416
|
+
runId: string;
|
|
1417
|
+
taskId?: string;
|
|
1418
|
+
}
|
|
1419
|
+
export interface ContextBuildOptions {
|
|
1420
|
+
taskId: string;
|
|
1421
|
+
branch?: string;
|
|
1422
|
+
mode: ContextBuildMode;
|
|
1423
|
+
agent?: string;
|
|
1424
|
+
profile?: ContextProfile;
|
|
1425
|
+
}
|
|
1426
|
+
export interface LogWorkerSummaryValidation {
|
|
1427
|
+
valid: boolean;
|
|
1428
|
+
issues: ContractValidationIssue[];
|
|
647
1429
|
}
|
|
648
1430
|
export interface SddResultArtifactTemplateOptions {
|
|
649
1431
|
branch?: string;
|
|
1432
|
+
runId?: string;
|
|
650
1433
|
taskId: string;
|
|
651
1434
|
agent: string;
|
|
652
1435
|
artifactPath: string;
|
|
@@ -685,6 +1468,8 @@ export interface SingleTaskLoopOptions {
|
|
|
685
1468
|
reviewArtifact?: string;
|
|
686
1469
|
validationArtifact?: string;
|
|
687
1470
|
debugArtifact?: string;
|
|
1471
|
+
teamModeEnabled?: boolean;
|
|
1472
|
+
teamModeActivation?: TeamModeActivation;
|
|
688
1473
|
}
|
|
689
1474
|
export interface SingleTaskLoopResult {
|
|
690
1475
|
runId: string;
|
|
@@ -695,19 +1480,22 @@ export interface SingleTaskLoopResult {
|
|
|
695
1480
|
requiredArtifacts: string[];
|
|
696
1481
|
acceptedArtifacts: string[];
|
|
697
1482
|
syncBackProposalPath: string;
|
|
1483
|
+
routeDecision: AgentRouterDecision;
|
|
698
1484
|
message: string;
|
|
699
1485
|
}
|
|
700
1486
|
export interface GoalVerifyOptions {
|
|
701
1487
|
branch?: string;
|
|
702
1488
|
taskId: string;
|
|
703
|
-
runId
|
|
1489
|
+
runId?: string;
|
|
704
1490
|
reviewArtifact?: string;
|
|
705
1491
|
validationArtifact?: string;
|
|
706
1492
|
}
|
|
707
1493
|
export interface AcceptanceCoverageItem {
|
|
708
1494
|
acceptance: string;
|
|
709
|
-
status:
|
|
1495
|
+
status: EvidenceCoverageStatus;
|
|
710
1496
|
evidence: string;
|
|
1497
|
+
policyDecision?: PolicyDecision;
|
|
1498
|
+
issueCodes?: EvidenceQualityIssue[];
|
|
711
1499
|
}
|
|
712
1500
|
export interface GoalVerifyResult {
|
|
713
1501
|
runId: string;
|
|
@@ -721,6 +1509,7 @@ export interface GoalVerifyResult {
|
|
|
721
1509
|
acceptanceCoverage: AcceptanceCoverageItem[];
|
|
722
1510
|
gaps: SddTaskGap[];
|
|
723
1511
|
commands: string[];
|
|
1512
|
+
standardStatus: HarnessVerifyStatus;
|
|
724
1513
|
message: string;
|
|
725
1514
|
}
|
|
726
1515
|
export interface RunSummary {
|
|
@@ -728,6 +1517,11 @@ export interface RunSummary {
|
|
|
728
1517
|
status: RunStatus;
|
|
729
1518
|
phase: string | null;
|
|
730
1519
|
currentTask: string | null;
|
|
1520
|
+
partition: string | null;
|
|
1521
|
+
gitBranch: string | null;
|
|
1522
|
+
taskId: string | null;
|
|
1523
|
+
affectedFiles: string[];
|
|
1524
|
+
documentSnapshot: RunDocumentSnapshot;
|
|
731
1525
|
createdAt: string;
|
|
732
1526
|
updatedAt: string;
|
|
733
1527
|
validationStatus: RunState['validation']['status'];
|
|
@@ -737,6 +1531,9 @@ export interface RunSummary {
|
|
|
737
1531
|
}
|
|
738
1532
|
export interface LocalRunIndexTaskEntry {
|
|
739
1533
|
taskId: string;
|
|
1534
|
+
partition: string | null;
|
|
1535
|
+
gitBranch: string | null;
|
|
1536
|
+
affectedFiles: string[];
|
|
740
1537
|
status: string | null;
|
|
741
1538
|
runId: string;
|
|
742
1539
|
runStatus: RunStatus;
|
|
@@ -755,9 +1552,31 @@ export interface LocalRunIndexWaveSummary {
|
|
|
755
1552
|
eventCount: number;
|
|
756
1553
|
lastEvent: string | null;
|
|
757
1554
|
}
|
|
1555
|
+
export interface LocalRunIndexPartitionTaskEntry {
|
|
1556
|
+
partition: string;
|
|
1557
|
+
gitBranch: string | null;
|
|
1558
|
+
taskId: string;
|
|
1559
|
+
runId: string;
|
|
1560
|
+
runStatus: RunStatus;
|
|
1561
|
+
validationStatus: RunState['validation']['status'];
|
|
1562
|
+
syncBackStatus: RunState['syncBack']['status'];
|
|
1563
|
+
affectedFiles: string[];
|
|
1564
|
+
updatedAt: string;
|
|
1565
|
+
}
|
|
1566
|
+
export interface LocalRunIndexAffectedFileEntry {
|
|
1567
|
+
file: string;
|
|
1568
|
+
partition: string;
|
|
1569
|
+
gitBranch: string | null;
|
|
1570
|
+
taskId: string;
|
|
1571
|
+
runId: string;
|
|
1572
|
+
runStatus: RunStatus;
|
|
1573
|
+
syncBackStatus: RunState['syncBack']['status'];
|
|
1574
|
+
updatedAt: string;
|
|
1575
|
+
}
|
|
758
1576
|
export interface LocalRunIndexQuery {
|
|
759
1577
|
runId?: string;
|
|
760
1578
|
taskId?: string;
|
|
1579
|
+
partition?: string;
|
|
761
1580
|
status?: RunStatus;
|
|
762
1581
|
artifact?: string;
|
|
763
1582
|
}
|
|
@@ -769,6 +1588,8 @@ export interface LocalRunIndex {
|
|
|
769
1588
|
delegations: DelegationQueueItem[];
|
|
770
1589
|
artifacts: LocalRunIndexArtifactEntry[];
|
|
771
1590
|
waves: LocalRunIndexWaveSummary[];
|
|
1591
|
+
latestByPartitionTask: LocalRunIndexPartitionTaskEntry[];
|
|
1592
|
+
activeByAffectedFile: LocalRunIndexAffectedFileEntry[];
|
|
772
1593
|
}
|
|
773
1594
|
export interface LocalRunIndexInspection {
|
|
774
1595
|
valid: boolean;
|
|
@@ -777,6 +1598,32 @@ export interface LocalRunIndexInspection {
|
|
|
777
1598
|
index: LocalRunIndex | null;
|
|
778
1599
|
issues: ContractValidationIssue[];
|
|
779
1600
|
}
|
|
1601
|
+
export interface TaskRunEvidenceContract {
|
|
1602
|
+
version: typeof TASK_RUN_EVIDENCE_CONTRACT_VERSION;
|
|
1603
|
+
runId: string;
|
|
1604
|
+
state: {
|
|
1605
|
+
status: RunStatus;
|
|
1606
|
+
phase: string | null;
|
|
1607
|
+
currentTask: string | null;
|
|
1608
|
+
};
|
|
1609
|
+
events: Array<{
|
|
1610
|
+
event: string;
|
|
1611
|
+
summary: string | null;
|
|
1612
|
+
task: string | null;
|
|
1613
|
+
agent: string | null;
|
|
1614
|
+
gate: string | null;
|
|
1615
|
+
validation: string | null;
|
|
1616
|
+
gap: string | null;
|
|
1617
|
+
}>;
|
|
1618
|
+
artifacts: ArtifactIndexEntry[];
|
|
1619
|
+
validation: RunState['validation'];
|
|
1620
|
+
gaps: SddTaskGap[];
|
|
1621
|
+
syncBackProposal: string | null;
|
|
1622
|
+
invocationLedger: InvocationLedgerEntry[];
|
|
1623
|
+
agentExecutions: AgentExecutionRecord[];
|
|
1624
|
+
teamSessions: TeamSessionRecord[];
|
|
1625
|
+
workerRuntimes: ResidentWorkerRuntimeRecord[];
|
|
1626
|
+
}
|
|
780
1627
|
export interface RunInspection {
|
|
781
1628
|
summary: RunSummary;
|
|
782
1629
|
state: RunState;
|
|
@@ -789,9 +1636,38 @@ export interface RunInspection {
|
|
|
789
1636
|
validation: RunState['validation'];
|
|
790
1637
|
syncBack: RunState['syncBack'];
|
|
791
1638
|
tasks: Record<string, unknown>;
|
|
1639
|
+
taskRunEvidence: TaskRunEvidenceContract;
|
|
1640
|
+
agentExecutions: AgentExecutionRecord[];
|
|
1641
|
+
invocationLedger: InvocationLedgerEntry[];
|
|
1642
|
+
teamSessions: TeamSessionRecord[];
|
|
1643
|
+
workerRuntimes: ResidentWorkerRuntimeRecord[];
|
|
1644
|
+
}
|
|
1645
|
+
export interface RunEvidenceSummary {
|
|
1646
|
+
agentExecutions: number;
|
|
1647
|
+
teamSessions: number;
|
|
1648
|
+
artifactIngestions: number;
|
|
1649
|
+
workerRuntimes: number;
|
|
1650
|
+
staleWorkerRuntimes: number;
|
|
1651
|
+
routePreflight: boolean;
|
|
1652
|
+
tasksChangedAfterRun: boolean;
|
|
1653
|
+
tasksUpdatedAt: string | null;
|
|
1654
|
+
runUpdatedAt: string | null;
|
|
1655
|
+
}
|
|
1656
|
+
export interface ResolvedTaskRun {
|
|
1657
|
+
runId: string;
|
|
1658
|
+
state: RunState;
|
|
1659
|
+
context: ContextResolverContract;
|
|
1660
|
+
model: SddTaskModel;
|
|
1661
|
+
task: SddTask | null;
|
|
1662
|
+
explicitRunId: boolean;
|
|
1663
|
+
staleReasons: string[];
|
|
1664
|
+
affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
|
|
792
1665
|
}
|
|
793
1666
|
export interface ProjectStatus {
|
|
794
1667
|
branch: string;
|
|
1668
|
+
workflowStatus: 'active' | 'not_started';
|
|
1669
|
+
context: ContextResolverContract;
|
|
1670
|
+
gitRoot: string | null;
|
|
795
1671
|
documents: SddTaskModel['documents'];
|
|
796
1672
|
tasks: {
|
|
797
1673
|
total: number;
|
|
@@ -804,6 +1680,10 @@ export interface ProjectStatus {
|
|
|
804
1680
|
gaps: number;
|
|
805
1681
|
};
|
|
806
1682
|
latestRun: RunSummary | null;
|
|
1683
|
+
latestRunsByTask: LocalRunIndexPartitionTaskEntry[];
|
|
1684
|
+
latestRunEvidence: RunEvidenceSummary | null;
|
|
1685
|
+
latestRunStaleReasons: string[];
|
|
1686
|
+
affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
|
|
807
1687
|
recommendedNextCommand: string;
|
|
808
1688
|
gaps: SddTaskGap[];
|
|
809
1689
|
}
|
|
@@ -820,6 +1700,8 @@ export interface SyncBackInspection {
|
|
|
820
1700
|
reasons: string[];
|
|
821
1701
|
proposalPath: string | null;
|
|
822
1702
|
proposal: string | null;
|
|
1703
|
+
proposalDigest: string | null;
|
|
1704
|
+
proposalDigestValid: boolean | null;
|
|
823
1705
|
runTaskStatus: string | null;
|
|
824
1706
|
markdownTask: SddTask | null;
|
|
825
1707
|
markdownStatus: SddTaskStatus | null;
|
|
@@ -827,6 +1709,8 @@ export interface SyncBackInspection {
|
|
|
827
1709
|
artifacts: string[];
|
|
828
1710
|
gaps: SddTaskGap[];
|
|
829
1711
|
applyPolicy: SyncBackApplyPolicy;
|
|
1712
|
+
staleReasons: string[];
|
|
1713
|
+
affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
|
|
830
1714
|
}
|
|
831
1715
|
export interface SyncBackApplyResult {
|
|
832
1716
|
runId: string;
|
|
@@ -841,8 +1725,17 @@ export declare function getSddDir(projectRoot: string): string;
|
|
|
841
1725
|
export declare function getProjectConfigPath(projectRoot: string): string;
|
|
842
1726
|
export declare function getRunsDir(projectRoot: string): string;
|
|
843
1727
|
export declare function getLocalRunIndexPath(projectRoot: string): string;
|
|
1728
|
+
export declare function getRuntimeStorePath(projectRoot: string): string;
|
|
844
1729
|
export declare function getRunDir(projectRoot: string, runId: string): string;
|
|
845
1730
|
export declare function getArtifactsDir(projectRoot: string, runId: string): string;
|
|
1731
|
+
export declare function getAgentExecutionsDir(projectRoot: string, runId: string): string;
|
|
1732
|
+
export declare function getTeamSessionsDir(projectRoot: string, runId: string): string;
|
|
1733
|
+
export declare function getWorkerRuntimesDir(projectRoot: string, runId: string): string;
|
|
1734
|
+
export declare function getInvocationLedgerPath(projectRoot: string, runId: string): string;
|
|
1735
|
+
export declare function getRouteCacheDir(projectRoot: string): string;
|
|
1736
|
+
export declare function getWorkerRuntimeRecordPath(projectRoot: string, runId: string, runtimeId: string): string;
|
|
1737
|
+
export declare function getAgentExecutionRecordPath(projectRoot: string, runId: string, executionId: string): string;
|
|
1738
|
+
export declare function getTeamSessionRecordPath(projectRoot: string, runId: string, teamId: string): string;
|
|
846
1739
|
export declare function getArtifactPath(projectRoot: string, runId: string, relativeArtifactPath: string): string;
|
|
847
1740
|
export declare function getRunRelativeArtifactPath(artifactRootRelativePath: string): string;
|
|
848
1741
|
export declare function toArtifactRootRelativePath(runRelativeArtifactPath: string): string;
|
|
@@ -851,6 +1744,15 @@ export declare function writeArtifact(projectRoot: string, runId: string, artifa
|
|
|
851
1744
|
runRelativePath: string;
|
|
852
1745
|
}>;
|
|
853
1746
|
export declare function readArtifact(projectRoot: string, runId: string, artifactRootRelativePath: string): Promise<string>;
|
|
1747
|
+
export declare function appendInvocationLedgerEntry(projectRoot: string, input: Omit<InvocationLedgerEntry, 'contract' | 'version' | 'entryId' | 'timestamp'>): Promise<InvocationLedgerEntry>;
|
|
1748
|
+
export declare function listInvocationLedgerEntries(projectRoot: string, runId: string): Promise<InvocationLedgerEntry[]>;
|
|
1749
|
+
export declare function writeAgentExecutionRecord(projectRoot: string, record: AgentExecutionRecord): Promise<AgentExecutionRecord>;
|
|
1750
|
+
export declare function writeTeamSessionRecord(projectRoot: string, record: TeamSessionRecord): Promise<TeamSessionRecord>;
|
|
1751
|
+
export declare function writeResidentWorkerRuntimeRecord(projectRoot: string, record: ResidentWorkerRuntimeRecord): Promise<ResidentWorkerRuntimeRecord>;
|
|
1752
|
+
export declare function listAgentExecutionRecords(projectRoot: string, runId: string): Promise<AgentExecutionRecord[]>;
|
|
1753
|
+
export declare function listTeamSessionRecords(projectRoot: string, runId: string): Promise<TeamSessionRecord[]>;
|
|
1754
|
+
export declare function readResidentWorkerRuntimeRecord(projectRoot: string, runId: string, runtimeId: string): Promise<ResidentWorkerRuntimeRecord>;
|
|
1755
|
+
export declare function listResidentWorkerRuntimeRecords(projectRoot: string, runId: string): Promise<ResidentWorkerRuntimeRecord[]>;
|
|
854
1756
|
export type InitDocumentStatus = 'created' | 'unchanged' | 'overwritten' | 'skipped';
|
|
855
1757
|
export interface InitDocumentReport {
|
|
856
1758
|
branch: string;
|
|
@@ -892,16 +1794,32 @@ export declare function readLocalRunIndex(projectRoot: string): Promise<LocalRun
|
|
|
892
1794
|
export declare function queryLocalRunIndex(projectRoot: string, query?: LocalRunIndexQuery): Promise<LocalRunIndex>;
|
|
893
1795
|
export declare function inspectLocalRunIndex(projectRoot: string): Promise<LocalRunIndexInspection>;
|
|
894
1796
|
export declare function inspectRun(projectRoot: string, runId: string): Promise<RunInspection>;
|
|
1797
|
+
export declare function parseContextProfile(value: string | null | undefined): ContextProfile;
|
|
1798
|
+
export declare function contextBudgetForProfile(profile: ContextProfile): ContextBudget;
|
|
1799
|
+
export declare function summarizeCommandOutput(rawOutput: string, source: ContextSourceRef, profile?: ContextProfile): CommandOutputSummary;
|
|
1800
|
+
export declare function buildEvidenceSummaryProjection(projectRoot: string, options: EvidenceSummaryOptions): Promise<EvidenceSummaryProjection>;
|
|
1801
|
+
export declare function buildContextBuildPackage(projectRoot: string, options: ContextBuildOptions): Promise<ContextBuildPackage>;
|
|
1802
|
+
export declare function validateLogWorkerSummary(summary: LogWorkerSummary): LogWorkerSummaryValidation;
|
|
1803
|
+
export declare function resolveSddContext(projectRoot: string, options?: {
|
|
1804
|
+
branch?: string | null;
|
|
1805
|
+
branchSource?: ContextBranchSource;
|
|
1806
|
+
}): Promise<ContextResolverContract>;
|
|
895
1807
|
export declare function getProjectStatus(projectRoot: string, options?: {
|
|
896
|
-
branch?: string;
|
|
1808
|
+
branch?: string | null;
|
|
1809
|
+
branchSource?: ContextBranchSource;
|
|
897
1810
|
}): Promise<ProjectStatus>;
|
|
1811
|
+
export declare function resolveTaskRun(projectRoot: string, options: {
|
|
1812
|
+
runId?: string;
|
|
1813
|
+
branch?: string;
|
|
1814
|
+
taskId: string;
|
|
1815
|
+
}): Promise<ResolvedTaskRun>;
|
|
898
1816
|
export declare function inspectSyncBack(projectRoot: string, options: {
|
|
899
|
-
runId
|
|
1817
|
+
runId?: string;
|
|
900
1818
|
branch?: string;
|
|
901
1819
|
taskId?: string;
|
|
902
1820
|
}): Promise<SyncBackInspection>;
|
|
903
1821
|
export declare function applySyncBack(projectRoot: string, options: {
|
|
904
|
-
runId
|
|
1822
|
+
runId?: string;
|
|
905
1823
|
branch?: string;
|
|
906
1824
|
taskId?: string;
|
|
907
1825
|
approved?: boolean;
|
|
@@ -909,6 +1827,7 @@ export declare function applySyncBack(projectRoot: string, options: {
|
|
|
909
1827
|
export declare function doctor(projectRoot: string, options?: {
|
|
910
1828
|
allRuns?: boolean;
|
|
911
1829
|
latestOnly?: boolean;
|
|
1830
|
+
branch?: string | null;
|
|
912
1831
|
}): Promise<DoctorReport>;
|
|
913
1832
|
export declare function parseSddBranch(projectRoot: string, branch?: string): Promise<SddTaskModel>;
|
|
914
1833
|
export declare function parseSddTasksMarkdown(raw: string, options?: {
|
|
@@ -927,6 +1846,10 @@ export declare function validateSddResult(result: SddResult, options?: {
|
|
|
927
1846
|
expectedAgent?: string;
|
|
928
1847
|
runRelativeArtifactPath?: string;
|
|
929
1848
|
}): ContractValidationIssue[];
|
|
1849
|
+
export declare function parseSddEvidenceMarkdown(raw: string, options?: {
|
|
1850
|
+
expectedTask?: string;
|
|
1851
|
+
sourceArtifact?: string;
|
|
1852
|
+
}): ArtifactTrustValidationReport;
|
|
930
1853
|
export declare function createDelegationRecord(input: {
|
|
931
1854
|
delegationId: string;
|
|
932
1855
|
task: string;
|
|
@@ -970,6 +1893,15 @@ export declare function inspectWavePlan(projectRoot: string, options?: {
|
|
|
970
1893
|
}): Promise<WavePlan>;
|
|
971
1894
|
export declare function runBackgroundExecutor(projectRoot: string, options: BackgroundExecutorRunOptions): Promise<BackgroundExecutorResult>;
|
|
972
1895
|
export declare function inspectBackgroundExecutor(projectRoot: string, runId: string): Promise<BackgroundExecutorInspection>;
|
|
1896
|
+
export declare function claimResidentWorkerRuntime(projectRoot: string, options: ResidentWorkerRuntimeClaimOptions): Promise<ResidentWorkerRuntimeClaimResult>;
|
|
1897
|
+
export declare function heartbeatResidentWorkerRuntime(projectRoot: string, options: ResidentWorkerRuntimeHeartbeatOptions): Promise<ResidentWorkerRuntimeHeartbeatResult>;
|
|
1898
|
+
export declare function listResidentWorkerRuntimes(projectRoot: string, options: {
|
|
1899
|
+
runId: string;
|
|
1900
|
+
}): Promise<ResidentWorkerRuntimeList>;
|
|
1901
|
+
export declare function inspectResidentWorkerRuntime(projectRoot: string, options: {
|
|
1902
|
+
runId: string;
|
|
1903
|
+
runtimeId: string;
|
|
1904
|
+
}): Promise<ResidentWorkerRuntimeInspection>;
|
|
973
1905
|
export declare function runWaveExecutor(projectRoot: string, options?: WaveExecutorRunOptions): Promise<WaveExecutorResult>;
|
|
974
1906
|
export declare function inspectWaveExecutor(projectRoot: string, runId: string): Promise<WaveExecutorInspection>;
|
|
975
1907
|
export declare function renderDoctorReport(report: DoctorReport): string;
|
|
@@ -1004,6 +1936,42 @@ export declare function listToolPluginContracts(projectRoot: string): Promise<To
|
|
|
1004
1936
|
export declare function inspectToolPluginContract(projectRoot: string, pluginId: string): Promise<ToolPluginContract | null>;
|
|
1005
1937
|
export declare function listWorkerAdapterContracts(projectRoot: string): Promise<WorkerAdapterContractRegistry>;
|
|
1006
1938
|
export declare function inspectWorkerAdapterContract(projectRoot: string, adapterId: string): Promise<WorkerAdapterContract | null>;
|
|
1939
|
+
export declare function listWorkflowGates(projectRoot: string): Promise<WorkflowGateRegistry>;
|
|
1940
|
+
export declare function inspectWorkflowGate(projectRoot: string, workflowId: string): Promise<WorkflowGateContract | null>;
|
|
1941
|
+
export declare function validateWorkflowGates(projectRoot: string): Promise<WorkflowGateValidation>;
|
|
1942
|
+
export declare function listAgentRegistry(projectRoot: string): Promise<AgentRegistry>;
|
|
1943
|
+
export declare function inspectAgentRegistryEntry(projectRoot: string, agentId: string): Promise<AgentRegistryEntry | null>;
|
|
1944
|
+
export declare function validateAgentRegistry(projectRoot: string): Promise<AgentRegistryValidation>;
|
|
1945
|
+
export declare function inspectAgentSkillTeamRuntime(projectRoot: string): Promise<AgentSkillTeamRuntimeInspection>;
|
|
1946
|
+
export declare function validateAgentSkillTeamRuntime(projectRoot: string): Promise<AgentSkillTeamRuntimeValidation>;
|
|
1947
|
+
export declare function listSkillCapabilities(projectRoot: string): Promise<SkillCapabilityRegistry>;
|
|
1948
|
+
export declare function inspectSkillCapability(projectRoot: string, capabilityId: string): Promise<SkillCapabilityContract | null>;
|
|
1949
|
+
export declare function listCapabilitySources(projectRoot: string): Promise<CapabilitySourceCatalog>;
|
|
1950
|
+
export declare function inspectCapabilitySource(projectRoot: string, sourceId: string): Promise<CapabilitySourceCatalogEntry | null>;
|
|
1951
|
+
export declare function inspectExternalAgentPackImport(projectRoot: string, sourceId: string): Promise<ExternalAgentPackImportInspection>;
|
|
1952
|
+
export declare function inspectTeamModePolicy(projectRoot: string, options?: {
|
|
1953
|
+
taskId?: string;
|
|
1954
|
+
branch?: string;
|
|
1955
|
+
enabled?: boolean;
|
|
1956
|
+
teamModeActivation?: TeamModeActivation;
|
|
1957
|
+
}): Promise<TeamModePolicy>;
|
|
1958
|
+
export declare function routeSddTask(projectRoot: string, options?: {
|
|
1959
|
+
taskId: string;
|
|
1960
|
+
branch?: string;
|
|
1961
|
+
agent?: string;
|
|
1962
|
+
teamModeEnabled?: boolean;
|
|
1963
|
+
teamModeActivation?: TeamModeActivation;
|
|
1964
|
+
profile?: boolean;
|
|
1965
|
+
cache?: boolean;
|
|
1966
|
+
}): Promise<AgentRouterDecision>;
|
|
1967
|
+
export declare function inspectQueryStatusContract(projectRoot: string): Promise<QueryStatusContract>;
|
|
1968
|
+
export declare function inspectSkillAgentEvalContract(projectRoot: string): Promise<SkillAgentEvalContract>;
|
|
1969
|
+
export declare function validateSkillAgentEvalContract(projectRoot: string): Promise<SkillAgentEvalValidation>;
|
|
1970
|
+
export declare function inspectHarnessLearningContract(projectRoot: string): Promise<HarnessLearningContract>;
|
|
1971
|
+
export declare function validateHarnessLearningContract(projectRoot: string): Promise<HarnessLearningValidation>;
|
|
1972
|
+
export declare function inspectProjectContextPackContract(projectRoot: string): Promise<ProjectContextPackContract>;
|
|
1973
|
+
export declare function validateProjectContextPackContract(projectRoot: string): Promise<ProjectContextPackValidation>;
|
|
1974
|
+
export declare function validateQueryStatusContract(projectRoot: string): Promise<QueryStatusValidation>;
|
|
1007
1975
|
export declare function inspectGovernancePolicy(projectRoot: string): Promise<GovernancePolicy>;
|
|
1008
1976
|
export declare function evaluateGovernancePolicy(projectRoot: string, input: GovernancePolicyDecisionInput): Promise<GovernancePolicyDecision>;
|
|
1009
1977
|
export declare function listDelegationQueueItems(projectRoot: string, options?: {
|
|
@@ -1014,3 +1982,5 @@ export declare function getDelegationStateMachine(): DelegationStateMachine;
|
|
|
1014
1982
|
export declare function validateDelegationStateTransition(from: DelegationStatus, to: DelegationStatus, event?: string | null): DelegationStateTransitionValidation;
|
|
1015
1983
|
export declare function emptyLifecycleDecisionRecord(): LifecycleDecisionRecord;
|
|
1016
1984
|
export declare function readRunEvents(projectRoot: string, runId: string): Promise<RuntimeEvent[]>;
|
|
1985
|
+
export declare function extractLifecycleRiskSignalsFromText(text: string, source?: LifecycleRiskExtractionSource): LifecycleRiskGateExtraction;
|
|
1986
|
+
export declare function lifecycleAutonomyCeiling(record: LifecycleDecisionRecord): LifecycleAutonomyCeiling;
|