@cydm/pie 4.10.1 → 4.11.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.
- package/dist/builtin/extensions/im-forward/index.js +1093 -361
- package/dist/builtin/extensions/mcp-adapter/index.js +216 -7
- package/dist/builtin/extensions/memory/index.js +1 -1
- package/dist/builtin/extensions/pie-proc/index.js +187 -150
- package/dist/chunks/{chunk-FC5AN5QP.js → chunk-B5GKDXVG.js} +43 -48
- package/dist/chunks/chunk-EWPPGYBU.js +292 -0
- package/dist/chunks/{chunk-XMTRKMBG.js → chunk-L7XXKNZW.js} +1 -1
- package/dist/chunks/chunk-Z2RT3P4F.js +251 -0
- package/dist/chunks/manager-allow-SF5ROGDM.js +21 -0
- package/dist/chunks/{manager-cli-UU6SDS3F.js → manager-cli-BXI4UFTJ.js} +11 -54
- package/dist/chunks/{model-registry-QKJ3YVDS.js → model-registry-MGZO2RBN.js} +1 -1
- package/dist/cli.js +305 -41
- package/package.json +1 -1
- package/dist/chunks/chunk-6WKBQZWM.js +0 -19
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
addAllowedWorkerCwd,
|
|
4
|
+
isTooBroadForWorkerSandbox,
|
|
5
|
+
resolveEffectiveProcConfigFile,
|
|
6
|
+
resolveProcConfigCandidates,
|
|
7
|
+
resolveWritableProcConfigFile,
|
|
8
|
+
runManagerAllowCommand,
|
|
9
|
+
seedProcConfig
|
|
10
|
+
} from "./chunk-Z2RT3P4F.js";
|
|
11
|
+
import "./chunk-CBDQJMUI.js";
|
|
12
|
+
import "./chunk-LZQXQOPJ.js";
|
|
13
|
+
export {
|
|
14
|
+
addAllowedWorkerCwd,
|
|
15
|
+
isTooBroadForWorkerSandbox,
|
|
16
|
+
resolveEffectiveProcConfigFile,
|
|
17
|
+
resolveProcConfigCandidates,
|
|
18
|
+
resolveWritableProcConfigFile,
|
|
19
|
+
runManagerAllowCommand,
|
|
20
|
+
seedProcConfig
|
|
21
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
isTooBroadForWorkerSandbox,
|
|
4
|
+
seedProcConfig
|
|
5
|
+
} from "./chunk-Z2RT3P4F.js";
|
|
2
6
|
import {
|
|
3
7
|
readProcessCommandLine
|
|
4
8
|
} from "./chunk-7RJXKN7N.js";
|
|
5
|
-
import
|
|
6
|
-
getConfigDir
|
|
7
|
-
} from "./chunk-CBDQJMUI.js";
|
|
9
|
+
import "./chunk-CBDQJMUI.js";
|
|
8
10
|
import "./chunk-LZQXQOPJ.js";
|
|
9
11
|
|
|
10
12
|
// src/commands/manager-cli.ts
|
|
@@ -337,56 +339,6 @@ function seedWorkspace(dir) {
|
|
|
337
339
|
fs2.appendFileSync(agents, "\n> Note: the resident role is now named manager. Update the role card manually if you want the latest template.\n");
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
|
-
function isTooBroadForWorkerSandbox(input) {
|
|
341
|
-
let resolved;
|
|
342
|
-
try {
|
|
343
|
-
resolved = fs2.realpathSync(input);
|
|
344
|
-
} catch {
|
|
345
|
-
return true;
|
|
346
|
-
}
|
|
347
|
-
const root = path2.parse(resolved).root;
|
|
348
|
-
if (resolved === root || resolved === os.homedir()) return true;
|
|
349
|
-
const forbidden = [os.homedir(), os.tmpdir(), "/tmp", "/var/tmp", "/private/tmp", "/private/var/tmp"];
|
|
350
|
-
for (const candidate of forbidden) {
|
|
351
|
-
try {
|
|
352
|
-
const real = fs2.realpathSync(candidate);
|
|
353
|
-
if (resolved === real) return true;
|
|
354
|
-
} catch {
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
try {
|
|
358
|
-
const stat = fs2.statSync(resolved);
|
|
359
|
-
if ((stat.mode & 2) !== 0 && (stat.mode & 512) === 0) return true;
|
|
360
|
-
} catch {
|
|
361
|
-
return true;
|
|
362
|
-
}
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
function seedProcConfig(launchCwd) {
|
|
366
|
-
const root = getConfigDir();
|
|
367
|
-
const file = path2.join(root, "pie-proc.json");
|
|
368
|
-
const resolved = path2.resolve(launchCwd);
|
|
369
|
-
try {
|
|
370
|
-
if (fs2.existsSync(file)) return { state: "exists", file, root };
|
|
371
|
-
} catch {
|
|
372
|
-
return { state: "exists", file, root };
|
|
373
|
-
}
|
|
374
|
-
const userLayer = path2.join(os.homedir(), ".pie", "pie-proc.json");
|
|
375
|
-
try {
|
|
376
|
-
if (fs2.existsSync(userLayer)) return { state: "user-layer", file: userLayer, root };
|
|
377
|
-
} catch {
|
|
378
|
-
}
|
|
379
|
-
if (isTooBroadForWorkerSandbox(resolved)) {
|
|
380
|
-
return { state: "too-broad", file, root };
|
|
381
|
-
}
|
|
382
|
-
fs2.mkdirSync(root, { recursive: true });
|
|
383
|
-
fs2.writeFileSync(
|
|
384
|
-
file,
|
|
385
|
-
`${JSON.stringify({ allowCwd: [resolved] }, null, " ")}
|
|
386
|
-
`
|
|
387
|
-
);
|
|
388
|
-
return { state: "seeded", file, root };
|
|
389
|
-
}
|
|
390
342
|
function cliEntry() {
|
|
391
343
|
return process.argv[1] ? path2.resolve(process.argv[1]) : "";
|
|
392
344
|
}
|
|
@@ -1134,6 +1086,11 @@ async function runManagerCommand(args) {
|
|
|
1134
1086
|
await runUpgradeCommand(args.slice(1));
|
|
1135
1087
|
return;
|
|
1136
1088
|
}
|
|
1089
|
+
if (sub === "allow") {
|
|
1090
|
+
const { runManagerAllowCommand } = await import("./manager-allow-SF5ROGDM.js");
|
|
1091
|
+
runManagerAllowCommand(args.slice(1));
|
|
1092
|
+
return;
|
|
1093
|
+
}
|
|
1137
1094
|
if (sub === "tail") {
|
|
1138
1095
|
const follow = args.includes("-f") || args.includes("--follow");
|
|
1139
1096
|
const jsonOut = args.includes("--json");
|
|
@@ -1379,7 +1336,7 @@ async function runManagerCommand(args) {
|
|
|
1379
1336
|
);
|
|
1380
1337
|
} else if (procSeed.state === "too-broad") {
|
|
1381
1338
|
console.log(
|
|
1382
|
-
`Did not seed pie-proc config (the current directory ${path2.resolve(process.cwd())} is too broad). To dispatch work,
|
|
1339
|
+
`Did not seed pie-proc config (the current directory ${path2.resolve(process.cwd())} is too broad). To dispatch work, run: pie manager allow /your/project (writes ${procSeed.file})`
|
|
1383
1340
|
);
|
|
1384
1341
|
}
|
|
1385
1342
|
let readinessReport;
|