@qwen-code/qwen-code 0.17.1 → 0.18.0-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +4 -6
  2. package/bundled/qc-helper/SKILL.md +30 -24
  3. package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
  4. package/bundled/qc-helper/docs/features/commands.md +11 -11
  5. package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
  6. package/bundled/qc-helper/docs/overview.md +4 -4
  7. package/bundled/qc-helper/docs/quickstart.md +4 -4
  8. package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
  9. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  10. package/chunks/{agent-ZJHHICAC.js → agent-6J2FFD7S.js} +18 -22
  11. package/chunks/{anthropicContentGenerator-M45RXZVS.js → anthropicContentGenerator-4QBVSFSJ.js} +5 -5
  12. package/chunks/{askUserQuestion-TGRD7FNQ.js → askUserQuestion-NOOLRWCJ.js} +5 -7
  13. package/chunks/{ca-6RSCDYUS.js → ca-WRHFBIDH.js} +38 -3
  14. package/chunks/{chunk-C5CUHYSM.js → chunk-3H7ENG2Q.js} +821 -461
  15. package/chunks/{chunk-SOGUPKP6.js → chunk-5RNZ2QKF.js} +3 -5
  16. package/chunks/{chunk-GVWPJCXU.js → chunk-6VFG3EUJ.js} +1 -1
  17. package/chunks/{chunk-NQ3E7YLD.js → chunk-AVLOK27J.js} +42 -8
  18. package/chunks/{chunk-JBSYXHJF.js → chunk-BBTV54KB.js} +2 -2
  19. package/chunks/{chunk-X2474BTT.js → chunk-BPZQVC2P.js} +142 -9
  20. package/chunks/{chunk-2KEXT6RB.js → chunk-BUOJN3MM.js} +91245 -78527
  21. package/chunks/{chunk-3BJBCG2K.js → chunk-C6WMLUNB.js} +1 -1
  22. package/chunks/{chunk-TDZCEIK6.js → chunk-D46KOV3C.js} +1 -1
  23. package/chunks/{chunk-HX3JRTWL.js → chunk-F5ORN4YO.js} +1 -1
  24. package/chunks/{chunk-JKUAX6UT.js → chunk-G763GDO6.js} +125 -12
  25. package/chunks/{chunk-OIL7KDWV.js → chunk-GBEPNWYB.js} +1 -1
  26. package/chunks/{chunk-5JBZM7FZ.js → chunk-IKOMHTCC.js} +6 -6
  27. package/chunks/{chunk-G4K6P5KN.js → chunk-JMLIPZUU.js} +3 -3
  28. package/chunks/{chunk-OJFMTECH.js → chunk-JSYEZAYV.js} +2 -2
  29. package/chunks/{chunk-AKBFRR6J.js → chunk-K5PGHDBN.js} +132 -112
  30. package/chunks/{chunk-QVJ33ZBG.js → chunk-MVX64PNU.js} +1 -1
  31. package/chunks/{chunk-EY6BDW7Y.js → chunk-PLYZAP4W.js} +45 -9
  32. package/chunks/{chunk-ACBGEKB7.js → chunk-R5PDRHEF.js} +2 -1
  33. package/chunks/{chunk-6O244QKR.js → chunk-SCHRFI7O.js} +1 -1
  34. package/chunks/{chunk-GJHMAWS7.js → chunk-SHUT5MQY.js} +1 -1
  35. package/chunks/{chunk-RQW7WUJR.js → chunk-UABFCMPA.js} +34 -6
  36. package/chunks/{chunk-33RDTIU6.js → chunk-UFC57OYT.js} +3 -5
  37. package/chunks/{chunk-PLYRQYKC.js → chunk-UQZQP5PA.js} +11 -11
  38. package/chunks/{chunk-NP3ICQCN.js → chunk-USE2VQ5P.js} +1 -1
  39. package/chunks/{chunk-NJJER6E2.js → chunk-UXBKX55L.js} +10 -6
  40. package/chunks/{chunk-QWSRH265.js → chunk-WFVXF3OM.js} +776 -776
  41. package/chunks/{computer-use-NAHQPV2L.js → computer-use-6LZXL3UW.js} +51 -18
  42. package/chunks/contextCommand-ZV5QQ2LA.js +46 -0
  43. package/chunks/{cron-create-V3UK2SJN.js → cron-create-PIPMXQN4.js} +5 -7
  44. package/chunks/{cron-delete-MANALPCP.js → cron-delete-6Y5XIDMS.js} +5 -7
  45. package/chunks/{cron-list-UDIYK3B3.js → cron-list-A4WNRUWZ.js} +5 -7
  46. package/chunks/{de-APURNJ3I.js → de-M5RPB2NB.js} +38 -3
  47. package/chunks/{dist-XTTPOFAH.js → dist-BXDUQ2QY.js} +3 -4
  48. package/chunks/{dist-AHZNZWRI.js → dist-R2SXPG74.js} +4 -5
  49. package/chunks/{dist-ATAKC63R.js → dist-TE5QKMGR.js} +3 -4
  50. package/chunks/{dist-6RUZ2JD6.js → dist-ZMQ4TXD5.js} +3 -4
  51. package/chunks/{edit-JWXCQ4KK.js → edit-J7D6VMPQ.js} +22 -27
  52. package/chunks/{en-FYO57HJW.js → en-UMYKQAZE.js} +46 -3
  53. package/chunks/{enter-worktree-G4CJXPT4.js → enter-worktree-NDJTVGYJ.js} +20 -25
  54. package/chunks/{exit-worktree-MYZ2FGU2.js → exit-worktree-UB6XYYAX.js} +20 -25
  55. package/chunks/{exitPlanMode-ELJ6FSMU.js → exitPlanMode-V6X2KL4X.js} +20 -25
  56. package/chunks/{fr-32YHQZIS.js → fr-MPYXXXPW.js} +38 -3
  57. package/chunks/{geminiContentGenerator-3LR7MKCQ.js → geminiContentGenerator-3AKHMB3P.js} +5 -5
  58. package/chunks/{getMachineId-bsd-GS3V2GK7.js → getMachineId-bsd-F7GNPTER.js} +1 -1
  59. package/chunks/{getMachineId-darwin-ZQB4Q7EW.js → getMachineId-darwin-T73DJL27.js} +1 -1
  60. package/chunks/{getMachineId-linux-JQ4NN4DN.js → getMachineId-linux-MKQTFPQM.js} +1 -1
  61. package/chunks/{getMachineId-unsupported-U7H4V4HJ.js → getMachineId-unsupported-MUR5KOQE.js} +1 -1
  62. package/chunks/{getMachineId-win-VHUZGBQ3.js → getMachineId-win-CDYFC6ZM.js} +1 -1
  63. package/chunks/{glob-CANUAUTC.js → glob-PBG5DRG4.js} +20 -25
  64. package/chunks/{grep-WZWNJRDX.js → grep-VQ56EWQ7.js} +20 -25
  65. package/chunks/{ja-PEUXN4XT.js → ja-NFZ32AB3.js} +38 -3
  66. package/chunks/{keychain-token-storage-3552ENXE.js → keychain-token-storage-UHGOCDD6.js} +3 -3
  67. package/chunks/{ls-T4SVZWR6.js → ls-34DLNYCD.js} +6 -8
  68. package/chunks/{lsp-U4ZQLNIS.js → lsp-NCDEHH3V.js} +5 -7
  69. package/chunks/{monitor-CCKNOUFG.js → monitor-J3YCSOEH.js} +20 -25
  70. package/chunks/{notebook-edit-XDUY5Q4I.js → notebook-edit-AL3CBYJ6.js} +21 -26
  71. package/chunks/{openaiContentGenerator-N3O3MYIT.js → openaiContentGenerator-3U6UARHS.js} +12 -14
  72. package/chunks/{pt-2INS7YVC.js → pt-BR43FRBA.js} +38 -3
  73. package/chunks/{qwenContentGenerator-DEOIWKVH.js → qwenContentGenerator-JRFHJRH6.js} +20 -24
  74. package/chunks/{qwenOAuth2-LKXG7XVO.js → qwenOAuth2-KRJT35QH.js} +5 -5
  75. package/chunks/{read-file-BRNXGILN.js → read-file-ZF6EIVE3.js} +9 -11
  76. package/chunks/ripGrep-N2ZT7M6Z.js +42 -0
  77. package/chunks/{ru-6CQ5HNHB.js → ru-DQCW2KHD.js} +38 -3
  78. package/chunks/{scheduler-SSFABMN5.js → scheduler-OS37FUFT.js} +18 -22
  79. package/chunks/{send-message-GFYV7WLL.js → send-message-YYF56TS7.js} +5 -7
  80. package/chunks/{serve-B5O72CRN.js → serve-ABOLLDNN.js} +21 -25
  81. package/chunks/{shell-SGYNBVMK.js → shell-XGN7IDUS.js} +18 -22
  82. package/chunks/{skill-V7Y6DOFB.js → skill-YQQ6CR4U.js} +88 -25
  83. package/chunks/{src-OKFFQGXB.js → src-LORPPHWB.js} +86 -33
  84. package/chunks/{syntheticOutput-DM43O6TY.js → syntheticOutput-T5SWX3YF.js} +4 -5
  85. package/chunks/{task-stop-WKP5OB3V.js → task-stop-3VHAQMYM.js} +5 -7
  86. package/chunks/{todoWrite-GHL6DCLP.js → todoWrite-EAGJGKO5.js} +7 -9
  87. package/chunks/{tool-search-7MHT3HGM.js → tool-search-PDOJPXJJ.js} +27 -15
  88. package/chunks/{web-fetch-SZIV74ZX.js → web-fetch-SS6IKK6N.js} +7 -9
  89. package/chunks/{write-file-ARS2Z6BJ.js → write-file-VWWCN7LI.js} +23 -28
  90. package/chunks/{zh-ZHZCMIRG.js → zh-6VFXOAR5.js} +49 -3
  91. package/chunks/{zh-TW-SSL3ATVZ.js → zh-TW-IQZ4AD5M.js} +45 -3
  92. package/cli.js +8143 -4150
  93. package/examples/agent/agents/diary.md +86 -0
  94. package/examples/agent/qwen-extension.json +4 -0
  95. package/examples/commands/commands/fs/grep-code.md +3 -0
  96. package/examples/commands/qwen-extension.json +4 -0
  97. package/examples/context/QWEN.md +8 -0
  98. package/examples/context/qwen-extension.json +4 -0
  99. package/examples/mcp-server/example.ts +60 -0
  100. package/examples/mcp-server/package.json +18 -0
  101. package/examples/mcp-server/qwen-extension.json +11 -0
  102. package/examples/mcp-server/tsconfig.json +13 -0
  103. package/examples/skills/qwen-extension.json +4 -0
  104. package/examples/skills/skills/synonyms/SKILL.md +48 -0
  105. package/locales/ca.js +64 -4
  106. package/locales/de.js +63 -4
  107. package/locales/en.js +75 -4
  108. package/locales/fr.js +65 -4
  109. package/locales/ja.js +61 -4
  110. package/locales/pt.js +64 -4
  111. package/locales/ru.js +62 -4
  112. package/locales/zh-TW.js +70 -4
  113. package/locales/zh.js +74 -4
  114. package/package.json +3 -2
  115. package/chunks/chunk-24YKA2DA.js +0 -233
  116. package/chunks/chunk-6RQTH7UQ.js +0 -115
  117. package/chunks/chunk-7TQVELRB.js +0 -10412
  118. package/chunks/chunk-W57YDFU5.js +0 -41
  119. package/chunks/contextCommand-7KJT3UJS.js +0 -50
  120. package/chunks/ripGrep-ZRY5PKUZ.js +0 -46
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  getGlobalQwenDir
5
- } from "./chunk-NP3ICQCN.js";
5
+ } from "./chunk-USE2VQ5P.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-ACBGEKB7.js";
5
+ } from "./chunk-R5PDRHEF.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  createDebugLogger,
5
5
  isNodeError
