nolo-cli 0.9.1 → 0.11.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 (114) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-UD44KGZ4.js → _executeModel-ZEDPX6OF.js} +50 -48
  3. package/{action-ZJWE3Y5S.js → action-AA4IJ5K2.js} +11 -11
  4. package/{addContentAction-TVDBNJM5.js → addContentAction-QYVO4SYP.js} +10 -10
  5. package/{addDialogAgentAction-EKH774VT.js → addDialogAgentAction-WVVKT5WQ.js} +12 -12
  6. package/{agentDeleteCommand-TCPEFJTF.js → agentDeleteCommand-RDPGYIWF.js} +25 -25
  7. package/{agentEmailCommands-CZ3UILZ4.js → agentEmailCommands-2HJJKS5F.js} +62 -59
  8. package/{agentListCommands-SJKO2FFB.js → agentListCommands-HFEVV3ZW.js} +30 -29
  9. package/{agentMachineCommands-PSNABISZ.js → agentMachineCommands-25ZOENJU.js} +29 -29
  10. package/{agentRecordCommands-MH2JKFHS.js → agentRecordCommands-GTCOAM3L.js} +53 -50
  11. package/{agentRunCommand-4KH6MIZR.js → agentRunCommand-YBS3JDLD.js} +62 -56
  12. package/{agentRuntimeLocal-SKHJUWSS.js → agentRuntimeLocal-UQBMQI2M.js} +12 -12
  13. package/{agentSlice-3WXXN4VK.js → agentSlice-6EKOBCCS.js} +11 -11
  14. package/{authCommand-PXFX6JDT.js → authCommand-O2OWACN4.js} +12 -12
  15. package/{authCommands-356AYWEK.js → authCommands-H7365TZP.js} +6 -6
  16. package/{chunk-MKMWT7SA.js → chunk-2W2VYVI5.js} +336 -92
  17. package/{chunk-TSS3XJY4.js → chunk-3NSIQZZ6.js} +5 -5
  18. package/{chunk-AUQ747NZ.js → chunk-4SOKXIW4.js} +70 -6
  19. package/{chunk-ZIG5LJ7X.js → chunk-5MOUAAMK.js} +106 -2342
  20. package/{chunk-6GANEXVO.js → chunk-5OIFWVX7.js} +1 -1
  21. package/{chunk-MGOJ5R6J.js → chunk-7D3JY6C2.js} +2 -2
  22. package/{chunk-7OOXPE3N.js → chunk-AEZAORLG.js} +4 -4
  23. package/chunk-AFON4QUU.js +112 -0
  24. package/{chunk-YBWOP46I.js → chunk-BX6U3ETE.js} +20 -13
  25. package/{chunk-2PUGVR6E.js → chunk-C2MDQQ4O.js} +1 -1
  26. package/{chunk-SL35K7AH.js → chunk-C4FTUXVF.js} +2 -82
  27. package/{chunk-GAKEBQD6.js → chunk-D6OQHXVG.js} +11 -7
  28. package/{chunk-WKM6FH35.js → chunk-DWGAEFJL.js} +1 -1
  29. package/{chunk-PG5PNA7Y.js → chunk-E4HNJSHC.js} +20 -20
  30. package/{chunk-SBR32ZZS.js → chunk-EVZKZF32.js} +73 -40
  31. package/{chunk-C3RUNRHT.js → chunk-FXXSGWAJ.js} +1 -1
  32. package/{chunk-KTVVPRJS.js → chunk-GBDSZATH.js} +4 -4
  33. package/{chunk-3TZDXYSF.js → chunk-HNW7IJSK.js} +1 -1
  34. package/{chunk-2EISRLRC.js → chunk-IPYUUY4E.js} +2 -2
  35. package/{chunk-2K2ECKSG.js → chunk-KJR5KAUQ.js} +2 -2
  36. package/{chunk-XE635NI4.js → chunk-KQQVGRA3.js} +24 -24
  37. package/{chunk-AVMKZHBC.js → chunk-L53FGHA4.js} +3 -2
  38. package/{chunk-GG4AJPSR.js → chunk-LAX2JSTX.js} +2 -2
  39. package/{chunk-5PJ3VWCS.js → chunk-LP65VRCI.js} +7 -13
  40. package/chunk-LTRXGFMS.js +83 -0
  41. package/{chunk-63SLEOLK.js → chunk-MQI77IRB.js} +4 -4
  42. package/{chunk-PCWC3JTN.js → chunk-MTU75CZ2.js} +1 -1
  43. package/{chunk-3WYQEUBI.js → chunk-NEM67FX7.js} +1 -1
  44. package/{chunk-COMXDWNM.js → chunk-O26GI2JP.js} +10 -10
  45. package/{chunk-SH2CFQOH.js → chunk-O4BU24WZ.js} +2 -181
  46. package/{chunk-EYEEHCU4.js → chunk-OOM6SJNR.js} +10 -10
  47. package/chunk-OOSFSFMA.js +271 -0
  48. package/{chunk-PAKN26FP.js → chunk-OUI3ZHYD.js} +1 -1
  49. package/{chunk-EXTIQUCI.js → chunk-PNEW2Z3T.js} +9 -9
  50. package/{chunk-CPB2YM4D.js → chunk-PXQN7IBQ.js} +2 -2
  51. package/{chunk-4IJYA27C.js → chunk-PXZAAB4L.js} +4 -4
  52. package/{chunk-4K2KKCSD.js → chunk-Q3UKJVU4.js} +12 -16
  53. package/{chunk-XKIMRZO2.js → chunk-QNMFBBZK.js} +1 -1
  54. package/{chunk-XS466O7S.js → chunk-S3GS2PRL.js} +65 -30
  55. package/{chunk-YYUCRDOK.js → chunk-SOTZ6RDN.js} +1 -1
  56. package/{chunk-G43KEVSC.js → chunk-SV5MWASH.js} +17 -17
  57. package/{chunk-7QRKCBOP.js → chunk-TACHTH5D.js} +15 -15
  58. package/chunk-VC6OZXO5.js +298 -0
  59. package/{chunk-ZQ2UM4KG.js → chunk-WZSRQNQG.js} +1 -292
  60. package/{chunk-LARL2V6G.js → chunk-X2S7JTIG.js} +298 -66
  61. package/{chunk-Q2YZULBH.js → chunk-XENYHRUE.js} +1 -1
  62. package/{chunk-ELRRLDWI.js → chunk-XFOLQLDN.js} +2 -2
  63. package/{chunk-UUJDGGAK.js → chunk-XYZA7S7V.js} +6 -6
  64. package/{chunk-KOCA5FCS.js → chunk-ZEYDOXHF.js} +185 -147
  65. package/{chunk-5KLGBAAR.js → chunk-ZPRK73XY.js} +1 -1
  66. package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
  67. package/{createAgentAutomationAction-63OIP6X5.js → createAgentAutomationAction-LTI5QU35.js} +25 -25
  68. package/{createDialogAction-ZLYZDYBB.js → createDialogAction-OJJ7L3L3.js} +26 -25
  69. package/{createPageAction-AL5FSDCK.js → createPageAction-5MXWVRGY.js} +30 -29
  70. package/{dbSlice-PR44QPXY.js → dbSlice-RQFQQVHT.js} +9 -9
  71. package/{deleteFile-4SKGPHOZ.js → deleteFile-7XP5BGC7.js} +6 -6
  72. package/{dialogCommands-F6YI5742.js → dialogCommands-JTJ3RPPW.js} +23 -23
  73. package/{dialogSlice-JSBNZRLR.js → dialogSlice-OWROKURJ.js} +22 -22
  74. package/{docCreateCommands-4CTO7ERT.js → docCreateCommands-WJBEW2V7.js} +23 -22
  75. package/{docDeleteCommands-VBWERDRG.js → docDeleteCommands-BVEHJOY5.js} +25 -24
  76. package/{docReadCommands-KNP4MFYB.js → docReadCommands-NEWOZIJV.js} +23 -22
  77. package/{docStore-ADP5VYY4.js → docStore-3DXRYBMD.js} +23 -23
  78. package/{docUpdateCommands-4BCBJQHA.js → docUpdateCommands-C7WHT7UU.js} +23 -22
  79. package/{fetchMessages-U6ZHN56A.js → fetchMessages-KTNM7QAR.js} +3 -3
  80. package/{handleSendMessageAction-IJDQ6ARA.js → handleSendMessageAction-B5PRR7BE.js} +27 -27
  81. package/index.js +58 -58
  82. package/{localDialogRead-Z5UTAJPU.js → localDialogRead-YSKFFRTT.js} +2 -2
  83. package/{machineCommands-EA3M4XTN.js → machineCommands-IIIREAEK.js} +67 -62
  84. package/{machineWsRunDispatch-NAPKE5ZA.js → machineWsRunDispatch-3SIU6ILW.js} +52 -49
  85. package/package.json +4 -2
  86. package/{read-RIJCIVKX.js → read-QJNKRROM.js} +6 -6
  87. package/{readDocTool-GZD2N3LO.js → readDocTool-H6X6KO6X.js} +1 -1
  88. package/{readlineWorkspace-KMWT4T4S.js → readlineWorkspace-HGP3I3OC.js} +97 -79
  89. package/{removeDialogAgentAction-GJQJNDW6.js → removeDialogAgentAction-TCT35SOF.js} +14 -14
  90. package/{runAgentClientLoop-U5Q6NDTJ.js → runAgentClientLoop-EFM4PTVI.js} +46 -44
  91. package/{setDialogExtraReferencesAction-M7OQG54N.js → setDialogExtraReferencesAction-CGYLZMFH.js} +12 -12
  92. package/{setPrimaryDialogAgentAction-46UNFJDL.js → setPrimaryDialogAgentAction-F6BFQDJU.js} +14 -14
  93. package/{settingSlice-FVUUH4JA.js → settingSlice-2I5HMG47.js} +10 -10
  94. package/skillDiscovery-UGSQGX2U.js +16 -0
  95. package/{spaceCommands-E2CFRPZJ.js → spaceCommands-MT7BWCIL.js} +32 -36
  96. package/{spaceSlice-L3R6IMXE.js → spaceSlice-BS5TSW3W.js} +22 -22
  97. package/{streamAgentChatTurn-UBDAOQWE.js → streamAgentChatTurn-I3VBFNR3.js} +85 -81
  98. package/{tableCommands-GOFP7QKA.js → tableCommands-M3DJUETS.js} +11 -11
  99. package/{toolApiClient-QI3YBNWB.js → toolApiClient-C7P7YSE4.js} +2 -2
  100. package/{tools-TMJXZTCA.js → tools-XSD2BOEN.js} +34 -32
  101. package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-32NRHTT2.js} +3 -3
  102. package/{understanding-GQKNDDWM.js → understanding-ZOESBLF3.js} +5 -5
  103. package/{updateDialogTitleAction-ZTWRDXI2.js → updateDialogTitleAction-7FYNJOGP.js} +25 -25
  104. package/chunk-QYXLLLGL.js +0 -4519
  105. package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-GOL2S4W2.js} +1 -1
  106. package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
  107. package/{chunk-EHLHSX7R.js → chunk-5MMZUWSG.js} +3 -3
  108. package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
  109. package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
  110. package/{chunk-5MIDPSSK.js → chunk-JK7VW2FN.js} +3 -3
  111. package/{chunk-TILFE6LV.js → chunk-YOCHZD7D.js} +3 -3
  112. package/{chunk-JRKKFRAV.js → chunk-YTBMA7NO.js} +3 -3
  113. package/{db-HCJ5PRB5.js → db-6QED3ZVO.js} +3 -3
  114. package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-ID43Z7VX.js} +3 -3
