@a5c-ai/agent-platform 5.0.1-staging.b436b3b3e611
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 +53 -0
- package/dist/anycli/cache.d.ts +45 -0
- package/dist/anycli/cache.d.ts.map +1 -0
- package/dist/anycli/cache.js +118 -0
- package/dist/anycli/index.d.ts +10 -0
- package/dist/anycli/index.d.ts.map +1 -0
- package/dist/anycli/index.js +25 -0
- package/dist/anycli/types.d.ts +32 -0
- package/dist/anycli/types.d.ts.map +1 -0
- package/dist/anycli/types.js +9 -0
- package/dist/api/breakpoints.d.ts +93 -0
- package/dist/api/breakpoints.d.ts.map +1 -0
- package/dist/api/breakpoints.js +334 -0
- package/dist/api/effects.d.ts +14 -0
- package/dist/api/effects.d.ts.map +1 -0
- package/dist/api/effects.js +306 -0
- package/dist/api/effectsTypes.d.ts +79 -0
- package/dist/api/effectsTypes.d.ts.map +1 -0
- package/dist/api/effectsTypes.js +6 -0
- package/dist/api/eventStream.d.ts +34 -0
- package/dist/api/eventStream.d.ts.map +1 -0
- package/dist/api/eventStream.js +126 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +27 -0
- package/dist/api/runs.d.ts +85 -0
- package/dist/api/runs.d.ts.map +1 -0
- package/dist/api/runs.js +247 -0
- package/dist/api/utils.d.ts +28 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api/utils.js +74 -0
- package/dist/breakpoints/approvalChains.d.ts +68 -0
- package/dist/breakpoints/approvalChains.d.ts.map +1 -0
- package/dist/breakpoints/approvalChains.js +111 -0
- package/dist/breakpoints/delegation.d.ts +42 -0
- package/dist/breakpoints/delegation.d.ts.map +1 -0
- package/dist/breakpoints/delegation.js +199 -0
- package/dist/breakpoints/delegationTypes.d.ts +46 -0
- package/dist/breakpoints/delegationTypes.d.ts.map +1 -0
- package/dist/breakpoints/delegationTypes.js +10 -0
- package/dist/breakpoints/postures.d.ts +28 -0
- package/dist/breakpoints/postures.d.ts.map +1 -0
- package/dist/breakpoints/postures.js +100 -0
- package/dist/cli/amuxEventsFormatter.d.ts +26 -0
- package/dist/cli/amuxEventsFormatter.d.ts.map +1 -0
- package/dist/cli/amuxEventsFormatter.js +86 -0
- package/dist/cli/args/argFlags.d.ts +6 -0
- package/dist/cli/args/argFlags.d.ts.map +1 -0
- package/dist/cli/args/argFlags.js +72 -0
- package/dist/cli/args/argPositionals.d.ts +3 -0
- package/dist/cli/args/argPositionals.d.ts.map +1 -0
- package/dist/cli/args/argPositionals.js +18 -0
- package/dist/cli/args/index.d.ts +4 -0
- package/dist/cli/args/index.d.ts.map +1 -0
- package/dist/cli/args/index.js +75 -0
- package/dist/cli/args/types.d.ts +13 -0
- package/dist/cli/args/types.d.ts.map +1 -0
- package/dist/cli/args/types.js +2 -0
- package/dist/cli/commands/daemon.d.ts +31 -0
- package/dist/cli/commands/daemon.d.ts.map +1 -0
- package/dist/cli/commands/daemon.js +156 -0
- package/dist/cli/commands/harness/createRun.d.ts +3 -0
- package/dist/cli/commands/harness/createRun.d.ts.map +1 -0
- package/dist/cli/commands/harness/createRun.js +8 -0
- package/dist/cli/commands/harness/resumeRun.d.ts +20 -0
- package/dist/cli/commands/harness/resumeRun.d.ts.map +1 -0
- package/dist/cli/commands/harness/resumeRun.js +341 -0
- package/dist/cli/commands/jsonlInteractive.d.ts +35 -0
- package/dist/cli/commands/jsonlInteractive.d.ts.map +1 -0
- package/dist/cli/commands/jsonlInteractive.js +302 -0
- package/dist/cli/commands/mcpServe.d.ts +18 -0
- package/dist/cli/commands/mcpServe.d.ts.map +1 -0
- package/dist/cli/commands/mcpServe.js +59 -0
- package/dist/cli/commands/session/history.d.ts +14 -0
- package/dist/cli/commands/session/history.d.ts.map +1 -0
- package/dist/cli/commands/session/history.js +100 -0
- package/dist/cli/commands/tui.d.ts +23 -0
- package/dist/cli/commands/tui.d.ts.map +1 -0
- package/dist/cli/commands/tui.js +183 -0
- package/dist/cli/dispatch.d.ts +4 -0
- package/dist/cli/dispatch.d.ts.map +1 -0
- package/dist/cli/dispatch.js +332 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +41 -0
- package/dist/cli/program.d.ts +7 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +8 -0
- package/dist/cli/ui.d.ts +9 -0
- package/dist/cli/ui.d.ts.map +1 -0
- package/dist/cli/ui.js +125 -0
- package/dist/compression/compaction.d.ts +82 -0
- package/dist/compression/compaction.d.ts.map +1 -0
- package/dist/compression/compaction.js +310 -0
- package/dist/cost/claudeCodeParser.d.ts +81 -0
- package/dist/cost/claudeCodeParser.d.ts.map +1 -0
- package/dist/cost/claudeCodeParser.js +232 -0
- package/dist/cost/collector.d.ts +42 -0
- package/dist/cost/collector.d.ts.map +1 -0
- package/dist/cost/collector.js +105 -0
- package/dist/cost/effectCost.d.ts +23 -0
- package/dist/cost/effectCost.d.ts.map +1 -0
- package/dist/cost/effectCost.js +26 -0
- package/dist/cost/index.d.ts +7 -0
- package/dist/cost/index.d.ts.map +1 -0
- package/dist/cost/index.js +28 -0
- package/dist/cost/journal.d.ts +40 -0
- package/dist/cost/journal.d.ts.map +1 -0
- package/dist/cost/journal.js +137 -0
- package/dist/cost/types.d.ts +164 -0
- package/dist/cost/types.d.ts.map +1 -0
- package/dist/cost/types.js +228 -0
- package/dist/daemon/automationExecutor.d.ts +16 -0
- package/dist/daemon/automationExecutor.d.ts.map +1 -0
- package/dist/daemon/automationExecutor.js +222 -0
- package/dist/daemon/config.d.ts +8 -0
- package/dist/daemon/config.d.ts.map +1 -0
- package/dist/daemon/config.js +209 -0
- package/dist/daemon/daemonLog.d.ts +13 -0
- package/dist/daemon/daemonLog.d.ts.map +1 -0
- package/dist/daemon/daemonLog.js +64 -0
- package/dist/daemon/fileWatcher.d.ts +9 -0
- package/dist/daemon/fileWatcher.d.ts.map +1 -0
- package/dist/daemon/fileWatcher.js +141 -0
- package/dist/daemon/index.d.ts +7 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +21 -0
- package/dist/daemon/lifecycle.d.ts +12 -0
- package/dist/daemon/lifecycle.d.ts.map +1 -0
- package/dist/daemon/lifecycle.js +257 -0
- package/dist/daemon/loop.d.ts +21 -0
- package/dist/daemon/loop.d.ts.map +1 -0
- package/dist/daemon/loop.js +196 -0
- package/dist/daemon/timerScheduler.d.ts +13 -0
- package/dist/daemon/timerScheduler.d.ts.map +1 -0
- package/dist/daemon/timerScheduler.js +122 -0
- package/dist/daemon/types.d.ts +93 -0
- package/dist/daemon/types.d.ts.map +1 -0
- package/dist/daemon/types.js +25 -0
- package/dist/daemon/webhookListener.d.ts +6 -0
- package/dist/daemon/webhookListener.d.ts.map +1 -0
- package/dist/daemon/webhookListener.js +110 -0
- package/dist/governance/authority.d.ts +68 -0
- package/dist/governance/authority.d.ts.map +1 -0
- package/dist/governance/authority.js +136 -0
- package/dist/governance/bridge.d.ts +17 -0
- package/dist/governance/bridge.d.ts.map +1 -0
- package/dist/governance/bridge.js +46 -0
- package/dist/governance/builtins.d.ts +25 -0
- package/dist/governance/builtins.d.ts.map +1 -0
- package/dist/governance/builtins.js +67 -0
- package/dist/governance/categories.d.ts +58 -0
- package/dist/governance/categories.d.ts.map +1 -0
- package/dist/governance/categories.js +120 -0
- package/dist/governance/decisionTrail.d.ts +60 -0
- package/dist/governance/decisionTrail.d.ts.map +1 -0
- package/dist/governance/decisionTrail.js +68 -0
- package/dist/governance/engine.d.ts +20 -0
- package/dist/governance/engine.d.ts.map +1 -0
- package/dist/governance/engine.js +124 -0
- package/dist/governance/index.d.ts +20 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +75 -0
- package/dist/governance/logging.d.ts +18 -0
- package/dist/governance/logging.d.ts.map +1 -0
- package/dist/governance/logging.js +83 -0
- package/dist/governance/mandate.d.ts +83 -0
- package/dist/governance/mandate.d.ts.map +1 -0
- package/dist/governance/mandate.js +180 -0
- package/dist/governance/permissionEvents.d.ts +51 -0
- package/dist/governance/permissionEvents.d.ts.map +1 -0
- package/dist/governance/permissionEvents.js +52 -0
- package/dist/governance/permissionPropagation.d.ts +18 -0
- package/dist/governance/permissionPropagation.d.ts.map +1 -0
- package/dist/governance/permissionPropagation.js +58 -0
- package/dist/governance/postureBridge.d.ts +17 -0
- package/dist/governance/postureBridge.d.ts.map +1 -0
- package/dist/governance/postureBridge.js +117 -0
- package/dist/governance/sandboxBridge.d.ts +49 -0
- package/dist/governance/sandboxBridge.d.ts.map +1 -0
- package/dist/governance/sandboxBridge.js +77 -0
- package/dist/governance/sandboxPolicy.d.ts +51 -0
- package/dist/governance/sandboxPolicy.d.ts.map +1 -0
- package/dist/governance/sandboxPolicy.js +177 -0
- package/dist/governance/types.d.ts +3 -0
- package/dist/governance/types.d.ts.map +1 -0
- package/dist/governance/types.js +5 -0
- package/dist/harness/amux/amuxBridge.d.ts +71 -0
- package/dist/harness/amux/amuxBridge.d.ts.map +1 -0
- package/dist/harness/amux/amuxBridge.js +117 -0
- package/dist/harness/amux/amuxClientFactory.d.ts +29 -0
- package/dist/harness/amux/amuxClientFactory.d.ts.map +1 -0
- package/dist/harness/amux/amuxClientFactory.js +90 -0
- package/dist/harness/amux/amuxEventEmitter.d.ts +51 -0
- package/dist/harness/amux/amuxEventEmitter.d.ts.map +1 -0
- package/dist/harness/amux/amuxEventEmitter.js +143 -0
- package/dist/harness/amux/amuxEventMapper.d.ts +58 -0
- package/dist/harness/amux/amuxEventMapper.d.ts.map +1 -0
- package/dist/harness/amux/amuxEventMapper.js +92 -0
- package/dist/harness/amux/amuxHarnessMap.d.ts +25 -0
- package/dist/harness/amux/amuxHarnessMap.d.ts.map +1 -0
- package/dist/harness/amux/amuxHarnessMap.js +55 -0
- package/dist/harness/amux/amuxStdinReader.d.ts +45 -0
- package/dist/harness/amux/amuxStdinReader.d.ts.map +1 -0
- package/dist/harness/amux/amuxStdinReader.js +106 -0
- package/dist/harness/amux/amuxTypes.d.ts +122 -0
- package/dist/harness/amux/amuxTypes.d.ts.map +1 -0
- package/dist/harness/amux/amuxTypes.js +11 -0
- package/dist/harness/amux/index.d.ts +17 -0
- package/dist/harness/amux/index.d.ts.map +1 -0
- package/dist/harness/amux/index.js +34 -0
- package/dist/harness/backgroundTracker.d.ts +64 -0
- package/dist/harness/backgroundTracker.d.ts.map +1 -0
- package/dist/harness/backgroundTracker.js +107 -0
- package/dist/harness/builtInHarness.d.ts +3 -0
- package/dist/harness/builtInHarness.d.ts.map +1 -0
- package/dist/harness/builtInHarness.js +18 -0
- package/dist/harness/capabilityRouter.d.ts +76 -0
- package/dist/harness/capabilityRouter.d.ts.map +1 -0
- package/dist/harness/capabilityRouter.js +176 -0
- package/dist/harness/fallbackChains.d.ts +42 -0
- package/dist/harness/fallbackChains.d.ts.map +1 -0
- package/dist/harness/fallbackChains.js +69 -0
- package/dist/harness/hostContract.d.ts +63 -0
- package/dist/harness/hostContract.d.ts.map +1 -0
- package/dist/harness/hostContract.js +136 -0
- package/dist/harness/index.d.ts +10 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +66 -0
- package/dist/harness/internal/createRun/askUserQuestion.d.ts +11 -0
- package/dist/harness/internal/createRun/askUserQuestion.d.ts.map +1 -0
- package/dist/harness/internal/createRun/askUserQuestion.js +162 -0
- package/dist/harness/internal/createRun/index.d.ts +25 -0
- package/dist/harness/internal/createRun/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/index.js +137 -0
- package/dist/harness/internal/createRun/orchestration/constants.d.ts +7 -0
- package/dist/harness/internal/createRun/orchestration/constants.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/constants.js +13 -0
- package/dist/harness/internal/createRun/orchestration/effects.d.ts +43 -0
- package/dist/harness/internal/createRun/orchestration/effects.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/effects.js +490 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.d.ts +20 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.js +79 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.d.ts +3 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.js +319 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.d.ts +16 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.js +104 -0
- package/dist/harness/internal/createRun/orchestration/index.d.ts +14 -0
- package/dist/harness/internal/createRun/orchestration/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/index.js +36 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.d.ts +3 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.js +464 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.d.ts +26 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.js +262 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.d.ts +17 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.js +23 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.d.ts +10 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.js +67 -0
- package/dist/harness/internal/createRun/orchestration/types.d.ts +46 -0
- package/dist/harness/internal/createRun/orchestration/types.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/types.js +2 -0
- package/dist/harness/internal/createRun/orchestration/verbose.d.ts +7 -0
- package/dist/harness/internal/createRun/orchestration/verbose.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/verbose.js +240 -0
- package/dist/harness/internal/createRun/output.d.ts +38 -0
- package/dist/harness/internal/createRun/output.d.ts.map +1 -0
- package/dist/harness/internal/createRun/output.js +415 -0
- package/dist/harness/internal/createRun/pi.d.ts +34 -0
- package/dist/harness/internal/createRun/pi.d.ts.map +1 -0
- package/dist/harness/internal/createRun/pi.js +216 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.d.ts +5 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.js +113 -0
- package/dist/harness/internal/createRun/planProcess/delegation.d.ts +23 -0
- package/dist/harness/internal/createRun/planProcess/delegation.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/delegation.js +176 -0
- package/dist/harness/internal/createRun/planProcess/external.d.ts +14 -0
- package/dist/harness/internal/createRun/planProcess/external.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/external.js +139 -0
- package/dist/harness/internal/createRun/planProcess/index.d.ts +12 -0
- package/dist/harness/internal/createRun/planProcess/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/index.js +24 -0
- package/dist/harness/internal/createRun/planProcess/paths.d.ts +7 -0
- package/dist/harness/internal/createRun/planProcess/paths.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/paths.js +98 -0
- package/dist/harness/internal/createRun/planProcess/phase.d.ts +6 -0
- package/dist/harness/internal/createRun/planProcess/phase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phase.js +361 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.d.ts +37 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.js +159 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.d.ts +25 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.js +6 -0
- package/dist/harness/internal/createRun/planProcess/prompts.d.ts +20 -0
- package/dist/harness/internal/createRun/planProcess/prompts.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/prompts.js +208 -0
- package/dist/harness/internal/createRun/planProcess/recovery.d.ts +18 -0
- package/dist/harness/internal/createRun/planProcess/recovery.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/recovery.js +188 -0
- package/dist/harness/internal/createRun/planProcess/recovery.test.d.ts +2 -0
- package/dist/harness/internal/createRun/planProcess/recovery.test.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/recovery.test.js +68 -0
- package/dist/harness/internal/createRun/planProcess/runState.d.ts +40 -0
- package/dist/harness/internal/createRun/planProcess/runState.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/runState.js +179 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.d.ts +22 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.js +65 -0
- package/dist/harness/internal/createRun/planProcess/validation.d.ts +2 -0
- package/dist/harness/internal/createRun/planProcess/validation.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validation.js +212 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.d.ts +11 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.js +328 -0
- package/dist/harness/internal/createRun/planProcess/validationText.d.ts +3 -0
- package/dist/harness/internal/createRun/planProcess/validationText.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validationText.js +145 -0
- package/dist/harness/internal/createRun/prompts.d.ts +49 -0
- package/dist/harness/internal/createRun/prompts.d.ts.map +1 -0
- package/dist/harness/internal/createRun/prompts.js +307 -0
- package/dist/harness/internal/createRun/resumeState.d.ts +28 -0
- package/dist/harness/internal/createRun/resumeState.d.ts.map +1 -0
- package/dist/harness/internal/createRun/resumeState.js +133 -0
- package/dist/harness/internal/createRun/utils.d.ts +182 -0
- package/dist/harness/internal/createRun/utils.d.ts.map +1 -0
- package/dist/harness/internal/createRun/utils.js +133 -0
- package/dist/harness/internal.d.ts +13 -0
- package/dist/harness/internal.d.ts.map +1 -0
- package/dist/harness/internal.js +149 -0
- package/dist/harness/invoker/launch.d.ts +20 -0
- package/dist/harness/invoker/launch.d.ts.map +1 -0
- package/dist/harness/invoker/launch.js +23 -0
- package/dist/harness/invoker/processControl.d.ts +11 -0
- package/dist/harness/invoker/processControl.d.ts.map +1 -0
- package/dist/harness/invoker/processControl.js +50 -0
- package/dist/harness/invoker.d.ts +43 -0
- package/dist/harness/invoker.d.ts.map +1 -0
- package/dist/harness/invoker.js +210 -0
- package/dist/harness/modeSelector.d.ts +50 -0
- package/dist/harness/modeSelector.d.ts.map +1 -0
- package/dist/harness/modeSelector.js +124 -0
- package/dist/harness/modelSelection.d.ts +37 -0
- package/dist/harness/modelSelection.d.ts.map +1 -0
- package/dist/harness/modelSelection.js +81 -0
- package/dist/harness/operatorCommands.d.ts +38 -0
- package/dist/harness/operatorCommands.d.ts.map +1 -0
- package/dist/harness/operatorCommands.js +118 -0
- package/dist/harness/piSecureSandbox.d.ts +8 -0
- package/dist/harness/piSecureSandbox.d.ts.map +1 -0
- package/dist/harness/piSecureSandbox.js +366 -0
- package/dist/harness/piSecureSandboxTypes.d.ts +51 -0
- package/dist/harness/piSecureSandboxTypes.d.ts.map +1 -0
- package/dist/harness/piSecureSandboxTypes.js +6 -0
- package/dist/harness/piWrapper/compaction.d.ts +13 -0
- package/dist/harness/piWrapper/compaction.d.ts.map +1 -0
- package/dist/harness/piWrapper/compaction.js +38 -0
- package/dist/harness/piWrapper/instructionPrompts.d.ts +2 -0
- package/dist/harness/piWrapper/instructionPrompts.d.ts.map +1 -0
- package/dist/harness/piWrapper/instructionPrompts.js +97 -0
- package/dist/harness/piWrapper/moduleSupport.d.ts +77 -0
- package/dist/harness/piWrapper/moduleSupport.d.ts.map +1 -0
- package/dist/harness/piWrapper/moduleSupport.js +204 -0
- package/dist/harness/piWrapper.d.ts +80 -0
- package/dist/harness/piWrapper.d.ts.map +1 -0
- package/dist/harness/piWrapper.js +389 -0
- package/dist/harness/piWrapper.test.d.ts +2 -0
- package/dist/harness/piWrapper.test.d.ts.map +1 -0
- package/dist/harness/piWrapper.test.js +193 -0
- package/dist/harness/planMode.d.ts +68 -0
- package/dist/harness/planMode.d.ts.map +1 -0
- package/dist/harness/planMode.js +145 -0
- package/dist/harness/selectionPolicies.d.ts +29 -0
- package/dist/harness/selectionPolicies.d.ts.map +1 -0
- package/dist/harness/selectionPolicies.js +165 -0
- package/dist/harness/types.d.ts +266 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/harness/types.js +34 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/interaction/askUserQuestion/core.d.ts +8 -0
- package/dist/interaction/askUserQuestion/core.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion/core.js +112 -0
- package/dist/interaction/askUserQuestion/terminal.d.ts +15 -0
- package/dist/interaction/askUserQuestion/terminal.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion/terminal.js +128 -0
- package/dist/interaction/askUserQuestion.d.ts +10 -0
- package/dist/interaction/askUserQuestion.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion.js +295 -0
- package/dist/interaction/askUserQuestionTypes.d.ts +31 -0
- package/dist/interaction/askUserQuestionTypes.d.ts.map +1 -0
- package/dist/interaction/askUserQuestionTypes.js +6 -0
- package/dist/interaction/index.d.ts +4 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/interaction/index.js +20 -0
- package/dist/interaction/interactionRouter.d.ts +25 -0
- package/dist/interaction/interactionRouter.d.ts.map +1 -0
- package/dist/interaction/interactionRouter.js +55 -0
- package/dist/mcp/channels/allowlist.d.ts +19 -0
- package/dist/mcp/channels/allowlist.d.ts.map +1 -0
- package/dist/mcp/channels/allowlist.js +140 -0
- package/dist/mcp/channels/channelManager.d.ts +64 -0
- package/dist/mcp/channels/channelManager.d.ts.map +1 -0
- package/dist/mcp/channels/channelManager.js +137 -0
- package/dist/mcp/channels/inboundQueue.d.ts +47 -0
- package/dist/mcp/channels/inboundQueue.d.ts.map +1 -0
- package/dist/mcp/channels/inboundQueue.js +96 -0
- package/dist/mcp/channels/index.d.ts +17 -0
- package/dist/mcp/channels/index.d.ts.map +1 -0
- package/dist/mcp/channels/index.js +39 -0
- package/dist/mcp/channels/outbound.d.ts +33 -0
- package/dist/mcp/channels/outbound.d.ts.map +1 -0
- package/dist/mcp/channels/outbound.js +94 -0
- package/dist/mcp/channels/permissionRelay.d.ts +62 -0
- package/dist/mcp/channels/permissionRelay.d.ts.map +1 -0
- package/dist/mcp/channels/permissionRelay.js +159 -0
- package/dist/mcp/channels/types.d.ts +135 -0
- package/dist/mcp/channels/types.d.ts.map +1 -0
- package/dist/mcp/channels/types.js +16 -0
- package/dist/mcp/client/config.d.ts +28 -0
- package/dist/mcp/client/config.d.ts.map +1 -0
- package/dist/mcp/client/config.js +142 -0
- package/dist/mcp/client/executor.d.ts +30 -0
- package/dist/mcp/client/executor.d.ts.map +1 -0
- package/dist/mcp/client/executor.js +60 -0
- package/dist/mcp/client/index.d.ts +12 -0
- package/dist/mcp/client/index.d.ts.map +1 -0
- package/dist/mcp/client/index.js +27 -0
- package/dist/mcp/client/manager.d.ts +74 -0
- package/dist/mcp/client/manager.d.ts.map +1 -0
- package/dist/mcp/client/manager.js +214 -0
- package/dist/mcp/client/toolRegistry.d.ts +50 -0
- package/dist/mcp/client/toolRegistry.d.ts.map +1 -0
- package/dist/mcp/client/toolRegistry.js +118 -0
- package/dist/mcp/client/types.d.ts +96 -0
- package/dist/mcp/client/types.d.ts.map +1 -0
- package/dist/mcp/client/types.js +15 -0
- package/dist/mcp/transport/index.d.ts +9 -0
- package/dist/mcp/transport/index.d.ts.map +1 -0
- package/dist/mcp/transport/index.js +13 -0
- package/dist/mcp/transport/session.d.ts +18 -0
- package/dist/mcp/transport/session.d.ts.map +1 -0
- package/dist/mcp/transport/session.js +78 -0
- package/dist/mcp/transport/types.d.ts +19 -0
- package/dist/mcp/transport/types.d.ts.map +1 -0
- package/dist/mcp/transport/types.js +7 -0
- package/dist/mcp/transport/websocket.d.ts +41 -0
- package/dist/mcp/transport/websocket.d.ts.map +1 -0
- package/dist/mcp/transport/websocket.js +271 -0
- package/dist/observability/health.d.ts +19 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/health.js +129 -0
- package/dist/observability/index.d.ts +7 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +22 -0
- package/dist/observability/runStatus.d.ts +44 -0
- package/dist/observability/runStatus.d.ts.map +1 -0
- package/dist/observability/runStatus.js +169 -0
- package/dist/observability/timeline.d.ts +11 -0
- package/dist/observability/timeline.d.ts.map +1 -0
- package/dist/observability/timeline.js +176 -0
- package/dist/observability/types.d.ts +62 -0
- package/dist/observability/types.d.ts.map +1 -0
- package/dist/observability/types.js +8 -0
- package/dist/observability/webhooks.d.ts +68 -0
- package/dist/observability/webhooks.d.ts.map +1 -0
- package/dist/observability/webhooks.js +132 -0
- package/dist/prompts/commandTemplates.d.ts +3 -0
- package/dist/prompts/commandTemplates.d.ts.map +1 -0
- package/dist/prompts/commandTemplates.js +238 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +28 -0
- package/dist/seams/contract.d.ts +55 -0
- package/dist/seams/contract.d.ts.map +1 -0
- package/dist/seams/contract.js +120 -0
- package/dist/seams/contract.test.d.ts +2 -0
- package/dist/seams/contract.test.d.ts.map +1 -0
- package/dist/seams/contract.test.js +96 -0
- package/dist/seams/index.d.ts +3 -0
- package/dist/seams/index.d.ts.map +1 -0
- package/dist/seams/index.js +8 -0
- package/dist/session/context.d.ts +22 -0
- package/dist/session/context.d.ts.map +1 -0
- package/dist/session/context.js +113 -0
- package/dist/session/continuityState.d.ts +39 -0
- package/dist/session/continuityState.d.ts.map +1 -0
- package/dist/session/continuityState.js +164 -0
- package/dist/session/cost.d.ts +63 -0
- package/dist/session/cost.d.ts.map +1 -0
- package/dist/session/cost.js +194 -0
- package/dist/session/discovery.d.ts +22 -0
- package/dist/session/discovery.d.ts.map +1 -0
- package/dist/session/discovery.js +35 -0
- package/dist/session/history.d.ts +30 -0
- package/dist/session/history.d.ts.map +1 -0
- package/dist/session/history.js +143 -0
- package/dist/session/index.d.ts +7 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +70 -0
- package/dist/session/memoryExtraction.d.ts +65 -0
- package/dist/session/memoryExtraction.d.ts.map +1 -0
- package/dist/session/memoryExtraction.js +201 -0
- package/dist/session/parse.d.ts +45 -0
- package/dist/session/parse.d.ts.map +1 -0
- package/dist/session/parse.js +170 -0
- package/dist/session/persistence.d.ts +46 -0
- package/dist/session/persistence.d.ts.map +1 -0
- package/dist/session/persistence.js +180 -0
- package/dist/session/types.d.ts +267 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +45 -0
- package/dist/session/write.d.ts +61 -0
- package/dist/session/write.d.ts.map +1 -0
- package/dist/session/write.js +213 -0
- package/dist/storage/atomic.d.ts +2 -0
- package/dist/storage/atomic.d.ts.map +1 -0
- package/dist/storage/atomic.js +54 -0
- package/dist/storage/clock.d.ts +2 -0
- package/dist/storage/clock.d.ts.map +1 -0
- package/dist/storage/clock.js +6 -0
- package/dist/storage/index.d.ts +7 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +9 -0
- package/dist/storage/journalWatcher.d.ts +24 -0
- package/dist/storage/journalWatcher.d.ts.map +1 -0
- package/dist/storage/journalWatcher.js +172 -0
- package/dist/storage/paths.d.ts +5 -0
- package/dist/storage/paths.d.ts.map +1 -0
- package/dist/storage/paths.js +26 -0
- package/dist/storage/snapshotState.d.ts +10 -0
- package/dist/storage/snapshotState.d.ts.map +1 -0
- package/dist/storage/snapshotState.js +15 -0
- package/dist/storage/storeTaskArtifacts.d.ts +6 -0
- package/dist/storage/storeTaskArtifacts.d.ts.map +1 -0
- package/dist/storage/storeTaskArtifacts.js +55 -0
- package/dist/storage/types.d.ts +21 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +2 -0
- package/dist/tasks/crud.d.ts +33 -0
- package/dist/tasks/crud.d.ts.map +1 -0
- package/dist/tasks/crud.js +150 -0
- package/dist/tasks/index.d.ts +2 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +9 -0
- package/package.json +141 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderCommandTemplate = renderCommandTemplate;
|
|
4
|
+
const babysitter_sdk_1 = require("@a5c-ai/babysitter-sdk");
|
|
5
|
+
const COMMAND_TEMPLATE_CONTEXT = {
|
|
6
|
+
harness: "harness-command-template",
|
|
7
|
+
harnessLabel: "Harness Command Template",
|
|
8
|
+
interactive: undefined,
|
|
9
|
+
capabilities: [],
|
|
10
|
+
platform: process.platform,
|
|
11
|
+
pluginRootVar: "",
|
|
12
|
+
loopControlTerm: "",
|
|
13
|
+
sessionBindingFlags: "",
|
|
14
|
+
hookDriven: false,
|
|
15
|
+
interactiveToolName: "",
|
|
16
|
+
sessionEnvVars: "",
|
|
17
|
+
resumeFlags: "",
|
|
18
|
+
sdkVersionExpr: "",
|
|
19
|
+
hasIntentFidelityChecks: false,
|
|
20
|
+
hasNonNegotiables: false,
|
|
21
|
+
cliSetupSnippet: "",
|
|
22
|
+
iterateFlags: "",
|
|
23
|
+
};
|
|
24
|
+
const ANYCLI_TEMPLATE = `[ANYCLI MODE] Dynamic service integration agent for any external service
|
|
25
|
+
|
|
26
|
+
Target service: {{serviceName}}
|
|
27
|
+
Scope: {{scope}}
|
|
28
|
+
{{#mcpMode}}MCP mode: enabled (transport: {{transport}}){{/mcpMode}}
|
|
29
|
+
{{^mcpMode}}Mode: ad-hoc execution{{/mcpMode}}
|
|
30
|
+
{{#authFile}}Auth file: {{authFile}}{{/authFile}}
|
|
31
|
+
{{#userPrompt}}User request: {{userPrompt}}{{/userPrompt}}
|
|
32
|
+
|
|
33
|
+
You are a service integration agent. You handle EVERYTHING dynamically: researching the service, figuring out authentication, writing code, and generating MCP servers. There are no pre-built templates or hardcoded patterns -- you discover and create everything at runtime based on what you learn about the service.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Phase 1: Service Discovery
|
|
38
|
+
|
|
39
|
+
**Goal:** Learn everything about **{{serviceName}}** and build a service definition.
|
|
40
|
+
|
|
41
|
+
### 1a. Check Cache
|
|
42
|
+
|
|
43
|
+
Check \`~/.a5c/anycli/cache/{{serviceName}}/cache.json\` for an existing cache entry.
|
|
44
|
+
|
|
45
|
+
If found, inspect \`definition\`, \`modules\`, and \`metadata.createdAt\`. You decide whether the cache is fresh enough to use. If the definition covers the requested scope (\`{{scope}}\`), skip to Phase 3 or 4.
|
|
46
|
+
|
|
47
|
+
### 1b. Research the Service
|
|
48
|
+
|
|
49
|
+
If no usable cache exists, research **{{serviceName}}** thoroughly:
|
|
50
|
+
|
|
51
|
+
1. **Web search** for official API documentation, OpenAPI/Swagger specs, developer guides.
|
|
52
|
+
2. **Identify**: base URL(s), API versioning scheme, authentication methods (specific to THIS service -- not generic patterns), rate limits, pagination style, error response format.
|
|
53
|
+
3. **Check** for existing CLI tools, SDKs (npm/pip/etc.), or MCP servers that already integrate with this service.
|
|
54
|
+
4. **Filter by scope**: \`{{scope}}\` -- if \`*\`, cover all major endpoint groups. If comma-separated, focus on those specific areas.
|
|
55
|
+
|
|
56
|
+
### 1c. Build the Definition
|
|
57
|
+
|
|
58
|
+
Construct a service definition object with whatever structure makes sense for **{{serviceName}}**. There is no rigid schema -- include the fields that are relevant:
|
|
59
|
+
|
|
60
|
+
- \`name\`, \`apiBaseUrl\`, \`displayName\`, \`description\`
|
|
61
|
+
- Authentication details specific to this service
|
|
62
|
+
- Endpoint groups filtered by scope
|
|
63
|
+
- Any service-specific metadata (rate limits, pagination, versioning, etc.)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 2: Auth Resolution
|
|
68
|
+
|
|
69
|
+
**Goal:** Figure out what credentials **{{serviceName}}** needs and find them.
|
|
70
|
+
|
|
71
|
+
This is entirely service-specific. Do NOT use generic patterns like \`SERVICE_API_KEY\`. Instead:
|
|
72
|
+
|
|
73
|
+
1. **Read the service docs** to understand what auth method(s) it supports (API keys, OAuth2, bearer tokens, basic auth, etc.) and what the credentials look like.
|
|
74
|
+
{{#authFile}}
|
|
75
|
+
2. **Check the auth file** at \`{{authFile}}\` for credentials. Parse it as \`.env\` or JSON format.
|
|
76
|
+
{{/authFile}}
|
|
77
|
+
{{^authFile}}
|
|
78
|
+
2. **No auth file provided**, skip to next step.
|
|
79
|
+
{{/authFile}}
|
|
80
|
+
3. **Check environment variables** using the naming conventions that are standard for THIS specific service. For example: \`GITHUB_TOKEN\` for GitHub, \`STRIPE_API_KEY\` for Stripe, \`OPENAI_API_KEY\` for OpenAI -- whatever the service's own docs and ecosystem use.
|
|
81
|
+
4. **Check workspace \`.env\`** file for the same service-specific variable names.
|
|
82
|
+
5. **If credentials are missing**, report exactly what is needed, where to get it (with links to the service's credential/API key page if known), and what env var name to use.
|
|
83
|
+
|
|
84
|
+
**Security:** Never log or hardcode credentials. Generated code must read credentials from environment variables at runtime.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Phase 3: Code Generation
|
|
89
|
+
|
|
90
|
+
**Goal:** Write utility modules (\`.mjs\` files) based on what you learned about **{{serviceName}}**.
|
|
91
|
+
|
|
92
|
+
You decide the module structure, function signatures, and types based on the service's actual API. General guidelines:
|
|
93
|
+
|
|
94
|
+
- **HTTP client**: Use \`fetch()\` only -- zero external dependencies. Include auth headers, retries on 429/5xx, and the service's pagination pattern.
|
|
95
|
+
- **Scope modules**: One file per scope group with async functions for each endpoint. Full JSDoc.
|
|
96
|
+
- **Barrel export**: An \`index.mjs\` re-exporting everything.
|
|
97
|
+
- **No hardcoded credentials**: Read from env vars at runtime.
|
|
98
|
+
|
|
99
|
+
Write all modules to \`~/.a5c/anycli/cache/{{serviceName}}/modules/\`.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
{{#mcpMode}}
|
|
104
|
+
## Phase 4: MCP Server Generation
|
|
105
|
+
|
|
106
|
+
**Goal:** Write and start a complete MCP server for **{{serviceName}}**.
|
|
107
|
+
|
|
108
|
+
Write a self-contained \`mcp-server.mjs\` file from scratch using \`@modelcontextprotocol/sdk\` patterns:
|
|
109
|
+
|
|
110
|
+
- Import \`McpServer\` from \`@modelcontextprotocol/sdk/server/mcp.js\`
|
|
111
|
+
- Import the appropriate transport for \`{{transport}}\`:
|
|
112
|
+
- \`stdio\`: \`StdioServerTransport\` from \`.../server/stdio.js\`
|
|
113
|
+
- \`http-sse\`: \`SSEServerTransport\` from \`.../server/sse.js\`
|
|
114
|
+
- Register MCP tools based on the scope modules you generated
|
|
115
|
+
- Each tool: descriptive name (\`{{serviceName}}_<action>\`), JSON Schema input, handler that calls the scope module functions
|
|
116
|
+
- Graceful shutdown on SIGINT/SIGTERM
|
|
117
|
+
|
|
118
|
+
Save to \`~/.a5c/anycli/cache/{{serviceName}}/mcp-server.mjs\` and start it.
|
|
119
|
+
|
|
120
|
+
Output MCP client config for the user:
|
|
121
|
+
\`\`\`json
|
|
122
|
+
{ "name": "{{serviceName}}-anycli", "transport": "{{transport}}",
|
|
123
|
+
"command": "node", "args": ["~/.a5c/anycli/cache/{{serviceName}}/mcp-server.mjs"] }
|
|
124
|
+
\`\`\`
|
|
125
|
+
{{/mcpMode}}
|
|
126
|
+
|
|
127
|
+
{{^mcpMode}}
|
|
128
|
+
## Phase 4: Ad-hoc Execution
|
|
129
|
+
|
|
130
|
+
**Goal:** Fulfill the user's request using the generated modules.
|
|
131
|
+
|
|
132
|
+
{{#userPrompt}}
|
|
133
|
+
### Execute request:
|
|
134
|
+
> {{userPrompt}}
|
|
135
|
+
|
|
136
|
+
1. Determine which API calls are needed.
|
|
137
|
+
2. Import the generated modules from \`~/.a5c/anycli/cache/{{serviceName}}/modules/\`.
|
|
138
|
+
3. Execute operations in logical order, chaining multi-step calls as needed.
|
|
139
|
+
4. Present results clearly: tables for lists, formatted JSON for objects, summaries for aggregations.
|
|
140
|
+
{{/userPrompt}}
|
|
141
|
+
|
|
142
|
+
{{^userPrompt}}
|
|
143
|
+
### Interactive discovery:
|
|
144
|
+
No specific request provided. List the generated modules and their exported functions with descriptions and parameters. Suggest common use cases for **{{serviceName}}** and ask the user what they want to do.
|
|
145
|
+
{{/userPrompt}}
|
|
146
|
+
{{/mcpMode}}
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Phase 5: Caching
|
|
151
|
+
|
|
152
|
+
**Goal:** Save everything to \`~/.a5c/anycli/cache/{{serviceName}}/cache.json\` for reuse.
|
|
153
|
+
|
|
154
|
+
Write a single cache entry with this structure:
|
|
155
|
+
\`\`\`json
|
|
156
|
+
{
|
|
157
|
+
"service": "{{serviceName}}",
|
|
158
|
+
"definition": { "...your service definition from Phase 1..." },
|
|
159
|
+
"modules": { "filename.mjs": "...file content..." },
|
|
160
|
+
"metadata": {
|
|
161
|
+
"createdAt": "<ISO timestamp>",
|
|
162
|
+
"sdkVersion": "<version>",
|
|
163
|
+
"definitionHash": "<hash of the definition>"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
\`\`\`
|
|
167
|
+
|
|
168
|
+
The harness package provides \`readServiceCache\`, \`writeServiceCache\`, \`invalidateServiceCache\`, and \`listCachedServices\` functions in \`@a5c-ai/agent-platform\` (anycli module) for this purpose.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Phase 6: Verification
|
|
173
|
+
|
|
174
|
+
1. **Syntax check**: \`node --check\` on each generated \`.mjs\` file.
|
|
175
|
+
2. **Import check**: Dynamic import of \`modules/index.mjs\` to verify exports.
|
|
176
|
+
3. **Smoke test**: If auth is available, make one lightweight API call (health endpoint or list with limit=1).
|
|
177
|
+
{{#mcpMode}}
|
|
178
|
+
4. **MCP validation**: Verify the server module loads and tool count matches expectations.
|
|
179
|
+
{{/mcpMode}}
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Error Handling
|
|
184
|
+
|
|
185
|
+
- **Unknown service**: Report, suggest alternative names or provide a base URL. Stop.
|
|
186
|
+
- **Missing credentials**: Report what was tried, provide setup instructions with the correct env var names for this service. Stop.
|
|
187
|
+
- **Rate limiting**: Wait if reset < 60s, otherwise report partial results.
|
|
188
|
+
- **Network errors**: Report endpoint URL and error. Suggest checking connectivity.
|
|
189
|
+
- **Security invariant**: Never include credentials in output, errors, logs, or generated comments.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Output Format
|
|
194
|
+
|
|
195
|
+
\`\`\`
|
|
196
|
+
==============================================
|
|
197
|
+
ANYCLI SERVICE INTEGRATION REPORT
|
|
198
|
+
Service: {{serviceName}} Scope: {{scope}}
|
|
199
|
+
==============================================
|
|
200
|
+
|
|
201
|
+
OVERALL STATUS: <READY | PARTIAL | FAILED>
|
|
202
|
+
|
|
203
|
+
| # | Phase | Status |
|
|
204
|
+
|----|--------------------|--------|
|
|
205
|
+
| 1 | Service Discovery | <s> |
|
|
206
|
+
| 2 | Auth Resolution | <s> |
|
|
207
|
+
| 3 | Code Generation | <s> |
|
|
208
|
+
| 4 | Execution | <s> |
|
|
209
|
+
| 5 | Caching | <s> |
|
|
210
|
+
| 6 | Verification | <s> |
|
|
211
|
+
|
|
212
|
+
Cache: ~/.a5c/anycli/cache/{{serviceName}}/
|
|
213
|
+
Modules: <list> Endpoints: <count> Auth: <method> (<source>)
|
|
214
|
+
{{#mcpMode}}
|
|
215
|
+
MCP server: ~/.a5c/anycli/cache/{{serviceName}}/mcp-server.mjs
|
|
216
|
+
Transport: {{transport}}
|
|
217
|
+
{{/mcpMode}}
|
|
218
|
+
\`\`\`
|
|
219
|
+
|
|
220
|
+
**Status:** READY = all phases passed. PARTIAL = warnings but no failures. FAILED = any phase failed.
|
|
221
|
+
{{#mcpMode}}
|
|
222
|
+
Include MCP connection instructions for the user's harness.
|
|
223
|
+
{{/mcpMode}}
|
|
224
|
+
{{^mcpMode}}
|
|
225
|
+
{{#userPrompt}}
|
|
226
|
+
Include execution results prominently before the phase summary.
|
|
227
|
+
{{/userPrompt}}
|
|
228
|
+
{{/mcpMode}}
|
|
229
|
+
`;
|
|
230
|
+
function renderAnycliTemplate(extras) {
|
|
231
|
+
return (0, babysitter_sdk_1.renderTemplateString)(ANYCLI_TEMPLATE, COMMAND_TEMPLATE_CONTEXT, extras);
|
|
232
|
+
}
|
|
233
|
+
function renderCommandTemplate(templateName, extras) {
|
|
234
|
+
if (templateName === "anycli") {
|
|
235
|
+
return renderAnycliTemplate(extras);
|
|
236
|
+
}
|
|
237
|
+
return (0, babysitter_sdk_1.renderCommandTemplate)(templateName, extras);
|
|
238
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createRun, orchestrateIteration, commitEffectResult, commitEffectCancellation, createReplayEngine, createProcessContext, withProcessContext, getActiveProcessContext, requireProcessContext, STATE_CACHE_SCHEMA_VERSION, createStateCacheSnapshot, journalHeadsEqual, normalizeJournalHead, normalizeSnapshot, readStateCache, rebuildStateCache, writeStateCache, hashInvocationKey, EffectRequestedError, EffectPendingError, EffectCancelledError, ParallelPendingError, RunFailedError, replaySchemaVersion, } from "@a5c-ai/babysitter-sdk";
|
|
2
|
+
export type { OrchestrateOptions, IterationResult, EffectAction, CommitEffectResultOptions, CommitEffectResultArtifacts, ProcessContext, DefinedTask, CreateRunOptions, CreateRunResult, ReplayEngine, CreateReplayEngineOptions, StateCacheSnapshot, StateCacheJournalHead, DerivedEffectSummary, } from "@a5c-ai/babysitter-sdk";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaySchemaVersion = exports.RunFailedError = exports.ParallelPendingError = exports.EffectCancelledError = exports.EffectPendingError = exports.EffectRequestedError = exports.hashInvocationKey = exports.writeStateCache = exports.rebuildStateCache = exports.readStateCache = exports.normalizeSnapshot = exports.normalizeJournalHead = exports.journalHeadsEqual = exports.createStateCacheSnapshot = exports.STATE_CACHE_SCHEMA_VERSION = exports.requireProcessContext = exports.getActiveProcessContext = exports.withProcessContext = exports.createProcessContext = exports.createReplayEngine = exports.commitEffectCancellation = exports.commitEffectResult = exports.orchestrateIteration = exports.createRun = void 0;
|
|
4
|
+
var babysitter_sdk_1 = require("@a5c-ai/babysitter-sdk");
|
|
5
|
+
Object.defineProperty(exports, "createRun", { enumerable: true, get: function () { return babysitter_sdk_1.createRun; } });
|
|
6
|
+
Object.defineProperty(exports, "orchestrateIteration", { enumerable: true, get: function () { return babysitter_sdk_1.orchestrateIteration; } });
|
|
7
|
+
Object.defineProperty(exports, "commitEffectResult", { enumerable: true, get: function () { return babysitter_sdk_1.commitEffectResult; } });
|
|
8
|
+
Object.defineProperty(exports, "commitEffectCancellation", { enumerable: true, get: function () { return babysitter_sdk_1.commitEffectCancellation; } });
|
|
9
|
+
Object.defineProperty(exports, "createReplayEngine", { enumerable: true, get: function () { return babysitter_sdk_1.createReplayEngine; } });
|
|
10
|
+
Object.defineProperty(exports, "createProcessContext", { enumerable: true, get: function () { return babysitter_sdk_1.createProcessContext; } });
|
|
11
|
+
Object.defineProperty(exports, "withProcessContext", { enumerable: true, get: function () { return babysitter_sdk_1.withProcessContext; } });
|
|
12
|
+
Object.defineProperty(exports, "getActiveProcessContext", { enumerable: true, get: function () { return babysitter_sdk_1.getActiveProcessContext; } });
|
|
13
|
+
Object.defineProperty(exports, "requireProcessContext", { enumerable: true, get: function () { return babysitter_sdk_1.requireProcessContext; } });
|
|
14
|
+
Object.defineProperty(exports, "STATE_CACHE_SCHEMA_VERSION", { enumerable: true, get: function () { return babysitter_sdk_1.STATE_CACHE_SCHEMA_VERSION; } });
|
|
15
|
+
Object.defineProperty(exports, "createStateCacheSnapshot", { enumerable: true, get: function () { return babysitter_sdk_1.createStateCacheSnapshot; } });
|
|
16
|
+
Object.defineProperty(exports, "journalHeadsEqual", { enumerable: true, get: function () { return babysitter_sdk_1.journalHeadsEqual; } });
|
|
17
|
+
Object.defineProperty(exports, "normalizeJournalHead", { enumerable: true, get: function () { return babysitter_sdk_1.normalizeJournalHead; } });
|
|
18
|
+
Object.defineProperty(exports, "normalizeSnapshot", { enumerable: true, get: function () { return babysitter_sdk_1.normalizeSnapshot; } });
|
|
19
|
+
Object.defineProperty(exports, "readStateCache", { enumerable: true, get: function () { return babysitter_sdk_1.readStateCache; } });
|
|
20
|
+
Object.defineProperty(exports, "rebuildStateCache", { enumerable: true, get: function () { return babysitter_sdk_1.rebuildStateCache; } });
|
|
21
|
+
Object.defineProperty(exports, "writeStateCache", { enumerable: true, get: function () { return babysitter_sdk_1.writeStateCache; } });
|
|
22
|
+
Object.defineProperty(exports, "hashInvocationKey", { enumerable: true, get: function () { return babysitter_sdk_1.hashInvocationKey; } });
|
|
23
|
+
Object.defineProperty(exports, "EffectRequestedError", { enumerable: true, get: function () { return babysitter_sdk_1.EffectRequestedError; } });
|
|
24
|
+
Object.defineProperty(exports, "EffectPendingError", { enumerable: true, get: function () { return babysitter_sdk_1.EffectPendingError; } });
|
|
25
|
+
Object.defineProperty(exports, "EffectCancelledError", { enumerable: true, get: function () { return babysitter_sdk_1.EffectCancelledError; } });
|
|
26
|
+
Object.defineProperty(exports, "ParallelPendingError", { enumerable: true, get: function () { return babysitter_sdk_1.ParallelPendingError; } });
|
|
27
|
+
Object.defineProperty(exports, "RunFailedError", { enumerable: true, get: function () { return babysitter_sdk_1.RunFailedError; } });
|
|
28
|
+
Object.defineProperty(exports, "replaySchemaVersion", { enumerable: true, get: function () { return babysitter_sdk_1.replaySchemaVersion; } });
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type BabysitterAgentSeamVisibility = "public" | "internal";
|
|
2
|
+
export interface BabysitterAgentSeamContract {
|
|
3
|
+
id: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
visibility: BabysitterAgentSeamVisibility;
|
|
6
|
+
responsibilities: string[];
|
|
7
|
+
directories: string[];
|
|
8
|
+
packageExports: string[];
|
|
9
|
+
validationCommands: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare const BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS: readonly ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
12
|
+
export declare const babysitterAgentSeamContracts: readonly [{
|
|
13
|
+
readonly id: "runtime-foundation";
|
|
14
|
+
readonly owner: "runtime-core";
|
|
15
|
+
readonly visibility: "public";
|
|
16
|
+
readonly responsibilities: ["Own orchestration/runtime helpers that remain aligned with the SDK replay model.", "Own persisted run state, session continuity, task artifacts, and prompt/compression helpers used by runtime flows.", "Provide the default leaf seam to validate before proposing any extraction of runtime internals."];
|
|
17
|
+
readonly directories: ["runtime", "session", "storage", "tasks", "prompts", "compression"];
|
|
18
|
+
readonly packageExports: ["./runtime", "./session", "./storage", "./tasks"];
|
|
19
|
+
readonly validationCommands: ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "governance-control";
|
|
22
|
+
readonly owner: "governance-control";
|
|
23
|
+
readonly visibility: "public";
|
|
24
|
+
readonly responsibilities: ["Own policy, authority, posture, and breakpoint decision logic.", "Keep human-approval flows and governance enforcement aligned before any package split is attempted."];
|
|
25
|
+
readonly directories: ["governance", "breakpoints"];
|
|
26
|
+
readonly packageExports: ["./governance"];
|
|
27
|
+
readonly validationCommands: ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
28
|
+
}, {
|
|
29
|
+
readonly id: "integration-bridges";
|
|
30
|
+
readonly owner: "harness-integration";
|
|
31
|
+
readonly visibility: "public";
|
|
32
|
+
readonly responsibilities: ["Own harness invocation, agent-core integration, MCP transport/client glue, and API-facing orchestration adapters.", "Keep external integration surfaces grouped under one review boundary until a narrower runtime seam proves real."];
|
|
33
|
+
readonly directories: ["harness", "mcp", "api", "anycli"];
|
|
34
|
+
readonly packageExports: ["./harness", "./api", "./anycli"];
|
|
35
|
+
readonly validationCommands: ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: "operator-surfaces";
|
|
38
|
+
readonly owner: "runtime-operations";
|
|
39
|
+
readonly visibility: "public";
|
|
40
|
+
readonly responsibilities: ["Own operator-facing surfaces such as the CLI, daemon lifecycle, interaction UX, cost reporting, and observability helpers.", "Contain operational changes so user-facing workflows can be validated without reopening every runtime concern."];
|
|
41
|
+
readonly directories: ["cli", "daemon", "interaction", "observability", "cost"];
|
|
42
|
+
readonly packageExports: ["./cli", "./daemon", "./interaction", "./observability", "./cost"];
|
|
43
|
+
readonly validationCommands: ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
44
|
+
}, {
|
|
45
|
+
readonly id: "seam-contract";
|
|
46
|
+
readonly owner: "v6-architecture";
|
|
47
|
+
readonly visibility: "public";
|
|
48
|
+
readonly responsibilities: ["Own the executable manifest that assigns every top-level src domain to a slice.", "Prevent new package-level domains from appearing without an explicit owner, visibility, and validation gate."];
|
|
49
|
+
readonly directories: ["seams"];
|
|
50
|
+
readonly packageExports: ["./seams"];
|
|
51
|
+
readonly validationCommands: ["npm run build --workspace=@a5c-ai/agent-platform", "npm run test --workspace=@a5c-ai/agent-platform"];
|
|
52
|
+
}];
|
|
53
|
+
export declare function listBabysitterAgentSeamDirectories(): string[];
|
|
54
|
+
export declare function listBabysitterAgentPublicExports(): string[];
|
|
55
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/seams/contract.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,6BAA6B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,6BAA6B,CAAC;IAC1C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,eAAO,MAAM,yCAAyC,kHAG5C,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGkB,CAAC;AAE5D,wBAAgB,kCAAkC,IAAI,MAAM,EAAE,CAE7D;AAED,wBAAgB,gCAAgC,IAAI,MAAM,EAAE,CAE3D"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.babysitterAgentSeamContracts = exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS = void 0;
|
|
4
|
+
exports.listBabysitterAgentSeamDirectories = listBabysitterAgentSeamDirectories;
|
|
5
|
+
exports.listBabysitterAgentPublicExports = listBabysitterAgentPublicExports;
|
|
6
|
+
exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS = [
|
|
7
|
+
"npm run build --workspace=@a5c-ai/agent-platform",
|
|
8
|
+
"npm run test --workspace=@a5c-ai/agent-platform",
|
|
9
|
+
];
|
|
10
|
+
exports.babysitterAgentSeamContracts = [
|
|
11
|
+
{
|
|
12
|
+
id: "runtime-foundation",
|
|
13
|
+
owner: "runtime-core",
|
|
14
|
+
visibility: "public",
|
|
15
|
+
responsibilities: [
|
|
16
|
+
"Own orchestration/runtime helpers that remain aligned with the SDK replay model.",
|
|
17
|
+
"Own persisted run state, session continuity, task artifacts, and prompt/compression helpers used by runtime flows.",
|
|
18
|
+
"Provide the default leaf seam to validate before proposing any extraction of runtime internals.",
|
|
19
|
+
],
|
|
20
|
+
directories: [
|
|
21
|
+
"runtime",
|
|
22
|
+
"session",
|
|
23
|
+
"storage",
|
|
24
|
+
"tasks",
|
|
25
|
+
"prompts",
|
|
26
|
+
"compression",
|
|
27
|
+
],
|
|
28
|
+
packageExports: [
|
|
29
|
+
"./runtime",
|
|
30
|
+
"./session",
|
|
31
|
+
"./storage",
|
|
32
|
+
"./tasks",
|
|
33
|
+
],
|
|
34
|
+
validationCommands: [...exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "governance-control",
|
|
38
|
+
owner: "governance-control",
|
|
39
|
+
visibility: "public",
|
|
40
|
+
responsibilities: [
|
|
41
|
+
"Own policy, authority, posture, and breakpoint decision logic.",
|
|
42
|
+
"Keep human-approval flows and governance enforcement aligned before any package split is attempted.",
|
|
43
|
+
],
|
|
44
|
+
directories: [
|
|
45
|
+
"governance",
|
|
46
|
+
"breakpoints",
|
|
47
|
+
],
|
|
48
|
+
packageExports: [
|
|
49
|
+
"./governance",
|
|
50
|
+
],
|
|
51
|
+
validationCommands: [...exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "integration-bridges",
|
|
55
|
+
owner: "harness-integration",
|
|
56
|
+
visibility: "public",
|
|
57
|
+
responsibilities: [
|
|
58
|
+
"Own harness invocation, agent-core integration, MCP transport/client glue, and API-facing orchestration adapters.",
|
|
59
|
+
"Keep external integration surfaces grouped under one review boundary until a narrower runtime seam proves real.",
|
|
60
|
+
],
|
|
61
|
+
directories: [
|
|
62
|
+
"harness",
|
|
63
|
+
"mcp",
|
|
64
|
+
"api",
|
|
65
|
+
"anycli",
|
|
66
|
+
],
|
|
67
|
+
packageExports: [
|
|
68
|
+
"./harness",
|
|
69
|
+
"./api",
|
|
70
|
+
"./anycli",
|
|
71
|
+
],
|
|
72
|
+
validationCommands: [...exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "operator-surfaces",
|
|
76
|
+
owner: "runtime-operations",
|
|
77
|
+
visibility: "public",
|
|
78
|
+
responsibilities: [
|
|
79
|
+
"Own operator-facing surfaces such as the CLI, daemon lifecycle, interaction UX, cost reporting, and observability helpers.",
|
|
80
|
+
"Contain operational changes so user-facing workflows can be validated without reopening every runtime concern.",
|
|
81
|
+
],
|
|
82
|
+
directories: [
|
|
83
|
+
"cli",
|
|
84
|
+
"daemon",
|
|
85
|
+
"interaction",
|
|
86
|
+
"observability",
|
|
87
|
+
"cost",
|
|
88
|
+
],
|
|
89
|
+
packageExports: [
|
|
90
|
+
"./cli",
|
|
91
|
+
"./daemon",
|
|
92
|
+
"./interaction",
|
|
93
|
+
"./observability",
|
|
94
|
+
"./cost",
|
|
95
|
+
],
|
|
96
|
+
validationCommands: [...exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "seam-contract",
|
|
100
|
+
owner: "v6-architecture",
|
|
101
|
+
visibility: "public",
|
|
102
|
+
responsibilities: [
|
|
103
|
+
"Own the executable manifest that assigns every top-level src domain to a slice.",
|
|
104
|
+
"Prevent new package-level domains from appearing without an explicit owner, visibility, and validation gate.",
|
|
105
|
+
],
|
|
106
|
+
directories: [
|
|
107
|
+
"seams",
|
|
108
|
+
],
|
|
109
|
+
packageExports: [
|
|
110
|
+
"./seams",
|
|
111
|
+
],
|
|
112
|
+
validationCommands: [...exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS],
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
function listBabysitterAgentSeamDirectories() {
|
|
116
|
+
return exports.babysitterAgentSeamContracts.flatMap((contract) => contract.directories);
|
|
117
|
+
}
|
|
118
|
+
function listBabysitterAgentPublicExports() {
|
|
119
|
+
return exports.babysitterAgentSeamContracts.flatMap((contract) => contract.packageExports);
|
|
120
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.test.d.ts","sourceRoot":"","sources":["../../src/seams/contract.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const vitest_1 = require("vitest");
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const contract_1 = require("./contract");
|
|
10
|
+
const packageRoot = node_path_1.default.resolve(__dirname, "..", "..");
|
|
11
|
+
const srcRoot = node_path_1.default.join(packageRoot, "src");
|
|
12
|
+
const currentStateDocPath = node_path_1.default.resolve(packageRoot, "..", "..", "docs", "v6-spec-and-roadmap", "current-state.md");
|
|
13
|
+
const seamAdrPath = node_path_1.default.resolve(packageRoot, "..", "..", "docs", "v6-spec-and-roadmap", "decisions", "ADR-001-agent-platform-seam-contract.md");
|
|
14
|
+
(0, vitest_1.describe)("agent-platform seam contract", () => {
|
|
15
|
+
(0, vitest_1.test)("assigns every top-level src directory to exactly one seam", async () => {
|
|
16
|
+
const topLevelEntries = await node_fs_1.promises.readdir(srcRoot, { withFileTypes: true });
|
|
17
|
+
const topLevelDirectories = topLevelEntries
|
|
18
|
+
.filter((entry) => entry.isDirectory())
|
|
19
|
+
.map((entry) => entry.name)
|
|
20
|
+
.sort();
|
|
21
|
+
(0, vitest_1.expect)((0, contract_1.listBabysitterAgentSeamDirectories)().sort()).toEqual(topLevelDirectories);
|
|
22
|
+
});
|
|
23
|
+
(0, vitest_1.test)("documents public subpath exports for every public seam", async () => {
|
|
24
|
+
const packageJson = JSON.parse(await node_fs_1.promises.readFile(node_path_1.default.join(packageRoot, "package.json"), "utf8"));
|
|
25
|
+
const exportedSubpaths = Object.keys(packageJson.exports ?? {}).sort();
|
|
26
|
+
(0, vitest_1.expect)(exportedSubpaths).toEqual([
|
|
27
|
+
".",
|
|
28
|
+
"./anycli",
|
|
29
|
+
"./api",
|
|
30
|
+
"./cli",
|
|
31
|
+
"./cost",
|
|
32
|
+
"./daemon",
|
|
33
|
+
"./governance",
|
|
34
|
+
"./harness",
|
|
35
|
+
"./interaction",
|
|
36
|
+
"./observability",
|
|
37
|
+
"./package.json",
|
|
38
|
+
"./runtime",
|
|
39
|
+
"./seams",
|
|
40
|
+
"./session",
|
|
41
|
+
"./storage",
|
|
42
|
+
"./tasks",
|
|
43
|
+
]);
|
|
44
|
+
(0, vitest_1.expect)((0, contract_1.listBabysitterAgentPublicExports)().sort()).toEqual([
|
|
45
|
+
"./anycli",
|
|
46
|
+
"./api",
|
|
47
|
+
"./cli",
|
|
48
|
+
"./cost",
|
|
49
|
+
"./daemon",
|
|
50
|
+
"./governance",
|
|
51
|
+
"./harness",
|
|
52
|
+
"./interaction",
|
|
53
|
+
"./observability",
|
|
54
|
+
"./runtime",
|
|
55
|
+
"./seams",
|
|
56
|
+
"./session",
|
|
57
|
+
"./storage",
|
|
58
|
+
"./tasks",
|
|
59
|
+
]);
|
|
60
|
+
});
|
|
61
|
+
(0, vitest_1.test)("publishes both runtime CLI entrypoint aliases", async () => {
|
|
62
|
+
const packageJson = JSON.parse(await node_fs_1.promises.readFile(node_path_1.default.join(packageRoot, "package.json"), "utf8"));
|
|
63
|
+
(0, vitest_1.expect)(packageJson.bin).toEqual({
|
|
64
|
+
"agent-platform": "dist/cli/main.js",
|
|
65
|
+
"babysitter-harness": "dist/cli/main.js",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
(0, vitest_1.test)("keeps the validation gate stable for every seam", () => {
|
|
69
|
+
(0, vitest_1.expect)(contract_1.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS).toEqual([
|
|
70
|
+
"npm run build --workspace=@a5c-ai/agent-platform",
|
|
71
|
+
"npm run test --workspace=@a5c-ai/agent-platform",
|
|
72
|
+
]);
|
|
73
|
+
for (const contract of contract_1.babysitterAgentSeamContracts) {
|
|
74
|
+
(0, vitest_1.expect)(contract.validationCommands).toEqual([
|
|
75
|
+
"npm run build --workspace=@a5c-ai/agent-platform",
|
|
76
|
+
"npm run test --workspace=@a5c-ai/agent-platform",
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
(0, vitest_1.test)("anchors the seam contract in the V6 current-state doc", async () => {
|
|
81
|
+
const currentStateDoc = await node_fs_1.promises.readFile(currentStateDocPath, "utf8");
|
|
82
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`packages/agent-platform/src/seams/contract.ts`");
|
|
83
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`runtime-foundation`");
|
|
84
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`governance-control`");
|
|
85
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`integration-bridges`");
|
|
86
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`operator-surfaces`");
|
|
87
|
+
(0, vitest_1.expect)(currentStateDoc).toContain("`npm run verify:v6:seams`");
|
|
88
|
+
});
|
|
89
|
+
(0, vitest_1.test)("keeps the accepted ADR aligned with the seam validation command", async () => {
|
|
90
|
+
const seamAdr = await node_fs_1.promises.readFile(seamAdrPath, "utf8");
|
|
91
|
+
(0, vitest_1.expect)(seamAdr).toContain("# ADR-001: Agent-Platform Seam Contract As The First Executable V6 Slice");
|
|
92
|
+
(0, vitest_1.expect)(seamAdr).toContain("`packages/agent-platform/src/seams/contract.ts`");
|
|
93
|
+
(0, vitest_1.expect)(seamAdr).toContain("npm run verify:v6:seams");
|
|
94
|
+
(0, vitest_1.expect)(seamAdr).toContain("`@a5c-ai/agent-platform`");
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS, babysitterAgentSeamContracts, listBabysitterAgentPublicExports, listBabysitterAgentSeamDirectories, } from "./contract";
|
|
2
|
+
export type { BabysitterAgentSeamContract, BabysitterAgentSeamVisibility, } from "./contract";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yCAAyC,EACzC,4BAA4B,EAC5B,gCAAgC,EAChC,kCAAkC,GACnC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listBabysitterAgentSeamDirectories = exports.listBabysitterAgentPublicExports = exports.babysitterAgentSeamContracts = exports.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS = void 0;
|
|
4
|
+
var contract_1 = require("./contract");
|
|
5
|
+
Object.defineProperty(exports, "BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS", { enumerable: true, get: function () { return contract_1.BABYSITTER_AGENT_SEAM_VALIDATION_COMMANDS; } });
|
|
6
|
+
Object.defineProperty(exports, "babysitterAgentSeamContracts", { enumerable: true, get: function () { return contract_1.babysitterAgentSeamContracts; } });
|
|
7
|
+
Object.defineProperty(exports, "listBabysitterAgentPublicExports", { enumerable: true, get: function () { return contract_1.listBabysitterAgentPublicExports; } });
|
|
8
|
+
Object.defineProperty(exports, "listBabysitterAgentSeamDirectories", { enumerable: true, get: function () { return contract_1.listBabysitterAgentSeamDirectories; } });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session context persistence for cross-run knowledge sharing (GAP-SESSION-001).
|
|
3
|
+
* Stores accumulated notes and shared knowledge as a JSON file alongside the session state file.
|
|
4
|
+
*/
|
|
5
|
+
import type { SessionContext } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Get the file path for a session's context JSON file.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSessionContextPath(stateDir: string, sessionId: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Read session context from disk.
|
|
12
|
+
* Returns empty context if the file does not exist.
|
|
13
|
+
* Logs a warning and returns empty context if the file is corrupt.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSessionContext(stateDir: string, sessionId: string): Promise<SessionContext>;
|
|
16
|
+
/**
|
|
17
|
+
* Update session context by merging new data with existing context.
|
|
18
|
+
* Notes are appended; sharedKnowledge keys are merged (newer values win).
|
|
19
|
+
* Uses atomic temp-file + rename pattern to prevent partial writes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function updateSessionContext(stateDir: string, sessionId: string, updates: Partial<SessionContext>): Promise<SessionContext>;
|
|
22
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/session/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjF;AAQD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA4BpG;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAC/B,OAAO,CAAC,cAAc,CAAC,CAoBzB"}
|