claude-tempo 0.3.0-beta.2 → 0.3.0-beta.4
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/dist/cli/commands.d.ts +1 -0
- package/dist/cli/commands.js +4 -2
- package/dist/cli.js +2 -0
- package/dist/server.js +3 -2
- package/dist/spawn.js +3 -1
- package/dist/tools/ensemble.js +2 -0
- package/dist/tools/recruit.d.ts +2 -1
- package/dist/tools/recruit.js +6 -5
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/cli/commands.d.ts
CHANGED
package/dist/cli/commands.js
CHANGED
|
@@ -54,7 +54,7 @@ const out = __importStar(require("./output"));
|
|
|
54
54
|
const PACKAGE_ROOT = (0, path_1.resolve)(__dirname, '..', '..');
|
|
55
55
|
async function start(opts) {
|
|
56
56
|
const config = (0, config_1.getConfig)(opts);
|
|
57
|
-
const workDir = process.cwd();
|
|
57
|
+
const workDir = opts.dir || process.cwd();
|
|
58
58
|
if (!opts.skipPreflight) {
|
|
59
59
|
const result = await (0, preflight_1.runPreflight)({
|
|
60
60
|
dir: workDir,
|
|
@@ -177,6 +177,7 @@ async function status(opts) {
|
|
|
177
177
|
branch: meta.gitBranch || '',
|
|
178
178
|
host: meta.hostname || '',
|
|
179
179
|
conductor: meta.isConductor || false,
|
|
180
|
+
agentType: meta.agentType || 'claude',
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
catch {
|
|
@@ -209,8 +210,9 @@ async function status(opts) {
|
|
|
209
210
|
});
|
|
210
211
|
for (const s of members) {
|
|
211
212
|
const role = s.conductor ? out.yellow(' (conductor)') : '';
|
|
213
|
+
const agent = s.agentType === 'copilot' ? out.dim(' [copilot]') : '';
|
|
212
214
|
const name = out.bold(s.name);
|
|
213
|
-
out.log(` ${name}${role}`);
|
|
215
|
+
out.log(` ${name}${role}${agent}`);
|
|
214
216
|
if (s.part)
|
|
215
217
|
out.log(` ${out.dim(s.part)}`);
|
|
216
218
|
const details = [s.workDir, s.branch, s.host].filter(Boolean).join(' ');
|
package/dist/cli.js
CHANGED
|
@@ -132,6 +132,7 @@ async function main() {
|
|
|
132
132
|
name: args.name,
|
|
133
133
|
skipPreflight: args.skipPreflight,
|
|
134
134
|
agent: args.agent ?? 'claude',
|
|
135
|
+
dir: args.dir,
|
|
135
136
|
...overrides,
|
|
136
137
|
});
|
|
137
138
|
break;
|
|
@@ -142,6 +143,7 @@ async function main() {
|
|
|
142
143
|
name: args.name,
|
|
143
144
|
skipPreflight: args.skipPreflight,
|
|
144
145
|
agent: args.agent ?? 'claude',
|
|
146
|
+
dir: args.dir,
|
|
145
147
|
...overrides,
|
|
146
148
|
});
|
|
147
149
|
break;
|
package/dist/server.js
CHANGED
|
@@ -113,6 +113,7 @@ async function main() {
|
|
|
113
113
|
const workflowId = isConductor
|
|
114
114
|
? (0, config_1.conductorWorkflowId)(config.ensemble)
|
|
115
115
|
: `claude-session-${config.ensemble}-${playerId}`;
|
|
116
|
+
const isBridgeMode = process.env[config_1.ENV.BRIDGE_MODE] === '1';
|
|
116
117
|
const sessionInput = {
|
|
117
118
|
metadata: {
|
|
118
119
|
playerId,
|
|
@@ -122,6 +123,7 @@ async function main() {
|
|
|
122
123
|
gitRoot,
|
|
123
124
|
gitBranch,
|
|
124
125
|
isConductor,
|
|
126
|
+
agentType: isBridgeMode ? 'copilot' : 'claude',
|
|
125
127
|
},
|
|
126
128
|
autoSummary: `Session in ${path.basename(workDir)}`,
|
|
127
129
|
};
|
|
@@ -177,14 +179,13 @@ async function main() {
|
|
|
177
179
|
(0, set_part_1.registerSetPartTool)(mcpServer, handle);
|
|
178
180
|
(0, set_name_1.registerSetNameTool)(mcpServer, client, config, handle, getPlayerId, setPlayerId);
|
|
179
181
|
(0, listen_1.registerListenTool)(mcpServer, handle);
|
|
180
|
-
(0, recruit_1.registerRecruitTool)(mcpServer, client, config, getPlayerId);
|
|
182
|
+
(0, recruit_1.registerRecruitTool)(mcpServer, client, config, getPlayerId, isBridgeMode ? 'copilot' : 'claude');
|
|
181
183
|
(0, report_1.registerReportTool)(mcpServer, client, config, getPlayerId);
|
|
182
184
|
(0, terminate_1.registerTerminateTool)(mcpServer, client, config, getPlayerId);
|
|
183
185
|
// Start message poller — push messages into Claude Code via channel notifications.
|
|
184
186
|
// Skip when running under the Copilot bridge: the bridge has its own poller that
|
|
185
187
|
// injects messages via sendAndWait. If both pollers run, this one wins the race and
|
|
186
188
|
// sends messages via notifications/claude/channel — which Copilot doesn't understand.
|
|
187
|
-
const isBridgeMode = process.env[config_1.ENV.BRIDGE_MODE] === '1';
|
|
188
189
|
const stopPoller = isBridgeMode
|
|
189
190
|
? () => { } // no-op — bridge handles message delivery
|
|
190
191
|
: (0, channel_1.startMessagePoller)(handle, async (messages) => {
|
package/dist/spawn.js
CHANGED
|
@@ -242,8 +242,10 @@ function spawnCopilotBridge(opts) {
|
|
|
242
242
|
...process.env,
|
|
243
243
|
[config_1.ENV.ENSEMBLE]: opts.ensemble,
|
|
244
244
|
[config_1.ENV.BRIDGE_NAME]: opts.name,
|
|
245
|
+
[config_1.ENV.PLAYER_NAME]: '', // Clear parent's player name so child uses BRIDGE_NAME
|
|
246
|
+
[config_1.ENV.BRIDGE_MODE]: '', // Clear parent's bridge mode
|
|
245
247
|
[config_1.ENV.TEMPORAL_ADDRESS]: opts.temporalAddress,
|
|
246
|
-
|
|
248
|
+
[config_1.ENV.CONDUCTOR]: opts.isConductor ? 'true' : '',
|
|
247
249
|
// Forward Temporal connection settings so child processes can connect
|
|
248
250
|
...(opts.temporalNamespace ? { [config_1.ENV.TEMPORAL_NAMESPACE]: opts.temporalNamespace } : {}),
|
|
249
251
|
...(opts.temporalApiKey ? { [config_1.ENV.TEMPORAL_API_KEY]: opts.temporalApiKey } : {}),
|
package/dist/tools/ensemble.js
CHANGED
|
@@ -67,6 +67,7 @@ function registerEnsembleTool(server, client, config, getPlayerId, ownWorkflowId
|
|
|
67
67
|
gitRoot: metadata.gitRoot,
|
|
68
68
|
gitBranch: metadata.gitBranch,
|
|
69
69
|
isConductor: metadata.isConductor,
|
|
70
|
+
agentType: metadata.agentType || 'claude',
|
|
70
71
|
isYou: metadata.playerId === getPlayerId(),
|
|
71
72
|
});
|
|
72
73
|
}
|
|
@@ -90,6 +91,7 @@ function registerEnsembleTool(server, client, config, getPlayerId, ownWorkflowId
|
|
|
90
91
|
const tags = [
|
|
91
92
|
p.isYou ? '(you)' : '',
|
|
92
93
|
p.isConductor ? '(conductor)' : '',
|
|
94
|
+
p.agentType === 'copilot' ? '[copilot]' : '',
|
|
93
95
|
].filter(Boolean).join(' ');
|
|
94
96
|
return [
|
|
95
97
|
`**${p.playerId}** ${tags}`.trim(),
|
package/dist/tools/recruit.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { Client } from '@temporalio/client';
|
|
3
3
|
import { Config } from '../config';
|
|
4
|
-
|
|
4
|
+
import { AgentType } from '../types';
|
|
5
|
+
export declare function registerRecruitTool(server: McpServer, client: Client, config: Config, getPlayerId: () => string, ownAgentType?: AgentType): void;
|
package/dist/tools/recruit.js
CHANGED
|
@@ -10,16 +10,17 @@ const log = (...args) => console.error('[claude-tempo:recruit]', ...args);
|
|
|
10
10
|
function sleep(ms) {
|
|
11
11
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
12
12
|
}
|
|
13
|
-
function registerRecruitTool(server, client, config, getPlayerId) {
|
|
14
|
-
(0, helpers_1.defineTool)(server, 'recruit',
|
|
13
|
+
function registerRecruitTool(server, client, config, getPlayerId, ownAgentType = 'claude') {
|
|
14
|
+
(0, helpers_1.defineTool)(server, 'recruit', `Start a new named session in a directory. Rejects if the name is already active. Supports Claude Code or Copilot CLI agents. Defaults to "${ownAgentType}" (same as this session).`, {
|
|
15
15
|
workDir: zod_1.z.string().describe('The working directory for the new session'),
|
|
16
16
|
name: zod_1.z.string().describe('Name for the new session'),
|
|
17
17
|
initialMessage: zod_1.z.string().optional()
|
|
18
18
|
.describe('Optional task or message for the new session (sent after it sets its name)'),
|
|
19
|
-
agent: zod_1.z.enum(['claude', 'copilot']).
|
|
20
|
-
.describe(
|
|
19
|
+
agent: zod_1.z.enum(['claude', 'copilot']).optional()
|
|
20
|
+
.describe(`Which agent to use (default: "${ownAgentType}", same as this session)`),
|
|
21
21
|
}, async (args) => {
|
|
22
|
-
const { workDir, name, initialMessage
|
|
22
|
+
const { workDir, name, initialMessage } = args;
|
|
23
|
+
const agent = args.agent || ownAgentType;
|
|
23
24
|
// Validate name to prevent search attribute query injection
|
|
24
25
|
if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
|
|
25
26
|
return {
|
package/dist/types.d.ts
CHANGED