@@ -7,7 +7,7 @@ import {
7
7
  toTimestampMs,
8
8
  upsert,
9
9
  write
10
- } from "./chunk-COMXDWNM.js";
10
+ } from "./chunk-O26GI2JP.js";
11
11
  import {
12
12
  asRecordOrEmpty
13
13
  } from "./chunk-KX6YBIHG.js";
@@ -15,13 +15,13 @@ import {
15
15
  createUserKey,
16
16
  createUserPreferenceKey,
17
17
  ulid
18
- } from "./chunk-SH2CFQOH.js";
18
+ } from "./chunk-O4BU24WZ.js";
19
19
  import {
20
20
  asTrimmedLowercaseString
21
21
  } from "./chunk-QSJ3HFEF.js";
22
22
  import {
23
23
  BUILTIN_NOLO_AGENT_KEY
24
- } from "./chunk-ELRRLDWI.js";
24
+ } from "./chunk-XFOLQLDN.js";
25
25
  import {
26
26
  asyncThunkCreator,
27
27
  buildCreateSlice,
@@ -29,12 +29,12 @@ import {
29
29
  createAsyncThunk,
30
30
  createSelector,
31
31
  selectIdentityUserId
32
- } from "./chunk-EYEEHCU4.js";
32
+ } from "./chunk-OOM6SJNR.js";
33
33
  import {
34
34
  getAllServers,
35
35
  getIsDesktopApp,
36
36
  isProduction
37
- } from "./chunk-QYXLLLGL.js";
37
+ } from "./chunk-OOSFSFMA.js";
38
38
  import {
39
39
  isLocalServerUrl
40
40
  } from "./chunk-4SN6J65J.js";
