@deathbeam/pi-delegate 0.0.34 → 0.0.35

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 (2) hide show
  1. package/index.ts +6 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -275,19 +275,20 @@ export default function (pi: ExtensionAPI) {
275
275
  const entrypoint = process.argv[1];
276
276
  if (!entrypoint) throw new Error("Pi CLI entrypoint missing; start Pi from its CLI to delegate.");
277
277
  const cwd = isolation ? cloneCwd(isolation, ctx.cwd) : ctx.cwd;
278
+ if (isolation)
279
+ args.push(
280
+ "--append-system-prompt",
281
+ `You are working in an isolated git clone at ${isolation.clone}. Your working directory is ${cwd}; run every command from it with relative paths. Any path under ${ctx.cwd} means the same file under ${cwd}. Your edits and commits stay in this clone until the orchestrator applies them.${tools.includes("bash") ? " `git diff main-snapshot` shows every change made in this clone." : ""}`,
282
+ );
278
283
  const child = spawn(process.execPath, [entrypoint, "--mode", "rpc", ...args], {
279
284
  cwd,
280
285
  shell: false,
281
286
  stdio: "pipe",
282
287
  });
283
288
  store.launch(job);
284
- // The brief was written against the main tree, so its absolute paths need mapping to the clone.
285
- const isolatedPrompt = isolation
286
- ? `You are working in an isolated git clone at ${isolation.clone}. Your working directory ${cwd} is already inside it, so use relative paths and do not cd into it. Paths under ${ctx.cwd} in the task refer to the same files under ${cwd}. The main working tree is untouched; any edits or commits you make stay in this clone until the orchestrator applies them.${tools.includes("bash") ? " `git diff main-snapshot` shows all changes made in this clone." : ""}`
287
- : "";
288
289
  const run = runChild(
289
290
  child,
290
- isolatedPrompt ? `${isolatedPrompt}\n\n${prompt}` : prompt,
291
+ prompt,
291
292
  // Foreground runs also stop on the tool's own abort (Esc); delegate_cancel and shutdown use the controller.
292
293
  details.background || !signal ? job.controller.signal : AbortSignal.any([signal, job.controller.signal]),
293
294
  (update) => store.record(job, update),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deathbeam/pi-delegate",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "Minimal extension for delegating tasks to subagents.",
5
5
  "type": "module",
6
6
  "license": "MIT",