@xfey/tutti 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/dist/approvals/index.d.ts +3 -0
- package/dist/approvals/index.js +3 -0
- package/dist/approvals/manager.d.ts +47 -0
- package/dist/approvals/manager.js +180 -0
- package/dist/approvals/projections.d.ts +34 -0
- package/dist/approvals/projections.js +444 -0
- package/dist/artifacts/index.d.ts +4 -0
- package/dist/artifacts/index.js +4 -0
- package/dist/artifacts/manifest.d.ts +48 -0
- package/dist/artifacts/manifest.js +334 -0
- package/dist/artifacts/preview-runtime.d.ts +97 -0
- package/dist/artifacts/preview-runtime.js +585 -0
- package/dist/artifacts/static-preview.d.ts +17 -0
- package/dist/artifacts/static-preview.js +180 -0
- package/dist/chat-assistant/index.d.ts +66 -0
- package/dist/chat-assistant/index.js +268 -0
- package/dist/checks/index.d.ts +47 -0
- package/dist/checks/index.js +169 -0
- package/dist/collaboration-state/clarification-messages.d.ts +8 -0
- package/dist/collaboration-state/clarification-messages.js +180 -0
- package/dist/collaboration-state/clarification-records.d.ts +27 -0
- package/dist/collaboration-state/clarification-records.js +266 -0
- package/dist/collaboration-state/clarification-round-writes.d.ts +14 -0
- package/dist/collaboration-state/clarification-round-writes.js +58 -0
- package/dist/collaboration-state/clarification-rounds.d.ts +19 -0
- package/dist/collaboration-state/clarification-rounds.js +347 -0
- package/dist/collaboration-state/clarification-successors.d.ts +8 -0
- package/dist/collaboration-state/clarification-successors.js +318 -0
- package/dist/collaboration-state/execution-status.d.ts +3 -0
- package/dist/collaboration-state/execution-status.js +8 -0
- package/dist/collaboration-state/index.d.ts +17 -0
- package/dist/collaboration-state/index.js +16 -0
- package/dist/collaboration-state/messages.d.ts +25 -0
- package/dist/collaboration-state/messages.js +371 -0
- package/dist/collaboration-state/read-state.d.ts +7 -0
- package/dist/collaboration-state/read-state.js +136 -0
- package/dist/collaboration-state/recovery.d.ts +6 -0
- package/dist/collaboration-state/recovery.js +125 -0
- package/dist/collaboration-state/run-recording.d.ts +5 -0
- package/dist/collaboration-state/run-recording.js +216 -0
- package/dist/collaboration-state/run-results.d.ts +12 -0
- package/dist/collaboration-state/run-results.js +202 -0
- package/dist/collaboration-state/scratchpad-source-state.d.ts +46 -0
- package/dist/collaboration-state/scratchpad-source-state.js +207 -0
- package/dist/collaboration-state/scratchpad.d.ts +8 -0
- package/dist/collaboration-state/scratchpad.js +84 -0
- package/dist/collaboration-state/serialization.d.ts +16 -0
- package/dist/collaboration-state/serialization.js +71 -0
- package/dist/collaboration-state/storage-types.d.ts +136 -0
- package/dist/collaboration-state/storage-types.js +2 -0
- package/dist/collaboration-state/task-details.d.ts +5 -0
- package/dist/collaboration-state/task-details.js +25 -0
- package/dist/collaboration-state/types.d.ts +289 -0
- package/dist/collaboration-state/types.js +2 -0
- package/dist/collaboration-state/worklist.d.ts +11 -0
- package/dist/collaboration-state/worklist.js +286 -0
- package/dist/control-plane/clarification-commands.d.ts +34 -0
- package/dist/control-plane/clarification-commands.js +106 -0
- package/dist/control-plane/command-recovery.d.ts +3 -0
- package/dist/control-plane/command-recovery.js +79 -0
- package/dist/control-plane/context-sync.d.ts +47 -0
- package/dist/control-plane/context-sync.js +207 -0
- package/dist/control-plane/event-publishers.d.ts +24 -0
- package/dist/control-plane/event-publishers.js +192 -0
- package/dist/control-plane/execution-status.d.ts +13 -0
- package/dist/control-plane/execution-status.js +130 -0
- package/dist/control-plane/follow-up-context.d.ts +27 -0
- package/dist/control-plane/follow-up-context.js +93 -0
- package/dist/control-plane/follow-up-output.d.ts +53 -0
- package/dist/control-plane/follow-up-output.js +141 -0
- package/dist/control-plane/follow-up-run.d.ts +22 -0
- package/dist/control-plane/follow-up-run.js +90 -0
- package/dist/control-plane/follow-up-start.d.ts +26 -0
- package/dist/control-plane/follow-up-start.js +101 -0
- package/dist/control-plane/formatters.d.ts +12 -0
- package/dist/control-plane/formatters.js +47 -0
- package/dist/control-plane/index.d.ts +62 -0
- package/dist/control-plane/index.js +416 -0
- package/dist/control-plane/invalidations.d.ts +12 -0
- package/dist/control-plane/invalidations.js +67 -0
- package/dist/control-plane/procedure-logging.d.ts +11 -0
- package/dist/control-plane/procedure-logging.js +95 -0
- package/dist/control-plane/project-brief-refresh.d.ts +31 -0
- package/dist/control-plane/project-brief-refresh.js +105 -0
- package/dist/control-plane/project-context-bootstrap.d.ts +39 -0
- package/dist/control-plane/project-context-bootstrap.js +107 -0
- package/dist/control-plane/reference-summary-refresh.d.ts +22 -0
- package/dist/control-plane/reference-summary-refresh.js +344 -0
- package/dist/control-plane/run-lineage.d.ts +8 -0
- package/dist/control-plane/run-lineage.js +13 -0
- package/dist/control-plane/run-result-recording.d.ts +46 -0
- package/dist/control-plane/run-result-recording.js +81 -0
- package/dist/control-plane/run-scheduler.d.ts +35 -0
- package/dist/control-plane/run-scheduler.js +110 -0
- package/dist/control-plane/run-start.d.ts +30 -0
- package/dist/control-plane/run-start.js +167 -0
- package/dist/control-plane/scratchpad-auto-refresh.d.ts +32 -0
- package/dist/control-plane/scratchpad-auto-refresh.js +150 -0
- package/dist/control-plane/scratchpad-refresh-start.d.ts +60 -0
- package/dist/control-plane/scratchpad-refresh-start.js +240 -0
- package/dist/control-plane/scratchpad-refresh.d.ts +29 -0
- package/dist/control-plane/scratchpad-refresh.js +55 -0
- package/dist/control-plane/scratchpad-source-messages.d.ts +10 -0
- package/dist/control-plane/scratchpad-source-messages.js +131 -0
- package/dist/control-plane/startup-recovery.d.ts +19 -0
- package/dist/control-plane/startup-recovery.js +113 -0
- package/dist/control-plane/task-compile-continuation.d.ts +25 -0
- package/dist/control-plane/task-compile-continuation.js +127 -0
- package/dist/control-plane/task-compile-output.d.ts +29 -0
- package/dist/control-plane/task-compile-output.js +122 -0
- package/dist/control-plane/task-compile-start.d.ts +43 -0
- package/dist/control-plane/task-compile-start.js +280 -0
- package/dist/control-plane/task-proposal.d.ts +3 -0
- package/dist/control-plane/task-proposal.js +37 -0
- package/dist/control-plane/types.d.ts +155 -0
- package/dist/control-plane/types.js +2 -0
- package/dist/control-plane/workflows/index.d.ts +4 -0
- package/dist/control-plane/workflows/index.js +4 -0
- package/dist/control-plane/workflows/openai.d.ts +34 -0
- package/dist/control-plane/workflows/openai.js +411 -0
- package/dist/control-plane/workflows/structured-output-schemas.d.ts +9 -0
- package/dist/control-plane/workflows/structured-output-schemas.js +289 -0
- package/dist/control-plane/workflows/structured-output-validators.d.ts +15 -0
- package/dist/control-plane/workflows/structured-output-validators.js +295 -0
- package/dist/control-plane/workflows/structured-output.d.ts +3 -0
- package/dist/control-plane/workflows/structured-output.js +3 -0
- package/dist/control-plane/workflows/types.d.ts +274 -0
- package/dist/control-plane/workflows/types.js +2 -0
- package/dist/control-plane/worklist-terminal-feedback.d.ts +15 -0
- package/dist/control-plane/worklist-terminal-feedback.js +135 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +32 -0
- package/dist/procedure-engine/index.d.ts +56 -0
- package/dist/procedure-engine/index.js +163 -0
- package/dist/project-brief/index.d.ts +4 -0
- package/dist/project-brief/index.js +3 -0
- package/dist/project-brief/repository.d.ts +5 -0
- package/dist/project-brief/repository.js +97 -0
- package/dist/project-brief/source.d.ts +8 -0
- package/dist/project-brief/source.js +75 -0
- package/dist/project-brief/types.d.ts +40 -0
- package/dist/project-brief/types.js +2 -0
- package/dist/project-docs/context.d.ts +34 -0
- package/dist/project-docs/context.js +86 -0
- package/dist/project-timeline/index.d.ts +20 -0
- package/dist/project-timeline/index.js +100 -0
- package/dist/prompt-templates/index.d.ts +13 -0
- package/dist/prompt-templates/index.js +86 -0
- package/dist/provider-usage/index.d.ts +37 -0
- package/dist/provider-usage/index.js +227 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +2 -0
- package/dist/providers/openai/app-server/json-rpc.d.ts +71 -0
- package/dist/providers/openai/app-server/json-rpc.js +298 -0
- package/dist/providers/openai/app-server/permission-profile.d.ts +64 -0
- package/dist/providers/openai/app-server/permission-profile.js +67 -0
- package/dist/providers/openai/app-server/provider-config.d.ts +10 -0
- package/dist/providers/openai/app-server/provider-config.js +39 -0
- package/dist/providers/openai/app-server/read-only-procedure.d.ts +68 -0
- package/dist/providers/openai/app-server/read-only-procedure.js +293 -0
- package/dist/providers/openai/app-server/runtime-helpers.d.ts +20 -0
- package/dist/providers/openai/app-server/runtime-helpers.js +151 -0
- package/dist/providers/openai/app-server/skills.d.ts +82 -0
- package/dist/providers/openai/app-server/skills.js +222 -0
- package/dist/providers/openai/app-server/smoke-cli.d.ts +2 -0
- package/dist/providers/openai/app-server/smoke-cli.js +42 -0
- package/dist/providers/openai/app-server/smoke-helpers.d.ts +19 -0
- package/dist/providers/openai/app-server/smoke-helpers.js +125 -0
- package/dist/providers/openai/app-server/smoke-provider-input.d.ts +6 -0
- package/dist/providers/openai/app-server/smoke-provider-input.js +20 -0
- package/dist/providers/openai/app-server/smoke-types.d.ts +49 -0
- package/dist/providers/openai/app-server/smoke-types.js +20 -0
- package/dist/providers/openai/app-server/smoke.d.ts +9 -0
- package/dist/providers/openai/app-server/smoke.js +157 -0
- package/dist/providers/openai/app-server/workspace-write-run.d.ts +87 -0
- package/dist/providers/openai/app-server/workspace-write-run.js +379 -0
- package/dist/providers/openai/chat-assistant.d.ts +34 -0
- package/dist/providers/openai/chat-assistant.js +72 -0
- package/dist/providers/openai/codex-app-server.d.ts +126 -0
- package/dist/providers/openai/codex-app-server.js +147 -0
- package/dist/providers/openai/credential-store.d.ts +31 -0
- package/dist/providers/openai/credential-store.js +143 -0
- package/dist/providers/openai/credential-validation.d.ts +45 -0
- package/dist/providers/openai/credential-validation.js +190 -0
- package/dist/providers/openai/index.d.ts +13 -0
- package/dist/providers/openai/index.js +13 -0
- package/dist/providers/openai/machine-local-files.d.ts +19 -0
- package/dist/providers/openai/machine-local-files.js +55 -0
- package/dist/providers/openai/model-config.d.ts +4 -0
- package/dist/providers/openai/model-config.js +4 -0
- package/dist/providers/openai/provider-config-errors.d.ts +6 -0
- package/dist/providers/openai/provider-config-errors.js +13 -0
- package/dist/providers/openai/provider-config-shape.d.ts +3 -0
- package/dist/providers/openai/provider-config-shape.js +108 -0
- package/dist/providers/openai/provider-config-toml.d.ts +13 -0
- package/dist/providers/openai/provider-config-toml.js +113 -0
- package/dist/providers/openai/provider-config.d.ts +73 -0
- package/dist/providers/openai/provider-config.js +117 -0
- package/dist/providers/openai/provider-setup.d.ts +31 -0
- package/dist/providers/openai/provider-setup.js +88 -0
- package/dist/providers/openai/sdk-procedure-runner.d.ts +70 -0
- package/dist/providers/openai/sdk-procedure-runner.js +123 -0
- package/dist/providers/openai/token-usage.d.ts +11 -0
- package/dist/providers/openai/token-usage.js +90 -0
- package/dist/run-engine/index.d.ts +61 -0
- package/dist/run-engine/index.js +140 -0
- package/dist/run-pipeline/candidate-diff.d.ts +3 -0
- package/dist/run-pipeline/candidate-diff.js +10 -0
- package/dist/run-pipeline/openai.d.ts +41 -0
- package/dist/run-pipeline/openai.js +548 -0
- package/dist/run-pipeline/promotion-reconcile.d.ts +13 -0
- package/dist/run-pipeline/promotion-reconcile.js +138 -0
- package/dist/run-pipeline/result-projections.d.ts +39 -0
- package/dist/run-pipeline/result-projections.js +115 -0
- package/dist/run-pipeline/task-run-invocation.d.ts +6 -0
- package/dist/run-pipeline/task-run-invocation.js +130 -0
- package/dist/run-pipeline/task-run-output.d.ts +38 -0
- package/dist/run-pipeline/task-run-output.js +146 -0
- package/dist/server-shell/cli/args.d.ts +7 -0
- package/dist/server-shell/cli/args.js +30 -0
- package/dist/server-shell/cli/cli.d.ts +3 -0
- package/dist/server-shell/cli/cli.js +57 -0
- package/dist/server-shell/cli/errors.d.ts +9 -0
- package/dist/server-shell/cli/errors.js +53 -0
- package/dist/server-shell/cli/git-bootstrap.d.ts +24 -0
- package/dist/server-shell/cli/git-bootstrap.js +246 -0
- package/dist/server-shell/cli/host-lifecycle.d.ts +45 -0
- package/dist/server-shell/cli/host-lifecycle.js +298 -0
- package/dist/server-shell/cli/host-relay-status.d.ts +6 -0
- package/dist/server-shell/cli/host-relay-status.js +43 -0
- package/dist/server-shell/cli/host-runtime-endpoint.d.ts +22 -0
- package/dist/server-shell/cli/host-runtime-endpoint.js +120 -0
- package/dist/server-shell/cli/host-server-runtime.d.ts +30 -0
- package/dist/server-shell/cli/host-server-runtime.js +432 -0
- package/dist/server-shell/cli/index.d.ts +8 -0
- package/dist/server-shell/cli/index.js +8 -0
- package/dist/server-shell/cli/launch.d.ts +45 -0
- package/dist/server-shell/cli/launch.js +115 -0
- package/dist/server-shell/cli/machine-local.d.ts +69 -0
- package/dist/server-shell/cli/machine-local.js +223 -0
- package/dist/server-shell/cli/project-identity.d.ts +20 -0
- package/dist/server-shell/cli/project-identity.js +87 -0
- package/dist/server-shell/cli/relay-registration.d.ts +31 -0
- package/dist/server-shell/cli/relay-registration.js +61 -0
- package/dist/server-shell/command-idempotency/index.d.ts +44 -0
- package/dist/server-shell/command-idempotency/index.js +155 -0
- package/dist/server-shell/dev-runner/cli.d.ts +2 -0
- package/dist/server-shell/dev-runner/cli.js +10 -0
- package/dist/server-shell/dev-runner/config.d.ts +38 -0
- package/dist/server-shell/dev-runner/config.js +277 -0
- package/dist/server-shell/dev-runner/host-cli.d.ts +2 -0
- package/dist/server-shell/dev-runner/host-cli.js +22 -0
- package/dist/server-shell/dev-runner/index.d.ts +3 -0
- package/dist/server-shell/dev-runner/index.js +3 -0
- package/dist/server-shell/dev-runner/runner.d.ts +30 -0
- package/dist/server-shell/dev-runner/runner.js +236 -0
- package/dist/server-shell/http/create-server.d.ts +18 -0
- package/dist/server-shell/http/create-server.js +51 -0
- package/dist/server-shell/http/host-tunnel.d.ts +15 -0
- package/dist/server-shell/http/host-tunnel.js +154 -0
- package/dist/server-shell/http/logger.d.ts +7 -0
- package/dist/server-shell/http/logger.js +19 -0
- package/dist/server-shell/http/routes/agent-context-auth.d.ts +41 -0
- package/dist/server-shell/http/routes/agent-context-auth.js +73 -0
- package/dist/server-shell/http/routes/agent-context-errors.d.ts +6 -0
- package/dist/server-shell/http/routes/agent-context-errors.js +9 -0
- package/dist/server-shell/http/routes/agent-context-messages-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/agent-context-messages-routes.js +74 -0
- package/dist/server-shell/http/routes/agent-context-project-doc-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/agent-context-project-doc-routes.js +86 -0
- package/dist/server-shell/http/routes/agent-context-project-docs.d.ts +40 -0
- package/dist/server-shell/http/routes/agent-context-project-docs.js +98 -0
- package/dist/server-shell/http/routes/agent-context-query.d.ts +31 -0
- package/dist/server-shell/http/routes/agent-context-query.js +72 -0
- package/dist/server-shell/http/routes/agent-context-reference-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/agent-context-reference-routes.js +82 -0
- package/dist/server-shell/http/routes/agent-context-references.d.ts +21 -0
- package/dist/server-shell/http/routes/agent-context-references.js +85 -0
- package/dist/server-shell/http/routes/agent-context-shared.d.ts +34 -0
- package/dist/server-shell/http/routes/agent-context-shared.js +44 -0
- package/dist/server-shell/http/routes/agent-context-skills-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/agent-context-skills-routes.js +85 -0
- package/dist/server-shell/http/routes/agent-context-workspace-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/agent-context-workspace-routes.js +130 -0
- package/dist/server-shell/http/routes/agent-context.d.ts +8 -0
- package/dist/server-shell/http/routes/agent-context.js +16 -0
- package/dist/server-shell/http/routes/health.d.ts +7 -0
- package/dist/server-shell/http/routes/health.js +41 -0
- package/dist/server-shell/http/routes/local-control.d.ts +40 -0
- package/dist/server-shell/http/routes/local-control.js +260 -0
- package/dist/server-shell/http/routes/project-api/approval-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/approval-routes.js +64 -0
- package/dist/server-shell/http/routes/project-api/artifacts-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/artifacts-routes.js +166 -0
- package/dist/server-shell/http/routes/project-api/clarification-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/clarification-routes.js +150 -0
- package/dist/server-shell/http/routes/project-api/constants.d.ts +3 -0
- package/dist/server-shell/http/routes/project-api/constants.js +3 -0
- package/dist/server-shell/http/routes/project-api/errors.d.ts +26 -0
- package/dist/server-shell/http/routes/project-api/errors.js +41 -0
- package/dist/server-shell/http/routes/project-api/events-stream.d.ts +11 -0
- package/dist/server-shell/http/routes/project-api/events-stream.js +55 -0
- package/dist/server-shell/http/routes/project-api/execution-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/execution-routes.js +92 -0
- package/dist/server-shell/http/routes/project-api/headers.d.ts +2 -0
- package/dist/server-shell/http/routes/project-api/headers.js +7 -0
- package/dist/server-shell/http/routes/project-api/invalidations.d.ts +10 -0
- package/dist/server-shell/http/routes/project-api/invalidations.js +57 -0
- package/dist/server-shell/http/routes/project-api/messages-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/messages-routes.js +80 -0
- package/dist/server-shell/http/routes/project-api/openapi-approval-routes.d.ts +128 -0
- package/dist/server-shell/http/routes/project-api/openapi-approval-routes.js +32 -0
- package/dist/server-shell/http/routes/project-api/openapi-artifacts-routes.d.ts +51 -0
- package/dist/server-shell/http/routes/project-api/openapi-artifacts-routes.js +56 -0
- package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.d.ts +466 -0
- package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.js +165 -0
- package/dist/server-shell/http/routes/project-api/openapi-diagnostic-routes.d.ts +16 -0
- package/dist/server-shell/http/routes/project-api/openapi-diagnostic-routes.js +17 -0
- package/dist/server-shell/http/routes/project-api/openapi-execution-routes.d.ts +215 -0
- package/dist/server-shell/http/routes/project-api/openapi-execution-routes.js +75 -0
- package/dist/server-shell/http/routes/project-api/openapi-path-parameters.d.ts +9 -0
- package/dist/server-shell/http/routes/project-api/openapi-path-parameters.js +18 -0
- package/dist/server-shell/http/routes/project-api/openapi-skills-routes.d.ts +60 -0
- package/dist/server-shell/http/routes/project-api/openapi-skills-routes.js +51 -0
- package/dist/server-shell/http/routes/project-api/openapi-timeline-routes.d.ts +115 -0
- package/dist/server-shell/http/routes/project-api/openapi-timeline-routes.js +17 -0
- package/dist/server-shell/http/routes/project-api/openapi-viewer-routes.d.ts +323 -0
- package/dist/server-shell/http/routes/project-api/openapi-viewer-routes.js +120 -0
- package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.d.ts +1317 -0
- package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.js +95 -0
- package/dist/server-shell/http/routes/project-api/openapi.d.ts +2457 -0
- package/dist/server-shell/http/routes/project-api/openapi.js +30 -0
- package/dist/server-shell/http/routes/project-api/payload-validation.d.ts +6 -0
- package/dist/server-shell/http/routes/project-api/payload-validation.js +36 -0
- package/dist/server-shell/http/routes/project-api/project-docs-helpers.d.ts +9 -0
- package/dist/server-shell/http/routes/project-api/project-docs-helpers.js +17 -0
- package/dist/server-shell/http/routes/project-api/project-docs-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/project-docs-routes.js +151 -0
- package/dist/server-shell/http/routes/project-api/project-timeline-projection.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/project-timeline-projection.js +658 -0
- package/dist/server-shell/http/routes/project-api/project-timeline-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/project-timeline-routes.js +23 -0
- package/dist/server-shell/http/routes/project-api/read-state-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/read-state-routes.js +82 -0
- package/dist/server-shell/http/routes/project-api/reference-files-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/reference-files-routes.js +184 -0
- package/dist/server-shell/http/routes/project-api/reference-files.d.ts +17 -0
- package/dist/server-shell/http/routes/project-api/reference-files.js +212 -0
- package/dist/server-shell/http/routes/project-api/repo-projection.d.ts +3 -0
- package/dist/server-shell/http/routes/project-api/repo-projection.js +58 -0
- package/dist/server-shell/http/routes/project-api/schemas.d.ts +1351 -0
- package/dist/server-shell/http/routes/project-api/schemas.js +441 -0
- package/dist/server-shell/http/routes/project-api/session-requirements.d.ts +10 -0
- package/dist/server-shell/http/routes/project-api/session-requirements.js +60 -0
- package/dist/server-shell/http/routes/project-api/skills-helpers.d.ts +7 -0
- package/dist/server-shell/http/routes/project-api/skills-helpers.js +48 -0
- package/dist/server-shell/http/routes/project-api/skills-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/skills-routes.js +185 -0
- package/dist/server-shell/http/routes/project-api/staged-uploads.d.ts +14 -0
- package/dist/server-shell/http/routes/project-api/staged-uploads.js +149 -0
- package/dist/server-shell/http/routes/project-api/system-routes.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api/system-routes.js +141 -0
- package/dist/server-shell/http/routes/project-api/types.d.ts +137 -0
- package/dist/server-shell/http/routes/project-api/types.js +2 -0
- package/dist/server-shell/http/routes/project-api/viewer-projections.d.ts +17 -0
- package/dist/server-shell/http/routes/project-api/viewer-projections.js +102 -0
- package/dist/server-shell/http/routes/project-api/viewer-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/viewer-routes.js +100 -0
- package/dist/server-shell/http/routes/project-api/workflow-routes.d.ts +4 -0
- package/dist/server-shell/http/routes/project-api/workflow-routes.js +85 -0
- package/dist/server-shell/http/routes/project-api/workspace-projections.d.ts +5 -0
- package/dist/server-shell/http/routes/project-api/workspace-projections.js +103 -0
- package/dist/server-shell/http/routes/project-api.d.ts +8 -0
- package/dist/server-shell/http/routes/project-api.js +34 -0
- package/dist/server-shell/http/sse-replay-buffer.d.ts +54 -0
- package/dist/server-shell/http/sse-replay-buffer.js +110 -0
- package/dist/server-shell/http/sse.d.ts +12 -0
- package/dist/server-shell/http/sse.js +22 -0
- package/dist/server-shell/http/static-web.d.ts +6 -0
- package/dist/server-shell/http/static-web.js +52 -0
- package/dist/server-shell/http/validation.d.ts +13 -0
- package/dist/server-shell/http/validation.js +136 -0
- package/dist/server-shell/http/workspace-events.d.ts +38 -0
- package/dist/server-shell/http/workspace-events.js +98 -0
- package/dist/server-shell/session/relay-session-context.d.ts +25 -0
- package/dist/server-shell/session/relay-session-context.js +49 -0
- package/dist/server-shell/smoke/e2e-client.d.ts +59 -0
- package/dist/server-shell/smoke/e2e-client.js +304 -0
- package/dist/server-shell/smoke/index.d.ts +2 -0
- package/dist/server-shell/smoke/index.js +2 -0
- package/dist/skills/constants.d.ts +8 -0
- package/dist/skills/constants.js +9 -0
- package/dist/skills/errors.d.ts +6 -0
- package/dist/skills/errors.js +9 -0
- package/dist/skills/index.d.ts +41 -0
- package/dist/skills/index.js +171 -0
- package/dist/skills/metadata.d.ts +8 -0
- package/dist/skills/metadata.js +80 -0
- package/dist/skills/zip-import.d.ts +18 -0
- package/dist/skills/zip-import.js +241 -0
- package/dist/store/command-recovery.d.ts +26 -0
- package/dist/store/command-recovery.js +71 -0
- package/dist/store/index.d.ts +6 -0
- package/dist/store/index.js +6 -0
- package/dist/store/lifecycle.d.ts +23 -0
- package/dist/store/lifecycle.js +53 -0
- package/dist/store/metadata.d.ts +18 -0
- package/dist/store/metadata.js +30 -0
- package/dist/store/migrations.d.ts +20 -0
- package/dist/store/migrations.js +76 -0
- package/dist/store/sqlite.d.ts +11 -0
- package/dist/store/sqlite.js +21 -0
- package/dist/workspace-ops/constants.d.ts +15 -0
- package/dist/workspace-ops/constants.js +20 -0
- package/dist/workspace-ops/errors.d.ts +8 -0
- package/dist/workspace-ops/errors.js +33 -0
- package/dist/workspace-ops/git.d.ts +13 -0
- package/dist/workspace-ops/git.js +53 -0
- package/dist/workspace-ops/index.d.ts +11 -0
- package/dist/workspace-ops/index.js +9 -0
- package/dist/workspace-ops/mainline.d.ts +2 -0
- package/dist/workspace-ops/mainline.js +16 -0
- package/dist/workspace-ops/project-doc-templates.d.ts +12 -0
- package/dist/workspace-ops/project-doc-templates.js +180 -0
- package/dist/workspace-ops/project-docs.d.ts +7 -0
- package/dist/workspace-ops/project-docs.js +156 -0
- package/dist/workspace-ops/reference-files.d.ts +3 -0
- package/dist/workspace-ops/reference-files.js +137 -0
- package/dist/workspace-ops/reference-metadata.d.ts +13 -0
- package/dist/workspace-ops/reference-metadata.js +86 -0
- package/dist/workspace-ops/reference-summaries.d.ts +17 -0
- package/dist/workspace-ops/reference-summaries.js +298 -0
- package/dist/workspace-ops/run-workspaces.d.ts +18 -0
- package/dist/workspace-ops/run-workspaces.js +271 -0
- package/dist/workspace-ops/types.d.ts +219 -0
- package/dist/workspace-ops/types.js +2 -0
- package/dist/workspace-ops/viewer-file.d.ts +4 -0
- package/dist/workspace-ops/viewer-file.js +207 -0
- package/dist/workspace-ops/viewer-git.d.ts +20 -0
- package/dist/workspace-ops/viewer-git.js +111 -0
- package/dist/workspace-ops/viewer-paths.d.ts +3 -0
- package/dist/workspace-ops/viewer-paths.js +13 -0
- package/dist/workspace-ops/viewer-tree.d.ts +9 -0
- package/dist/workspace-ops/viewer-tree.js +144 -0
- package/dist/workspace-ops/viewer.d.ts +5 -0
- package/dist/workspace-ops/viewer.js +5 -0
- package/migrations/0001_init.sql +674 -0
- package/migrations/0002_allow_sealed_round_successor_note.sql +14 -0
- package/migrations/0003_drop_scratchpad_source_message_refs.sql +1 -0
- package/migrations/0004_read_state.sql +109 -0
- package/migrations/0005_provider_usage.sql +15 -0
- package/migrations/0006_scratchpad_source_state.sql +29 -0
- package/migrations/0007_workspace_signal_read_state_scopes.sql +74 -0
- package/migrations/0008_provider_usage_anchors.sql +32 -0
- package/migrations/0009_project_timeline_events.sql +33 -0
- package/migrations/0010_project_brief.sql +13 -0
- package/migrations/0011_message_author_avatar.sql +5 -0
- package/migrations/README.md +44 -0
- package/node_modules/@tutti/relay-client/dist/host-control.d.ts +164 -0
- package/node_modules/@tutti/relay-client/dist/host-control.js +284 -0
- package/node_modules/@tutti/relay-client/dist/index.d.ts +3 -0
- package/node_modules/@tutti/relay-client/dist/index.js +3 -0
- package/node_modules/@tutti/relay-client/dist/tunnel-frames.d.ts +8 -0
- package/node_modules/@tutti/relay-client/dist/tunnel-frames.js +124 -0
- package/node_modules/@tutti/relay-client/dist/tunnel-types.d.ts +61 -0
- package/node_modules/@tutti/relay-client/dist/tunnel-types.js +2 -0
- package/node_modules/@tutti/relay-client/dist/tunnel.d.ts +4 -0
- package/node_modules/@tutti/relay-client/dist/tunnel.js +144 -0
- package/node_modules/@tutti/relay-client/package.json +18 -0
- package/node_modules/@tutti/shared/dist/domain/index.d.ts +59 -0
- package/node_modules/@tutti/shared/dist/domain/index.js +37 -0
- package/node_modules/@tutti/shared/dist/ids/index.d.ts +85 -0
- package/node_modules/@tutti/shared/dist/ids/index.js +88 -0
- package/node_modules/@tutti/shared/dist/index.d.ts +6 -0
- package/node_modules/@tutti/shared/dist/index.js +6 -0
- package/node_modules/@tutti/shared/dist/schemas/api/approvals.d.ts +307 -0
- package/node_modules/@tutti/shared/dist/schemas/api/approvals.js +110 -0
- package/node_modules/@tutti/shared/dist/schemas/api/artifacts.d.ts +173 -0
- package/node_modules/@tutti/shared/dist/schemas/api/artifacts.js +107 -0
- package/node_modules/@tutti/shared/dist/schemas/api/clarifications.d.ts +704 -0
- package/node_modules/@tutti/shared/dist/schemas/api/clarifications.js +224 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +18 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.js +17 -0
- package/node_modules/@tutti/shared/dist/schemas/api/messages.d.ts +370 -0
- package/node_modules/@tutti/shared/dist/schemas/api/messages.js +134 -0
- package/node_modules/@tutti/shared/dist/schemas/api/openapi.d.ts +32 -0
- package/node_modules/@tutti/shared/dist/schemas/api/openapi.js +100 -0
- package/node_modules/@tutti/shared/dist/schemas/api/primitives.d.ts +109 -0
- package/node_modules/@tutti/shared/dist/schemas/api/primitives.js +174 -0
- package/node_modules/@tutti/shared/dist/schemas/api/project-timeline.d.ts +149 -0
- package/node_modules/@tutti/shared/dist/schemas/api/project-timeline.js +44 -0
- package/node_modules/@tutti/shared/dist/schemas/api/provider-config.d.ts +21 -0
- package/node_modules/@tutti/shared/dist/schemas/api/provider-config.js +33 -0
- package/node_modules/@tutti/shared/dist/schemas/api/provider-usage.d.ts +87 -0
- package/node_modules/@tutti/shared/dist/schemas/api/provider-usage.js +48 -0
- package/node_modules/@tutti/shared/dist/schemas/api/read-state.d.ts +89 -0
- package/node_modules/@tutti/shared/dist/schemas/api/read-state.js +39 -0
- package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.d.ts +484 -0
- package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.js +185 -0
- package/node_modules/@tutti/shared/dist/schemas/api/skills.d.ts +88 -0
- package/node_modules/@tutti/shared/dist/schemas/api/skills.js +71 -0
- package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +253 -0
- package/node_modules/@tutti/shared/dist/schemas/api/types.js +2 -0
- package/node_modules/@tutti/shared/dist/schemas/api/uploads.d.ts +103 -0
- package/node_modules/@tutti/shared/dist/schemas/api/uploads.js +78 -0
- package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.d.ts +484 -0
- package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.js +267 -0
- package/node_modules/@tutti/shared/dist/schemas/api/work-items.d.ts +264 -0
- package/node_modules/@tutti/shared/dist/schemas/api/work-items.js +196 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.d.ts +179 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.js +137 -0
- package/node_modules/@tutti/shared/dist/schemas/domain/index.d.ts +31 -0
- package/node_modules/@tutti/shared/dist/schemas/domain/index.js +49 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/index.d.ts +46 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/index.js +46 -0
- package/node_modules/@tutti/shared/dist/utils/command-idempotency/index.d.ts +40 -0
- package/node_modules/@tutti/shared/dist/utils/command-idempotency/index.js +100 -0
- package/node_modules/@tutti/shared/dist/utils/index.d.ts +5 -0
- package/node_modules/@tutti/shared/dist/utils/index.js +5 -0
- package/node_modules/@tutti/shared/dist/utils/logging/index.d.ts +34 -0
- package/node_modules/@tutti/shared/dist/utils/logging/index.js +130 -0
- package/node_modules/@tutti/shared/dist/utils/path-policy/index.d.ts +13 -0
- package/node_modules/@tutti/shared/dist/utils/path-policy/index.js +80 -0
- package/node_modules/@tutti/shared/dist/utils/redaction/index.d.ts +19 -0
- package/node_modules/@tutti/shared/dist/utils/redaction/index.js +158 -0
- package/node_modules/@tutti/shared/package.json +63 -0
- package/package.json +47 -0
- package/prompts/README.md +36 -0
- package/prompts/chat-assistant.md +43 -0
- package/prompts/codex/README.md +13 -0
- package/prompts/codex/no-write-smoke.md +35 -0
- package/prompts/procedures/README.md +38 -0
- package/prompts/procedures/context-sync.md +66 -0
- package/prompts/procedures/follow-up-check.md +83 -0
- package/prompts/procedures/project-brief-refresh.md +79 -0
- package/prompts/procedures/project-context-bootstrap.md +58 -0
- package/prompts/procedures/reference-file-summary.md +49 -0
- package/prompts/procedures/scratchpad-refresh.md +83 -0
- package/prompts/procedures/task-compile.md +116 -0
- package/prompts/prompt-flow-experiment-plan.md +203 -0
- package/prompts/prompt-flow-map.md +478 -0
- package/prompts/runs/README.md +17 -0
- package/prompts/runs/task-continuation.md +148 -0
- package/prompts/runs/task-retry.md +153 -0
- package/prompts/runs/task-run.md +135 -0
- package/prompts/skills/README.md +25 -0
- package/prompts/skills/read-main-chat/README.md +8 -0
- package/prompts/skills/read-main-chat/SKILL.md +18 -0
- package/prompts/skills/read-project-docs/README.md +13 -0
- package/prompts/skills/read-project-docs/SKILL.md +42 -0
- package/prompts/skills/read-references/README.md +9 -0
- package/prompts/skills/read-references/SKILL.md +26 -0
- package/prompts/skills/read-scratchpad/README.md +8 -0
- package/prompts/skills/read-scratchpad/SKILL.md +16 -0
- package/prompts/skills/read-user-skills/README.md +7 -0
- package/prompts/skills/read-user-skills/SKILL.md +22 -0
- package/prompts/skills/read-worklist/README.md +9 -0
- package/prompts/skills/read-worklist/SKILL.md +20 -0
- package/web/assets/Tutti-B7gEyTp1.png +0 -0
- package/web/assets/Tutti-square-BqFU7F0D.png +0 -0
- package/web/assets/index-CWkBgHap.js +29 -0
- package/web/assets/index-D8xJY8Gr.css +1 -0
- package/web/index.html +13 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { readProjectBriefProjection, readProjectBriefSourceDocuments, upsertProjectBriefProjection, } from "../project-brief/index.js";
|
|
2
|
+
import { PROJECT_DOC_PATHS } from "../workspace-ops/index.js";
|
|
3
|
+
export function projectBriefShouldRefreshForUpdatedPaths(paths) {
|
|
4
|
+
return paths.some((path) => PROJECT_DOC_PATHS.includes(path));
|
|
5
|
+
}
|
|
6
|
+
function resolveProjectBriefRunner(input) {
|
|
7
|
+
if (input.runner !== undefined) {
|
|
8
|
+
return input.runner;
|
|
9
|
+
}
|
|
10
|
+
const resolution = input.resolveWorkflowRunner?.();
|
|
11
|
+
if (resolution === undefined || resolution.kind !== "ready") {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
return resolution.runner;
|
|
15
|
+
}
|
|
16
|
+
export async function refreshProjectBriefProjection(input) {
|
|
17
|
+
if (input.projectContext === undefined) {
|
|
18
|
+
return { kind: "skipped", reason: "project_context_unavailable" };
|
|
19
|
+
}
|
|
20
|
+
const runner = resolveProjectBriefRunner(input);
|
|
21
|
+
if (runner === undefined) {
|
|
22
|
+
return { kind: "skipped", reason: "provider_unavailable" };
|
|
23
|
+
}
|
|
24
|
+
if (runner.runProjectBriefRefresh === undefined) {
|
|
25
|
+
return { kind: "skipped", reason: "runner_unavailable" };
|
|
26
|
+
}
|
|
27
|
+
let sourceDocs;
|
|
28
|
+
try {
|
|
29
|
+
sourceDocs = readProjectBriefSourceDocuments({
|
|
30
|
+
workspaceRoot: input.projectContext.workspaceRoot,
|
|
31
|
+
now: input.now,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
input.logger?.info({
|
|
36
|
+
reason: input.reason,
|
|
37
|
+
error: error instanceof Error ? error.name : "UnknownError",
|
|
38
|
+
}, "Project brief source read failed");
|
|
39
|
+
return { kind: "failed", reason: "source_unavailable" };
|
|
40
|
+
}
|
|
41
|
+
let currentBrief;
|
|
42
|
+
try {
|
|
43
|
+
currentBrief = readProjectBriefProjection(input.store.db, sourceDocs);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
input.logger?.info({
|
|
47
|
+
reason: input.reason,
|
|
48
|
+
error: error instanceof Error ? error.name : "UnknownError",
|
|
49
|
+
}, "Project brief projection read failed");
|
|
50
|
+
return { kind: "failed", reason: "projection_unavailable" };
|
|
51
|
+
}
|
|
52
|
+
if (currentBrief.state === "ready") {
|
|
53
|
+
return { kind: "skipped", reason: "already_fresh" };
|
|
54
|
+
}
|
|
55
|
+
if (!sourceDocs.some((source) => source.status === "available")) {
|
|
56
|
+
return { kind: "skipped", reason: "source_not_ready" };
|
|
57
|
+
}
|
|
58
|
+
let output;
|
|
59
|
+
try {
|
|
60
|
+
output = await runner.runProjectBriefRefresh({ docs: sourceDocs }, input.workflowRef === undefined || input.activityRef === undefined
|
|
61
|
+
? undefined
|
|
62
|
+
: {
|
|
63
|
+
workflow_ref: input.workflowRef,
|
|
64
|
+
activity_ref: input.activityRef,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
input.logger?.info({
|
|
69
|
+
reason: input.reason,
|
|
70
|
+
error: error instanceof Error ? error.name : "UnknownError",
|
|
71
|
+
...(input.workflowRef === undefined ? {} : { workflow_ref: input.workflowRef }),
|
|
72
|
+
...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
|
|
73
|
+
}, "Project brief refresh failed");
|
|
74
|
+
return { kind: "failed", reason: "provider_failed" };
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
const brief = upsertProjectBriefProjection(input.store.db, {
|
|
78
|
+
...output,
|
|
79
|
+
source_docs: sourceDocs,
|
|
80
|
+
...(input.activityRef === undefined ? {} : { updated_by_activity_ref: input.activityRef }),
|
|
81
|
+
...(input.workflowRef === undefined ? {} : { updated_by_workflow_ref: input.workflowRef }),
|
|
82
|
+
now: input.now,
|
|
83
|
+
});
|
|
84
|
+
if (brief.state === "missing") {
|
|
85
|
+
return { kind: "failed", reason: "provider_failed" };
|
|
86
|
+
}
|
|
87
|
+
input.logger?.info({
|
|
88
|
+
reason: input.reason,
|
|
89
|
+
source_doc_count: sourceDocs.length,
|
|
90
|
+
...(input.workflowRef === undefined ? {} : { workflow_ref: input.workflowRef }),
|
|
91
|
+
...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
|
|
92
|
+
}, "Project brief refreshed");
|
|
93
|
+
return { kind: "refreshed", brief };
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
input.logger?.info({
|
|
97
|
+
reason: input.reason,
|
|
98
|
+
error: error instanceof Error ? error.name : "UnknownError",
|
|
99
|
+
...(input.workflowRef === undefined ? {} : { workflow_ref: input.workflowRef }),
|
|
100
|
+
...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
|
|
101
|
+
}, "Project brief projection write failed");
|
|
102
|
+
return { kind: "failed", reason: "projection_unavailable" };
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=project-brief-refresh.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ActivityRef, WorkflowInvocationRef } from "@tutti/shared/ids";
|
|
2
|
+
import type { ScratchpadProjection } from "@tutti/shared/schemas/api";
|
|
3
|
+
import type { WorkspaceEventBus } from "../server-shell/http/workspace-events.js";
|
|
4
|
+
import type { InitializeProjectDocsResult, ProjectDocsInitializationContext, ProjectDocsInitializationDocument } from "../workspace-ops/index.js";
|
|
5
|
+
import type { ControlPlaneLogger, Phase5ControlPlaneOptions } from "./types.js";
|
|
6
|
+
import type { ProcedureWorkflowRunner, ProjectContextBootstrapWorkflowInput, ProjectContextBootstrapWorkflowOutput } from "./workflows/index.js";
|
|
7
|
+
export declare function buildProjectDocsInitializationContext(scratchpad: ScratchpadProjection): ProjectDocsInitializationContext;
|
|
8
|
+
export declare function buildProjectContextBootstrapWorkflowInput(options: {
|
|
9
|
+
projectContext: Phase5ControlPlaneOptions["projectContext"];
|
|
10
|
+
scratchpad: ScratchpadProjection;
|
|
11
|
+
projectName: string;
|
|
12
|
+
now: () => Date;
|
|
13
|
+
}): ProjectContextBootstrapWorkflowInput | undefined;
|
|
14
|
+
export declare function projectContextBootstrapDocuments(output: ProjectContextBootstrapWorkflowOutput): ProjectDocsInitializationDocument[];
|
|
15
|
+
export declare function tryProjectContextBootstrapDocuments(input: {
|
|
16
|
+
runner: ProcedureWorkflowRunner;
|
|
17
|
+
projectContext: Phase5ControlPlaneOptions["projectContext"];
|
|
18
|
+
scratchpad: ScratchpadProjection;
|
|
19
|
+
projectName: string;
|
|
20
|
+
workflowRef: WorkflowInvocationRef;
|
|
21
|
+
activityRef: ActivityRef;
|
|
22
|
+
logger?: ControlPlaneLogger | undefined;
|
|
23
|
+
now: () => Date;
|
|
24
|
+
}): Promise<ProjectDocsInitializationDocument[] | undefined>;
|
|
25
|
+
export declare function applyProjectDocsInitializationResult(input: {
|
|
26
|
+
events: WorkspaceEventBus;
|
|
27
|
+
logger?: ControlPlaneLogger | undefined;
|
|
28
|
+
result: InitializeProjectDocsResult;
|
|
29
|
+
workflowRef: WorkflowInvocationRef;
|
|
30
|
+
activityRef: ActivityRef;
|
|
31
|
+
}): {
|
|
32
|
+
kind: "completed";
|
|
33
|
+
summary: string;
|
|
34
|
+
result_anchor: {
|
|
35
|
+
kind: "workflow";
|
|
36
|
+
workflow_ref: `wf_${string}`;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=project-context-bootstrap.d.ts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { projectDocPath, readProjectDocsSummaries } from "../project-docs/context.js";
|
|
2
|
+
import { projectContextBootstrapInvalidates } from "./invalidations.js";
|
|
3
|
+
export function buildProjectDocsInitializationContext(scratchpad) {
|
|
4
|
+
if (scratchpad.state !== "ready") {
|
|
5
|
+
return { source: "scratchpad_submit" };
|
|
6
|
+
}
|
|
7
|
+
return {
|
|
8
|
+
source: "scratchpad_submit",
|
|
9
|
+
scratchpad: {
|
|
10
|
+
topic: scratchpad.topic,
|
|
11
|
+
background_summary: scratchpad.background_summary,
|
|
12
|
+
current_consensus: scratchpad.current_consensus,
|
|
13
|
+
open_questions: scratchpad.open_questions,
|
|
14
|
+
task_changes: scratchpad.task_changes,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export function buildProjectContextBootstrapWorkflowInput(options) {
|
|
19
|
+
if (options.projectContext === undefined) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const missingDocs = readProjectDocsSummaries({
|
|
23
|
+
workspaceRoot: options.projectContext.workspaceRoot,
|
|
24
|
+
now: options.now,
|
|
25
|
+
})
|
|
26
|
+
.filter((doc) => doc.status === "missing")
|
|
27
|
+
.map((doc) => ({ doc_key: doc.doc_key, path: doc.path }));
|
|
28
|
+
const input = {
|
|
29
|
+
project_name: options.projectName,
|
|
30
|
+
};
|
|
31
|
+
if (missingDocs.length > 0) {
|
|
32
|
+
input.missing_docs = missingDocs;
|
|
33
|
+
}
|
|
34
|
+
if (options.scratchpad.state === "ready") {
|
|
35
|
+
input.scratchpad = {
|
|
36
|
+
topic: options.scratchpad.topic,
|
|
37
|
+
background_summary: options.scratchpad.background_summary,
|
|
38
|
+
current_consensus: options.scratchpad.current_consensus,
|
|
39
|
+
open_questions: options.scratchpad.open_questions,
|
|
40
|
+
task_changes: options.scratchpad.task_changes,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return input;
|
|
44
|
+
}
|
|
45
|
+
export function projectContextBootstrapDocuments(output) {
|
|
46
|
+
return output.documents.map((document) => ({
|
|
47
|
+
path: projectDocPath(document.doc_key),
|
|
48
|
+
content: document.content,
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
export async function tryProjectContextBootstrapDocuments(input) {
|
|
52
|
+
if (input.runner.runProjectContextBootstrap === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
const workflowInput = buildProjectContextBootstrapWorkflowInput({
|
|
56
|
+
projectContext: input.projectContext,
|
|
57
|
+
scratchpad: input.scratchpad,
|
|
58
|
+
projectName: input.projectName,
|
|
59
|
+
now: input.now,
|
|
60
|
+
});
|
|
61
|
+
if (workflowInput === undefined) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const output = await input.runner.runProjectContextBootstrap(workflowInput, {
|
|
66
|
+
workflow_ref: input.workflowRef,
|
|
67
|
+
activity_ref: input.activityRef,
|
|
68
|
+
});
|
|
69
|
+
input.logger?.info({
|
|
70
|
+
workflow_ref: input.workflowRef,
|
|
71
|
+
activity_ref: input.activityRef,
|
|
72
|
+
document_count: output.documents.length,
|
|
73
|
+
}, "Project context bootstrap model plan completed");
|
|
74
|
+
return projectContextBootstrapDocuments(output);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
input.logger?.info({
|
|
78
|
+
workflow_ref: input.workflowRef,
|
|
79
|
+
activity_ref: input.activityRef,
|
|
80
|
+
error: error instanceof Error ? error.message : "unknown error",
|
|
81
|
+
}, "Project context bootstrap model plan unavailable; falling back to local templates");
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export function applyProjectDocsInitializationResult(input) {
|
|
86
|
+
input.logger?.info({
|
|
87
|
+
workflow_ref: input.workflowRef,
|
|
88
|
+
activity_ref: input.activityRef,
|
|
89
|
+
created_paths: input.result.created_paths,
|
|
90
|
+
created_count: input.result.created_paths.length,
|
|
91
|
+
...(input.result.commit_oid === undefined ? {} : { commit_oid: input.result.commit_oid }),
|
|
92
|
+
}, "Project context initialized before Worklist compile");
|
|
93
|
+
input.events.publish({
|
|
94
|
+
event_type: "query.invalidate",
|
|
95
|
+
payload: {
|
|
96
|
+
reason: "viewer_changed",
|
|
97
|
+
message: "Project context initialized.",
|
|
98
|
+
},
|
|
99
|
+
invalidates: projectContextBootstrapInvalidates(),
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
kind: "completed",
|
|
103
|
+
summary: "Project context initialized.",
|
|
104
|
+
result_anchor: { kind: "workflow", workflow_ref: input.workflowRef },
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=project-context-bootstrap.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ActivityRef } from "@tutti/shared/ids";
|
|
2
|
+
import type { RefreshReferenceSummariesDisposition, RefreshReferenceSummariesResult } from "@tutti/shared/schemas/api";
|
|
3
|
+
import type { ProcedureEngine, ProcedureEngineState } from "../procedure-engine/index.js";
|
|
4
|
+
import type { WorkspaceEventBus } from "../server-shell/http/workspace-events.js";
|
|
5
|
+
import type { HostProjectStore } from "../store/index.js";
|
|
6
|
+
import type { ControlPlaneCommandResult, ControlPlaneLogger, Phase5ControlPlaneOptions } from "./types.js";
|
|
7
|
+
import type { ProcedureWorkflowRunnerResolver } from "./workflows/index.js";
|
|
8
|
+
export declare function startReferenceSummaryRefreshProcedure(input: {
|
|
9
|
+
engine: ProcedureEngine;
|
|
10
|
+
store: HostProjectStore;
|
|
11
|
+
events: WorkspaceEventBus;
|
|
12
|
+
paths?: string[];
|
|
13
|
+
resolveWorkflowRunner: ProcedureWorkflowRunnerResolver;
|
|
14
|
+
readActiveActivity: () => {
|
|
15
|
+
activity_ref: ActivityRef;
|
|
16
|
+
} | null;
|
|
17
|
+
projectContext: Phase5ControlPlaneOptions["projectContext"];
|
|
18
|
+
logger?: ControlPlaneLogger | undefined;
|
|
19
|
+
now: () => Date;
|
|
20
|
+
publishProcedureTransition: (state: ProcedureEngineState) => void;
|
|
21
|
+
}): ControlPlaneCommandResult<RefreshReferenceSummariesDisposition, RefreshReferenceSummariesResult>;
|
|
22
|
+
//# sourceMappingURL=reference-summary-refresh.d.ts.map
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { createWorkflowInvocationRef } from "@tutti/shared/ids";
|
|
2
|
+
import { recordProjectTimelineEvent } from "../project-timeline/index.js";
|
|
3
|
+
import { WorkspaceOpsError, readReferenceSummaryTargets, updateReferenceSummaries, } from "../workspace-ops/index.js";
|
|
4
|
+
import { logProcedureExecutionError } from "./procedure-logging.js";
|
|
5
|
+
function publishReferenceSummaryTimelineChanged(input) {
|
|
6
|
+
input.events.publish({
|
|
7
|
+
event_type: "query.invalidate",
|
|
8
|
+
payload: {
|
|
9
|
+
reason: "bulk_state_change",
|
|
10
|
+
message: input.message,
|
|
11
|
+
},
|
|
12
|
+
invalidates: input.invalidates ?? [{ kind: "project_timeline" }],
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function readTargets(options) {
|
|
16
|
+
if (options.projectContext === undefined) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return readReferenceSummaryTargets({
|
|
21
|
+
workspaceRoot: options.projectContext.workspaceRoot,
|
|
22
|
+
...(options.paths === undefined ? {} : { paths: options.paths }),
|
|
23
|
+
now: options.now,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (error instanceof WorkspaceOpsError && error.code === "not_found") {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function summaryRecordFromOutput(options) {
|
|
34
|
+
if (options.output.decision === "summarized") {
|
|
35
|
+
return {
|
|
36
|
+
path: options.target.path,
|
|
37
|
+
status: "available",
|
|
38
|
+
generated_at: options.generatedAt,
|
|
39
|
+
source_blob_oid: options.target.blob_oid,
|
|
40
|
+
summary: options.output.summary,
|
|
41
|
+
read_paths: options.output.read_paths,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
path: options.target.path,
|
|
46
|
+
status: "unavailable",
|
|
47
|
+
generated_at: options.generatedAt,
|
|
48
|
+
source_blob_oid: options.target.blob_oid,
|
|
49
|
+
...(options.output.summary.trim() === "" ? {} : { summary: options.output.summary }),
|
|
50
|
+
unavailable_reason: options.output.unavailable_reason,
|
|
51
|
+
read_paths: options.output.read_paths,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function logNotStarted(input) {
|
|
55
|
+
input.logger?.info({
|
|
56
|
+
disposition: input.disposition,
|
|
57
|
+
requested_path_count: input.requestedPathCount,
|
|
58
|
+
...(input.targetCount === undefined ? {} : { target_count: input.targetCount }),
|
|
59
|
+
...(input.reason === undefined ? {} : { reason: input.reason }),
|
|
60
|
+
...(input.retryable === undefined ? {} : { retryable: input.retryable }),
|
|
61
|
+
...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
|
|
62
|
+
}, "Reference summary refresh not started");
|
|
63
|
+
}
|
|
64
|
+
async function runReferenceSummaryRefresh(options) {
|
|
65
|
+
const summaries = [];
|
|
66
|
+
let failedCount = 0;
|
|
67
|
+
let adapterUnavailableCount = 0;
|
|
68
|
+
for (const target of options.targets) {
|
|
69
|
+
try {
|
|
70
|
+
const output = await options.runner.runReferenceFileSummary?.({
|
|
71
|
+
workflow_ref: options.workflowRef,
|
|
72
|
+
activity_ref: options.activityRef,
|
|
73
|
+
file: {
|
|
74
|
+
path: target.path,
|
|
75
|
+
name: target.name,
|
|
76
|
+
category: target.category,
|
|
77
|
+
size_bytes: target.size_bytes,
|
|
78
|
+
blob_oid: target.blob_oid,
|
|
79
|
+
...(target.media_type === undefined ? {} : { media_type: target.media_type }),
|
|
80
|
+
},
|
|
81
|
+
}, {
|
|
82
|
+
workflow_ref: options.workflowRef,
|
|
83
|
+
activity_ref: options.activityRef,
|
|
84
|
+
});
|
|
85
|
+
if (output === undefined) {
|
|
86
|
+
adapterUnavailableCount += 1;
|
|
87
|
+
summaries.push({
|
|
88
|
+
path: target.path,
|
|
89
|
+
status: "unavailable",
|
|
90
|
+
generated_at: options.now().toISOString(),
|
|
91
|
+
source_blob_oid: target.blob_oid,
|
|
92
|
+
unavailable_reason: "summary_adapter_unavailable",
|
|
93
|
+
});
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
summaries.push(summaryRecordFromOutput({
|
|
97
|
+
target,
|
|
98
|
+
output,
|
|
99
|
+
generatedAt: options.now().toISOString(),
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
failedCount += 1;
|
|
104
|
+
options.logger?.info({
|
|
105
|
+
workflow_ref: options.workflowRef,
|
|
106
|
+
activity_ref: options.activityRef,
|
|
107
|
+
path: target.path,
|
|
108
|
+
error_name: error instanceof Error ? error.name : "UnknownError",
|
|
109
|
+
}, "Reference summary target failed");
|
|
110
|
+
summaries.push({
|
|
111
|
+
path: target.path,
|
|
112
|
+
status: "unavailable",
|
|
113
|
+
generated_at: options.now().toISOString(),
|
|
114
|
+
source_blob_oid: target.blob_oid,
|
|
115
|
+
unavailable_reason: "summary_failed",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let result;
|
|
120
|
+
try {
|
|
121
|
+
result = updateReferenceSummaries({
|
|
122
|
+
workspaceRoot: options.projectContext.workspaceRoot,
|
|
123
|
+
summaries,
|
|
124
|
+
now: options.now,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
recordProjectTimelineEvent(options.store.db, {
|
|
129
|
+
event_kind: "reference_summary",
|
|
130
|
+
status: "failed",
|
|
131
|
+
summary: "Reference summary write failed.",
|
|
132
|
+
activity_ref: options.activityRef,
|
|
133
|
+
workflow_ref: options.workflowRef,
|
|
134
|
+
meta: [
|
|
135
|
+
`target count: ${options.targets.length}`,
|
|
136
|
+
`error: ${error instanceof Error ? error.name : "UnknownError"}`,
|
|
137
|
+
],
|
|
138
|
+
now: options.now,
|
|
139
|
+
});
|
|
140
|
+
publishReferenceSummaryTimelineChanged({
|
|
141
|
+
events: options.events,
|
|
142
|
+
message: "Reference summary timeline updated.",
|
|
143
|
+
});
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
options.logger?.info({
|
|
147
|
+
workflow_ref: options.workflowRef,
|
|
148
|
+
activity_ref: options.activityRef,
|
|
149
|
+
target_count: options.targets.length,
|
|
150
|
+
updated_count: result.updated_paths.length,
|
|
151
|
+
failed_count: failedCount,
|
|
152
|
+
adapter_unavailable_count: adapterUnavailableCount,
|
|
153
|
+
...(result.commit_oid === undefined ? {} : { commit_oid: result.commit_oid }),
|
|
154
|
+
}, "Reference summaries refreshed");
|
|
155
|
+
recordProjectTimelineEvent(options.store.db, {
|
|
156
|
+
event_kind: "reference_summary",
|
|
157
|
+
status: "completed",
|
|
158
|
+
summary: result.updated_paths.length === 0
|
|
159
|
+
? "Reference summaries already up to date."
|
|
160
|
+
: `Updated ${result.updated_paths.length} reference summaries.`,
|
|
161
|
+
activity_ref: options.activityRef,
|
|
162
|
+
workflow_ref: options.workflowRef,
|
|
163
|
+
...(result.commit_oid === undefined ? {} : { commit_oid: result.commit_oid }),
|
|
164
|
+
meta: [
|
|
165
|
+
`target count: ${options.targets.length}`,
|
|
166
|
+
`updated paths: ${result.updated_paths.length}`,
|
|
167
|
+
`failed targets: ${failedCount}`,
|
|
168
|
+
`adapter unavailable: ${adapterUnavailableCount}`,
|
|
169
|
+
],
|
|
170
|
+
now: options.now,
|
|
171
|
+
});
|
|
172
|
+
publishReferenceSummaryTimelineChanged({
|
|
173
|
+
events: options.events,
|
|
174
|
+
message: "Reference summary timeline updated.",
|
|
175
|
+
...(result.updated_paths.length !== 0
|
|
176
|
+
? {
|
|
177
|
+
invalidates: [
|
|
178
|
+
{ kind: "viewer", path: "docs/reference" },
|
|
179
|
+
{ kind: "workspace" },
|
|
180
|
+
{ kind: "project_timeline" },
|
|
181
|
+
{ kind: "bootstrap" },
|
|
182
|
+
],
|
|
183
|
+
}
|
|
184
|
+
: {}),
|
|
185
|
+
});
|
|
186
|
+
return {
|
|
187
|
+
kind: "completed",
|
|
188
|
+
summary: result.updated_paths.length === 0
|
|
189
|
+
? "Reference summaries already up to date."
|
|
190
|
+
: `Updated ${result.updated_paths.length} reference summaries.`,
|
|
191
|
+
result_anchor: { kind: "workflow", workflow_ref: options.workflowRef },
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
export function startReferenceSummaryRefreshProcedure(input) {
|
|
195
|
+
const activeActivity = input.readActiveActivity();
|
|
196
|
+
const requestedPathCount = input.paths?.length ?? 0;
|
|
197
|
+
if (activeActivity !== null) {
|
|
198
|
+
logNotStarted({
|
|
199
|
+
logger: input.logger,
|
|
200
|
+
disposition: "already_running",
|
|
201
|
+
requestedPathCount,
|
|
202
|
+
activityRef: activeActivity.activity_ref,
|
|
203
|
+
});
|
|
204
|
+
return {
|
|
205
|
+
disposition: {
|
|
206
|
+
kind: "already_running",
|
|
207
|
+
activity_ref: activeActivity.activity_ref,
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (input.projectContext === undefined) {
|
|
212
|
+
logNotStarted({
|
|
213
|
+
logger: input.logger,
|
|
214
|
+
disposition: "provider_unavailable",
|
|
215
|
+
requestedPathCount,
|
|
216
|
+
reason: "provider_model_unavailable",
|
|
217
|
+
retryable: false,
|
|
218
|
+
});
|
|
219
|
+
return {
|
|
220
|
+
disposition: {
|
|
221
|
+
kind: "provider_unavailable",
|
|
222
|
+
reason: "provider_model_unavailable",
|
|
223
|
+
retryable: false,
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const targets = readTargets({
|
|
228
|
+
projectContext: input.projectContext,
|
|
229
|
+
...(input.paths === undefined ? {} : { paths: input.paths }),
|
|
230
|
+
now: input.now,
|
|
231
|
+
});
|
|
232
|
+
if (targets.length === 0) {
|
|
233
|
+
logNotStarted({
|
|
234
|
+
logger: input.logger,
|
|
235
|
+
disposition: "no_targets",
|
|
236
|
+
requestedPathCount,
|
|
237
|
+
targetCount: 0,
|
|
238
|
+
});
|
|
239
|
+
return { disposition: { kind: "no_targets" } };
|
|
240
|
+
}
|
|
241
|
+
const runnerResolution = input.resolveWorkflowRunner();
|
|
242
|
+
if (runnerResolution.kind === "not_configured") {
|
|
243
|
+
logNotStarted({
|
|
244
|
+
logger: input.logger,
|
|
245
|
+
disposition: "provider_not_configured",
|
|
246
|
+
requestedPathCount,
|
|
247
|
+
targetCount: targets.length,
|
|
248
|
+
});
|
|
249
|
+
return { disposition: { kind: "provider_not_configured" } };
|
|
250
|
+
}
|
|
251
|
+
if (runnerResolution.kind === "unavailable") {
|
|
252
|
+
logNotStarted({
|
|
253
|
+
logger: input.logger,
|
|
254
|
+
disposition: "provider_unavailable",
|
|
255
|
+
requestedPathCount,
|
|
256
|
+
targetCount: targets.length,
|
|
257
|
+
reason: runnerResolution.reason,
|
|
258
|
+
retryable: runnerResolution.retryable,
|
|
259
|
+
});
|
|
260
|
+
return {
|
|
261
|
+
disposition: {
|
|
262
|
+
kind: "provider_unavailable",
|
|
263
|
+
reason: runnerResolution.reason,
|
|
264
|
+
retryable: runnerResolution.retryable,
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
if (runnerResolution.runner.runReferenceFileSummary === undefined) {
|
|
269
|
+
logNotStarted({
|
|
270
|
+
logger: input.logger,
|
|
271
|
+
disposition: "provider_unavailable",
|
|
272
|
+
requestedPathCount,
|
|
273
|
+
targetCount: targets.length,
|
|
274
|
+
reason: "provider_model_unavailable",
|
|
275
|
+
retryable: false,
|
|
276
|
+
});
|
|
277
|
+
return {
|
|
278
|
+
disposition: {
|
|
279
|
+
kind: "provider_unavailable",
|
|
280
|
+
reason: "provider_model_unavailable",
|
|
281
|
+
retryable: false,
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
const workflowRef = createWorkflowInvocationRef();
|
|
286
|
+
const projectContext = input.projectContext;
|
|
287
|
+
const start = input.engine.startProcedure({
|
|
288
|
+
workflow_ref: workflowRef,
|
|
289
|
+
workflow_kind: "reference_summary_refresh",
|
|
290
|
+
lane: "foreground",
|
|
291
|
+
title: "Refresh Reference Summaries",
|
|
292
|
+
summary: "Summarizing reference files.",
|
|
293
|
+
now: input.now,
|
|
294
|
+
onTransition: input.publishProcedureTransition,
|
|
295
|
+
onError: ({ context, error }) => logProcedureExecutionError({
|
|
296
|
+
logger: input.logger,
|
|
297
|
+
workflowKind: "reference_summary_refresh",
|
|
298
|
+
workflowRef,
|
|
299
|
+
activityRef: context.activity_ref,
|
|
300
|
+
error,
|
|
301
|
+
}),
|
|
302
|
+
execute: async (context) => runReferenceSummaryRefresh({
|
|
303
|
+
store: input.store,
|
|
304
|
+
runner: runnerResolution.runner,
|
|
305
|
+
workflowRef,
|
|
306
|
+
activityRef: context.activity_ref,
|
|
307
|
+
targets,
|
|
308
|
+
projectContext,
|
|
309
|
+
events: input.events,
|
|
310
|
+
logger: input.logger,
|
|
311
|
+
now: input.now,
|
|
312
|
+
}),
|
|
313
|
+
});
|
|
314
|
+
if (start.kind === "already_running") {
|
|
315
|
+
logNotStarted({
|
|
316
|
+
logger: input.logger,
|
|
317
|
+
disposition: "already_running",
|
|
318
|
+
requestedPathCount,
|
|
319
|
+
targetCount: targets.length,
|
|
320
|
+
activityRef: start.activity_ref,
|
|
321
|
+
});
|
|
322
|
+
return {
|
|
323
|
+
disposition: {
|
|
324
|
+
kind: "already_running",
|
|
325
|
+
activity_ref: start.activity_ref,
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
input.logger?.info({
|
|
330
|
+
workflow_ref: workflowRef,
|
|
331
|
+
activity_ref: start.activity.activity_ref,
|
|
332
|
+
requested_path_count: requestedPathCount,
|
|
333
|
+
target_count: targets.length,
|
|
334
|
+
}, "Reference summary refresh accepted");
|
|
335
|
+
return {
|
|
336
|
+
disposition: { kind: "accepted" },
|
|
337
|
+
result: {
|
|
338
|
+
activity_ref: start.activity.activity_ref,
|
|
339
|
+
workflow_ref: workflowRef,
|
|
340
|
+
target_count: targets.length,
|
|
341
|
+
},
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=reference-summary-refresh.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RunLineage } from "@tutti/shared/domain";
|
|
2
|
+
export declare function toDomainRunLineage(lineage: {
|
|
3
|
+
attempt: number;
|
|
4
|
+
kind: RunLineage["kind"];
|
|
5
|
+
parent_activity_ref?: string;
|
|
6
|
+
root_activity_ref?: string;
|
|
7
|
+
}): RunLineage;
|
|
8
|
+
//# sourceMappingURL=run-lineage.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function toDomainRunLineage(lineage) {
|
|
2
|
+
return {
|
|
3
|
+
attempt: lineage.attempt,
|
|
4
|
+
kind: lineage.kind,
|
|
5
|
+
...(lineage.parent_activity_ref === undefined
|
|
6
|
+
? {}
|
|
7
|
+
: { parent_activity_ref: lineage.parent_activity_ref }),
|
|
8
|
+
...(lineage.root_activity_ref === undefined
|
|
9
|
+
? {}
|
|
10
|
+
: { root_activity_ref: lineage.root_activity_ref }),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=run-lineage.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { RunLineage } from "@tutti/shared/domain";
|
|
2
|
+
import type { ActivityRef, TaskId } from "@tutti/shared/ids";
|
|
3
|
+
import type { TaskProjection } from "@tutti/shared/schemas/api";
|
|
4
|
+
import { type RecordRunNeedsHumanResultResult, type RecordRunResultResult } from "../collaboration-state/index.js";
|
|
5
|
+
import type { HostProjectStore } from "../store/index.js";
|
|
6
|
+
import type { RunPipelineResult, RunPipelineTimelineEvent } from "./types.js";
|
|
7
|
+
type RecordedRunResult = RecordRunResultResult | RecordRunNeedsHumanResultResult;
|
|
8
|
+
type RunEngineTerminalResult = {
|
|
9
|
+
kind: "needs_human";
|
|
10
|
+
summary: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "completed";
|
|
13
|
+
summary: string;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "failed";
|
|
16
|
+
summary: string;
|
|
17
|
+
};
|
|
18
|
+
export type ControlPlaneRunResultRecord = {
|
|
19
|
+
recorded: RecordedRunResult;
|
|
20
|
+
terminal: RunEngineTerminalResult;
|
|
21
|
+
};
|
|
22
|
+
export declare function recordRunPipelineTimelineEvents(input: {
|
|
23
|
+
store: HostProjectStore;
|
|
24
|
+
activityRef: ActivityRef;
|
|
25
|
+
taskId: TaskId;
|
|
26
|
+
timelineEvents: readonly RunPipelineTimelineEvent[] | undefined;
|
|
27
|
+
now: () => Date;
|
|
28
|
+
}): void;
|
|
29
|
+
export declare function recordRunPipelineResult(input: {
|
|
30
|
+
store: HostProjectStore;
|
|
31
|
+
activityRef: ActivityRef;
|
|
32
|
+
task: TaskProjection;
|
|
33
|
+
runLineage: RunLineage;
|
|
34
|
+
pipelineResult: RunPipelineResult;
|
|
35
|
+
now: () => Date;
|
|
36
|
+
}): ControlPlaneRunResultRecord;
|
|
37
|
+
export declare function recordRunPipelineFailure(input: {
|
|
38
|
+
store: HostProjectStore;
|
|
39
|
+
activityRef: ActivityRef;
|
|
40
|
+
task: TaskProjection;
|
|
41
|
+
runLineage: RunLineage;
|
|
42
|
+
error: unknown;
|
|
43
|
+
now: () => Date;
|
|
44
|
+
}): ControlPlaneRunResultRecord;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=run-result-recording.d.ts.map
|