@evandu/super-pi 0.1.142 → 0.1.143

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 (47) hide show
  1. package/agents/super-pi-task/core.ts +55 -27
  2. package/agents/super-pi-task/index.ts +76 -4
  3. package/dist/.super-pi-check-inputs.json +2 -2
  4. package/dist/client/.super-pi-client-sources.json +7 -7
  5. package/dist/client/assets/{CodeMirrorEditor-iLUdQy9q.js → CodeMirrorEditor-CXDQ0ikN.js} +2 -2
  6. package/dist/client/assets/{dist-Bj2C-QqM.js → dist-BK_KWsQr.js} +1 -1
  7. package/dist/client/assets/{dist-Dq6y_nK3.js → dist-BKsr7wc2.js} +1 -1
  8. package/dist/client/assets/{dist-F634gv7V.js → dist-BXQWaRci.js} +1 -1
  9. package/dist/client/assets/{dist-Dxq1s4j3.js → dist-B_uWAP2-.js} +1 -1
  10. package/dist/client/assets/{dist-DEUl3Yqk.js → dist-BwwacXyS.js} +1 -1
  11. package/dist/client/assets/{dist-CoTJns5x.js → dist-CWd7iD1S.js} +1 -1
  12. package/dist/client/assets/{dist-ic-MopV2.js → dist-CbjfwVs-.js} +1 -1
  13. package/dist/client/assets/{dist-JuLMNOUt.js → dist-CoEavaUe.js} +1 -1
  14. package/dist/client/assets/{dist-CtCiGxne.js → dist-D60BDUMe.js} +1 -1
  15. package/dist/client/assets/{dist-Bt8G7e7e.js → dist-DBbQHcwG.js} +1 -1
  16. package/dist/client/assets/{dist-0dCNvYEE.js → dist-DVEBhaUf.js} +1 -1
  17. package/dist/client/assets/{dist-DBAoCOnn.js → dist-Db6KH9Qv.js} +1 -1
  18. package/dist/client/assets/{dist-DbLEngKN.js → dist-Dsj0Q8gO.js} +1 -1
  19. package/dist/client/assets/{dist-BA6EsWzo.js → dist-H0dUhAgy.js} +1 -1
  20. package/dist/client/assets/{dist-B8FbKhnf.js → dist-MZSBP_1m.js} +1 -1
  21. package/dist/client/assets/{dist-CWBm3q4a.js → dist-PNt22XLU.js} +1 -1
  22. package/dist/client/assets/{dist-rIYPNzbY.js → dist-S5UwGLvb.js} +1 -1
  23. package/dist/client/assets/{dist-DHyWJ9kA.js → dist-_jioFcsD.js} +1 -1
  24. package/dist/client/assets/{dist-Nt-BWmBB.js → dist-hmP8KP8-.js} +1 -1
  25. package/dist/client/assets/{dist-Cfa_e2VZ.js → dist-jV9tqAoC.js} +1 -1
  26. package/dist/client/assets/{dist-Df9zcCXs.js → dist-oqETQw0G.js} +1 -1
  27. package/dist/client/assets/{dist-B4JqBNQI.js → dist-oz2WOWPd.js} +1 -1
  28. package/dist/client/assets/{index-DMhigTiY.css → index-6h_u-X47.css} +1 -1
  29. package/dist/client/assets/{index-CX5gWDve.js → index-iSnWwgJ-.js} +22 -22
  30. package/dist/client/index.html +2 -2
  31. package/dist/server/application/run-service.d.ts +15 -0
  32. package/dist/server/application/run-service.js +59 -1
  33. package/dist/server/application/session-orchestrator-service.d.ts +9 -1
  34. package/dist/server/application/session-orchestrator-service.js +79 -10
  35. package/dist/server/http-server.js +18 -11
  36. package/dist/server/runtime.js +7 -6
  37. package/dist/server/store.js +7 -1
  38. package/dist/server/task-tool.d.ts +4 -2
  39. package/dist/server/task-tool.js +6 -3
  40. package/dist/server/time-zone.d.ts +20 -0
  41. package/dist/server/time-zone.js +32 -0
  42. package/dist/server/types.d.ts +9 -0
  43. package/dist/server/workflow-engine.d.ts +11 -95
  44. package/dist/server/workflow-engine.js +122 -134
  45. package/dist/server/workflow.d.ts +73 -31
  46. package/dist/server/workflow.js +112 -30
  47. package/package.json +331 -325
@@ -41,6 +41,8 @@ export const TASK_ENDPOINT_ENV = "SUPER_PI_TASK_ENDPOINT";
41
41
  export const TASK_EXEC_ENDPOINT_ENV = "SUPER_PI_EXEC_ENDPOINT";
42
42
  export const TASK_ROSTER_ENV = "SUPER_PI_TASK_ROSTER";
43
43
  export const TASK_CONVERSATION_ENV = "SUPER_PI_TASK_CONVERSATION";
44
+ /** The conversation that spawned this one. Empty means a top-level conversation. */
45
+ export const PARENT_CONVERSATION_ENV = "SUPER_PI_PARENT_CONVERSATION";
44
46
  export const TASK_DEPTH_ENV = "SUPER_PI_TASK_DEPTH";
45
47
 
46
48
  /** The independent background-command tool. NOT a sub-agent dispatch: a shell command run asynchronously. */
@@ -106,7 +108,7 @@ description: 用脚本清洗、转换、统计 Excel/CSV 数据
106
108
  mode: primary
107
109
  ---
108
110
  (正文从这里开始,写它的职责和工作方式。)保存后下一条消息即可使用;修改已有的自定义 Agent 就是编辑同一个目录里对应的 .md 文件。
109
- - 用户要多个 agent 分工协作:单个子任务用 task 工具委托,有先后依赖的流程用 workflow 工具编排;需要拆分多条独立并行工作线、多会话持续跟踪管理、或用户要求创建多个会话并行时,用 session_spawn 创建兄弟会话,并用 session_status / session_dispatch / session_stop 监督管理。`;
111
+ - 用户要多个 agent 分工协作:单个子任务用 task 工具委托,有先后依赖的流程用 workflow 工具编排;同一流程要按明确结论行反复执行时用 loop 节点,要对 primary 自己列出的一批同构对象逐项执行时用 foreach 节点,两者可以任意嵌套。需要拆分多条独立并行工作线、多会话持续跟踪管理、或用户要求创建多个会话并行时,用 session_spawn 创建兄弟会话,并用 session_status / session_dispatch / session_stop 监督管理。`;
110
112
 
111
113
  /** The parameters, OpenCode's `tool/todo.ts:6-8` minus its schema wrapper. */
112
114
  export type TodoParams = { todos: TodoEntry[] };
