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
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  asOptionalFiniteNumber
10
10
  } from "./chunk-WWC7I6TA.js";
11
- import {
12
- asOptionalTrimmedString
13
- } from "./chunk-G3SUCT4W.js";
14
11
  import {
15
12
  isRecord
16
13
  } from "./chunk-KUG52IAP.js";
14
+ import {
15
+ asOptionalTrimmedString
16
+ } from "./chunk-G3SUCT4W.js";
17
17
 
18
18
  // packages/agent-runtime/toolNameAliases.ts
19
19
  var LEGACY_TOOL_NAME_ALIASES = {
@@ -63,7 +63,10 @@ var LEGACY_TOOL_NAME_ALIASES = {
63
63
  webfetch: "fetchWebpage",
64
64
  web_fetch: "fetchWebpage",
65
65
  fetchweb: "fetchWebpage",
66
- fetch_web: "fetchWebpage"
66
+ fetch_web: "fetchWebpage",
67
+ // 模型偶尔会把 loadSkill 幻觉成 readSkill(参数风格 name= 一致),
68
+ // 规范化到 loadSkill,避免 localToolPolicy 把这种调用直接拦死。
69
+ readSkill: "loadSkill"
67
70
  };
68
71
  var normalizeToolName = (name) => name.replace(/[-_]/g, "").toLowerCase();
69
72
  var canonicalizeToolName = (rawName) => {
@@ -102,6 +105,7 @@ var DEFAULT_PRIVATE_NOLO_WORKSPACE_TOOLS = [
102
105
  "readSpace",
103
106
  "readDoc",
104
107
  "readSkillDoc",
108
+ "loadSkill",
105
109
  "listTables",
106
110
  "queryTableRows",
107
111
  "cliWhoami",
@@ -388,6 +392,7 @@ var NOLO_WORKSPACE_TOOL_NAMES = [
388
392
  "readSpace",
389
393
  "readDoc",
390
394
  "readSkillDoc",
395
+ "loadSkill",
391
396
  "listTables",
392
397
  "queryTableRows",
393
398
  "cliWhoami",
@@ -399,12 +404,6 @@ var DIALOG_PATH_RE = /^\/(?:space\/([^/]+)\/)?dialog-(.+)-([0-9A-HJKMNP-TV-Z]{26
399
404
  function stringToolParam(description) {
400
405
  return { type: "string", description };
401
406
  }
402
- function isNoloWorkspaceToolName(toolName) {
403
- return typeof toolName === "string" && NOLO_WORKSPACE_TOOL_NAME_SET.has(toolName);
404
- }
405
- function filterNoloWorkspaceToolNames(toolNames) {
406
- return (toolNames ?? []).filter(isNoloWorkspaceToolName);
407
- }
408
407
  function buildNoloWorkspaceOpenAiTools(args) {
409
408
  const toolNames = new Set(args.toolNames ?? []);
410
409
  const tools = [];
@@ -455,9 +454,13 @@ function buildNoloWorkspaceOpenAiTools(args) {
455
454
  description: "Confirmed dialog ids or dbKeys to delete."
456
455
  }
457
456
  }, ["query"]);
458
- add("listAgents", "List the current user's agents in the Nolo workspace.", {
457
+ add("listAgents", "List the current user's agents as safe summaries; use readAgent to resolve the runnable agentKey before delegation.", {
459
458
  space: stringToolParam("Optional space id or URL."),
460
459
  publicOnly: { type: "boolean", description: "Only show public agents." }
460
+ // 端间差异(LOW-R2-3):CLI 命令 `nolo agent list` 无 --limit(parseAgentListArgs
461
+ // 仅支持 --json/--public-only/--ids-only),本地缓存全量列出;web 端
462
+ // listAgentsFunc 另有 limit(默认 100,最大 500)。如后续对齐需在
463
+ // parseAgentListArgs / agentListCommands 增加 --limit 透传。
461
464
  });
462
465
  add("readAgent", "Read one agent config in the Nolo workspace.", {
463
466
  agent: stringToolParam("Agent key, id, alias, or URL.")
@@ -474,6 +477,9 @@ function buildNoloWorkspaceOpenAiTools(args) {
474
477
  add("readSkillDoc", "Read one skill doc in the Nolo workspace.", {
475
478
  doc: stringToolParam("Skill doc/page key.")
476
479
  }, ["doc"]);
480
+ add("loadSkill", "Load a Skill by name from the workspace skill directories (.agents/skills/<name>/SKILL.md, then docs/skills/<name>.md) and return its full SKILL.md content inline so you can follow its instructions. Use this instead of readFile when you want to activate a skill. On an unknown name the tool returns a plain text list of available skill names rather than failing.", {
481
+ name: stringToolParam("Skill name (the name advertised in the skill-discovery layer).")
482
+ }, ["name"]);
477
483
  add("listTables", "List tables in the current user scope or an optional space scope.", {
478
484
  limit: { type: "integer", description: "Maximum tables to return." },
479
485
  space: stringToolParam("Optional space id or URL."),
@@ -770,6 +776,7 @@ function buildNoloWorkspaceCommandArgs(call) {
770
776
  const space = noloStringArg(args.space);
771
777
  if (space) cliArgs.push("--space", space);
772
778
  if (args.publicOnly === true) cliArgs.push("--public-only");
779
+ cliArgs.push("--json", "--safe");
773
780
  return cliArgs;
774
781
  }
775
782
  case "readAgent": {
@@ -791,13 +798,15 @@ function buildNoloWorkspaceCommandArgs(call) {
791
798
  case "readDoc": {
792
799
  const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
793
800
  if (!doc) throw new Error("readDoc requires doc.");
794
- return ["doc", "read", doc];
801
+ return doc.startsWith("page-") ? ["doc", "read", "--key", doc] : ["doc", "read", "--id", doc];
795
802
  }
796
803
  case "readSkillDoc": {
797
804
  const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
798
805
  if (!doc) throw new Error("readSkillDoc requires doc.");
799
- return ["skill-doc", "read", doc];
806
+ return doc.startsWith("page-") ? ["skill-doc", "read", "--key", doc] : ["skill-doc", "read", "--id", doc];
800
807
  }
808
+ case "loadSkill":
809
+ throw new Error("loadSkill is a local-fs tool and has no CLI mapping; wire buildLoadSkillExecutor instead.");
801
810
  case "listTables": {
802
811
  const cliArgs = ["table", "list"];
803
812
  const limit = noloPositiveIntegerString(args.limit);
@@ -868,10 +877,62 @@ async function runNoloWorkspaceCliTool(call, args) {
868
877
  function buildNoloWorkspaceCliToolExecutors(args) {
869
878
  const executors = {};
870
879
  for (const toolName of NOLO_WORKSPACE_TOOL_NAMES) {
880
+ if (toolName === "loadSkill") continue;
871
881
  executors[toolName] = (call) => runNoloWorkspaceCliTool(call, args);
872
882
  }
873
883
  return executors;
874
884
  }
885
+ function buildLoadSkillExecutor(args) {
886
+ return async (call) => {
887
+ const parsed = parseNoloWorkspaceToolArguments(call.arguments);
888
+ const name = noloStringArg(parsed.name ?? parsed.skillName ?? parsed.skill);
889
+ if (!name) {
890
+ return {
891
+ content: await formatUnknownSkillMessage(args.cwd, "(no name provided)"),
892
+ metadata: { loadSkill: true, resolved: false }
893
+ };
894
+ }
895
+ const { resolveSkillByName } = await import("./skillDiscovery-ZYHSX7VD.js");
896
+ const resolved = resolveSkillByName(args.cwd, name);
897
+ if (!resolved) {
898
+ return {
899
+ content: await formatUnknownSkillMessage(args.cwd, name),
900
+ metadata: { loadSkill: true, resolved: false, name, requestedName: name }
901
+ };
902
+ }
903
+ try {
904
+ const { readFileSync } = await import("node:fs");
905
+ const body = readFileSync(resolved, "utf8");
906
+ return {
907
+ content: `Skill "${name}" loaded inline. Follow its instructions.
908
+
909
+ ${body}`,
910
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved }
911
+ };
912
+ } catch (err) {
913
+ const message = err instanceof Error ? err.message : String(err);
914
+ return {
915
+ content: `Skill "${name}" could not be read: ${message}`,
916
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved, readError: message }
917
+ };
918
+ }
919
+ };
920
+ }
921
+ async function formatUnknownSkillMessage(cwd, requestedName) {
922
+ const { discoverSkills } = await import("./skillDiscovery-ZYHSX7VD.js");
923
+ let available = [];
924
+ try {
925
+ available = discoverSkills(cwd).map((s) => s.name);
926
+ } catch {
927
+ }
928
+ const header = `Skill "${requestedName}" not found in this workspace's skill directories (.agents/skills/<name>/SKILL.md, docs/skills/<name>.md).`;
929
+ if (available.length === 0) return `${header}
930
+
931
+ No skills were discovered in this workspace.`;
932
+ return `${header}
933
+
934
+ Available skills: ${available.join(", ")}`;
935
+ }
875
936
  var nodeSpawnFallback = (options) => {
876
937
  return spawnToWebStreams({ cmd: options.cmd, env: options.env });
877
938
  };
@@ -885,7 +946,6 @@ export {
885
946
  resolveExecutableOnPath,
886
947
  createGlob,
887
948
  NOLO_WORKSPACE_TOOL_NAMES,
888
- filterNoloWorkspaceToolNames,
889
949
  buildNoloWorkspaceOpenAiTools,
890
950
  parseNoloWorkspaceToolArguments,
891
951
  clampNoloPositiveInteger,
@@ -898,5 +958,6 @@ export {
898
958
  filterNoloDialogSubjectRefEvidence,
899
959
  verifyNoloDialogSubjectRefQuery,
900
960
  buildNoloTableQueryRequest,
901
- buildNoloWorkspaceCliToolExecutors
961
+ buildNoloWorkspaceCliToolExecutors,
962
+ buildLoadSkillExecutor
902
963
  };