next-issue 6.6.80 → 6.6.81
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/README.md +3 -1
- package/dist/agents.mjs +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -425,7 +425,9 @@ Three levels of console output:
|
|
|
425
425
|
and the tools of your extensions. The reviewer gets all of them except
|
|
426
426
|
`edit` and `write`. The agents run with `GIT_OPTIONAL_LOCKS=0`, so a
|
|
427
427
|
`git status` from an agent or an extension does not hold the index lock
|
|
428
|
-
while the harness commits.
|
|
428
|
+
while the harness commits. While an agent runs, `process.argv[1]` is the
|
|
429
|
+
pi CLI, so an extension that starts a child pi with `process.execPath` and
|
|
430
|
+
`process.argv[1]` (such as a `subagent` tool) runs pi, not next-issue.
|
|
429
431
|
|
|
430
432
|
## Configuration
|
|
431
433
|
|
package/dist/agents.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
1
4
|
import { getAgentDir, } from '@earendil-works/pi-coding-agent';
|
|
2
5
|
import { openSession } from './agent-session.mjs';
|
|
3
6
|
import { onStop, refuseWhenStopped } from './children.mjs';
|
|
@@ -10,11 +13,18 @@ export const REVIEWING = {
|
|
|
10
13
|
export const CODING = {
|
|
11
14
|
tools: ['+grep', '+find', '+ls'],
|
|
12
15
|
};
|
|
16
|
+
const PI_CLI = piCli();
|
|
17
|
+
function piCli() {
|
|
18
|
+
const root = dirname(dirname(fileURLToPath(import.meta.resolve('@earendil-works/pi-coding-agent'))));
|
|
19
|
+
const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
20
|
+
return join(root, manifest.bin.pi);
|
|
21
|
+
}
|
|
13
22
|
export async function runAgent(recorder, request) {
|
|
14
23
|
const log = recorder.scope({ role: request.name });
|
|
15
24
|
const agentDir = request.runtime?.agentDir ?? getAgentDir();
|
|
16
25
|
const started = Date.now();
|
|
17
26
|
process.env.GIT_OPTIONAL_LOCKS = '0';
|
|
27
|
+
process.argv[1] = PI_CLI;
|
|
18
28
|
log.event('agent.start', { model: request.model, timeoutMs: request.timeoutMs });
|
|
19
29
|
const session = await openSession(recorder, log, request, agentDir);
|
|
20
30
|
const timer = deadline(request.timeoutMs, () => void session.abort());
|