@@ -714,16 +716,19 @@ export async function executeTodo(
714
716
  // timeline is on screen the whole way. See `src/server/workflow.ts` for the rules and
715
717
  // `docs/AGENT_LOOP_DESIGN.md` for what this deliberately does not do.
716
718
  //
717
- // WHAT IT IS NOT, stated in the description because a model will otherwise try: it is not a graph, it
718
- // cannot branch or loop back, and it does not run steps in parallel. A plan it cannot express is a plan to
719
- // dispatch with `task` directly - and that fallback is the reason this tool can be small. A richer
720
- // orchestration language would not remove that fallback, it would only add a second way to be wrong.
721
-
722
- /** What the model declares. The shape the server's validator accepts, minus everything it will refuse. */
719
+ // WHAT IT IS NOT: an arbitrary graph, an expression language, a parallel runner, or a second orchestration
720
+ // authority. The three node kinds cover sequencing, bounded conclusion-driven repetition and explicit batches.
721
+
722
+ /** What the model declares. The server validates this untrusted recursive shape against the live roster. */
723
+ export type WorkflowParamsNode =
724
+ | { kind: "step"; agentId: string; label?: string; prompt: string }
725
+ | { kind: "loop"; until: string; max?: number; do: WorkflowParamsNode[] }
726
+ | { kind: "foreach"; items: string[]; do: WorkflowParamsNode[] };
723
727
  export type WorkflowParams = {
724
728
  summary?: string;
725
729
  onFailure?: string;
726
730
  steps?: { agentId?: string; label?: string; prompt?: string }[];
731
+ nodes?: WorkflowParamsNode[];
727
732
  };
728
733
 
729
734
  /**
@@ -739,23 +744,24 @@ export type WorkflowParams = {
739
744
  * behaviour it will not see again until the end: `stop` is the default and is what a plan that failed has
740
745
  * honestly earned, `skip` hands the next subagent a hole, and `retry` costs another whole subagent run.
741
746
  */
742
- export const WORKFLOW_DESCRIPTION = `Run an ordered plan of sub-agents, where each step is automatically handed the previous step's output.
747
+ export const WORKFLOW_DESCRIPTION = `Run a recursive plan of sub-agent steps, bounded loops and foreach iterations. The server executes the structure you write; every sub-agent remains a smart worker with no control-flow decision authority.
743
748
 
744
749
  WHEN TO USE THIS, AND WHEN NOT:
745
- - Two steps, or a chain you can hold in your head: use the task tool, twice. You see each answer before you write the next prompt, which is more control than this gives you.
746
- - Three or more steps where each DEPENDS on the previous one: use this. The server runs the chain, hands each step the last step's output, and shows the user a timeline while it happens. Doing that by hand means copying every answer through your context, and a plan this shape is exactly where a dropped link stays invisible until the end.
747
- - Steps that are INDEPENDENT of each other: do not use this. Use the task tool with background: true, several times - that is what parallel is for.
748
- - Anything with branching, conditional steps, or a loop back to an earlier step: you cannot express that here. Use the task tool and decide the next step yourself.
750
+ - Two steps, or a chain you can hold in your head: use the task tool, twice. You see each answer before you write the next prompt.
751
+ - Three or more dependent steps: use step nodes (or the legacy steps array). The server runs them in order and hands earlier output forward.
752
+ - Repeat the same one-or-more-node body until a written conclusion condition holds: use {"kind":"loop","until":"通过","max":8,"do":[...nodes]}. The body runs before each check, and max defaults to 8.
753
+ - Process a homogeneous batch once per entry: use {"kind":"foreach","items":["..."],"do":[...nodes]}. YOU, the primary agent, must supply the explicit items array after deciding what belongs in it. The server never discovers a list, and a foreach without items is refused.
754
+ - Independent work that should run in parallel: use several task calls instead; workflow nodes run sequentially.
755
+ - Arbitrary branches or an expression language: not supported. Use only step, loop and foreach nodes, nested as needed.
749
756
 
750
757
  Usage notes:
751
- 1. This call BLOCKS until the whole plan finishes, and every step is a separate sub-agent process that takes minutes. Three steps is often five to ten minutes.
752
- 2. Steps run IN ORDER, one at a time. Each is a fresh subagent with a fresh context.
753
- 3. You do NOT need to copy an earlier step's output into a later step's prompt. By default the server prepends every earlier step's agent, label, status and output to each step, so a later step can act on what came before. Write each prompt as the instruction for ITS OWN step.
754
- 4. To control that instead, put {{previous}} in a prompt for just the previous step's output, or {{history}} for all of them. Using either one REPLACES the automatic block rather than adding to it.
755
- 5. A step that COMPLETES has succeeded, whatever it says. If a verifier step comes back saying the work failed, the plan still ran to the end - read its output, then decide whether to run another round yourself. The server does not judge results for you.
756
- 6. onFailure controls what happens when a step FAILS TO RUN: stop (the default) ends the plan and reports which step failed; skip goes past it and tells the next step it was skipped; retry:N tries it again up to N more times.
757
- 7. label is optional and is only ever shown to the user. Say what the step is FOR in three or four words.
758
- 8. agentId must be one of the dispatchable sub-agent types listed below.`;
758
+ 1. This call BLOCKS until the whole plan finishes, and every step is a separate sub-agent process that takes minutes.
759
+ 2. Steps run IN ORDER, one at a time. Each is a fresh subagent with a fresh context and no authority to change the plan.
760
+ 3. Earlier step output is prepended by default. {{previous}} selects only the nearest prior output and {{history}} selects all of it; either suppresses the automatic block.
761
+ 4. Inside a loop body, {{last}} is the previous round's last node output (empty in round one). Inside foreach, {{item}} is the current primary-supplied item. These are plain string substitutions, not expressions.
762
+ 5. loop.until is matched by the SERVER against the LAST LINE of this round's last node output. The comparison is an EXACT WHOLE-LINE match after trimming whitespace: "结论:通过" does NOT match until="通过". Missing output or no conclusion line means false, not an error. At most max rounds run.
763
+ 6. onFailure controls a step that FAILS TO RUN: stop (default), skip, or retry:N. This is separate from the textual conclusion matched by until.
764
+ 7. label is optional and is only shown to the user. agentId must be one of the dispatchable sub-agent types listed for the task tool.`;
759
765
 
760
766
  /** What the extension knows about the workflow endpoint before it can call anything. */
761
767
  export type WorkflowToolConfig = {
@@ -791,7 +797,9 @@ export function readWorkflowConfig(env: Record<string, string | undefined>): Wor
791
797
  export function refuseWorkflow(config: WorkflowToolConfig, params: WorkflowParams): string | undefined {
792
798
  if (!config.endpoint) return `The workflow tool is not available in this session: ${WORKFLOW_ENDPOINT_ENV} is not set, so there is no Super Pi server to run the plan. Use the task tool, or do the steps yourself.`;
793
799
  if (!config.conversationId) return `The workflow tool is not available in this session: ${TASK_CONVERSATION_ENV} is not set. Use the task tool, or do the steps yourself.`;
794
- if (!Array.isArray(params.steps) || !params.steps.length) return "workflow requires a non-empty `steps` array. For a single sub-agent, use the task tool instead.";
800
+ if (!Array.isArray(params.steps) && !Array.isArray(params.nodes)) return "workflow requires a non-empty `steps` array or a recursive `nodes` array. For a single sub-agent, use the task tool instead.";
801
+ if (Array.isArray(params.steps) && !params.steps.length) return "workflow.steps was empty. For a single sub-agent, use the task tool instead.";
802
+ if (Array.isArray(params.nodes) && !params.nodes.length) return "workflow.nodes was empty. Add at least one step, loop or foreach node.";
795
803
  return undefined;
796
804
  }
797
805
 
@@ -881,6 +889,7 @@ export async function executeWorkflow(
881
889
  summary: params.summary,
882
890
  onFailure: params.onFailure,
883
891
  steps: params.steps,
892
+ nodes: params.nodes,
884
893
  capability: config.capability,
885
894
  }),
886
895
  ...(deps.signal ? { signal: deps.signal } : {}),
@@ -1149,7 +1158,8 @@ WHEN NOT TO USE THIS:
1149
1158
  Usage notes:
1150
1159
  1. Spawning is ASYNCHRONOUS by default: it creates the conversation, enqueues the initial task, and returns the new conversationId immediately. The sibling session runs in the background.
1151
1160
  2. The initial task should provide clear context and goals since the new session starts with a fresh conversation history.
1152
- 3. Use session_status with the returned conversationId to check progress, or session_dispatch to send further messages.`;
1161
+ 3. Use session_status with the returned conversationId to check progress, or session_dispatch to send further messages.
1162
+ 4. The new session reports completion to its DIRECT parent automatically. 'parentConversationId' optionally selects that parent; by default it is the calling session.`;
1153
1163
 
1154
1164
  /** Model-facing description for session_status. */
1155
1165
  export const SESSION_STATUS_DESCRIPTION = `Inspect the progress, run state, and latest activity of sibling conversations created by the orchestrator.
@@ -1161,8 +1171,8 @@ WHEN TO USE THIS:
1161
1171
 
1162
1172
  Usage notes:
1163
1173
  1. When 'conversationId' is provided: returns a compact summary for that specific session, including its run status ('idle', 'running', 'waiting', 'stopped', 'failed'), messageCount, turnCount, lastAssistantSnippet, lastUserSnippet, activeTool, and error (if any).
1164
- 2. When 'conversationId' is omitted: returns a summary list of ALL sibling conversations spawned by this orchestrator session.
1165
- 3. This tool never returns full transcripts; it returns concise summaries and snippets to keep your context window lean.`;
1174
+ 2. When 'conversationId' is omitted: returns a summary list of sibling conversations whose direct parent is 'parentConversationId' (the calling session by default).
1175
+ 3. By default it never returns full transcripts; concise summaries keep your context window lean. Set 'includeOutput' with a conversationId to read the final output from its result file, capped to the last 64Ki characters with an explicit truncation notice.`;
1166
1176
 
1167
1177
  /** Model-facing description for session_dispatch. */
1168
1178
  export const SESSION_DISPATCH_DESCRIPTION = `Send a message, follow-up instructions, or steering guidance to an existing sibling conversation.
@@ -1211,11 +1221,15 @@ export type OrchestratorSessionSummary = {
1211
1221
  updatedAt: string;
1212
1222
  createdAt?: number;
1213
1223
  lastProgress?: string;
1224
+ output?: string;
1225
+ outputPath?: string;
1226
+ outputTruncated?: boolean;
1214
1227
  };
1215
1228
 
1216
1229
  export type OrchestratorToolConfig = {
1217
1230
  endpoint: string;
1218
1231
  conversationId: string;
1232
+ parentConversationId?: string;
1219
1233
  token?: string;
1220
1234
  capability?: string;
1221
1235
  };
@@ -1224,9 +1238,11 @@ export type OrchestratorToolConfig = {
1224
1238
  export function readOrchestratorConfig(env: Record<string, string | undefined>): OrchestratorToolConfig {
1225
1239
  const token = env.SUPER_PI_ACCESS_TOKEN;
1226
1240
  const capability = env[TASK_CAPABILITY_ENV];
1241
+ const parentConversationId = env[PARENT_CONVERSATION_ENV];
1227
1242
  return {
1228
1243
  endpoint: env[ORCHESTRATOR_ENDPOINT_ENV] ?? "",
1229
1244
  conversationId: env[TASK_CONVERSATION_ENV] ?? "",
1245
+ ...(parentConversationId ? { parentConversationId } : {}),
1230
1246
  ...(token ? { token } : {}),
1231
1247
  ...(capability ? { capability } : {}),
1232
1248
  };
@@ -1234,6 +1250,7 @@ export function readOrchestratorConfig(env: Record<string, string | undefined>):
1234
1250
 
1235
1251
  export type SessionSpawnParams = {
1236
1252
  task: string;
1253
+ parentConversationId?: string;
1237
1254
  title?: string;
1238
1255
  agentId?: string;
1239
1256
  thinkingLevel?: string;
@@ -1242,6 +1259,8 @@ export type SessionSpawnParams = {
1242
1259
 
1243
1260
  export type SessionStatusParams = {
1244
1261
  conversationId?: string;
1262
+ parentConversationId?: string;
1263
+ includeOutput?: boolean;
1245
1264
  };
1246
1265
 
1247
1266
  export type SessionDispatchParams = {
@@ -1290,7 +1309,8 @@ export async function executeSessionSpawn(
1290
1309
  agentId: params.agentId?.trim() || undefined,
1291
1310
  thinkingLevel: params.thinkingLevel?.trim() || undefined,
1292
1311
  wait: Boolean(params.wait),
1293
- parentConversationId: config.conversationId || undefined,
1312
+ callerConversationId: config.conversationId || undefined,
1313
+ parentConversationId: params.parentConversationId?.trim() || config.conversationId || undefined,
1294
1314
  capability: config.capability,
1295
1315
  }),
1296
1316
  ...(deps.signal ? { signal: deps.signal } : {}),
@@ -1350,7 +1370,9 @@ export async function executeSessionStatus(
1350
1370
  body: JSON.stringify({
1351
1371
  action: targetId ? "status" : "list",
1352
1372
  conversationId: targetId || undefined,
1353
- parentConversationId: config.conversationId || undefined,
1373
+ includeOutput: Boolean(params.includeOutput),
1374
+ callerConversationId: config.conversationId || undefined,
1375
+ parentConversationId: params.parentConversationId?.trim() || config.conversationId || undefined,
1354
1376
  capability: config.capability,
1355
1377
  }),
1356
1378
  ...(deps.signal ? { signal: deps.signal } : {}),
@@ -1380,6 +1402,11 @@ export async function executeSessionStatus(
1380
1402
  ...(s.error ? [`- Error: ${s.error}`] : []),
1381
1403
  ...(s.lastAssistantSnippet ? [`- Latest Assistant Progress: "${s.lastAssistantSnippet}"`] : []),
1382
1404
  ...(s.lastUserSnippet ? [`- Latest User/Prompt Snippet: "${s.lastUserSnippet}"`] : []),
1405
+ ...(s.output !== undefined ? [
1406
+ `- Output File: ${s.outputPath ?? "unavailable"}`,
1407
+ ...(s.outputTruncated ? ["- Output was truncated to the last 64Ki characters; read the output file for the complete result."] : []),
1408
+ `<session_output>\n${s.output}\n</session_output>`,
1409
+ ] : []),
1383
1410
  ];
1384
1411
  return text(lines.join("\n"));
1385
1412
  }
@@ -1436,6 +1463,7 @@ export async function executeSessionDispatch(
1436
1463
  conversationId: params.conversationId.trim(),
1437
1464
  content: params.content.trim(),
1438
1465
  wait: Boolean(params.wait),
1466
+ callerConversationId: config.conversationId || undefined,
1439
1467
  parentConversationId: config.conversationId || undefined,
1440
1468
  capability: config.capability,
1441
1469
  }),
@@ -1492,6 +1520,7 @@ export async function executeSessionStop(
1492
1520
  conversationId: params.conversationId.trim(),
1493
1521
  mode: params.mode ?? "all",
1494
1522
  messageId: params.messageId?.trim() || undefined,
1523
+ callerConversationId: config.conversationId || undefined,
1495
1524
  parentConversationId: config.conversationId || undefined,
1496
1525
  capability: config.capability,
1497
1526
  }),
@@ -1515,4 +1544,3 @@ export async function executeSessionStop(
1515
1544
  return text(`session_stop network error: ${error instanceof Error ? error.message : String(error)}`, true);
1516
1545
  }
1517
1546
  }
1518
-
@@ -132,14 +132,77 @@ type ExtensionToolDefinition = {
132
132
  * enum here would be a second list that could disagree with `parseFailurePolicy`, and the message a model
133
133
  * gets for a bad value is better written by the side that knows the real options.
134
134
  */
135
+ /**
136
+ * THE RECURSIVE NODE SCHEMA.
137
+ *
138
+ * WHY IT IS WRITTEN AS RAW JSON SCHEMA RATHER THAN `Type.Recursive`.
139
+ *
140
+ * Pi hands extensions its OWN typebox as a VIRTUAL MODULE - `virtual-modules.ts` maps both
141
+ * `typebox` and `@sinclair/typebox` to the bundled `typebox` package, which on this host is
142
+ * **1.3.27**. That version has `Type.Unsafe`, `Type.Ref` and `Type.Any`, but it does NOT have
143
+ * `Type.Recursive`: the function arrived in typebox 0.34 and the 1.x line dropped it.
144
+ *
145
+ * Using it anyway fails at LOAD time, not at call time, and it fails for everything:
146
+ *
147
+ * Failed to load extension ".../agents/super-pi-task/index.ts":
148
+ * Failed to load extension: _typebox.Type.Recursive is not a function
149
+ *
150
+ * An extension that does not load takes Pi's whole extension host with it - every Super Pi tool
151
+ * disappears, not just this one. So the schema is written as the JSON Schema it actually is,
152
+ * with a `$ref` back to its own `$id`, which is what `Type.Recursive` would have produced anyway.
153
+ *
154
+ * `$defs` is not used: the `$ref` is relative to the root of THIS schema, and the root carries the
155
+ * `$id` the reference names.
156
+ */
157
+ const WorkflowNodeParameters = Type.Unsafe({
158
+ $id: "WorkflowNode",
159
+ type: "object",
160
+ required: ["kind"],
161
+ properties: {
162
+ kind: { type: "string", enum: ["step", "loop", "foreach"] },
163
+ },
164
+ anyOf: [
165
+ {
166
+ type: "object",
167
+ required: ["kind", "agentId", "prompt"],
168
+ properties: {
169
+ kind: { const: "step" },
170
+ agentId: { type: "string", description: "The dispatchable sub-agent type to run, e.g. scout" },
171
+ label: { type: "string", description: "3-4 words saying what this step is FOR, shown to the user only" },
172
+ prompt: { type: "string", description: "The instruction for this step. Supports {{item}}, {{last}}, {{previous}} and {{history}} substitutions." },
173
+ },
174
+ },
175
+ {
176
+ type: "object",
177
+ required: ["kind", "until", "do"],
178
+ properties: {
179
+ kind: { const: "loop" },
180
+ until: { type: "string", description: "Exact conclusion line to match after trimming the final output line, e.g. 通过" },
181
+ max: { type: "integer", minimum: 1, maximum: 100, description: "Maximum rounds; defaults to 8" },
182
+ do: { type: "array", minItems: 1, items: { $ref: "WorkflowNode" }, description: "One or more nodes to rerun before each until check" },
183
+ },
184
+ },
185
+ {
186
+ type: "object",
187
+ required: ["kind", "items", "do"],
188
+ properties: {
189
+ kind: { const: "foreach" },
190
+ items: { type: "array", minItems: 1, items: { type: "string" }, description: "Explicit list supplied by the primary agent; the server never discovers it" },
191
+ do: { type: "array", minItems: 1, items: { $ref: "WorkflowNode" }, description: "One or more nodes to run once per item; prompts may use {{item}}" },
192
+ },
193
+ },
194
+ ],
195
+ });
196
+
135
197
  const WorkflowParameters = Type.Object({
136
198
  summary: Type.String({ description: "One line saying what this whole plan is for, shown to the user above the timeline" }),
137
199
  onFailure: Type.Optional(Type.String({ description: "What to do when a step FAILS TO RUN: stop (default), skip, retry:1, retry:2 or retry:3" })),
138
- steps: Type.Array(Type.Object({
200
+ steps: Type.Optional(Type.Array(Type.Object({
139
201
  agentId: Type.String({ description: "The dispatchable sub-agent type to run, e.g. scout" }),
140
202
  label: Type.Optional(Type.String({ description: "3-4 words saying what this step is FOR, shown to the user only" })),
141
203
  prompt: Type.String({ description: "The instruction for THIS step alone. Earlier steps' output is added for you." }),
142
- }), { minItems: 1, maxItems: 8, description: "The steps, in the order they should run" }),
204
+ }), { minItems: 1, maxItems: 8, description: "Legacy flat steps, equivalent to step nodes" })),
205
+ nodes: Type.Optional(Type.Array(WorkflowNodeParameters, { minItems: 1, description: "Recursive step/loop/foreach plan; use this OR legacy steps, not both" })),
143
206
  });
144
207
 
145
208
  type ExtensionApi = { registerTool(tool: ExtensionToolDefinition): void; on(eventName: string, handler: (event: any) => unknown): void };
@@ -301,7 +364,7 @@ const extension = (pi: ExtensionApi): void => {
301
364
  name: WORKFLOW_TOOL_NAME,
302
365
  label: "Workflow",
303
366
  description: WORKFLOW_DESCRIPTION,
304
- promptSnippet: "run an ordered plan of sub-agents, each handed the previous step's output",
367
+ promptSnippet: "run recursive sub-agent steps, bounded loops and explicit foreach batches",
305
368
  parameters: WorkflowParameters,
306
369
  execute: async (_toolCallId, params, signal) =>
307
370
  await executeWorkflow(params as WorkflowParams, workflowConfig, { signal: signal ?? undefined }),
@@ -386,6 +449,9 @@ const extension = (pi: ExtensionApi): void => {
386
449
  task: Type.String({
387
450
  description: "The high-level task or instructions to be performed by the new sibling session. This is sent as the initial prompt.",
388
451
  }),
452
+ parentConversationId: Type.Optional(Type.String({
453
+ description: "Optional explicit parent conversation. Defaults to the calling session; completion is reported to this direct parent.",
454
+ })),
389
455
  title: Type.Optional(Type.String({
390
456
  description: "An optional title for the new sibling conversation in the sidebar. If omitted, derived from task.",
391
457
  })),
@@ -402,7 +468,13 @@ const extension = (pi: ExtensionApi): void => {
402
468
 
403
469
  const SessionStatusParameters = Type.Object({
404
470
  conversationId: Type.Optional(Type.String({
405
- description: "The ID of the sibling conversation to inspect. Omit to list all sibling conversations created under this session.",
471
+ description: "The ID of the sibling conversation to inspect. Omit to list sibling conversations.",
472
+ })),
473
+ parentConversationId: Type.Optional(Type.String({
474
+ description: "When listing, only return sessions whose direct parent has this ID. Defaults to the calling session.",
475
+ })),
476
+ includeOutput: Type.Optional(Type.Boolean({
477
+ description: "For a single session, include its final output from the result file, capped to the last 64Ki characters with an explicit truncation notice.",
406
478
  })),
407
479
  });
408
480
 
@@ -1,4 +1,4 @@
1
1
  {
2
- "hash": "aa2389a08b57c3e44e8e8a729ba50777741e8858a30683f8b33d204bb77148d2",
3
- "recordedAt": "2026-10-29T20:17:06.595Z"
2
+ "hash": "9e67503264b613b64975e4b82bc3116822935b4d32bdb24e03a52add2c3546f0",
3
+ "recordedAt": "2026-10-30T03:44:00.722Z"
4
4
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "hash": "dc35fc4efbe651b1c1dce4dbdbb81073433a0adab5094dde3f5f7911a57e4daa",
2
+ "hash": "6e02271225a5fee0e02a84709420af4f23d973547617d65966eac4da55c63cde",
3
3
  "files": {
4
- "src/client/App.tsx": "f136b1f0f5189450a5d301dd509d5d9918385606535def32093f856b05fece5d",
4
+ "src/client/App.tsx": "6dfe15b15c936b215bda0f8b1f177beccd4dcf2533e2459eb133dded20e4f4f1",
5
5
  "src/client/CodeMirrorEditor.tsx": "b6b6479effa1482eda710f04a26f3af843515526e129ca5bc70692cca9074b09",
6
6
  "src/client/ErrorBoundary.tsx": "d16376f9f6c7cc1fab8590c65a66438127642f7d6bb8023cec53d8a6cc9f3964",
7
7
  "src/client/FeishuPanel.tsx": "52f116eba265bfde683338f5893107ad5559fd2f7d4a9e0df935507a46862a3b",
@@ -12,11 +12,11 @@
12
12
  "src/client/KnowledgePanel.tsx": "4f7230cfe610cd86d63aa143c82f6195b3c4208ef0bea703f92104ef27237704",
13
13
  "src/client/MarkdownView.tsx": "4f04a8f3c9381946e5d2f957ac4fb74a6b16272e90375fb4dc6bd3a43d7c744d",
14
14
  "src/client/MemoryPanel.tsx": "2cc1f4ee709f6d56ede8b0ceced228ea4c935cfd1cc803275558dbbd5f5244fb",
15
- "src/client/ScheduledTasksPanel.tsx": "eb05526241ba9072acd4ee7c08425e89a2054493ec7017f7041f01879971c224",
15
+ "src/client/ScheduledTasksPanel.tsx": "83a97794ed99b25a3175ed31ea3fb096976311566b03ddcc975685378d78a217",
16
16
  "src/client/SlashCommandMenu.tsx": "69cd0a9d5e35f41f703e91a845e5bd750c952d2957be03b5528e156e60bf6ecb",
17
17
  "src/client/Tabs.tsx": "53323a198c0948887cb0cd018284ecd5c9b36025364484a91426f8e1e2198000",
18
18
  "src/client/TerminalPanel.tsx": "6a8dbb0e0806ccfef6fd67ae16f580177dca9a7a8943fd5b801da555e424ad72",
19
- "src/client/WorkflowCard.tsx": "451e22b492e12ad3d7040c4a1af67477bb974137c18a6873574644fefcebdefe",
19
+ "src/client/WorkflowCard.tsx": "8ce5458537a3b02dcbb9bbb4c7afacb07e0f41857ed250aa4cde0cbc8d4bde6c",
20
20
  "src/client/editor-blame.ts": "db504141cf6f8beb5ce020e9b4016b219ace817cf78b1d71cd98d5862ca2b985",
21
21
  "src/client/editor-languages.ts": "d5319cfd9b9f3b07c2599ba64ec49a9038304d09fa1702302f3b2b97493d0a69",
22
22
  "src/client/errors.ts": "e2e3b417a02eca0870237f5f502041a06a91a56d3d508161b1afca4dd6101889",
@@ -27,13 +27,13 @@
27
27
  "src/client/pending-operations.ts": "8a5f9e9711c0f875c8ed194196c218162de5270298dad4091351d41294c859d7",
28
28
  "src/client/session-tree.ts": "affc00d2264926d615a38e458a89d3a8c651b74135bbfe004d0a9be9b14a0c86",
29
29
  "src/client/slash-commands.ts": "b792018fb67bd9e6f777397b0720b8b3aa565a4d8f7a76f94fec097ddf749480",
30
- "src/client/styles.css": "906f13b1c97caf01af2a1568e894a0f69fcc55d68f636dda749b0d1889ae63cb",
30
+ "src/client/styles.css": "22af9fb99215009f927197900d264bcd58e5e16e78e22928b769b20e92cfd9f4",
31
31
  "src/client/terminal-emulator.ts": "ffcc4f5fbddaf25cebcc9e03dbe5d7d0ad2c21586f5d169e57c04c82e2308b3b",
32
32
  "src/client/theme.tsx": "5892479a802f41e7d45adeb5170efbf555b240f8581528bcde7bf2d99c635010",
33
33
  "src/client/tool-sharing.ts": "679c97f6d40be466964f2f1076aa7ea55f4a585c3deff8214675070220921059",
34
34
  "src/client/tools.ts": "58fe41f0edbd490e3fab7f12f258b1dbc2163b653553b03ac61caf1543618e50",
35
- "src/client/types.ts": "a17cbcdaa910b03eeea62fc149f0a736937fc1f5932ad63787058307c740b2d8",
35
+ "src/client/types.ts": "24fb82b292b852f3fedc166a5fcf710724f9f29ebbda5d1abe04c8158bdcef6a",
36
36
  "src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
37
37
  },
38
- "recordedAt": "2026-10-29T20:24:16.243Z"
38
+ "recordedAt": "2026-10-30T03:50:50.467Z"
39
39
  }
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-ic-MopV2.js","assets/dist-Nt-BWmBB.js","assets/index-CX5gWDve.js","assets/index-DMhigTiY.css","assets/dist-CtCiGxne.js","assets/dist-Dq6y_nK3.js","assets/dist-B4JqBNQI.js","assets/dist-BA6EsWzo.js","assets/dist-Cfa_e2VZ.js","assets/dist-Bt8G7e7e.js","assets/dist-Dxq1s4j3.js","assets/dist-DEUl3Yqk.js","assets/dist-DbLEngKN.js","assets/dist-JuLMNOUt.js","assets/dist-Df9zcCXs.js","assets/dist-B8FbKhnf.js","assets/dist-Bj2C-QqM.js","assets/dist-F634gv7V.js","assets/dist-CWBm3q4a.js","assets/dist-rIYPNzbY.js","assets/dist-CoTJns5x.js","assets/dist-DHyWJ9kA.js","assets/dist-0dCNvYEE.js","assets/dist-DBAoCOnn.js"])))=>i.map(i=>d[i]);
2
- import{a as e,i as t,n,r,s as i,t as a}from"./index-CX5gWDve.js";var o=i(e(),1);async function s(e,t){let[{StreamLanguage:n},i]=await Promise.all([r(()=>import(`./dist-ic-MopV2.js`),__vite__mapDeps([0,1,2,3,4,5])),e()]),a=i[t]??i.default??i;return n.define(a)}var c={cpp:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cc:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cxx:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hpp:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hh:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hxx:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),c:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),h:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cu:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cuh:()=>r(()=>import(`./dist-B4JqBNQI.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),js:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),jsx:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mjs:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cjs:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),ts:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),tsx:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mts:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cts:()=>r(()=>import(`./dist-Cfa_e2VZ.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),py:()=>r(()=>import(`./dist-Dxq1s4j3.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),pyi:()=>r(()=>import(`./dist-Dxq1s4j3.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),java:()=>r(()=>import(`./dist-DEUl3Yqk.js`).then(e=>e.java()),__vite__mapDeps([11,5,2,3,0,1,4,7])),php:()=>r(()=>import(`./dist-DbLEngKN.js`).then(e=>e.php()),__vite__mapDeps([12,5,2,3,0,1,4,7,13,14,8,9])),sql:()=>r(()=>import(`./dist-B8FbKhnf.js`).then(e=>e.sql()),__vite__mapDeps([15,5,2,3,0,1,4,7,9])),yaml:()=>r(()=>import(`./dist-Bj2C-QqM.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),yml:()=>r(()=>import(`./dist-Bj2C-QqM.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),xml:()=>r(()=>import(`./dist-F634gv7V.js`).then(e=>e.xml()),__vite__mapDeps([17,1,2,3,4,5,0,7])),json:()=>r(()=>import(`./dist-CWBm3q4a.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),jsonc:()=>r(()=>import(`./dist-CWBm3q4a.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),json5:()=>r(()=>import(`./dist-CWBm3q4a.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),html:()=>r(()=>import(`./dist-JuLMNOUt.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),htm:()=>r(()=>import(`./dist-JuLMNOUt.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),vue:()=>r(()=>import(`./dist-JuLMNOUt.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),svelte:()=>r(()=>import(`./dist-JuLMNOUt.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),css:()=>r(()=>import(`./dist-Df9zcCXs.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([14,2,3,5,0,1,4,7])),md:()=>r(()=>import(`./dist-rIYPNzbY.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),markdown:()=>r(()=>import(`./dist-rIYPNzbY.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),mdx:()=>r(()=>import(`./dist-rIYPNzbY.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),rs:()=>r(()=>import(`./dist-CoTJns5x.js`).then(e=>e.rust()),__vite__mapDeps([20,5,2,3,0,1,4,7])),go:()=>r(()=>import(`./dist-DHyWJ9kA.js`).then(e=>e.go()),__vite__mapDeps([21,5,2,3,0,1,4,7,9])),sh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>r(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>r(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>r(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>r(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`)},l={cpp:`C++`,cc:`C++`,cxx:`C++`,hpp:`C++`,hh:`C++`,hxx:`C++`,cu:`CUDA C++`,cuh:`CUDA C++`,c:`C`,h:`C/C++ Header`,js:`JavaScript`,jsx:`JSX`,mjs:`JavaScript`,cjs:`JavaScript`,ts:`TypeScript`,tsx:`TSX`,mts:`TypeScript`,cts:`TypeScript`,py:`Python`,pyi:`Python Stub`,java:`Java`,php:`PHP`,sql:`SQL`,yaml:`YAML`,yml:`YAML`,xml:`XML`,json:`JSON`,jsonc:`JSON with Comments`,json5:`JSON5`,css:`CSS`,md:`Markdown`,markdown:`Markdown`,mdx:`MDX`,rs:`Rust`,go:`Go`,html:`HTML`,htm:`HTML`,vue:`Vue`,svelte:`Svelte`,sh:`Shell`,bash:`Bash`,zsh:`Zsh`,fish:`Fish`,ps1:`PowerShell`,psm1:`PowerShell`,rb:`Ruby`,swift:`Swift`,toml:`TOML`,ini:`INI`,cfg:`Config`,conf:`Config`,properties:`Properties`,dockerfile:`Dockerfile`,diff:`Diff`,patch:`Patch`};function u(e){return c[e.toLowerCase()]}function d(e){return l[e.toLowerCase()]}var f=t(),p=262144,m=131072;function h(e){return e.split(`.`).pop()?.toLowerCase()??``}function g(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function _(e,t){return e.HighlightStyle.define([{tag:t.tags.keyword,color:g(`--cm-keyword`)},{tag:t.tags.string,color:g(`--cm-string`)},{tag:t.tags.number,color:g(`--cm-number`)},{tag:t.tags.comment,color:g(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:g(`--cm-function`)},{tag:t.tags.typeName,color:g(`--cm-type`)},{tag:t.tags.className,color:g(`--cm-type`)},{tag:t.tags.propertyName,color:g(`--cm-property`)},{tag:t.tags.operator,color:g(`--cm-operator`)},{tag:t.tags.variableName,color:g(`--cm-variable`)}])}function v({path:e,value:t,onChange:i,jumpToLine:s,onSave:c,workspaceId:l,blame:g}){let v=(0,o.useRef)(null),y=(0,o.useRef)(null),b=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)(null),T=(0,o.useRef)(null),E=(0,o.useRef)(i),D=(0,o.useRef)(c);E.current=i,D.current=c;let[O,k]=(0,o.useState)(!1),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(`0,0`),[P,F]=(0,o.useState)(0);(0,o.useEffect)(()=>{let i=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,O,A,M,P,I,L]=await Promise.all([r(()=>import(`./dist-Nt-BWmBB.js`).then(e=>e.x),__vite__mapDeps([1,2,3])),r(()=>import(`./dist-CtCiGxne.js`).then(e=>e.s),__vite__mapDeps([4,2,3,1])),r(()=>import(`./dist-0dCNvYEE.js`),__vite__mapDeps([22,1,2,3,4,5,0])),r(()=>import(`./dist-DBAoCOnn.js`),__vite__mapDeps([23,1,2,3,4])),r(()=>import(`./dist-ic-MopV2.js`),__vite__mapDeps([0,1,2,3,4,5])),r(()=>import(`./dist-Dq6y_nK3.js`).then(e=>e.n),__vite__mapDeps([5,2,3])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),n().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(i||!v.current)return;c=M,l=P,x.current=m.Annotation.define(),S.current=m.Transaction.addToHistory;let R=t.length<=p&&I!==null;o=new m.Compartment;let z=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),O.history(),g.keymap.of([O.indentWithTab,...O.defaultKeymap,...O.historyKeymap,...A.searchKeymap,{key:`Mod-s`,run:()=>(D.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(x.current&&e.transactions.some(e=>e.annotation(x.current)===!0))&&E.current(e.state.doc.toString()),e.selectionSet&&N(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(L&&(s=new m.Compartment,z.splice(1,0,s.of([])),z.push(L.base)),I)try{z.push(I)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),R=!1}if(R&&o&&c&&l)try{z.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),R=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:z}),parent:v.current}),i){a.destroy();return}y.current=a,k(R),j(!0),C.current=L,w.current=s??null,T.current=null,F(e=>e+1);let B=new MutationObserver(()=>{let e=y.current;if(e&&R&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});b.current=B,B.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),i||j(!0)}})(),()=>{i=!0,b.current?.disconnect(),b.current=null,a?.destroy(),y.current=null,j(!1),v.current&&(v.current.textContent=``)}},[e]),(0,o.useEffect)(()=>{let e=y.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:x.current?x.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=y.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines));e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),e.focus()},[s,A]);let I=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=y.current,n=C.current,r=w.current;if(!t||!n||!r)return;let i=g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l?g.response:null,o=i?a(i):null;T.current!==o&&(T.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,P]);let L=y.current?.state.doc.toString()??t,R=L.length<=m?L:L.slice(0,m),z=h(e),B=d(z);return(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":R,"data-file-content-truncated":L.length>m?`1`:`0`,"data-file-selection":M,"data-file-editor-ready":A?`1`:`0`,"data-file-blame-gutter":I?`1`:void 0,onMouseDown:()=>y.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:v,"aria-label":`编辑 ${e}`}),!A&&(0,f.jsx)(`span`,{className:`file-cm-status`,"data-file-editor-loading":`1`,children:`⌛ 正在加载编辑器…`}),A&&!O&&(0,f.jsx)(`span`,{className:`file-cm-status`,"data-file-highlight-status":`plain`,children:`纯文本`}),A&&O&&B&&(0,f.jsx)(`span`,{className:`file-cm-status file-cm-status-lang`,"data-file-highlight-status":z,children:B})]})}export{v as CodeMirrorEditor};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-CbjfwVs-.js","assets/dist-hmP8KP8-.js","assets/index-iSnWwgJ-.js","assets/index-6h_u-X47.css","assets/dist-D60BDUMe.js","assets/dist-BKsr7wc2.js","assets/dist-oz2WOWPd.js","assets/dist-H0dUhAgy.js","assets/dist-jV9tqAoC.js","assets/dist-DBbQHcwG.js","assets/dist-B_uWAP2-.js","assets/dist-BwwacXyS.js","assets/dist-Dsj0Q8gO.js","assets/dist-CoEavaUe.js","assets/dist-oqETQw0G.js","assets/dist-MZSBP_1m.js","assets/dist-BK_KWsQr.js","assets/dist-BXQWaRci.js","assets/dist-PNt22XLU.js","assets/dist-S5UwGLvb.js","assets/dist-CWd7iD1S.js","assets/dist-_jioFcsD.js","assets/dist-DVEBhaUf.js","assets/dist-Db6KH9Qv.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,i as t,n,r,s as i,t as a}from"./index-iSnWwgJ-.js";var o=i(e(),1);async function s(e,t){let[{StreamLanguage:n},i]=await Promise.all([r(()=>import(`./dist-CbjfwVs-.js`),__vite__mapDeps([0,1,2,3,4,5])),e()]),a=i[t]??i.default??i;return n.define(a)}var c={cpp:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cc:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cxx:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hpp:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hh:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hxx:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),c:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),h:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cu:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cuh:()=>r(()=>import(`./dist-oz2WOWPd.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),js:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),jsx:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mjs:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cjs:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),ts:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),tsx:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mts:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cts:()=>r(()=>import(`./dist-jV9tqAoC.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),py:()=>r(()=>import(`./dist-B_uWAP2-.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),pyi:()=>r(()=>import(`./dist-B_uWAP2-.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),java:()=>r(()=>import(`./dist-BwwacXyS.js`).then(e=>e.java()),__vite__mapDeps([11,5,2,3,0,1,4,7])),php:()=>r(()=>import(`./dist-Dsj0Q8gO.js`).then(e=>e.php()),__vite__mapDeps([12,5,2,3,0,1,4,7,13,14,8,9])),sql:()=>r(()=>import(`./dist-MZSBP_1m.js`).then(e=>e.sql()),__vite__mapDeps([15,5,2,3,0,1,4,7,9])),yaml:()=>r(()=>import(`./dist-BK_KWsQr.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),yml:()=>r(()=>import(`./dist-BK_KWsQr.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),xml:()=>r(()=>import(`./dist-BXQWaRci.js`).then(e=>e.xml()),__vite__mapDeps([17,1,2,3,4,5,0,7])),json:()=>r(()=>import(`./dist-PNt22XLU.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),jsonc:()=>r(()=>import(`./dist-PNt22XLU.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),json5:()=>r(()=>import(`./dist-PNt22XLU.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),html:()=>r(()=>import(`./dist-CoEavaUe.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),htm:()=>r(()=>import(`./dist-CoEavaUe.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),vue:()=>r(()=>import(`./dist-CoEavaUe.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),svelte:()=>r(()=>import(`./dist-CoEavaUe.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),css:()=>r(()=>import(`./dist-oqETQw0G.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([14,2,3,5,0,1,4,7])),md:()=>r(()=>import(`./dist-S5UwGLvb.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),markdown:()=>r(()=>import(`./dist-S5UwGLvb.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),mdx:()=>r(()=>import(`./dist-S5UwGLvb.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),rs:()=>r(()=>import(`./dist-CWd7iD1S.js`).then(e=>e.rust()),__vite__mapDeps([20,5,2,3,0,1,4,7])),go:()=>r(()=>import(`./dist-_jioFcsD.js`).then(e=>e.go()),__vite__mapDeps([21,5,2,3,0,1,4,7,9])),sh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>r(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>r(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>r(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>r(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`)},l={cpp:`C++`,cc:`C++`,cxx:`C++`,hpp:`C++`,hh:`C++`,hxx:`C++`,cu:`CUDA C++`,cuh:`CUDA C++`,c:`C`,h:`C/C++ Header`,js:`JavaScript`,jsx:`JSX`,mjs:`JavaScript`,cjs:`JavaScript`,ts:`TypeScript`,tsx:`TSX`,mts:`TypeScript`,cts:`TypeScript`,py:`Python`,pyi:`Python Stub`,java:`Java`,php:`PHP`,sql:`SQL`,yaml:`YAML`,yml:`YAML`,xml:`XML`,json:`JSON`,jsonc:`JSON with Comments`,json5:`JSON5`,css:`CSS`,md:`Markdown`,markdown:`Markdown`,mdx:`MDX`,rs:`Rust`,go:`Go`,html:`HTML`,htm:`HTML`,vue:`Vue`,svelte:`Svelte`,sh:`Shell`,bash:`Bash`,zsh:`Zsh`,fish:`Fish`,ps1:`PowerShell`,psm1:`PowerShell`,rb:`Ruby`,swift:`Swift`,toml:`TOML`,ini:`INI`,cfg:`Config`,conf:`Config`,properties:`Properties`,dockerfile:`Dockerfile`,diff:`Diff`,patch:`Patch`};function u(e){return c[e.toLowerCase()]}function d(e){return l[e.toLowerCase()]}var f=t(),p=262144,m=131072;function h(e){return e.split(`.`).pop()?.toLowerCase()??``}function g(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function _(e,t){return e.HighlightStyle.define([{tag:t.tags.keyword,color:g(`--cm-keyword`)},{tag:t.tags.string,color:g(`--cm-string`)},{tag:t.tags.number,color:g(`--cm-number`)},{tag:t.tags.comment,color:g(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:g(`--cm-function`)},{tag:t.tags.typeName,color:g(`--cm-type`)},{tag:t.tags.className,color:g(`--cm-type`)},{tag:t.tags.propertyName,color:g(`--cm-property`)},{tag:t.tags.operator,color:g(`--cm-operator`)},{tag:t.tags.variableName,color:g(`--cm-variable`)}])}function v({path:e,value:t,onChange:i,jumpToLine:s,onSave:c,workspaceId:l,blame:g}){let v=(0,o.useRef)(null),y=(0,o.useRef)(null),b=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)(null),T=(0,o.useRef)(null),E=(0,o.useRef)(i),D=(0,o.useRef)(c);E.current=i,D.current=c;let[O,k]=(0,o.useState)(!1),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(`0,0`),[P,F]=(0,o.useState)(0);(0,o.useEffect)(()=>{let i=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,O,A,M,P,I,L]=await Promise.all([r(()=>import(`./dist-hmP8KP8-.js`).then(e=>e.x),__vite__mapDeps([1,2,3])),r(()=>import(`./dist-D60BDUMe.js`).then(e=>e.s),__vite__mapDeps([4,2,3,1])),r(()=>import(`./dist-DVEBhaUf.js`),__vite__mapDeps([22,1,2,3,4,5,0])),r(()=>import(`./dist-Db6KH9Qv.js`),__vite__mapDeps([23,1,2,3,4])),r(()=>import(`./dist-CbjfwVs-.js`),__vite__mapDeps([0,1,2,3,4,5])),r(()=>import(`./dist-BKsr7wc2.js`).then(e=>e.n),__vite__mapDeps([5,2,3])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),n().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(i||!v.current)return;c=M,l=P,x.current=m.Annotation.define(),S.current=m.Transaction.addToHistory;let R=t.length<=p&&I!==null;o=new m.Compartment;let z=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),O.history(),g.keymap.of([O.indentWithTab,...O.defaultKeymap,...O.historyKeymap,...A.searchKeymap,{key:`Mod-s`,run:()=>(D.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(x.current&&e.transactions.some(e=>e.annotation(x.current)===!0))&&E.current(e.state.doc.toString()),e.selectionSet&&N(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(L&&(s=new m.Compartment,z.splice(1,0,s.of([])),z.push(L.base)),I)try{z.push(I)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),R=!1}if(R&&o&&c&&l)try{z.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),R=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:z}),parent:v.current}),i){a.destroy();return}y.current=a,k(R),j(!0),C.current=L,w.current=s??null,T.current=null,F(e=>e+1);let B=new MutationObserver(()=>{let e=y.current;if(e&&R&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});b.current=B,B.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),i||j(!0)}})(),()=>{i=!0,b.current?.disconnect(),b.current=null,a?.destroy(),y.current=null,j(!1),v.current&&(v.current.textContent=``)}},[e]),(0,o.useEffect)(()=>{let e=y.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:x.current?x.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=y.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines));e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),e.focus()},[s,A]);let I=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=y.current,n=C.current,r=w.current;if(!t||!n||!r)return;let i=g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l?g.response:null,o=i?a(i):null;T.current!==o&&(T.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,P]);let L=y.current?.state.doc.toString()??t,R=L.length<=m?L:L.slice(0,m),z=h(e),B=d(z);return(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":R,"data-file-content-truncated":L.length>m?`1`:`0`,"data-file-selection":M,"data-file-editor-ready":A?`1`:`0`,"data-file-blame-gutter":I?`1`:void 0,onMouseDown:()=>y.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:v,"aria-label":`编辑 ${e}`}),!A&&(0,f.jsx)(`span`,{className:`file-cm-status`,"data-file-editor-loading":`1`,children:`⌛ 正在加载编辑器…`}),A&&!O&&(0,f.jsx)(`span`,{className:`file-cm-status`,"data-file-highlight-status":`plain`,children:`纯文本`}),A&&O&&B&&(0,f.jsx)(`span`,{className:`file-cm-status file-cm-status-lang`,"data-file-highlight-status":z,children:B})]})}export{v as CodeMirrorEditor};
@@ -1 +1 @@
1
- import{i as e,o as t}from"./dist-Dq6y_nK3.js";import{LRLanguage as n,LanguageSupport as r,delimitedIndent as i,foldInside as a,foldNodeProp as o,indentNodeProp as s}from"./dist-ic-MopV2.js";import{n as c,r as l,t as u}from"./dist-BA6EsWzo.js";var d=63,f=64,p=1,m=2,h=3,g=4,_=5,v=6,y=7,b=65,x=66,ee=8,S=9,C=10,w=11,T=12,E=13,D=19,O=20,k=29,A=33,te=34,ne=47,re=0,j=1,M=2,N=3,P=4,F=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};F.top=new F(null,-1,re);function I(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(R(t)||t==-1)return n}}function L(e){return e==32||e==9}function R(e){return e==10||e==13}function z(e){return L(e)||R(e)}function B(e){return e<0||z(e)}var V=new u({start:F.top,reduce(e,t){return e.type==N&&(t==O||t==te)?e.parent:e},shift(e,t,n,r){if(t==h)return new F(e,I(r,r.pos),j);if(t==b||t==_)return new F(e,I(r,r.pos),M);if(t==d)return e.parent;if(t==D||t==A)return new F(e,0,N);if(t==E&&e.type==P)return e.parent;if(t==ne){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new F(e,e.depth+ +t[0],P)}return e},hash(e){return e.hash}});function H(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&B(e.peek(n+3))}var U=new c((e,t)=>{if(e.next==-1&&t.canShift(f))return e.acceptToken(f);let n=e.peek(-1);if((R(n)||n<0)&&t.context.type!=N){if(H(e,45)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(p,3)}if(H(e,46)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(m,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==j&&(e.next!=45||!B(e.peek(1))))&&e.next!=-1&&!R(e.next)&&e.next!=35&&e.acceptToken(d,-n)}},{contextual:!0}),W=new c((e,t)=>{if(t.context.type==N)e.next==63&&(e.advance(),B(e.next)&&e.acceptToken(y));else if(e.next==45)e.advance(),B(e.next)&&e.acceptToken(t.context.type==j&&t.context.depth==I(e,e.pos-1)?g:h);else if(e.next==63)e.advance(),B(e.next)&&e.acceptToken(t.context.type==M&&t.context.depth==I(e,e.pos-1)?v:_);else{let n=e.pos;for(;;)if(L(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)J(e);else if(e.next==38)Y(e);else if(e.next==42){Y(e);break}else if(e.next==39||e.next==34){if(X(e,!0))break;return}else if(e.next==91||e.next==123){if(!ie(e))return;break}else{$(e,!0,!1,0);break}for(;L(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(k))return;B(e.peek(1))&&e.acceptTokenTo(t.context.type==M&&t.context.depth==I(e,n)?x:b,n)}}},{contextual:!0});function G(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function K(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function q(e,t){return e.next==37?(e.advance(),K(e.next)&&e.advance(),K(e.next)&&e.advance(),!0):G(e.next)||t&&e.next==44?(e.advance(),!0):!1}function J(e){if(e.advance(),e.next==60){for(e.advance();;)if(!q(e,!0)){e.next==62&&e.advance();break}}else for(;q(e,!1););}function Y(e){for(e.advance();!B(e.next)&&Z(e.next)!=`f`;)e.advance()}function X(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(R(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ie(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!X(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||R(e.next))return!1;else e.advance()}var ae=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function Z(e){return e<33?`u`:e>125?`s`:ae[e-33]}function Q(e,t){let n=Z(e);return n!=`u`&&!(t&&n==`f`)}function $(e,t,n,r){if(Z(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&Q(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;z(a);){if(R(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?Q(e.peek(o+1),n):a==35?e.peek(o-1)!=32:Q(a,n)))||!n&&s<=r||s==0&&!n&&(H(e,45,o)||H(e,46,o)))break;if(t&&Z(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var oe=new c((e,t)=>{if(e.next==33)J(e),e.acceptToken(T);else if(e.next==38||e.next==42){let t=e.next==38?C:w;Y(e),e.acceptToken(t)}else e.next==39||e.next==34?(X(e,!1),e.acceptToken(S)):$(e,!1,t.context.type==N,t.context.depth)&&e.acceptToken(ee)}),se=new c((e,t)=>{let n=t.context.type==P?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(H(e,45,i)||H(e,46,i))||!R(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=R(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(E,r)}),ce=e({DirectiveName:t.keyword,DirectiveContent:t.attributeValue,"DirectiveEnd DocEnd":t.meta,QuotedLiteral:t.string,BlockLiteralHeader:t.special(t.string),BlockLiteralContent:t.content,Literal:t.content,"Key/Literal Key/QuotedLiteral":t.definition(t.propertyName),"Anchor Alias":t.labelName,Tag:t.typeName,Comment:t.lineComment,": , -":t.separator,"?":t.punctuation,"[ ]":t.squareBracket,"{ }":t.brace}),le=l.deserialize({version:14,states:"5lQ!ZQgOOO#PQ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!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteral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S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[U,W,oe,se,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),ue=n.define({name:`yaml`,parser:le.configure({props:[s.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:i({closing:`}`}),FlowSequence:i({closing:`]`})}),o.add({"FlowMapping FlowSequence":a,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function de(){return new r(ue)}t.meta;export{de as yaml};
1
+ import{i as e,o as t}from"./dist-BKsr7wc2.js";import{LRLanguage as n,LanguageSupport as r,delimitedIndent as i,foldInside as a,foldNodeProp as o,indentNodeProp as s}from"./dist-CbjfwVs-.js";import{n as c,r as l,t as u}from"./dist-H0dUhAgy.js";var d=63,f=64,p=1,m=2,h=3,g=4,_=5,v=6,y=7,b=65,x=66,ee=8,S=9,C=10,w=11,T=12,E=13,D=19,O=20,k=29,A=33,te=34,ne=47,re=0,j=1,M=2,N=3,P=4,F=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};F.top=new F(null,-1,re);function I(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(R(t)||t==-1)return n}}function L(e){return e==32||e==9}function R(e){return e==10||e==13}function z(e){return L(e)||R(e)}function B(e){return e<0||z(e)}var V=new u({start:F.top,reduce(e,t){return e.type==N&&(t==O||t==te)?e.parent:e},shift(e,t,n,r){if(t==h)return new F(e,I(r,r.pos),j);if(t==b||t==_)return new F(e,I(r,r.pos),M);if(t==d)return e.parent;if(t==D||t==A)return new F(e,0,N);if(t==E&&e.type==P)return e.parent;if(t==ne){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new F(e,e.depth+ +t[0],P)}return e},hash(e){return e.hash}});function H(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&B(e.peek(n+3))}var U=new c((e,t)=>{if(e.next==-1&&t.canShift(f))return e.acceptToken(f);let n=e.peek(-1);if((R(n)||n<0)&&t.context.type!=N){if(H(e,45)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(p,3)}if(H(e,46)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(m,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==j&&(e.next!=45||!B(e.peek(1))))&&e.next!=-1&&!R(e.next)&&e.next!=35&&e.acceptToken(d,-n)}},{contextual:!0}),W=new c((e,t)=>{if(t.context.type==N)e.next==63&&(e.advance(),B(e.next)&&e.acceptToken(y));else if(e.next==45)e.advance(),B(e.next)&&e.acceptToken(t.context.type==j&&t.context.depth==I(e,e.pos-1)?g:h);else if(e.next==63)e.advance(),B(e.next)&&e.acceptToken(t.context.type==M&&t.context.depth==I(e,e.pos-1)?v:_);else{let n=e.pos;for(;;)if(L(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)J(e);else if(e.next==38)Y(e);else if(e.next==42){Y(e);break}else if(e.next==39||e.next==34){if(X(e,!0))break;return}else if(e.next==91||e.next==123){if(!ie(e))return;break}else{$(e,!0,!1,0);break}for(;L(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(k))return;B(e.peek(1))&&e.acceptTokenTo(t.context.type==M&&t.context.depth==I(e,n)?x:b,n)}}},{contextual:!0});function G(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function K(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function q(e,t){return e.next==37?(e.advance(),K(e.next)&&e.advance(),K(e.next)&&e.advance(),!0):G(e.next)||t&&e.next==44?(e.advance(),!0):!1}function J(e){if(e.advance(),e.next==60){for(e.advance();;)if(!q(e,!0)){e.next==62&&e.advance();break}}else for(;q(e,!1););}function Y(e){for(e.advance();!B(e.next)&&Z(e.next)!=`f`;)e.advance()}function X(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(R(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ie(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!X(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||R(e.next))return!1;else e.advance()}var ae=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function Z(e){return e<33?`u`:e>125?`s`:ae[e-33]}function Q(e,t){let n=Z(e);return n!=`u`&&!(t&&n==`f`)}function $(e,t,n,r){if(Z(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&Q(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;z(a);){if(R(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?Q(e.peek(o+1),n):a==35?e.peek(o-1)!=32:Q(a,n)))||!n&&s<=r||s==0&&!n&&(H(e,45,o)||H(e,46,o)))break;if(t&&Z(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var oe=new c((e,t)=>{if(e.next==33)J(e),e.acceptToken(T);else if(e.next==38||e.next==42){let t=e.next==38?C:w;Y(e),e.acceptToken(t)}else e.next==39||e.next==34?(X(e,!1),e.acceptToken(S)):$(e,!1,t.context.type==N,t.context.depth)&&e.acceptToken(ee)}),se=new c((e,t)=>{let n=t.context.type==P?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(H(e,45,i)||H(e,46,i))||!R(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=R(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(E,r)}),ce=e({DirectiveName:t.keyword,DirectiveContent:t.attributeValue,"DirectiveEnd DocEnd":t.meta,QuotedLiteral:t.string,BlockLiteralHeader:t.special(t.string),BlockLiteralContent:t.content,Literal:t.content,"Key/Literal Key/QuotedLiteral":t.definition(t.propertyName),"Anchor Alias":t.labelName,Tag:t.typeName,Comment:t.lineComment,": , -":t.separator,"?":t.punctuation,"[ ]":t.squareBracket,"{ }":t.brace}),le=l.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'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U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:V,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[ce],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[U,W,oe,se,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),ue=n.define({name:`yaml`,parser:le.configure({props:[s.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:i({closing:`}`}),FlowSequence:i({closing:`]`})}),o.add({"FlowMapping FlowSequence":a,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function de(){return new r(ue)}t.meta;export{de as yaml};