@mcoda/codali 0.1.135-codali.4 → 0.1.135-codali.41
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/CHANGELOG.md +204 -1
- package/ORCHESTRATION.md +356 -21
- package/README.md +234 -22
- package/config/AGENTS.md +17 -0
- package/config/browser-desktop/Dockerfile +7 -0
- package/config/browser-desktop/preview.py +15 -0
- package/config/browser-desktop/start.sh +12 -0
- package/config/deterministic/install-python.mjs +16 -0
- package/config/deterministic/node-worker.mjs +77 -0
- package/config/deterministic/python-worker.py +237 -0
- package/config/deterministic/requirements.txt +6 -0
- package/config/docdex-tools-0.2.99.json +3977 -0
- package/config/documents/install-python.mjs +16 -0
- package/config/documents/requirements.txt +10 -0
- package/config/documents/worker.py +267 -0
- package/config/orchestration.schema.json +131 -0
- package/config/skills/architecture-design/SKILL.md +14 -0
- package/config/skills/browser-session/SKILL.md +16 -0
- package/config/skills/browser-use/SKILL.md +14 -0
- package/config/skills/code-implementation/SKILL.md +18 -0
- package/config/skills/code-review/SKILL.md +14 -0
- package/config/skills/docdex-research/SKILL.md +18 -0
- package/config/skills/docdex-research/references/catalog.md +111 -0
- package/config/skills/docdex-research/references/memory.md +22 -0
- package/config/skills/docdex-research/references/operations.md +19 -0
- package/config/skills/docdex-research/references/retrieval.md +13 -0
- package/config/skills/planning/SKILL.md +14 -0
- package/config/skills/system-diagnostics/SKILL.md +14 -0
- package/config/skills/system-services/SKILL.md +17 -0
- package/config/skills/system-services/references/docker.md +11 -0
- package/config/skills/system-services/references/linux.md +9 -0
- package/config/skills/system-services/references/macos.md +9 -0
- package/config/skills/systematic-debugging/SKILL.md +14 -0
- package/config/skills/testing-and-verification/SKILL.md +16 -0
- package/config/skills/tool-selection/SKILL.md +16 -0
- package/config/skills/ui-ux-design/SKILL.md +16 -0
- package/config/skills/ui-ux-design/references/validation.md +13 -0
- package/config/skills/webapp-testing/SKILL.md +12 -0
- package/config/terminal-long-scenarios.v1.json +3 -2
- package/dist/cli/TerminalArtifacts.d.ts +5 -0
- package/dist/cli/TerminalArtifacts.d.ts.map +1 -0
- package/dist/cli/TerminalArtifacts.js +26 -0
- package/dist/cli/TerminalCommand.d.ts +2 -1
- package/dist/cli/TerminalCommand.d.ts.map +1 -1
- package/dist/cli/TerminalCommand.js +436 -100
- package/dist/cli/TerminalInput.d.ts +13 -0
- package/dist/cli/TerminalInput.d.ts.map +1 -1
- package/dist/cli/TerminalInput.js +55 -7
- package/dist/cli/TerminalModels.d.ts +6 -0
- package/dist/cli/TerminalModels.d.ts.map +1 -0
- package/dist/cli/TerminalModels.js +45 -0
- package/dist/cli/TerminalPlan.d.ts +40 -0
- package/dist/cli/TerminalPlan.d.ts.map +1 -0
- package/dist/cli/TerminalPlan.js +37 -0
- package/dist/cli/ToolsCommand.d.ts.map +1 -1
- package/dist/cli/ToolsCommand.js +8 -1
- package/dist/cli/tui/TerminalCells.d.ts +6 -0
- package/dist/cli/tui/TerminalCells.d.ts.map +1 -0
- package/dist/cli/tui/TerminalCells.js +47 -0
- package/dist/cli/tui/TerminalEditor.d.ts +22 -0
- package/dist/cli/tui/TerminalEditor.d.ts.map +1 -0
- package/dist/cli/tui/TerminalEditor.js +88 -0
- package/dist/cli/tui/TerminalLogo.d.ts +6 -0
- package/dist/cli/tui/TerminalLogo.d.ts.map +1 -0
- package/dist/cli/tui/TerminalLogo.js +26 -0
- package/dist/cli/tui/TerminalMarkdown.d.ts +5 -0
- package/dist/cli/tui/TerminalMarkdown.d.ts.map +1 -0
- package/dist/cli/tui/TerminalMarkdown.js +118 -0
- package/dist/cli/tui/TerminalPresentation.d.ts +6 -0
- package/dist/cli/tui/TerminalPresentation.d.ts.map +1 -0
- package/dist/cli/tui/TerminalPresentation.js +152 -0
- package/dist/cli/tui/TerminalScreen.d.ts +50 -0
- package/dist/cli/tui/TerminalScreen.d.ts.map +1 -0
- package/dist/cli/tui/TerminalScreen.js +137 -0
- package/dist/cli/tui/TerminalSelection.d.ts +15 -0
- package/dist/cli/tui/TerminalSelection.d.ts.map +1 -0
- package/dist/cli/tui/TerminalSelection.js +38 -0
- package/dist/cli/tui/TerminalTui.d.ts +82 -0
- package/dist/cli/tui/TerminalTui.d.ts.map +1 -0
- package/dist/cli/tui/TerminalTui.js +564 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -3
- package/dist/config/OrchestrationConfig.d.ts +40 -0
- package/dist/config/OrchestrationConfig.d.ts.map +1 -1
- package/dist/config/OrchestrationConfig.js +79 -5
- package/dist/connectors/media/MediaJobStore.d.ts +2 -1
- package/dist/connectors/media/MediaJobStore.d.ts.map +1 -1
- package/dist/connectors/media/MediaJobStore.js +11 -3
- package/dist/docdex/DocdexCatalog.d.ts +12 -0
- package/dist/docdex/DocdexCatalog.d.ts.map +1 -0
- package/dist/docdex/DocdexCatalog.js +30 -0
- package/dist/docdex/DocdexClient.d.ts +15 -2
- package/dist/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/docdex/DocdexClient.js +119 -12
- package/dist/docdex/ManagedDocdex.d.ts +4 -0
- package/dist/docdex/ManagedDocdex.d.ts.map +1 -1
- package/dist/docdex/ManagedDocdex.js +42 -5
- package/dist/eval/EvaluationProcess.d.ts.map +1 -1
- package/dist/eval/EvaluationProcess.js +4 -0
- package/dist/eval/TerminalWorkflowCorpus.d.ts +1 -1
- package/dist/eval/TerminalWorkflowCorpus.d.ts.map +1 -1
- package/dist/eval/TerminalWorkflowCorpus.js +9 -6
- package/dist/eval/TrustBenchmark.d.ts +94 -0
- package/dist/eval/TrustBenchmark.d.ts.map +1 -0
- package/dist/eval/TrustBenchmark.js +199 -0
- package/dist/eval/fixtures/ContractReviewProvider.d.ts +4 -0
- package/dist/eval/fixtures/ContractReviewProvider.d.ts.map +1 -0
- package/dist/eval/fixtures/ContractReviewProvider.js +10 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.d.ts +6 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.d.ts.map +1 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.js +145 -0
- package/dist/eval/fixtures/TerminalRecoveryJourney.d.ts.map +1 -1
- package/dist/eval/fixtures/TerminalRecoveryJourney.js +14 -1
- package/dist/gateway/GroundingMode.d.ts.map +1 -1
- package/dist/gateway/GroundingMode.js +23 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/permissions/PermissionGate.d.ts +4 -1
- package/dist/permissions/PermissionGate.d.ts.map +1 -1
- package/dist/permissions/PermissionGate.js +50 -5
- package/dist/permissions/WorkspacePermissions.d.ts +11 -0
- package/dist/permissions/WorkspacePermissions.d.ts.map +1 -0
- package/dist/permissions/WorkspacePermissions.js +42 -0
- package/dist/providers/ConfiguredModelScope.d.ts +1 -0
- package/dist/providers/ConfiguredModelScope.d.ts.map +1 -1
- package/dist/providers/ConfiguredModelScope.js +19 -2
- package/dist/providers/ConfiguredProvider.d.ts +10 -1
- package/dist/providers/ConfiguredProvider.d.ts.map +1 -1
- package/dist/providers/ConfiguredProvider.js +104 -37
- package/dist/providers/ModelCapacityWait.d.ts +21 -0
- package/dist/providers/ModelCapacityWait.d.ts.map +1 -0
- package/dist/providers/ModelCapacityWait.js +40 -0
- package/dist/providers/ModelServiceError.d.ts +16 -2
- package/dist/providers/ModelServiceError.d.ts.map +1 -1
- package/dist/providers/ModelServiceError.js +37 -5
- package/dist/providers/OpenAiCompatibleProvider.d.ts +8 -0
- package/dist/providers/OpenAiCompatibleProvider.d.ts.map +1 -1
- package/dist/providers/OpenAiCompatibleProvider.js +38 -3
- package/dist/providers/ProviderTypes.d.ts +9 -0
- package/dist/providers/ProviderTypes.d.ts.map +1 -1
- package/dist/providers/RequestSize.d.ts +5 -0
- package/dist/providers/RequestSize.d.ts.map +1 -0
- package/dist/providers/RequestSize.js +10 -0
- package/dist/providers/RequestUsage.d.ts +11 -0
- package/dist/providers/RequestUsage.d.ts.map +1 -0
- package/dist/providers/RequestUsage.js +33 -0
- package/dist/runtime/AnswerVerification.d.ts +31 -0
- package/dist/runtime/AnswerVerification.d.ts.map +1 -0
- package/dist/runtime/AnswerVerification.js +65 -0
- package/dist/runtime/CodaliRuntime.d.ts +1 -0
- package/dist/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/runtime/CodaliRuntime.js +1 -0
- package/dist/runtime/CompletionReport.d.ts +8 -0
- package/dist/runtime/CompletionReport.d.ts.map +1 -1
- package/dist/runtime/CompletionReport.js +25 -0
- package/dist/runtime/ComputedAnswer.d.ts +13 -0
- package/dist/runtime/ComputedAnswer.d.ts.map +1 -0
- package/dist/runtime/ComputedAnswer.js +75 -0
- package/dist/runtime/ContextCompression.d.ts +41 -0
- package/dist/runtime/ContextCompression.d.ts.map +1 -0
- package/dist/runtime/ContextCompression.js +292 -0
- package/dist/runtime/FigureCheck.d.ts +20 -0
- package/dist/runtime/FigureCheck.d.ts.map +1 -0
- package/dist/runtime/FigureCheck.js +44 -0
- package/dist/runtime/GatewayRequest.d.ts +5 -0
- package/dist/runtime/GatewayRequest.d.ts.map +1 -0
- package/dist/runtime/GatewayRequest.js +19 -0
- package/dist/runtime/InspectionBudget.d.ts +11 -0
- package/dist/runtime/InspectionBudget.d.ts.map +1 -0
- package/dist/runtime/InspectionBudget.js +23 -0
- package/dist/runtime/InspectionConvergence.d.ts +24 -0
- package/dist/runtime/InspectionConvergence.d.ts.map +1 -0
- package/dist/runtime/InspectionConvergence.js +67 -0
- package/dist/runtime/InteractionContract.d.ts +51 -0
- package/dist/runtime/InteractionContract.d.ts.map +1 -0
- package/dist/runtime/InteractionContract.js +72 -0
- package/dist/runtime/InteractionRouter.d.ts +73 -0
- package/dist/runtime/InteractionRouter.d.ts.map +1 -0
- package/dist/runtime/InteractionRouter.js +139 -0
- package/dist/runtime/OutageWait.d.ts +14 -0
- package/dist/runtime/OutageWait.d.ts.map +1 -0
- package/dist/runtime/OutageWait.js +33 -0
- package/dist/runtime/PlanCoverage.d.ts +9 -0
- package/dist/runtime/PlanCoverage.d.ts.map +1 -0
- package/dist/runtime/PlanCoverage.js +12 -0
- package/dist/runtime/PreparedDocdex.d.ts +4 -0
- package/dist/runtime/PreparedDocdex.d.ts.map +1 -0
- package/dist/runtime/PreparedDocdex.js +55 -0
- package/dist/runtime/PreparedMemory.d.ts +3 -0
- package/dist/runtime/PreparedMemory.d.ts.map +1 -0
- package/dist/runtime/PreparedMemory.js +30 -0
- package/dist/runtime/ProgressTracker.d.ts +1 -0
- package/dist/runtime/ProgressTracker.d.ts.map +1 -1
- package/dist/runtime/ProgressTracker.js +25 -5
- package/dist/runtime/ResearchEvidence.d.ts +25 -0
- package/dist/runtime/ResearchEvidence.d.ts.map +1 -0
- package/dist/runtime/ResearchEvidence.js +101 -0
- package/dist/runtime/ReviewContract.d.ts +35 -0
- package/dist/runtime/ReviewContract.d.ts.map +1 -0
- package/dist/runtime/ReviewContract.js +132 -0
- package/dist/runtime/ReviewCoordinator.d.ts +43 -0
- package/dist/runtime/ReviewCoordinator.d.ts.map +1 -0
- package/dist/runtime/ReviewCoordinator.js +134 -0
- package/dist/runtime/ReviewSource.d.ts +3 -0
- package/dist/runtime/ReviewSource.d.ts.map +1 -1
- package/dist/runtime/ReviewSource.js +17 -1
- package/dist/runtime/Runner.d.ts.map +1 -1
- package/dist/runtime/Runner.js +6 -1
- package/dist/runtime/SessionController.d.ts +146 -6
- package/dist/runtime/SessionController.d.ts.map +1 -1
- package/dist/runtime/SessionController.js +2406 -228
- package/dist/runtime/SpecialistTools.d.ts +8 -0
- package/dist/runtime/SpecialistTools.d.ts.map +1 -0
- package/dist/runtime/SpecialistTools.js +85 -0
- package/dist/runtime/StructuralEvidence.d.ts +4 -2
- package/dist/runtime/StructuralEvidence.d.ts.map +1 -1
- package/dist/runtime/StructuralEvidence.js +22 -5
- package/dist/runtime/TaskReview.d.ts +25 -0
- package/dist/runtime/TaskReview.d.ts.map +1 -0
- package/dist/runtime/TaskReview.js +109 -0
- package/dist/runtime/TaskReviewContext.d.ts +37 -0
- package/dist/runtime/TaskReviewContext.d.ts.map +1 -1
- package/dist/runtime/TaskReviewContext.js +18 -2
- package/dist/runtime/UsageReconciliation.d.ts +28 -0
- package/dist/runtime/UsageReconciliation.d.ts.map +1 -0
- package/dist/runtime/UsageReconciliation.js +68 -0
- package/dist/runtime/VerificationReceiptSelection.d.ts +15 -0
- package/dist/runtime/VerificationReceiptSelection.d.ts.map +1 -0
- package/dist/runtime/VerificationReceiptSelection.js +30 -0
- package/dist/runtime/WorkspaceLedger.d.ts +2 -0
- package/dist/runtime/WorkspaceLedger.d.ts.map +1 -1
- package/dist/runtime/WorkspaceLedger.js +44 -20
- package/dist/runtime/WorkspaceLock.d.ts.map +1 -1
- package/dist/runtime/WorkspaceLock.js +9 -1
- package/dist/runtime/WorkspaceSnapshot.d.ts.map +1 -1
- package/dist/runtime/WorkspaceSnapshot.js +3 -2
- package/dist/runtime/WriteSyntaxCheck.d.ts +10 -0
- package/dist/runtime/WriteSyntaxCheck.d.ts.map +1 -0
- package/dist/runtime/WriteSyntaxCheck.js +34 -0
- package/dist/session/InstructionLoader.d.ts +5 -1
- package/dist/session/InstructionLoader.d.ts.map +1 -1
- package/dist/session/InstructionLoader.js +65 -19
- package/dist/session/SessionStoragePath.d.ts.map +1 -1
- package/dist/session/SessionStoragePath.js +34 -17
- package/dist/session/SessionStore.d.ts +6 -1
- package/dist/session/SessionStore.d.ts.map +1 -1
- package/dist/session/SessionStore.js +108 -43
- package/dist/session/SkillCatalog.d.ts +33 -0
- package/dist/session/SkillCatalog.d.ts.map +1 -0
- package/dist/session/SkillCatalog.js +197 -0
- package/dist/session/WorkState.d.ts +16 -2
- package/dist/session/WorkState.d.ts.map +1 -1
- package/dist/session/WorkState.js +55 -5
- package/dist/session/WorkTypes.d.ts +8 -0
- package/dist/session/WorkTypes.d.ts.map +1 -1
- package/dist/session/WorkspaceScope.d.ts +3 -0
- package/dist/session/WorkspaceScope.d.ts.map +1 -0
- package/dist/session/WorkspaceScope.js +19 -0
- package/dist/tools/SemanticToolRetrieval.d.ts +19 -0
- package/dist/tools/SemanticToolRetrieval.d.ts.map +1 -0
- package/dist/tools/SemanticToolRetrieval.js +52 -0
- package/dist/tools/ToolRetrieval.d.ts +7 -0
- package/dist/tools/ToolRetrieval.d.ts.map +1 -0
- package/dist/tools/ToolRetrieval.js +25 -0
- package/dist/tools/ToolTypes.d.ts +5 -0
- package/dist/tools/ToolTypes.d.ts.map +1 -1
- package/dist/tools/browser/BrowserSessionTool.d.ts +16 -0
- package/dist/tools/browser/BrowserSessionTool.d.ts.map +1 -0
- package/dist/tools/browser/BrowserSessionTool.js +326 -0
- package/dist/tools/browser/BrowserTool.d.ts +17 -0
- package/dist/tools/browser/BrowserTool.d.ts.map +1 -0
- package/dist/tools/browser/BrowserTool.js +291 -0
- package/dist/tools/browser/BrowserWorker.d.ts +2 -0
- package/dist/tools/browser/BrowserWorker.d.ts.map +1 -0
- package/dist/tools/browser/BrowserWorker.js +121 -0
- package/dist/tools/calculation/CalculatorTool.d.ts +5 -0
- package/dist/tools/calculation/CalculatorTool.d.ts.map +1 -0
- package/dist/tools/calculation/CalculatorTool.js +191 -0
- package/dist/tools/deterministic/DeterministicRuntime.d.ts +39 -0
- package/dist/tools/deterministic/DeterministicRuntime.d.ts.map +1 -0
- package/dist/tools/deterministic/DeterministicRuntime.js +98 -0
- package/dist/tools/deterministic/DeterministicTools.d.ts +8 -0
- package/dist/tools/deterministic/DeterministicTools.d.ts.map +1 -0
- package/dist/tools/deterministic/DeterministicTools.js +100 -0
- package/dist/tools/deterministic/node-worker.cjs +38 -0
- package/dist/tools/deterministic/python-worker.py +237 -0
- package/dist/tools/docdex/DocdexCatalogTools.d.ts +4 -0
- package/dist/tools/docdex/DocdexCatalogTools.d.ts.map +1 -0
- package/dist/tools/docdex/DocdexCatalogTools.js +59 -0
- package/dist/tools/docdex/DocdexTools.d.ts +2 -0
- package/dist/tools/docdex/DocdexTools.d.ts.map +1 -1
- package/dist/tools/docdex/DocdexTools.js +81 -106
- package/dist/tools/documents/DocumentRuntime.d.ts +12 -0
- package/dist/tools/documents/DocumentRuntime.d.ts.map +1 -0
- package/dist/tools/documents/DocumentRuntime.js +59 -0
- package/dist/tools/documents/DocumentTools.d.ts +19 -0
- package/dist/tools/documents/DocumentTools.d.ts.map +1 -0
- package/dist/tools/documents/DocumentTools.js +150 -0
- package/dist/tools/documents/worker.py +267 -0
- package/dist/tools/entities/AdesTool.d.ts +7 -0
- package/dist/tools/entities/AdesTool.d.ts.map +1 -0
- package/dist/tools/entities/AdesTool.js +59 -0
- package/dist/tools/filesystem/FileTools.d.ts.map +1 -1
- package/dist/tools/filesystem/FileTools.js +62 -11
- package/dist/tools/research/TnlTool.d.ts +22 -0
- package/dist/tools/research/TnlTool.d.ts.map +1 -0
- package/dist/tools/research/TnlTool.js +246 -0
- package/dist/tools/shell/AsyncProcess.d.ts +4 -0
- package/dist/tools/shell/AsyncProcess.d.ts.map +1 -1
- package/dist/tools/shell/AsyncProcess.js +9 -3
- package/dist/tools/shell/HostToolchain.d.ts +7 -0
- package/dist/tools/shell/HostToolchain.d.ts.map +1 -1
- package/dist/tools/shell/HostToolchain.js +65 -4
- package/dist/tools/shell/IsolatedExecutor.d.ts +5 -2
- package/dist/tools/shell/IsolatedExecutor.d.ts.map +1 -1
- package/dist/tools/shell/IsolatedExecutor.js +148 -29
- package/dist/tools/shell/ShellTool.d.ts +2 -0
- package/dist/tools/shell/ShellTool.d.ts.map +1 -1
- package/dist/tools/shell/ShellTool.js +19 -4
- package/dist/tools/system/CalendarTool.d.ts +15 -0
- package/dist/tools/system/CalendarTool.d.ts.map +1 -0
- package/dist/tools/system/CalendarTool.js +44 -0
- package/dist/tools/system/TextTool.d.ts +4 -0
- package/dist/tools/system/TextTool.d.ts.map +1 -0
- package/dist/tools/system/TextTool.js +39 -0
- package/dist/tools/system/TimeTool.d.ts +4 -0
- package/dist/tools/system/TimeTool.d.ts.map +1 -0
- package/dist/tools/system/TimeTool.js +22 -0
- package/dist/tools/verification/JavaScriptVerificationTool.d.ts +47 -0
- package/dist/tools/verification/JavaScriptVerificationTool.d.ts.map +1 -0
- package/dist/tools/verification/JavaScriptVerificationTool.js +71 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.d.ts +2 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.d.ts.map +1 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.js +91 -0
- package/dist/tools/verification/VitestTool.d.ts +6 -0
- package/dist/tools/verification/VitestTool.d.ts.map +1 -0
- package/dist/tools/verification/VitestTool.js +184 -0
- package/package.json +18 -5
|
@@ -17,7 +17,7 @@ const safeSummaryRef = (value) => {
|
|
|
17
17
|
return normalized;
|
|
18
18
|
};
|
|
19
19
|
const validateMetadata = (value, sessionId) => {
|
|
20
|
-
if (!value || value.schemaVersion
|
|
20
|
+
if (!value || ![1, 2].includes(value.schemaVersion))
|
|
21
21
|
throw new Error("Unsupported session metadata schema; use a compatible client");
|
|
22
22
|
if (value.sessionId !== sessionId || typeof value.repoRoot !== "string" || typeof value.task !== "string" || !["active", "paused", "completed", "failed"].includes(value.status))
|
|
23
23
|
throw new Error("Invalid session metadata identity/status");
|
|
@@ -25,35 +25,90 @@ const validateMetadata = (value, sessionId) => {
|
|
|
25
25
|
if (!Array.isArray(value[key]) || value[key].some(item => typeof item !== "string"))
|
|
26
26
|
throw new Error(`Invalid session ${key}`);
|
|
27
27
|
}
|
|
28
|
+
if (value.kind !== undefined && !["conversation", "work"].includes(value.kind))
|
|
29
|
+
throw new Error("Invalid session kind");
|
|
30
|
+
if (value.schemaVersion === 2 && value.kind === undefined)
|
|
31
|
+
throw new Error("Session metadata v2 requires an explicit kind");
|
|
32
|
+
if (value.projectTaskKey !== undefined && (typeof value.projectTaskKey !== "string" || !value.projectTaskKey.trim()))
|
|
33
|
+
throw new Error("Invalid project attachment key");
|
|
28
34
|
value.summaryRefs.forEach(safeSummaryRef);
|
|
29
35
|
return value;
|
|
30
36
|
};
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const assertTranscriptEvents = (events, sessionId) => {
|
|
38
|
+
if (events.some(event => !event || event.schemaVersion !== 1 || event.sessionId !== sessionId))
|
|
39
|
+
throw new Error("Unsupported/invalid session transcript schema");
|
|
40
|
+
return events;
|
|
41
|
+
};
|
|
42
|
+
const NEWLINE = 0x0a;
|
|
43
|
+
const openTranscript = async (file) => {
|
|
44
|
+
for (let attempt = 0; attempt < 8; attempt++) {
|
|
45
|
+
const handle = await fs.open(file, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
40
46
|
try {
|
|
41
|
-
|
|
47
|
+
const stat = await handle.stat();
|
|
48
|
+
if (!stat.isFile() || stat.nlink > 1)
|
|
49
|
+
throw new Error("Unsafe session state file");
|
|
50
|
+
if (stat.nlink === 1)
|
|
51
|
+
return { handle, size: stat.size };
|
|
42
52
|
}
|
|
43
53
|
catch (error) {
|
|
44
|
-
|
|
45
|
-
if (index === lines.length - 1 && !content.endsWith("\n"))
|
|
46
|
-
break;
|
|
54
|
+
await handle.close();
|
|
47
55
|
throw error;
|
|
48
56
|
}
|
|
57
|
+
await handle.close();
|
|
49
58
|
}
|
|
50
|
-
|
|
59
|
+
throw new Error(`Session state file changed during validation: ${path.basename(file)}`);
|
|
51
60
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
/** Check a transcript record by record and report its tail. A long session's
|
|
62
|
+
* transcript does not fit in one string, so it is never read whole. */
|
|
63
|
+
const scanTranscript = async (file, sessionId, visit) => {
|
|
64
|
+
const { handle, size } = await openTranscript(file);
|
|
65
|
+
try {
|
|
66
|
+
const chunk = Buffer.alloc(1024 * 1024);
|
|
67
|
+
let pending = [], position = 0, recordStart = 0, tailComplete = true;
|
|
68
|
+
const record = (terminated) => {
|
|
69
|
+
const line = Buffer.concat(pending).toString("utf8").trim();
|
|
70
|
+
pending = [];
|
|
71
|
+
if (!line)
|
|
72
|
+
return;
|
|
73
|
+
let event;
|
|
74
|
+
try {
|
|
75
|
+
event = JSON.parse(line);
|
|
76
|
+
}
|
|
77
|
+
// Only an unterminated final record may be a crash tail. Never hide middle corruption.
|
|
78
|
+
catch (error) {
|
|
79
|
+
if (terminated)
|
|
80
|
+
throw error;
|
|
81
|
+
tailComplete = false;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
assertTranscriptEvents([event], sessionId);
|
|
85
|
+
visit?.(event);
|
|
86
|
+
};
|
|
87
|
+
while (position < size) {
|
|
88
|
+
const { bytesRead } = await handle.read(chunk, 0, Math.min(chunk.length, size - position), position);
|
|
89
|
+
if (!bytesRead)
|
|
90
|
+
break;
|
|
91
|
+
for (let start = 0; start < bytesRead;) {
|
|
92
|
+
const end = chunk.subarray(start, bytesRead).indexOf(NEWLINE);
|
|
93
|
+
if (end < 0) {
|
|
94
|
+
pending.push(Buffer.from(chunk.subarray(start, bytesRead)));
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
pending.push(Buffer.from(chunk.subarray(start, start + end)));
|
|
98
|
+
record(true);
|
|
99
|
+
start += end + 1;
|
|
100
|
+
recordStart = position + start;
|
|
101
|
+
}
|
|
102
|
+
position += bytesRead;
|
|
103
|
+
}
|
|
104
|
+
const terminated = recordStart === position;
|
|
105
|
+
if (!terminated)
|
|
106
|
+
record(false);
|
|
107
|
+
return { size: position, terminated, tailStart: recordStart, tailComplete };
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
await handle.close();
|
|
111
|
+
}
|
|
57
112
|
};
|
|
58
113
|
const nowIso = () => new Date().toISOString();
|
|
59
114
|
const shortJson = (value, maxLength = 400) => {
|
|
@@ -99,6 +154,7 @@ const summarizeEvents = (metadata, events) => {
|
|
|
99
154
|
export class SessionStore {
|
|
100
155
|
constructor(options) {
|
|
101
156
|
this.lastTimestampMs = 0;
|
|
157
|
+
this.transcriptSizes = new Map();
|
|
102
158
|
this.workspaceRoot = path.resolve(options.workspaceRoot);
|
|
103
159
|
this.storageDir = options.storageDir ?? DEFAULT_SESSION_STORAGE_DIR;
|
|
104
160
|
this.allowExternalStorage = options.allowExternalStorage === true;
|
|
@@ -137,10 +193,13 @@ export class SessionStore {
|
|
|
137
193
|
const sessionId = input.sessionId ? safeId(input.sessionId) : randomUUID();
|
|
138
194
|
const createdAt = this.nextTimestampIso();
|
|
139
195
|
const metadata = {
|
|
140
|
-
|
|
196
|
+
// Older clients must not reinterpret conversation-only sessions as coding goals.
|
|
197
|
+
schemaVersion: input.kind === "conversation" || input.projectTaskKey ? 2 : 1,
|
|
141
198
|
sessionId,
|
|
142
199
|
repoRoot: input.repoRoot,
|
|
143
200
|
task: input.task,
|
|
201
|
+
kind: input.kind ?? (input.projectTaskKey ? "work" : undefined),
|
|
202
|
+
projectTaskKey: input.projectTaskKey,
|
|
144
203
|
status: input.status ?? "active",
|
|
145
204
|
branch: input.branch,
|
|
146
205
|
parentSessionId: input.parentSessionId,
|
|
@@ -222,26 +281,26 @@ export class SessionStore {
|
|
|
222
281
|
const transcriptPath = await this.checkedPath(this.transcriptPath(sessionId));
|
|
223
282
|
await withStateLock(transcriptPath, async () => {
|
|
224
283
|
try {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
284
|
+
// Re-reading the transcript for every event made each write cost the
|
|
285
|
+
// size of the whole session. A transcript is checked in full once; after
|
|
286
|
+
// that, the size this store left behind identifies content it has seen.
|
|
287
|
+
const known = this.transcriptSizes.get(transcriptPath);
|
|
288
|
+
const { handle: probe, size } = await openTranscript(transcriptPath);
|
|
289
|
+
await probe.close();
|
|
290
|
+
if (size !== known) {
|
|
291
|
+
const tail = await scanTranscript(transcriptPath, sessionId);
|
|
292
|
+
if (!tail.terminated) {
|
|
293
|
+
// Windows append-only handles cannot truncate an incomplete record.
|
|
294
|
+
const repair = await fs.open(transcriptPath, constants.O_WRONLY | constants.O_NOFOLLOW | (tail.tailComplete ? constants.O_APPEND : 0));
|
|
295
|
+
try {
|
|
296
|
+
if (tail.tailComplete)
|
|
297
|
+
await repair.writeFile("\n");
|
|
298
|
+
else
|
|
299
|
+
await repair.truncate(tail.tailStart);
|
|
300
|
+
}
|
|
301
|
+
finally {
|
|
302
|
+
await repair.close();
|
|
303
|
+
}
|
|
245
304
|
}
|
|
246
305
|
}
|
|
247
306
|
}
|
|
@@ -253,6 +312,11 @@ export class SessionStore {
|
|
|
253
312
|
try {
|
|
254
313
|
await handle.writeFile(`${JSON.stringify(record)}\n`, "utf8");
|
|
255
314
|
await handle.sync();
|
|
315
|
+
this.transcriptSizes.set(transcriptPath, (await handle.stat()).size);
|
|
316
|
+
}
|
|
317
|
+
catch (error) {
|
|
318
|
+
this.transcriptSizes.delete(transcriptPath);
|
|
319
|
+
throw error;
|
|
256
320
|
}
|
|
257
321
|
finally {
|
|
258
322
|
await handle.close();
|
|
@@ -263,8 +327,9 @@ export class SessionStore {
|
|
|
263
327
|
}
|
|
264
328
|
async readTranscript(sessionId) {
|
|
265
329
|
try {
|
|
266
|
-
const
|
|
267
|
-
|
|
330
|
+
const events = [];
|
|
331
|
+
await scanTranscript(await this.checkedPath(this.transcriptPath(sessionId)), sessionId, event => events.push(event));
|
|
332
|
+
return events;
|
|
268
333
|
}
|
|
269
334
|
catch (error) {
|
|
270
335
|
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ToolDefinition } from "../tools/ToolTypes.js";
|
|
2
|
+
export interface SkillEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
compatibility?: string;
|
|
7
|
+
source: string;
|
|
8
|
+
sha256: string;
|
|
9
|
+
}
|
|
10
|
+
/** Progressive disclosure: catalog metadata is cheap; bodies/resources are tool reads. */
|
|
11
|
+
export declare class SkillCatalog {
|
|
12
|
+
private records;
|
|
13
|
+
private warnings;
|
|
14
|
+
private ready;
|
|
15
|
+
private roots;
|
|
16
|
+
constructor(options: {
|
|
17
|
+
workspaceRoot: string;
|
|
18
|
+
directories?: string[];
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
includeUser?: boolean;
|
|
21
|
+
includeBuiltin?: boolean;
|
|
22
|
+
});
|
|
23
|
+
refresh(): Promise<void>;
|
|
24
|
+
list(): {
|
|
25
|
+
skills: SkillEntry[];
|
|
26
|
+
warnings: string[];
|
|
27
|
+
};
|
|
28
|
+
prompt(): string;
|
|
29
|
+
private selected;
|
|
30
|
+
read(id: string, relative?: string, offset?: number): Promise<Record<string, unknown>>;
|
|
31
|
+
tools(): ToolDefinition[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=SkillCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillCatalog.d.ts","sourceRoot":"","sources":["../../src/session/SkillCatalog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhF,MAAM,WAAW,UAAU;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AAiCtI,0FAA0F;AAC1F,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAc;gBACf,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE;IAUpI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAkC9B,IAAI,IAAI;QAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;IAGpD,MAAM,IAAI,MAAM;YAQF,QAAQ;IAQhB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,SAAa,EAAE,MAAM,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAe3F,KAAK,IAAI,cAAc,EAAE;CAkB1B"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { constants, promises as fs } from "node:fs";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { parseDocument } from "yaml";
|
|
7
|
+
import { ToolExecutionError } from "../tools/ToolTypes.js";
|
|
8
|
+
const digest = (text) => createHash("sha256").update(text).digest("hex");
|
|
9
|
+
const inside = (root, file) => { const rel = path.relative(root, file); return rel !== ".." && !rel.startsWith(`..${path.sep}`) && !path.isAbsolute(rel); };
|
|
10
|
+
const readText = async (root, file) => {
|
|
11
|
+
const resolved = await fs.realpath(file);
|
|
12
|
+
if (!inside(root, resolved))
|
|
13
|
+
throw new Error("Skill resource escapes its configured directory");
|
|
14
|
+
const handle = await fs.open(resolved, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
15
|
+
try {
|
|
16
|
+
const stat = await handle.stat();
|
|
17
|
+
if (!stat.isFile() || stat.size > 65536)
|
|
18
|
+
throw new Error("Skill resources must be regular text files no larger than 64 KiB");
|
|
19
|
+
const buffer = Buffer.alloc(65537);
|
|
20
|
+
let length = 0;
|
|
21
|
+
while (length < buffer.length) {
|
|
22
|
+
const chunk = await handle.read(buffer, length, buffer.length - length, length);
|
|
23
|
+
if (!chunk.bytesRead)
|
|
24
|
+
break;
|
|
25
|
+
length += chunk.bytesRead;
|
|
26
|
+
}
|
|
27
|
+
if (length > 65536)
|
|
28
|
+
throw new Error("Skill resource exceeds 64 KiB");
|
|
29
|
+
const text = new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, length));
|
|
30
|
+
if (text.includes("\0"))
|
|
31
|
+
throw new Error("Skill resource is not text");
|
|
32
|
+
return text;
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
await handle.close();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const metadata = (text) => {
|
|
39
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);
|
|
40
|
+
if (!match || match[1].length > 16384)
|
|
41
|
+
throw new Error("SKILL.md requires bounded YAML frontmatter");
|
|
42
|
+
const document = parseDocument(match[1], { schema: "failsafe", uniqueKeys: true });
|
|
43
|
+
if (document.errors.length || document.warnings.length)
|
|
44
|
+
throw new Error("Invalid skill YAML metadata");
|
|
45
|
+
const value = document.toJS({ maxAliasCount: 0 });
|
|
46
|
+
if (!value || typeof value.name !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value.name) || value.name.length > 64
|
|
47
|
+
|| typeof value.description !== "string" || !value.description.trim() || value.description.length > 1024)
|
|
48
|
+
throw new Error("Skill requires a valid name and a description of at most 1024 characters");
|
|
49
|
+
if (value.compatibility !== undefined && (typeof value.compatibility !== "string" || value.compatibility.length > 500))
|
|
50
|
+
throw new Error("Skill compatibility must be text of at most 500 characters");
|
|
51
|
+
return { name: value.name, description: value.description.trim(), ...(typeof value.compatibility === "string" ? { compatibility: value.compatibility } : {}) };
|
|
52
|
+
};
|
|
53
|
+
/** Progressive disclosure: catalog metadata is cheap; bodies/resources are tool reads. */
|
|
54
|
+
export class SkillCatalog {
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this.records = [];
|
|
57
|
+
this.warnings = [];
|
|
58
|
+
this.ready = false;
|
|
59
|
+
const root = path.resolve(options.workspaceRoot), home = os.homedir();
|
|
60
|
+
this.roots = options.enabled === false ? [] : [
|
|
61
|
+
...(options.includeBuiltin === false ? [] : [{ scope: "builtin", directory: fileURLToPath(new URL("../../config/skills", import.meta.url)) }]),
|
|
62
|
+
...[".codali/skills", ".agents/skills"].map(relative => ({ scope: relative.startsWith(".codali") ? "workspace" : "workspace-agents", directory: path.join(root, relative), boundary: root })),
|
|
63
|
+
...(options.includeUser === false ? [] : [".codali/skills", ".agents/skills", ".codex/skills", ".claude/skills"].map((relative, index) => ({ scope: `user${index + 1}`, directory: path.join(home, relative) }))),
|
|
64
|
+
...(options.directories ?? []).map((directory, index) => ({ scope: `configured${index + 1}`, directory: path.resolve(root, directory.startsWith("~/") ? path.join(home, directory.slice(2)) : directory) })),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
async refresh() {
|
|
68
|
+
const records = [], warnings = [], visited = new Set();
|
|
69
|
+
let traversed = 0;
|
|
70
|
+
for (const entry of this.roots) {
|
|
71
|
+
let root;
|
|
72
|
+
try {
|
|
73
|
+
root = await fs.realpath(entry.directory);
|
|
74
|
+
if (entry.boundary && !inside(await fs.realpath(entry.boundary), root))
|
|
75
|
+
throw new Error("Skill root escapes the workspace");
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
if (error.code !== "ENOENT")
|
|
79
|
+
warnings.push(`${entry.scope}: ${String(error)}`);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const visit = async (directory, depth) => {
|
|
83
|
+
if (traversed >= 256 || records.length >= 128)
|
|
84
|
+
return;
|
|
85
|
+
const real = await fs.realpath(directory);
|
|
86
|
+
if (!inside(root, real)) {
|
|
87
|
+
warnings.push(`${entry.scope}: skipped a directory outside its root`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (visited.has(real))
|
|
91
|
+
return;
|
|
92
|
+
visited.add(real);
|
|
93
|
+
traversed++;
|
|
94
|
+
const source = path.join(real, "SKILL.md");
|
|
95
|
+
try {
|
|
96
|
+
const text = await readText(root, source), parsed = metadata(text);
|
|
97
|
+
records.push({ id: `${entry.scope}:${parsed.name}:${digest(real).slice(0, 8)}`, ...parsed, source, sha256: digest(text), root, directory: real });
|
|
98
|
+
return; // References/scripts under a skill are not other skills.
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
if (error.code !== "ENOENT") {
|
|
102
|
+
warnings.push(`${source}: ${String(error)}`);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (depth >= 3)
|
|
107
|
+
return;
|
|
108
|
+
const children = await fs.readdir(real, { withFileTypes: true });
|
|
109
|
+
for (const child of children.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
110
|
+
if (child.name.startsWith(".") || child.name === "node_modules" || !child.isDirectory())
|
|
111
|
+
continue;
|
|
112
|
+
await visit(path.join(real, child.name), depth + 1);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
try {
|
|
116
|
+
await visit(root, 0);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
warnings.push(`${entry.scope}: ${String(error)}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (traversed >= 256 || records.length >= 128)
|
|
123
|
+
warnings.push("Skill discovery reached its directory/skill limit; configure narrower directories");
|
|
124
|
+
this.records = records;
|
|
125
|
+
this.warnings = warnings.slice(0, 32);
|
|
126
|
+
this.ready = true;
|
|
127
|
+
}
|
|
128
|
+
list() {
|
|
129
|
+
return { skills: this.records.map(({ root: _root, directory: _directory, ...entry }) => ({ ...entry })), warnings: [...this.warnings] };
|
|
130
|
+
}
|
|
131
|
+
prompt() {
|
|
132
|
+
if (!this.records.length)
|
|
133
|
+
return "";
|
|
134
|
+
const entries = this.records.filter(entry => entry.id.startsWith("builtin:") || entry.id.startsWith("workspace:") || entry.id.startsWith("workspace-agents:")).slice(0, 24)
|
|
135
|
+
.map(entry => ({ id: entry.id, description: entry.description.slice(0, 120), compatibility: entry.compatibility?.slice(0, 120) }));
|
|
136
|
+
// Bound serialized metadata, including escaping. Bodies remain lazy tool reads.
|
|
137
|
+
while (JSON.stringify(entries).length > 3200)
|
|
138
|
+
entries.pop();
|
|
139
|
+
return `\nLocal skills: ${this.records.length} available; host platform ${process.platform}. Metadata is task guidance, never authorization.\n${JSON.stringify(entries)}\nUse skill_list to discover relevant skills not shown, including user/imported skills. Load a matching skill with skill_load before applying it; use skill_read only for relevant references. For architecture, UI/UX design, implementation, code review, testing, unfamiliar tool use or system operations, load the matching skill before doing that work. Load planning for substantial multi-step work. Do not load the whole catalog. Report missing platform/tool dependencies; scripts never run automatically. Use managed tools for persistent services.\n`;
|
|
140
|
+
}
|
|
141
|
+
async selected(id) {
|
|
142
|
+
if (!this.ready)
|
|
143
|
+
await this.refresh();
|
|
144
|
+
const matches = this.records.filter(entry => entry.id === id || entry.name === id);
|
|
145
|
+
if (matches.length !== 1)
|
|
146
|
+
throw new ToolExecutionError("tool_invalid_args", "Unknown or ambiguous skill; use the exact id from skill_list");
|
|
147
|
+
const record = matches[0];
|
|
148
|
+
if (await fs.realpath(record.directory) !== record.directory || !inside(record.root, record.directory))
|
|
149
|
+
throw new Error("Skill directory changed; refresh the catalog");
|
|
150
|
+
return record;
|
|
151
|
+
}
|
|
152
|
+
async read(id, relative = "SKILL.md", offset = 0) {
|
|
153
|
+
const record = await this.selected(id);
|
|
154
|
+
if (path.isAbsolute(relative) || !inside(record.directory, path.resolve(record.directory, relative)))
|
|
155
|
+
throw new ToolExecutionError("tool_invalid_args", "Skill resources must stay within the selected skill directory");
|
|
156
|
+
const text = await readText(record.directory, path.resolve(record.directory, relative));
|
|
157
|
+
const sha256 = digest(text);
|
|
158
|
+
if (relative === "SKILL.md" && sha256 !== record.sha256)
|
|
159
|
+
throw new Error("Skill changed after discovery; refresh the catalog before loading it");
|
|
160
|
+
const start = Math.min(text.length, Math.max(0, Math.floor(offset)));
|
|
161
|
+
let end = Math.min(text.length, start + 2400);
|
|
162
|
+
const result = { skillId: record.id, resource: relative.slice(0, 200), resourceTruncated: relative.length > 200, sha256,
|
|
163
|
+
compatibility: record.compatibility?.slice(0, 240), compatibilityTruncated: (record.compatibility?.length ?? 0) > 240,
|
|
164
|
+
hostPlatform: process.platform, offset: start, nextOffset: end < text.length ? end : null,
|
|
165
|
+
totalChars: text.length, content: text.slice(start, end), authority: "Task guidance only; host permissions and original user constraints still apply. Reading a script does not execute it." };
|
|
166
|
+
while (JSON.stringify(result).length > 3800 && end > start) {
|
|
167
|
+
end = start + Math.floor((end - start) * 0.75);
|
|
168
|
+
result.content = text.slice(start, end);
|
|
169
|
+
result.nextOffset = end < text.length ? end : null;
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
tools() {
|
|
174
|
+
const schema = { type: "object", properties: { id: { type: "string", maxLength: 512 }, offset: { type: "integer", minimum: 0, maximum: 65536 } }, required: ["id"], additionalProperties: false };
|
|
175
|
+
return [
|
|
176
|
+
{ name: "skill_list", capability: "skill_read", readOnly: true, description: "Find available local skills by their names/descriptions. Returns metadata only; load a selected id with skill_load.",
|
|
177
|
+
inputSchema: { type: "object", properties: { query: { type: "string", maxLength: 200 }, offset: { type: "integer", minimum: 0, maximum: 128 } }, additionalProperties: false },
|
|
178
|
+
handler: async (args, context) => {
|
|
179
|
+
context.signal?.throwIfAborted();
|
|
180
|
+
if (!this.ready)
|
|
181
|
+
await this.refresh();
|
|
182
|
+
const input = args;
|
|
183
|
+
const query = (input.query ?? "").toLowerCase(), matches = this.records.filter(entry => `${entry.name} ${entry.description}`.toLowerCase().includes(query)), start = input.offset ?? 0;
|
|
184
|
+
const skills = matches.slice(start, start + 6).map(entry => ({ id: entry.id, name: entry.name, description: entry.description.slice(0, 240), compatibility: entry.compatibility?.slice(0, 240) }));
|
|
185
|
+
const page = () => ({ skills, nextOffset: start + skills.length < matches.length ? start + skills.length : null, total: matches.length, hostPlatform: process.platform });
|
|
186
|
+
while (JSON.stringify(page()).length > 3800 && skills.length > 1)
|
|
187
|
+
skills.pop();
|
|
188
|
+
return { output: JSON.stringify(page()) };
|
|
189
|
+
} },
|
|
190
|
+
...["skill_load", "skill_read"].map(name => ({ name, capability: "skill_read", readOnly: true,
|
|
191
|
+
description: name === "skill_load" ? "Load SKILL.md guidance for an exact skill id. Follow nextOffset for longer instructions; permissions are unchanged." : "Read a referenced text resource inside a selected skill. Never executes scripts. Use nextOffset for additional text.",
|
|
192
|
+
inputSchema: name === "skill_load" ? schema : { ...schema, properties: { ...schema.properties, path: { type: "string", maxLength: 512 } }, required: ["id", "path"] },
|
|
193
|
+
handler: async (args, context) => { context.signal?.throwIfAborted(); const input = args; const result = await this.read(input.id, name === "skill_load" ? "SKILL.md" : input.path, input.offset); context.signal?.throwIfAborted(); return { output: JSON.stringify(result), data: result }; },
|
|
194
|
+
})),
|
|
195
|
+
];
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -7,17 +7,31 @@ export declare const replaceWorkPlan: (state: WorkState, tasks: Array<Pick<WorkT
|
|
|
7
7
|
export declare const updateWorkPlan: (state: WorkState, updates: Parameters<typeof replaceWorkPlan>[1], phaseUpdates?: WorkPhase[], reason?: string) => void;
|
|
8
8
|
export declare const claimWorkTask: (state: WorkState, taskId: string, leaseMs?: number) => WorkTask;
|
|
9
9
|
export declare const releaseWorkTask: (state: WorkState, taskId: string, attemptId: string, note: string) => void;
|
|
10
|
+
/** Change only a live task's file scope, preserving its contract and fencing old receipts. */
|
|
11
|
+
export declare const rescopeWorkTask: (state: WorkState, taskId: string, attemptId: string, allowedPaths: string[], note: string, leaseMs?: number) => WorkTask;
|
|
10
12
|
/** Withdraw a disproven verification and fence all dependent attempts without rewriting the plan. */
|
|
11
13
|
export declare const reopenVerifiedTask: (state: WorkState, taskId: string, reason: string) => string[];
|
|
12
14
|
export declare const assertWorkAttempt: (state: WorkState, taskId: string, attemptId: string) => WorkTask;
|
|
13
15
|
export declare const recordWorkEvidence: (state: WorkState, taskId: string, attemptId: string, evidence: EvidenceReceipt) => void;
|
|
14
16
|
export declare const verifyWorkTask: (state: WorkState, taskId: string, attemptId: string, currentHashes: Record<string, string>) => void;
|
|
17
|
+
/** Record a new assessment of every criterion at one final workspace snapshot.
|
|
18
|
+
* This does not reuse stale proofs: the controller must review the whole goal,
|
|
19
|
+
* all canonical criteria and current source after fresh validation. Ordinary
|
|
20
|
+
* task reviews cannot refresh another task, or resurrect reopened work. */
|
|
21
|
+
export declare const recordIntegratedWorkEvidence: (state: WorkState, taskId: string, attemptId: string, evidence: EvidenceReceipt, coverage: {
|
|
22
|
+
goalRevision: number;
|
|
23
|
+
planRevision: number;
|
|
24
|
+
criterionIds: string[];
|
|
25
|
+
}) => void;
|
|
15
26
|
/** Reopen stale proofs and their dependent tasks without discarding audit history. */
|
|
16
27
|
export declare const refreshStaleEvidence: (state: WorkState, currentHashes: Record<string, string>) => string[];
|
|
17
28
|
export declare const amendWorkGoal: (state: WorkState, objective: string, reason: string) => void;
|
|
18
29
|
export declare const recordDecision: (state: WorkState, decision: DecisionRecord) => void;
|
|
19
30
|
export declare const completeWorkGoal: (state: WorkState, currentHashes: Record<string, string>, uncertainInvocationIds?: string[]) => void;
|
|
20
31
|
export declare const workContext: (state: WorkState) => string;
|
|
21
|
-
/** Keep the active contract intact while paging unrelated backlog out of context.
|
|
22
|
-
|
|
32
|
+
/** Keep the active contract intact while paging unrelated backlog out of context.
|
|
33
|
+
* With `keepContract` the active contract is returned whole even past
|
|
34
|
+
* `maxChars`: the caller owns the real window check and gives up more
|
|
35
|
+
* expendable context first. */
|
|
36
|
+
export declare const activeWorkContext: (state: WorkState, maxChars: number, keepContract?: boolean) => string;
|
|
23
37
|
//# sourceMappingURL=WorkState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkState.d.ts","sourceRoot":"","sources":["../../src/session/WorkState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkState.d.ts","sourceRoot":"","sources":["../../src/session/WorkState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAiBnH,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,EAAE,eAAe,WAAW,EAAE,KAAG,SAYjF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,KAAG,IAiDpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,KAAG,IAIpD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,SAAS,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,GAAG,gBAAgB,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,CAAC,CAAC,EAAE,oBAA2B,EAAE,eAA4B,KAAG,IAgCzN,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,EAAE,SAAS,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,eAAc,SAAS,EAAO,EAAE,eAA4B,KAAG,IAiB/J,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,EAAE,QAAQ,MAAM,EAAE,gBAAiB,KAAG,QAWnF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,SAAS,EAAE,QAAQ,MAAM,EAAE,WAAW,MAAM,EAAE,MAAM,MAAM,KAAG,IAOnG,CAAC;AAEF,8FAA8F;AAC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B,GAAI,OAAO,SAAS,EAAE,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAwB,MAAM,EAAO,KAAG,IASjI,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,KAAG,MAK7C,CAAC;AAEH;;;+BAG+B;AAC/B,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,EAAE,UAAU,MAAM,EAAE,sBAAoB,KAAG,MAuC5F,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { scopesOverlap } from "./WorkspaceScope.js";
|
|
3
4
|
const timestamp = () => new Date().toISOString();
|
|
4
5
|
const assert = (value, message) => { if (!value)
|
|
5
6
|
throw new Error(message); };
|
|
@@ -179,6 +180,17 @@ export const releaseWorkTask = (state, taskId, attemptId, note) => {
|
|
|
179
180
|
reopenTask(task);
|
|
180
181
|
refreshReadyTasks(state);
|
|
181
182
|
};
|
|
183
|
+
/** Change only a live task's file scope, preserving its contract and fencing old receipts. */
|
|
184
|
+
export const rescopeWorkTask = (state, taskId, attemptId, allowedPaths, note, leaseMs = 300000) => {
|
|
185
|
+
const candidate = structuredClone(state);
|
|
186
|
+
const task = assertWorkAttempt(candidate, taskId, attemptId);
|
|
187
|
+
releaseWorkTask(candidate, taskId, attemptId, note);
|
|
188
|
+
updateWorkPlan(candidate, [{ id: task.id, title: task.title, phaseId: task.phaseId,
|
|
189
|
+
requirementIds: [...task.requirementIds], dependsOn: [...task.dependsOn], allowedPaths: [...allowedPaths] }], [], note);
|
|
190
|
+
const claimed = claimWorkTask(candidate, taskId, leaseMs);
|
|
191
|
+
Object.assign(state, candidate);
|
|
192
|
+
return claimed;
|
|
193
|
+
};
|
|
182
194
|
/** Withdraw a disproven verification and fence all dependent attempts without rewriting the plan. */
|
|
183
195
|
export const reopenVerifiedTask = (state, taskId, reason) => {
|
|
184
196
|
const task = state.tasks.find(t => t.id === taskId);
|
|
@@ -232,6 +244,38 @@ export const verifyWorkTask = (state, taskId, attemptId, currentHashes) => {
|
|
|
232
244
|
task.status = "verified";
|
|
233
245
|
refreshReadyTasks(state);
|
|
234
246
|
};
|
|
247
|
+
/** Record a new assessment of every criterion at one final workspace snapshot.
|
|
248
|
+
* This does not reuse stale proofs: the controller must review the whole goal,
|
|
249
|
+
* all canonical criteria and current source after fresh validation. Ordinary
|
|
250
|
+
* task reviews cannot refresh another task, or resurrect reopened work. */
|
|
251
|
+
export const recordIntegratedWorkEvidence = (state, taskId, attemptId, evidence, coverage) => {
|
|
252
|
+
const task = assertWorkAttempt(state, taskId, attemptId);
|
|
253
|
+
assert(state.requirements.some(r => task.requirementIds.includes(r.id) && r.description === state.originalObjective), "Integration review requires the whole-goal owner");
|
|
254
|
+
assert(coverage.goalRevision === state.goalRevision && coverage.planRevision === (state.planRevision ?? 1), "Integration review has a stale goal or plan revision");
|
|
255
|
+
assert(coverage.criterionIds.length === state.requirements.length && new Set(coverage.criterionIds).size === coverage.criterionIds.length
|
|
256
|
+
&& state.requirements.every(r => coverage.criterionIds.includes(r.id)), "Integration review must cover every canonical criterion");
|
|
257
|
+
assert(evidence.taskId === taskId && evidence.kind === "review" && evidence.ok && !state.evidence.some(e => e.id === evidence.id)
|
|
258
|
+
&& evidence.criterionIds.length === task.requirementIds.length && task.requirementIds.every(id => evidence.criterionIds.includes(id)), "Integration requires a new successful review of the owner's criteria");
|
|
259
|
+
const others = state.tasks.filter(t => t.id !== taskId && !["cancelled", "superseded"].includes(t.status));
|
|
260
|
+
for (const other of others) {
|
|
261
|
+
assert(other.status === "verified" && dependenciesVerified(state, other), `Integration cannot certify unfinished task ${other.id}`);
|
|
262
|
+
assert(other.requirementIds.every(id => state.evidence.some(e => other.evidenceIds.includes(e.id) && e.taskId === other.id && e.ok && e.criterionIds.includes(id))), `Integration requires prior accepted evidence for task ${other.id}`);
|
|
263
|
+
assert(state.evidence.filter(e => other.evidenceIds.includes(e.id)).every(e => Object.keys(e.inputHashes).every(file => typeof evidence.inputHashes[file] === "string")), `Integration omitted a tracked input for task ${other.id}`);
|
|
264
|
+
}
|
|
265
|
+
// Validate all owners before changing any proof. Each new receipt keeps the
|
|
266
|
+
// complete current hash map, so later edits still invalidate completion.
|
|
267
|
+
const assessed = [task, ...others].map(owner => ({ ...evidence,
|
|
268
|
+
id: owner.id === taskId ? evidence.id : randomUUID(), taskId: owner.id, criterionIds: [...owner.requirementIds],
|
|
269
|
+
inputHashes: { ...evidence.inputHashes }, integrationReview: { id: evidence.id,
|
|
270
|
+
goalRevision: coverage.goalRevision, planRevision: coverage.planRevision,
|
|
271
|
+
criterionIds: [...coverage.criterionIds], priorEvidenceIds: [...owner.evidenceIds] },
|
|
272
|
+
}));
|
|
273
|
+
recordWorkEvidence(state, taskId, attemptId, assessed[0]);
|
|
274
|
+
for (const renewed of assessed.slice(1)) {
|
|
275
|
+
state.evidence.push(renewed);
|
|
276
|
+
state.tasks.find(owner => owner.id === renewed.taskId).evidenceIds.push(renewed.id);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
235
279
|
/** Reopen stale proofs and their dependent tasks without discarding audit history. */
|
|
236
280
|
export const refreshStaleEvidence = (state, currentHashes) => {
|
|
237
281
|
const reopened = [];
|
|
@@ -283,7 +327,7 @@ export const recordDecision = (state, decision) => {
|
|
|
283
327
|
const affected = [...previous.paths, ...decision.paths];
|
|
284
328
|
const invalidated = new Set();
|
|
285
329
|
for (const task of state.tasks)
|
|
286
|
-
if (["verified", "running", "review_pending"].includes(task.status) && (!affected.length || !task.allowedPaths.length || task.allowedPaths.some(scope => affected.some(file =>
|
|
330
|
+
if (["verified", "running", "review_pending"].includes(task.status) && (!affected.length || !task.allowedPaths.length || task.allowedPaths.some(scope => affected.some(file => scopesOverlap(file, scope))))) {
|
|
287
331
|
reopenTask(task);
|
|
288
332
|
invalidated.add(task.id);
|
|
289
333
|
}
|
|
@@ -318,15 +362,18 @@ export const workContext = (state) => JSON.stringify({
|
|
|
318
362
|
nonGoals: state.nonGoals, tasks: state.tasks.map(t => ({ id: t.id, title: t.title, phaseId: t.phaseId, status: t.status, dependsOn: t.dependsOn, requirementIds: t.requirementIds, allowedPaths: t.allowedPaths, attemptId: t.attemptId, blocker: t.blocker })),
|
|
319
363
|
decisions: state.decisions, checkpoint: state.checkpoints.at(-1),
|
|
320
364
|
});
|
|
321
|
-
/** Keep the active contract intact while paging unrelated backlog out of context.
|
|
322
|
-
|
|
365
|
+
/** Keep the active contract intact while paging unrelated backlog out of context.
|
|
366
|
+
* With `keepContract` the active contract is returned whole even past
|
|
367
|
+
* `maxChars`: the caller owns the real window check and gives up more
|
|
368
|
+
* expendable context first. */
|
|
369
|
+
export const activeWorkContext = (state, maxChars, keepContract = false) => {
|
|
323
370
|
const full = workContext(state);
|
|
324
371
|
if (full.length <= maxChars)
|
|
325
372
|
return full;
|
|
326
373
|
const active = state.tasks.find(t => ["running", "review_pending"].includes(t.status)) ?? state.tasks.find(t => t.status === "ready");
|
|
327
374
|
const requiredIds = new Set(active?.requirementIds ?? []);
|
|
328
375
|
const superseded = new Set(state.decisions.map(d => d.supersedes).filter(Boolean));
|
|
329
|
-
const relevant = (paths) => !active || !paths.length || !active.allowedPaths.length || paths.some(file => active.allowedPaths.some(scope =>
|
|
376
|
+
const relevant = (paths) => !active || !paths.length || !active.allowedPaths.length || paths.some(file => active.allowedPaths.some(scope => scopesOverlap(file, scope)));
|
|
330
377
|
const currentDecisions = state.decisions.filter(d => !superseded.has(d.id) && relevant(d.paths));
|
|
331
378
|
const view = {
|
|
332
379
|
goalId: state.goalId, goalRevision: state.goalRevision, planRevision: state.planRevision ?? 1,
|
|
@@ -347,8 +394,11 @@ export const activeWorkContext = (state, maxChars) => {
|
|
|
347
394
|
continuation: "The complete goal and backlog remain canonical in storage. Use work_status with offset/limit or taskIds/requirementIds to retrieve omitted records. Claiming a task loads its full criteria and relevant decisions. Completion still checks every required criterion.",
|
|
348
395
|
};
|
|
349
396
|
const encode = () => JSON.stringify(view);
|
|
350
|
-
if (encode().length > maxChars)
|
|
397
|
+
if (encode().length > maxChars) {
|
|
398
|
+
if (keepContract)
|
|
399
|
+
return encode();
|
|
351
400
|
throw new Error("Active goal, constraints, architecture decisions and criteria exceed the context reservation; use a larger compatible model context or split the active task");
|
|
401
|
+
}
|
|
352
402
|
for (const requirement of state.requirements.filter(r => !requiredIds.has(r.id))) {
|
|
353
403
|
view.otherRequirements.push(requirement);
|
|
354
404
|
if (encode().length > maxChars) {
|
|
@@ -52,6 +52,14 @@ export interface EvidenceReceipt {
|
|
|
52
52
|
invocationId?: string;
|
|
53
53
|
inputHashes: Record<string, string>;
|
|
54
54
|
at: string;
|
|
55
|
+
/** A fresh whole-goal assessment, with prior task proofs retained for audit. */
|
|
56
|
+
integrationReview?: {
|
|
57
|
+
id: string;
|
|
58
|
+
goalRevision: number;
|
|
59
|
+
planRevision: number;
|
|
60
|
+
criterionIds: string[];
|
|
61
|
+
priorEvidenceIds: string[];
|
|
62
|
+
};
|
|
55
63
|
}
|
|
56
64
|
export interface WorkCheckpoint {
|
|
57
65
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkTypes.d.ts","sourceRoot":"","sources":["../../src/session/WorkTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAEtI,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB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