nolo-cli 0.47.0-alpha.1 → 0.47.0-alpha.3

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 (65) hide show
  1. package/{_executeModel-JWAASOOT.js → _executeModel-5PG6CUWD.js} +13 -12
  2. package/{agentDeleteCommand-QL7TF5F2.js → agentDeleteCommand-SHSPQZHI.js} +1 -1
  3. package/{agentEmailCommands-AC3XQM53.js → agentEmailCommands-TNFWV6XO.js} +14 -13
  4. package/{agentListCommands-4YMFHDU6.js → agentListCommands-5QTNEYMQ.js} +1 -1
  5. package/{agentMachineCommands-MFQKYUV4.js → agentMachineCommands-OENA64ZO.js} +2 -2
  6. package/{agentRecordCommands-QG3YBSTQ.js → agentRecordCommands-JLN2EWGC.js} +14 -13
  7. package/{agentRunCommand-B4PGT36L.js → agentRunCommand-CQM7DINV.js} +16 -15
  8. package/{agentRunControl-LHXOP4IU.js → agentRunControl-4GHHSXFZ.js} +1 -1
  9. package/{agentRuntimeLocal-V2UKJPNE.js → agentRuntimeLocal-ZKXYFLXI.js} +1 -1
  10. package/{agentSlice-B5O3RTRP.js → agentSlice-NKFLP3RI.js} +1 -1
  11. package/{agentSuperviseCommands-IMRZ56RC.js → agentSuperviseCommands-VB6BUS5H.js} +2 -2
  12. package/{appDeleteCommands-BQCRRHOM.js → appDeleteCommands-XYGAZIJX.js} +1 -1
  13. package/{appDeployCommands-UMJ67TUR.js → appDeployCommands-7T5CABRB.js} +1 -1
  14. package/{appDeployStatusCommands-KASPUR4V.js → appDeployStatusCommands-KTFQMRPZ.js} +1 -1
  15. package/{appGetCommands-FFT2LTGF.js → appGetCommands-HOX2ULSV.js} +1 -1
  16. package/{appListCommands-TAVWFRZZ.js → appListCommands-3SLCEHND.js} +1 -1
  17. package/{chatQueueReduxAdapter-OVDKLHLD.js → chatQueueReduxAdapter-WMMBQK3Y.js} +2 -2
  18. package/{chunk-25J3BB35.js → chunk-3N2KFW63.js} +47 -7
  19. package/{chunk-7US2USK7.js → chunk-4ZNDBDWG.js} +3 -3
  20. package/{chunk-NSQNNYGW.js → chunk-5BPZLBFB.js} +4 -4
  21. package/{chunk-CTXR4SRT.js → chunk-5OUK7FZE.js} +1 -1
  22. package/{chunk-BIMCW2CC.js → chunk-5PPFYHU2.js} +2 -2
  23. package/{chunk-C5UWCCLI.js → chunk-5TNI2BMD.js} +3 -3
  24. package/{chunk-XOFZEJGM.js → chunk-6LYUN76O.js} +3 -3
  25. package/{chunk-6HIGYUBQ.js → chunk-6XIE5ZGI.js} +1 -1
  26. package/chunk-AETZ7AD6.js +274 -0
  27. package/{chunk-5PFBRLJN.js → chunk-FAWK6DBF.js} +8 -8
  28. package/{chunk-XIRSTDYF.js → chunk-GYXN23QE.js} +28 -22
  29. package/{chunk-FM6ZGNMV.js → chunk-H2JQB6B6.js} +2 -2
  30. package/{chunk-NC3CSWVT.js → chunk-IWUPQUWA.js} +1 -1
  31. package/{chunk-7XZ5GXSN.js → chunk-J3UALFHL.js} +1 -1
  32. package/{chunk-EY7V7REW.js → chunk-KHCLMKZZ.js} +6 -280
  33. package/{chunk-OFSVXPQS.js → chunk-MUIJYGYW.js} +3 -3
  34. package/chunk-OFZPJ3NT.js +114 -0
  35. package/{chunk-5IQX2XPA.js → chunk-V2IPBG5U.js} +1 -1
  36. package/{chunk-AEXP2UZT.js → chunk-WHVQA7PJ.js} +8 -2
  37. package/{chunk-RNNAJ34U.js → chunk-WPFNAEIW.js} +1 -1
  38. package/{chunk-DROE55W3.js → chunk-XLIHNL4X.js} +10 -10
  39. package/{chunk-GYSVYO35.js → chunk-XMI3APSU.js} +6 -6
  40. package/{chunk-SEIOEDBB.js → chunk-YNOGNUBC.js} +11 -11
  41. package/{codingSkills-QLDAXJRA.js → codingSkills-BYQI6EPT.js} +3 -2
  42. package/{createAgentAutomationAction-TQ7PYONU.js → createAgentAutomationAction-ENDNA3Q4.js} +3 -3
  43. package/{createDialogAction-EOQFCM3K.js → createDialogAction-2KNX6S2D.js} +6 -5
  44. package/{createPageAction-ZG5PH6BI.js → createPageAction-SNBCYPK6.js} +5 -4
  45. package/{dialogCommands-DCGMVLBA.js → dialogCommands-COU5C635.js} +4 -2
  46. package/{dialogSlice-YHGPDBAZ.js → dialogSlice-RTPOD6EW.js} +2 -2
  47. package/{docCreateCommands-A2LVLROP.js → docCreateCommands-JWY25UFB.js} +4 -3
  48. package/{docDeleteCommands-ENMROKH6.js → docDeleteCommands-BPJOCSX4.js} +4 -3
  49. package/{docReadCommands-XSRUV4EM.js → docReadCommands-BSEZCYTQ.js} +4 -3
  50. package/{docStore-WIKRGVQJ.js → docStore-TYHVLU7G.js} +4 -4
  51. package/{docUpdateCommands-5B5NBORA.js → docUpdateCommands-S2IE2VV4.js} +4 -3
  52. package/{handleSendMessageAction-WT4FDMQS.js → handleSendMessageAction-QYXDQXGH.js} +2 -2
  53. package/index.js +46 -46
  54. package/{machineCommands-BFLTBAK6.js → machineCommands-MHKXEUGC.js} +14 -13
  55. package/{machineWsRunDispatch-VCJB5LHO.js → machineWsRunDispatch-ZV736PJZ.js} +14 -13
  56. package/package.json +1 -1
  57. package/{readlineWorkspace-VBJLMU6V.js → readlineWorkspace-L3IFOIIV.js} +21 -20
  58. package/{runAgentClientLoop-4QOEJOJP.js → runAgentClientLoop-GBLDVBT5.js} +11 -10
  59. package/{skillDiscovery-GPUDHDTZ.js → skillDiscovery-COX56OBO.js} +2 -1
  60. package/{spaceCommands-FBB7XSAW.js → spaceCommands-XOLPJMRK.js} +1 -1
  61. package/{spaceSlice-YMDZ4G6H.js → spaceSlice-OQPAGQDP.js} +3 -3
  62. package/{streamAgentChatTurn-5NBWQHY6.js → streamAgentChatTurn-SN5XJJ7U.js} +12 -11
  63. package/{tools-37H5A4OG.js → tools-Y65Y3CI4.js} +9 -8
  64. package/{updateDialogTitleAction-XAGMXHW5.js → updateDialogTitleAction-OAOP7CCE.js} +3 -3
  65. package/chunk-2BWU4ORW.js +0 -2574
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
304
304
  const overrides = {};
