nolo-cli 0.10.0 → 0.12.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/{_executeModel-YAXYAUOK.js → _executeModel-MWAY74HA.js} +47 -44
  2. package/{action-TLI3V62L.js → action-RAXNQQKC.js} +9 -10
  3. package/{addContentAction-PLWJSCOZ.js → addContentAction-ZHI7TVV3.js} +8 -10
  4. package/{addDialogAgentAction-BJ6SB76X.js → addDialogAgentAction-JWXPKXNC.js} +7 -8
  5. package/{agentDeleteCommand-2VYX73U5.js → agentDeleteCommand-LXR5A5FV.js} +36 -26
  6. package/{agentEmailCommands-3GDZIX64.js → agentEmailCommands-DXRAP7BB.js} +63 -58
  7. package/{agentListCommands-UWVBT3LH.js → agentListCommands-ZFMS5ZLY.js} +132 -35
  8. package/{agentMachineCommands-WOKMUG2Y.js → agentMachineCommands-ZJLYVV52.js} +40 -29
  9. package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-KRBRIFIY.js} +6 -6
  10. package/{agentRecordCommands-MVNZRH3U.js → agentRecordCommands-DFS626TB.js} +55 -50
  11. package/{agentRunCommand-K7THIJLA.js → agentRunCommand-GWBIE2TS.js} +60 -56
  12. package/{agentRunControl-K4VKNEHF.js → agentRunControl-IX4F5W2C.js} +3 -3
  13. package/{agentRuntimeLocal-WJIGU24U.js → agentRuntimeLocal-YNZSHMZC.js} +29 -14
  14. package/{agentSlice-LL5TKZEO.js → agentSlice-T2PXOEPQ.js} +9 -10
  15. package/{authCommand-TC2SW2CQ.js → authCommand-DMW336GT.js} +13 -13
  16. package/{authCommands-XPEHTKSM.js → authCommands-GH5T6RYV.js} +6 -6
  17. package/{chunk-5JGGZCZL.js → chunk-3HHTVM6G.js} +64 -5
  18. package/chunk-3QKO4EHV.js +112 -0
  19. package/{chunk-AUQ747NZ.js → chunk-43UD5ZP7.js} +76 -15
  20. package/{chunk-6SLCD4RB.js → chunk-4BTHUYMY.js} +596 -67
  21. package/{chunk-T7R3NGUU.js → chunk-4EH7AR52.js} +13 -13
  22. package/{chunk-C3RUNRHT.js → chunk-4GBNEA5B.js} +1 -1
  23. package/{chunk-4IJYA27C.js → chunk-4LG74DRG.js} +1 -1
  24. package/{chunk-2FTTDCD4.js → chunk-4ON5AV72.js} +2 -1
  25. package/{chunk-IWX4UW2E.js → chunk-524BDL33.js} +89 -8
  26. package/{chunk-EXXFGKF7.js → chunk-5ITRDSHY.js} +1400 -119
  27. package/{chunk-ISNCLGUZ.js → chunk-5NBHQD4D.js} +4 -3
  28. package/{chunk-7KNKFIRO.js → chunk-6LMFFG3K.js} +3 -3
  29. package/{chunk-PAKN26FP.js → chunk-6OVCRC72.js} +1 -1
  30. package/{chunk-CKOJQDKR.js → chunk-7JJCGV7N.js} +146 -3
  31. package/{chunk-KBKYAONQ.js → chunk-7MYHLZ3F.js} +2 -2
  32. package/{chunk-PIVFPOW6.js → chunk-AM53Q2SD.js} +175 -2541
  33. package/chunk-BYXBJQAS.js +0 -0
  34. package/{chunk-CL3IOKGK.js → chunk-DE5BA4O6.js} +20 -2
  35. package/{chunk-6KUOUWMP.js → chunk-DRMGJFGQ.js} +300 -89
  36. package/{chunk-QAALPJS7.js → chunk-EBH7G34M.js} +20 -7
  37. package/{chunk-HJGEVL7C.js → chunk-G3B356GF.js} +15 -17
  38. package/{chunk-OZMMKDBI.js → chunk-GDBCUWQ3.js} +26 -20
  39. package/{chunk-I5URP43I.js → chunk-GPZM7QH6.js} +9 -9
  40. package/chunk-IKXL2HZ3.js +70 -0
  41. package/{chunk-AS4PVWA4.js → chunk-IVAOVLM7.js} +1 -1
  42. package/{chunk-TNPIMII7.js → chunk-JUN3HFMN.js} +221 -81
  43. package/{chunk-HFASY3WO.js → chunk-JZDIW766.js} +1 -1
  44. package/{chunk-6JJWFVZ6.js → chunk-LHSJMY5V.js} +17 -17
  45. package/chunk-LTRXGFMS.js +83 -0
  46. package/{chunk-YIHFXH5Q.js → chunk-MEVCDATU.js} +3 -3
  47. package/{chunk-TILFE6LV.js → chunk-NCGFB7NN.js} +5 -3
  48. package/{chunk-BE2OOJ5P.js → chunk-NITP2JDG.js} +42 -11
  49. package/{chunk-YPRZSPF3.js → chunk-OCDEWRE2.js} +1 -1
  50. package/{chunk-VVX233PH.js → chunk-OHEKYYJF.js} +9 -9
  51. package/chunk-OOIN7HSO.js +146 -0
  52. package/{chunk-WPE4F4Z6.js → chunk-OPKKB25T.js} +1 -1
  53. package/{chunk-OR2XR25C.js → chunk-QCA3EPYK.js} +8 -8
  54. package/{chunk-SL35K7AH.js → chunk-QLUFR47U.js} +13 -83
  55. package/{chunk-CDTLMEB3.js → chunk-RNQ5BLR2.js} +1 -1
  56. package/{chunk-AVMKZHBC.js → chunk-RSEUHW6T.js} +3 -2
  57. package/{chunk-TYSCFY6S.js → chunk-RZ735TLX.js} +762 -167
  58. package/chunk-S3UTETIC.js +4885 -0
  59. package/chunk-S73OEOHH.js +2286 -0
  60. package/{chunk-JRKKFRAV.js → chunk-TSKWE74T.js} +58 -8
  61. package/{chunk-A67QFHAA.js → chunk-UG3WOFU6.js} +1 -1
  62. package/{chunk-4ZDM73SD.js → chunk-V2J635L5.js} +1 -1
  63. package/chunk-VC6OZXO5.js +298 -0
  64. package/{chunk-7U44LYTR.js → chunk-WPHL6ALY.js} +1 -1
  65. package/{chunk-4SIMLBEU.js → chunk-WTYKCU4W.js} +9 -9
  66. package/{chunk-NPVBXJY2.js → chunk-WWU275LU.js} +9 -9
  67. package/{chunk-ZQ2UM4KG.js → chunk-WZSRQNQG.js} +1 -292
  68. package/{chunk-DSZUWUYB.js → chunk-XHQWJUW4.js} +2 -2
  69. package/{chunk-GAKEBQD6.js → chunk-YDCZVUFP.js} +4 -0
  70. package/{chunk-2O4IZNTG.js → chunk-YTQLJYLB.js} +2 -2
  71. package/{chunk-3Y3HW5PX.js → chunk-ZPFRLGIZ.js} +1512 -935
  72. package/{chunk-5KLGBAAR.js → chunk-ZR4VHQ5D.js} +14 -13
  73. package/cliEnvHelpers-VYC2OPTB.js +30 -0
  74. package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
  75. package/{createAgentAutomationAction-CCE7CWGQ.js → createAgentAutomationAction-G32GKDGV.js} +22 -23
  76. package/{createDialogAction-QTRR4AT7.js → createDialogAction-TISANRZK.js} +25 -25
  77. package/{createPageAction-Y4KQOAJE.js → createPageAction-O7KOYNV4.js} +27 -27
  78. package/{dbSlice-WWNV2SGX.js → dbSlice-WDP2ZZHK.js} +7 -8
  79. package/{deleteFile-OW53A6BX.js → deleteFile-M7UNIUOO.js} +5 -5
  80. package/{dialogCommands-SMKIAC3Y.js → dialogCommands-6JPB3YQY.js} +33 -23
  81. package/{dialogSlice-PT7YBWNE.js → dialogSlice-PRHHYSP5.js} +21 -22
  82. package/{docCreateCommands-RFNA4HNM.js → docCreateCommands-75E6TZNN.js} +36 -25
  83. package/{docDeleteCommands-4YZ325M6.js → docDeleteCommands-EJHLN7LW.js} +37 -27
  84. package/{docReadCommands-RT6VAFFG.js → docReadCommands-RJYBC4FS.js} +36 -25
  85. package/{docStore-QUQZAFZF.js → docStore-H5VWKT5D.js} +22 -23
  86. package/{docUpdateCommands-EKKKNYPW.js → docUpdateCommands-MG4CNISV.js} +36 -25
  87. package/fetchMessages-KTNM7QAR.js +1 -1
  88. package/{getPricing-3E6UNPKL.js → getPricing-6TOZXPAU.js} +7 -3
  89. package/{handleSendMessageAction-5NSYAS53.js → handleSendMessageAction-QTUGICSZ.js} +22 -23
  90. package/index.js +77 -76
  91. package/{machineCommands-DOOSIUKG.js → machineCommands-MAV7M3TK.js} +67 -60
  92. package/{machineWsRunDispatch-PIOIQRBW.js → machineWsRunDispatch-ZOEGTKHC.js} +54 -49
  93. package/{memoryCommands-O4MIPIWQ.js → memoryCommands-AFMES3LN.js} +5 -5
  94. package/{models-4OPOOLFS.js → models-LSCRJJ6P.js} +2 -2
  95. package/package.json +1 -1
  96. package/{read-GW7ZEI23.js → read-2MIMRBZ2.js} +5 -5
  97. package/{readDocTool-HUFU6OCT.js → readDocTool-QHVGQHUJ.js} +1 -1
  98. package/{readlineWorkspace-QEAOH5EP.js → readlineWorkspace-SWQKC7ZS.js} +1126 -678
  99. package/{removeDialogAgentAction-OHMCNSSD.js → removeDialogAgentAction-GTX5AN54.js} +11 -11
  100. package/{runAgentClientLoop-AIGLXC3R.js → runAgentClientLoop-P25HACXX.js} +42 -40
  101. package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-QNF3J3UV.js} +6 -6
  102. package/{setDialogExtraReferencesAction-YJUM5BWQ.js → setDialogExtraReferencesAction-WFQ63KYO.js} +7 -8
  103. package/{setPrimaryDialogAgentAction-EBAREZDM.js → setPrimaryDialogAgentAction-P57FXTSU.js} +11 -11
  104. package/{settingSlice-UW4IUI5L.js → settingSlice-CK5YZGNI.js} +8 -9
  105. package/skillDiscovery-ZYHSX7VD.js +16 -0
  106. package/{spaceCommands-BKHSPR73.js → spaceCommands-6O5EFEM5.js} +41 -33
  107. package/{spaceSlice-TYNWE3OC.js → spaceSlice-4EXTYXS4.js} +25 -24
  108. package/{streamAgentChatTurn-HRMFFA7E.js → streamAgentChatTurn-Q3FJAHG2.js} +205 -107
  109. package/{tableCommands-O7O2LBEG.js → tableCommands-E4SQWDOX.js} +10 -10
  110. package/{tools-3JNDS3WH.js → tools-AHNQE4GP.js} +33 -31
  111. package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-TXLF4MEI.js} +8 -6
  112. package/{updateCommands-VOSPKXFF.js → updateCommands-XZDOOYFH.js} +13 -5
  113. package/{updateDialogTitleAction-OCETSKCP.js → updateDialogTitleAction-XZDVLKVX.js} +25 -25
  114. package/chunk-5MMAK75Q.js +0 -15
  115. package/chunk-AZPCASRE.js +0 -36
  116. package/chunk-BBYVOSU2.js +0 -792
  117. package/chunk-DCOA4QSN.js +0 -105
  118. package/chunk-UAD2WT54.js +0 -64
  119. package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
  120. package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
  121. package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
  122. package/{chunk-5CS33IBL.js → chunk-PDL2AV3E.js} +3 -3
  123. package/{chunk-EHLHSX7R.js → chunk-TOILAPLH.js} +3 -3
  124. package/{chunk-UTLZINAP.js → chunk-TSUJOM6N.js} +10 -10
  125. package/{offlineMarxistsAgentCommand-BCPJITJL.js → offlineMarxistsAgentCommand-5OOWZLJI.js} +3 -3
