@agents-ensemble/core 0.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/LICENSE +21 -0
- package/dist/acp/acp-bridge.d.ts +42 -0
- package/dist/acp/acp-bridge.d.ts.map +1 -0
- package/dist/acp/acp-bridge.js +73 -0
- package/dist/acp/acp-bridge.js.map +1 -0
- package/dist/acp/acp-client.d.ts +45 -0
- package/dist/acp/acp-client.d.ts.map +1 -0
- package/dist/acp/acp-client.js +171 -0
- package/dist/acp/acp-client.js.map +1 -0
- package/dist/acp/acp-process.d.ts +33 -0
- package/dist/acp/acp-process.d.ts.map +1 -0
- package/dist/acp/acp-process.js +49 -0
- package/dist/acp/acp-process.js.map +1 -0
- package/dist/acp/json-rpc-peer.d.ts +31 -0
- package/dist/acp/json-rpc-peer.d.ts.map +1 -0
- package/dist/acp/json-rpc-peer.js +78 -0
- package/dist/acp/json-rpc-peer.js.map +1 -0
- package/dist/acp/json-rpc.d.ts +36 -0
- package/dist/acp/json-rpc.d.ts.map +1 -0
- package/dist/acp/json-rpc.js +46 -0
- package/dist/acp/json-rpc.js.map +1 -0
- package/dist/acp/process-stream-capture.d.ts +18 -0
- package/dist/acp/process-stream-capture.d.ts.map +1 -0
- package/dist/acp/process-stream-capture.js +48 -0
- package/dist/acp/process-stream-capture.js.map +1 -0
- package/dist/acp/testing/fake-acp-server.d.ts +45 -0
- package/dist/acp/testing/fake-acp-server.d.ts.map +1 -0
- package/dist/acp/testing/fake-acp-server.js +156 -0
- package/dist/acp/testing/fake-acp-server.js.map +1 -0
- package/dist/acp/testing/stream-pair.d.ts +10 -0
- package/dist/acp/testing/stream-pair.d.ts.map +1 -0
- package/dist/acp/testing/stream-pair.js +13 -0
- package/dist/acp/testing/stream-pair.js.map +1 -0
- package/dist/acp/types.d.ts +40 -0
- package/dist/acp/types.d.ts.map +1 -0
- package/dist/acp/types.js +5 -0
- package/dist/acp/types.js.map +1 -0
- package/dist/conductor/build-conductor-follow-up-prompt.d.ts +20 -0
- package/dist/conductor/build-conductor-follow-up-prompt.d.ts.map +1 -0
- package/dist/conductor/build-conductor-follow-up-prompt.js +17 -0
- package/dist/conductor/build-conductor-follow-up-prompt.js.map +1 -0
- package/dist/conductor/build-conductor-prompt.d.ts +22 -0
- package/dist/conductor/build-conductor-prompt.d.ts.map +1 -0
- package/dist/conductor/build-conductor-prompt.js +18 -0
- package/dist/conductor/build-conductor-prompt.js.map +1 -0
- package/dist/conductor/conductor-agent.d.ts +35 -0
- package/dist/conductor/conductor-agent.d.ts.map +1 -0
- package/dist/conductor/conductor-agent.js +90 -0
- package/dist/conductor/conductor-agent.js.map +1 -0
- package/dist/conductor/conductor-auth.d.ts +29 -0
- package/dist/conductor/conductor-auth.d.ts.map +1 -0
- package/dist/conductor/conductor-auth.js +80 -0
- package/dist/conductor/conductor-auth.js.map +1 -0
- package/dist/conductor/conductor-send-reconnect.d.ts +17 -0
- package/dist/conductor/conductor-send-reconnect.d.ts.map +1 -0
- package/dist/conductor/conductor-send-reconnect.js +21 -0
- package/dist/conductor/conductor-send-reconnect.js.map +1 -0
- package/dist/conductor/conductor-session-driver.d.ts +75 -0
- package/dist/conductor/conductor-session-driver.d.ts.map +1 -0
- package/dist/conductor/conductor-session-driver.js +230 -0
- package/dist/conductor/conductor-session-driver.js.map +1 -0
- package/dist/conductor/conductor-session-loop.d.ts +6 -0
- package/dist/conductor/conductor-session-loop.d.ts.map +1 -0
- package/dist/conductor/conductor-session-loop.js +6 -0
- package/dist/conductor/conductor-session-loop.js.map +1 -0
- package/dist/conductor/conductor-session.d.ts +109 -0
- package/dist/conductor/conductor-session.d.ts.map +1 -0
- package/dist/conductor/conductor-session.js +579 -0
- package/dist/conductor/conductor-session.js.map +1 -0
- package/dist/conductor/conductor-tool-name.d.ts +4 -0
- package/dist/conductor/conductor-tool-name.d.ts.map +1 -0
- package/dist/conductor/conductor-tool-name.js +10 -0
- package/dist/conductor/conductor-tool-name.js.map +1 -0
- package/dist/conductor/configure-cursor-sdk-env.d.ts +12 -0
- package/dist/conductor/configure-cursor-sdk-env.d.ts.map +1 -0
- package/dist/conductor/configure-cursor-sdk-env.js +64 -0
- package/dist/conductor/configure-cursor-sdk-env.js.map +1 -0
- package/dist/conductor/dispatch-tools.d.ts +19 -0
- package/dist/conductor/dispatch-tools.d.ts.map +1 -0
- package/dist/conductor/dispatch-tools.js +209 -0
- package/dist/conductor/dispatch-tools.js.map +1 -0
- package/dist/conductor/issue-loop.d.ts +7 -0
- package/dist/conductor/issue-loop.d.ts.map +1 -0
- package/dist/conductor/issue-loop.js +6 -0
- package/dist/conductor/issue-loop.js.map +1 -0
- package/dist/conductor/issue-session.d.ts +5 -0
- package/dist/conductor/issue-session.d.ts.map +1 -0
- package/dist/conductor/issue-session.js +5 -0
- package/dist/conductor/issue-session.js.map +1 -0
- package/dist/conductor/list-conductor-models.d.ts +7 -0
- package/dist/conductor/list-conductor-models.d.ts.map +1 -0
- package/dist/conductor/list-conductor-models.js +16 -0
- package/dist/conductor/list-conductor-models.js.map +1 -0
- package/dist/conductor/operator-exit.d.ts +3 -0
- package/dist/conductor/operator-exit.d.ts.map +1 -0
- package/dist/conductor/operator-exit.js +6 -0
- package/dist/conductor/operator-exit.js.map +1 -0
- package/dist/conductor/operator-input-binding.d.ts +20 -0
- package/dist/conductor/operator-input-binding.d.ts.map +1 -0
- package/dist/conductor/operator-input-binding.js +2 -0
- package/dist/conductor/operator-input-binding.js.map +1 -0
- package/dist/conductor/operator-post-loop-gate.d.ts +10 -0
- package/dist/conductor/operator-post-loop-gate.d.ts.map +1 -0
- package/dist/conductor/operator-post-loop-gate.js +28 -0
- package/dist/conductor/operator-post-loop-gate.js.map +1 -0
- package/dist/conductor/prompt/compile-conductor-prompt.d.ts +6 -0
- package/dist/conductor/prompt/compile-conductor-prompt.d.ts.map +1 -0
- package/dist/conductor/prompt/compile-conductor-prompt.js +14 -0
- package/dist/conductor/prompt/compile-conductor-prompt.js.map +1 -0
- package/dist/conductor/prompt/format-session-summaries.d.ts +7 -0
- package/dist/conductor/prompt/format-session-summaries.d.ts.map +1 -0
- package/dist/conductor/prompt/format-session-summaries.js +31 -0
- package/dist/conductor/prompt/format-session-summaries.js.map +1 -0
- package/dist/conductor/prompt/materials.d.ts +8 -0
- package/dist/conductor/prompt/materials.d.ts.map +1 -0
- package/dist/conductor/prompt/materials.js +23 -0
- package/dist/conductor/prompt/materials.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-base-module.d.ts +5 -0
- package/dist/conductor/prompt/modules/conductor-base-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-base-module.js +45 -0
- package/dist/conductor/prompt/modules/conductor-base-module.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-follow-up-module.d.ts +6 -0
- package/dist/conductor/prompt/modules/conductor-follow-up-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-follow-up-module.js +15 -0
- package/dist/conductor/prompt/modules/conductor-follow-up-module.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-human-guidance-module.d.ts +4 -0
- package/dist/conductor/prompt/modules/conductor-human-guidance-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-human-guidance-module.js +22 -0
- package/dist/conductor/prompt/modules/conductor-human-guidance-module.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-initial-module.d.ts +4 -0
- package/dist/conductor/prompt/modules/conductor-initial-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-initial-module.js +12 -0
- package/dist/conductor/prompt/modules/conductor-initial-module.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-system-module.d.ts +4 -0
- package/dist/conductor/prompt/modules/conductor-system-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-system-module.js +28 -0
- package/dist/conductor/prompt/modules/conductor-system-module.js.map +1 -0
- package/dist/conductor/prompt/modules/conductor-turn-module.d.ts +5 -0
- package/dist/conductor/prompt/modules/conductor-turn-module.d.ts.map +1 -0
- package/dist/conductor/prompt/modules/conductor-turn-module.js +71 -0
- package/dist/conductor/prompt/modules/conductor-turn-module.js.map +1 -0
- package/dist/conductor/prompt/types.d.ts +31 -0
- package/dist/conductor/prompt/types.d.ts.map +1 -0
- package/dist/conductor/prompt/types.js +9 -0
- package/dist/conductor/prompt/types.js.map +1 -0
- package/dist/conductor/resolve-conductor-model-id.d.ts +12 -0
- package/dist/conductor/resolve-conductor-model-id.d.ts.map +1 -0
- package/dist/conductor/resolve-conductor-model-id.js +23 -0
- package/dist/conductor/resolve-conductor-model-id.js.map +1 -0
- package/dist/conductor/session/format-session-event.d.ts +6 -0
- package/dist/conductor/session/format-session-event.d.ts.map +1 -0
- package/dist/conductor/session/format-session-event.js +99 -0
- package/dist/conductor/session/format-session-event.js.map +1 -0
- package/dist/conductor/session/select-dispatch-batch.d.ts +41 -0
- package/dist/conductor/session/select-dispatch-batch.d.ts.map +1 -0
- package/dist/conductor/session/select-dispatch-batch.js +143 -0
- package/dist/conductor/session/select-dispatch-batch.js.map +1 -0
- package/dist/conductor/session/session-event-queue.d.ts +35 -0
- package/dist/conductor/session/session-event-queue.d.ts.map +1 -0
- package/dist/conductor/session/session-event-queue.js +99 -0
- package/dist/conductor/session/session-event-queue.js.map +1 -0
- package/dist/conductor/session/session-event.d.ts +28 -0
- package/dist/conductor/session/session-event.d.ts.map +1 -0
- package/dist/conductor/session/session-event.js +8 -0
- package/dist/conductor/session/session-event.js.map +1 -0
- package/dist/conductor/session/session-logger.d.ts +151 -0
- package/dist/conductor/session/session-logger.d.ts.map +1 -0
- package/dist/conductor/session/session-logger.js +86 -0
- package/dist/conductor/session/session-logger.js.map +1 -0
- package/dist/conductor/session-policy.d.ts +45 -0
- package/dist/conductor/session-policy.d.ts.map +1 -0
- package/dist/conductor/session-policy.js +78 -0
- package/dist/conductor/session-policy.js.map +1 -0
- package/dist/conductor/submit-operator-input.d.ts +17 -0
- package/dist/conductor/submit-operator-input.d.ts.map +1 -0
- package/dist/conductor/submit-operator-input.js +38 -0
- package/dist/conductor/submit-operator-input.js.map +1 -0
- package/dist/conductor/testing/test-operator-input-binding.d.ts +16 -0
- package/dist/conductor/testing/test-operator-input-binding.d.ts.map +1 -0
- package/dist/conductor/testing/test-operator-input-binding.js +29 -0
- package/dist/conductor/testing/test-operator-input-binding.js.map +1 -0
- package/dist/dispatch/attach-worker.d.ts +31 -0
- package/dist/dispatch/attach-worker.d.ts.map +1 -0
- package/dist/dispatch/attach-worker.js +49 -0
- package/dist/dispatch/attach-worker.js.map +1 -0
- package/dist/dispatch/librarian-dispatch.d.ts +22 -0
- package/dist/dispatch/librarian-dispatch.d.ts.map +1 -0
- package/dist/dispatch/librarian-dispatch.js +35 -0
- package/dist/dispatch/librarian-dispatch.js.map +1 -0
- package/dist/dispatch/prompt-worker-tool.d.ts +8 -0
- package/dist/dispatch/prompt-worker-tool.d.ts.map +1 -0
- package/dist/dispatch/prompt-worker-tool.js +60 -0
- package/dist/dispatch/prompt-worker-tool.js.map +1 -0
- package/dist/dispatch/reviewer-dispatch.d.ts +23 -0
- package/dist/dispatch/reviewer-dispatch.d.ts.map +1 -0
- package/dist/dispatch/reviewer-dispatch.js +43 -0
- package/dist/dispatch/reviewer-dispatch.js.map +1 -0
- package/dist/dispatch/session-usage-tool.d.ts +8 -0
- package/dist/dispatch/session-usage-tool.d.ts.map +1 -0
- package/dist/dispatch/session-usage-tool.js +67 -0
- package/dist/dispatch/session-usage-tool.js.map +1 -0
- package/dist/dispatch/worker-acp-session.d.ts +43 -0
- package/dist/dispatch/worker-acp-session.d.ts.map +1 -0
- package/dist/dispatch/worker-acp-session.js +64 -0
- package/dist/dispatch/worker-acp-session.js.map +1 -0
- package/dist/dispatch/worker-dispatch.d.ts +23 -0
- package/dist/dispatch/worker-dispatch.d.ts.map +1 -0
- package/dist/dispatch/worker-dispatch.js +15 -0
- package/dist/dispatch/worker-dispatch.js.map +1 -0
- package/dist/dispatch/worker-status-tool.d.ts +10 -0
- package/dist/dispatch/worker-status-tool.d.ts.map +1 -0
- package/dist/dispatch/worker-status-tool.js +74 -0
- package/dist/dispatch/worker-status-tool.js.map +1 -0
- package/dist/escalation/answer-open-question-tool.d.ts +8 -0
- package/dist/escalation/answer-open-question-tool.d.ts.map +1 -0
- package/dist/escalation/answer-open-question-tool.js +84 -0
- package/dist/escalation/answer-open-question-tool.js.map +1 -0
- package/dist/escalation/apply-operator-message.d.ts +13 -0
- package/dist/escalation/apply-operator-message.d.ts.map +1 -0
- package/dist/escalation/apply-operator-message.js +32 -0
- package/dist/escalation/apply-operator-message.js.map +1 -0
- package/dist/escalation/ask-human-tool.d.ts +8 -0
- package/dist/escalation/ask-human-tool.d.ts.map +1 -0
- package/dist/escalation/ask-human-tool.js +79 -0
- package/dist/escalation/ask-human-tool.js.map +1 -0
- package/dist/escalation/build-human-guidance-prompt.d.ts +8 -0
- package/dist/escalation/build-human-guidance-prompt.d.ts.map +1 -0
- package/dist/escalation/build-human-guidance-prompt.js +26 -0
- package/dist/escalation/build-human-guidance-prompt.js.map +1 -0
- package/dist/escalation/build-max-turns-escalation.d.ts +4 -0
- package/dist/escalation/build-max-turns-escalation.d.ts.map +1 -0
- package/dist/escalation/build-max-turns-escalation.js +22 -0
- package/dist/escalation/build-max-turns-escalation.js.map +1 -0
- package/dist/escalation/create-permission-ask-handler.d.ts +4 -0
- package/dist/escalation/create-permission-ask-handler.d.ts.map +1 -0
- package/dist/escalation/create-permission-ask-handler.js +10 -0
- package/dist/escalation/create-permission-ask-handler.js.map +1 -0
- package/dist/escalation/dialogue-log.d.ts +15 -0
- package/dist/escalation/dialogue-log.d.ts.map +1 -0
- package/dist/escalation/dialogue-log.js +29 -0
- package/dist/escalation/dialogue-log.js.map +1 -0
- package/dist/escalation/enqueue-max-turns-question.d.ts +14 -0
- package/dist/escalation/enqueue-max-turns-question.d.ts.map +1 -0
- package/dist/escalation/enqueue-max-turns-question.js +29 -0
- package/dist/escalation/enqueue-max-turns-question.js.map +1 -0
- package/dist/escalation/escalation-unavailable-error.d.ts +5 -0
- package/dist/escalation/escalation-unavailable-error.d.ts.map +1 -0
- package/dist/escalation/escalation-unavailable-error.js +8 -0
- package/dist/escalation/escalation-unavailable-error.js.map +1 -0
- package/dist/escalation/format-open-questions.d.ts +4 -0
- package/dist/escalation/format-open-questions.d.ts.map +1 -0
- package/dist/escalation/format-open-questions.js +23 -0
- package/dist/escalation/format-open-questions.js.map +1 -0
- package/dist/escalation/format-registry-update.d.ts +5 -0
- package/dist/escalation/format-registry-update.d.ts.map +1 -0
- package/dist/escalation/format-registry-update.js +16 -0
- package/dist/escalation/format-registry-update.js.map +1 -0
- package/dist/escalation/human-inquiry.d.ts +23 -0
- package/dist/escalation/human-inquiry.d.ts.map +1 -0
- package/dist/escalation/human-inquiry.js +2 -0
- package/dist/escalation/human-inquiry.js.map +1 -0
- package/dist/escalation/open-question-list-tools.d.ts +7 -0
- package/dist/escalation/open-question-list-tools.d.ts.map +1 -0
- package/dist/escalation/open-question-list-tools.js +100 -0
- package/dist/escalation/open-question-list-tools.js.map +1 -0
- package/dist/escalation/open-question-to-escalation.d.ts +4 -0
- package/dist/escalation/open-question-to-escalation.d.ts.map +1 -0
- package/dist/escalation/open-question-to-escalation.js +13 -0
- package/dist/escalation/open-question-to-escalation.js.map +1 -0
- package/dist/escalation/open-question.d.ts +53 -0
- package/dist/escalation/open-question.d.ts.map +1 -0
- package/dist/escalation/open-question.js +66 -0
- package/dist/escalation/open-question.js.map +1 -0
- package/dist/escalation/permission-inquiry.d.ts +4 -0
- package/dist/escalation/permission-inquiry.d.ts.map +1 -0
- package/dist/escalation/permission-inquiry.js +11 -0
- package/dist/escalation/permission-inquiry.js.map +1 -0
- package/dist/escalation/record-open-question-answer.d.ts +11 -0
- package/dist/escalation/record-open-question-answer.d.ts.map +1 -0
- package/dist/escalation/record-open-question-answer.js +17 -0
- package/dist/escalation/record-open-question-answer.js.map +1 -0
- package/dist/escalation/resolve-human-inquiry.d.ts +8 -0
- package/dist/escalation/resolve-human-inquiry.d.ts.map +1 -0
- package/dist/escalation/resolve-human-inquiry.js +37 -0
- package/dist/escalation/resolve-human-inquiry.js.map +1 -0
- package/dist/git/run-git.d.ts +5 -0
- package/dist/git/run-git.d.ts.map +1 -0
- package/dist/git/run-git.js +19 -0
- package/dist/git/run-git.js.map +1 -0
- package/dist/github/debounce-buffer.d.ts +22 -0
- package/dist/github/debounce-buffer.d.ts.map +1 -0
- package/dist/github/debounce-buffer.js +61 -0
- package/dist/github/debounce-buffer.js.map +1 -0
- package/dist/github/fetch-github-updates.d.ts +19 -0
- package/dist/github/fetch-github-updates.d.ts.map +1 -0
- package/dist/github/fetch-github-updates.js +274 -0
- package/dist/github/fetch-github-updates.js.map +1 -0
- package/dist/github/format-issue-context-prompt.d.ts +9 -0
- package/dist/github/format-issue-context-prompt.d.ts.map +1 -0
- package/dist/github/format-issue-context-prompt.js +53 -0
- package/dist/github/format-issue-context-prompt.js.map +1 -0
- package/dist/github/github-monitor-cursor.d.ts +21 -0
- package/dist/github/github-monitor-cursor.d.ts.map +1 -0
- package/dist/github/github-monitor-cursor.js +25 -0
- package/dist/github/github-monitor-cursor.js.map +1 -0
- package/dist/github/github-monitor.d.ts +27 -0
- package/dist/github/github-monitor.d.ts.map +1 -0
- package/dist/github/github-monitor.js +98 -0
- package/dist/github/github-monitor.js.map +1 -0
- package/dist/github/github-test-fixtures.d.ts +17 -0
- package/dist/github/github-test-fixtures.d.ts.map +1 -0
- package/dist/github/github-test-fixtures.js +23 -0
- package/dist/github/github-test-fixtures.js.map +1 -0
- package/dist/github/github-update-types.d.ts +22 -0
- package/dist/github/github-update-types.d.ts.map +1 -0
- package/dist/github/github-update-types.js +2 -0
- package/dist/github/github-update-types.js.map +1 -0
- package/dist/github/issue-context.d.ts +16 -0
- package/dist/github/issue-context.d.ts.map +1 -0
- package/dist/github/issue-context.js +26 -0
- package/dist/github/issue-context.js.map +1 -0
- package/dist/github/run-gh.d.ts +4 -0
- package/dist/github/run-gh.d.ts.map +1 -0
- package/dist/github/run-gh.js +19 -0
- package/dist/github/run-gh.js.map +1 -0
- package/dist/index.d.ts +128 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/issue/issue-ref.d.ts +9 -0
- package/dist/issue/issue-ref.d.ts.map +1 -0
- package/dist/issue/issue-ref.js +18 -0
- package/dist/issue/issue-ref.js.map +1 -0
- package/dist/issue/resolve-issue-url.d.ts +6 -0
- package/dist/issue/resolve-issue-url.d.ts.map +1 -0
- package/dist/issue/resolve-issue-url.js +46 -0
- package/dist/issue/resolve-issue-url.js.map +1 -0
- package/dist/permission/format-pending-permissions.d.ts +3 -0
- package/dist/permission/format-pending-permissions.d.ts.map +1 -0
- package/dist/permission/format-pending-permissions.js +12 -0
- package/dist/permission/format-pending-permissions.js.map +1 -0
- package/dist/permission/format-permission-summary-for-operator.d.ts +15 -0
- package/dist/permission/format-permission-summary-for-operator.d.ts.map +1 -0
- package/dist/permission/format-permission-summary-for-operator.js +89 -0
- package/dist/permission/format-permission-summary-for-operator.js.map +1 -0
- package/dist/permission/pending-permission.d.ts +17 -0
- package/dist/permission/pending-permission.d.ts.map +1 -0
- package/dist/permission/pending-permission.js +23 -0
- package/dist/permission/pending-permission.js.map +1 -0
- package/dist/permission/permission-broker.d.ts +29 -0
- package/dist/permission/permission-broker.d.ts.map +1 -0
- package/dist/permission/permission-broker.js +53 -0
- package/dist/permission/permission-broker.js.map +1 -0
- package/dist/permission/permission-pipeline.d.ts +28 -0
- package/dist/permission/permission-pipeline.d.ts.map +1 -0
- package/dist/permission/permission-pipeline.js +41 -0
- package/dist/permission/permission-pipeline.js.map +1 -0
- package/dist/permission/permission-policy.d.ts +15 -0
- package/dist/permission/permission-policy.d.ts.map +1 -0
- package/dist/permission/permission-policy.js +32 -0
- package/dist/permission/permission-policy.js.map +1 -0
- package/dist/permission/permission-request.d.ts +8 -0
- package/dist/permission/permission-request.d.ts.map +1 -0
- package/dist/permission/permission-request.js +16 -0
- package/dist/permission/permission-request.js.map +1 -0
- package/dist/permission/resolve-permission-tool.d.ts +15 -0
- package/dist/permission/resolve-permission-tool.d.ts.map +1 -0
- package/dist/permission/resolve-permission-tool.js +62 -0
- package/dist/permission/resolve-permission-tool.js.map +1 -0
- package/dist/profile/load-profile.d.ts +35 -0
- package/dist/profile/load-profile.d.ts.map +1 -0
- package/dist/profile/load-profile.js +139 -0
- package/dist/profile/load-profile.js.map +1 -0
- package/dist/profile/types.d.ts +70 -0
- package/dist/profile/types.d.ts.map +1 -0
- package/dist/profile/types.js +61 -0
- package/dist/profile/types.js.map +1 -0
- package/dist/profiles/default/conductor.md +35 -0
- package/dist/profiles/default/implementer.md +17 -0
- package/dist/profiles/default/profile.yaml +22 -0
- package/dist/profiles/default/reviewer.md +18 -0
- package/dist/profiles/default/team.md +345 -0
- package/dist/prompt/build-prompt.d.ts +14 -0
- package/dist/prompt/build-prompt.d.ts.map +1 -0
- package/dist/prompt/build-prompt.js +16 -0
- package/dist/prompt/build-prompt.js.map +1 -0
- package/dist/prompt/build-worker-attach-prompt.d.ts +12 -0
- package/dist/prompt/build-worker-attach-prompt.d.ts.map +1 -0
- package/dist/prompt/build-worker-attach-prompt.js +32 -0
- package/dist/prompt/build-worker-attach-prompt.js.map +1 -0
- package/dist/prompt/build-worker-prompt.d.ts +11 -0
- package/dist/prompt/build-worker-prompt.d.ts.map +1 -0
- package/dist/prompt/build-worker-prompt.js +22 -0
- package/dist/prompt/build-worker-prompt.js.map +1 -0
- package/dist/prompt/compile-system-prompt.d.ts +12 -0
- package/dist/prompt/compile-system-prompt.d.ts.map +1 -0
- package/dist/prompt/compile-system-prompt.js +21 -0
- package/dist/prompt/compile-system-prompt.js.map +1 -0
- package/dist/prompt/contexts/kind.d.ts +14 -0
- package/dist/prompt/contexts/kind.d.ts.map +1 -0
- package/dist/prompt/contexts/kind.js +12 -0
- package/dist/prompt/contexts/kind.js.map +1 -0
- package/dist/prompt/issue-context-material.d.ts +5 -0
- package/dist/prompt/issue-context-material.d.ts.map +1 -0
- package/dist/prompt/issue-context-material.js +10 -0
- package/dist/prompt/issue-context-material.js.map +1 -0
- package/dist/prompt/modules/bootstrap.d.ts +5 -0
- package/dist/prompt/modules/bootstrap.d.ts.map +1 -0
- package/dist/prompt/modules/bootstrap.js +6 -0
- package/dist/prompt/modules/bootstrap.js.map +1 -0
- package/dist/prompt/modules/default-agent-module.d.ts +10 -0
- package/dist/prompt/modules/default-agent-module.d.ts.map +1 -0
- package/dist/prompt/modules/default-agent-module.js +19 -0
- package/dist/prompt/modules/default-agent-module.js.map +1 -0
- package/dist/prompt/modules/ensemble/base-module.d.ts +9 -0
- package/dist/prompt/modules/ensemble/base-module.d.ts.map +1 -0
- package/dist/prompt/modules/ensemble/base-module.js +70 -0
- package/dist/prompt/modules/ensemble/base-module.js.map +1 -0
- package/dist/prompt/modules/ensemble/conductor-base-module.d.ts +8 -0
- package/dist/prompt/modules/ensemble/conductor-base-module.d.ts.map +1 -0
- package/dist/prompt/modules/ensemble/conductor-base-module.js +96 -0
- package/dist/prompt/modules/ensemble/conductor-base-module.js.map +1 -0
- package/dist/prompt/modules/ensemble/index.d.ts +12 -0
- package/dist/prompt/modules/ensemble/index.d.ts.map +1 -0
- package/dist/prompt/modules/ensemble/index.js +23 -0
- package/dist/prompt/modules/ensemble/index.js.map +1 -0
- package/dist/prompt/modules/ensemble/worker-base-module.d.ts +8 -0
- package/dist/prompt/modules/ensemble/worker-base-module.d.ts.map +1 -0
- package/dist/prompt/modules/ensemble/worker-base-module.js +17 -0
- package/dist/prompt/modules/ensemble/worker-base-module.js.map +1 -0
- package/dist/prompt/modules/librarian-module.d.ts +10 -0
- package/dist/prompt/modules/librarian-module.d.ts.map +1 -0
- package/dist/prompt/modules/librarian-module.js +16 -0
- package/dist/prompt/modules/librarian-module.js.map +1 -0
- package/dist/prompt/modules/reviewer-module.d.ts +9 -0
- package/dist/prompt/modules/reviewer-module.d.ts.map +1 -0
- package/dist/prompt/modules/reviewer-module.js +14 -0
- package/dist/prompt/modules/reviewer-module.js.map +1 -0
- package/dist/prompt/modules/shared/profile-prompt-module.d.ts +11 -0
- package/dist/prompt/modules/shared/profile-prompt-module.d.ts.map +1 -0
- package/dist/prompt/modules/shared/profile-prompt-module.js +28 -0
- package/dist/prompt/modules/shared/profile-prompt-module.js.map +1 -0
- package/dist/prompt/modules/worker-module.d.ts +12 -0
- package/dist/prompt/modules/worker-module.d.ts.map +1 -0
- package/dist/prompt/modules/worker-module.js +20 -0
- package/dist/prompt/modules/worker-module.js.map +1 -0
- package/dist/prompt/render-compiled-prompt.d.ts +4 -0
- package/dist/prompt/render-compiled-prompt.d.ts.map +1 -0
- package/dist/prompt/render-compiled-prompt.js +48 -0
- package/dist/prompt/render-compiled-prompt.js.map +1 -0
- package/dist/prompt/testing/test-profile.d.ts +5 -0
- package/dist/prompt/testing/test-profile.d.ts.map +1 -0
- package/dist/prompt/testing/test-profile.js +15 -0
- package/dist/prompt/testing/test-profile.js.map +1 -0
- package/dist/runtime/conductor-inbox.d.ts +19 -0
- package/dist/runtime/conductor-inbox.d.ts.map +1 -0
- package/dist/runtime/conductor-inbox.js +64 -0
- package/dist/runtime/conductor-inbox.js.map +1 -0
- package/dist/runtime/inbox-processor.d.ts +17 -0
- package/dist/runtime/inbox-processor.d.ts.map +1 -0
- package/dist/runtime/inbox-processor.js +37 -0
- package/dist/runtime/inbox-processor.js.map +1 -0
- package/dist/runtime/send-worker-message.d.ts +14 -0
- package/dist/runtime/send-worker-message.d.ts.map +1 -0
- package/dist/runtime/send-worker-message.js +2 -0
- package/dist/runtime/send-worker-message.js.map +1 -0
- package/dist/runtime/types.d.ts +51 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +2 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/worker-outbound-queue.d.ts +9 -0
- package/dist/runtime/worker-outbound-queue.d.ts.map +1 -0
- package/dist/runtime/worker-outbound-queue.js +11 -0
- package/dist/runtime/worker-outbound-queue.js.map +1 -0
- package/dist/runtime/worker-runtime.d.ts +53 -0
- package/dist/runtime/worker-runtime.d.ts.map +1 -0
- package/dist/runtime/worker-runtime.js +349 -0
- package/dist/runtime/worker-runtime.js.map +1 -0
- package/dist/runtime/worker-session.d.ts +49 -0
- package/dist/runtime/worker-session.d.ts.map +1 -0
- package/dist/runtime/worker-session.js +69 -0
- package/dist/runtime/worker-session.js.map +1 -0
- package/dist/runtime/worker-status.d.ts +27 -0
- package/dist/runtime/worker-status.d.ts.map +1 -0
- package/dist/runtime/worker-status.js +3 -0
- package/dist/runtime/worker-status.js.map +1 -0
- package/dist/session/session-sidecar.d.ts +54 -0
- package/dist/session/session-sidecar.d.ts.map +1 -0
- package/dist/session/session-sidecar.js +158 -0
- package/dist/session/session-sidecar.js.map +1 -0
- package/dist/usage/estimate-token-usage.d.ts +7 -0
- package/dist/usage/estimate-token-usage.d.ts.map +1 -0
- package/dist/usage/estimate-token-usage.js +18 -0
- package/dist/usage/estimate-token-usage.js.map +1 -0
- package/dist/usage/session-usage-tracker.d.ts +33 -0
- package/dist/usage/session-usage-tracker.d.ts.map +1 -0
- package/dist/usage/session-usage-tracker.js +184 -0
- package/dist/usage/session-usage-tracker.js.map +1 -0
- package/dist/usage/types.d.ts +53 -0
- package/dist/usage/types.d.ts.map +1 -0
- package/dist/usage/types.js +2 -0
- package/dist/usage/types.js.map +1 -0
- package/dist/worktree/worktree.d.ts +46 -0
- package/dist/worktree/worktree.d.ts.map +1 -0
- package/dist/worktree/worktree.js +212 -0
- package/dist/worktree/worktree.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PromptModule } from '@modular-prompt/core';
|
|
2
|
+
import type { ConductorPromptContext } from '../types.js';
|
|
3
|
+
export declare const conductorBaseModule: PromptModule<ConductorPromptContext>;
|
|
4
|
+
export declare const conductorFollowUpDataModule: PromptModule<ConductorPromptContext>;
|
|
5
|
+
//# sourceMappingURL=conductor-base-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-base-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-base-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,sBAAsB,CAsBpE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,YAAY,CAAC,sBAAsB,CAwB5E,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { formatIssueContextForPrompt } from '../../../github/issue-context.js';
|
|
2
|
+
import { formatDispatchSummaries, formatEscalationSummaries, } from '../format-session-summaries.js';
|
|
3
|
+
import { toMaterialElement } from '../types.js';
|
|
4
|
+
export const conductorBaseModule = {
|
|
5
|
+
persona: [
|
|
6
|
+
'あなたは agents-ensemble の conductor(指揮者)です。実作業は行わず、worker / reviewer へ dispatch します。',
|
|
7
|
+
],
|
|
8
|
+
guidelines: [
|
|
9
|
+
'- ファイル編集・シェル実行・直接実装はしない',
|
|
10
|
+
'- 状態の正本は GitHub Issue / PR',
|
|
11
|
+
'- 次のアクションは文脈から判断する(固定フローにしない)',
|
|
12
|
+
],
|
|
13
|
+
instructions: [
|
|
14
|
+
'- worker 起動には `dispatch_worker` ツールを使う',
|
|
15
|
+
'- PR レビューには `dispatch_reviewer` ツールを使う(既存 worktree)',
|
|
16
|
+
'- 判断不能・マージ判断などは `ask_human` で人間オペレータに確認する',
|
|
17
|
+
],
|
|
18
|
+
inputs: [
|
|
19
|
+
(ctx) => `作業リポジトリ(ローカル): ${ctx.repoRoot}`,
|
|
20
|
+
(ctx) => formatIssueContextForPrompt(ctx.issueContext),
|
|
21
|
+
],
|
|
22
|
+
materials: [
|
|
23
|
+
(ctx) => ctx.materials?.map((material) => toMaterialElement(material)) ?? null,
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
export const conductorFollowUpDataModule = {
|
|
27
|
+
state: [
|
|
28
|
+
(ctx) => ctx.turn && ctx.maxTurns
|
|
29
|
+
? `ターン: ${ctx.turn} / ${ctx.maxTurns}`
|
|
30
|
+
: null,
|
|
31
|
+
(ctx) => ctx.workerDispatches && ctx.reviewerDispatches
|
|
32
|
+
? [
|
|
33
|
+
'## 直近の dispatch 結果',
|
|
34
|
+
...formatDispatchSummaries(ctx.workerDispatches, ctx.reviewerDispatches),
|
|
35
|
+
].join('\n')
|
|
36
|
+
: null,
|
|
37
|
+
(ctx) => ctx.escalations
|
|
38
|
+
? [
|
|
39
|
+
'## 人間へのエスカレーション',
|
|
40
|
+
...formatEscalationSummaries(ctx.escalations),
|
|
41
|
+
].join('\n')
|
|
42
|
+
: null,
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=conductor-base-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-base-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-base-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,mBAAmB,GAAyC;IACvE,OAAO,EAAE;QACP,mFAAmF;KACpF;IACD,UAAU,EAAE;QACV,yBAAyB;QACzB,4BAA4B;QAC5B,+BAA+B;KAChC;IACD,YAAY,EAAE;QACZ,wCAAwC;QACxC,qDAAqD;QACrD,2CAA2C;KAC5C;IACD,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,GAAG,CAAC,QAAQ,EAAE;QACzC,CAAC,GAAG,EAAE,EAAE,CAAC,2BAA2B,CAAC,GAAG,CAAC,YAAY,CAAC;KACvD;IACD,SAAS,EAAE;QACT,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,IAAI,IAAI;KACxE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAyC;IAC/E,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,QAAQ;YACtB,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,QAAQ,EAAE;YACtC,CAAC,CAAC,IAAI;QACV,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,kBAAkB;YAC5C,CAAC,CAAC;gBACE,oBAAoB;gBACpB,GAAG,uBAAuB,CACxB,GAAG,CAAC,gBAAgB,EACpB,GAAG,CAAC,kBAAkB,CACvB;aACF,CAAC,IAAI,CAAC,IAAI,CAAC;YACd,CAAC,CAAC,IAAI;QACV,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,WAAW;YACb,CAAC,CAAC;gBACE,iBAAiB;gBACjB,GAAG,yBAAyB,CAAC,GAAG,CAAC,WAAW,CAAC;aAC9C,CAAC,IAAI,CAAC,IAAI,CAAC;YACd,CAAC,CAAC,IAAI;KACX;CACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PromptModule } from '@modular-prompt/core';
|
|
2
|
+
import { conductorFollowUpDataModule } from './conductor-base-module.js';
|
|
3
|
+
import type { ConductorPromptContext } from '../types.js';
|
|
4
|
+
export declare const conductorFollowUpModule: PromptModule<ConductorPromptContext>;
|
|
5
|
+
export { conductorFollowUpDataModule };
|
|
6
|
+
//# sourceMappingURL=conductor-follow-up-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-follow-up-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-follow-up-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,sBAAsB,CAWxE,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { conductorFollowUpDataModule } from './conductor-base-module.js';
|
|
2
|
+
export const conductorFollowUpModule = {
|
|
3
|
+
objective: [
|
|
4
|
+
'前ターンの dispatch 結果を踏まえ、Issue / PR の最新状態を読み直して次のアクションを判断する。',
|
|
5
|
+
],
|
|
6
|
+
instructions: [
|
|
7
|
+
'- 作業が必要なら `dispatch_worker`',
|
|
8
|
+
'- PR レビューが必要なら `dispatch_reviewer`(既存 worktree を使用)',
|
|
9
|
+
'- 判断不能・マージ判断などは `ask_human` で人間に確認',
|
|
10
|
+
'- 人間レビュー待ちなら Issue に状況を書き、追加 dispatch はせず終了',
|
|
11
|
+
'- 完了なら追加 dispatch はせず終了',
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
export { conductorFollowUpDataModule };
|
|
15
|
+
//# sourceMappingURL=conductor-follow-up-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-follow-up-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-follow-up-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAGzE,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IAC3E,SAAS,EAAE;QACT,2DAA2D;KAC5D;IACD,YAAY,EAAE;QACZ,6BAA6B;QAC7B,qDAAqD;QACrD,oCAAoC;QACpC,6CAA6C;QAC7C,yBAAyB;KAC1B;CACF,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-human-guidance-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-human-guidance-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,sBAAsB,CAqB7E,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const conductorHumanGuidanceModule = {
|
|
2
|
+
objective: [
|
|
3
|
+
'人間オペレータからの指示を受け取り、Issue / PR の最新状態を踏まえ、次のアクションを判断する。',
|
|
4
|
+
],
|
|
5
|
+
materials: [
|
|
6
|
+
(ctx) => ctx.humanGuidance
|
|
7
|
+
? {
|
|
8
|
+
type: 'material',
|
|
9
|
+
id: 'human-guidance',
|
|
10
|
+
title: '人間オペレータからの指示',
|
|
11
|
+
content: ctx.humanGuidance,
|
|
12
|
+
}
|
|
13
|
+
: null,
|
|
14
|
+
],
|
|
15
|
+
instructions: [
|
|
16
|
+
'- 作業が必要なら `dispatch_worker`',
|
|
17
|
+
'- PR レビューが必要なら `dispatch_reviewer`(既存 worktree を使用)',
|
|
18
|
+
'- 追加確認が必要なら `ask_human`',
|
|
19
|
+
'- 完了なら追加 dispatch はせず終了',
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=conductor-human-guidance-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-human-guidance-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-human-guidance-module.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,4BAA4B,GAAyC;IAChF,SAAS,EAAE;QACT,sDAAsD;KACvD;IACD,SAAS,EAAE;QACT,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,aAAa;YACf,CAAC,CAAC;gBACE,IAAI,EAAE,UAAU;gBAChB,EAAE,EAAE,gBAAgB;gBACpB,KAAK,EAAE,cAAc;gBACrB,OAAO,EAAE,GAAG,CAAC,aAAa;aAC3B;YACH,CAAC,CAAC,IAAI;KACX;IACD,YAAY,EAAE;QACZ,6BAA6B;QAC7B,qDAAqD;QACrD,yBAAyB;QACzB,yBAAyB;KAC1B;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-initial-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-initial-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,sBAAsB,CAYvE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const conductorInitialModule = {
|
|
2
|
+
objective: ['Issue / PR の最新状態を読み、次に必要な dispatch を判断する。'],
|
|
3
|
+
instructions: [
|
|
4
|
+
(ctx) => ctx.followUp
|
|
5
|
+
? `- 追加指示: ${ctx.followUp}`
|
|
6
|
+
: '- Issue を読み、手順が明確なら `dispatch_worker` で worker を起動する',
|
|
7
|
+
(ctx) => ctx.followUp
|
|
8
|
+
? null
|
|
9
|
+
: '- skillName は Issue 文脈から判断するか、不明なら Issue に確認コメントを残す方針を検討する',
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=conductor-initial-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-initial-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-initial-module.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,sBAAsB,GAAyC;IAC1E,SAAS,EAAE,CAAC,2CAA2C,CAAC;IACxD,YAAY,EAAE;QACZ,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,QAAQ;YACV,CAAC,CAAC,WAAW,GAAG,CAAC,QAAQ,EAAE;YAC3B,CAAC,CAAC,sDAAsD;QAC5D,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,QAAQ;YACV,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,4DAA4D;KACnE;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-system-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-system-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAU1D,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,sBAAsB,CAqBtE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { toMaterialElement } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* conductor のシステムプロンプト相当。
|
|
4
|
+
* セッション開始時に一度渡す基本指示と参照ドキュメント(materials)。
|
|
5
|
+
*/
|
|
6
|
+
const DEFAULT_CONDUCTOR_PERSONA = 'あなたは agents-ensemble の conductor です。実作業は行わず、プロファイルに従って worker を制御します。';
|
|
7
|
+
export const conductorSystemModule = {
|
|
8
|
+
persona: [
|
|
9
|
+
(ctx) => ctx.roleSystemPrompt?.trim() || DEFAULT_CONDUCTOR_PERSONA,
|
|
10
|
+
],
|
|
11
|
+
guidelines: [
|
|
12
|
+
'- ファイル編集・シェル実行・直接実装はしない',
|
|
13
|
+
'- 状態の正本は GitHub Issue / PR',
|
|
14
|
+
'- 次のアクションは文脈とプロファイルから判断する(固定フローにしない)',
|
|
15
|
+
'- worker の種別・Skill・起動文書はプロファイルが定義する',
|
|
16
|
+
'- open question(TODO リスト的なオペレータ Q&A):',
|
|
17
|
+
' - 一覧: `list_open_questions`、詳細: `get_open_question`(prompt state には載らない)',
|
|
18
|
+
' - 未回答を登録: `ask_human`(待たず続行可)',
|
|
19
|
+
' - オペレータがチャットですでに答えている: `answer_open_question` で代行記録',
|
|
20
|
+
' - registry 更新は ConductorSession イベント列経由で `agent.send` に届く',
|
|
21
|
+
' - 同一判断で `ask_human` と `answer_open_question` を同ターンで併用しない',
|
|
22
|
+
'- worker permission 判断待ち: `resolve_permission`(要確認時は先に open question を処理)',
|
|
23
|
+
],
|
|
24
|
+
materials: [
|
|
25
|
+
(ctx) => ctx.materials?.map((material) => toMaterialElement(material)) ?? null,
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=conductor-system-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-system-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-system-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;GAGG;AACH,MAAM,yBAAyB,GAC7B,uEAAuE,CAAC;AAE1E,MAAM,CAAC,MAAM,qBAAqB,GAAyC;IACzE,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,yBAAyB;KACnE;IACD,UAAU,EAAE;QACV,yBAAyB;QACzB,4BAA4B;QAC5B,sCAAsC;QACtC,qCAAqC;QACrC,uCAAuC;QACvC,4EAA4E;QAC5E,iCAAiC;QACjC,uDAAuD;QACvD,6DAA6D;QAC7D,4DAA4D;QAC5D,2EAA2E;KAC5E;IACD,SAAS,EAAE;QACT,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,IAAI,IAAI;KACxE;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PromptModule } from '@modular-prompt/core';
|
|
2
|
+
import type { ConductorPromptContext } from '../types.js';
|
|
3
|
+
/** ターンごとの更新(Issue 再読・worker 状態など)。 */
|
|
4
|
+
export declare const conductorTurnModule: PromptModule<ConductorPromptContext>;
|
|
5
|
+
//# sourceMappingURL=conductor-turn-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-turn-module.d.ts","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-turn-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAQzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,sBAAsB,CAgEpE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { formatIssueContextForPrompt } from '../../../github/issue-context.js';
|
|
2
|
+
import { formatDispatchSummaries, formatEscalationSummaries, formatWorkerFailureSummaries, } from '../format-session-summaries.js';
|
|
3
|
+
import { formatPendingPermissionSummaries } from '../../../permission/format-pending-permissions.js';
|
|
4
|
+
/** ターンごとの更新(Issue 再読・worker 状態など)。 */
|
|
5
|
+
export const conductorTurnModule = {
|
|
6
|
+
objective: [
|
|
7
|
+
(ctx) => {
|
|
8
|
+
if (ctx.turn && ctx.turn > 1) {
|
|
9
|
+
return '前ターンの結果を踏まえ、Issue / PR と worker の状態を確認する。';
|
|
10
|
+
}
|
|
11
|
+
return 'Issue / PR を読み、worker の状態を確認する。';
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
inputs: [
|
|
15
|
+
(ctx) => (ctx.turn ? `conductor ターン: ${ctx.turn}` : null),
|
|
16
|
+
(ctx) => ctx.maxTurns != null
|
|
17
|
+
? `自律ターン(直近オペレータ入力から): ${ctx.autonomousTurns ?? 0} / ${ctx.maxTurns}`
|
|
18
|
+
: null,
|
|
19
|
+
(ctx) => `対象 clone(ローカル): ${ctx.repoRoot}`,
|
|
20
|
+
(ctx) => formatIssueContextForPrompt(ctx.issueContext),
|
|
21
|
+
(ctx) => (ctx.followUp ? `追加指示: ${ctx.followUp}` : null),
|
|
22
|
+
],
|
|
23
|
+
state: [
|
|
24
|
+
(ctx) => {
|
|
25
|
+
const running = ctx.runningWorkers ?? [];
|
|
26
|
+
if (running.length === 0)
|
|
27
|
+
return null;
|
|
28
|
+
return [
|
|
29
|
+
'実行中の worker',
|
|
30
|
+
...running.map((worker) => `- ${worker.name} (${worker.kind}): id=${worker.workerId} issue=${worker.issueUrl}`),
|
|
31
|
+
].join('\n');
|
|
32
|
+
},
|
|
33
|
+
(ctx) => {
|
|
34
|
+
const pending = ctx.pendingPermissions ?? [];
|
|
35
|
+
if (pending.length === 0)
|
|
36
|
+
return null;
|
|
37
|
+
return [
|
|
38
|
+
'判断待ちの worker permission(resolve_permission で allow/deny。要確認時は ask_human)',
|
|
39
|
+
...formatPendingPermissionSummaries(pending),
|
|
40
|
+
].join('\n');
|
|
41
|
+
},
|
|
42
|
+
(ctx) => {
|
|
43
|
+
const workers = ctx.workerDispatches ?? [];
|
|
44
|
+
if (workers.length === 0)
|
|
45
|
+
return null;
|
|
46
|
+
return [
|
|
47
|
+
'完了した worker',
|
|
48
|
+
...formatDispatchSummaries(workers),
|
|
49
|
+
].join('\n');
|
|
50
|
+
},
|
|
51
|
+
(ctx) => {
|
|
52
|
+
const failures = ctx.workerFailures ?? [];
|
|
53
|
+
if (failures.length === 0)
|
|
54
|
+
return null;
|
|
55
|
+
return [
|
|
56
|
+
'worker 失敗',
|
|
57
|
+
...formatWorkerFailureSummaries(failures),
|
|
58
|
+
].join('\n');
|
|
59
|
+
},
|
|
60
|
+
(ctx) => {
|
|
61
|
+
const escalations = ctx.escalations ?? [];
|
|
62
|
+
if (escalations.length === 0)
|
|
63
|
+
return null;
|
|
64
|
+
return [
|
|
65
|
+
'人間へのエスカレーション',
|
|
66
|
+
...formatEscalationSummaries(escalations),
|
|
67
|
+
].join('\n');
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=conductor-turn-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor-turn-module.js","sourceRoot":"","sources":["../../../../src/conductor/prompt/modules/conductor-turn-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAGrG,sCAAsC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAyC;IACvE,SAAS,EAAE;QACT,CAAC,GAAG,EAAE,EAAE;YACN,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;gBAC7B,OAAO,2CAA2C,CAAC;YACrD,CAAC;YACD,OAAO,iCAAiC,CAAC;QAC3C,CAAC;KACF;IACD,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACzD,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,QAAQ,IAAI,IAAI;YAClB,CAAC,CAAC,uBAAuB,GAAG,CAAC,eAAe,IAAI,CAAC,MAAM,GAAG,CAAC,QAAQ,EAAE;YACrE,CAAC,CAAC,IAAI;QACV,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,CAAC,QAAQ,EAAE;QAC1C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M,QAAQ,GAAG,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;YAC1C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YACvC,OAAO;gBACL,WAAW;gBACX,GAAG,4BAA4B,CAAC,QAAQ,CAAC;aAC1C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;QACD,CAAC,GAAG,EAAE,EAAE;YACN,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;YAC1C,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAC1C,OAAO;gBACL,cAAc;gBACd,GAAG,yBAAyB,CAAC,WAAW,CAAC;aAC1C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MaterialElement } from '@modular-prompt/core';
|
|
2
|
+
import type { WorkerDispatchResult } from '../../dispatch/worker-dispatch.js';
|
|
3
|
+
import type { EscalationRecord } from '../../escalation/human-inquiry.js';
|
|
4
|
+
import type { IssueContext } from '../../github/issue-context.js';
|
|
5
|
+
import type { PendingPermission } from '../../permission/pending-permission.js';
|
|
6
|
+
import type { WorkerFailureRecord, WorkerStartedInfo } from '../../runtime/types.js';
|
|
7
|
+
export interface ConductorMaterial {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ConductorPromptContext {
|
|
13
|
+
repoRoot: string;
|
|
14
|
+
issueContext: IssueContext;
|
|
15
|
+
/** profile の `agents.conductor.systemPromptFile` から解決した起動文書。 */
|
|
16
|
+
roleSystemPrompt?: string;
|
|
17
|
+
materials?: ConductorMaterial[];
|
|
18
|
+
briefing?: string;
|
|
19
|
+
followUp?: string;
|
|
20
|
+
turn?: number;
|
|
21
|
+
/** 直近オペレータ入力から消費した conductor 自律ターン数。 */
|
|
22
|
+
autonomousTurns?: number;
|
|
23
|
+
maxTurns?: number;
|
|
24
|
+
workerDispatches?: WorkerDispatchResult[];
|
|
25
|
+
workerFailures?: WorkerFailureRecord[];
|
|
26
|
+
runningWorkers?: WorkerStartedInfo[];
|
|
27
|
+
pendingPermissions?: PendingPermission[];
|
|
28
|
+
escalations?: EscalationRecord[];
|
|
29
|
+
}
|
|
30
|
+
export declare function toMaterialElement(material: ConductorMaterial): MaterialElement;
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conductor/prompt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAErF,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC1C,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,eAAe,CAO9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/conductor/prompt/types.ts"],"names":[],"mappings":"AAgCA,MAAM,UAAU,iBAAiB,CAAC,QAA2B;IAC3D,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** `ensemble models list` の default(Auto)と一致する conductor 用 model id。 */
|
|
2
|
+
export declare const DEFAULT_CONDUCTOR_MODEL_ID = "default";
|
|
3
|
+
/** e2e / integration と本番 CLI で共有する環境変数名。 */
|
|
4
|
+
export declare const CONDUCTOR_MODEL_ID_ENV = "CONDUCTOR_MODEL_ID";
|
|
5
|
+
/** `auto` はカタログ上の `default`(Auto)と同義。 */
|
|
6
|
+
export declare function normalizeConductorModelId(modelId: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* conductor の model id を解決する。
|
|
9
|
+
* 優先順位: 明示指定 → `CONDUCTOR_MODEL_ID` → `default`。
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveConductorModelId(explicit?: string): string;
|
|
12
|
+
//# sourceMappingURL=resolve-conductor-model-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-conductor-model-id.d.ts","sourceRoot":"","sources":["../../src/conductor/resolve-conductor-model-id.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAEpD,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,yCAAyC;AACzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAWjE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** `ensemble models list` の default(Auto)と一致する conductor 用 model id。 */
|
|
2
|
+
export const DEFAULT_CONDUCTOR_MODEL_ID = 'default';
|
|
3
|
+
/** e2e / integration と本番 CLI で共有する環境変数名。 */
|
|
4
|
+
export const CONDUCTOR_MODEL_ID_ENV = 'CONDUCTOR_MODEL_ID';
|
|
5
|
+
/** `auto` はカタログ上の `default`(Auto)と同義。 */
|
|
6
|
+
export function normalizeConductorModelId(modelId) {
|
|
7
|
+
return modelId === 'auto' ? DEFAULT_CONDUCTOR_MODEL_ID : modelId;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* conductor の model id を解決する。
|
|
11
|
+
* 優先順位: 明示指定 → `CONDUCTOR_MODEL_ID` → `default`。
|
|
12
|
+
*/
|
|
13
|
+
export function resolveConductorModelId(explicit) {
|
|
14
|
+
if (explicit !== undefined && explicit !== '') {
|
|
15
|
+
return normalizeConductorModelId(explicit);
|
|
16
|
+
}
|
|
17
|
+
const fromEnv = process.env[CONDUCTOR_MODEL_ID_ENV];
|
|
18
|
+
if (fromEnv !== undefined && fromEnv !== '') {
|
|
19
|
+
return normalizeConductorModelId(fromEnv);
|
|
20
|
+
}
|
|
21
|
+
return DEFAULT_CONDUCTOR_MODEL_ID;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=resolve-conductor-model-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-conductor-model-id.js","sourceRoot":"","sources":["../../src/conductor/resolve-conductor-model-id.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CAAC;AAEpD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE3D,yCAAyC;AACzC,MAAM,UAAU,yBAAyB,CAAC,OAAe;IACvD,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAiB;IACvD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC9C,OAAO,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpD,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QAC5C,OAAO,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,0BAA0B,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SessionEvent } from './session-event.js';
|
|
2
|
+
/** セッションイベントを conductor 向け user メッセージ文字列に変換する。 */
|
|
3
|
+
export declare function formatSessionEventForConductor(event: SessionEvent): string;
|
|
4
|
+
/** 1 件以上のセッションイベントを 1 本の user メッセージに合成する。 */
|
|
5
|
+
export declare function formatSessionEventsForConductor(events: SessionEvent[]): string;
|
|
6
|
+
//# sourceMappingURL=format-session-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-session-event.d.ts","sourceRoot":"","sources":["../../../src/conductor/session/format-session-event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kDAAkD;AAClD,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAE1E;AAED,6CAA6C;AAC7C,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAQ9E"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import yaml from 'js-yaml';
|
|
2
|
+
/** セッションイベントを conductor 向け user メッセージ文字列に変換する。 */
|
|
3
|
+
export function formatSessionEventForConductor(event) {
|
|
4
|
+
return formatSessionEventsForConductor([event]);
|
|
5
|
+
}
|
|
6
|
+
/** 1 件以上のセッションイベントを 1 本の user メッセージに合成する。 */
|
|
7
|
+
export function formatSessionEventsForConductor(events) {
|
|
8
|
+
if (events.length === 0) {
|
|
9
|
+
return '';
|
|
10
|
+
}
|
|
11
|
+
if (events.length === 1) {
|
|
12
|
+
return formatSingleSessionEventForConductor(events[0]);
|
|
13
|
+
}
|
|
14
|
+
return formatBatchedSessionEventsForConductor(events);
|
|
15
|
+
}
|
|
16
|
+
function formatSingleSessionEventForConductor(event) {
|
|
17
|
+
switch (event.type) {
|
|
18
|
+
case 'operator.message':
|
|
19
|
+
return event.text.trim();
|
|
20
|
+
case 'worker.completed':
|
|
21
|
+
return ['## worker ラウンド完了', '', formatEventBodyForConductor(event)].join('\n');
|
|
22
|
+
case 'worker.failed':
|
|
23
|
+
return ['## worker 失敗', '', formatEventBodyForConductor(event)].join('\n');
|
|
24
|
+
case 'permission.pending':
|
|
25
|
+
return [
|
|
26
|
+
'## permission 判断待ち',
|
|
27
|
+
'',
|
|
28
|
+
formatEventBodyForConductor(event),
|
|
29
|
+
].join('\n');
|
|
30
|
+
case 'github.update':
|
|
31
|
+
return [
|
|
32
|
+
'## GitHub 更新',
|
|
33
|
+
'',
|
|
34
|
+
formatEventBodyForConductor(event),
|
|
35
|
+
].join('\n');
|
|
36
|
+
default: {
|
|
37
|
+
const _exhaustive = event;
|
|
38
|
+
return String(_exhaustive);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function formatEventBodyForConductor(event) {
|
|
43
|
+
switch (event.type) {
|
|
44
|
+
case 'operator.message':
|
|
45
|
+
return event.text.trim();
|
|
46
|
+
case 'worker.completed':
|
|
47
|
+
return fencedYaml('worker.completed', event.result);
|
|
48
|
+
case 'worker.failed':
|
|
49
|
+
return fencedYaml('worker.failed', event.failure);
|
|
50
|
+
case 'permission.pending':
|
|
51
|
+
return fencedYaml('permission.pending', event.permission);
|
|
52
|
+
case 'github.update':
|
|
53
|
+
return fencedYaml('github.update', event.items);
|
|
54
|
+
default: {
|
|
55
|
+
const _exhaustive = event;
|
|
56
|
+
return String(_exhaustive);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function formatBatchedSessionEventsForConductor(events) {
|
|
61
|
+
const heading = batchHeadingForEvents(events);
|
|
62
|
+
const sections = events.map((event, index) => {
|
|
63
|
+
const body = formatEventBodyForConductor(event);
|
|
64
|
+
return [`### ${index + 1}/${events.length}`, '', body].join('\n');
|
|
65
|
+
});
|
|
66
|
+
return [heading, '', ...sections].join('\n\n');
|
|
67
|
+
}
|
|
68
|
+
function batchHeadingForEvents(events) {
|
|
69
|
+
const count = events.length;
|
|
70
|
+
if (events.every((event) => event.type === 'operator.message')) {
|
|
71
|
+
return `## オペレータ入力(${count} 件)`;
|
|
72
|
+
}
|
|
73
|
+
if (events.every((event) => event.type === 'permission.pending')) {
|
|
74
|
+
return `## permission 判断待ち(${count} 件)`;
|
|
75
|
+
}
|
|
76
|
+
if (events.every((event) => event.type === 'github.update')) {
|
|
77
|
+
return `## GitHub 更新(${count} 件)`;
|
|
78
|
+
}
|
|
79
|
+
const workerEvents = events.filter((event) => event.type === 'worker.completed' || event.type === 'worker.failed');
|
|
80
|
+
if (workerEvents.length === events.length) {
|
|
81
|
+
const name = workerEvents[0].type === 'worker.completed'
|
|
82
|
+
? workerEvents[0].result.name
|
|
83
|
+
: workerEvents[0].failure.name;
|
|
84
|
+
const completedCount = workerEvents.filter((event) => event.type === 'worker.completed').length;
|
|
85
|
+
const failedCount = workerEvents.filter((event) => event.type === 'worker.failed').length;
|
|
86
|
+
if (failedCount > 0 && completedCount > 0) {
|
|
87
|
+
return `## worker 通知(${name}・${count} 件)`;
|
|
88
|
+
}
|
|
89
|
+
if (failedCount === count) {
|
|
90
|
+
return `## worker 失敗(${name}・${count} 件)`;
|
|
91
|
+
}
|
|
92
|
+
return `## worker ラウンド完了(${name}・${count} 件)`;
|
|
93
|
+
}
|
|
94
|
+
return `## セッションイベント(${count} 件)`;
|
|
95
|
+
}
|
|
96
|
+
function fencedYaml(label, data) {
|
|
97
|
+
return ['```yaml', `# ${label}`, yaml.dump(data, { lineWidth: 120 }).trimEnd(), '```'].join('\n');
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=format-session-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-session-event.js","sourceRoot":"","sources":["../../../src/conductor/session/format-session-event.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,kDAAkD;AAClD,MAAM,UAAU,8BAA8B,CAAC,KAAmB;IAChE,OAAO,+BAA+B,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,+BAA+B,CAAC,MAAsB;IACpE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,oCAAoC,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,sCAAsC,CAAC,MAA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,KAAK,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,IAAI,CACzF,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SessionEvent } from './session-event.js';
|
|
2
|
+
/** dispatch 束の source key([ADR 0014](../../../docs/adr/0014-conductor-dispatch-batch-coalescing.md))。 */
|
|
3
|
+
export type DispatchSourceKey = string;
|
|
4
|
+
export interface DispatchBatchState {
|
|
5
|
+
/** 直前 dispatch の source。 */
|
|
6
|
+
lastDispatchedSourceKey?: DispatchSourceKey;
|
|
7
|
+
/** `lastDispatchedSourceKey` による 1 回限りの優先を消費済みか。 */
|
|
8
|
+
continuationConsumed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DispatchBatch {
|
|
11
|
+
events: SessionEvent[];
|
|
12
|
+
sourceKey: DispatchSourceKey;
|
|
13
|
+
}
|
|
14
|
+
export interface SelectDispatchBatchInput {
|
|
15
|
+
queue: readonly SessionEvent[];
|
|
16
|
+
state: DispatchBatchState;
|
|
17
|
+
autonomousTurns: number;
|
|
18
|
+
maxTurns: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SelectDispatchBatchResult {
|
|
21
|
+
batch: DispatchBatch;
|
|
22
|
+
/** 束に含めなかったイベント(到着順を維持)。 */
|
|
23
|
+
remainingQueue: SessionEvent[];
|
|
24
|
+
}
|
|
25
|
+
/** セッションイベントの dispatch ソース key を返す。 */
|
|
26
|
+
export declare function eventSourceKey(event: SessionEvent): DispatchSourceKey;
|
|
27
|
+
/**
|
|
28
|
+
* キューから次に dispatch するイベント束を選ぶ(純関数)。
|
|
29
|
+
* dispatch 可能なイベントが無ければ undefined。
|
|
30
|
+
*/
|
|
31
|
+
export declare function selectDispatchBatch(input: SelectDispatchBatchInput): SelectDispatchBatchResult | undefined;
|
|
32
|
+
/** dispatch 完了後に Driver が呼ぶ。次の 1 回だけ continuation 優先を arm する。 */
|
|
33
|
+
export declare function dispatchBatchStateAfterSend(sourceKey: DispatchSourceKey): DispatchBatchState;
|
|
34
|
+
/** select で continuation を消費したあとに Driver がマージする。 */
|
|
35
|
+
export declare function markContinuationConsumed(state: DispatchBatchState, selected: SelectDispatchBatchResult): DispatchBatchState;
|
|
36
|
+
/** 束に含まれる worker 完了 / 失敗の件数。 */
|
|
37
|
+
export declare function countWorkerOutcomesInBatch(events: SessionEvent[]): {
|
|
38
|
+
workerDispatches: number;
|
|
39
|
+
workerFailures: number;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=select-dispatch-batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-dispatch-batch.d.ts","sourceRoot":"","sources":["../../../src/conductor/session/select-dispatch-batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,yGAAyG;AACzG,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,uBAAuB,CAAC,EAAE,iBAAiB,CAAC;IAC5C,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,aAAa,CAAC;IACrB,4BAA4B;IAC5B,cAAc,EAAE,YAAY,EAAE,CAAC;CAChC;AASD,uCAAuC;AACvC,wB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