nolo-cli 0.113.0-alpha.1 → 0.115.0-alpha.1

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 (53) hide show
  1. package/{_executeModel-7CUOUYCK.js → _executeModel-RQXGTKAT.js} +11 -11
  2. package/{agentDeleteCommand-XWLL2PMB.js → agentDeleteCommand-S4GW4PKE.js} +2 -2
  3. package/{agentEmailCommands-STTPGUSF.js → agentEmailCommands-M26R6BO4.js} +11 -11
  4. package/{agentListCommands-MQVMQVOE.js → agentListCommands-3YRR3FOM.js} +2 -2
  5. package/{agentMachineCommands-U6A4SUS4.js → agentMachineCommands-ZFEQOZG3.js} +3 -3
  6. package/{agentRecordCommands-IXNQ4QO6.js → agentRecordCommands-LZ4G5INZ.js} +11 -11
  7. package/{agentRunCommand-EL6GF4K2.js → agentRunCommand-GOP4T77I.js} +11 -11
  8. package/{agentRuntimeLocal-73R544NQ.js → agentRuntimeLocal-FXCNGFFT.js} +2 -2
  9. package/{agentSlice-5QKQ27CG.js → agentSlice-PKMID4S2.js} +1 -1
  10. package/{appDeleteCommands-WOSWEWOC.js → appDeleteCommands-2LIWMMJP.js} +2 -2
  11. package/{appDeployCommands-KSOWMHCG.js → appDeployCommands-WOTKY2LM.js} +2 -2
  12. package/{appDeployStatusCommands-JCMJMYK4.js → appDeployStatusCommands-6QQWIFCK.js} +2 -2
  13. package/{appGetCommands-7LIJCRZ3.js → appGetCommands-Z4RHYUKS.js} +2 -2
  14. package/{appListCommands-T4JTSWDD.js → appListCommands-SOBFAS4W.js} +2 -2
  15. package/{chatQueueReduxAdapter-CIDX55K5.js → chatQueueReduxAdapter-KMULSV7M.js} +2 -2
  16. package/{chunk-WFH72XIR.js → chunk-22CGS5BQ.js} +2 -2
  17. package/{chunk-CFEFBUXO.js → chunk-2MMIOYAF.js} +8 -8
  18. package/{chunk-ILEKGDX5.js → chunk-5F3OZ7L2.js} +11 -5
  19. package/{chunk-2ERGVBM6.js → chunk-6P47Q5OH.js} +2 -2
  20. package/{chunk-ZNBV3AKY.js → chunk-ANFQ4KPL.js} +2 -2
  21. package/{chunk-FSABYU7L.js → chunk-DE7R7ZAP.js} +3 -3
  22. package/{chunk-UJEJG66W.js → chunk-KEQNY22P.js} +92 -17
  23. package/{chunk-XTTNBYM3.js → chunk-LZLZNZ4H.js} +1 -1
  24. package/{chunk-PJAZHZG5.js → chunk-NGEWETHC.js} +3 -3
  25. package/{chunk-GTLZXAWO.js → chunk-Q4U2WKQY.js} +8 -8
  26. package/{chunk-L322LGOM.js → chunk-RB3EETRZ.js} +5 -1
  27. package/{chunk-FORUBDQQ.js → chunk-SBDFSHSS.js} +7 -0
  28. package/{chunk-FMFAK4YB.js → chunk-SQCF7OWL.js} +1 -1
  29. package/{chunk-PIJHSZZM.js → chunk-SWM3OJR7.js} +13 -4
  30. package/{chunk-POV53AWS.js → chunk-TUBKLG3S.js} +1 -1
  31. package/{chunk-QT43HLXZ.js → chunk-X767IQBD.js} +5 -5
  32. package/{contentThunks-OMUPXTLL.js → contentThunks-EHSBUA4D.js} +3 -3
  33. package/{createAgentAutomationAction-4AJ7ZJDW.js → createAgentAutomationAction-G2MK4LVL.js} +3 -3
  34. package/{createDialogAction-76FLQXOB.js → createDialogAction-JH7ZCV5Z.js} +4 -4
  35. package/{createPageAction-MULKS35T.js → createPageAction-SRPNANEQ.js} +3 -3
  36. package/{dialogCommands-2PEE34TR.js → dialogCommands-JCDHSPHY.js} +2 -2
  37. package/{dialogSlice-V62ONOCY.js → dialogSlice-YUPGRKPA.js} +2 -2
  38. package/{docCreateCommands-PZHUUFTX.js → docCreateCommands-HDV5VRAK.js} +2 -2
  39. package/{docDeleteCommands-CEWIA4CQ.js → docDeleteCommands-77BE7WA3.js} +2 -2
  40. package/{docReadCommands-4TVEX6ZD.js → docReadCommands-4Z7DUAHQ.js} +2 -2
  41. package/{docStore-AHFTDQ6D.js → docStore-F3LR3M6Z.js} +1 -1
  42. package/{docUpdateCommands-TW3PHXLY.js → docUpdateCommands-L45KOOSF.js} +2 -2
  43. package/{handleSendMessageAction-VTB6HOV2.js → handleSendMessageAction-GCKW2H7N.js} +2 -2
  44. package/index.js +41 -41
  45. package/{machineCommands-ZHNU3X4I.js → machineCommands-N3XF6SYH.js} +11 -11
  46. package/{machineWsRunDispatch-7EB4E3MD.js → machineWsRunDispatch-UJX7MT2Z.js} +11 -11
  47. package/package.json +1 -1
  48. package/{readlineWorkspace-4P62FKBU.js → readlineWorkspace-FFZEUHR4.js} +14 -11
  49. package/{runAgentClientLoop-MVYHOKMV.js → runAgentClientLoop-UGNX7QRL.js} +9 -9
  50. package/{spaceCommands-7Y5AUMLD.js → spaceCommands-TCEN2CRN.js} +2 -2
  51. package/{streamAgentChatTurn-2PK6NXKQ.js → streamAgentChatTurn-DKVJJ2BL.js} +10 -10
  52. package/{tools-FYMWUIED.js → tools-IHD7PL23.js} +6 -6
  53. package/{updateDialogTitleAction-FKXIYYIO.js → updateDialogTitleAction-QKUFUNTO.js} +3 -3