305
305
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
306
306
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
307
- const { _executeModel } = await import("./_executeModel-JWAASOOT.js");
307
+ const { _executeModel } = await import("./_executeModel-5PG6CUWD.js");
308
308
  return _executeModel(
309
309
  {
310
310
  isStreaming: args.isStreaming ?? false,
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
325
325
  * - 循环直到无工具调用或触发其他运行时停止条件
326
326
  */
327
327
  runAgent: create.asyncThunk(async (args, thunkApi) => {
328
- const { runAgentClientLoop } = await import("./runAgentClientLoop-4QOEJOJP.js");
328
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-GBLDVBT5.js");
329
329
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
330
330
  {
331
331
  agentKey: args.agentKey,
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
341
341
  * 聊天轮次流式 Agent 调用
342
342
  */
343
343
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
344
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-5NBWQHY6.js");
344
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-SN5XJJ7U.js");
345
345
  return streamAgentChatTurnHandler(args, thunkApi);
346
346
  }),
347
347
  /**
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSkillDocMarkdown
3
- } from "./chunk-EY7V7REW.js";
3
+ } from "./chunk-AETZ7AD6.js";
4
4
 
5
5
  // packages/cli/docPageHelpers.ts
6
6
  import { readFileSync } from "node:fs";
@@ -0,0 +1,274 @@
1
+ import {
2
+ dump,
3
+ load
4
+ } from "./chunk-KHCLMKZZ.js";
5
+ import {
6
+ asTrimmedNonEmptyStringArray
7
+ } from "./chunk-I42VC5KR.js";
8
+ import {
9
+ asOptionalTrimmedString
10
+ } from "./chunk-G3SUCT4W.js";
11
+
12
+ // packages/ai/skills/skillDocProtocol.ts
13
+ var SKILL_DOC_ENUMS = {
14
+ triggerMode: ["explicit", "required", "recommended"],
15
+ // budgetTier 只服务 WorkflowReferenceConfig;skill 侧已移除(零读点)。
16
+ budgetTier: ["low", "medium", "high"],
17
+ modality: ["text", "image", "video", "audio", "3d"],
18
+ docKind: ["knowledge", "instruction", "skill"]
19
+ };
20
+ var SKILL_CONFIG_BLOCK = "skill-config";
21
+ var EVAL_CONFIG_BLOCK = "eval-config";
22
+ var WORKFLOW_CONFIG_BLOCK = "workflow-config";
23
+ var normalizeStringArray = (value) => {
24
+ if (!Array.isArray(value)) return void 0;
25
+ const items = [...new Set(asTrimmedNonEmptyStringArray(value))];
26
+ return items.length > 0 ? items : void 0;
27
+ };
28
+ var normalizeSkillEnumValue = (key, value) => typeof value === "string" && SKILL_DOC_ENUMS[key].includes(value) ? value : void 0;
29
+ var normalizeSkillModalities = (value) => {
30
+ const raw = normalizeStringArray(value);
31
+ if (!raw) return void 0;
32
+ const filtered = raw.flatMap((item) => {
33
+ const modality = normalizeSkillEnumValue("modality", item);
34
+ return modality ? [modality] : [];
35
+ });
36
+ return filtered.length > 0 ? Array.from(new Set(filtered)) : void 0;
37
+ };
38
+ var normalizeSkillConfig = (value, fallbackTools) => {
39
+ if (!value || typeof value !== "object") return void 0;
40
+ const record = value;
41
+ const name = asOptionalTrimmedString(record.name) ?? "";
42
+ const description = asOptionalTrimmedString(record.description) ?? "";
43
+ if (!name || !description) return void 0;
44
+ const triggerMode = normalizeSkillEnumValue("triggerMode", record.triggerMode);
45
+ const modalities = normalizeSkillModalities(record.modalities);
46
+ const toolNames = normalizeStringArray(record.toolNames) ?? normalizeStringArray(fallbackTools) ?? void 0;
47
+ return {
48
+ version: "0.1",
49
+ kind: "skill",
50
+ id: asOptionalTrimmedString(record.id),
51
+ name,
52
+ description,
53
+ triggerMode,
54
+ toolNames,
55
+ modalities,
56
+ requiredSkills: normalizeStringArray(record.requiredSkills),
57
+ recommendedSkills: normalizeStringArray(record.recommendedSkills),
58
+ promptPatch: asOptionalTrimmedString(record.promptPatch)
59
+ };
60
+ };
61
+ var normalizeEvalConfig = (value) => {
62
+ if (!value || typeof value !== "object") return void 0;
63
+ const record = value;
64
+ if (!Array.isArray(record.cases)) return void 0;
65
+ const cases = [];
66
+ for (const item of record.cases) {
67
+ if (!item || typeof item !== "object") continue;
68
+ const testCase = item;
69
+ const input = asOptionalTrimmedString(testCase.input) ?? "";
70
+ if (!input) continue;
71
+ cases.push({
72
+ input,
73
+ expectedTools: normalizeStringArray(testCase.expectedTools),
74
+ expectedSignals: normalizeStringArray(testCase.expectedSignals),
75
+ forbiddenSignals: normalizeStringArray(testCase.forbiddenSignals)
76
+ });
77
+ }
78
+ return cases.length > 0 ? {
79
+ version: "0.1",
80
+ cases
81
+ } : void 0;
82
+ };
83
+ var normalizeWorkflowConfig = (value) => {
84
+ if (!value || typeof value !== "object") return void 0;
85
+ const record = value;
86
+ const name = asOptionalTrimmedString(record.name) ?? "";
87
+ const description = asOptionalTrimmedString(record.description) ?? "";
88
+ if (!name || !description) return void 0;
89
+ const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
90
+ return {
91
+ version: "0.1",
92
+ kind: "workflow",
93
+ id: asOptionalTrimmedString(record.id),
94
+ name,
95
+ description,
96
+ defaultAgent: asOptionalTrimmedString(record.defaultAgent),
97
+ inputs: normalizeStringArray(record.inputs),
98
+ recommendedTools: normalizeStringArray(record.recommendedTools),
99
+ requiredTools: normalizeStringArray(record.requiredTools),
100
+ requiredOutputs: normalizeStringArray(record.requiredOutputs),
101
+ gates: normalizeStringArray(record.gates),
102
+ budgetTier,
103
+ contextStrategy: asOptionalTrimmedString(record.contextStrategy),
104
+ failureProtocol: asOptionalTrimmedString(record.failureProtocol)
105
+ };
106
+ };
107
+ var normalizePageSkillMetadata = (value, fallbackTools) => {
108
+ if (!value || typeof value !== "object") return void 0;
109
+ const record = value;
110
+ const kind = normalizeSkillEnumValue("docKind", record.kind);
111
+ const meta = {
112
+ kind,
113
+ requiredSkills: normalizeStringArray(record.requiredSkills),
114
+ recommendedSkills: normalizeStringArray(record.recommendedSkills),
115
+ skillConfig: normalizeSkillConfig(record.skillConfig, fallbackTools),
116
+ evalConfig: normalizeEvalConfig(record.evalConfig),
117
+ workflowConfig: normalizeWorkflowConfig(record.workflowConfig)
118
+ };
119
+ if (meta.skillConfig && !meta.kind) {
120
+ meta.kind = "skill";
121
+ }
122
+ if (meta.workflowConfig && !meta.kind) {
123
+ meta.kind = "instruction";
124
+ }
125
+ return meta.kind || meta.requiredSkills || meta.recommendedSkills || meta.skillConfig || meta.evalConfig || meta.workflowConfig ? meta : void 0;
126
+ };
127
+ var extractCommentBlock = (markdown, blockName) => {
128
+ if (!markdown) return void 0;
129
+ const matcher = new RegExp(
130
+ `<!--\\s*${blockName}\\s*\\n([\\s\\S]*?)-->`,
131
+ "i"
132
+ );
133
+ const match = markdown.match(matcher);
134
+ return asOptionalTrimmedString(match?.[1]);
135
+ };
136
+ var removeCommentBlock = (markdown, blockName) => markdown.replace(
137
+ new RegExp(`\\n?<!--\\s*${blockName}\\s*\\n[\\s\\S]*?-->\\s*`, "gi"),
138
+ "\n\n"
139
+ );
140
+ var parseYamlObject = (raw) => {
141
+ if (!raw) return void 0;
142
+ try {
143
+ const parsed = load(raw);
144
+ return parsed && typeof parsed === "object" ? parsed : void 0;
145
+ } catch {
146
+ return void 0;
147
+ }
148
+ };
149
+ var parseSkillDocProtocol = (markdown, existingMeta, fallbackTools) => {
150
+ const source = typeof markdown === "string" ? markdown : "";
151
+ const skillBlock = parseYamlObject(extractCommentBlock(source, SKILL_CONFIG_BLOCK));
152
+ const evalBlock = parseYamlObject(extractCommentBlock(source, EVAL_CONFIG_BLOCK));
153
+ const workflowBlock = parseYamlObject(extractCommentBlock(source, WORKFLOW_CONFIG_BLOCK));
154
+ const cleanedContent = removeCommentBlock(
155
+ removeCommentBlock(
156
+ removeCommentBlock(source, SKILL_CONFIG_BLOCK),
157
+ EVAL_CONFIG_BLOCK
158
+ ),
159
+ WORKFLOW_CONFIG_BLOCK
160
+ ).replace(/\n{3,}/g, "\n\n").trim();
161
+ const parsedMeta = normalizePageSkillMetadata(
162
+ {
163
+ ...existingMeta ?? {},
164
+ ...skillBlock ? {
165
+ kind: existingMeta?.kind === "skill" || skillBlock.kind === "skill" ? "skill" : existingMeta?.kind,
166
+ requiredSkills: skillBlock.requiredSkills ?? existingMeta?.requiredSkills,
167
+ recommendedSkills: skillBlock.recommendedSkills ?? existingMeta?.recommendedSkills,
168
+ skillConfig: skillBlock
169
+ } : {},
170
+ ...evalBlock ? { evalConfig: evalBlock } : {},
171
+ ...workflowBlock ? { workflowConfig: workflowBlock } : {}
172
+ },
173
+ fallbackTools
174
+ );
175
+ return {
176
+ content: cleanedContent,
177
+ meta: parsedMeta
178
+ };
179
+ };
180
+ var resolvePageSkillMetadata = (page) => {
181
+ if (!page) return void 0;
182
+ const existingMeta = normalizePageSkillMetadata(page.meta, page.tools);
183
+ return parseSkillDocProtocol(page.content ?? "", existingMeta, page.tools).meta;
184
+ };
185
+ var yamlBlock = (value) => dump(value, { lineWidth: 120, noRefs: true }).trim();
186
+ var buildSkillConfigComment = (config) => {
187
+ const payload = {
188
+ version: config.version,
189
+ kind: config.kind,
190
+ ...config.id ? { id: config.id } : {},
191
+ name: config.name,
192
+ description: config.description,
193
+ ...config.triggerMode ? { triggerMode: config.triggerMode } : {},
194
+ ...config.requiredSkills?.length ? { requiredSkills: config.requiredSkills } : {},
195
+ ...config.recommendedSkills?.length ? { recommendedSkills: config.recommendedSkills } : {},
196
+ ...config.toolNames?.length ? { toolNames: config.toolNames } : {},
197
+ ...config.modalities?.length ? { modalities: config.modalities } : {},
198
+ ...config.promptPatch ? { promptPatch: config.promptPatch } : {}
199
+ };
200
+ return `<!-- ${SKILL_CONFIG_BLOCK}
201
+ ${yamlBlock(payload)}
202
+ -->`;
203
+ };
204
+ var buildEvalConfigComment = (config) => `<!-- ${EVAL_CONFIG_BLOCK}
205
+ ${yamlBlock({
206
+ version: config.version,
207
+ cases: config.cases
208
+ })}
209
+ -->`;
210
+ var buildWorkflowConfigComment = (config) => `<!-- ${WORKFLOW_CONFIG_BLOCK}
211
+ ${yamlBlock({
212
+ version: config.version,
213
+ kind: config.kind,
214
+ ...config.id ? { id: config.id } : {},
215
+ name: config.name,
216
+ description: config.description,
217
+ ...config.defaultAgent ? { defaultAgent: config.defaultAgent } : {},
218
+ ...config.inputs?.length ? { inputs: config.inputs } : {},
219
+ ...config.recommendedTools?.length ? { recommendedTools: config.recommendedTools } : {},
220
+ ...config.requiredTools?.length ? { requiredTools: config.requiredTools } : {},
221
+ ...config.requiredOutputs?.length ? { requiredOutputs: config.requiredOutputs } : {},
222
+ ...config.gates?.length ? { gates: config.gates } : {},
223
+ ...config.budgetTier ? { budgetTier: config.budgetTier } : {},
224
+ ...config.contextStrategy ? { contextStrategy: config.contextStrategy } : {},
225
+ ...config.failureProtocol ? { failureProtocol: config.failureProtocol } : {}
226
+ })}
227
+ -->`;
228
+ var buildSkillDocMarkdown = (options) => {
229
+ const sections = [
230
+ asOptionalTrimmedString(options.body) ?? "",
231
+ buildSkillConfigComment(options.skillConfig),
232
+ options.evalConfig ? buildEvalConfigComment(options.evalConfig) : "",
233
+ options.workflowConfig ? buildWorkflowConfigComment(options.workflowConfig) : ""
234
+ ].filter(Boolean);
235
+ return sections.join("\n\n").trim();
236
+ };
237
+ var extractFrontmatter = (markdown) => {
238
+ const match = markdown.match(/^\s*---\s*\n([\s\S]*?)\n\s*---\s*\n?/);
239
+ if (!match) return { body: markdown.trim() };
240
+ const frontmatter = parseYamlObject(match[1]);
241
+ const body = markdown.slice(match[0].length).trim();
242
+ return { frontmatter, body };
243
+ };
244
+ var normalizeAllowedTools = (value) => {
245
+ if (Array.isArray(value)) {
246
+ return normalizeStringArray(value) ?? [];
247
+ }
248
+ if (typeof value === "string") {
249
+ return value.split(/\s+/).map((item) => item.trim()).filter(Boolean);
250
+ }
251
+ return [];
252
+ };
253
+ var parseExternalSkillMarkdown = (markdown) => {
254
+ const { frontmatter, body } = extractFrontmatter(markdown);
255
+ return {
256
+ name: asOptionalTrimmedString(frontmatter?.name),
257
+ description: asOptionalTrimmedString(frontmatter?.description),
258
+ compatibility: asOptionalTrimmedString(frontmatter?.compatibility),
259
+ allowedTools: normalizeAllowedTools(frontmatter?.["allowed-tools"]),
260
+ metadata: frontmatter?.metadata && typeof frontmatter.metadata === "object" ? Object.fromEntries(
261
+ Object.entries(frontmatter.metadata).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, String(value)])
262
+ ) : void 0,
263
+ body
264
+ };
265
+ };
266
+
267
+ export {
268
+ normalizeStringArray,
269
+ normalizeSkillModalities,
270
+ parseSkillDocProtocol,
271
+ resolvePageSkillMetadata,
272
+ buildSkillDocMarkdown,
273
+ parseExternalSkillMarkdown
274
+ };
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-YYLHWIW6.js";
11
11
  import {
12
12
  runLlm
13
- } from "./chunk-XOFZEJGM.js";
13
+ } from "./chunk-6LYUN76O.js";
14
14
  import {
15
15
  getApproxPricePerImage
16
16
  } from "./chunk-AGGIDPCZ.js";
@@ -3584,7 +3584,7 @@ var messageSlice = createSliceWithThunks({
3584
3584
  runtimeOptions: args.runtimeOptions
3585
3585
  });
3586
3586
  if (agentKeyToUse) {
3587
- const { streamAgentChatTurn } = await import("./agentSlice-B5O3RTRP.js");
3587
+ const { streamAgentChatTurn } = await import("./agentSlice-NKFLP3RI.js");
3588
3588
  await dispatch(
3589
3589
  streamAgentChatTurn({
3590
3590
  agentKey: agentKeyToUse,
@@ -4848,7 +4848,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4848
4848
  }
4849
4849
  if (isCurrentDialog) {
4850
4850
  await thunkApi.dispatch(resetMsgs());
4851
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-YHGPDBAZ.js");
4851
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-RTPOD6EW.js");
4852
4852
  dispatch(clearPendingAttachments2());
4853
4853
  }
4854
4854
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -4856,15 +4856,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4856
4856
 
4857
4857
  // packages/chat/dialog/dialogSlice.ts
4858
4858
  var runCreateDialogAction = async (args, thunkApi) => {
4859
- const { createDialogAction } = await import("./createDialogAction-EOQFCM3K.js");
4859
+ const { createDialogAction } = await import("./createDialogAction-2KNX6S2D.js");
4860
4860
  return createDialogAction(args, thunkApi);
4861
4861
  };
4862
4862
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4863
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-TQ7PYONU.js");
4863
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-ENDNA3Q4.js");
4864
4864
  return createAgentAutomationAction(args, thunkApi);
4865
4865
  };
4866
4866
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4867
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-XAGMXHW5.js");
4867
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-OAOP7CCE.js");
4868
4868
  return updateDialogTitleAction(args, thunkApi);
4869
4869
  };
4870
4870
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -4888,7 +4888,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4888
4888
  return setDialogExtraReferencesAction(args, thunkApi);
4889
4889
  };
4890
4890
  var runHandleSendMessageAction = async (args, thunkApi) => {
4891
- const { handleSendMessageAction } = await import("./handleSendMessageAction-WT4FDMQS.js");
4891
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-QYXDQXGH.js");
4892
4892
  return handleSendMessageAction(args, thunkApi);
4893
4893
  };
4894
4894
  function clearDialogState() {
@@ -4901,7 +4901,7 @@ var createPageAndAddReference = createAsyncThunk(
4901
4901
  async (payload, { dispatch, getState, rejectWithValue }) => {
4902
4902
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4903
4903
  try {
4904
- const { createDocState } = await import("./docStore-WIKRGVQJ.js");
4904
+ const { createDocState } = await import("./docStore-TYHVLU7G.js");
4905
4905
  const pageKey = await createDocState(
4906
4906
  { slateData, title },
4907
4907
  { dispatch, getState }
@@ -43,7 +43,7 @@ import {
43
43
  spawnLocalBackgroundRun,
44
44
  terminateRunProcess,
45
45
  withQueueLock
46
- } from "./chunk-AEXP2UZT.js";
46
+ } from "./chunk-WHVQA7PJ.js";
47
47
  import {
48
48
  inferCaptureIntent
49
49
  } from "./chunk-AYXSUBVC.js";
@@ -53,7 +53,7 @@ import {
53
53
  import {
54
54
  inlineImageUrlsForCustomProvider,
55
55
  prepareTools
56
- } from "./chunk-NC3CSWVT.js";
56
+ } from "./chunk-IWUPQUWA.js";
57
57
  import {
58
58
  getServerProviderSecret
59
59
  } from "./chunk-HS7MLR74.js";
@@ -72,7 +72,7 @@ import {
72
72
  rememberMemoryFunctionSchema,
73
73
  resolveAgentRequiredPackIds,
74
74
  setTodoListFunc
75
- } from "./chunk-SEIOEDBB.js";
75
+ } from "./chunk-YNOGNUBC.js";
76
76
  import {
77
77
  createDrainExhaustedResponse,
78
78
  isCoreDrainingBody,
@@ -97,13 +97,13 @@ import {
97
97
  prepareTokenUsageData,
98
98
  resolveBuiltinPlatformAgentConfig,
99
99
  runKeyed
100
- } from "./chunk-5PFBRLJN.js";
100
+ } from "./chunk-FAWK6DBF.js";
101
101
  import {
102
102
  BUILTIN_TITLE_LLM_CONFIG
103
103
  } from "./chunk-EVBFYPDC.js";
104
104
  import {
105
105
  fetchServerSyncedCredential
106
- } from "./chunk-XOFZEJGM.js";
106
+ } from "./chunk-6LYUN76O.js";
107
107
  import {
108
108
  require_date_fns
109
109
  } from "./chunk-M76ECQRD.js";
@@ -142,7 +142,7 @@ import {
142
142
  parseSyncServersEnv,
143
143
  resolveOpenAiCompatibleProviderConfig,
144
144
  summarizeToolArguments
145
- } from "./chunk-OFSVXPQS.js";
145
+ } from "./chunk-MUIJYGYW.js";
146
146
  import {
147
147
  buildPlatformChatCompletionRequest,
148
148
  canUsePlatformChatProvider,
@@ -10706,15 +10706,14 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
10706
10706
  startedAt: reconciled.startedAt,
10707
10707
  endedAt: reconciled.endedAt ?? null,
10708
10708
  exitCode: reconciled.exitCode ?? null,
10709
- // Expose dialogId so the caller can read the agent's actual output
10710
- // via `nolo dialog read <dialogId>`. The dialog is the authoritative
10711
- // result store; the run log is the child process stdout/stderr,
10712
- // whose contents vary by provider (some stream tokens to stdout,
10713
- // some only emit startup + stderr). Because status does not carry
10714
- // logTail by default, a "done" run with an empty logTail is
10715
- // indistinguishable from a hung run without this field. Surfacing
10716
- // dialogId gives the caller a reliable way to fetch the result.
10717
- ...reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
10709
+ // Non-ephemeral runs expose dialogId so the caller can read the
10710
+ // agent's actual output via `nolo dialog read <dialogId>`. Ephemeral
10711
+ // runs do not persist a dialog (their ephemeral dialogId is synthetic)
10712
+ // and instead return `{ ephemeral: true, dialogNote: ... }`.
10713
+ ...reconciled.ephemeral ? {
10714
+ ephemeral: true,
10715
+ dialogNote: "\u6B64 run \u672A\u6301\u4E45\u5316 dialog\uFF0C\u7ED3\u679C\u89C1 run \u8F93\u51FA"
10716
+ } : reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
10718
10717
  ...reportExists ? { reportPath } : {},
10719
10718
  // Progress is what makes tailLines:0 an actual answer to "is it
10720
10719
  // stuck?". Without it a poll returns `running` and a pid, so the only
@@ -10777,6 +10776,7 @@ ${JSON.stringify(args.input)}`;
10777
10776
  ...dodCommands && dodCommands.length > 0 ? { dodCommands } : {},
10778
10777
  cwd: deps.cwd ?? process.cwd(),
10779
10778
  message,
10779
+ ...args.ephemeral === true ? { ephemeral: true } : {},
10780
10780
  output: noopOutput
10781
10781
  },
10782
10782
  deps
@@ -10830,7 +10830,7 @@ ${JSON.stringify(args.input)}`;
10830
10830
  };
10831
10831
  }
10832
10832
  async function spawnContinuationRun(reconciled, userInput, deps) {
10833
- if (!reconciled.dialogId) {
10833
+ if (!reconciled.ephemeral && !reconciled.dialogId) {
10834
10834
  throw new Error("\u8BE5 run \u65E0\u5173\u8054 dialog\uFF0C\u65E0\u6CD5\u7EED\u8DD1\u3002");
10835
10835
  }
10836
10836
  const agentKey = reconciled.agentKey;
@@ -10838,12 +10838,14 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
10838
10838
  const rawArgs = [
10839
10839
  "--agent",
10840
10840
  agentKey,
10841
- "--continue",
10842
- reconciled.dialogId,
10841
+ // 仅非 ephemeral 且确有 dialogId 时才续接原 dialog。ephemeral 不落盘,
10842
+ // 其 dialogId 是合成的,绝不能透传给子进程 --continue(子进程读不到必然
10843
+ // 全链路 404);续跑转为开一个新的 ephemeral run。
10844
+ ...!reconciled.ephemeral && reconciled.dialogId ? ["--continue", reconciled.dialogId] : [],
10843
10845
  "--msg-file",
10844
10846
  "PLACEHOLDER",
10845
10847
  "--bg",
10846
- ...reconciled.ephemeral === true ? ["--ephemeral"] : []
10848
+ ...reconciled.ephemeral ? ["--ephemeral"] : []
10847
10849
  ];
10848
10850
  const { runId: newRunId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
10849
10851
  {
@@ -10856,6 +10858,7 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
10856
10858
  ...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
10857
10859
  cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
10858
10860
  message: userInput,
10861
+ ...reconciled.ephemeral ? { ephemeral: true } : {},
10859
10862
  output: noopOutput
10860
10863
  },
10861
10864
  deps
@@ -10867,7 +10870,8 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
10867
10870
  content: JSON.stringify({
10868
10871
  runId: reconciled.runId,
10869
10872
  newRunId,
10870
- dialogId: reconciled.dialogId,
10873
+ // ephemeral 的 dialogId 是合成的(不落盘),不外泄;调用方按 ephemeral 语义处理。
10874
+ ...reconciled.ephemeral ? { ephemeral: true } : { dialogId: reconciled.dialogId },
10871
10875
  mode: "continue",
10872
10876
  status: "running",
10873
10877
  ...agentName ? { agentName } : {},
@@ -11030,7 +11034,8 @@ function createCliControlAgentRunExecutor(deps = {}) {
11030
11034
  return {
11031
11035
  content: JSON.stringify({
11032
11036
  runId: reconciled.runId,
11033
- ...afterCheck.dialogId || reconciled.dialogId ? { dialogId: afterCheck.dialogId ?? reconciled.dialogId } : {},
11037
+ // ephemeral 不外泄合成 dialogId;非 ephemeral 保持原 dialogId 透出。
11038
+ ...reconciled.ephemeral ? { ephemeral: true } : afterCheck.dialogId || reconciled.dialogId ? { dialogId: afterCheck.dialogId ?? reconciled.dialogId } : {},
11034
11039
  mode: "enqueue",
11035
11040
  consumed: true,
11036
11041
  status: afterCheck.status,
@@ -11052,7 +11057,8 @@ function createCliControlAgentRunExecutor(deps = {}) {
11052
11057
  return {
11053
11058
  content: JSON.stringify({
11054
11059
  runId: reconciled.runId,
11055
- ...reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
11060
+ // ephemeral 不外泄合成 dialogId(enqueue 场景同样收敛)。
11061
+ ...reconciled.ephemeral ? { ephemeral: true } : reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
11056
11062
  mode: "enqueue",
11057
11063
  queued: queuedCount,
11058
11064
  status: "running",
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  deleteDialog,
3
3
  toast
4
- } from "./chunk-5PFBRLJN.js";
4
+ } from "./chunk-FAWK6DBF.js";
5
5
  import {
6
6
  deleteServerSyncedCredential
7
- } from "./chunk-XOFZEJGM.js";
7
+ } from "./chunk-6LYUN76O.js";
8
8
  import {
9
9
  require_date_fns
10
10
  } from "./chunk-M76ECQRD.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-SEIOEDBB.js";
4
+ } from "./chunk-YNOGNUBC.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-O6OSWFZQ.js";
@@ -3,7 +3,7 @@ import {
3
3
  resolveRunReportJsonPath,
4
4
  resolveRunReportPath,
5
5
  resolveRunsDir
6
- } from "./chunk-AEXP2UZT.js";
6
+ } from "./chunk-WHVQA7PJ.js";
7
7
 
8
8
  // packages/cli/agentRunReport.ts
9
9
  import { homedir as nodeHomedir } from "node:os";