@@ -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 = {
@@ -102,6 +102,7 @@ var DEFAULT_PRIVATE_NOLO_WORKSPACE_TOOLS = [
102
102
  "readSpace",
103
103
  "readDoc",
104
104
  "readSkillDoc",
105
+ "loadSkill",
105
106
  "listTables",
106
107
  "queryTableRows",
107
108
  "cliWhoami",
@@ -388,6 +389,7 @@ var NOLO_WORKSPACE_TOOL_NAMES = [
388
389
  "readSpace",
389
390
  "readDoc",
390
391
  "readSkillDoc",
392
+ "loadSkill",
391
393
  "listTables",
392
394
  "queryTableRows",
393
395
  "cliWhoami",
@@ -458,6 +460,10 @@ function buildNoloWorkspaceOpenAiTools(args) {
458
460
  add("listAgents", "List the current user's agents in the Nolo workspace.", {
459
461
  space: stringToolParam("Optional space id or URL."),
460
462
  publicOnly: { type: "boolean", description: "Only show public agents." }
463
+ // 端间差异(LOW-R2-3):CLI 命令 `nolo agent list` 无 --limit(parseAgentListArgs
464
+ // 仅支持 --json/--public-only/--ids-only),本地缓存全量列出;web 端
465
+ // listAgentsFunc 另有 limit(默认 100,最大 500)。如后续对齐需在
466
+ // parseAgentListArgs / agentListCommands 增加 --limit 透传。
461
467
  });
462
468
  add("readAgent", "Read one agent config in the Nolo workspace.", {
463
469
  agent: stringToolParam("Agent key, id, alias, or URL.")
@@ -474,6 +480,9 @@ function buildNoloWorkspaceOpenAiTools(args) {
474
480
  add("readSkillDoc", "Read one skill doc in the Nolo workspace.", {
475
481
  doc: stringToolParam("Skill doc/page key.")
476
482
  }, ["doc"]);
483
+ 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.", {
484
+ name: stringToolParam("Skill name (the name advertised in the skill-discovery layer).")
485
+ }, ["name"]);
477
486
  add("listTables", "List tables in the current user scope or an optional space scope.", {
478
487
  limit: { type: "integer", description: "Maximum tables to return." },
479
488
  space: stringToolParam("Optional space id or URL."),
@@ -791,13 +800,15 @@ function buildNoloWorkspaceCommandArgs(call) {
791
800
  case "readDoc": {
792
801
  const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
793
802
  if (!doc) throw new Error("readDoc requires doc.");
794
- return ["doc", "read", doc];
803
+ return doc.startsWith("page-") ? ["doc", "read", "--key", doc] : ["doc", "read", "--id", doc];
795
804
  }
796
805
  case "readSkillDoc": {
797
806
  const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
798
807
  if (!doc) throw new Error("readSkillDoc requires doc.");
799
- return ["skill-doc", "read", doc];
808
+ return doc.startsWith("page-") ? ["skill-doc", "read", "--key", doc] : ["skill-doc", "read", "--id", doc];
800
809
  }
810
+ case "loadSkill":
811
+ throw new Error("loadSkill is a local-fs tool and has no CLI mapping; wire buildLoadSkillExecutor instead.");
801
812
  case "listTables": {
802
813
  const cliArgs = ["table", "list"];
803
814
  const limit = noloPositiveIntegerString(args.limit);
@@ -868,10 +879,62 @@ async function runNoloWorkspaceCliTool(call, args) {
868
879
  function buildNoloWorkspaceCliToolExecutors(args) {
869
880
  const executors = {};
870
881
  for (const toolName of NOLO_WORKSPACE_TOOL_NAMES) {
882
+ if (toolName === "loadSkill") continue;
871
883
  executors[toolName] = (call) => runNoloWorkspaceCliTool(call, args);
872
884
  }
873
885
  return executors;
874
886
  }
887
+ function buildLoadSkillExecutor(args) {
888
+ return async (call) => {
889
+ const parsed = parseNoloWorkspaceToolArguments(call.arguments);
890
+ const name = noloStringArg(parsed.name ?? parsed.skillName ?? parsed.skill);
891
+ if (!name) {
892
+ return {
893
+ content: await formatUnknownSkillMessage(args.cwd, "(no name provided)"),
894
+ metadata: { loadSkill: true, resolved: false }
895
+ };
896
+ }
897
+ const { resolveSkillByName } = await import("./skillDiscovery-UGSQGX2U.js");
898
+ const resolved = resolveSkillByName(args.cwd, name);
899
+ if (!resolved) {
900
+ return {
901
+ content: await formatUnknownSkillMessage(args.cwd, name),
902
+ metadata: { loadSkill: true, resolved: false, name, requestedName: name }
903
+ };
904
+ }
905
+ try {
906
+ const { readFileSync } = await import("node:fs");
907
+ const body = readFileSync(resolved, "utf8");
908
+ return {
909
+ content: `Skill "${name}" loaded inline. Follow its instructions.
910
+
911
+ ${body}`,
912
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved }
913
+ };
914
+ } catch (err) {
915
+ const message = err instanceof Error ? err.message : String(err);
916
+ return {
917
+ content: `Skill "${name}" could not be read: ${message}`,
918
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved, readError: message }
919
+ };
920
+ }
921
+ };
922
+ }
923
+ async function formatUnknownSkillMessage(cwd, requestedName) {
924
+ const { discoverSkills } = await import("./skillDiscovery-UGSQGX2U.js");
925
+ let available = [];
926
+ try {
927
+ available = discoverSkills(cwd).map((s) => s.name);
928
+ } catch {
929
+ }
930
+ const header = `Skill "${requestedName}" not found in this workspace's skill directories (.agents/skills/<name>/SKILL.md, docs/skills/<name>.md).`;
931
+ if (available.length === 0) return `${header}
932
+
933
+ No skills were discovered in this workspace.`;
934
+ return `${header}
935
+
936
+ Available skills: ${available.join(", ")}`;
937
+ }
875
938
  var nodeSpawnFallback = (options) => {
876
939
  return spawnToWebStreams({ cmd: options.cmd, env: options.env });
877
940
  };
@@ -898,5 +961,6 @@ export {
898
961
  filterNoloDialogSubjectRefEvidence,
899
962
  verifyNoloDialogSubjectRefQuery,
900
963
  buildNoloTableQueryRequest,
901
- buildNoloWorkspaceCliToolExecutors
964
+ buildNoloWorkspaceCliToolExecutors,
965
+ buildLoadSkillExecutor
902
966
  };