@@ -29,8 +29,9 @@ import {
29
29
  resolveFileWriteGateEnabled,
30
30
  resolveLocalUserId,
31
31
  t,
32
- toolLabel
33
- } from "./chunk-ILEKGDX5.js";
32
+ toolLabel,
33
+ toolLabelVariants
34
+ } from "./chunk-5F3OZ7L2.js";
34
35
  import {
35
36
  createRunActivityTracker,
36
37
  popSingleQueueMessage,
@@ -64,7 +65,7 @@ import {
64
65
  } from "./chunk-LTRXGFMS.js";
65
66
  import {
66
67
  formatAgentListCard
67
- } from "./chunk-CFEFBUXO.js";
68
+ } from "./chunk-2MMIOYAF.js";
68
69
  import {
69
70
  isTransientFetchError
70
71
  } from "./chunk-5UTFL4QJ.js";
@@ -88,11 +89,11 @@ import {
88
89
  chooseMemoryOwners,
89
90
  loadMemoryCandidatesFromDb,
90
91
  resolveAgentMemoryPolicy
91
- } from "./chunk-ZNBV3AKY.js";
92
+ } from "./chunk-ANFQ4KPL.js";
92
93
  import {
93
94
  API_REPORTED_COST_MULTIPLIER,
94
95
  parseUiAskChoiceContent
95
- } from "./chunk-GTLZXAWO.js";
96
+ } from "./chunk-Q4U2WKQY.js";
96
97
  import {
97
98
  isOAuthApiKeyRef
98
99
  } from "./chunk-YYLHWIW6.js";
@@ -115,7 +116,7 @@ import {
115
116
  LOCAL_AGENT_CONFIG_MISSING_CODE,
116
117
  LOCAL_TURN_ABORTED_CODE,
117
118
  readActionGate
118
- } from "./chunk-L322LGOM.js";
119
+ } from "./chunk-RB3EETRZ.js";
119
120
  import {
120
121
  resolveAgentRuntimeConfigFromRecord
121
122
  } from "./chunk-4MK3I7Y4.js";
@@ -8222,12 +8223,79 @@ function normalizeListLine(line) {
8222
8223
  }
8223
8224
  return line;
8224
8225
  }
