hivehq 2.0.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/CHANGELOG.md +592 -0
- package/LICENSE +208 -0
- package/LICENSE.BSL +101 -0
- package/NOTICE +15 -0
- package/README.en.md +451 -0
- package/README.md +329 -0
- package/SECURITY.md +59 -0
- package/TRADEMARK.md +41 -0
- package/assets/hive-hero.png +0 -0
- package/assets/hive-team-view.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/qq-group.jpg +0 -0
- package/dist/bin/team +7 -0
- package/dist/bin/team.cmd +3 -0
- package/dist/src/cli/hive-remote.d.ts +46 -0
- package/dist/src/cli/hive-remote.js +257 -0
- package/dist/src/cli/hive-update.d.ts +75 -0
- package/dist/src/cli/hive-update.js +215 -0
- package/dist/src/cli/hive.d.ts +78 -0
- package/dist/src/cli/hive.js +336 -0
- package/dist/src/cli/team.d.ts +38 -0
- package/dist/src/cli/team.js +762 -0
- package/dist/src/server/agent-command-resolver.d.ts +17 -0
- package/dist/src/server/agent-command-resolver.js +106 -0
- package/dist/src/server/agent-exit-classification.d.ts +6 -0
- package/dist/src/server/agent-exit-classification.js +6 -0
- package/dist/src/server/agent-launch-cache.d.ts +20 -0
- package/dist/src/server/agent-launch-cache.js +75 -0
- package/dist/src/server/agent-launch-resolver.d.ts +4 -0
- package/dist/src/server/agent-launch-resolver.js +38 -0
- package/dist/src/server/agent-manager-support.d.ts +36 -0
- package/dist/src/server/agent-manager-support.js +318 -0
- package/dist/src/server/agent-manager.d.ts +54 -0
- package/dist/src/server/agent-manager.js +104 -0
- package/dist/src/server/agent-run-bootstrap.d.ts +83 -0
- package/dist/src/server/agent-run-bootstrap.js +101 -0
- package/dist/src/server/agent-run-exit-handler.d.ts +8 -0
- package/dist/src/server/agent-run-exit-handler.js +32 -0
- package/dist/src/server/agent-run-start-context.d.ts +24 -0
- package/dist/src/server/agent-run-start-context.js +1 -0
- package/dist/src/server/agent-run-starter.d.ts +30 -0
- package/dist/src/server/agent-run-starter.js +155 -0
- package/dist/src/server/agent-run-store.d.ts +51 -0
- package/dist/src/server/agent-run-store.js +137 -0
- package/dist/src/server/agent-run-sync.d.ts +10 -0
- package/dist/src/server/agent-run-sync.js +32 -0
- package/dist/src/server/agent-runtime-active-run.d.ts +3 -0
- package/dist/src/server/agent-runtime-active-run.js +10 -0
- package/dist/src/server/agent-runtime-close.d.ts +5 -0
- package/dist/src/server/agent-runtime-close.js +36 -0
- package/dist/src/server/agent-runtime-contract.d.ts +48 -0
- package/dist/src/server/agent-runtime-contract.js +1 -0
- package/dist/src/server/agent-runtime-flow-adapter.d.ts +10 -0
- package/dist/src/server/agent-runtime-flow-adapter.js +14 -0
- package/dist/src/server/agent-runtime-list-runs.d.ts +3 -0
- package/dist/src/server/agent-runtime-list-runs.js +18 -0
- package/dist/src/server/agent-runtime-ports.d.ts +22 -0
- package/dist/src/server/agent-runtime-ports.js +1 -0
- package/dist/src/server/agent-runtime-stop-run.d.ts +4 -0
- package/dist/src/server/agent-runtime-stop-run.js +19 -0
- package/dist/src/server/agent-runtime-types.d.ts +5 -0
- package/dist/src/server/agent-runtime-types.js +1 -0
- package/dist/src/server/agent-runtime.d.ts +10 -0
- package/dist/src/server/agent-runtime.js +143 -0
- package/dist/src/server/agent-session-store.d.ts +7 -0
- package/dist/src/server/agent-session-store.js +45 -0
- package/dist/src/server/agent-startup-instructions.d.ts +20 -0
- package/dist/src/server/agent-startup-instructions.js +36 -0
- package/dist/src/server/agent-stdin-dispatcher.d.ts +52 -0
- package/dist/src/server/agent-stdin-dispatcher.js +224 -0
- package/dist/src/server/agent-tokens.d.ts +15 -0
- package/dist/src/server/agent-tokens.js +25 -0
- package/dist/src/server/app-state-store.d.ts +10 -0
- package/dist/src/server/app-state-store.js +12 -0
- package/dist/src/server/app.d.ts +20 -0
- package/dist/src/server/app.js +211 -0
- package/dist/src/server/claude-command-defaults.d.ts +1 -0
- package/dist/src/server/claude-command-defaults.js +5 -0
- package/dist/src/server/claude-session-coordinator.d.ts +10 -0
- package/dist/src/server/claude-session-coordinator.js +68 -0
- package/dist/src/server/claude-session-support.d.ts +1 -0
- package/dist/src/server/claude-session-support.js +1 -0
- package/dist/src/server/command-preset-defaults.d.ts +11 -0
- package/dist/src/server/command-preset-defaults.js +63 -0
- package/dist/src/server/command-preset-store.d.ts +49 -0
- package/dist/src/server/command-preset-store.js +83 -0
- package/dist/src/server/cron-util.d.ts +7 -0
- package/dist/src/server/cron-util.js +19 -0
- package/dist/src/server/dispatch-ledger-serializer.d.ts +15 -0
- package/dist/src/server/dispatch-ledger-serializer.js +14 -0
- package/dist/src/server/dispatch-ledger-store.d.ts +108 -0
- package/dist/src/server/dispatch-ledger-store.js +241 -0
- package/dist/src/server/env-sync-message.d.ts +9 -0
- package/dist/src/server/env-sync-message.js +29 -0
- package/dist/src/server/feature-flags.d.ts +42 -0
- package/dist/src/server/feature-flags.js +24 -0
- package/dist/src/server/fs-browse.d.ts +40 -0
- package/dist/src/server/fs-browse.js +306 -0
- package/dist/src/server/fs-pick-folder.d.ts +25 -0
- package/dist/src/server/fs-pick-folder.js +115 -0
- package/dist/src/server/fs-sandbox.d.ts +15 -0
- package/dist/src/server/fs-sandbox.js +56 -0
- package/dist/src/server/hive-team-guidance.d.ts +39 -0
- package/dist/src/server/hive-team-guidance.js +295 -0
- package/dist/src/server/http-errors.d.ts +22 -0
- package/dist/src/server/http-errors.js +44 -0
- package/dist/src/server/live-run-registry.d.ts +22 -0
- package/dist/src/server/live-run-registry.js +52 -0
- package/dist/src/server/local-request-guard.d.ts +3 -0
- package/dist/src/server/local-request-guard.js +41 -0
- package/dist/src/server/machine-name.d.ts +2 -0
- package/dist/src/server/machine-name.js +13 -0
- package/dist/src/server/marketplace-store.d.ts +38 -0
- package/dist/src/server/marketplace-store.js +85 -0
- package/dist/src/server/message-log-store.d.ts +51 -0
- package/dist/src/server/message-log-store.js +90 -0
- package/dist/src/server/open-target-commands.d.ts +54 -0
- package/dist/src/server/open-target-commands.js +204 -0
- package/dist/src/server/orchestrator-autostart.d.ts +42 -0
- package/dist/src/server/orchestrator-autostart.js +114 -0
- package/dist/src/server/orchestrator-launch.d.ts +24 -0
- package/dist/src/server/orchestrator-launch.js +71 -0
- package/dist/src/server/package-version.d.ts +17 -0
- package/dist/src/server/package-version.js +32 -0
- package/dist/src/server/path-canonicalization.d.ts +3 -0
- package/dist/src/server/path-canonicalization.js +29 -0
- package/dist/src/server/platform-path.d.ts +4 -0
- package/dist/src/server/platform-path.js +26 -0
- package/dist/src/server/post-start-input-writer.d.ts +6 -0
- package/dist/src/server/post-start-input-writer.js +242 -0
- package/dist/src/server/preset-launch-support.d.ts +6 -0
- package/dist/src/server/preset-launch-support.js +98 -0
- package/dist/src/server/pty-output-bus.d.ts +8 -0
- package/dist/src/server/pty-output-bus.js +32 -0
- package/dist/src/server/recovery-summary.d.ts +15 -0
- package/dist/src/server/recovery-summary.js +92 -0
- package/dist/src/server/remote-audit-store.d.ts +51 -0
- package/dist/src/server/remote-audit-store.js +108 -0
- package/dist/src/server/remote-config-keys.d.ts +17 -0
- package/dist/src/server/remote-config-keys.js +27 -0
- package/dist/src/server/remote-control-constants.d.ts +30 -0
- package/dist/src/server/remote-control-constants.js +29 -0
- package/dist/src/server/remote-device-session.d.ts +40 -0
- package/dist/src/server/remote-device-session.js +22 -0
- package/dist/src/server/remote-device-store.d.ts +36 -0
- package/dist/src/server/remote-device-store.js +67 -0
- package/dist/src/server/remote-frame-bridge.d.ts +102 -0
- package/dist/src/server/remote-frame-bridge.js +791 -0
- package/dist/src/server/remote-gateway-client.d.ts +14 -0
- package/dist/src/server/remote-gateway-client.js +36 -0
- package/dist/src/server/remote-loopback-auth.d.ts +6 -0
- package/dist/src/server/remote-loopback-auth.js +112 -0
- package/dist/src/server/remote-pairing-tunnel.d.ts +59 -0
- package/dist/src/server/remote-pairing-tunnel.js +146 -0
- package/dist/src/server/remote-pairing.d.ts +58 -0
- package/dist/src/server/remote-pairing.js +237 -0
- package/dist/src/server/remote-tunnel.d.ts +113 -0
- package/dist/src/server/remote-tunnel.js +514 -0
- package/dist/src/server/report-outbox-store.d.ts +36 -0
- package/dist/src/server/report-outbox-store.js +33 -0
- package/dist/src/server/restart-policy-support.d.ts +30 -0
- package/dist/src/server/restart-policy-support.js +21 -0
- package/dist/src/server/restart-policy.d.ts +18 -0
- package/dist/src/server/restart-policy.js +77 -0
- package/dist/src/server/role-template-store.d.ts +45 -0
- package/dist/src/server/role-template-store.js +76 -0
- package/dist/src/server/role-templates.d.ts +7 -0
- package/dist/src/server/role-templates.js +54 -0
- package/dist/src/server/route-helpers.d.ts +9 -0
- package/dist/src/server/route-helpers.js +61 -0
- package/dist/src/server/route-types.d.ts +121 -0
- package/dist/src/server/route-types.js +1 -0
- package/dist/src/server/routes-dispatches.d.ts +2 -0
- package/dist/src/server/routes-dispatches.js +54 -0
- package/dist/src/server/routes-fs.d.ts +2 -0
- package/dist/src/server/routes-fs.js +24 -0
- package/dist/src/server/routes-marketplace.d.ts +2 -0
- package/dist/src/server/routes-marketplace.js +54 -0
- package/dist/src/server/routes-open-workspace.d.ts +2 -0
- package/dist/src/server/routes-open-workspace.js +47 -0
- package/dist/src/server/routes-remote.d.ts +2 -0
- package/dist/src/server/routes-remote.js +166 -0
- package/dist/src/server/routes-runtime.d.ts +2 -0
- package/dist/src/server/routes-runtime.js +79 -0
- package/dist/src/server/routes-settings.d.ts +2 -0
- package/dist/src/server/routes-settings.js +213 -0
- package/dist/src/server/routes-tasks.d.ts +2 -0
- package/dist/src/server/routes-tasks.js +47 -0
- package/dist/src/server/routes-team-memory.d.ts +2 -0
- package/dist/src/server/routes-team-memory.js +154 -0
- package/dist/src/server/routes-team-recall.d.ts +2 -0
- package/dist/src/server/routes-team-recall.js +119 -0
- package/dist/src/server/routes-team.d.ts +2 -0
- package/dist/src/server/routes-team.js +351 -0
- package/dist/src/server/routes-ui.d.ts +2 -0
- package/dist/src/server/routes-ui.js +17 -0
- package/dist/src/server/routes-version.d.ts +2 -0
- package/dist/src/server/routes-version.js +6 -0
- package/dist/src/server/routes-workflow-schedules.d.ts +2 -0
- package/dist/src/server/routes-workflow-schedules.js +58 -0
- package/dist/src/server/routes-workflows.d.ts +2 -0
- package/dist/src/server/routes-workflows.js +83 -0
- package/dist/src/server/routes-workspace-memory-dreams.d.ts +2 -0
- package/dist/src/server/routes-workspace-memory-dreams.js +105 -0
- package/dist/src/server/routes-workspace-memory.d.ts +2 -0
- package/dist/src/server/routes-workspace-memory.js +215 -0
- package/dist/src/server/routes-workspaces.d.ts +2 -0
- package/dist/src/server/routes-workspaces.js +177 -0
- package/dist/src/server/routes.d.ts +6 -0
- package/dist/src/server/routes.js +55 -0
- package/dist/src/server/runtime-database.d.ts +3 -0
- package/dist/src/server/runtime-database.js +41 -0
- package/dist/src/server/runtime-message-builders.d.ts +7 -0
- package/dist/src/server/runtime-message-builders.js +60 -0
- package/dist/src/server/runtime-restart-policy.d.ts +18 -0
- package/dist/src/server/runtime-restart-policy.js +12 -0
- package/dist/src/server/runtime-store-contract.d.ts +162 -0
- package/dist/src/server/runtime-store-contract.js +1 -0
- package/dist/src/server/runtime-store-dream.d.ts +23 -0
- package/dist/src/server/runtime-store-dream.js +16 -0
- package/dist/src/server/runtime-store-helpers.d.ts +115 -0
- package/dist/src/server/runtime-store-helpers.js +411 -0
- package/dist/src/server/runtime-store-memory.d.ts +33 -0
- package/dist/src/server/runtime-store-memory.js +37 -0
- package/dist/src/server/runtime-store-remote.d.ts +5 -0
- package/dist/src/server/runtime-store-remote.js +45 -0
- package/dist/src/server/runtime-store-workflows.d.ts +6 -0
- package/dist/src/server/runtime-store-workflows.js +108 -0
- package/dist/src/server/runtime-store.d.ts +4 -0
- package/dist/src/server/runtime-store.js +165 -0
- package/dist/src/server/session-capture-claude.d.ts +34 -0
- package/dist/src/server/session-capture-claude.js +103 -0
- package/dist/src/server/session-capture-codex.d.ts +6 -0
- package/dist/src/server/session-capture-codex.js +108 -0
- package/dist/src/server/session-capture-gemini.d.ts +5 -0
- package/dist/src/server/session-capture-gemini.js +81 -0
- package/dist/src/server/session-capture-opencode.d.ts +22 -0
- package/dist/src/server/session-capture-opencode.js +75 -0
- package/dist/src/server/session-capture.d.ts +77 -0
- package/dist/src/server/session-capture.js +123 -0
- package/dist/src/server/settings-store.d.ts +22 -0
- package/dist/src/server/settings-store.js +22 -0
- package/dist/src/server/sqlite-schema-v10.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v10.js +13 -0
- package/dist/src/server/sqlite-schema-v11.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v11.js +10 -0
- package/dist/src/server/sqlite-schema-v12.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v12.js +21 -0
- package/dist/src/server/sqlite-schema-v13.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v13.js +4 -0
- package/dist/src/server/sqlite-schema-v14.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v14.js +84 -0
- package/dist/src/server/sqlite-schema-v15.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v15.js +73 -0
- package/dist/src/server/sqlite-schema-v16.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v16.js +6 -0
- package/dist/src/server/sqlite-schema-v17.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v17.js +15 -0
- package/dist/src/server/sqlite-schema-v18.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v18.js +6 -0
- package/dist/src/server/sqlite-schema-v19.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v19.js +17 -0
- package/dist/src/server/sqlite-schema-v20.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v20.js +20 -0
- package/dist/src/server/sqlite-schema-v21.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v21.js +20 -0
- package/dist/src/server/sqlite-schema-v22.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v22.js +27 -0
- package/dist/src/server/sqlite-schema-v23.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v23.js +43 -0
- package/dist/src/server/sqlite-schema-v24.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v24.js +34 -0
- package/dist/src/server/sqlite-schema-v25.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v25.js +127 -0
- package/dist/src/server/sqlite-schema-v26.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v26.js +56 -0
- package/dist/src/server/sqlite-schema-v27.d.ts +6 -0
- package/dist/src/server/sqlite-schema-v27.js +92 -0
- package/dist/src/server/sqlite-schema-v28.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v28.js +19 -0
- package/dist/src/server/sqlite-schema-v5.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v5.js +61 -0
- package/dist/src/server/sqlite-schema-v7.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v7.js +70 -0
- package/dist/src/server/sqlite-schema-v8.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v8.js +6 -0
- package/dist/src/server/sqlite-schema-v9.d.ts +2 -0
- package/dist/src/server/sqlite-schema-v9.js +6 -0
- package/dist/src/server/sqlite-schema.d.ts +3 -0
- package/dist/src/server/sqlite-schema.js +353 -0
- package/dist/src/server/startup-command-parser.d.ts +20 -0
- package/dist/src/server/startup-command-parser.js +72 -0
- package/dist/src/server/system-message.d.ts +8 -0
- package/dist/src/server/system-message.js +8 -0
- package/dist/src/server/task-deps.d.ts +32 -0
- package/dist/src/server/task-deps.js +40 -0
- package/dist/src/server/tasks-file-watcher.d.ts +47 -0
- package/dist/src/server/tasks-file-watcher.js +200 -0
- package/dist/src/server/tasks-file.d.ts +23 -0
- package/dist/src/server/tasks-file.js +101 -0
- package/dist/src/server/tasks-websocket-server.d.ts +8 -0
- package/dist/src/server/tasks-websocket-server.js +95 -0
- package/dist/src/server/team-authz.d.ts +13 -0
- package/dist/src/server/team-authz.js +53 -0
- package/dist/src/server/team-autostaff.d.ts +16 -0
- package/dist/src/server/team-autostaff.js +16 -0
- package/dist/src/server/team-list-enrichment.d.ts +22 -0
- package/dist/src/server/team-list-enrichment.js +40 -0
- package/dist/src/server/team-list-serializer.d.ts +2 -0
- package/dist/src/server/team-list-serializer.js +11 -0
- package/dist/src/server/team-memory-digest.d.ts +52 -0
- package/dist/src/server/team-memory-digest.js +200 -0
- package/dist/src/server/team-memory-dream-applier.d.ts +5 -0
- package/dist/src/server/team-memory-dream-applier.js +234 -0
- package/dist/src/server/team-memory-dream-http-serializers.d.ts +13 -0
- package/dist/src/server/team-memory-dream-http-serializers.js +12 -0
- package/dist/src/server/team-memory-dream-ops.d.ts +40 -0
- package/dist/src/server/team-memory-dream-ops.js +153 -0
- package/dist/src/server/team-memory-dream-reverter.d.ts +22 -0
- package/dist/src/server/team-memory-dream-reverter.js +221 -0
- package/dist/src/server/team-memory-dream-run-store.d.ts +23 -0
- package/dist/src/server/team-memory-dream-run-store.js +211 -0
- package/dist/src/server/team-memory-dream-runner.d.ts +37 -0
- package/dist/src/server/team-memory-dream-runner.js +178 -0
- package/dist/src/server/team-memory-dream-scheduler.d.ts +32 -0
- package/dist/src/server/team-memory-dream-scheduler.js +115 -0
- package/dist/src/server/team-memory-dream-store.d.ts +19 -0
- package/dist/src/server/team-memory-dream-store.js +16 -0
- package/dist/src/server/team-memory-dream-types.d.ts +104 -0
- package/dist/src/server/team-memory-dream-types.js +23 -0
- package/dist/src/server/team-memory-export.d.ts +22 -0
- package/dist/src/server/team-memory-export.js +220 -0
- package/dist/src/server/team-memory-feature.d.ts +12 -0
- package/dist/src/server/team-memory-feature.js +12 -0
- package/dist/src/server/team-memory-http-serializers.d.ts +102 -0
- package/dist/src/server/team-memory-http-serializers.js +46 -0
- package/dist/src/server/team-memory-injection.d.ts +31 -0
- package/dist/src/server/team-memory-injection.js +49 -0
- package/dist/src/server/team-memory-store.d.ts +116 -0
- package/dist/src/server/team-memory-store.js +513 -0
- package/dist/src/server/team-operations.d.ts +102 -0
- package/dist/src/server/team-operations.js +387 -0
- package/dist/src/server/team-recall-store.d.ts +38 -0
- package/dist/src/server/team-recall-store.js +205 -0
- package/dist/src/server/terminal-flow-control.d.ts +19 -0
- package/dist/src/server/terminal-flow-control.js +116 -0
- package/dist/src/server/terminal-input-profile.d.ts +10 -0
- package/dist/src/server/terminal-input-profile.js +9 -0
- package/dist/src/server/terminal-protocol.d.ts +29 -0
- package/dist/src/server/terminal-protocol.js +47 -0
- package/dist/src/server/terminal-state-mirror.d.ts +21 -0
- package/dist/src/server/terminal-state-mirror.js +67 -0
- package/dist/src/server/terminal-stream-hub.d.ts +9 -0
- package/dist/src/server/terminal-stream-hub.js +192 -0
- package/dist/src/server/terminal-ws-server.d.ts +6 -0
- package/dist/src/server/terminal-ws-server.js +115 -0
- package/dist/src/server/ui-auth-helpers.d.ts +4 -0
- package/dist/src/server/ui-auth-helpers.js +28 -0
- package/dist/src/server/ui-auth.d.ts +8 -0
- package/dist/src/server/ui-auth.js +32 -0
- package/dist/src/server/version-service.d.ts +16 -0
- package/dist/src/server/version-service.js +72 -0
- package/dist/src/server/webhook-notifier.d.ts +34 -0
- package/dist/src/server/webhook-notifier.js +47 -0
- package/dist/src/server/websocket-upgrade-safety.d.ts +10 -0
- package/dist/src/server/websocket-upgrade-safety.js +35 -0
- package/dist/src/server/windows-command-line.d.ts +3 -0
- package/dist/src/server/windows-command-line.js +9 -0
- package/dist/src/server/windows-filename.d.ts +2 -0
- package/dist/src/server/windows-filename.js +33 -0
- package/dist/src/server/worker-output-tracker.d.ts +14 -0
- package/dist/src/server/worker-output-tracker.js +50 -0
- package/dist/src/server/workflow-cli-policy.d.ts +60 -0
- package/dist/src/server/workflow-cli-policy.js +110 -0
- package/dist/src/server/workflow-dispatch-awaiter.d.ts +12 -0
- package/dist/src/server/workflow-dispatch-awaiter.js +80 -0
- package/dist/src/server/workflow-feature.d.ts +15 -0
- package/dist/src/server/workflow-feature.js +15 -0
- package/dist/src/server/workflow-http-serializers.d.ts +64 -0
- package/dist/src/server/workflow-http-serializers.js +58 -0
- package/dist/src/server/workflow-output-schema.d.ts +18 -0
- package/dist/src/server/workflow-output-schema.js +41 -0
- package/dist/src/server/workflow-run-log-store.d.ts +19 -0
- package/dist/src/server/workflow-run-log-store.js +45 -0
- package/dist/src/server/workflow-run-store.d.ts +50 -0
- package/dist/src/server/workflow-run-store.js +103 -0
- package/dist/src/server/workflow-runner.d.ts +147 -0
- package/dist/src/server/workflow-runner.js +411 -0
- package/dist/src/server/workflow-schedule-create.d.ts +14 -0
- package/dist/src/server/workflow-schedule-create.js +41 -0
- package/dist/src/server/workflow-schedule-store.d.ts +43 -0
- package/dist/src/server/workflow-schedule-store.js +112 -0
- package/dist/src/server/workflow-scheduler.d.ts +36 -0
- package/dist/src/server/workflow-scheduler.js +97 -0
- package/dist/src/server/workflow-script-loader.d.ts +34 -0
- package/dist/src/server/workflow-script-loader.js +106 -0
- package/dist/src/server/workspace-path-validation.d.ts +1 -0
- package/dist/src/server/workspace-path-validation.js +42 -0
- package/dist/src/server/workspace-shell-runtime.d.ts +35 -0
- package/dist/src/server/workspace-shell-runtime.js +228 -0
- package/dist/src/server/workspace-store-contract.d.ts +32 -0
- package/dist/src/server/workspace-store-contract.js +1 -0
- package/dist/src/server/workspace-store-hydration.d.ts +5 -0
- package/dist/src/server/workspace-store-hydration.js +76 -0
- package/dist/src/server/workspace-store-mutations.d.ts +14 -0
- package/dist/src/server/workspace-store-mutations.js +48 -0
- package/dist/src/server/workspace-store-support.d.ts +33 -0
- package/dist/src/server/workspace-store-support.js +36 -0
- package/dist/src/server/workspace-store.d.ts +5 -0
- package/dist/src/server/workspace-store.js +153 -0
- package/dist/src/shared/fs-browse.d.ts +1 -0
- package/dist/src/shared/fs-browse.js +1 -0
- package/dist/src/shared/open-targets.d.ts +20 -0
- package/dist/src/shared/open-targets.js +36 -0
- package/dist/src/shared/path-input.d.ts +12 -0
- package/dist/src/shared/path-input.js +22 -0
- package/dist/src/shared/remote-bridge-routing.d.ts +19 -0
- package/dist/src/shared/remote-bridge-routing.js +141 -0
- package/dist/src/shared/remote-crypto.d.ts +138 -0
- package/dist/src/shared/remote-crypto.js +427 -0
- package/dist/src/shared/remote-pairing-code.d.ts +7 -0
- package/dist/src/shared/remote-pairing-code.js +47 -0
- package/dist/src/shared/remote-protocol.d.ts +160 -0
- package/dist/src/shared/remote-protocol.js +526 -0
- package/dist/src/shared/team-memory.d.ts +11 -0
- package/dist/src/shared/team-memory.js +10 -0
- package/dist/src/shared/team-recall.d.ts +1 -0
- package/dist/src/shared/team-recall.js +1 -0
- package/dist/src/shared/types.d.ts +66 -0
- package/dist/src/shared/types.js +1 -0
- package/dist/vendor/marketplace/en/LICENSE +21 -0
- package/dist/vendor/marketplace/en/SOURCES.md +12 -0
- package/dist/vendor/marketplace/en/academic/academic-anthropologist.md +125 -0
- package/dist/vendor/marketplace/en/academic/academic-geographer.md +127 -0
- package/dist/vendor/marketplace/en/academic/academic-historian.md +123 -0
- package/dist/vendor/marketplace/en/academic/academic-narratologist.md +118 -0
- package/dist/vendor/marketplace/en/academic/academic-psychologist.md +118 -0
- package/dist/vendor/marketplace/en/design/design-brand-guardian.md +322 -0
- package/dist/vendor/marketplace/en/design/design-image-prompt-engineer.md +236 -0
- package/dist/vendor/marketplace/en/design/design-inclusive-visuals-specialist.md +71 -0
- package/dist/vendor/marketplace/en/design/design-ui-designer.md +383 -0
- package/dist/vendor/marketplace/en/design/design-ux-architect.md +469 -0
- package/dist/vendor/marketplace/en/design/design-ux-researcher.md +329 -0
- package/dist/vendor/marketplace/en/design/design-visual-storyteller.md +149 -0
- package/dist/vendor/marketplace/en/design/design-whimsy-injector.md +438 -0
- package/dist/vendor/marketplace/en/engineering/engineering-ai-data-remediation-engineer.md +211 -0
- package/dist/vendor/marketplace/en/engineering/engineering-ai-engineer.md +146 -0
- package/dist/vendor/marketplace/en/engineering/engineering-autonomous-optimization-architect.md +107 -0
- package/dist/vendor/marketplace/en/engineering/engineering-backend-architect.md +235 -0
- package/dist/vendor/marketplace/en/engineering/engineering-cms-developer.md +536 -0
- package/dist/vendor/marketplace/en/engineering/engineering-code-reviewer.md +76 -0
- package/dist/vendor/marketplace/en/engineering/engineering-codebase-onboarding-engineer.md +173 -0
- package/dist/vendor/marketplace/en/engineering/engineering-data-engineer.md +306 -0
- package/dist/vendor/marketplace/en/engineering/engineering-database-optimizer.md +176 -0
- package/dist/vendor/marketplace/en/engineering/engineering-devops-automator.md +376 -0
- package/dist/vendor/marketplace/en/engineering/engineering-email-intelligence-engineer.md +353 -0
- package/dist/vendor/marketplace/en/engineering/engineering-embedded-firmware-engineer.md +173 -0
- package/dist/vendor/marketplace/en/engineering/engineering-feishu-integration-developer.md +598 -0
- package/dist/vendor/marketplace/en/engineering/engineering-filament-optimization-specialist.md +283 -0
- package/dist/vendor/marketplace/en/engineering/engineering-frontend-developer.md +225 -0
- package/dist/vendor/marketplace/en/engineering/engineering-git-workflow-master.md +84 -0
- package/dist/vendor/marketplace/en/engineering/engineering-incident-response-commander.md +444 -0
- package/dist/vendor/marketplace/en/engineering/engineering-minimal-change-engineer.md +207 -0
- package/dist/vendor/marketplace/en/engineering/engineering-mobile-app-builder.md +493 -0
- package/dist/vendor/marketplace/en/engineering/engineering-rapid-prototyper.md +462 -0
- package/dist/vendor/marketplace/en/engineering/engineering-security-engineer.md +304 -0
- package/dist/vendor/marketplace/en/engineering/engineering-senior-developer.md +176 -0
- package/dist/vendor/marketplace/en/engineering/engineering-software-architect.md +81 -0
- package/dist/vendor/marketplace/en/engineering/engineering-solidity-smart-contract-engineer.md +522 -0
- package/dist/vendor/marketplace/en/engineering/engineering-sre.md +90 -0
- package/dist/vendor/marketplace/en/engineering/engineering-technical-writer.md +393 -0
- package/dist/vendor/marketplace/en/engineering/engineering-threat-detection-engineer.md +534 -0
- package/dist/vendor/marketplace/en/engineering/engineering-voice-ai-integration-engineer.md +561 -0
- package/dist/vendor/marketplace/en/engineering/engineering-wechat-mini-program-developer.md +350 -0
- package/dist/vendor/marketplace/en/finance/finance-bookkeeper-controller.md +260 -0
- package/dist/vendor/marketplace/en/finance/finance-financial-analyst.md +234 -0
- package/dist/vendor/marketplace/en/finance/finance-fpa-analyst.md +263 -0
- package/dist/vendor/marketplace/en/finance/finance-investment-researcher.md +272 -0
- package/dist/vendor/marketplace/en/finance/finance-tax-strategist.md +239 -0
- package/dist/vendor/marketplace/en/game-development/blender/blender-addon-engineer.md +234 -0
- package/dist/vendor/marketplace/en/game-development/game-audio-engineer.md +264 -0
- package/dist/vendor/marketplace/en/game-development/game-designer.md +167 -0
- package/dist/vendor/marketplace/en/game-development/godot/godot-gameplay-scripter.md +334 -0
- package/dist/vendor/marketplace/en/game-development/godot/godot-multiplayer-engineer.md +297 -0
- package/dist/vendor/marketplace/en/game-development/godot/godot-shader-developer.md +266 -0
- package/dist/vendor/marketplace/en/game-development/level-designer.md +208 -0
- package/dist/vendor/marketplace/en/game-development/narrative-designer.md +243 -0
- package/dist/vendor/marketplace/en/game-development/roblox-studio/roblox-avatar-creator.md +297 -0
- package/dist/vendor/marketplace/en/game-development/roblox-studio/roblox-experience-designer.md +305 -0
- package/dist/vendor/marketplace/en/game-development/roblox-studio/roblox-systems-scripter.md +325 -0
- package/dist/vendor/marketplace/en/game-development/technical-artist.md +229 -0
- package/dist/vendor/marketplace/en/game-development/unity/unity-architect.md +271 -0
- package/dist/vendor/marketplace/en/game-development/unity/unity-editor-tool-developer.md +310 -0
- package/dist/vendor/marketplace/en/game-development/unity/unity-multiplayer-engineer.md +321 -0
- package/dist/vendor/marketplace/en/game-development/unity/unity-shader-graph-artist.md +269 -0
- package/dist/vendor/marketplace/en/game-development/unreal-engine/unreal-multiplayer-architect.md +313 -0
- package/dist/vendor/marketplace/en/game-development/unreal-engine/unreal-systems-engineer.md +310 -0
- package/dist/vendor/marketplace/en/game-development/unreal-engine/unreal-technical-artist.md +256 -0
- package/dist/vendor/marketplace/en/game-development/unreal-engine/unreal-world-builder.md +273 -0
- package/dist/vendor/marketplace/en/integrations/mcp-memory/backend-architect-with-memory.md +247 -0
- package/dist/vendor/marketplace/en/manifest.json +1869 -0
- package/dist/vendor/marketplace/en/marketing/marketing-agentic-search-optimizer.md +311 -0
- package/dist/vendor/marketplace/en/marketing/marketing-ai-citation-strategist.md +170 -0
- package/dist/vendor/marketplace/en/marketing/marketing-app-store-optimizer.md +321 -0
- package/dist/vendor/marketplace/en/marketing/marketing-baidu-seo-specialist.md +226 -0
- package/dist/vendor/marketplace/en/marketing/marketing-bilibili-content-strategist.md +199 -0
- package/dist/vendor/marketplace/en/marketing/marketing-book-co-author.md +110 -0
- package/dist/vendor/marketplace/en/marketing/marketing-carousel-growth-engine.md +199 -0
- package/dist/vendor/marketplace/en/marketing/marketing-china-ecommerce-operator.md +283 -0
- package/dist/vendor/marketplace/en/marketing/marketing-china-market-localization-strategist.md +283 -0
- package/dist/vendor/marketplace/en/marketing/marketing-content-creator.md +54 -0
- package/dist/vendor/marketplace/en/marketing/marketing-cross-border-ecommerce.md +259 -0
- package/dist/vendor/marketplace/en/marketing/marketing-douyin-strategist.md +149 -0
- package/dist/vendor/marketplace/en/marketing/marketing-growth-hacker.md +54 -0
- package/dist/vendor/marketplace/en/marketing/marketing-instagram-curator.md +113 -0
- package/dist/vendor/marketplace/en/marketing/marketing-kuaishou-strategist.md +223 -0
- package/dist/vendor/marketplace/en/marketing/marketing-linkedin-content-creator.md +214 -0
- package/dist/vendor/marketplace/en/marketing/marketing-livestream-commerce-coach.md +305 -0
- package/dist/vendor/marketplace/en/marketing/marketing-podcast-strategist.md +277 -0
- package/dist/vendor/marketplace/en/marketing/marketing-private-domain-operator.md +308 -0
- package/dist/vendor/marketplace/en/marketing/marketing-reddit-community-builder.md +123 -0
- package/dist/vendor/marketplace/en/marketing/marketing-seo-specialist.md +321 -0
- package/dist/vendor/marketplace/en/marketing/marketing-short-video-editing-coach.md +412 -0
- package/dist/vendor/marketplace/en/marketing/marketing-social-media-strategist.md +125 -0
- package/dist/vendor/marketplace/en/marketing/marketing-tiktok-strategist.md +125 -0
- package/dist/vendor/marketplace/en/marketing/marketing-twitter-engager.md +126 -0
- package/dist/vendor/marketplace/en/marketing/marketing-video-optimization-specialist.md +119 -0
- package/dist/vendor/marketplace/en/marketing/marketing-wechat-official-account.md +145 -0
- package/dist/vendor/marketplace/en/marketing/marketing-weibo-strategist.md +240 -0
- package/dist/vendor/marketplace/en/marketing/marketing-xiaohongshu-specialist.md +138 -0
- package/dist/vendor/marketplace/en/marketing/marketing-zhihu-strategist.md +162 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-auditor.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-creative-strategist.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-paid-social-strategist.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-ppc-strategist.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-programmatic-buyer.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-search-query-analyst.md +71 -0
- package/dist/vendor/marketplace/en/paid-media/paid-media-tracking-specialist.md +71 -0
- package/dist/vendor/marketplace/en/product/product-behavioral-nudge-engine.md +80 -0
- package/dist/vendor/marketplace/en/product/product-feedback-synthesizer.md +119 -0
- package/dist/vendor/marketplace/en/product/product-manager.md +469 -0
- package/dist/vendor/marketplace/en/product/product-sprint-prioritizer.md +154 -0
- package/dist/vendor/marketplace/en/product/product-trend-researcher.md +159 -0
- package/dist/vendor/marketplace/en/project-management/project-management-experiment-tracker.md +198 -0
- package/dist/vendor/marketplace/en/project-management/project-management-jira-workflow-steward.md +230 -0
- package/dist/vendor/marketplace/en/project-management/project-management-project-shepherd.md +194 -0
- package/dist/vendor/marketplace/en/project-management/project-management-studio-operations.md +200 -0
- package/dist/vendor/marketplace/en/project-management/project-management-studio-producer.md +203 -0
- package/dist/vendor/marketplace/en/project-management/project-manager-senior.md +135 -0
- package/dist/vendor/marketplace/en/sales/sales-account-strategist.md +227 -0
- package/dist/vendor/marketplace/en/sales/sales-coach.md +271 -0
- package/dist/vendor/marketplace/en/sales/sales-deal-strategist.md +180 -0
- package/dist/vendor/marketplace/en/sales/sales-discovery-coach.md +225 -0
- package/dist/vendor/marketplace/en/sales/sales-engineer.md +182 -0
- package/dist/vendor/marketplace/en/sales/sales-outbound-strategist.md +201 -0
- package/dist/vendor/marketplace/en/sales/sales-pipeline-analyst.md +267 -0
- package/dist/vendor/marketplace/en/sales/sales-proposal-strategist.md +217 -0
- package/dist/vendor/marketplace/en/spatial-computing/macos-spatial-metal-engineer.md +337 -0
- package/dist/vendor/marketplace/en/spatial-computing/terminal-integration-specialist.md +70 -0
- package/dist/vendor/marketplace/en/spatial-computing/visionos-spatial-engineer.md +54 -0
- package/dist/vendor/marketplace/en/spatial-computing/xr-cockpit-interaction-specialist.md +32 -0
- package/dist/vendor/marketplace/en/spatial-computing/xr-immersive-developer.md +32 -0
- package/dist/vendor/marketplace/en/spatial-computing/xr-interface-architect.md +32 -0
- package/dist/vendor/marketplace/en/specialized/accounts-payable-agent.md +185 -0
- package/dist/vendor/marketplace/en/specialized/agentic-identity-trust.md +387 -0
- package/dist/vendor/marketplace/en/specialized/agents-orchestrator.md +367 -0
- package/dist/vendor/marketplace/en/specialized/automation-governance-architect.md +216 -0
- package/dist/vendor/marketplace/en/specialized/blockchain-security-auditor.md +463 -0
- package/dist/vendor/marketplace/en/specialized/compliance-auditor.md +158 -0
- package/dist/vendor/marketplace/en/specialized/corporate-training-designer.md +192 -0
- package/dist/vendor/marketplace/en/specialized/customer-service.md +398 -0
- package/dist/vendor/marketplace/en/specialized/data-consolidation-agent.md +60 -0
- package/dist/vendor/marketplace/en/specialized/government-digital-presales-consultant.md +363 -0
- package/dist/vendor/marketplace/en/specialized/healthcare-customer-service.md +389 -0
- package/dist/vendor/marketplace/en/specialized/healthcare-marketing-compliance.md +395 -0
- package/dist/vendor/marketplace/en/specialized/hospitality-guest-services.md +603 -0
- package/dist/vendor/marketplace/en/specialized/hr-onboarding.md +451 -0
- package/dist/vendor/marketplace/en/specialized/identity-graph-operator.md +260 -0
- package/dist/vendor/marketplace/en/specialized/language-translator.md +264 -0
- package/dist/vendor/marketplace/en/specialized/legal-billing-time-tracking.md +569 -0
- package/dist/vendor/marketplace/en/specialized/legal-client-intake.md +492 -0
- package/dist/vendor/marketplace/en/specialized/legal-document-review.md +454 -0
- package/dist/vendor/marketplace/en/specialized/loan-officer-assistant.md +555 -0
- package/dist/vendor/marketplace/en/specialized/lsp-index-engineer.md +314 -0
- package/dist/vendor/marketplace/en/specialized/real-estate-buyer-seller.md +596 -0
- package/dist/vendor/marketplace/en/specialized/recruitment-specialist.md +509 -0
- package/dist/vendor/marketplace/en/specialized/report-distribution-agent.md +65 -0
- package/dist/vendor/marketplace/en/specialized/retail-customer-returns.md +566 -0
- package/dist/vendor/marketplace/en/specialized/sales-data-extraction-agent.md +67 -0
- package/dist/vendor/marketplace/en/specialized/sales-outreach.md +425 -0
- package/dist/vendor/marketplace/en/specialized/specialized-chief-of-staff.md +279 -0
- package/dist/vendor/marketplace/en/specialized/specialized-civil-engineer.md +356 -0
- package/dist/vendor/marketplace/en/specialized/specialized-cultural-intelligence-strategist.md +88 -0
- package/dist/vendor/marketplace/en/specialized/specialized-developer-advocate.md +317 -0
- package/dist/vendor/marketplace/en/specialized/specialized-document-generator.md +55 -0
- package/dist/vendor/marketplace/en/specialized/specialized-french-consulting-market.md +192 -0
- package/dist/vendor/marketplace/en/specialized/specialized-korean-business-navigator.md +216 -0
- package/dist/vendor/marketplace/en/specialized/specialized-mcp-builder.md +248 -0
- package/dist/vendor/marketplace/en/specialized/specialized-model-qa.md +488 -0
- package/dist/vendor/marketplace/en/specialized/specialized-salesforce-architect.md +180 -0
- package/dist/vendor/marketplace/en/specialized/specialized-workflow-architect.md +597 -0
- package/dist/vendor/marketplace/en/specialized/study-abroad-advisor.md +282 -0
- package/dist/vendor/marketplace/en/specialized/supply-chain-strategist.md +582 -0
- package/dist/vendor/marketplace/en/support/support-analytics-reporter.md +365 -0
- package/dist/vendor/marketplace/en/support/support-executive-summary-generator.md +212 -0
- package/dist/vendor/marketplace/en/support/support-finance-tracker.md +442 -0
- package/dist/vendor/marketplace/en/support/support-infrastructure-maintainer.md +618 -0
- package/dist/vendor/marketplace/en/support/support-legal-compliance-checker.md +588 -0
- package/dist/vendor/marketplace/en/support/support-support-responder.md +585 -0
- package/dist/vendor/marketplace/en/testing/testing-accessibility-auditor.md +316 -0
- package/dist/vendor/marketplace/en/testing/testing-api-tester.md +306 -0
- package/dist/vendor/marketplace/en/testing/testing-evidence-collector.md +210 -0
- package/dist/vendor/marketplace/en/testing/testing-performance-benchmarker.md +268 -0
- package/dist/vendor/marketplace/en/testing/testing-reality-checker.md +236 -0
- package/dist/vendor/marketplace/en/testing/testing-test-results-analyzer.md +305 -0
- package/dist/vendor/marketplace/en/testing/testing-tool-evaluator.md +394 -0
- package/dist/vendor/marketplace/en/testing/testing-workflow-optimizer.md +450 -0
- package/dist/vendor/marketplace/zh/LICENSE +22 -0
- package/dist/vendor/marketplace/zh/SOURCES.md +12 -0
- package/dist/vendor/marketplace/zh/academic/academic-anthropologist.md +124 -0
- package/dist/vendor/marketplace/zh/academic/academic-geographer.md +126 -0
- package/dist/vendor/marketplace/zh/academic/academic-historian.md +122 -0
- package/dist/vendor/marketplace/zh/academic/academic-narratologist.md +117 -0
- package/dist/vendor/marketplace/zh/academic/academic-psychologist.md +117 -0
- package/dist/vendor/marketplace/zh/academic/academic-study-planner.md +214 -0
- package/dist/vendor/marketplace/zh/design/design-brand-guardian.md +321 -0
- package/dist/vendor/marketplace/zh/design/design-image-prompt-engineer.md +255 -0
- package/dist/vendor/marketplace/zh/design/design-inclusive-visuals-specialist.md +177 -0
- package/dist/vendor/marketplace/zh/design/design-ui-designer.md +382 -0
- package/dist/vendor/marketplace/zh/design/design-ux-architect.md +482 -0
- package/dist/vendor/marketplace/zh/design/design-ux-researcher.md +328 -0
- package/dist/vendor/marketplace/zh/design/design-visual-storyteller.md +159 -0
- package/dist/vendor/marketplace/zh/design/design-whimsy-injector.md +453 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-ai-data-remediation-engineer.md +209 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-ai-engineer.md +161 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-autonomous-optimization-architect.md +115 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-backend-architect.md +234 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-cms-developer.md +534 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-code-reviewer.md +172 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-codebase-onboarding-engineer.md +172 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-data-engineer.md +324 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-database-optimizer.md +175 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-devops-automator.md +375 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-dingtalk-integration-developer.md +574 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-email-intelligence-engineer.md +349 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-embedded-firmware-engineer.md +168 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-embedded-linux-driver-engineer.md +255 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-feishu-integration-developer.md +597 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-filament-optimization-specialist.md +283 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-fpga-digital-design-engineer.md +227 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-frontend-developer.md +224 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-git-workflow-master.md +220 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-incident-response-commander.md +465 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-iot-solution-architect.md +220 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-mechanical-design-engineer.md +311 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-minimal-change-engineer.md +206 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-mobile-app-builder.md +434 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-pc-host-engineer.md +231 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-rapid-prototyper.md +461 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-security-engineer.md +303 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-senior-developer.md +177 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-software-architect.md +200 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-solidity-smart-contract-engineer.md +541 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-sre.md +233 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-technical-writer.md +409 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-threat-detection-engineer.md +553 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-voice-ai-integration-engineer.md +560 -0
- package/dist/vendor/marketplace/zh/engineering/engineering-wechat-mini-program-developer.md +288 -0
- package/dist/vendor/marketplace/zh/finance/finance-bookkeeper-controller.md +271 -0
- package/dist/vendor/marketplace/zh/finance/finance-financial-analyst.md +244 -0
- package/dist/vendor/marketplace/zh/finance/finance-financial-forecaster.md +213 -0
- package/dist/vendor/marketplace/zh/finance/finance-fpa-analyst.md +272 -0
- package/dist/vendor/marketplace/zh/finance/finance-fraud-detector.md +241 -0
- package/dist/vendor/marketplace/zh/finance/finance-investment-researcher.md +283 -0
- package/dist/vendor/marketplace/zh/finance/finance-invoice-manager.md +242 -0
- package/dist/vendor/marketplace/zh/finance/finance-tax-strategist.md +250 -0
- package/dist/vendor/marketplace/zh/game-development/blender/blender-addon-engineer.md +233 -0
- package/dist/vendor/marketplace/zh/game-development/game-audio-engineer.md +265 -0
- package/dist/vendor/marketplace/zh/game-development/game-designer.md +168 -0
- package/dist/vendor/marketplace/zh/game-development/godot/godot-gameplay-scripter.md +335 -0
- package/dist/vendor/marketplace/zh/game-development/godot/godot-multiplayer-engineer.md +296 -0
- package/dist/vendor/marketplace/zh/game-development/godot/godot-shader-developer.md +267 -0
- package/dist/vendor/marketplace/zh/game-development/level-designer.md +209 -0
- package/dist/vendor/marketplace/zh/game-development/narrative-designer.md +244 -0
- package/dist/vendor/marketplace/zh/game-development/roblox-studio/roblox-avatar-creator.md +298 -0
- package/dist/vendor/marketplace/zh/game-development/roblox-studio/roblox-experience-designer.md +306 -0
- package/dist/vendor/marketplace/zh/game-development/roblox-studio/roblox-systems-scripter.md +325 -0
- package/dist/vendor/marketplace/zh/game-development/technical-artist.md +230 -0
- package/dist/vendor/marketplace/zh/game-development/unity/unity-architect.md +272 -0
- package/dist/vendor/marketplace/zh/game-development/unity/unity-editor-tool-developer.md +300 -0
- package/dist/vendor/marketplace/zh/game-development/unity/unity-multiplayer-engineer.md +238 -0
- package/dist/vendor/marketplace/zh/game-development/unity/unity-shader-graph-artist.md +270 -0
- package/dist/vendor/marketplace/zh/game-development/unreal-engine/unreal-multiplayer-architect.md +314 -0
- package/dist/vendor/marketplace/zh/game-development/unreal-engine/unreal-systems-engineer.md +311 -0
- package/dist/vendor/marketplace/zh/game-development/unreal-engine/unreal-technical-artist.md +256 -0
- package/dist/vendor/marketplace/zh/game-development/unreal-engine/unreal-world-builder.md +274 -0
- package/dist/vendor/marketplace/zh/hr/hr-performance-reviewer.md +248 -0
- package/dist/vendor/marketplace/zh/hr/hr-recruiter.md +232 -0
- package/dist/vendor/marketplace/zh/legal/legal-contract-reviewer.md +240 -0
- package/dist/vendor/marketplace/zh/legal/legal-policy-writer.md +308 -0
- package/dist/vendor/marketplace/zh/manifest.json +2181 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-agentic-search-optimizer.md +312 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-ai-citation-strategist.md +169 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-app-store-optimizer.md +319 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-baidu-seo-specialist.md +220 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-bilibili-strategist.md +194 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-book-co-author.md +109 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-carousel-growth-engine.md +215 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-china-ecommerce-operator.md +277 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-china-market-localization-strategist.md +282 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-content-creator.md +145 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-cross-border-ecommerce.md +260 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-daily-news-briefing.md +303 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-douyin-strategist.md +150 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-ecommerce-operator.md +216 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-growth-hacker.md +121 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-instagram-curator.md +179 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-knowledge-commerce-strategist.md +384 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-kuaishou-strategist.md +182 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-linkedin-content-creator.md +232 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-livestream-commerce-coach.md +303 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-podcast-strategist.md +278 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-private-domain-operator.md +309 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-reddit-community-builder.md +127 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-seo-specialist.md +298 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-short-video-editing-coach.md +413 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-social-media-strategist.md +118 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-tiktok-strategist.md +124 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-twitter-engager.md +132 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-video-optimization-specialist.md +128 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-wechat-official-account.md +158 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-wechat-operator.md +156 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-weibo-strategist.md +241 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-weixin-channels-strategist.md +297 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-xiaohongshu-operator.md +139 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-xiaohongshu-specialist.md +151 -0
- package/dist/vendor/marketplace/zh/marketing/marketing-zhihu-strategist.md +175 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-auditor.md +170 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-creative-strategist.md +173 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-paid-social-strategist.md +180 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-ppc-strategist.md +180 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-programmatic-buyer.md +177 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-search-query-analyst.md +182 -0
- package/dist/vendor/marketplace/zh/paid-media/paid-media-tracking-specialist.md +199 -0
- package/dist/vendor/marketplace/zh/product/product-behavioral-nudge-engine.md +246 -0
- package/dist/vendor/marketplace/zh/product/product-feedback-synthesizer.md +175 -0
- package/dist/vendor/marketplace/zh/product/product-manager.md +474 -0
- package/dist/vendor/marketplace/zh/product/product-sprint-prioritizer.md +133 -0
- package/dist/vendor/marketplace/zh/product/product-trend-researcher.md +143 -0
- package/dist/vendor/marketplace/zh/project-management/project-management-experiment-tracker.md +206 -0
- package/dist/vendor/marketplace/zh/project-management/project-management-jira-workflow-steward.md +249 -0
- package/dist/vendor/marketplace/zh/project-management/project-management-project-shepherd.md +202 -0
- package/dist/vendor/marketplace/zh/project-management/project-management-studio-operations.md +208 -0
- package/dist/vendor/marketplace/zh/project-management/project-management-studio-producer.md +211 -0
- package/dist/vendor/marketplace/zh/project-management/project-manager-senior.md +135 -0
- package/dist/vendor/marketplace/zh/sales/sales-account-strategist.md +243 -0
- package/dist/vendor/marketplace/zh/sales/sales-coach.md +291 -0
- package/dist/vendor/marketplace/zh/sales/sales-deal-strategist.md +204 -0
- package/dist/vendor/marketplace/zh/sales/sales-discovery-coach.md +230 -0
- package/dist/vendor/marketplace/zh/sales/sales-engineer.md +200 -0
- package/dist/vendor/marketplace/zh/sales/sales-outbound-strategist.md +208 -0
- package/dist/vendor/marketplace/zh/sales/sales-pipeline-analyst.md +284 -0
- package/dist/vendor/marketplace/zh/sales/sales-proposal-strategist.md +233 -0
- package/dist/vendor/marketplace/zh/spatial-computing/macos-spatial-metal-engineer.md +337 -0
- package/dist/vendor/marketplace/zh/spatial-computing/terminal-integration-specialist.md +236 -0
- package/dist/vendor/marketplace/zh/spatial-computing/visionos-spatial-engineer.md +282 -0
- package/dist/vendor/marketplace/zh/spatial-computing/xr-cockpit-interaction-specialist.md +220 -0
- package/dist/vendor/marketplace/zh/spatial-computing/xr-immersive-developer.md +229 -0
- package/dist/vendor/marketplace/zh/spatial-computing/xr-interface-architect.md +253 -0
- package/dist/vendor/marketplace/zh/specialized/accounts-payable-agent.md +212 -0
- package/dist/vendor/marketplace/zh/specialized/agentic-identity-trust.md +388 -0
- package/dist/vendor/marketplace/zh/specialized/agents-orchestrator.md +366 -0
- package/dist/vendor/marketplace/zh/specialized/automation-governance-architect.md +215 -0
- package/dist/vendor/marketplace/zh/specialized/blockchain-security-auditor.md +484 -0
- package/dist/vendor/marketplace/zh/specialized/compliance-auditor.md +172 -0
- package/dist/vendor/marketplace/zh/specialized/corporate-training-designer.md +191 -0
- package/dist/vendor/marketplace/zh/specialized/data-consolidation-agent.md +327 -0
- package/dist/vendor/marketplace/zh/specialized/gaokao-college-advisor.md +333 -0
- package/dist/vendor/marketplace/zh/specialized/government-digital-presales-consultant.md +362 -0
- package/dist/vendor/marketplace/zh/specialized/healthcare-customer-service.md +388 -0
- package/dist/vendor/marketplace/zh/specialized/healthcare-marketing-compliance.md +394 -0
- package/dist/vendor/marketplace/zh/specialized/hospitality-guest-services.md +597 -0
- package/dist/vendor/marketplace/zh/specialized/hr-onboarding.md +450 -0
- package/dist/vendor/marketplace/zh/specialized/identity-graph-operator.md +270 -0
- package/dist/vendor/marketplace/zh/specialized/language-translator.md +275 -0
- package/dist/vendor/marketplace/zh/specialized/legal-billing-time-tracking.md +566 -0
- package/dist/vendor/marketplace/zh/specialized/legal-client-intake.md +487 -0
- package/dist/vendor/marketplace/zh/specialized/legal-document-review.md +452 -0
- package/dist/vendor/marketplace/zh/specialized/livestock-archive-auditor.md +135 -0
- package/dist/vendor/marketplace/zh/specialized/loan-officer-assistant.md +549 -0
- package/dist/vendor/marketplace/zh/specialized/lsp-index-engineer.md +334 -0
- package/dist/vendor/marketplace/zh/specialized/prompt-engineer.md +176 -0
- package/dist/vendor/marketplace/zh/specialized/real-estate-buyer-seller.md +594 -0
- package/dist/vendor/marketplace/zh/specialized/recruitment-specialist.md +508 -0
- package/dist/vendor/marketplace/zh/specialized/report-distribution-agent.md +354 -0
- package/dist/vendor/marketplace/zh/specialized/retail-customer-returns.md +564 -0
- package/dist/vendor/marketplace/zh/specialized/sales-data-extraction-agent.md +159 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-ai-policy-writer.md +217 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-chief-of-staff.md +278 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-civil-engineer.md +355 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-cultural-intelligence-strategist.md +168 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-developer-advocate.md +334 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-document-generator.md +346 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-french-consulting-market.md +191 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-korean-business-navigator.md +215 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-mcp-builder.md +351 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-meeting-assistant.md +236 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-model-qa.md +507 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-pricing-optimizer.md +254 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-risk-assessor.md +240 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-salesforce-architect.md +179 -0
- package/dist/vendor/marketplace/zh/specialized/specialized-workflow-architect.md +596 -0
- package/dist/vendor/marketplace/zh/specialized/study-abroad-advisor.md +281 -0
- package/dist/vendor/marketplace/zh/specialized/technical-translator-agent.md +167 -0
- package/dist/vendor/marketplace/zh/specialized/zk-steward.md +228 -0
- package/dist/vendor/marketplace/zh/supply-chain/supply-chain-inventory-forecaster.md +212 -0
- package/dist/vendor/marketplace/zh/supply-chain/supply-chain-route-optimizer.md +224 -0
- package/dist/vendor/marketplace/zh/supply-chain/supply-chain-strategist.md +581 -0
- package/dist/vendor/marketplace/zh/supply-chain/supply-chain-vendor-evaluator.md +232 -0
- package/dist/vendor/marketplace/zh/support/support-analytics-reporter.md +364 -0
- package/dist/vendor/marketplace/zh/support/support-executive-summary-generator.md +217 -0
- package/dist/vendor/marketplace/zh/support/support-finance-tracker.md +447 -0
- package/dist/vendor/marketplace/zh/support/support-infrastructure-maintainer.md +623 -0
- package/dist/vendor/marketplace/zh/support/support-legal-compliance-checker.md +587 -0
- package/dist/vendor/marketplace/zh/support/support-recruitment-specialist.md +508 -0
- package/dist/vendor/marketplace/zh/support/support-support-responder.md +584 -0
- package/dist/vendor/marketplace/zh/testing/testing-accessibility-auditor.md +329 -0
- package/dist/vendor/marketplace/zh/testing/testing-api-tester.md +305 -0
- package/dist/vendor/marketplace/zh/testing/testing-embedded-qa-engineer.md +258 -0
- package/dist/vendor/marketplace/zh/testing/testing-evidence-collector.md +153 -0
- package/dist/vendor/marketplace/zh/testing/testing-performance-benchmarker.md +196 -0
- package/dist/vendor/marketplace/zh/testing/testing-reality-checker.md +235 -0
- package/dist/vendor/marketplace/zh/testing/testing-test-results-analyzer.md +313 -0
- package/dist/vendor/marketplace/zh/testing/testing-tool-evaluator.md +402 -0
- package/dist/vendor/marketplace/zh/testing/testing-workflow-optimizer.md +458 -0
- package/package.json +131 -0
- package/scripts/postinstall-native-artifacts.mjs +113 -0
- package/web/dist/assets/AddWorkerDialog-BU2Fn-Mx.js +2 -0
- package/web/dist/assets/AddWorkspaceFlow-BV04MkRt.js +1 -0
- package/web/dist/assets/FirstRunWizard-DS4IYOrd.js +1 -0
- package/web/dist/assets/MarketplaceDrawer-CIQ2B6Fx.js +76 -0
- package/web/dist/assets/TaskGraphDrawer-BPMcRocd.js +1 -0
- package/web/dist/assets/WhatsNewDialog-DEgVY_LD.js +1 -0
- package/web/dist/assets/WorkerModal-DiCcTPpc.js +1 -0
- package/web/dist/assets/WorkflowsDrawer-M2CgAJWK.js +1 -0
- package/web/dist/assets/WorkspaceMemoryDrawer-ClJIqWck.js +1 -0
- package/web/dist/assets/WorkspaceTaskDrawer-gjvXuZ2K.js +1 -0
- package/web/dist/assets/addon-clipboard-wHJhZAA4.js +1 -0
- package/web/dist/assets/addon-fit-DX4qG4td.js +1 -0
- package/web/dist/assets/addon-unicode11-Bt8F3D7-.js +7 -0
- package/web/dist/assets/addon-web-links-DIbG5aQx.js +1 -0
- package/web/dist/assets/addon-webgl-DCtw1yLn.js +64 -0
- package/web/dist/assets/finder-C4Jmsb0B.png +0 -0
- package/web/dist/assets/ghostty-D-Js4rdm.png +0 -0
- package/web/dist/assets/index-bOMtwrkA.js +73 -0
- package/web/dist/assets/index-i9YgsMdD.css +1 -0
- package/web/dist/assets/path-join-7MR1s7b1.js +1 -0
- package/web/dist/assets/search-CmzeVhy0.js +1 -0
- package/web/dist/assets/xterm-B-qIQCd3.js +16 -0
- package/web/dist/assets/zed-C5BQT8X3.png +0 -0
- package/web/dist/bilibili.ico +0 -0
- package/web/dist/cli-icons/claude.png +0 -0
- package/web/dist/cli-icons/codex.png +0 -0
- package/web/dist/cli-icons/gemini.png +0 -0
- package/web/dist/cli-icons/hermes.png +0 -0
- package/web/dist/cli-icons/opencode.svg +18 -0
- package/web/dist/icons/apple-touch-icon-180.png +0 -0
- package/web/dist/icons/icon-192.png +0 -0
- package/web/dist/icons/icon-32.png +0 -0
- package/web/dist/icons/icon-512-maskable.png +0 -0
- package/web/dist/icons/icon-512.png +0 -0
- package/web/dist/index.html +39 -0
- package/web/dist/logo.png +0 -0
- package/web/dist/manifest.webmanifest +60 -0
- package/web/dist/screenshots/wide-overview.png +0 -0
- package/web/dist/sounds/LICENSE-KENNEY.txt +22 -0
- package/web/dist/sounds/hive-beacon.ogg +0 -0
- package/web/dist/sounds/hive-cascade.ogg +0 -0
- package/web/dist/sounds/hive-chime.ogg +0 -0
- package/web/dist/sounds/hive-ping.ogg +0 -0
- package/web/dist/sounds/hive-resolve.ogg +0 -0
- package/web/dist/sounds/hive-soft.ogg +0 -0
- package/web/dist/sw.js +99 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow experimental feature gate.
|
|
3
|
+
*
|
|
4
|
+
* Workflows (`team workflow run`, the scheduler, the UI drawer, and the chunk
|
|
5
|
+
* of orchestrator guidance that teaches them) are a power feature with sharp
|
|
6
|
+
* edges — runaway fan-outs, authoring footguns, no run-resume yet. They ship
|
|
7
|
+
* OFF by default; a user opts in from Settings. While off, the orchestrator is
|
|
8
|
+
* not even taught about workflows, which also keeps its always-on prompt lean.
|
|
9
|
+
*
|
|
10
|
+
* Stored GLOBALLY in `app_state` under WORKFLOW_ENABLED_KEY. Absent / anything
|
|
11
|
+
* other than the exact string "true" reads back as DISABLED.
|
|
12
|
+
*/
|
|
13
|
+
export const WORKFLOW_ENABLED_KEY = 'workflow.enabled';
|
|
14
|
+
export const readWorkflowEnabled = (raw) => raw === 'true';
|
|
15
|
+
export const serializeWorkflowEnabled = (enabled) => (enabled ? 'true' : 'false');
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { LiveAgentRun } from './agent-runtime-types.js';
|
|
2
|
+
import type { DispatchRecord } from './dispatch-ledger-store.js';
|
|
3
|
+
import type { WorkflowRunRecord } from './workflow-run-store.js';
|
|
4
|
+
import type { WorkflowScheduleRecord } from './workflow-schedule-store.js';
|
|
5
|
+
export declare const serializeLiveAgentRun: (run: LiveAgentRun) => {
|
|
6
|
+
agent_id: string;
|
|
7
|
+
exit_code: number | null;
|
|
8
|
+
output: string;
|
|
9
|
+
pid: number | null;
|
|
10
|
+
run_id: string;
|
|
11
|
+
started_at: number;
|
|
12
|
+
status: import("./agent-manager.js").RunStatus;
|
|
13
|
+
};
|
|
14
|
+
export declare const serializeWorkflowRun: (run: WorkflowRunRecord) => {
|
|
15
|
+
agent_count: number;
|
|
16
|
+
args: unknown;
|
|
17
|
+
created_at: number;
|
|
18
|
+
error: string | null;
|
|
19
|
+
finished_at: number | null;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
parent_run_id: string | null;
|
|
23
|
+
phase: string | null;
|
|
24
|
+
result: unknown;
|
|
25
|
+
script_hash: string | null;
|
|
26
|
+
script_path: string;
|
|
27
|
+
started_at: number;
|
|
28
|
+
status: import("./workflow-run-store.js").WorkflowRunStatus;
|
|
29
|
+
workspace_id: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const serializeWorkflowDispatch: (dispatch: DispatchRecord & {
|
|
32
|
+
lastPtyLine?: string;
|
|
33
|
+
}) => {
|
|
34
|
+
artifacts: string[];
|
|
35
|
+
created_at: number;
|
|
36
|
+
delivered_at: number | null;
|
|
37
|
+
from_agent_id: string | null;
|
|
38
|
+
id: string;
|
|
39
|
+
label: string | null;
|
|
40
|
+
last_pty_line: string | null;
|
|
41
|
+
phase: string | null;
|
|
42
|
+
reported_at: number | null;
|
|
43
|
+
report_text: string | null;
|
|
44
|
+
sequence: number | null;
|
|
45
|
+
status: import("./dispatch-ledger-store.js").DispatchStatus;
|
|
46
|
+
step_index: number | null;
|
|
47
|
+
submitted_at: number | null;
|
|
48
|
+
text: string;
|
|
49
|
+
to_agent_id: string;
|
|
50
|
+
workflow_run_id: string | null;
|
|
51
|
+
workspace_id: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const serializeWorkflowSchedule: (schedule: WorkflowScheduleRecord) => {
|
|
54
|
+
args: unknown;
|
|
55
|
+
created_at: number;
|
|
56
|
+
cron: string;
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
id: string;
|
|
59
|
+
last_run_at: number | null;
|
|
60
|
+
next_run_at: number;
|
|
61
|
+
script_path: string;
|
|
62
|
+
updated_at: number;
|
|
63
|
+
workspace_id: string;
|
|
64
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export const serializeLiveAgentRun = (run) => ({
|
|
2
|
+
agent_id: run.agentId,
|
|
3
|
+
exit_code: run.exitCode,
|
|
4
|
+
output: run.output,
|
|
5
|
+
pid: run.pid,
|
|
6
|
+
run_id: run.runId,
|
|
7
|
+
started_at: run.startedAt,
|
|
8
|
+
status: run.status,
|
|
9
|
+
});
|
|
10
|
+
export const serializeWorkflowRun = (run) => ({
|
|
11
|
+
agent_count: run.agentCount,
|
|
12
|
+
args: run.args,
|
|
13
|
+
created_at: run.createdAt,
|
|
14
|
+
error: run.error,
|
|
15
|
+
finished_at: run.finishedAt,
|
|
16
|
+
id: run.id,
|
|
17
|
+
name: run.name,
|
|
18
|
+
parent_run_id: run.parentRunId,
|
|
19
|
+
phase: run.phase,
|
|
20
|
+
result: run.result,
|
|
21
|
+
script_hash: run.scriptHash,
|
|
22
|
+
script_path: run.scriptPath,
|
|
23
|
+
started_at: run.startedAt,
|
|
24
|
+
status: run.status,
|
|
25
|
+
workspace_id: run.workspaceId,
|
|
26
|
+
});
|
|
27
|
+
export const serializeWorkflowDispatch = (dispatch) => ({
|
|
28
|
+
artifacts: dispatch.artifacts,
|
|
29
|
+
created_at: dispatch.createdAt,
|
|
30
|
+
delivered_at: dispatch.deliveredAt,
|
|
31
|
+
from_agent_id: dispatch.fromAgentId,
|
|
32
|
+
id: dispatch.id,
|
|
33
|
+
label: dispatch.label,
|
|
34
|
+
last_pty_line: dispatch.lastPtyLine ?? null,
|
|
35
|
+
phase: dispatch.phase,
|
|
36
|
+
reported_at: dispatch.reportedAt,
|
|
37
|
+
report_text: dispatch.reportText,
|
|
38
|
+
sequence: dispatch.sequence,
|
|
39
|
+
status: dispatch.status,
|
|
40
|
+
step_index: dispatch.stepIndex,
|
|
41
|
+
submitted_at: dispatch.submittedAt,
|
|
42
|
+
text: dispatch.text,
|
|
43
|
+
to_agent_id: dispatch.toAgentId,
|
|
44
|
+
workflow_run_id: dispatch.workflowRunId,
|
|
45
|
+
workspace_id: dispatch.workspaceId,
|
|
46
|
+
});
|
|
47
|
+
export const serializeWorkflowSchedule = (schedule) => ({
|
|
48
|
+
args: schedule.args,
|
|
49
|
+
created_at: schedule.createdAt,
|
|
50
|
+
cron: schedule.cron,
|
|
51
|
+
enabled: schedule.enabled,
|
|
52
|
+
id: schedule.id,
|
|
53
|
+
last_run_at: schedule.lastRunAt,
|
|
54
|
+
next_run_at: schedule.nextRunAt,
|
|
55
|
+
script_path: schedule.scriptPath,
|
|
56
|
+
updated_at: schedule.updatedAt,
|
|
57
|
+
workspace_id: schedule.workspaceId,
|
|
58
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opt-in structured output for the workflow DSL `agent()` call. When a script
|
|
3
|
+
* passes `outputSchema`, the runner appends an instruction asking the worker to
|
|
4
|
+
* end its report with a fenced ```json block, then parses that block so the
|
|
5
|
+
* script gets an object instead of brittle free-text. Kept deliberately LIGHT:
|
|
6
|
+
* no schema validation library, no retry — the keys are advisory, and a parse
|
|
7
|
+
* miss falls back to `{ text }` in the runner so a script can always branch on
|
|
8
|
+
* a missing field (the documented safe-default discipline).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Extract and parse the LAST fenced json block in a report. Workers often emit
|
|
12
|
+
* a reasoning block then a final answer block, so the last one wins. Returns
|
|
13
|
+
* null on no block / invalid JSON / a non-object payload (so the caller's
|
|
14
|
+
* `?? { text }` fallback fires) rather than throwing.
|
|
15
|
+
*/
|
|
16
|
+
export declare const extractJsonBlock: (text: string) => Record<string, unknown> | null;
|
|
17
|
+
/** The terse instruction appended to the worker prompt when a schema is set. */
|
|
18
|
+
export declare const buildSchemaInstruction: (schema: Record<string, unknown>) => string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opt-in structured output for the workflow DSL `agent()` call. When a script
|
|
3
|
+
* passes `outputSchema`, the runner appends an instruction asking the worker to
|
|
4
|
+
* end its report with a fenced ```json block, then parses that block so the
|
|
5
|
+
* script gets an object instead of brittle free-text. Kept deliberately LIGHT:
|
|
6
|
+
* no schema validation library, no retry — the keys are advisory, and a parse
|
|
7
|
+
* miss falls back to `{ text }` in the runner so a script can always branch on
|
|
8
|
+
* a missing field (the documented safe-default discipline).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Extract and parse the LAST fenced json block in a report. Workers often emit
|
|
12
|
+
* a reasoning block then a final answer block, so the last one wins. Returns
|
|
13
|
+
* null on no block / invalid JSON / a non-object payload (so the caller's
|
|
14
|
+
* `?? { text }` fallback fires) rather than throwing.
|
|
15
|
+
*/
|
|
16
|
+
export const extractJsonBlock = (text) => {
|
|
17
|
+
const matches = [...text.matchAll(/```(?:json)?[ \t]*\r?\n?([\s\S]*?)```/g)];
|
|
18
|
+
const last = matches.at(-1)?.[1];
|
|
19
|
+
if (last === undefined)
|
|
20
|
+
return null;
|
|
21
|
+
try {
|
|
22
|
+
const parsed = JSON.parse(last.trim());
|
|
23
|
+
return parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
24
|
+
? parsed
|
|
25
|
+
: null;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/** The terse instruction appended to the worker prompt when a schema is set. */
|
|
32
|
+
export const buildSchemaInstruction = (schema) => {
|
|
33
|
+
const keys = Object.keys(schema);
|
|
34
|
+
const keyList = keys.length > 0 ? keys.join(', ') : '(see the task)';
|
|
35
|
+
return [
|
|
36
|
+
'',
|
|
37
|
+
'When you are done, end your report with a single fenced ```json block as the LAST thing in your message.',
|
|
38
|
+
`That JSON object should use these keys: ${keyList}.`,
|
|
39
|
+
'If you cannot determine a field, omit it — the caller treats a missing field as the safe default.',
|
|
40
|
+
].join('\n');
|
|
41
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Database } from 'better-sqlite3';
|
|
2
|
+
export interface WorkflowRunLogRecord {
|
|
3
|
+
id: number;
|
|
4
|
+
runId: string;
|
|
5
|
+
ts: number;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const createWorkflowRunLogStore: (db: Database) => {
|
|
9
|
+
append(runId: string, message: string, ts?: number): void;
|
|
10
|
+
listForRun(runId: string): WorkflowRunLogRecord[];
|
|
11
|
+
/** Last `n` log messages for the run, oldest-first. Used by the
|
|
12
|
+
* onRunFinished reminder to include a short narrator tail in the
|
|
13
|
+
* orchestrator's completion notification without overwhelming it. */
|
|
14
|
+
tailForRun(runId: string, n: number): string[];
|
|
15
|
+
deleteForRun(runId: string): void;
|
|
16
|
+
/** Cascade hook: deleted alongside workflow_runs when a workspace
|
|
17
|
+
* is removed (TIER 1 #4 cascade). */
|
|
18
|
+
deleteForWorkspace(workspaceId: string): void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* TIER 2 #3 — narrator lane storage. `log()` calls from a workflow script
|
|
2
|
+
* append here; the Drawer polls listForRun(runId) alongside the dispatch
|
|
3
|
+
* timeline; the orchestrator's completion reminder splices in the last
|
|
4
|
+
* few lines so a run that finished with a long sequence of `log()` calls
|
|
5
|
+
* can be summarised back to the user.
|
|
6
|
+
*
|
|
7
|
+
* Append-only. No retention policy yet — TIER 3 work if log volume grows
|
|
8
|
+
* to where it matters; CC's Workflow tool keeps logs for the run's
|
|
9
|
+
* lifetime so we mirror that. */
|
|
10
|
+
export const createWorkflowRunLogStore = (db) => {
|
|
11
|
+
const insert = db.prepare('INSERT INTO workflow_run_logs (run_id, ts, message) VALUES (?, ?, ?)');
|
|
12
|
+
const listStmt = db.prepare('SELECT id, run_id, ts, message FROM workflow_run_logs WHERE run_id = ? ORDER BY id');
|
|
13
|
+
const tailStmt = db.prepare('SELECT message FROM workflow_run_logs WHERE run_id = ? ORDER BY id DESC LIMIT ?');
|
|
14
|
+
const deleteForRunStmt = db.prepare('DELETE FROM workflow_run_logs WHERE run_id = ?');
|
|
15
|
+
const deleteForWorkspaceStmt = db.prepare(`DELETE FROM workflow_run_logs
|
|
16
|
+
WHERE run_id IN (SELECT id FROM workflow_runs WHERE workspace_id = ?)`);
|
|
17
|
+
return {
|
|
18
|
+
append(runId, message, ts = Date.now()) {
|
|
19
|
+
insert.run(runId, ts, message);
|
|
20
|
+
},
|
|
21
|
+
listForRun(runId) {
|
|
22
|
+
return listStmt.all(runId).map((row) => ({
|
|
23
|
+
id: row.id,
|
|
24
|
+
runId: row.run_id,
|
|
25
|
+
ts: row.ts,
|
|
26
|
+
message: row.message,
|
|
27
|
+
}));
|
|
28
|
+
},
|
|
29
|
+
/** Last `n` log messages for the run, oldest-first. Used by the
|
|
30
|
+
* onRunFinished reminder to include a short narrator tail in the
|
|
31
|
+
* orchestrator's completion notification without overwhelming it. */
|
|
32
|
+
tailForRun(runId, n) {
|
|
33
|
+
const rows = tailStmt.all(runId, n);
|
|
34
|
+
return rows.map((r) => r.message).reverse();
|
|
35
|
+
},
|
|
36
|
+
deleteForRun(runId) {
|
|
37
|
+
deleteForRunStmt.run(runId);
|
|
38
|
+
},
|
|
39
|
+
/** Cascade hook: deleted alongside workflow_runs when a workspace
|
|
40
|
+
* is removed (TIER 1 #4 cascade). */
|
|
41
|
+
deleteForWorkspace(workspaceId) {
|
|
42
|
+
deleteForWorkspaceStmt.run(workspaceId);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Database } from 'better-sqlite3';
|
|
2
|
+
export type WorkflowRunStatus = 'running' | 'completed' | 'failed' | 'interrupted' | 'stopped';
|
|
3
|
+
export interface WorkflowRunRecord {
|
|
4
|
+
id: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
scriptPath: string;
|
|
7
|
+
scriptHash: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
status: WorkflowRunStatus;
|
|
10
|
+
phase: string | null;
|
|
11
|
+
args: unknown;
|
|
12
|
+
result: unknown;
|
|
13
|
+
startedAt: number;
|
|
14
|
+
finishedAt: number | null;
|
|
15
|
+
error: string | null;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
/** Count of `agent()` calls dispatched by this run. TIER 1 #14 — lets the
|
|
18
|
+
* Drawer show "12 agents" on the row without an extra round-trip per
|
|
19
|
+
* expand. Cheap subquery against the indexed workflow_run_id column. */
|
|
20
|
+
agentCount: number;
|
|
21
|
+
/** TIER 2 #5: parent workflow run id for nested workflow() calls.
|
|
22
|
+
* Null on top-level runs. The Drawer uses this to render a child run
|
|
23
|
+
* indented under its parent (and to collapse/expand together). */
|
|
24
|
+
parentRunId: string | null;
|
|
25
|
+
}
|
|
26
|
+
interface CreateRunInput {
|
|
27
|
+
workspaceId: string;
|
|
28
|
+
scriptPath: string;
|
|
29
|
+
name: string;
|
|
30
|
+
scriptHash?: string;
|
|
31
|
+
args?: unknown;
|
|
32
|
+
/** TIER 2 #5 — set when this run is being created from a nested
|
|
33
|
+
* workflow() call. Null/omitted for top-level runs. */
|
|
34
|
+
parentRunId?: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface UpdateRunInput {
|
|
37
|
+
status?: WorkflowRunStatus;
|
|
38
|
+
phase?: string;
|
|
39
|
+
finishedAt?: number;
|
|
40
|
+
error?: string;
|
|
41
|
+
result?: unknown;
|
|
42
|
+
}
|
|
43
|
+
export declare const createWorkflowRunStore: (db: Database) => {
|
|
44
|
+
createRun: (input: CreateRunInput) => WorkflowRunRecord;
|
|
45
|
+
updateRun: (id: string, input: UpdateRunInput) => void;
|
|
46
|
+
getRun: (id: string) => WorkflowRunRecord | undefined;
|
|
47
|
+
listWorkspaceRuns: (workspaceId: string) => WorkflowRunRecord[];
|
|
48
|
+
markUnfinishedRunsInterrupted: () => void;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
const parseArgs = (value) => {
|
|
3
|
+
if (!value)
|
|
4
|
+
return null;
|
|
5
|
+
try {
|
|
6
|
+
return JSON.parse(value);
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const toRecord = (row) => ({
|
|
13
|
+
id: row.id,
|
|
14
|
+
workspaceId: row.workspace_id,
|
|
15
|
+
scriptPath: row.script_path,
|
|
16
|
+
scriptHash: row.script_hash,
|
|
17
|
+
name: row.name,
|
|
18
|
+
status: row.status,
|
|
19
|
+
phase: row.phase,
|
|
20
|
+
args: parseArgs(row.args),
|
|
21
|
+
result: parseArgs(row.result),
|
|
22
|
+
startedAt: row.started_at,
|
|
23
|
+
finishedAt: row.finished_at,
|
|
24
|
+
error: row.error,
|
|
25
|
+
createdAt: row.created_at,
|
|
26
|
+
agentCount: Number(row.agent_count ?? 0),
|
|
27
|
+
parentRunId: row.parent_run_id ?? null,
|
|
28
|
+
});
|
|
29
|
+
// Selects every workflow_runs column plus the agent_count subquery; used by
|
|
30
|
+
// both getRun and listWorkspaceRuns so the WorkflowRunRecord shape is
|
|
31
|
+
// uniform regardless of which path produced it.
|
|
32
|
+
const SELECT_RUN_COLUMNS = 'workflow_runs.*, ' +
|
|
33
|
+
'(SELECT COUNT(*) FROM dispatches WHERE dispatches.workflow_run_id = workflow_runs.id) AS agent_count';
|
|
34
|
+
export const createWorkflowRunStore = (db) => {
|
|
35
|
+
const createRun = (input) => {
|
|
36
|
+
const now = Date.now();
|
|
37
|
+
const record = {
|
|
38
|
+
id: randomUUID(),
|
|
39
|
+
workspaceId: input.workspaceId,
|
|
40
|
+
scriptPath: input.scriptPath,
|
|
41
|
+
scriptHash: input.scriptHash ?? null,
|
|
42
|
+
name: input.name,
|
|
43
|
+
status: 'running',
|
|
44
|
+
phase: null,
|
|
45
|
+
args: input.args ?? null,
|
|
46
|
+
result: null,
|
|
47
|
+
startedAt: now,
|
|
48
|
+
finishedAt: null,
|
|
49
|
+
error: null,
|
|
50
|
+
createdAt: now,
|
|
51
|
+
agentCount: 0,
|
|
52
|
+
parentRunId: input.parentRunId ?? null,
|
|
53
|
+
};
|
|
54
|
+
db.prepare(`INSERT INTO workflow_runs (
|
|
55
|
+
id, workspace_id, script_path, script_hash, name, status, phase, args,
|
|
56
|
+
started_at, finished_at, error, created_at, parent_run_id
|
|
57
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(record.id, record.workspaceId, record.scriptPath, record.scriptHash, record.name, record.status, record.phase, record.args === null ? null : JSON.stringify(record.args), record.startedAt, record.finishedAt, record.error, record.createdAt, record.parentRunId);
|
|
58
|
+
return record;
|
|
59
|
+
};
|
|
60
|
+
const updateRun = (id, input) => {
|
|
61
|
+
const sets = [];
|
|
62
|
+
const values = [];
|
|
63
|
+
if (input.status !== undefined) {
|
|
64
|
+
sets.push('status = ?');
|
|
65
|
+
values.push(input.status);
|
|
66
|
+
}
|
|
67
|
+
if (input.phase !== undefined) {
|
|
68
|
+
sets.push('phase = ?');
|
|
69
|
+
values.push(input.phase);
|
|
70
|
+
}
|
|
71
|
+
if (input.finishedAt !== undefined) {
|
|
72
|
+
sets.push('finished_at = ?');
|
|
73
|
+
values.push(input.finishedAt);
|
|
74
|
+
}
|
|
75
|
+
if (input.error !== undefined) {
|
|
76
|
+
sets.push('error = ?');
|
|
77
|
+
values.push(input.error);
|
|
78
|
+
}
|
|
79
|
+
if (input.result !== undefined) {
|
|
80
|
+
sets.push('result = ?');
|
|
81
|
+
values.push(input.result === null ? null : JSON.stringify(input.result));
|
|
82
|
+
}
|
|
83
|
+
if (sets.length === 0)
|
|
84
|
+
return;
|
|
85
|
+
values.push(id);
|
|
86
|
+
db.prepare(`UPDATE workflow_runs SET ${sets.join(', ')} WHERE id = ?`).run(...values);
|
|
87
|
+
};
|
|
88
|
+
const getRun = (id) => {
|
|
89
|
+
const row = db
|
|
90
|
+
.prepare(`SELECT ${SELECT_RUN_COLUMNS} FROM workflow_runs WHERE id = ?`)
|
|
91
|
+
.get(id);
|
|
92
|
+
return row ? toRecord(row) : undefined;
|
|
93
|
+
};
|
|
94
|
+
const listWorkspaceRuns = (workspaceId) => db
|
|
95
|
+
.prepare(`SELECT ${SELECT_RUN_COLUMNS} FROM workflow_runs WHERE workspace_id = ? ORDER BY created_at DESC, id DESC`)
|
|
96
|
+
.all(workspaceId).map(toRecord);
|
|
97
|
+
// Boot sweep: a run still 'running' after a restart can never resume, so mark
|
|
98
|
+
// it interrupted (spec §13 — the UI offers Resume; we never auto-resume).
|
|
99
|
+
const markUnfinishedRunsInterrupted = () => {
|
|
100
|
+
db.prepare("UPDATE workflow_runs SET status = 'interrupted', finished_at = ? WHERE status = 'running'").run(Date.now());
|
|
101
|
+
};
|
|
102
|
+
return { createRun, updateRun, getRun, listWorkspaceRuns, markUnfinishedRunsInterrupted };
|
|
103
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { WorkerRole } from '../shared/types.js';
|
|
2
|
+
import type { AgentLaunchConfigInput } from './agent-run-store.js';
|
|
3
|
+
import { type WorkflowCliPolicy } from './workflow-cli-policy.js';
|
|
4
|
+
import type { WorkflowDispatchAwaiter } from './workflow-dispatch-awaiter.js';
|
|
5
|
+
import type { WorkflowRunRecord, WorkflowRunStatus } from './workflow-run-store.js';
|
|
6
|
+
export interface RunWorkflowInput {
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
scriptPath: string;
|
|
9
|
+
hivePort: string;
|
|
10
|
+
args?: unknown;
|
|
11
|
+
/** Agent (usually the orchestrator) that fired this workflow; the runner
|
|
12
|
+
* notifies its PTY when the run finishes. Optional — workflows fired by
|
|
13
|
+
* cron / UI have no triggering agent. */
|
|
14
|
+
triggeredByAgentId?: string;
|
|
15
|
+
/** TIER 2 #5 — set internally when the runner is spawning a nested
|
|
16
|
+
* workflow() from inside another run. External callers leave it
|
|
17
|
+
* undefined; the row goes in as a top-level run. */
|
|
18
|
+
parentRunId?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface RunInlineWorkflowInput {
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
source: string;
|
|
23
|
+
/** Synthetic path stamped into workflow_runs.script_path for display only;
|
|
24
|
+
* no file is read or written. Defaults to `<inline>` if omitted. */
|
|
25
|
+
scriptPath?: string;
|
|
26
|
+
hivePort: string;
|
|
27
|
+
args?: unknown;
|
|
28
|
+
triggeredByAgentId?: string;
|
|
29
|
+
}
|
|
30
|
+
/** TIER 2 #4 — narrow port the runner needs to clone a custom role
|
|
31
|
+
* into an ephemeral worker. Returns `undefined` if the name doesn't
|
|
32
|
+
* match any template (built-in or custom); the runner falls back to
|
|
33
|
+
* built-in-role semantics in that case. */
|
|
34
|
+
export interface RoleTemplateResolver {
|
|
35
|
+
findByName(name: string): {
|
|
36
|
+
name: string;
|
|
37
|
+
roleType: WorkerRole | 'orchestrator';
|
|
38
|
+
defaultCommand: string;
|
|
39
|
+
defaultArgs: string[];
|
|
40
|
+
} | undefined;
|
|
41
|
+
}
|
|
42
|
+
interface RunnerStorePort {
|
|
43
|
+
addWorkerWithLaunch: (workspaceId: string, input: {
|
|
44
|
+
name: string;
|
|
45
|
+
role: WorkerRole;
|
|
46
|
+
ephemeral: true;
|
|
47
|
+
spawnedBy: 'workflow';
|
|
48
|
+
}, launchConfig: AgentLaunchConfigInput) => {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
startAgent: (workspaceId: string, agentId: string, input: {
|
|
53
|
+
hivePort: string;
|
|
54
|
+
}) => Promise<unknown>;
|
|
55
|
+
dispatchTaskByWorkerName: (workspaceId: string, workerName: string, text: string, input: {
|
|
56
|
+
fromAgentId: string;
|
|
57
|
+
hivePort: string;
|
|
58
|
+
workflowRunId: string;
|
|
59
|
+
stepIndex: number;
|
|
60
|
+
phase?: string;
|
|
61
|
+
label?: string;
|
|
62
|
+
}) => Promise<{
|
|
63
|
+
id: string;
|
|
64
|
+
}>;
|
|
65
|
+
deleteWorker: (workspaceId: string, workerId: string) => void;
|
|
66
|
+
}
|
|
67
|
+
/** TIER 2 #3 — narrator lane sink. The runner calls append(runId, message)
|
|
68
|
+
* every time the script invokes log(). Implementation lives in
|
|
69
|
+
* workflow-run-log-store; the port keeps the runner free of DB types. */
|
|
70
|
+
export interface WorkflowRunLogPort {
|
|
71
|
+
append(runId: string, message: string, ts?: number): void;
|
|
72
|
+
}
|
|
73
|
+
interface WorkflowRunStorePort {
|
|
74
|
+
createRun: (input: {
|
|
75
|
+
workspaceId: string;
|
|
76
|
+
scriptPath: string;
|
|
77
|
+
name: string;
|
|
78
|
+
scriptHash?: string;
|
|
79
|
+
args?: unknown;
|
|
80
|
+
parentRunId?: string | null;
|
|
81
|
+
}) => WorkflowRunRecord;
|
|
82
|
+
updateRun: (id: string, input: {
|
|
83
|
+
status?: WorkflowRunStatus;
|
|
84
|
+
phase?: string;
|
|
85
|
+
finishedAt?: number;
|
|
86
|
+
error?: string;
|
|
87
|
+
result?: unknown;
|
|
88
|
+
}) => void;
|
|
89
|
+
getRun: (id: string) => WorkflowRunRecord | undefined;
|
|
90
|
+
}
|
|
91
|
+
export interface WorkflowRunner {
|
|
92
|
+
/** Runs the script to completion; returns the FINAL record. Used by tests
|
|
93
|
+
* and any caller that wants to wait synchronously. */
|
|
94
|
+
runWorkflow: (input: RunWorkflowInput) => Promise<WorkflowRunRecord>;
|
|
95
|
+
/** Creates the run row + kicks off execution in the background; returns the
|
|
96
|
+
* INITIAL ('running') record. Used by the HTTP route so the response is
|
|
97
|
+
* fast — clients poll `getWorkflowRun(id)` for progress. */
|
|
98
|
+
startWorkflow: (input: RunWorkflowInput) => Promise<WorkflowRunRecord>;
|
|
99
|
+
/** Like startWorkflow but takes raw source (no file). Used by `team workflow
|
|
100
|
+
* run --stdin/--inline` so the orchestrator can fire workflows from a PTY
|
|
101
|
+
* without writing a file first — matches Claude Code's Workflow tool
|
|
102
|
+
* invocation model. */
|
|
103
|
+
startWorkflowInline: (input: RunInlineWorkflowInput) => Promise<WorkflowRunRecord>;
|
|
104
|
+
/** Cancel any in-flight `agent()` calls for `runId` (rejects their awaiters)
|
|
105
|
+
* and mark the next executeWorkflow catch as 'stopped' instead of 'failed'.
|
|
106
|
+
* Returns true if the run was running and got stopped, false otherwise. */
|
|
107
|
+
stopRun: (runId: string) => boolean;
|
|
108
|
+
}
|
|
109
|
+
interface ListDispatchesForStopPort {
|
|
110
|
+
listOpenDispatchIdsForRun: (runId: string) => string[];
|
|
111
|
+
}
|
|
112
|
+
export declare const createWorkflowRunner: (deps: {
|
|
113
|
+
store: RunnerStorePort;
|
|
114
|
+
workflowRunStore: WorkflowRunStorePort;
|
|
115
|
+
awaiter: WorkflowDispatchAwaiter;
|
|
116
|
+
dispatchPort: ListDispatchesForStopPort;
|
|
117
|
+
/** Resolves the workspace's on-disk path. The nested `workflow(name)` DSL
|
|
118
|
+
* call needs it to locate sibling scripts when the parent run was fired
|
|
119
|
+
* inline via `team workflow run --stdin` (TIER 1 #7) — its scriptPath is
|
|
120
|
+
* a synthetic `<inline>` token that dirname() can't traverse. */
|
|
121
|
+
resolveWorkspacePath: (workspaceId: string) => string;
|
|
122
|
+
/** TIER 2 #4 — used when agent() opts.agentType isn't a built-in role.
|
|
123
|
+
* The runner asks the resolver for a matching custom template; on hit
|
|
124
|
+
* the template's command + args replace the defaults, on miss the
|
|
125
|
+
* runner throws a clear error rather than silently spawning claude. */
|
|
126
|
+
roleTemplateResolver: RoleTemplateResolver;
|
|
127
|
+
/** TIER 2 #3 — sink for the script's `log()` calls. The runner used
|
|
128
|
+
* to drop them on server stdout; routing through this port lets the
|
|
129
|
+
* Drawer render them as a narrator lane and the completion
|
|
130
|
+
* reminder splice the tail into the orchestrator's notification. */
|
|
131
|
+
logStore: WorkflowRunLogPort;
|
|
132
|
+
/** Global workflow CLI policy (default + allowlist). Replaces the old
|
|
133
|
+
* hard-coded `claude` default: an `agent()` that omits `cli` now uses
|
|
134
|
+
* the user's configured default, and an explicit `cli` outside the
|
|
135
|
+
* allowlist fails the call with a clear, fixable error. */
|
|
136
|
+
getWorkflowCliPolicy: () => WorkflowCliPolicy;
|
|
137
|
+
/** Called when a run reaches a terminal state (completed/failed/stopped).
|
|
138
|
+
* The runtime uses this to inject a `<hive-system-reminder>` into the
|
|
139
|
+
* triggering agent's PTY so the orchestrator picks the result back up,
|
|
140
|
+
* mirroring Claude Code's `<task-notification>` flow. */
|
|
141
|
+
onRunFinished?: (input: {
|
|
142
|
+
runId: string;
|
|
143
|
+
triggeredByAgentId: string;
|
|
144
|
+
finalRecord: WorkflowRunRecord;
|
|
145
|
+
}) => void;
|
|
146
|
+
}) => WorkflowRunner;
|
|
147
|
+
export {};
|