@cydm/pie 4.6.1 → 4.7.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.
@@ -1,7 +1,4 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
- import {
3
- Type
4
- } from "../../../chunks/chunk-XXGYUYXI.js";
5
2
  import {
6
3
  DEFAULT_SEND_WAIT_MS,
7
4
  DISPATCH_PREFIX,
@@ -27,8 +24,11 @@ import {
27
24
  takeDispatchFrame,
28
25
  wrapInboundText,
29
26
  wrappedMessageMarker
30
- } from "../../../chunks/chunk-2CJIENLY.js";
27
+ } from "../../../chunks/chunk-7UAUDXZW.js";
31
28
  import "../../../chunks/chunk-ZPJ3BNQB.js";
29
+ import {
30
+ Type
31
+ } from "../../../chunks/chunk-XXGYUYXI.js";
32
32
  import "../../../chunks/chunk-LZQXQOPJ.js";
33
33
 
34
34
  // builtin/extensions/pie-ipc/index.ts
@@ -1923,11 +1923,11 @@ SIDE EFFECT: this is NOT a read-only query. The text is injected into the peer's
1923
1923
  ctx.registerTool({
1924
1924
  name: "ipc_control_notify",
1925
1925
  label: "Send a control frame to a Pie peer",
1926
- description: "Send an enumerated CONTROL frame to another Pie process (multi-agent IM v2). The frame is applied by the peer's host DIRECTLY \u2014 it never enters the peer's turn or session history. First control: 'model.set' with payload {model: 'provider/modelId'} switches the peer's model for its subsequent turns (same validation as the peer's own /model). Receipt (success or structured refusal) returns as this tool's result. Controls are idempotent: re-sending after an uncertain outcome is safe.",
1926
+ description: "Send an enumerated CONTROL frame to another Pie process (multi-agent IM v2). The frame is applied by the peer's host DIRECTLY \u2014 it never enters the peer's turn or session history. Controls: 'model.set' with payload {model: 'provider/modelId'} switches the peer's model; 'thinking.set' with payload {level: '...'} switches the peer's thinking level; 'session.context' (payload {}) reads the peer's context estimate (headless hosts only \u2014 the receipt message is JSON with estimatedTokens/contextWindow/percent/autoCompact figures); 'session.compact' (payload {}) requests a MANUAL compaction on the peer (headless hosts only; accepted means started \u2014 observe the result via session.context). Receipt (success or structured refusal) returns as this tool's result. Controls are idempotent: re-sending after an uncertain outcome is safe.",
1927
1927
  parameters: Type.Object({
1928
1928
  to: Type.String({ description: "Peer display name or instance id (see ipc_list_peers)" }),
1929
- control: Type.Union([Type.Literal("model.set"), Type.Literal("thinking.set")], { description: "Control to apply (enumerated whitelist)" }),
1930
- payload: Type.Optional(Type.Record(Type.String(), Type.Unknown(), { description: "Control payload. model.set requires {model: 'provider/modelId'}; thinking.set requires {level: 'off|minimal|low|medium|high|xhigh'}" })),
1929
+ control: Type.Union([Type.Literal("model.set"), Type.Literal("thinking.set"), Type.Literal("session.context"), Type.Literal("session.compact")], { description: "Control to apply (enumerated whitelist)" }),
1930
+ payload: Type.Optional(Type.Record(Type.String(), Type.Unknown(), { description: "Control payload. model.set requires {model: 'provider/modelId'}; thinking.set requires {level: 'off|minimal|low|medium|high|xhigh'}; session.context/session.compact take an empty payload" })),
1931
1931
  waitMs: Type.Optional(Type.Number({ description: "Receipt wait budget in ms (default 120000, max 600000)", minimum: 100, maximum: 6e5 }))
1932
1932
  }),
1933
1933
  risk: { ...risk, riskClass: "session_mutation", concurrencySafe: false },
@@ -1956,9 +1956,9 @@ SIDE EFFECT: this is NOT a read-only query. The text is injected into the peer's
1956
1956
  ctx.registerTool({
1957
1957
  name: "self_control",
1958
1958
  label: "Send a control frame to this session's host",
1959
- description: "Send an enumerated CONTROL frame to THIS session's own host (the process running you). The host applies it directly \u2014 it never enters the turn pipeline or session history. Controls: 'model.set' with payload {model: 'provider/modelId'} switches YOUR model (same validation as the user's /model); 'thinking.set' with payload {level: 'off|minimal|low|medium|high|xhigh'} switches YOUR thinking level (same path as the user's /think; a sensible self-tuning knob \u2014 low for cheap lookups, high for hard reasoning). Both apply from the host's NEXT agent execution \u2014 the current execution (including tool-continuation rounds) finishes on the settings it started with. Receipt (success or structured refusal) returns as this tool's result. Controls are idempotent: re-sending after an uncertain outcome is safe.",
1959
+ description: "Send an enumerated CONTROL frame to THIS session's own host (the process running you). The host applies it directly \u2014 it never enters the turn pipeline or session history. Controls: 'model.set' with payload {model: 'provider/modelId'} switches YOUR model (same validation as the user's /model); 'thinking.set' with payload {level: 'off|minimal|low|medium|high|xhigh'} switches YOUR thinking level (same path as the user's /think; a sensible self-tuning knob \u2014 low for cheap lookups, high for hard reasoning). Both apply from the host's NEXT agent execution \u2014 the current execution (including tool-continuation rounds) finishes on the settings it started with. 'session.context' (payload {}) reads YOUR host's context estimate (headless hosts; receipt message is JSON); 'session.compact' (payload {}) requests a MANUAL compaction of THIS session \u2014 **refused while a turn is streaming (you are always mid-turn when you call this, so expect a refusal; the IM panel is the intended entry)**. Receipt (success or structured refusal) returns as this tool's result. Controls are idempotent: re-sending after an uncertain outcome is safe.",
1960
1960
  parameters: Type.Object({
1961
- control: Type.Union([Type.Literal("model.set"), Type.Literal("thinking.set")], { description: "Control to apply (enumerated host whitelist)" }),
1961
+ control: Type.Union([Type.Literal("model.set"), Type.Literal("thinking.set"), Type.Literal("session.context"), Type.Literal("session.compact")], { description: "Control to apply (enumerated host whitelist)" }),
1962
1962
  payload: Type.Optional(Type.Record(Type.String(), Type.Unknown(), { description: "Control payload. model.set requires {model: 'provider/modelId'}; thinking.set requires {level: 'off|minimal|low|medium|high|xhigh'}" })),
1963
1963
  waitMs: Type.Optional(Type.Number({ description: "Receipt wait budget in ms (default 120000, max 600000)", minimum: 100, maximum: 6e5 }))
1964
1964
  }),
@@ -1,15 +1,15 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
- import {
3
- readProcessCommandLine
4
- } from "../../../chunks/chunk-7RJXKN7N.js";
5
2
  import {
6
3
  liveSessionHolder
7
4
  } from "../../../chunks/chunk-CGSFBWOM.js";
8
5
  import "../../../chunks/chunk-CBDQJMUI.js";
6
+ import {
7
+ readProcessCommandLine
8
+ } from "../../../chunks/chunk-7RJXKN7N.js";
9
+ import "../../../chunks/chunk-ZPJ3BNQB.js";
9
10
  import {
10
11
  Type
11
12
  } from "../../../chunks/chunk-XXGYUYXI.js";
12
- import "../../../chunks/chunk-ZPJ3BNQB.js";
13
13
  import "../../../chunks/chunk-LZQXQOPJ.js";
14
14
 
15
15
  // builtin/extensions/pie-proc/index.ts
@@ -46,11 +46,19 @@ function configDirRoot() {
46
46
  function expandTilde(p) {
47
47
  return p === "~" ? os.homedir() : p.startsWith("~/") ? path.join(os.homedir(), p.slice(2)) : p;
48
48
  }
49
- function readConfig() {
49
+ function configCandidates() {
50
50
  const candidates = [path.join(configDirRoot(), "pie-proc.json")];
51
- if (configDirRoot() !== path.join(os.homedir(), ".pie")) {
51
+ const pinnedRoot = process.env.PIE_PROC_REGISTRY_ROOT;
52
+ if (pinnedRoot) {
53
+ const pinDerived = path.join(path.dirname(path.resolve(expandTilde(pinnedRoot))), "pie-proc.json");
54
+ if (!candidates.includes(pinDerived)) candidates.push(pinDerived);
55
+ } else if (configDirRoot() !== path.join(os.homedir(), ".pie")) {
52
56
  candidates.push(path.join(os.homedir(), ".pie", "pie-proc.json"));
53
57
  }
58
+ return candidates;
59
+ }
60
+ function readConfig() {
61
+ const candidates = configCandidates();
54
62
  for (const file of candidates) {
55
63
  try {
56
64
  const raw = JSON.parse(fs.readFileSync(file, "utf8"));
@@ -67,6 +75,8 @@ function readConfig() {
67
75
  return { ...DEFAULT_CONFIG };
68
76
  }
69
77
  function pieProcDir() {
78
+ const pinned = process.env.PIE_PROC_REGISTRY_ROOT;
79
+ if (pinned) return path.resolve(expandTilde(pinned));
70
80
  return path.join(configDirRoot(), "pie-proc");
71
81
  }
72
82
  function registryFile() {
@@ -207,13 +217,20 @@ function cwdAllowedOrThrow(cwd, allow) {
207
217
  } catch {
208
218
  }
209
219
  }
210
- const file = path.join(configDirRoot(), "pie-proc.json");
220
+ const file = configCandidates()[0];
211
221
  let exists = false;
212
222
  try {
213
223
  exists = fs.existsSync(file);
214
224
  } catch {
215
225
  }
216
- throw new Error(exists ? `cwd "${cwd}" (canonical ${canonical}) is outside the pie-proc allowCwd roots in ${file}; edit that file \u2014 it is re-read on every spawn, so no host restart is needed` : `cwd "${cwd}" is outside the pie-proc allowCwd roots: there is no config yet at ${file}. Create it with {"allowCwd": ["${cwd}"]} \u2014 it is read on every spawn, so no host restart is needed`);
226
+ const effective = configCandidates().find((c) => {
227
+ try {
228
+ return fs.existsSync(c);
229
+ } catch {
230
+ return false;
231
+ }
232
+ }) ?? file;
233
+ throw new Error(exists || effective !== file ? `cwd "${cwd}" (canonical ${canonical}) is outside the pie-proc allowCwd roots in ${effective}; edit that file \u2014 it is re-read on every spawn, so no host restart is needed` : `cwd "${cwd}" is outside the pie-proc allowCwd roots: there is no config yet at ${effective}. Create it with {"allowCwd": ["${cwd}"]} \u2014 it is read on every spawn, so no host restart is needed`);
217
234
  }
218
235
  function safeName(name) {
219
236
  return /^[a-z0-9][a-z0-9-_]{0,47}$/i.test(name);
@@ -570,11 +587,13 @@ function pieProc(ctx) {
570
587
  ...resumeSessionId ? ["--resume-required", "--worker-token", launchToken] : []
571
588
  ] : [...loaderArgs(), entry, "--session-id", sessionId];
572
589
  const inheritedIpcRoot = path.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot()));
590
+ const inheritedRegistryRoot = path.resolve(expandTilde(process.env.PIE_PROC_REGISTRY_ROOT ?? pieProcDir()));
573
591
  const { PIE_DEFAULT_PROVIDER: _p, PIE_DEFAULT_MODEL: _m, PIE_MANAGER_BOOTSTRAP: _b, PIE_PROC_CURATED_NAME: _c, ...inheritedEnv } = process.env;
574
592
  const childEnv = {
575
593
  ...inheritedEnv,
576
594
  PIE_CODING_AGENT_DIR: pieDir,
577
595
  PIE_IPC_CONFIG_DIR: inheritedIpcRoot,
596
+ PIE_PROC_REGISTRY_ROOT: inheritedRegistryRoot,
578
597
  PIE_IPC_DISPLAY_NAME: params.kind === "resident" ? params.name : process.env.PIE_IPC_DISPLAY_NAME
579
598
  };
580
599
  if (params.kind === "oneshot") {
@@ -19920,14 +19920,14 @@ function createBridgeLifecycle(shutdown, opts = {}) {
19920
19920
  const tick = () => {
19921
19921
  if (disposed) return;
19922
19922
  const t = now();
19923
- if (t - lastRequestAt >= idleShutdownMs) {
19924
- fire(`idle ${Math.round((t - lastRequestAt) / 1e3)}s \u2265 ${Math.round(idleShutdownMs / 1e3)}s with no requests; shutting down`);
19925
- return;
19926
- }
19927
19923
  if (supervisor && isSupervisorGone2(supervisor)) {
19928
19924
  fire(`supervisor pid ${supervisor.pid} is gone and no requests since; shutting down`);
19929
19925
  return;
19930
19926
  }
19927
+ if (!supervisor && t - lastRequestAt >= idleShutdownMs) {
19928
+ fire(`idle ${Math.round((t - lastRequestAt) / 1e3)}s \u2265 ${Math.round(idleShutdownMs / 1e3)}s with no requests; shutting down`);
19929
+ return;
19930
+ }
19931
19931
  };
19932
19932
  const timer = setInterval(tick, heartbeatMs);
19933
19933
  timer.unref?.();
@@ -44,7 +44,7 @@ function inputHeaderLine(userInput) {
44
44
  }
45
45
  function composeForwardBody(sessionId, sessionName, userInput, text, mode = "topic-root") {
46
46
  const lines = [];
47
- if (mode !== "topic-reply") lines.push(`**[Pie] \xB7 ${sessionLabel(sessionId, sessionName)}**`);
47
+ lines.push(`**[Pie] \xB7 ${sessionLabel(sessionId, sessionName)}**`);
48
48
  const input = inputHeaderLine(userInput);
49
49
  if (input) lines.push(input);
50
50
  if (lines.length > 0) lines.push("");
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
- import {
3
- readProcessCommandLine
4
- } from "./chunk-7RJXKN7N.js";
5
2
  import {
6
3
  getConfigDir
7
4
  } from "./chunk-CBDQJMUI.js";
5
+ import {
6
+ readProcessCommandLine
7
+ } from "./chunk-7RJXKN7N.js";
8
8
  import "./chunk-LZQXQOPJ.js";
9
9
 
10
10
  // src/commands/manager-cli.ts
@@ -123,6 +123,18 @@ ${CRON_SECTION_MARKER}
123
123
  - \u4F60\u6240\u5728\u7684\u65E0\u503C\u5B88\u5BBF\u4E3B\u53EF\u4EE5\u81EA\u5DF1\u7528 cron_manage\uFF08\u65E0\u4EBA\u503C\u5B88\u4E0A\u81EA\u52A8\u6388\u6743\u5E76\u7559\u75D5\uFF0C\u4E0D\u5FC5\u7B49\u4EBA\u786E\u8BA4\uFF09\u3002\u9002\u5408\u201C\u6BCF\u5929 9 \u70B9\u7ED9\u6211\u7B80\u62A5\u201D\u8FD9\u7C7B\u56FA\u5B9A\u8282\u594F\u7684\u4E8B\uFF1B\u4E0D\u9002\u5408\u62FF\u6765\u4EE3\u66FF worker \u5E72\u6D3B\u3002
124
124
  - \u5BBF\u4E3B\u91CD\u542F\u540E\uFF08\u5C24\u5176\u5D29\u6E83/\u65AD\u7535/OOM \u4E4B\u540E\uFF09\u7684\u7B2C\u4E00\u6B21\u5BF9\u8BDD\uFF0C\u5148\u7528 cron_manage list \u770B\u4E00\u773C\uFF1A\u82E5\u6709 blocked \u7684\u4EFB\u52A1\uFF0C\u8BF4\u660E\u4E0A\u6B21\u6267\u884C\u7ED3\u679C\u4E0D\u786E\u5B9A\uFF0C\u8981\u539F\u6837\u544A\u8BC9\u7528\u6237\u5E76\u7B49\u4ED6\u51B3\u5B9A\u662F\u5426 resume\uFF1B**\u4E0D\u8981\u81EA\u4F5C\u4E3B\u5F20 resume\uFF0C\u4E5F\u4E0D\u8981\u5220\u4E86\u91CD\u5EFA**\uFF08\u91CD\u5EFA\u4F1A\u4E22\u6389\u4E0D\u786E\u5B9A\u6267\u884C\u7684\u8BB0\u5F55\uFF09\u3002
125
125
  `;
126
+ var PANEL_ACTIONS_SECTION_MARKER = "## \u9762\u677F\u52A8\u4F5C\uFF08\u811A\u672C\u6309\u94AE\uFF09";
127
+ var PANEL_ACTIONS_SECTION = `
128
+ ${PANEL_ACTIONS_SECTION_MARKER}
129
+
130
+ - \u7FA4\u53CB\u5728 IM \u91CC\u63D0\u7684**\u53EF\u91CD\u590D\u9700\u6C42**\uFF08\u201C\u4EE5\u540E\u6211\u90FD\u60F3\u4E00\u952E XX\u201D\uFF09\uFF0C\u505A\u6210 /panel \u5361\u7247\u4E0A\u7684\u811A\u672C\u6309\u94AE\uFF1A\u6D3E worker \u5F00\u53D1\u811A\u672C\u5230 ~/.pie/panel-actions/ \u5E76\u81EA\u6D4B\u901A\u8FC7\uFF0C\u7136\u540E\u7528 panel_action add \u6CE8\u518C\u6309\u94AE\uFF0C\u6700\u540E\u544A\u8BC9\u7FA4\u53CB\u6309\u94AE\u4F4D\u7F6E\u3002
131
+ - \u6309\u94AE\u70B9\u51FB = \u76F4\u63A5\u8DD1\u811A\u672C\uFF08\u96F6 LLM\u3001\u786E\u5B9A\u6027\u3001\u79D2\u7EA7\uFF09\u3002LLM \u53EA\u53C2\u4E0E\u4E00\u6B21\u6027\u5F00\u53D1\uFF0C\u4E4B\u540E\u6BCF\u6B21\u4F7F\u7528\u90FD\u662F\u7EAF\u6267\u884C\u3002
132
+ - \u811A\u672C\u5951\u7EA6\uFF1A\u6309\u6269\u5C55\u540D\u9009\u89E3\u91CA\u5668\uFF08.mjs/.js\u2192node\uFF0C.sh\u2192bash\uFF0C.py\u2192python3\uFF09\uFF1B\u4E0A\u4E0B\u6587\u8D70\u73AF\u5883\u53D8\u91CF\uFF08PIE_ACTION_TRIGGER_NAME/OPEN_ID\u3001PIE_ACTION_CHAT_ID\u3001PIE_ACTION_PAYLOAD\uFF1Bworker \u8303\u56F4\u7684\u6309\u94AE\u8FD8\u6709 PIE_ACTION_WORKER \u548C PIE_ACTION_WORKER_DIR\uFF09\uFF1B**stdout \u5C31\u662F\u7ED3\u679C**\uFF08markdown\uFF0C\u81EA\u52A8\u53D1\u56DE IM\uFF09\uFF1Bexit 0 \u6210\u529F\uFF0C\u975E\u96F6\u5931\u8D25\u3002
133
+ - scope \u4E09\u6001\uFF1Amanager\uFF08\u4E3B\u5361\uFF0C\u5168\u5C40\u52A8\u4F5C\uFF09\uFF1Bworker\uFF08\u6BCF\u4E2A worker \u5361\u4E0A\u90FD\u6709\uFF0C\u70B9\u5728\u8C01\u7684\u5361\u5C31\u5E26\u8C01\u7684\u4E0A\u4E0B\u6587\u8DD1\u2014\u2014\u201C\u6784\u5EFA\u672C\u9879\u76EE\u201D\u8FD9\u7C7B\u901A\u7528\u6309\u94AE\uFF09\uFF1Bworker:<\u540D\u5B57>\uFF08\u9489\u6B7B\u67D0\u4E2A worker\uFF09\u3002\u62FF\u4E0D\u51C6 scope \u5C31\u5728\u590D\u8FF0\u786E\u8BA4\u65F6\u5FF5\u51FA\u6765\u8BA9\u7FA4\u53CB\u62CD\u677F\u3002
134
+ - \u6CE8\u518C\u524D\u5FC5\u987B\u5411\u63D0\u9700\u6C42\u7684\u7FA4\u53CB**\u590D\u8FF0\u786E\u8BA4**\uFF08\u6309\u94AE\u540D/\u811A\u672C\u5E72\u4EC0\u4E48/scope\uFF09\uFF0C\u786E\u8BA4\u672C\u8EAB\u7559\u75D5\uFF1B\u6CE8\u518C\u65F6\u586B creatorName/creatorOpenId \u8BB0\u4F4F\u662F\u8C01\u63D0\u7684\u3002
135
+ - \u6CBB\u7406\u9760\u8FFD\u8D23\u4E0D\u9760\u95E8\u7981\uFF1A\u6BCF\u6B21\u89E6\u53D1\u7ED3\u679C\u5361\u81EA\u52A8\u7F72\u540D\u201C\u7531\u8C01\u89E6\u53D1\u201D\uFF0C\u5BA1\u8BA1\u5199\u5728 ~/.pie/panel-actions/audit.jsonl\u3002\u6309\u94AE\u88AB\u6EE5\u7528\u65F6 panel_action remove \u5220\u6389\uFF08\u811A\u672C\u6587\u4EF6\u4FDD\u7559\uFF09\u3002
136
+ - \u6309\u94AE\u4E0D\u662F\u4E07\u80FD\u7684\uFF1A\u9700\u8981\u65B0\u80FD\u529B\u7684\u9700\u6C42\u5148\u6D3E worker \u5F00\u53D1\uFF1B\u4E00\u6B21\u6027\u7684\u6D3B\u76F4\u63A5\u6D3E\u6D3B\uFF0C\u4E0D\u8981\u505A\u6309\u94AE\u3002
137
+ `;
126
138
  var SEED_AGENTS_MD = `# Pie Manager (manager)
127
139
 
128
140
  \u4F60\u662F\u7528\u6237\u7684\u5E38\u9A7B manager pie\uFF1A\u7ED1\u5B9A IM\uFF08\u5E73\u53F0\u65E0\u5173\uFF09\uFF0C\u65E0\u4EBA\u503C\u5B88\uFF0C\u901A\u8FC7 IM \u4E0E\u7528\u6237\u5BF9\u8BDD\u3002
@@ -148,7 +160,7 @@ var SEED_AGENTS_MD = `# Pie Manager (manager)
148
160
  - \u4FE1\u4EFB\u9012\u8FDB\uFF1A\u540C\u7C7B\u52A8\u4F5C\u88AB\u7528\u6237\u9A8C\u6536\u591A\u6B21\u540E\u53EF\u4EE5\u51CF\u5C11\u8BF7\u793A\uFF0C\u76F4\u63A5\u505A\u6389\u5E76\u6C47\u62A5\uFF1B\u7528\u6237\u7EA0\u6B63\u8FC7\u7684\u4E8B\u4E0D\u8981\u91CD\u72AF\u3002
149
161
  - \u5207\u6A21\u578B\uFF1A\u7528\u6237\u8BF4\u67D0\u4F1A\u8BDD\u989D\u5EA6\u8017\u5C3D/\u60F3\u6362\u6A21\u578B\u65F6\uFF0C\u7528 ipc_control_notify\uFF08to=\u4F1A\u8BDD\u540D\uFF0C control=model.set\uFF0C payload={model: "provider/modelId"}\uFF09\uFF1B\u56DE\u6267\u4F1A\u544A\u8BC9\u4F60\u6210\u529F\u6216\u7ED3\u6784\u5316\u7684\u62D2\u7EDD\u539F\u56E0\u3002\u8FD9\u662F\u9065\u63A7\uFF0C\u4E0D\u4F1A\u5728\u5BF9\u65B9\u4F1A\u8BDD\u91CC\u7559\u4E0B\u4EFB\u4F55\u6D88\u606F\u3002
150
162
  - \u6D88\u606F\u6CA1\u6536\u5230 reaction \u65F6\u4E0D\u8981\u8BA9\u5B83\u60AC\u7740\uFF1A\u540C\u4E00\u4EFD\u6B63\u6587\u518D\u53D1\u4E00\u6B21\u5373\u53EF\uFF08\u4E0D\u5E26\u5F15\u7528\uFF09\uFF0C\u6216\u52A0 \`\u4F1A\u8BDD\u540D:\` \u6307\u5B9A\u76EE\u6807\u3002
151
- ${CRON_SECTION}`;
163
+ ${CRON_SECTION}${PANEL_ACTIONS_SECTION}`;
152
164
  function workspaceDir() {
153
165
  const dir = path2.join(os.homedir(), ".pie", "manager");
154
166
  migrateLegacyWorkspace(dir);
@@ -311,6 +323,7 @@ function seedWorkspace(dir) {
311
323
  return;
312
324
  }
313
325
  if (!current.includes(CRON_SECTION_MARKER)) fs2.appendFileSync(agents, CRON_SECTION);
326
+ if (!current.includes(PANEL_ACTIONS_SECTION_MARKER)) fs2.appendFileSync(agents, PANEL_ACTIONS_SECTION);
314
327
  const v1Marker = "\u4F60\u662F\u7528\u6237\u5728 IM \u4E0A\u7684\u552F\u4E00\u8054\u7EDC\u70B9\u3002\u9ED8\u8BA4\u6D3E\u6D3B";
315
328
  const v2Marker = "\u4F60\u662F\u88AB\u52A8\u8D77\u6B65\u7684";
316
329
  if (current.includes(v1Marker) && !current.includes(v2Marker)) {
@@ -894,7 +907,7 @@ function withStartLock(dir, fn) {
894
907
  });
895
908
  }
896
909
  async function runUpgradeCommand(args) {
897
- const { upgradePaths, performUpgrade, cliEffects, parseTarget } = await import("./manager-upgrade-LSTOHBUV.js");
910
+ const { upgradePaths, performUpgrade, cliEffects, parseTarget } = await import("./manager-upgrade-CTU3ISCW.js");
898
911
  const targetIdx = args.indexOf("--target");
899
912
  if (targetIdx >= 0 && typeof args[targetIdx + 1] !== "string") {
900
913
  console.error('--target expects "latest" or an x.y.z version (no value given)');
@@ -6,8 +6,8 @@ import "./chunk-BLDI2GRF.js";
6
6
  import "./chunk-Y3I2UV5Y.js";
7
7
  import "./chunk-5KI4Y4LA.js";
8
8
  import "./chunk-3W3SXVPB.js";
9
- import "./chunk-XXGYUYXI.js";
10
9
  import "./chunk-F7EBZTZO.js";
10
+ import "./chunk-XXGYUYXI.js";
11
11
  import "./chunk-LZQXQOPJ.js";
12
12
  export {
13
13
  understandReadFile