8226
+ var TOOL_TREE_HEADER_RE = /^•\s+(.+?)\s+\((\d+)\)$/;
8227
+ var TOOL_TREE_LEAF_RE = /^([├└]──\s+)(.*?)\s{2}(✓|✗|!)(?:\s+(.*))?$/;
8228
+ var TOOL_SINGLE_RE = /^▸\s+(.+?)(?:\s+·\s+(.*?))?(?:\s{2}(✓|✗|!)(?:\s+(.*))?)$/;
8229
+ function plainToolLine(line) {
8230
+ return stripAnsi2(line);
8231
+ }
8232
+ var TOOL_TREE_GROUP_LABELS = new Set(
8233
+ ["execShell", "readFile", "fetchWebpage", "exa_search"].flatMap(toolLabelVariants)
8234
+ );
8235
+ function isKnownToolGroupLabel(label) {
8236
+ return TOOL_TREE_GROUP_LABELS.has(label);
8237
+ }
8238
+ function toolTreeHeaderMatch(line) {
8239
+ const match = plainToolLine(line).match(TOOL_TREE_HEADER_RE);
8240
+ return match && isKnownToolGroupLabel(match[1]) ? match : null;
8241
+ }
8242
+ function isToolTreeHeaderLine(line) {
8243
+ return toolTreeHeaderMatch(line) !== null;
8244
+ }
8245
+ function isToolTreeLeafLine(line) {
8246
+ return TOOL_TREE_LEAF_RE.test(plainToolLine(line));
8247
+ }
8248
+ function isToolSingleLine(line) {
8249
+ return TOOL_SINGLE_RE.test(plainToolLine(line));
8250
+ }
8251
+ function isToolGroupBoundary(cur, next) {
8252
+ return isToolTreeLeafLine(cur) && isToolTreeHeaderLine(next);
8253
+ }
8254
+ function statusColorSeq(marker, brightness) {
8255
+ if (marker === "\u2713") return colorSeq("success", brightness);
8256
+ if (marker === "\u2717") return colorSeq("danger", brightness);
8257
+ return colorSeq("warning", brightness);
8258
+ }
8259
+ function styleTuiToolLine(line, brightness) {
8260
+ const plain = plainToolLine(line);
8261
+ const chrome = colorSeq("chrome", brightness);
8262
+ const muted = colorSeq("muted", brightness);
8263
+ const header = toolTreeHeaderMatch(plain);
8264
+ if (header) {
8265
+ return `${chrome}\u2022${STYLE.reset} ${STYLE.bold}${muted}${header[1]}${STYLE.reset} ${chrome}${STYLE.dim}(${header[2]})${STYLE.reset}`;
8266
+ }
8267
+ const leaf = plain.match(TOOL_TREE_LEAF_RE);
8268
+ if (leaf) {
8269
+ const [, connector, detail, marker, statusDetail] = leaf;
8270
+ let rendered = `${chrome}${connector}${STYLE.reset}${chrome}${detail}${STYLE.reset}`;
8271
+ rendered += ` ${statusColorSeq(marker, brightness)}${marker}${STYLE.reset}`;
8272
+ if (statusDetail) {
8273
+ const metaSeq = marker === "\u2713" ? chrome : statusColorSeq(marker, brightness);
8274
+ rendered += ` ${metaSeq}${STYLE.dim}${statusDetail}${STYLE.reset}`;
8275
+ }
8276
+ return rendered;
8277
+ }
8278
+ const single = plain.match(TOOL_SINGLE_RE);
8279
+ if (single) {
8280
+ const [, label, detail, marker, statusDetail] = single;
8281
+ let rendered = `${chrome}\u25B8${STYLE.reset} ${STYLE.bold}${muted}${label}${STYLE.reset}`;
8282
+ if (detail) rendered += ` ${chrome}\xB7 ${detail}${STYLE.reset}`;
8283
+ rendered += ` ${statusColorSeq(marker, brightness)}${marker}${STYLE.reset}`;
8284
+ if (statusDetail) {
8285
+ const metaSeq = marker === "\u2713" ? chrome : statusColorSeq(marker, brightness);
8286
+ rendered += ` ${metaSeq}${STYLE.dim}${statusDetail}${STYLE.reset}`;
8287
+ }
8288
+ return rendered;
8289
+ }
8290
+ return null;
8291
+ }
8225
8292
  function isPolishListLikeLine(line) {
8226
- return LIST_LIKE_RE_FOR_GUARD.test(normalizeListLine(line));
8293
+ return LIST_LIKE_RE_FOR_GUARD.test(normalizeListLine(plainToolLine(line)));
8227
8294
  }
8228
- var LIST_LIKE_RE_FOR_GUARD = /^\s*(?:•|☐|☑|\d+\.)\s|^\s*[\u2460-\u2473]|^\s*[├└]──\s/;
8295
+ var LIST_LIKE_RE_FOR_GUARD = /^\s*(?:•|☐|☑|\d+\.)\s|^\s*[\u2460-\u2473]|^\s*[├└]──\s|^\s*▸\s/;
8229
8296
  function polishBreathInsertsBlankBetween(cur, next) {
8230
8297
  if (cur === "" || next === "") return false;
8298
+ if (isToolGroupBoundary(cur, next)) return true;
8231
8299
  return isPolishListLikeLine(cur) !== isPolishListLikeLine(next);
8232
8300
  }
8233
8301
  function convertMarkdownTablesForTerminal(text) {
@@ -8297,16 +8365,14 @@ function polishAssistantStructure(text, options = {}) {
8297
8365
  return line;
8298
8366
  });