@@ -1,10 +1,3 @@
1
- import {
2
- asTrimmedNonEmptyStringArray
3
- } from "./chunk-I42VC5KR.js";
4
- import {
5
- asOptionalTrimmedString
6
- } from "./chunk-G3SUCT4W.js";
7
-
8
1
  // node_modules/js-yaml/dist/js-yaml.mjs
9
2
  function isNothing(subject) {
10
3
  return typeof subject === "undefined" || subject === null;
@@ -2588,291 +2581,7 @@ var safeLoad = renamed("safeLoad", "load");
2588
2581
  var safeLoadAll = renamed("safeLoadAll", "loadAll");
2589
2582
  var safeDump = renamed("safeDump", "dump");
2590
2583
 
2591
- // packages/ai/skills/skillDocProtocol.ts
2592
- var SKILL_DOC_ENUMS = {
2593
- triggerMode: ["explicit", "required", "recommended"],
2594
- budgetTier: ["low", "medium", "high"],
2595
- modality: ["text", "image", "video", "audio", "3d"],
2596
- docKind: ["knowledge", "instruction", "skill"]
2597
- };
2598
- var SKILL_CONFIG_BLOCK = "skill-config";
2599
- var EVAL_CONFIG_BLOCK = "eval-config";
2600
- var WORKFLOW_CONFIG_BLOCK = "workflow-config";
2601
- var normalizeStringArray = (value) => {
2602
- if (!Array.isArray(value)) return void 0;
2603
- const items = [...new Set(asTrimmedNonEmptyStringArray(value))];
2604
- return items.length > 0 ? items : void 0;
2605
- };
2606
- var normalizeBoolean = (value) => typeof value === "boolean" ? value : void 0;
2607
- var normalizeSkillEnumValue = (key, value) => typeof value === "string" && SKILL_DOC_ENUMS[key].includes(value) ? value : void 0;
2608
- var normalizeSkillBudgetTier = (value) => normalizeSkillEnumValue("budgetTier", value);
2609
- var normalizeSkillModalities = (value) => {
2610
- const raw = normalizeStringArray(value);
2611
- if (!raw) return void 0;
2612
- const filtered = raw.flatMap((item) => {
2613
- const modality = normalizeSkillEnumValue("modality", item);
2614
- return modality ? [modality] : [];
2615
- });
2616
- return filtered.length > 0 ? Array.from(new Set(filtered)) : void 0;
2617
- };
2618
- var normalizeSkillConfig = (value, fallbackTools) => {
2619
- if (!value || typeof value !== "object") return void 0;
2620
- const record = value;
2621
- const name = asOptionalTrimmedString(record.name) ?? "";
2622
- const description = asOptionalTrimmedString(record.description) ?? "";
2623
- if (!name || !description) return void 0;
2624
- const triggerMode = normalizeSkillEnumValue("triggerMode", record.triggerMode);
2625
- const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
2626
- const modalities = normalizeSkillModalities(record.modalities);
2627
- const toolNames = normalizeStringArray(record.toolNames) ?? normalizeStringArray(fallbackTools) ?? void 0;
2628
- const discover = record.discover && typeof record.discover === "object" ? {
2629
- keywords: normalizeStringArray(
2630
- record.discover.keywords
2631
- ),
2632
- examples: normalizeStringArray(
2633
- record.discover.examples
2634
- )
2635
- } : void 0;
2636
- return {
2637
- version: "0.1",
2638
- kind: "skill",
2639
- id: asOptionalTrimmedString(record.id),
2640
- name,
2641
- description,
2642
- triggerMode,
2643
- toolNames,
2644
- preferredAgents: normalizeStringArray(record.preferredAgents),
2645
- budgetTier,
2646
- dispatchPreferred: normalizeBoolean(record.dispatchPreferred),
2647
- modalities,
2648
- requiredSkills: normalizeStringArray(record.requiredSkills),
2649
- recommendedSkills: normalizeStringArray(record.recommendedSkills),
2650
- promptPatch: asOptionalTrimmedString(record.promptPatch),
2651
- discover: discover?.keywords || discover?.examples ? discover : void 0
2652
- };
2653
- };
2654
- var normalizeEvalConfig = (value) => {
2655
- if (!value || typeof value !== "object") return void 0;
2656
- const record = value;
2657
- if (!Array.isArray(record.cases)) return void 0;
2658
- const cases = [];
2659
- for (const item of record.cases) {
2660
- if (!item || typeof item !== "object") continue;
2661
- const testCase = item;
2662
- const input = asOptionalTrimmedString(testCase.input) ?? "";
2663
- if (!input) continue;
2664
- cases.push({
2665
- input,
2666
- expectedTools: normalizeStringArray(testCase.expectedTools),
2667
- expectedSignals: normalizeStringArray(testCase.expectedSignals),
2668
- forbiddenSignals: normalizeStringArray(testCase.forbiddenSignals)
2669
- });
2670
- }
2671
- return cases.length > 0 ? {
2672
- version: "0.1",
2673
- cases
2674
- } : void 0;
2675
- };
2676
- var normalizeWorkflowConfig = (value) => {
2677
- if (!value || typeof value !== "object") return void 0;
2678
- const record = value;
2679
- const name = asOptionalTrimmedString(record.name) ?? "";
2680
- const description = asOptionalTrimmedString(record.description) ?? "";
2681
- if (!name || !description) return void 0;
2682
- const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
2683
- return {
2684
- version: "0.1",
2685
- kind: "workflow",
2686
- id: asOptionalTrimmedString(record.id),
2687
- name,
2688
- description,
2689
- defaultAgent: asOptionalTrimmedString(record.defaultAgent),
2690
- inputs: normalizeStringArray(record.inputs),
2691
- recommendedTools: normalizeStringArray(record.recommendedTools),
2692
- requiredTools: normalizeStringArray(record.requiredTools),
2693
- requiredOutputs: normalizeStringArray(record.requiredOutputs),
2694
- gates: normalizeStringArray(record.gates),
2695
- budgetTier,
2696
- contextStrategy: asOptionalTrimmedString(record.contextStrategy),
2697
- failureProtocol: asOptionalTrimmedString(record.failureProtocol)
2698
- };
2699
- };
2700
- var normalizePageSkillMetadata = (value, fallbackTools) => {
2701
- if (!value || typeof value !== "object") return void 0;
2702
- const record = value;
2703
- const kind = normalizeSkillEnumValue("docKind", record.kind);
2704
- const meta = {
2705
- kind,
2706
- requiredSkills: normalizeStringArray(record.requiredSkills),
2707
- recommendedSkills: normalizeStringArray(record.recommendedSkills),
2708
- skillConfig: normalizeSkillConfig(record.skillConfig, fallbackTools),
2709
- evalConfig: normalizeEvalConfig(record.evalConfig),
2710
- workflowConfig: normalizeWorkflowConfig(record.workflowConfig)
2711
- };
2712
- if (meta.skillConfig && !meta.kind) {
2713
- meta.kind = "skill";
2714
- }
2715
- if (meta.workflowConfig && !meta.kind) {
2716
- meta.kind = "instruction";
2717
- }
2718
- return meta.kind || meta.requiredSkills || meta.recommendedSkills || meta.skillConfig || meta.evalConfig || meta.workflowConfig ? meta : void 0;
2719
- };
2720
- var extractCommentBlock = (markdown, blockName) => {
2721
- if (!markdown) return void 0;
2722
- const matcher = new RegExp(
2723
- `<!--\\s*${blockName}\\s*\\n([\\s\\S]*?)-->`,
2724
- "i"
2725
- );
2726
- const match = markdown.match(matcher);
2727
- return asOptionalTrimmedString(match?.[1]);
2728
- };
2729
- var removeCommentBlock = (markdown, blockName) => markdown.replace(
2730
- new RegExp(`\\n?<!--\\s*${blockName}\\s*\\n[\\s\\S]*?-->\\s*`, "gi"),
2731
- "\n\n"
2732
- );
2733
- var parseYamlObject = (raw) => {
2734
- if (!raw) return void 0;
2735
- try {
2736
- const parsed = load(raw);
2737
- return parsed && typeof parsed === "object" ? parsed : void 0;
2738
- } catch {
2739
- return void 0;
2740
- }
2741
- };
2742
- var parseSkillDocProtocol = (markdown, existingMeta, fallbackTools) => {
2743
- const source = typeof markdown === "string" ? markdown : "";
2744
- const skillBlock = parseYamlObject(extractCommentBlock(source, SKILL_CONFIG_BLOCK));
2745
- const evalBlock = parseYamlObject(extractCommentBlock(source, EVAL_CONFIG_BLOCK));
2746
- const workflowBlock = parseYamlObject(extractCommentBlock(source, WORKFLOW_CONFIG_BLOCK));
2747
- const cleanedContent = removeCommentBlock(
2748
- removeCommentBlock(
2749
- removeCommentBlock(source, SKILL_CONFIG_BLOCK),
2750
- EVAL_CONFIG_BLOCK
2751
- ),
2752
- WORKFLOW_CONFIG_BLOCK
2753
- ).replace(/\n{3,}/g, "\n\n").trim();
2754
- const parsedMeta = normalizePageSkillMetadata(
2755
- {
2756
- ...existingMeta ?? {},
2757
- ...skillBlock ? {
2758
- kind: existingMeta?.kind === "skill" || skillBlock.kind === "skill" ? "skill" : existingMeta?.kind,
2759
- requiredSkills: skillBlock.requiredSkills ?? existingMeta?.requiredSkills,
2760
- recommendedSkills: skillBlock.recommendedSkills ?? existingMeta?.recommendedSkills,
2761
- skillConfig: skillBlock
2762
- } : {},
2763
- ...evalBlock ? { evalConfig: evalBlock } : {},
2764
- ...workflowBlock ? { workflowConfig: workflowBlock } : {}
2765
- },
2766
- fallbackTools
2767
- );
2768
- return {
2769
- content: cleanedContent,
2770
- meta: parsedMeta
2771
- };
2772
- };
2773
- var resolvePageSkillMetadata = (page) => {
2774
- if (!page) return void 0;
2775
- const existingMeta = normalizePageSkillMetadata(page.meta, page.tools);
2776
- return parseSkillDocProtocol(page.content ?? "", existingMeta, page.tools).meta;
2777
- };
2778
- var yamlBlock = (value) => dump(value, { lineWidth: 120, noRefs: true }).trim();
2779
- var buildSkillConfigComment = (config) => {
2780
- const payload = {
2781
- version: config.version,
2782
- kind: config.kind,
2783
- ...config.id ? { id: config.id } : {},
2784
- name: config.name,
2785
- description: config.description,
2786
- ...config.triggerMode ? { triggerMode: config.triggerMode } : {},
2787
- ...config.requiredSkills?.length ? { requiredSkills: config.requiredSkills } : {},
2788
- ...config.recommendedSkills?.length ? { recommendedSkills: config.recommendedSkills } : {},
2789
- ...config.toolNames?.length ? { toolNames: config.toolNames } : {},
2790
- ...config.preferredAgents?.length ? { preferredAgents: config.preferredAgents } : {},
2791
- ...config.budgetTier ? { budgetTier: config.budgetTier } : {},
2792
- ...typeof config.dispatchPreferred === "boolean" ? { dispatchPreferred: config.dispatchPreferred } : {},
2793
- ...config.modalities?.length ? { modalities: config.modalities } : {},
2794
- ...config.discover?.keywords?.length || config.discover?.examples?.length ? {
2795
- discover: {
2796
- ...config.discover?.keywords?.length ? { keywords: config.discover.keywords } : {},
2797
- ...config.discover?.examples?.length ? { examples: config.discover.examples } : {}
2798
- }
2799
- } : {},
2800
- ...config.promptPatch ? { promptPatch: config.promptPatch } : {}
2801
- };
2802
- return `<!-- ${SKILL_CONFIG_BLOCK}
2803
- ${yamlBlock(payload)}
2804
- -->`;
2805
- };
2806
- var buildEvalConfigComment = (config) => `<!-- ${EVAL_CONFIG_BLOCK}
2807
- ${yamlBlock({
2808
- version: config.version,
2809
- cases: config.cases
2810
- })}
2811
- -->`;
2812
- var buildWorkflowConfigComment = (config) => `<!-- ${WORKFLOW_CONFIG_BLOCK}
2813
- ${yamlBlock({
2814
- version: config.version,
2815
- kind: config.kind,
2816
- ...config.id ? { id: config.id } : {},
2817
- name: config.name,
2818
- description: config.description,
2819
- ...config.defaultAgent ? { defaultAgent: config.defaultAgent } : {},
2820
- ...config.inputs?.length ? { inputs: config.inputs } : {},
2821
- ...config.recommendedTools?.length ? { recommendedTools: config.recommendedTools } : {},
2822
- ...config.requiredTools?.length ? { requiredTools: config.requiredTools } : {},
2823
- ...config.requiredOutputs?.length ? { requiredOutputs: config.requiredOutputs } : {},
2824
- ...config.gates?.length ? { gates: config.gates } : {},
2825
- ...config.budgetTier ? { budgetTier: config.budgetTier } : {},
2826
- ...config.contextStrategy ? { contextStrategy: config.contextStrategy } : {},
2827
- ...config.failureProtocol ? { failureProtocol: config.failureProtocol } : {}
2828
- })}
2829
- -->`;
2830
- var buildSkillDocMarkdown = (options) => {
2831
- const sections = [
2832
- asOptionalTrimmedString(options.body) ?? "",
2833
- buildSkillConfigComment(options.skillConfig),
2834
- options.evalConfig ? buildEvalConfigComment(options.evalConfig) : "",
2835
- options.workflowConfig ? buildWorkflowConfigComment(options.workflowConfig) : ""
2836
- ].filter(Boolean);
2837
- return sections.join("\n\n").trim();
2838
- };
2839
- var extractFrontmatter = (markdown) => {
2840
- const match = markdown.match(/^\s*---\s*\n([\s\S]*?)\n\s*---\s*\n?/);
2841
- if (!match) return { body: markdown.trim() };
2842
- const frontmatter = parseYamlObject(match[1]);
2843
- const body = markdown.slice(match[0].length).trim();
2844
- return { frontmatter, body };
2845
- };
2846
- var normalizeAllowedTools = (value) => {
2847
- if (Array.isArray(value)) {
2848
- return normalizeStringArray(value) ?? [];
2849
- }
2850
- if (typeof value === "string") {
2851
- return value.split(/\s+/).map((item) => item.trim()).filter(Boolean);
2852
- }
2853
- return [];
2854
- };
2855
- var parseExternalSkillMarkdown = (markdown) => {
2856
- const { frontmatter, body } = extractFrontmatter(markdown);
2857
- return {
2858
- name: asOptionalTrimmedString(frontmatter?.name),
2859
- description: asOptionalTrimmedString(frontmatter?.description),
2860
- compatibility: asOptionalTrimmedString(frontmatter?.compatibility),
2861
- allowedTools: normalizeAllowedTools(frontmatter?.["allowed-tools"]),
2862
- metadata: frontmatter?.metadata && typeof frontmatter.metadata === "object" ? Object.fromEntries(
2863
- Object.entries(frontmatter.metadata).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, String(value)])
2864
- ) : void 0,
2865
- body
2866
- };
2867
- };
2868
-
2869
2584
  export {
2870
2585
  load,
2871
- normalizeStringArray,
2872
- normalizeSkillBudgetTier,
2873
- normalizeSkillModalities,
2874
- parseSkillDocProtocol,
2875
- resolvePageSkillMetadata,
2876
- buildSkillDocMarkdown,
2877
- parseExternalSkillMarkdown
2586
+ dump
2878
2587
  };