6
- } from "./chunk-ACBGEKB7.js";
6
+ } from "./chunk-R5PDRHEF.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-ACBGEKB7.js";
5
+ } from "./chunk-R5PDRHEF.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -14282,7 +14282,10 @@ var SchemaValidator = class {
14282
14282
  }
14283
14283
  let valid = validate(data);
14284
14284
  if (!valid && validate.errors) {
14285
- fixBooleanValues(data);
14285
+ fixBooleanValues(
14286
+ data,
14287
+ anySchema
14288
+ );
14286
14289
  fixStringifiedJsonValues(
14287
14290
  data,
14288
14291
  anySchema
@@ -14346,19 +14349,27 @@ function fixStringifiedJsonValues(data, schema) {
14346
14349
  }
14347
14350
  }
14348
14351
  __name(fixStringifiedJsonValues, "fixStringifiedJsonValues");
14349
- function fixBooleanValues(data) {
14352
+ function fixBooleanValues(data, schema) {
14353
+ const properties = schema?.["properties"];
14354
+ const items = schema?.["items"];
14350
14355
  for (const key of Object.keys(data)) {
14351
14356
  if (!(key in data)) continue;
14352
14357
  const value = data[key];
14358
+ const childSchema = Array.isArray(data) ? items : properties?.[key];
14353
14359
  if (typeof value === "object" && value !== null) {
14354
- fixBooleanValues(value);
14355
- } else if (typeof value === "string") {
14356
- const lower = value.toLowerCase();
14357
- if (lower === "true") {
14358
- data[key] = true;
14359
- } else if (lower === "false") {
14360
- data[key] = false;
14361
- }
14360
+ fixBooleanValues(value, childSchema);
14361
+ continue;
14362
+ }
14363
+ if (typeof value !== "string") continue;
14364
+ const accepted = childSchema ? getAcceptedTypes(childSchema) : null;
14365
+ if (!accepted || accepted.has("string") || !accepted.has("boolean")) {
14366
+ continue;
14367
+ }
14368
+ const lower = value.toLowerCase();
14369
+ if (lower === "true") {
14370
+ data[key] = true;
14371
+ } else if (lower === "false") {
14372
+ data[key] = false;
14362
14373
  }
14363
14374
  }
14364
14375
  }
@@ -14836,6 +14847,104 @@ var CONCURRENCY_SAFE_KINDS = /* @__PURE__ */ new Set([
14836
14847
  "fetch" /* Fetch */
14837
14848
  ]);
14838
14849
 
14850
+ // packages/core/src/tools/tool-names.ts
14851
+ init_esbuild_shims();
14852
+ var ToolNames = {
14853
+ EDIT: "edit",
14854
+ WRITE_FILE: "write_file",
14855
+ READ_FILE: "read_file",
14856
+ GREP: "grep_search",
14857
+ GLOB: "glob",
14858
+ SHELL: "run_shell_command",
14859
+ TODO_WRITE: "todo_write",
14860
+ MEMORY: "save_memory",
14861
+ AGENT: "agent",
14862
+ SKILL: "skill",
14863
+ EXIT_PLAN_MODE: "exit_plan_mode",
14864
+ WEB_FETCH: "web_fetch",
14865
+ LS: "list_directory",
14866
+ LSP: "lsp",
14867
+ ASK_USER_QUESTION: "ask_user_question",
14868
+ CRON_CREATE: "cron_create",
14869
+ CRON_LIST: "cron_list",
14870
+ CRON_DELETE: "cron_delete",
14871
+ TASK_STOP: "task_stop",
14872
+ SEND_MESSAGE: "send_message",
14873
+ STRUCTURED_OUTPUT: "structured_output",
14874
+ MONITOR: "monitor",
14875
+ NOTEBOOK_EDIT: "notebook_edit",
14876
+ TOOL_SEARCH: "tool_search",
14877
+ ENTER_WORKTREE: "enter_worktree",
14878
+ EXIT_WORKTREE: "exit_worktree",
14879
+ // Computer Use tools — built-in but backed by an upstream MCP server.
14880
+ // All deferred; revealed only when the user-initiated request triggers
14881
+ // a computer-use action. See packages/core/src/tools/computer-use/.
14882
+ COMPUTER_USE_LIST_APPS: "computer_use__list_apps",
14883
+ COMPUTER_USE_GET_APP_STATE: "computer_use__get_app_state",
14884
+ COMPUTER_USE_CLICK: "computer_use__click",
14885
+ COMPUTER_USE_PERFORM_SECONDARY_ACTION: "computer_use__perform_secondary_action",
14886
+ COMPUTER_USE_SCROLL: "computer_use__scroll",
14887
+ COMPUTER_USE_DRAG: "computer_use__drag",
14888
+ COMPUTER_USE_TYPE_TEXT: "computer_use__type_text",
14889
+ COMPUTER_USE_PRESS_KEY: "computer_use__press_key",
14890
+ COMPUTER_USE_SET_VALUE: "computer_use__set_value"
14891
+ };
14892
+ var ToolDisplayNames = {
14893
+ EDIT: "Edit",
14894
+ WRITE_FILE: "WriteFile",
14895
+ READ_FILE: "ReadFile",
14896
+ GREP: "Grep",
14897
+ GLOB: "Glob",
14898
+ SHELL: "Shell",
14899
+ TODO_WRITE: "TodoWrite",
14900
+ MEMORY: "SaveMemory",
14901
+ AGENT: "Agent",
14902
+ SKILL: "Skill",
14903
+ EXIT_PLAN_MODE: "ExitPlanMode",
14904
+ WEB_FETCH: "WebFetch",
14905
+ LS: "ListFiles",
14906
+ LSP: "Lsp",
14907
+ ASK_USER_QUESTION: "AskUserQuestion",
14908
+ CRON_CREATE: "CronCreate",
14909
+ CRON_LIST: "CronList",
14910
+ CRON_DELETE: "CronDelete",
14911
+ TASK_STOP: "TaskStop",
14912
+ SEND_MESSAGE: "SendMessage",
14913
+ STRUCTURED_OUTPUT: "StructuredOutput",
14914
+ MONITOR: "Monitor",
14915
+ NOTEBOOK_EDIT: "NotebookEdit",
14916
+ TOOL_SEARCH: "ToolSearch",
14917
+ ENTER_WORKTREE: "EnterWorktree",
14918
+ EXIT_WORKTREE: "ExitWorktree",
14919
+ COMPUTER_USE_LIST_APPS: "computer_use__list_apps",
14920
+ COMPUTER_USE_GET_APP_STATE: "computer_use__get_app_state",
14921
+ COMPUTER_USE_CLICK: "computer_use__click",
14922
+ COMPUTER_USE_PERFORM_SECONDARY_ACTION: "computer_use__perform_secondary_action",
14923
+ COMPUTER_USE_SCROLL: "computer_use__scroll",
14924
+ COMPUTER_USE_DRAG: "computer_use__drag",
14925
+ COMPUTER_USE_TYPE_TEXT: "computer_use__type_text",
14926
+ COMPUTER_USE_PRESS_KEY: "computer_use__press_key",
14927
+ COMPUTER_USE_SET_VALUE: "computer_use__set_value"
14928
+ };
14929
+ var ToolNamesMigration = {
14930
+ search_file_content: ToolNames.GREP,
14931
+ // Legacy name from grep tool
14932
+ replace: ToolNames.EDIT,
14933
+ // Legacy name from edit tool
14934
+ task: ToolNames.AGENT
14935
+ // Legacy name from agent tool (renamed from task)
14936
+ };
14937
+ var ToolDisplayNamesMigration = {
14938
+ SearchFiles: ToolDisplayNames.GREP,
14939
+ // Old display name for Grep
14940
+ FindFiles: ToolDisplayNames.GLOB,
14941
+ // Old display name for Glob
14942
+ ReadFolder: ToolDisplayNames.LS,
14943
+ // Old display name for ListFiles
14944
+ Task: ToolDisplayNames.AGENT
14945
+ // Old display name for Agent (renamed from Task)
14946
+ };
14947
+
14839
14948
  export {
14840
14949
  ToolErrorType,
14841
14950
  require_fast_deep_equal,
@@ -14851,7 +14960,11 @@ export {
14851
14960
  ToolConfirmationOutcome,
14852
14961
  Kind,
14853
14962
  MUTATOR_KINDS,
14854
- CONCURRENCY_SAFE_KINDS
14963
+ CONCURRENCY_SAFE_KINDS,
14964
+ ToolNames,
14965
+ ToolDisplayNames,
14966
+ ToolNamesMigration,
14967
+ ToolDisplayNamesMigration
14855
14968
  };
14856
14969
  /**
14857
14970
  * @license
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  getErrorMessage,
5
5
  isNodeError
6
- } from "./chunk-ACBGEKB7.js";
6
+ } from "./chunk-R5PDRHEF.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";
@@ -2,24 +2,24 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-PLYRQYKC.js";
5
+ } from "./chunk-UQZQP5PA.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-2KEXT6RB.js";
9
+ } from "./chunk-BUOJN3MM.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
- } from "./chunk-EY6BDW7Y.js";
12
+ } from "./chunk-PLYZAP4W.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-C5CUHYSM.js";
16
+ } from "./chunk-3H7ENG2Q.js";
17
17
  import {
18
18
  ToolNames
19
- } from "./chunk-6RQTH7UQ.js";
19
+ } from "./chunk-G763GDO6.js";
20
20
  import {
21
21
  DEFAULT_TOKEN_LIMIT
22
- } from "./chunk-TDZCEIK6.js";
22
+ } from "./chunk-D46KOV3C.js";
23
23
  import {
24
24
  init_esbuild_shims
25
25
  } from "./chunk-A4BMJM77.js";
@@ -2,14 +2,14 @@
2
2
  "use strict";
3
3
  import {
4
4
  formatFetchErrorForUser
5
- } from "./chunk-OIL7KDWV.js";
5
+ } from "./chunk-GBEPNWYB.js";
6
6
  import {
7
7
  atomicWriteFile
8
- } from "./chunk-HX3JRTWL.js";
8
+ } from "./chunk-F5ORN4YO.js";
9
9
  import {
10
10
  Storage,
11
11
  createDebugLogger
12
- } from "./chunk-ACBGEKB7.js";
12
+ } from "./chunk-R5PDRHEF.js";
13
13
  import {
14
14
  init_esbuild_shims
15
15
  } from "./chunk-A4BMJM77.js";
@@ -2,11 +2,11 @@
2
2
  "use strict";
3
3
  import {
4
4
  atomicWriteFileSync
5
- } from "./chunk-HX3JRTWL.js";
5
+ } from "./chunk-F5ORN4YO.js";
6
6
  import {
7
7
  Storage,
8
8
  createDebugLogger
9
- } from "./chunk-ACBGEKB7.js";
9
+ } from "./chunk-R5PDRHEF.js";
10
10
  import {
11
11
  init_esbuild_shims
12
12
  } from "./chunk-A4BMJM77.js";
@@ -8,6 +8,128 @@ import {
8
8
  __name
9
9
  } from "./chunk-J2S4EL5Y.js";
10
10
 
11
+ // node_modules/zod/v3/external.js
12
+ var external_exports = {};
13
+ __export(external_exports, {
14
+ BRAND: () => BRAND,
15
+ DIRTY: () => DIRTY,
16
+ EMPTY_PATH: () => EMPTY_PATH,
17
+ INVALID: () => INVALID,
18
+ NEVER: () => NEVER,
19
+ OK: () => OK,
20
+ ParseStatus: () => ParseStatus,
21
+ Schema: () => ZodType,
22
+ ZodAny: () => ZodAny,
23
+ ZodArray: () => ZodArray,
24
+ ZodBigInt: () => ZodBigInt,
25
+ ZodBoolean: () => ZodBoolean,
26
+ ZodBranded: () => ZodBranded,
27
+ ZodCatch: () => ZodCatch,
28
+ ZodDate: () => ZodDate,
29
+ ZodDefault: () => ZodDefault,
30
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
31
+ ZodEffects: () => ZodEffects,
32
+ ZodEnum: () => ZodEnum,
33
+ ZodError: () => ZodError,
34
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
35
+ ZodFunction: () => ZodFunction,
36
+ ZodIntersection: () => ZodIntersection,
37
+ ZodIssueCode: () => ZodIssueCode,
38
+ ZodLazy: () => ZodLazy,
39
+ ZodLiteral: () => ZodLiteral,
40
+ ZodMap: () => ZodMap,
41
+ ZodNaN: () => ZodNaN,
42
+ ZodNativeEnum: () => ZodNativeEnum,
43
+ ZodNever: () => ZodNever,
44
+ ZodNull: () => ZodNull,
45
+ ZodNullable: () => ZodNullable,
46
+ ZodNumber: () => ZodNumber,
47
+ ZodObject: () => ZodObject,
48
+ ZodOptional: () => ZodOptional,
49
+ ZodParsedType: () => ZodParsedType,
50
+ ZodPipeline: () => ZodPipeline,
51
+ ZodPromise: () => ZodPromise,
52
+ ZodReadonly: () => ZodReadonly,
53
+ ZodRecord: () => ZodRecord,
54
+ ZodSchema: () => ZodType,
55
+ ZodSet: () => ZodSet,
56
+ ZodString: () => ZodString,
57
+ ZodSymbol: () => ZodSymbol,
58
+ ZodTransformer: () => ZodEffects,
59
+ ZodTuple: () => ZodTuple,
60
+ ZodType: () => ZodType,
61
+ ZodUndefined: () => ZodUndefined,
62
+ ZodUnion: () => ZodUnion,
63
+ ZodUnknown: () => ZodUnknown,
64
+ ZodVoid: () => ZodVoid,
65
+ addIssueToContext: () => addIssueToContext,
66
+ any: () => anyType,
67
+ array: () => arrayType,
68
+ bigint: () => bigIntType,
69
+ boolean: () => booleanType,
70
+ coerce: () => coerce,
71
+ custom: () => custom,
72
+ date: () => dateType,
73
+ datetimeRegex: () => datetimeRegex,
74
+ defaultErrorMap: () => en_default,
75
+ discriminatedUnion: () => discriminatedUnionType,
76
+ effect: () => effectsType,
77
+ enum: () => enumType,
78
+ function: () => functionType,
79
+ getErrorMap: () => getErrorMap,
80
+ getParsedType: () => getParsedType,
81
+ instanceof: () => instanceOfType,
82
+ intersection: () => intersectionType,
83
+ isAborted: () => isAborted,
84
+ isAsync: () => isAsync,
85
+ isDirty: () => isDirty,
86
+ isValid: () => isValid,
87
+ late: () => late,
88
+ lazy: () => lazyType,
89
+ literal: () => literalType,
90
+ makeIssue: () => makeIssue,
91
+ map: () => mapType,
92
+ nan: () => nanType,
93
+ nativeEnum: () => nativeEnumType,
94
+ never: () => neverType,
95
+ null: () => nullType,
96
+ nullable: () => nullableType,
97
+ number: () => numberType,
98
+ object: () => objectType,
99
+ objectUtil: () => objectUtil,
100
+ oboolean: () => oboolean,
101
+ onumber: () => onumber,
102
+ optional: () => optionalType,
103
+ ostring: () => ostring,
104
+ pipeline: () => pipelineType,
105
+ preprocess: () => preprocessType,
106
+ promise: () => promiseType,
107
+ quotelessJson: () => quotelessJson,
108
+ record: () => recordType,
109
+ set: () => setType,
110
+ setErrorMap: () => setErrorMap,
111
+ strictObject: () => strictObjectType,
112
+ string: () => stringType,
113
+ symbol: () => symbolType,
114
+ transformer: () => effectsType,
115
+ tuple: () => tupleType,
116
+ undefined: () => undefinedType,
117
+ union: () => unionType,
118
+ unknown: () => unknownType,
119
+ util: () => util,
120
+ void: () => voidType
121
+ });
122
+ init_esbuild_shims();
123
+
124
+ // node_modules/zod/v3/errors.js
125
+ init_esbuild_shims();
126
+
127
+ // node_modules/zod/v3/locales/en.js
128
+ init_esbuild_shims();
129
+
130
+ // node_modules/zod/v3/ZodError.js
131
+ init_esbuild_shims();
132
+
11
133
  // node_modules/zod/v3/helpers/util.js
12
134
  init_esbuild_shims();
13
135
  var util;
@@ -147,7 +269,6 @@ var getParsedType = /* @__PURE__ */ __name((data) => {
147
269
  }, "getParsedType");
148
270
 
149
271
  // node_modules/zod/v3/ZodError.js
150
- init_esbuild_shims();
151
272
  var ZodIssueCode = util.arrayToEnum([
152
273
  "invalid_type",
153
274
  "invalid_literal",
@@ -269,7 +390,6 @@ ZodError.create = (issues) => {
269
390
  };
270
391
 
271
392
  // node_modules/zod/v3/locales/en.js
272
- init_esbuild_shims();
273
393
  var errorMap = /* @__PURE__ */ __name((issue2, _ctx) => {
274
394
  let message;
275
395
  switch (issue2.code) {
@@ -373,7 +493,6 @@ var errorMap = /* @__PURE__ */ __name((issue2, _ctx) => {
373
493
  var en_default = errorMap;
374
494
 
375
495
  // node_modules/zod/v3/errors.js
376
- init_esbuild_shims();
377
496
  var overrideErrorMap = en_default;
378
497
  function setErrorMap(map2) {
379
498
  overrideErrorMap = map2;
@@ -4089,6 +4208,9 @@ var coerce = {
4089
4208
  };
4090
4209
  var NEVER = INVALID;
4091
4210
 
4211
+ // node_modules/zod/index.js
4212
+ init_esbuild_shims();
4213
+
4092
4214
  // node_modules/zod/v4/classic/iso.js
4093
4215
  var iso_exports = {};
4094
4216
  __export(iso_exports, {
@@ -15413,8 +15535,8 @@ function duration2(params) {
15413
15535
  __name(duration2, "duration");
15414
15536
 
15415
15537
  // node_modules/zod/v4/classic/external.js
15416
- var external_exports = {};
15417
- __export(external_exports, {
15538
+ var external_exports2 = {};
15539
+ __export(external_exports2, {
15418
15540
  $brand: () => $brand,
15419
15541
  $input: () => $input,
15420
15542
  $output: () => $output,
@@ -15686,110 +15808,8 @@ __name(date4, "date");
15686
15808
  config(en_default2());
15687
15809
 
15688
15810
  export {
15689
- util,
15690
- objectUtil,
15691
- ZodParsedType,
15692
- getParsedType,
15693
- ZodIssueCode,
15694
- quotelessJson,
15695
- ZodError,
15696
- en_default,
15697
- setErrorMap,
15698
- getErrorMap,
15699
- makeIssue,
15700
- EMPTY_PATH,
15701
- addIssueToContext,
15702
- ParseStatus,
15703
- INVALID,
15704
- DIRTY,
15705
- OK,
15706
- isAborted,
15707
- isDirty,
15708
- isValid,
15709
- isAsync,
15710
- ZodType,
15711
- datetimeRegex,
15712
- ZodString,
15713
- ZodNumber,
15714
- ZodBigInt,
15715
- ZodBoolean,
15716
- ZodDate,
15717
- ZodSymbol,
15718
- ZodUndefined,
15719
- ZodNull,
15720
- ZodAny,
15721
- ZodUnknown,
15722
- ZodNever,
15723
- ZodVoid,
15724
- ZodArray,
15725
- ZodObject,
15726
- ZodUnion,
15727
- ZodDiscriminatedUnion,
15728
- ZodIntersection,
15729
- ZodTuple,
15730
- ZodRecord,
15731
- ZodMap,
15732
- ZodSet,
15733
- ZodFunction,
15734
- ZodLazy,
15735
- ZodLiteral,
15736
- ZodEnum,
15737
- ZodNativeEnum,
15738
- ZodPromise,
15739
- ZodEffects,
15740
- ZodOptional,
15741
- ZodNullable,
15742
- ZodDefault,
15743
- ZodCatch,
15744
- ZodNaN,
15745
- BRAND,
15746
- ZodBranded,
15747
- ZodPipeline,
15748
- ZodReadonly,
15749
- custom,
15750
- late,
15751
- ZodFirstPartyTypeKind,
15752
- instanceOfType,
15753
- stringType,
15754
- numberType,
15755
- nanType,
15756
- bigIntType,
15757
- booleanType,
15758
- dateType,
15759
- symbolType,
15760
- undefinedType,
15761
- nullType,
15762
- anyType,
15763
- unknownType,
15764
- neverType,
15765
- voidType,
15766
- arrayType,
15767
- objectType,
15768
- strictObjectType,
15769
- unionType,
15770
- discriminatedUnionType,
15771
- intersectionType,
15772
- tupleType,
15773
- recordType,
15774
- mapType,
15775
- setType,
15776
- functionType,
15777
- lazyType,
15778
- literalType,
15779
- enumType,
15780
- nativeEnumType,
15781
- promiseType,
15782
- effectsType,
15783
- optionalType,
15784
- nullableType,
15785
- preprocessType,
15786
- pipelineType,
15787
- ostring,
15788
- onumber,
15789
- oboolean,
15790
- coerce,
15791
- NEVER,
15792
- NEVER2,
15811
+ external_exports,
15812
+ NEVER2 as NEVER,
15793
15813
  safeParse,
15794
15814
  iso_exports,
15795
15815
  string2 as string,
@@ -15809,9 +15829,9 @@ export {
15809
15829
  _enum2 as _enum,
15810
15830
  literal,
15811
15831
  optional,
15812
- custom2,
15832
+ custom2 as custom,
15813
15833
  preprocess,
15814
- ZodIssueCode2,
15834
+ ZodIssueCode2 as ZodIssueCode,
15815
15835
  coerce_exports,
15816
- external_exports
15836
+ external_exports2
15817
15837
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-ACBGEKB7.js";
5
+ } from "./chunk-R5PDRHEF.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-ACBGEKB7.js";
5
+ } from "./chunk-R5PDRHEF.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -16,10 +16,15 @@ function escapeXml(text) {
16
16
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
17
17
  }
18
18
  __name(escapeXml, "escapeXml");
19
- var XML_TAG_CANDIDATE_RE = /<[^>]*>/g;
19
+ var XML_TAG_CANDIDATE_RE = /<[^<>]*>/g;
20
+ function isXmlWhitespace(char) {
21
+ return char !== void 0 && /\s/.test(char);
22
+ }
23
+ __name(isXmlWhitespace, "isXmlWhitespace");
20
24
  function isSystemReminderTagIgnorable(char) {
21
25
  const codePoint = char.codePointAt(0);
22
- return codePoint === 173 || codePoint === 65279 || codePoint !== void 0 && (codePoint >= 0 && codePoint <= 31 || codePoint >= 127 && codePoint <= 159 || codePoint >= 8203 && codePoint <= 8207 || codePoint >= 8234 && codePoint <= 8238 || codePoint >= 8288 && codePoint <= 8303 || codePoint >= 65024 && codePoint <= 65039);
26
+ if (codePoint === void 0) return false;
27
+ return codePoint === 173 || codePoint === 1564 || codePoint === 12644 || codePoint === 65279 || codePoint === 65440 || codePoint >= 0 && codePoint <= 31 || codePoint >= 127 && codePoint <= 159 || codePoint >= 4447 && codePoint <= 4448 || codePoint >= 6068 && codePoint <= 6069 || codePoint >= 6155 && codePoint <= 6159 || codePoint >= 8203 && codePoint <= 8207 || codePoint >= 8234 && codePoint <= 8238 || codePoint >= 8288 && codePoint <= 8303 || codePoint >= 65024 && codePoint <= 65039 || codePoint >= 65520 && codePoint <= 65528 || codePoint >= 113824 && codePoint <= 113827 || codePoint >= 119155 && codePoint <= 119162 || codePoint >= 917504 && codePoint <= 921599;
23
28
  }
24
29
  __name(isSystemReminderTagIgnorable, "isSystemReminderTagIgnorable");
25
30
  function normalizeSystemReminderCandidateTag(tag) {
@@ -34,13 +39,34 @@ function normalizeSystemReminderCandidateTag(tag) {
34
39
  __name(normalizeSystemReminderCandidateTag, "normalizeSystemReminderCandidateTag");
35
40
  function getSystemReminderTagKind(tag) {
36
41
  const normalized = normalizeSystemReminderCandidateTag(tag);
37
- const match = /^<\s*(\/?)\s*system-reminder(?:\s+[^>]*)?\s*(\/?)\s*>$/.exec(
38
- normalized
39
- );
40
- if (!match) {
42
+ const len = normalized.length;
43
+ if (len < 2 || normalized[0] !== "<" || normalized[len - 1] !== ">") {
44
+ return void 0;
45
+ }
46
+ let i = 1;
47
+ while (i < len && isXmlWhitespace(normalized[i])) i++;
48
+ let closing = false;
49
+ if (normalized[i] === "/") {
50
+ closing = true;
51
+ i++;
52
+ }
53
+ while (i < len && isXmlWhitespace(normalized[i])) i++;
54
+ const TAG_NAME = "system-reminder";
55
+ if (normalized.slice(i, i + TAG_NAME.length) !== TAG_NAME) {
56
+ return void 0;
57
+ }
58
+ i += TAG_NAME.length;
59
+ if (i < len - 1 && isXmlWhitespace(normalized[i])) {
60
+ while (i < len && isXmlWhitespace(normalized[i])) i++;
61
+ while (i < len && normalized[i] !== ">") i++;
62
+ }
63
+ while (i < len && isXmlWhitespace(normalized[i])) i++;
64
+ if (normalized[i] === "/") i++;
65
+ while (i < len && isXmlWhitespace(normalized[i])) i++;
66
+ if (i !== len - 1 || normalized[i] !== ">") {
41
67
  return void 0;
42
68
  }
43
- return match[1] ? "closing" : "other";
69
+ return closing ? "closing" : "other";
44
70
  }
45
71
  __name(getSystemReminderTagKind, "getSystemReminderTagKind");
46
72
  function escapeSystemReminderTag(tag) {
@@ -131,12 +157,22 @@ ${body}
131
157
  `;
132
158
  }
133
159
  __name(buildSkillLlmContent, "buildSkillLlmContent");
160
+ function applySkillAllowedTools(permissionManager, allowedTools) {
161
+ if (!permissionManager || !allowedTools?.length) {
162
+ return;
163
+ }
164
+ for (const rule of allowedTools) {
165
+ permissionManager.addSessionAllowRule(rule);
166
+ }
167
+ }
168
+ __name(applySkillAllowedTools, "applySkillAllowedTools");
134
169
 
135
170
  export {
136
171
  escapeXml,
137
172
  escapeSystemReminderTags,
138
173
  registerSkillHooks,
139
- buildSkillLlmContent
174
+ buildSkillLlmContent,
175
+ applySkillAllowedTools
140
176
  };
141
177
  /**
142
178
  * @license
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  init_esm,
5
5
  trace
6
- } from "./chunk-QWSRH265.js";
6
+ } from "./chunk-WFVXF3OM.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";
@@ -884,6 +884,7 @@ function runWithDebugLogSession(session, fn) {
884
884
  __name(runWithDebugLogSession, "runWithDebugLogSession");
885
885
  function createDebugLogger(tag) {
886
886
  return {
887
+ isEnabled: /* @__PURE__ */ __name(() => getActiveSession() !== null, "isEnabled"),
887
888
  debug: /* @__PURE__ */ __name((...args) => {
888
889
  const session = getActiveSession();
889
890
  if (!session) return;