8299
8367
  const afterHeading = maskedLines.join("\n").replace(/([^\n])\n(#{1,3} )/g, "$1\n\n$2").replace(/^(#{1,3} .+)\n(?!\n)/gm, "$1\n\n").replace(/\n{4,}/g, "\n\n\n");
8300
- const LIST_LIKE = /^\s*(?:•|☐|☑|\d+\.)\s|^\s*[\u2460-\u2473]|^\s*[├└]──\s/;
8301
8368
  const headingLines = afterHeading.split("\n");
8302
8369
  const breathed = [];
8303
8370
  for (let i = 0; i < headingLines.length; i++) {
8304
8371
  breathed.push(headingLines[i]);
8305
8372
  const cur = headingLines[i];
8306
8373
  const next = headingLines[i + 1];
8307
- if (cur === "" || next === void 0 || next === "") continue;
8308
- if (LIST_LIKE.test(cur) === LIST_LIKE.test(next)) continue;
8309
- breathed.push("");
8374
+ if (next === void 0) continue;
8375
+ if (polishBreathInsertsBlankBetween(cur, next)) breathed.push("");
8310
8376
  }
8311
8377
  const polishedMasked = breathed.join("\n");
8312
8378
  const polished = polishedMasked.replace(
@@ -8316,6 +8382,8 @@ function polishAssistantStructure(text, options = {}) {
8316
8382
  return options.trimEdges === false ? polished : polished.trim();
8317
8383
  }
8318
8384
  function styleRichMarkdownLine(line, brightness) {
8385
+ const toolLine = styleTuiToolLine(line, brightness);
8386
+ if (toolLine !== null) return toolLine;
8319
8387
  const heading = line.match(/^(#{1,3})\s+(.+)$/);
8320
8388
  if (heading) {
8321
8389
  const level = heading[1].length;
@@ -8467,16 +8535,23 @@ function emitFormattedAssistantBlock(write, text, trailingNewline = false) {
8467
8535
  }
8468
8536
  function classifyStreamLine(line) {
8469
8537
  if (line === "") return "blank";
8470
- if (TASK_LIST_RE.test(line) || UNORDERED_LIST_RE.test(line) || ORDERED_LIST_RE.test(line) || /^\s*(?:•|☐|☑)\s/.test(line) || /^\s*[\u2460-\u2473]/.test(line)) {
8538
+ const plain = plainToolLine(line);
8539
+ if (isToolTreeHeaderLine(plain)) return "tool-header";
8540
+ if (isToolTreeLeafLine(plain)) return "tool-leaf";
8541
+ if (isToolSingleLine(plain)) return "tool";
8542
+ if (TASK_LIST_RE.test(plain) || UNORDERED_LIST_RE.test(plain) || ORDERED_LIST_RE.test(plain) || /^\s*(?:•|☐|☑)\s/.test(plain) || /^\s*[\u2460-\u2473]/.test(plain)) {
8471
8543
  return "list";
8472
8544
  }
8545
+ if (isPolishListLikeLine(plain)) return "list";
8473
8546
  return "prose";
8474
8547
  }
8548
+ function isStreamListLike(kind) {
8549
+ return kind === "list" || kind === "tool-header" || kind === "tool-leaf" || kind === "tool";
8550
+ }
8475
8551
  function needsListProseBreath(prev, next) {
8476
8552
  if (prev === null || prev === "blank" || next === "blank") return false;
8477
- const prevList = prev === "list";
8478
- const nextList = next === "list";
8479
- return prevList !== nextList;
8553
+ if (prev === "tool-leaf" && next === "tool-header") return true;
8554
+ return isStreamListLike(prev) !== isStreamListLike(next);
8480
8555
  }
8481
8556
  function createRenderAwareStreamWriter(args) {
8482
8557
  const brightness = resolveTuiBrightness();
@@ -10534,7 +10609,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
10534
10609
  // packages/cli/client/agentRun.ts
10535
10610
  import { ulid as ulid2 } from "ulid";
10536
10611
  async function loadRunLocalAgentTurn() {
10537
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-73R544NQ.js");
10612
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-FXCNGFFT.js");
10538
10613
  return runLocalAgentTurn;
10539
10614
  }
10540
10615
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-ILEKGDX5.js";
3
+ } from "./chunk-5F3OZ7L2.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-LS2ZANRJ.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-ILEKGDX5.js";
4
+ } from "./chunk-5F3OZ7L2.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-CFEFBUXO.js";
7
+ } from "./chunk-2MMIOYAF.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-L322LGOM.js";
10
+ } from "./chunk-RB3EETRZ.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
13
  } from "./chunk-HCT7U36O.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AGGIDPCZ.js";
15
15
  import {
16
16
  runLlm
17
- } from "./chunk-FSABYU7L.js";
17
+ } from "./chunk-DE7R7ZAP.js";
18
18
  import {
19
19
  cleanupCliSessionForDialog
20
20
  } from "./chunk-BFDFRLLQ.js";
@@ -19998,7 +19998,7 @@ var messageSlice = createSliceWithThunks({
19998
19998
  runtimeOptions: args.runtimeOptions
19999
19999
  });
20000
20000
  if (agentKeyToUse) {
20001
- const { streamAgentChatTurn } = await import("./agentSlice-5QKQ27CG.js");
20001
+ const { streamAgentChatTurn } = await import("./agentSlice-PKMID4S2.js");
20002
20002
  await dispatch(
20003
20003
  streamAgentChatTurn({
20004
20004
  agentKey: agentKeyToUse,
@@ -21134,7 +21134,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
21134
21134
  }
21135
21135
  if (isCurrentDialog) {
21136
21136
  await thunkApi.dispatch(resetMsgs());
21137
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-V62ONOCY.js");
21137
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-YUPGRKPA.js");
21138
21138
  dispatch(clearPendingAttachments2());
21139
21139
  }
21140
21140
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -21142,15 +21142,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
21142
21142
 
21143
21143
  // packages/chat/dialog/dialogSlice.ts
21144
21144
  var runCreateDialogAction = async (args, thunkApi) => {
21145
- const { createDialogAction } = await import("./createDialogAction-76FLQXOB.js");
21145
+ const { createDialogAction } = await import("./createDialogAction-JH7ZCV5Z.js");
21146
21146
  return createDialogAction(args, thunkApi);
21147
21147
  };
21148
21148
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
21149
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-4AJ7ZJDW.js");
21149
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-G2MK4LVL.js");
21150
21150
  return createAgentAutomationAction(args, thunkApi);
21151
21151
  };
21152
21152
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
21153
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-FKXIYYIO.js");
21153
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-QKUFUNTO.js");
21154
21154
  return updateDialogTitleAction(args, thunkApi);
21155
21155
  };
21156
21156
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -21174,7 +21174,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
21174
21174
  return setDialogExtraReferencesAction(args, thunkApi);
21175
21175
  };
21176
21176
  var runHandleSendMessageAction = async (args, thunkApi) => {
21177
- const { handleSendMessageAction } = await import("./handleSendMessageAction-VTB6HOV2.js");
21177
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-GCKW2H7N.js");
21178
21178
  return handleSendMessageAction(args, thunkApi);
21179
21179
  };
21180
21180
  function clearDialogState() {
@@ -21187,7 +21187,7 @@ var createPageAndAddReference = createAsyncThunk(
21187
21187
  async (payload, { dispatch, getState, rejectWithValue }) => {
21188
21188
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
21189
21189
  try {
21190
- const { createDocState } = await import("./docStore-AHFTDQ6D.js");
21190
+ const { createDocState } = await import("./docStore-F3LR3M6Z.js");
21191
21191
  const pageKey = await createDocState(
21192
21192
  { slateData, title },
21193
21193
  { dispatch, getState }
@@ -38,6 +38,7 @@ import {
38
38
  finalizeAccumulatedToolCalls
39
39
  } from "./chunk-N7J63Q6C.js";
40
40
  import {
41
+ DELETE_SAFETY_RED_LINE,
41
42
  TOOL_GUIDED_SECTION_ORDER,
42
43
  buildIdentityBlock,
43
44
  buildRuntimeGuidanceBlocks,
@@ -49,7 +50,7 @@ import {
49
50
  requiresBareImageUrl,
50
51
  resolveToolGuidedSections,
51
52
  toBareImageUrlMessages
52
- } from "./chunk-FORUBDQQ.js";
53
+ } from "./chunk-SBDFSHSS.js";
53
54
  import {
54
55
  convertMessagesToResponsesInput,
55
56
  extractReasoningFromResponseOutput,
@@ -13603,6 +13604,9 @@ async function runLocalAgentTurn(input) {
13603
13604
  input.contextBlockScopes
13604
13605
  );
13605
13606
  const mergedContextBlockScopes = [
13607
+ // 删除安全红线:系统层最高优先级约束,位于所有块之前(含身份信息块),
13608
+ // owner 要求常驻「根本提示词」的最顶部(2026-09-26 批量误删事故)。
13609
+ { content: DELETE_SAFETY_RED_LINE, cacheScope: "session" },
13606
13610
  { content: identityBlock, cacheScope: "session" },
13607
13611
  ...guidanceScopes,
13608
13612
  ...callerScopes
@@ -37,6 +37,12 @@ var buildIdentityBlock = (input) => {
37
37
  return lines.join("\n");
38
38
  };
39
39
 
40
+ // packages/agent-runtime/deleteSafety.ts
41
+ var DELETE_SAFETY_RED_LINE = [
42
+ "\u3010\u5220\u9664\u5B89\u5168\u7EA2\u7EBF \xB7 \u6700\u9AD8\u4F18\u5148\u7EA7\u3011",
43
+ "\u4EFB\u4F55\u5220\u9664\u64CD\u4F5C\uFF08\u6587\u4EF6\u3001\u6570\u636E\u3001\u5E73\u53F0/\u8FDC\u7AEF\u5185\u5BB9\u3001\u6D88\u606F\u7B49\uFF0C\u65E0\u8BBA\u5355\u6761\u6216\u6279\u91CF\uFF09\u6267\u884C\u524D\uFF0C\u5FC5\u987B\u5148\u5411\u7528\u6237\u5448\u73B0\u5B8C\u6574\u5F85\u5220\u6E05\u5355\uFF08\u540D\u79F0/\u8DEF\u5F84/\u6807\u9898\u7B49\u53EF\u8BC6\u522B\u4FE1\u606F\uFF0C\u4E0D\u5F97\u622A\u65AD\uFF09\uFF0C\u5E76\u83B7\u5F97\u7528\u6237\u660E\u786E\u786E\u8BA4\u540E\u624D\u53EF\u6267\u884C\uFF1B\u4E25\u7981\u7528\u6A21\u7CCA\u5B9A\u4F4D\uFF08\u5982\u201C\u5217\u8868\u6700\u4E0B\u65B9\u201D\uFF09\u6307\u4EE3\u5220\u9664\u76EE\u6807\uFF0C\u4E25\u7981\u5148\u5220\u540E\u62A5\u3002\uFF082026-09-26 \u6279\u91CF\u8BEF\u5220\u4E8B\u6545\u6559\u8BAD\uFF09"
44
+ ].join("\n");
45
+
40
46
  // packages/agent-runtime/contextLayerContract.ts
41
47
  var buildContextLayerContractBlock = (options = {}) => {
42
48
  const lines = [
@@ -590,6 +596,7 @@ var normalizeChatCompletionsBodyForProvider = ({
590
596
 
591
597
  export {
592
598
  buildIdentityBlock,
599
+ DELETE_SAFETY_RED_LINE,
593
600
  buildRuntimeGuidanceBlocks,
594
601
  TOOL_GUIDED_SECTION_ORDER,
595
602
  resolveToolGuidedSections,
@@ -9,7 +9,7 @@ import {
9
9
  initReactI18next,
10
10
  instance,
11
11
  toast
12
- } from "./chunk-GTLZXAWO.js";
12
+ } from "./chunk-Q4U2WKQY.js";
13
13
  import {
14
14
  require_date_fns
15
15
  } from "./chunk-M76ECQRD.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  clipMultilineText,
9
9
  fetchAndSerializeTable
10
- } from "./chunk-CFEFBUXO.js";
10
+ } from "./chunk-2MMIOYAF.js";
11
11
  import {
12
12
  isGatewayHttpStatus
13
13
  } from "./chunk-NF64D32W.js";
@@ -28,13 +28,13 @@ import {
28
28
  } from "./chunk-MEYIRKDN.js";
29
29
  import {
30
30
  fetchAndCacheMessages
31
- } from "./chunk-GTLZXAWO.js";
31
+ } from "./chunk-Q4U2WKQY.js";
32
32
  import {
33
33
  shouldUseServerProxy
34
34
  } from "./chunk-YYLHWIW6.js";
35
35
  import {
36
36
  fetchServerSyncedCredential
37
- } from "./chunk-FSABYU7L.js";
37
+ } from "./chunk-DE7R7ZAP.js";
38
38
  import {
39
39
  buildSkillGuidancePromptBlock,
40
40
  extractRuntimePageCapabilities,
@@ -42,13 +42,14 @@ import {
42
42
  resolveSkillGraphFromRoots
43
43
  } from "./chunk-LVIFM7VW.js";
44
44
  import {
45
+ DELETE_SAFETY_RED_LINE,
45
46
  buildIdentityBlock,
46
47
  buildRuntimeGuidanceBlocks,
47
48
  compileContextLayers,
48
49
  detectDispatchIntentFromMessages,
49
50
  normalizeChatCompletionsBodyForProvider,
50
51
  resolveToolGuidedSections
51
- } from "./chunk-FORUBDQQ.js";
52
+ } from "./chunk-SBDFSHSS.js";
52
53
  import {
53
54
  convertMessagesToResponsesInput,
54
55
  getUsageRequestOptions,
@@ -648,6 +649,14 @@ ${contexts.userGlobalPrompt.trim()} ` : "";
648
649
  const dialogSummarySection = contexts.dialogSummary?.trim() ? `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
649
650
  ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
650
651
  return compileContextLayers([
652
+ // 删除安全红线:系统层最高优先级约束,位于所有层之前(含身份信息),
653
+ // owner 要求常驻「根本提示词」的最顶部(2026-09-26 批量误删事故)。
654
+ {
655
+ id: "delete-safety-red-line",
656
+ owner: "platform",
657
+ cacheScope: "static",
658
+ content: DELETE_SAFETY_RED_LINE
659
+ },
651
660
  { id: "identity", owner: "platform", cacheScope: "session", content: identitySection },
652
661
  { id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
653
662
  { id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-PIJHSZZM.js";
4
+ } from "./chunk-SWM3OJR7.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-2ERGVBM6.js";
8
+ } from "./chunk-6P47Q5OH.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-PIJHSZZM.js";
15
+ } from "./chunk-SWM3OJR7.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,7 +23,7 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-CFEFBUXO.js";
26
+ } from "./chunk-2MMIOYAF.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
@@ -35,10 +35,10 @@ import {
35
35
  messageStreamEnd,
36
36
  messageStreaming,
37
37
  updateToolMessage
38
- } from "./chunk-GTLZXAWO.js";
38
+ } from "./chunk-Q4U2WKQY.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-FSABYU7L.js";
41
+ } from "./chunk-DE7R7ZAP.js";
42
42
  import {
43
43
  addActiveController,
44
44
  removeActiveController,
@@ -7,14 +7,14 @@ import {
7
7
  updateContentPinned,
8
8
  updateContentTitle,
9
9
  uploadAndAddFileToSpace
10
- } from "./chunk-FMFAK4YB.js";
10
+ } from "./chunk-SQCF7OWL.js";
11
11
  import "./chunk-ZJ7UHBJS.js";
12
- import "./chunk-GTLZXAWO.js";
12
+ import "./chunk-Q4U2WKQY.js";
13
13
  import "./chunk-MC4XLIJ7.js";
14
14
  import "./chunk-3BMYXEUW.js";
15
15
  import "./chunk-YYLHWIW6.js";
16
16
  import "./chunk-AGGIDPCZ.js";
17
- import "./chunk-FSABYU7L.js";
17
+ import "./chunk-DE7R7ZAP.js";
18
18
  import "./chunk-BFDFRLLQ.js";
19
19
  import "./chunk-5RGU3J7P.js";
20
20
  import "./chunk-6YTOJY35.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-FMFAK4YB.js";
3
+ } from "./chunk-SQCF7OWL.js";
4
4
  import "./chunk-ZJ7UHBJS.js";
5
- import "./chunk-GTLZXAWO.js";
5
+ import "./chunk-Q4U2WKQY.js";
6
6
  import "./chunk-MC4XLIJ7.js";
7
7
  import "./chunk-3BMYXEUW.js";
8
8
  import "./chunk-YYLHWIW6.js";
9
9
  import "./chunk-AGGIDPCZ.js";
10
- import "./chunk-FSABYU7L.js";
10
+ import "./chunk-DE7R7ZAP.js";
11
11
  import "./chunk-BFDFRLLQ.js";
12
12
  import "./chunk-5RGU3J7P.js";
13
13
  import "./chunk-6YTOJY35.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  createDialogAction,
3
3
  isLocalOwnerDialogAgents
4
- } from "./chunk-ZNBV3AKY.js";
5
- import "./chunk-FMFAK4YB.js";
4
+ } from "./chunk-ANFQ4KPL.js";
5
+ import "./chunk-SQCF7OWL.js";
6
6
  import "./chunk-ZJ7UHBJS.js";
7
- import "./chunk-GTLZXAWO.js";
7
+ import "./chunk-Q4U2WKQY.js";
8
8
  import "./chunk-MC4XLIJ7.js";
9
9
  import "./chunk-3BMYXEUW.js";
10
10
  import "./chunk-YYLHWIW6.js";
11
11
  import "./chunk-AGGIDPCZ.js";
12
- import "./chunk-FSABYU7L.js";
12
+ import "./chunk-DE7R7ZAP.js";
13
13
  import "./chunk-BFDFRLLQ.js";
14
14
  import "./chunk-5RGU3J7P.js";
15
15
  import "./chunk-6YTOJY35.js";
@@ -14,16 +14,16 @@ import {
14
14
  import {
15
15
  addContentToSpace,
16
16
  client_default
17
- } from "./chunk-FMFAK4YB.js";
17
+ } from "./chunk-SQCF7OWL.js";
18
18
  import {
19
19
  getCurrentSpaceId
20
20
  } from "./chunk-ZJ7UHBJS.js";
21
- import "./chunk-GTLZXAWO.js";
21
+ import "./chunk-Q4U2WKQY.js";
22
22
  import "./chunk-MC4XLIJ7.js";
23
23
  import "./chunk-3BMYXEUW.js";
24
24
  import "./chunk-YYLHWIW6.js";
25
25
  import "./chunk-AGGIDPCZ.js";
26
- import "./chunk-FSABYU7L.js";
26
+ import "./chunk-DE7R7ZAP.js";
27
27
  import "./chunk-BFDFRLLQ.js";
28
28
  import "./chunk-5RGU3J7P.js";
29
29
  import "./chunk-6YTOJY35.js";
@@ -24,7 +24,7 @@ import "./chunk-KQHGZWSV.js";
24
24
  import "./chunk-3BMYXEUW.js";
25
25
  import "./chunk-URMS4XY2.js";
26
26
  import "./chunk-GLKOYSRU.js";
27
- import "./chunk-L322LGOM.js";
27
+ import "./chunk-RB3EETRZ.js";
28
28
  import "./chunk-H4AHY5BU.js";
29
29
  import "./chunk-FV3JEYR3.js";
30
30
  import "./chunk-GMZLP5DV.js";
@@ -33,7 +33,7 @@ import "./chunk-4MK3I7Y4.js";
33
33
  import "./chunk-CQ3WA2NE.js";
34
34
  import "./chunk-5ZUL4CUO.js";
35
35
  import "./chunk-N7J63Q6C.js";
36
- import "./chunk-FORUBDQQ.js";
36
+ import "./chunk-SBDFSHSS.js";
37
37
  import "./chunk-PUOC4YRO.js";
38
38
  import "./chunk-HCT7U36O.js";
39
39
  import "./chunk-FDTR4QJ6.js";
@@ -20,12 +20,12 @@ import {
20
20
  switchDialogAgent,
21
21
  updateDialogTitle,
22
22
  updateTokens
23
- } from "./chunk-GTLZXAWO.js";
23
+ } from "./chunk-Q4U2WKQY.js";
24
24
  import "./chunk-MC4XLIJ7.js";
25
25
  import "./chunk-3BMYXEUW.js";
26
26
  import "./chunk-YYLHWIW6.js";
27
27
  import "./chunk-AGGIDPCZ.js";
28
- import "./chunk-FSABYU7L.js";
28
+ import "./chunk-DE7R7ZAP.js";
29
29
  import "./chunk-BFDFRLLQ.js";
30
30
  import {
31
31
  getActiveDialogAgentId
@@ -28,7 +28,7 @@ import "./chunk-SV5IJK6K.js";
28
28
  import "./chunk-VF4K2QE6.js";
29
29
  import "./chunk-Q554LLSI.js";
30
30
  import "./chunk-KHCLMKZZ.js";
31
- import "./chunk-L322LGOM.js";
31
+ import "./chunk-RB3EETRZ.js";
32
32
  import "./chunk-H4AHY5BU.js";
33
33
  import "./chunk-FV3JEYR3.js";
34
34
  import "./chunk-GMZLP5DV.js";
@@ -37,7 +37,7 @@ import "./chunk-4MK3I7Y4.js";
37
37
  import "./chunk-CQ3WA2NE.js";
38
38
  import "./chunk-5ZUL4CUO.js";
39
39
  import "./chunk-N7J63Q6C.js";
40
- import "./chunk-FORUBDQQ.js";
40
+ import "./chunk-SBDFSHSS.js";
41
41
  import "./chunk-PUOC4YRO.js";
42
42
  import "./chunk-HCT7U36O.js";
43
43
  import "./chunk-FDTR4QJ6.js";
@@ -21,7 +21,7 @@ import "./chunk-KQHGZWSV.js";
21
21
  import "./chunk-VF4K2QE6.js";
22
22
  import "./chunk-Q554LLSI.js";
23
23
  import "./chunk-KHCLMKZZ.js";
24
- import "./chunk-L322LGOM.js";
24
+ import "./chunk-RB3EETRZ.js";
25
25
  import "./chunk-H4AHY5BU.js";
26
26
  import "./chunk-FV3JEYR3.js";
27
27
  import "./chunk-GMZLP5DV.js";
@@ -30,7 +30,7 @@ import "./chunk-4MK3I7Y4.js";
30
30
  import "./chunk-CQ3WA2NE.js";
31
31
  import "./chunk-5ZUL4CUO.js";
32
32
  import "./chunk-N7J63Q6C.js";
33
- import "./chunk-FORUBDQQ.js";
33
+ import "./chunk-SBDFSHSS.js";
34
34
  import "./chunk-PUOC4YRO.js";
35
35
  import "./chunk-HCT7U36O.js";
36
36
  import "./chunk-FDTR4QJ6.js";
@@ -16,7 +16,7 @@ import "./chunk-SV5IJK6K.js";
16
16
  import "./chunk-VF4K2QE6.js";
17
17
  import "./chunk-Q554LLSI.js";
18
18
  import "./chunk-KHCLMKZZ.js";
19
- import "./chunk-L322LGOM.js";
19
+ import "./chunk-RB3EETRZ.js";
20
20
  import "./chunk-H4AHY5BU.js";
21
21
  import "./chunk-FV3JEYR3.js";
22
22
  import "./chunk-GMZLP5DV.js";
@@ -25,7 +25,7 @@ import "./chunk-4MK3I7Y4.js";
25
25
  import "./chunk-CQ3WA2NE.js";
26
26
  import "./chunk-5ZUL4CUO.js";
27
27
  import "./chunk-N7J63Q6C.js";
28
- import "./chunk-FORUBDQQ.js";
28
+ import "./chunk-SBDFSHSS.js";
29
29
  import "./chunk-PUOC4YRO.js";
30
30
  import "./chunk-HCT7U36O.js";
31
31
  import "./chunk-FDTR4QJ6.js";
@@ -24,7 +24,7 @@ import {
24
24
  updateTitleDoc,
25
25
  useDocField,
26
26
  useDocState
27
- } from "./chunk-WFH72XIR.js";
27
+ } from "./chunk-22CGS5BQ.js";
28
28
  import "./chunk-M76ECQRD.js";
29
29
  import "./chunk-YDH3FDFQ.js";
30
30
  import "./chunk-HNMXYYJR.js";
@@ -30,7 +30,7 @@ import {
30
30
  resolvePageSkillMetadata
31
31
  } from "./chunk-Q554LLSI.js";
32
32
  import "./chunk-KHCLMKZZ.js";
33
- import "./chunk-L322LGOM.js";
33
+ import "./chunk-RB3EETRZ.js";
34
34
  import "./chunk-H4AHY5BU.js";
35
35
  import "./chunk-FV3JEYR3.js";
36
36
  import "./chunk-GMZLP5DV.js";
@@ -39,7 +39,7 @@ import "./chunk-4MK3I7Y4.js";
39
39
  import "./chunk-CQ3WA2NE.js";
40
40
  import "./chunk-5ZUL4CUO.js";
41
41
  import "./chunk-N7J63Q6C.js";
42
- import "./chunk-FORUBDQQ.js";
42
+ import "./chunk-SBDFSHSS.js";
43
43
  import "./chunk-PUOC4YRO.js";
44
44
  import "./chunk-HCT7U36O.js";
45
45
  import "./chunk-FDTR4QJ6.js";
@@ -9,14 +9,14 @@ import {
9
9
  prepareAndPersistUserMessage,
10
10
  resolveHandleSendMessageContext,
11
11
  selectAllMsgs
12
- } from "./chunk-GTLZXAWO.js";
12
+ } from "./chunk-Q4U2WKQY.js";
13
13
  import "./chunk-MC4XLIJ7.js";
14
14
  import "./chunk-3BMYXEUW.js";
15
15
  import "./chunk-YYLHWIW6.js";
16
16
  import "./chunk-AGGIDPCZ.js";
17
17
  import {
18
18
  streamAgentChatTurn
19
- } from "./chunk-FSABYU7L.js";
19
+ } from "./chunk-DE7R7ZAP.js";
20
20
  import "./chunk-BFDFRLLQ.js";
21
21
  import "./chunk-5RGU3J7P.js";
22
22
  import {