@agents-ensemble/core 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/conductor/conductor-session.d.ts +6 -0
  2. package/dist/conductor/conductor-session.d.ts.map +1 -1
  3. package/dist/conductor/conductor-session.js +23 -0
  4. package/dist/conductor/conductor-session.js.map +1 -1
  5. package/dist/conductor/session/session-logger.d.ts +3 -0
  6. package/dist/conductor/session/session-logger.d.ts.map +1 -1
  7. package/dist/conductor/session/session-logger.js +1 -0
  8. package/dist/conductor/session/session-logger.js.map +1 -1
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/permission/format-permission-summary-for-operator.d.ts.map +1 -1
  14. package/dist/permission/format-permission-summary-for-operator.js +6 -1
  15. package/dist/permission/format-permission-summary-for-operator.js.map +1 -1
  16. package/dist/permission/permission-deadlock-monitor.d.ts +26 -0
  17. package/dist/permission/permission-deadlock-monitor.d.ts.map +1 -0
  18. package/dist/permission/permission-deadlock-monitor.js +84 -0
  19. package/dist/permission/permission-deadlock-monitor.js.map +1 -0
  20. package/dist/permission/permission-request.d.ts.map +1 -1
  21. package/dist/permission/permission-request.js +26 -1
  22. package/dist/permission/permission-request.js.map +1 -1
  23. package/package.json +1 -1
  24. package/dist/conductor/build-conductor-follow-up-prompt.d.ts +0 -20
  25. package/dist/conductor/build-conductor-follow-up-prompt.d.ts.map +0 -1
  26. package/dist/conductor/build-conductor-follow-up-prompt.js +0 -17
  27. package/dist/conductor/build-conductor-follow-up-prompt.js.map +0 -1
  28. package/dist/conductor/build-conductor-prompt.d.ts +0 -22
  29. package/dist/conductor/build-conductor-prompt.d.ts.map +0 -1
  30. package/dist/conductor/build-conductor-prompt.js +0 -18
  31. package/dist/conductor/build-conductor-prompt.js.map +0 -1
  32. package/dist/conductor/conductor-session-loop.d.ts +0 -6
  33. package/dist/conductor/conductor-session-loop.d.ts.map +0 -1
  34. package/dist/conductor/conductor-session-loop.js +0 -6
  35. package/dist/conductor/conductor-session-loop.js.map +0 -1
  36. package/dist/conductor/dispatch-tools.d.ts +0 -19
  37. package/dist/conductor/dispatch-tools.d.ts.map +0 -1
  38. package/dist/conductor/dispatch-tools.js +0 -209
  39. package/dist/conductor/dispatch-tools.js.map +0 -1
  40. package/dist/conductor/issue-loop.d.ts +0 -7
  41. package/dist/conductor/issue-loop.d.ts.map +0 -1
  42. package/dist/conductor/issue-loop.js +0 -6
  43. package/dist/conductor/issue-loop.js.map +0 -1
  44. package/dist/conductor/prompt/compile-conductor-prompt.d.ts +0 -6
  45. package/dist/conductor/prompt/compile-conductor-prompt.d.ts.map +0 -1
  46. package/dist/conductor/prompt/compile-conductor-prompt.js +0 -14
  47. package/dist/conductor/prompt/compile-conductor-prompt.js.map +0 -1
  48. package/dist/conductor/prompt/format-session-summaries.d.ts +0 -7
  49. package/dist/conductor/prompt/format-session-summaries.d.ts.map +0 -1
  50. package/dist/conductor/prompt/format-session-summaries.js +0 -31
  51. package/dist/conductor/prompt/format-session-summaries.js.map +0 -1
  52. package/dist/conductor/prompt/materials.d.ts +0 -8
  53. package/dist/conductor/prompt/materials.d.ts.map +0 -1
  54. package/dist/conductor/prompt/materials.js +0 -23
  55. package/dist/conductor/prompt/materials.js.map +0 -1
  56. package/dist/conductor/prompt/modules/conductor-base-module.d.ts +0 -5
  57. package/dist/conductor/prompt/modules/conductor-base-module.d.ts.map +0 -1
  58. package/dist/conductor/prompt/modules/conductor-base-module.js +0 -45
  59. package/dist/conductor/prompt/modules/conductor-base-module.js.map +0 -1
  60. package/dist/conductor/prompt/modules/conductor-follow-up-module.d.ts +0 -6
  61. package/dist/conductor/prompt/modules/conductor-follow-up-module.d.ts.map +0 -1
  62. package/dist/conductor/prompt/modules/conductor-follow-up-module.js +0 -15
  63. package/dist/conductor/prompt/modules/conductor-follow-up-module.js.map +0 -1
  64. package/dist/conductor/prompt/modules/conductor-human-guidance-module.d.ts +0 -4
  65. package/dist/conductor/prompt/modules/conductor-human-guidance-module.d.ts.map +0 -1
  66. package/dist/conductor/prompt/modules/conductor-human-guidance-module.js +0 -22
  67. package/dist/conductor/prompt/modules/conductor-human-guidance-module.js.map +0 -1
  68. package/dist/conductor/prompt/modules/conductor-initial-module.d.ts +0 -4
  69. package/dist/conductor/prompt/modules/conductor-initial-module.d.ts.map +0 -1
  70. package/dist/conductor/prompt/modules/conductor-initial-module.js +0 -12
  71. package/dist/conductor/prompt/modules/conductor-initial-module.js.map +0 -1
  72. package/dist/conductor/prompt/modules/conductor-system-module.d.ts +0 -4
  73. package/dist/conductor/prompt/modules/conductor-system-module.d.ts.map +0 -1
  74. package/dist/conductor/prompt/modules/conductor-system-module.js +0 -28
  75. package/dist/conductor/prompt/modules/conductor-system-module.js.map +0 -1
  76. package/dist/conductor/prompt/modules/conductor-turn-module.d.ts +0 -5
  77. package/dist/conductor/prompt/modules/conductor-turn-module.d.ts.map +0 -1
  78. package/dist/conductor/prompt/modules/conductor-turn-module.js +0 -71
  79. package/dist/conductor/prompt/modules/conductor-turn-module.js.map +0 -1
  80. package/dist/conductor/prompt/types.d.ts +0 -31
  81. package/dist/conductor/prompt/types.d.ts.map +0 -1
  82. package/dist/conductor/prompt/types.js +0 -9
  83. package/dist/conductor/prompt/types.js.map +0 -1
  84. package/dist/dispatch/librarian-dispatch.d.ts +0 -22
  85. package/dist/dispatch/librarian-dispatch.d.ts.map +0 -1
  86. package/dist/dispatch/librarian-dispatch.js +0 -35
  87. package/dist/dispatch/librarian-dispatch.js.map +0 -1
  88. package/dist/dispatch/reviewer-dispatch.d.ts +0 -23
  89. package/dist/dispatch/reviewer-dispatch.d.ts.map +0 -1
  90. package/dist/dispatch/reviewer-dispatch.js +0 -43
  91. package/dist/dispatch/reviewer-dispatch.js.map +0 -1
  92. package/dist/escalation/build-human-guidance-prompt.d.ts +0 -8
  93. package/dist/escalation/build-human-guidance-prompt.d.ts.map +0 -1
  94. package/dist/escalation/build-human-guidance-prompt.js +0 -26
  95. package/dist/escalation/build-human-guidance-prompt.js.map +0 -1
  96. package/dist/escalation/build-max-turns-escalation.d.ts +0 -4
  97. package/dist/escalation/build-max-turns-escalation.d.ts.map +0 -1
  98. package/dist/escalation/build-max-turns-escalation.js +0 -22
  99. package/dist/escalation/build-max-turns-escalation.js.map +0 -1
  100. package/dist/escalation/dialogue-log.d.ts +0 -15
  101. package/dist/escalation/dialogue-log.d.ts.map +0 -1
  102. package/dist/escalation/dialogue-log.js +0 -29
  103. package/dist/escalation/dialogue-log.js.map +0 -1
  104. package/dist/escalation/format-open-questions.d.ts +0 -4
  105. package/dist/escalation/format-open-questions.d.ts.map +0 -1
  106. package/dist/escalation/format-open-questions.js +0 -23
  107. package/dist/escalation/format-open-questions.js.map +0 -1
  108. package/dist/prompt/build-prompt.d.ts +0 -14
  109. package/dist/prompt/build-prompt.d.ts.map +0 -1
  110. package/dist/prompt/build-prompt.js +0 -16
  111. package/dist/prompt/build-prompt.js.map +0 -1
  112. package/dist/prompt/modules/bootstrap.d.ts +0 -5
  113. package/dist/prompt/modules/bootstrap.d.ts.map +0 -1
  114. package/dist/prompt/modules/bootstrap.js +0 -6
  115. package/dist/prompt/modules/bootstrap.js.map +0 -1
  116. package/dist/prompt/modules/default-agent-module.d.ts +0 -10
  117. package/dist/prompt/modules/default-agent-module.d.ts.map +0 -1
  118. package/dist/prompt/modules/default-agent-module.js +0 -19
  119. package/dist/prompt/modules/default-agent-module.js.map +0 -1
  120. package/dist/prompt/modules/librarian-module.d.ts +0 -10
  121. package/dist/prompt/modules/librarian-module.d.ts.map +0 -1
  122. package/dist/prompt/modules/librarian-module.js +0 -16
  123. package/dist/prompt/modules/librarian-module.js.map +0 -1
  124. package/dist/prompt/modules/reviewer-module.d.ts +0 -9
  125. package/dist/prompt/modules/reviewer-module.d.ts.map +0 -1
  126. package/dist/prompt/modules/reviewer-module.js +0 -14
  127. package/dist/prompt/modules/reviewer-module.js.map +0 -1
  128. package/dist/prompt/modules/worker-module.d.ts +0 -12
  129. package/dist/prompt/modules/worker-module.d.ts.map +0 -1
  130. package/dist/prompt/modules/worker-module.js +0 -20
  131. package/dist/prompt/modules/worker-module.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-conductor-prompt.d.ts","sourceRoot":"","sources":["../../src/conductor/build-conductor-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IAC1C,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,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,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,2BAA2B,GACnC,MAAM,CAaR"}