@@ -7,7 +7,7 @@ import {
7
7
  scheduleExistingRecordReplication,
8
8
  shouldReplaceLocalWithRemoteRecord,
9
9
  shouldReplicateLocalRecord
10
- } from "./chunk-UTLZINAP.js";
10
+ } from "./chunk-TSUJOM6N.js";
11
11
  import {
12
12
  fetchFromClientDb,
13
13
  fetchFromServer,
@@ -466,13 +466,13 @@ var readAction = async (payload, thunkApi) => {
466
466
  };
467
467
 
468
468
  export {
469
+ readRequestManager,
469
470
  BUILTIN_NOLO_AGENT_KEY,
470
471
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
471
472
  PUBLIC_DEEPSEEK_V4_PRO_AGENT_KEY,
472
473
  PUBLIC_KIMI_K27_CODING_AGENT_KEY,
473
474
  PUBLIC_GLM_52_AGENT_KEY,
474
475
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY,
475
- readRequestManager,
476
476
  resolveAgentReadServers,
477
477
  readAction
478
478
  };
@@ -1,3 +1,6 @@
1
+ // packages/core/drainReason.ts
2
+ var CORE_DRAIN_REASON = "core_draining";
3
+
1
4
  // packages/core/retryAfterMs.ts
2
5
  function normalizeNonNegativeMs(value, fallbackMs) {
3
6
  const parsed = Number(value);
@@ -24,6 +27,7 @@ function isGatewayHttpStatus(status) {
24
27
  }
25
28
 
26
29
  export {
30
+ CORE_DRAIN_REASON,
27
31
  normalizeNonNegativeMs,
28
32
  parseRetryAfterHeaderMs,
29
33
  isGatewayHttpStatus
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-TYSCFY6S.js";
4
+ } from "./chunk-RZ735TLX.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
- } from "./chunk-AUQ747NZ.js";
7
+ } from "./chunk-43UD5ZP7.js";
8
8
  import {
9
9
  asTrimmedLowercaseString
10
10
  } from "./chunk-QSJ3HFEF.js";