@renseiai/agentfactory-cli 0.8.22 → 0.8.24
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/src/lib/orchestrator-runner.d.ts.map +1 -1
- package/dist/src/lib/orchestrator-runner.js +2 -0
- package/dist/src/lib/worker-runner.d.ts.map +1 -1
- package/dist/src/lib/worker-runner.js +18 -6
- package/dist/src/linear.js +2 -0
- package/dist/src/worker.d.ts +1 -1
- package/dist/src/worker.js +3 -4
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/orchestrator-runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAA;AAmB/B,MAAM,WAAW,wBAAwB;IACvC,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;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AO,CAAC,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACpD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;IAC5C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC1D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;CAClD;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;IAChD,SAAS,EAAE,YAAY,EAAE,CAAA;CAC1B;AAMD,wBAAgB,UAAU,IAAI,MAAM,CASnC;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAYjD;AA0CD,wBAAsB,eAAe,CACnC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CA8GnC"}
|
|
@@ -143,6 +143,7 @@ export async function runOrchestrator(config) {
|
|
|
143
143
|
}
|
|
144
144
|
finally {
|
|
145
145
|
process.removeListener('SIGINT', sigintHandler);
|
|
146
|
+
await orchestrator.shutdownProviders();
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
return result;
|
|
@@ -168,6 +169,7 @@ export async function runOrchestrator(config) {
|
|
|
168
169
|
}
|
|
169
170
|
finally {
|
|
170
171
|
process.removeListener('SIGINT', sigintHandler);
|
|
172
|
+
await orchestrator.shutdownProviders();
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
175
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"worker-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoCH,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AA4ED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAmgCf"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import { execSync } from 'child_process';
|
|
10
10
|
import os from 'os';
|
|
11
|
-
import { createOrchestrator, createLogger, loadRepositoryConfig, } from '@renseiai/agentfactory';
|
|
12
|
-
import { LinearIssueTrackerClient, createLinearStatusMappings, linearPlugin, } from '@renseiai/plugin-linear';
|
|
11
|
+
import { createOrchestrator, createLogger, loadRepositoryConfig, NullIssueTrackerClient, } from '@renseiai/agentfactory';
|
|
12
|
+
import { LinearIssueTrackerClient, ProxyIssueTrackerAdapter, createLinearStatusMappings, linearPlugin, } from '@renseiai/plugin-linear';
|
|
13
13
|
import { MergeQueueStorage, createLocalMergeQueueStorage } from '@renseiai/agentfactory-server';
|
|
14
14
|
let codeIntelligencePlugin;
|
|
15
15
|
try {
|
|
@@ -50,9 +50,6 @@ export async function runWorker(config, signal) {
|
|
|
50
50
|
const dryRun = config.dryRun ?? false;
|
|
51
51
|
const gitRoot = config.gitRoot ?? getGitRoot();
|
|
52
52
|
const linearApiKey = config.linearApiKey ?? process.env.LINEAR_API_KEY;
|
|
53
|
-
if (!linearApiKey) {
|
|
54
|
-
throw new Error('LINEAR_API_KEY is required (pass via config.linearApiKey or set env var)');
|
|
55
|
-
}
|
|
56
53
|
// -----------------------------------------------------------------------
|
|
57
54
|
// State (formerly globals)
|
|
58
55
|
// -----------------------------------------------------------------------
|
|
@@ -425,7 +422,20 @@ export async function runWorker(config, signal) {
|
|
|
425
422
|
? `Resuming work on ${work.issueIdentifier}`
|
|
426
423
|
: `Worker claimed ${work.issueIdentifier}. Setting up environment...`);
|
|
427
424
|
// Create orchestrator with API activity proxy
|
|
428
|
-
|
|
425
|
+
// Priority: direct Linear API → proxy via platform API → null (no-op)
|
|
426
|
+
let issueTrackerClient;
|
|
427
|
+
if (linearApiKey) {
|
|
428
|
+
issueTrackerClient = new LinearIssueTrackerClient({ apiKey: linearApiKey });
|
|
429
|
+
}
|
|
430
|
+
else if (workerConfig.apiUrl && workerConfig.apiKey) {
|
|
431
|
+
issueTrackerClient = new ProxyIssueTrackerAdapter({
|
|
432
|
+
apiUrl: workerConfig.apiUrl,
|
|
433
|
+
apiKey: workerConfig.apiKey,
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
issueTrackerClient = new NullIssueTrackerClient();
|
|
438
|
+
}
|
|
429
439
|
const statusMappings = createLinearStatusMappings();
|
|
430
440
|
// Create local merge queue storage if configured
|
|
431
441
|
const repoConfig = loadRepositoryConfig(gitRoot);
|
|
@@ -585,6 +595,8 @@ export async function runWorker(config, signal) {
|
|
|
585
595
|
// Wait for agent to complete
|
|
586
596
|
agentLog.info('Waiting for agent to complete...');
|
|
587
597
|
const results = await orchestrator.waitForAll();
|
|
598
|
+
// Shut down provider resources (e.g., Codex app-server) to prevent orphans
|
|
599
|
+
await orchestrator.shutdownProviders();
|
|
588
600
|
const agent = results[0];
|
|
589
601
|
clearInterval(stopChecker);
|
|
590
602
|
// Determine final status
|
package/dist/src/linear.js
CHANGED
|
@@ -97,6 +97,8 @@ async function main() {
|
|
|
97
97
|
args,
|
|
98
98
|
positionalArgs,
|
|
99
99
|
apiKey,
|
|
100
|
+
proxyUrl: process.env.AGENTFACTORY_API_URL,
|
|
101
|
+
proxyAuthToken: process.env.WORKER_AUTH_TOKEN || process.env.WORKER_API_KEY,
|
|
100
102
|
});
|
|
101
103
|
// check-deployment with markdown format outputs a string, not JSON
|
|
102
104
|
if (typeof result.output === 'string') {
|
package/dist/src/worker.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* WORKER_API_URL Coordinator API URL (e.g., https://agent.example.com)
|
|
21
21
|
* WORKER_API_KEY API key for authentication
|
|
22
22
|
* WORKER_PROJECTS Comma-separated project names to accept (e.g., Social,Agent)
|
|
23
|
-
* LINEAR_API_KEY
|
|
23
|
+
* LINEAR_API_KEY Optional — enables direct Linear API access (omit for platform-delegated workers)
|
|
24
24
|
*/
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=worker.d.ts.map
|
package/dist/src/worker.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* WORKER_API_URL Coordinator API URL (e.g., https://agent.example.com)
|
|
21
21
|
* WORKER_API_KEY API key for authentication
|
|
22
22
|
* WORKER_PROJECTS Comma-separated project names to accept (e.g., Social,Agent)
|
|
23
|
-
* LINEAR_API_KEY
|
|
23
|
+
* LINEAR_API_KEY Optional — enables direct Linear API access (omit for platform-delegated workers)
|
|
24
24
|
*/
|
|
25
25
|
import path from 'path';
|
|
26
26
|
import { config } from 'dotenv';
|
|
@@ -86,7 +86,7 @@ Environment (loaded from .env.local in CWD):
|
|
|
86
86
|
WORKER_API_URL Coordinator API URL
|
|
87
87
|
WORKER_API_KEY API key for authentication
|
|
88
88
|
WORKER_PROJECTS Comma-separated project names to accept
|
|
89
|
-
LINEAR_API_KEY
|
|
89
|
+
LINEAR_API_KEY Optional — enables direct Linear API access (omit for platform-delegated workers)
|
|
90
90
|
|
|
91
91
|
Examples:
|
|
92
92
|
# Start worker with default settings
|
|
@@ -106,8 +106,7 @@ if (!cliArgs.apiKey) {
|
|
|
106
106
|
process.exit(1);
|
|
107
107
|
}
|
|
108
108
|
if (!process.env.LINEAR_API_KEY) {
|
|
109
|
-
console.
|
|
110
|
-
process.exit(1);
|
|
109
|
+
console.warn('Warning: LINEAR_API_KEY not set — Linear operations will be delegated to the platform API');
|
|
111
110
|
}
|
|
112
111
|
// Create AbortController for graceful shutdown
|
|
113
112
|
const controller = new AbortController();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@renseiai/agentfactory-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tools for AgentFactory — local orchestrator, remote worker, queue admin",
|
|
6
6
|
"author": "Rensei AI (https://rensei.ai)",
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
],
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"dotenv": "^17.2.3",
|
|
129
|
-
"@renseiai/
|
|
130
|
-
"@renseiai/agentfactory
|
|
131
|
-
"@renseiai/
|
|
129
|
+
"@renseiai/plugin-linear": "0.8.24",
|
|
130
|
+
"@renseiai/agentfactory": "0.8.24",
|
|
131
|
+
"@renseiai/agentfactory-server": "0.8.24"
|
|
132
132
|
},
|
|
133
133
|
"optionalDependencies": {
|
|
134
|
-
"@renseiai/agentfactory-code-intelligence": "0.8.
|
|
134
|
+
"@renseiai/agentfactory-code-intelligence": "0.8.24"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/node": "^22.5.4",
|