@@ -1,18 +0,0 @@
1
- import { compileConductorSessionStart } from './prompt/compile-conductor-prompt.js';
2
- import { mergeConductorMaterials } from './prompt/materials.js';
3
- export { loadConductorMaterialFromFile } from './prompt/materials.js';
4
- export function buildConductorPrompt(options) {
5
- return compileConductorSessionStart({
6
- repoRoot: options.repoRoot,
7
- issueContext: options.issueContext,
8
- roleSystemPrompt: options.roleSystemPrompt,
9
- materials: mergeConductorMaterials(options.materials, options.briefing),
10
- followUp: options.followUp,
11
- turn: options.turn ?? 1,
12
- autonomousTurns: options.autonomousTurns,
13
- maxTurns: options.maxTurns,
14
- runningWorkers: options.runningWorkers,
15
- pendingPermissions: options.pendingPermissions,
16
- });
17
- }
18
- //# sourceMappingURL=build-conductor-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-conductor-prompt.js","sourceRoot":"","sources":["../../src/conductor/build-conductor-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAiBtE,MAAM,UAAU,oBAAoB,CAClC,OAAoC;IAEpC,OAAO,4BAA4B,CAAC;QAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,SAAS,EAAE,uBAAuB,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC;QACvE,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;QACvB,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;KAC/C,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated import from `./session-policy.js` instead.
3
- * 後方互換のため dispatch ポリシーのみ再 export する。
4
- */
5
- export { canDispatchConductorSend, autonomousTurnsAfterConductorSend, } from './session-policy.js';
6
- //# sourceMappingURL=conductor-session-loop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conductor-session-loop.d.ts","sourceRoot":"","sources":["../../src/conductor/conductor-session-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated import from `./session-policy.js` instead.
3
- * 後方互換のため dispatch ポリシーのみ再 export する。
4
- */
5
- export { canDispatchConductorSend, autonomousTurnsAfterConductorSend, } from './session-policy.js';
6
- //# sourceMappingURL=conductor-session-loop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conductor-session-loop.js","sourceRoot":"","sources":["../../src/conductor/conductor-session-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { SDKCustomTool } from '@cursor/sdk';
2
- import type { PermissionHandler } from '../acp/types.js';
3
- import { type LibrarianDispatchResult } from '../dispatch/librarian-dispatch.js';
4
- import { type ReviewerDispatchResult } from '../dispatch/reviewer-dispatch.js';
5
- import { type WorkerDispatchResult } from '../dispatch/worker-dispatch.js';
6
- import type { WorkerRuntime } from '../runtime/worker-runtime.js';
7
- import type { WorkerStartedInfo } from '../runtime/types.js';
8
- export interface DispatchToolsOptions {
9
- /** Default local clone for worker dispatch. */
10
- repoRoot: string;
11
- permissionHandler?: PermissionHandler;
12
- workerRuntime?: WorkerRuntime;
13
- onWorkerStarted?: (info: WorkerStartedInfo) => void;
14
- onWorkerDispatched?: (result: WorkerDispatchResult) => void;
15
- onReviewerDispatched?: (result: ReviewerDispatchResult) => void;
16
- onLibrarianDispatched?: (result: LibrarianDispatchResult) => void;
17
- }
18
- export declare function createDispatchTools(options: DispatchToolsOptions): Record<string, SDKCustomTool>;
19
- //# sourceMappingURL=dispatch-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch-tools.d.ts","sourceRoot":"","sources":["../../src/conductor/dispatch-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAqB,KAAK,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAChE,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACnE;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CA8O/B"}
@@ -1,209 +0,0 @@
1
- import { dispatchLibrarian } from '../dispatch/librarian-dispatch.js';
2
- import { dispatchReviewer } from '../dispatch/reviewer-dispatch.js';
3
- import { dispatchWorker } from '../dispatch/worker-dispatch.js';
4
- export function createDispatchTools(options) {
5
- return {
6
- dispatch_worker: {
7
- description: 'Dispatch a worker agent (ACP) for the given GitHub Issue. Creates a worktree and runs the specified Skill.',
8
- inputSchema: {
9
- type: 'object',
10
- properties: {
11
- issueUrl: {
12
- type: 'string',
13
- description: 'GitHub Issue URL',
14
- },
15
- skillName: {
16
- type: 'string',
17
- description: 'Skill name for the worker to follow',
18
- },
19
- repoRoot: {
20
- type: 'string',
21
- description: 'Local path to the target git clone. Defaults to the session repo root.',
22
- },
23
- },
24
- required: ['issueUrl', 'skillName'],
25
- },
26
- async execute(args) {
27
- const issueUrl = String(args.issueUrl ?? '');
28
- const skillName = String(args.skillName ?? '');
29
- const repoRoot = String(args.repoRoot ?? options.repoRoot);
30
- if (options.workerRuntime) {
31
- const workerId = options.workerRuntime.start({
32
- issueUrl,
33
- skillName,
34
- repoRoot,
35
- });
36
- const started = { workerId, issueUrl, skillName, repoRoot };
37
- options.onWorkerStarted?.(started);
38
- return {
39
- content: [
40
- {
41
- type: 'text',
42
- text: JSON.stringify({
43
- workerId,
44
- status: 'running',
45
- issueUrl,
46
- skillName,
47
- }, null, 2),
48
- },
49
- ],
50
- structuredContent: {
51
- workerId,
52
- status: 'running',
53
- issueUrl,
54
- skillName,
55
- },
56
- };
57
- }
58
- const result = await dispatchWorker({
59
- issueUrl,
60
- skillName,
61
- repoRoot,
62
- permissionHandler: options.permissionHandler,
63
- });
64
- options.onWorkerDispatched?.(result);
65
- return {
66
- content: [
67
- {
68
- type: 'text',
69
- text: JSON.stringify({
70
- issue: result.issue.url,
71
- worktree: result.worktree.path,
72
- branch: result.worktree.branch,
73
- stopReason: result.promptResult.stopReason,
74
- }, null, 2),
75
- },
76
- ],
77
- structuredContent: {
78
- issueUrl: result.issue.url,
79
- worktree: result.worktree.path,
80
- branch: result.worktree.branch,
81
- stopReason: result.promptResult.stopReason,
82
- },
83
- };
84
- },
85
- },
86
- dispatch_reviewer: {
87
- description: 'Dispatch a reviewer agent for a PR. Uses an existing worker worktree (context 0 review session).',
88
- inputSchema: {
89
- type: 'object',
90
- properties: {
91
- prUrl: { type: 'string', description: 'GitHub PR URL' },
92
- skillName: {
93
- type: 'string',
94
- description: 'Review Skill name for the reviewer',
95
- },
96
- worktreePath: {
97
- type: 'string',
98
- description: 'Existing worker worktree path',
99
- },
100
- issueUrl: {
101
- type: 'string',
102
- description: 'GitHub Issue URL to resolve worktree when worktreePath is omitted',
103
- },
104
- repoRoot: {
105
- type: 'string',
106
- description: 'Local git clone root when resolving worktree from issueUrl',
107
- },
108
- },
109
- required: ['prUrl', 'skillName'],
110
- },
111
- async execute(args) {
112
- const prUrl = String(args.prUrl ?? '');
113
- const skillName = String(args.skillName ?? '');
114
- const worktreePath = args.worktreePath
115
- ? String(args.worktreePath)
116
- : undefined;
117
- const issueUrl = args.issueUrl ? String(args.issueUrl) : undefined;
118
- const repoRoot = args.repoRoot
119
- ? String(args.repoRoot)
120
- : options.repoRoot;
121
- const result = await dispatchReviewer({
122
- prUrl,
123
- skillName,
124
- worktreePath,
125
- issueUrl,
126
- repoRoot,
127
- permissionHandler: options.permissionHandler,
128
- });
129
- options.onReviewerDispatched?.(result);
130
- return {
131
- content: [
132
- {
133
- type: 'text',
134
- text: JSON.stringify({
135
- prUrl: result.prUrl,
136
- worktree: result.worktreePath,
137
- stopReason: result.promptResult.stopReason,
138
- }, null, 2),
139
- },
140
- ],
141
- structuredContent: {
142
- prUrl: result.prUrl,
143
- worktree: result.worktreePath,
144
- stopReason: result.promptResult.stopReason,
145
- },
146
- };
147
- },
148
- },
149
- dispatch_librarian: {
150
- description: 'Dispatch a librarian agent for documentation maintenance (e.g. auto-docs). Runs in the target repo clone with an independent ACP session.',
151
- inputSchema: {
152
- type: 'object',
153
- properties: {
154
- skillName: {
155
- type: 'string',
156
- description: 'Librarian Skill name',
157
- },
158
- repoRoot: {
159
- type: 'string',
160
- description: 'Local path to the target git clone',
161
- },
162
- issueUrl: {
163
- type: 'string',
164
- description: 'Related GitHub Issue URL (optional context)',
165
- },
166
- prUrl: {
167
- type: 'string',
168
- description: 'Related GitHub PR URL (optional context)',
169
- },
170
- },
171
- required: ['skillName'],
172
- },
173
- async execute(args) {
174
- const skillName = String(args.skillName ?? '');
175
- const repoRoot = String(args.repoRoot ?? options.repoRoot);
176
- const issueUrl = args.issueUrl ? String(args.issueUrl) : undefined;
177
- const prUrl = args.prUrl ? String(args.prUrl) : undefined;
178
- const result = await dispatchLibrarian({
179
- skillName,
180
- repoRoot,
181
- issueUrl,
182
- prUrl,
183
- permissionHandler: options.permissionHandler,
184
- });
185
- options.onLibrarianDispatched?.(result);
186
- return {
187
- content: [
188
- {
189
- type: 'text',
190
- text: JSON.stringify({
191
- skillName: result.skillName,
192
- cwd: result.cwd,
193
- issueUrl: result.issueUrl,
194
- prUrl: result.prUrl,
195
- stopReason: result.promptResult.stopReason,
196
- }, null, 2),
197
- },
198
- ],
199
- structuredContent: {
200
- skillName: result.skillName,
201
- cwd: result.cwd,
202
- stopReason: result.promptResult.stopReason,
203
- },
204
- };
205
- },
206
- },
207
- };
208
- }
209
- //# sourceMappingURL=dispatch-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch-tools.js","sourceRoot":"","sources":["../../src/conductor/dispatch-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAA+B,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,cAAc,EAA6B,MAAM,gCAAgC,CAAC;AAe3F,MAAM,UAAU,mBAAmB,CACjC,OAA6B;IAE7B,OAAO;QACL,eAAe,EAAE;YACf,WAAW,EACT,4GAA4G;YAC9G,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,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AAC,iBAAiB;iBAC7C,CAAC,CAAC;gBAEH,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC,CAAC;gBAExC,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gCACE,SAAS,EAAE,MAAM,CAAC,SAAS;gCAC3B,GAAG,EAAE,MAAM,CAAC,GAAG;gCACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;gCACzB,KAAK,EAAE,MAAM,CAAC,KAAK;gCACnB,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;6BAC3C,EACD,IAAI,EACJ,CAAC,CACF;yBACF;qBACF;oBACD,iBAAiB,EAAE;wBACjB,SAAS,EAAE,MAAM,CAAC,SAAS;wBAC3B,GAAG,EAAE,MAAM,CAAC,GAAG;wBACf,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;qBAC3C;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @deprecated import from `./session-policy.js` instead.
3
- * 後方互換のため stop ポリシーのみ再 export する。
4
- */
5
- export { DEFAULT_MAX_ISSUE_TURNS, resolveIssueLoopStopReason, shouldStopIssueLoop, } from './session-policy.js';
6
- export type { IssueLoopStopInput, IssueLoopStopReason } from './session-policy.js';
7
- //# sourceMappingURL=issue-loop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-loop.d.ts","sourceRoot":"","sources":["../../src/conductor/issue-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated import from `./session-policy.js` instead.
3
- * 後方互換のため stop ポリシーのみ再 export する。
4
- */
5
- export { DEFAULT_MAX_ISSUE_TURNS, resolveIssueLoopStopReason, shouldStopIssueLoop, } from './session-policy.js';
6
- //# sourceMappingURL=issue-loop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-loop.js","sourceRoot":"","sources":["../../src/conductor/issue-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { ConductorPromptContext } from './types.js';
2
- /** 初回ターン: システムプロンプト(基本指示 + ドキュメント)+ ターン文脈。 */
3
- export declare function compileConductorSessionStart(context: ConductorPromptContext): string;
4
- /** 初回 `agent.send` 用(system + Issue ブリーフィング等)。 */
5
- export declare function compileConductorInitialMessage(context: ConductorPromptContext): string;
6
- //# sourceMappingURL=compile-conductor-prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compile-conductor-prompt.d.ts","sourceRoot":"","sources":["../../../src/conductor/prompt/compile-conductor-prompt.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,8CAA8C;AAC9C,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CAGR;AAED,kDAAkD;AAClD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CAER"}
@@ -1,14 +0,0 @@
1
- import { compile, merge } from '@modular-prompt/core';
2
- import { renderCompiledPrompt } from '../../prompt/render-compiled-prompt.js';
3
- import { conductorSystemModule } from './modules/conductor-system-module.js';
4
- import { conductorTurnModule } from './modules/conductor-turn-module.js';
5
- /** 初回ターン: システムプロンプト(基本指示 + ドキュメント)+ ターン文脈。 */
6
- export function compileConductorSessionStart(context) {
7
- const merged = merge(conductorSystemModule, conductorTurnModule);
8
- return renderCompiledPrompt(compile(merged, context));
9
- }
10
- /** 初回 `agent.send` 用(system + Issue ブリーフィング等)。 */
11
- export function compileConductorInitialMessage(context) {
12
- return compileConductorSessionStart(context);
13
- }
14
- //# sourceMappingURL=compile-conductor-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compile-conductor-prompt.js","sourceRoot":"","sources":["../../../src/conductor/prompt/compile-conductor-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAGzE,8CAA8C;AAC9C,MAAM,UAAU,4BAA4B,CAC1C,OAA+B;IAE/B,MAAM,MAAM,GAAG,KAAK,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IACjE,OAAO,oBAAoB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,8BAA8B,CAC5C,OAA+B;IAE/B,OAAO,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { WorkerDispatchResult } from '../../dispatch/worker-dispatch.js';
2
- import type { EscalationRecord } from '../../escalation/human-inquiry.js';
3
- import type { WorkerFailureRecord } from '../../runtime/types.js';
4
- export declare function formatDispatchSummaries(workers: WorkerDispatchResult[]): string[];
5
- export declare function formatWorkerFailureSummaries(failures: WorkerFailureRecord[]): string[];
6
- export declare function formatEscalationSummaries(escalations: EscalationRecord[]): string[];
7
- //# sourceMappingURL=format-session-summaries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-session-summaries.d.ts","sourceRoot":"","sources":["../../../src/conductor/prompt/format-session-summaries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,oBAAoB,EAAE,GAC9B,MAAM,EAAE,CASV;AAUD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,mBAAmB,EAAE,GAC9B,MAAM,EAAE,CASV;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,MAAM,EAAE,CAUnF"}
@@ -1,31 +0,0 @@
1
- export function formatDispatchSummaries(workers) {
2
- if (workers.length === 0) {
3
- return ['(なし)'];
4
- }
5
- return workers.map((worker) => `- worker: name=${worker.name} kind=${worker.kind} issue=${worker.issue.url} worktree=${worker.worktree.path} stopReason=${worker.promptResult.stopReason}${formatResponseSuffix(worker.promptResult.responseText)}`);
6
- }
7
- function formatResponseSuffix(responseText) {
8
- if (!responseText)
9
- return '';
10
- const trimmed = responseText.trim();
11
- if (!trimmed)
12
- return '';
13
- const preview = trimmed.length > 200 ? `${trimmed.slice(0, 200)}…` : trimmed;
14
- return ` response=${preview}`;
15
- }
16
- export function formatWorkerFailureSummaries(failures) {
17
- if (failures.length === 0) {
18
- return ['(なし)'];
19
- }
20
- return failures.map((failure) => `- worker failed: id=${failure.workerId} name=${failure.name} issue=${failure.issueUrl} kind=${failure.kind} error=${failure.error}`);
21
- }
22
- export function formatEscalationSummaries(escalations) {
23
- if (escalations.length === 0) {
24
- return ['(なし)'];
25
- }
26
- return escalations.map((entry) => {
27
- const approved = entry.approved === undefined ? '' : ` approved=${entry.approved}`;
28
- return `- Q: ${entry.question} → A: ${entry.answer}${approved}`;
29
- });
30
- }
31
- //# sourceMappingURL=format-session-summaries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-session-summaries.js","sourceRoot":"","s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,EAAE,CACvI,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,WAA+B;IACvE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC/B,MAAM,QAAQ,GACZ,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpE,OAAO,QAAQ,KAAK,CAAC,QAAQ,SAAS,KAAK,CAAC,MAAM,GAAG,QAAQ,EAAE,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { ConductorMaterial } from './types.js';
2
- export interface LoadConductorMaterialOptions {
3
- id?: string;
4
- title?: string;
5
- }
6
- export declare function loadConductorMaterialFromFile(filePath: string, options?: LoadConductorMaterialOptions): Promise<ConductorMaterial>;
7
- export declare function mergeConductorMaterials(materials: ConductorMaterial[] | undefined, briefing: string | undefined): ConductorMaterial[];
8
- //# sourceMappingURL=materials.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"materials.d.ts","sourceRoot":"","sources":["../../../src/conductor/prompt/materials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,iBAAiB,CAAC,CAS5B;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,iBAAiB,EAAE,GAAG,SAAS,EAC1C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,iBAAiB,EAAE,CAYrB"}
@@ -1,23 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- import { basename } from 'node:path';
3
- export async function loadConductorMaterialFromFile(filePath, options = {}) {
4
- const content = await readFile(filePath, 'utf8');
5
- const fileName = basename(filePath);
6
- return {
7
- id: options.id ?? fileName,
8
- title: options.title ?? fileName,
9
- content,
10
- };
11
- }
12
- export function mergeConductorMaterials(materials, briefing) {
13
- const merged = [...(materials ?? [])];
14
- if (briefing?.trim()) {
15
- merged.push({
16
- id: 'briefing',
17
- title: '作業基準メモ',
18
- content: briefing.trim(),
19
- });
20
- }
21
- return merged;
22
- }
23
- //# sourceMappingURL=materials.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"materials.js","sourceRoot":"","sources":["../../../src/conductor/prompt/materials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQrC,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,QAAgB,EAChB,UAAwC,EAAE;IAE1C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEpC,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,QAAQ;QAChC,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,SAA0C,EAC1C,QAA4B;IAE5B,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;IAEtC,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC;YACV,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,45 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
1
- import type { PromptModule } from '@modular-prompt/core';
2
- import type { ConductorPromptContext } from '../types.js';
3
- export declare const conductorHumanGuidanceModule: PromptModule<ConductorPromptContext>;
4
- //# sourceMappingURL=conductor-human-guidance-module.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,22 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
1
- import type { PromptModule } from '@modular-prompt/core';
2
- import type { ConductorPromptContext } from '../types.js';
3
- export declare const conductorInitialModule: PromptModule<ConductorPromptContext>;
4
- //# sourceMappingURL=conductor-initial-module.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
1
- import type { PromptModule } from '@modular-prompt/core';
2
- import type { ConductorPromptContext } from '../types.js';
3
- export declare const conductorSystemModule: PromptModule<ConductorPromptContext>;
4
- //# sourceMappingURL=conductor-system-module.d.ts.map
@@ -1 +0,0 @@
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"}