nolo-cli 0.8.0-alpha.14 → 0.8.0-alpha.19

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 (98) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-KBMAUV6G.js → _executeModel-BOMQGOZC.js} +33 -30
  3. package/{action-SQGI5JY5.js → action-AEHDRQHP.js} +4 -4
  4. package/{addContentAction-ZX2PUS3X.js → addContentAction-OL5YQ6LW.js} +3 -3
  5. package/{addDialogAgentAction-ULADQX2Q.js → addDialogAgentAction-XU5Y2E2X.js} +2 -2
  6. package/{agentDeleteCommand-GNVYHOGZ.js → agentDeleteCommand-5DD2IM3J.js} +12 -11
  7. package/{agentEmailCommands-QETL62SU.js → agentEmailCommands-SE7MBTAG.js} +35 -32
  8. package/{agentListCommands-FM4OWXYT.js → agentListCommands-I6KZYCIG.js} +13 -12
  9. package/{agentMachineCommands-LDHJBWQO.js → agentMachineCommands-SBYN6EXT.js} +13 -12
  10. package/{agentRecordCommands-UW76EZ25.js → agentRecordCommands-F74NBFOZ.js} +35 -32
  11. package/{agentRunCommand-UFBOW4ZF.js → agentRunCommand-3DGDK4Y3.js} +41 -36
  12. package/{agentRuntimeLocal-XL5PLRJV.js → agentRuntimeLocal-ZYEIPTY4.js} +9 -8
  13. package/{agentSlice-2IBSFH4O.js → agentSlice-XEH6Y334.js} +3 -3
  14. package/{authCommand-PXFX6JDT.js → authCommand-EB5JSOX5.js} +3 -3
  15. package/{authCommands-356AYWEK.js → authCommands-XPEHTKSM.js} +2 -2
  16. package/{chunk-QTFSBLCF.js → chunk-2BIV3FMX.js} +25 -236
  17. package/{chunk-ZDXZSXYQ.js → chunk-2NNJ6S5U.js} +1 -1
  18. package/{chunk-6A3LI5TZ.js → chunk-2T2C6CNY.js} +2 -2
  19. package/{chunk-2IRF4LEX.js → chunk-4NDK6NWB.js} +87 -114
  20. package/{chunk-SRLZ7IVA.js → chunk-4P2MDGKS.js} +78 -211
  21. package/{chunk-MXLQWBVM.js → chunk-4QEWT7KD.js} +33 -3
  22. package/{chunk-DSNONPGW.js → chunk-5KLGBAAR.js} +1 -1
  23. package/{chunk-6CBN7GGH.js → chunk-64AAZRGY.js} +4 -4
  24. package/{chunk-QKRUUZCL.js → chunk-6RSAUKSQ.js} +24 -13
  25. package/{chunk-TWPGVS2U.js → chunk-7DAJ4AI4.js} +2 -2
  26. package/{chunk-RLCFUU46.js → chunk-7KCUSYT2.js} +4 -10
  27. package/chunk-AFON4QUU.js +112 -0
  28. package/chunk-AGFH73SK.js +239 -0
  29. package/{chunk-572EKYLF.js → chunk-BBYVOSU2.js} +1 -1
  30. package/{chunk-2MALU52L.js → chunk-C3RUNRHT.js} +1 -1
  31. package/{chunk-SL35K7AH.js → chunk-C4FTUXVF.js} +2 -82
  32. package/{chunk-JRPR5M4O.js → chunk-C77B4AFC.js} +2 -2
  33. package/{chunk-USZMK5UT.js → chunk-DCOA4QSN.js} +1 -1
  34. package/{chunk-BKPVTIEK.js → chunk-FVYY6MCS.js} +3 -3
  35. package/{chunk-3TZDXYSF.js → chunk-HNW7IJSK.js} +1 -1
  36. package/{chunk-B6DFDN4R.js → chunk-IEKTE4JQ.js} +2 -2
  37. package/{chunk-BR2WP3DF.js → chunk-IWX4UW2E.js} +9 -9
  38. package/{chunk-MMRAIO5Y.js → chunk-IX4C5TCO.js} +3 -3
  39. package/{chunk-6XKX2N2E.js → chunk-JRCUAPXX.js} +1 -1
  40. package/{chunk-XDVAYP26.js → chunk-JRKKFRAV.js} +1 -1
  41. package/{chunk-V2AISYMA.js → chunk-KPSWSDUF.js} +2 -2
  42. package/chunk-LTRXGFMS.js +83 -0
  43. package/{chunk-PCWC3JTN.js → chunk-MTU75CZ2.js} +1 -1
  44. package/{chunk-DGFWICQJ.js → chunk-N54XAP77.js} +1 -1
  45. package/{chunk-SACYB45H.js → chunk-O2ZNTTET.js} +5 -5
  46. package/{chunk-SH2CFQOH.js → chunk-O4BU24WZ.js} +2 -181
  47. package/{chunk-PFUCDPUH.js → chunk-OFM4S5P3.js} +13 -13
  48. package/{chunk-VH4YK6KZ.js → chunk-OI54SUZ7.js} +6 -6
  49. package/{chunk-QO4YO77G.js → chunk-OZNNTJM7.js} +2 -2
  50. package/{chunk-DG7AAAR3.js → chunk-P3PKED2I.js} +62 -2
  51. package/{chunk-JW43YCM5.js → chunk-PY4NLIAF.js} +1 -1
  52. package/{chunk-7IPLJUYC.js → chunk-RL776AGR.js} +1 -1
  53. package/{chunk-EQHI2AR3.js → chunk-RM7KF6OT.js} +41 -22
  54. package/{chunk-RJKDVL4L.js → chunk-SDJDLO5W.js} +2 -2
  55. package/{chunk-RTZFUR3V.js → chunk-SHAFJ4TI.js} +3 -3
  56. package/{chunk-YYUCRDOK.js → chunk-SOTZ6RDN.js} +1 -1
  57. package/chunk-VC6OZXO5.js +298 -0
  58. package/{chunk-EXTIQUCI.js → chunk-VVX233PH.js} +1 -1
  59. package/{chunk-ZQ2UM4KG.js → chunk-WZSRQNQG.js} +1 -292
  60. package/{chunk-Q2YZULBH.js → chunk-XENYHRUE.js} +1 -1
  61. package/{chunk-VQ2AJRGD.js → chunk-YPRZSPF3.js} +1 -1
  62. package/{chunk-I6DI7SGU.js → chunk-YRG2GO6E.js} +222 -63
  63. package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
  64. package/{createAgentAutomationAction-CSWOQOY5.js → createAgentAutomationAction-MBUL3ALA.js} +12 -12
  65. package/{createDialogAction-6VWL2TDI.js → createDialogAction-3JLD4VED.js} +16 -15
  66. package/{createPageAction-INRC4MH2.js → createPageAction-Z2AOWGIW.js} +17 -16
  67. package/{dbSlice-TO2TSMWM.js → dbSlice-LSKJDY2R.js} +2 -2
  68. package/{dialogCommands-DWSE4PMW.js → dialogCommands-4IX4XIZE.js} +14 -13
  69. package/{dialogSlice-CELFVS3F.js → dialogSlice-NRQ5WIJO.js} +12 -12
  70. package/{docCreateCommands-UFJL5PUM.js → docCreateCommands-SIL3NPGT.js} +14 -12
  71. package/{docDeleteCommands-XHEIBAB2.js → docDeleteCommands-7IOMLUS4.js} +16 -14
  72. package/{docReadCommands-PEDIC2CW.js → docReadCommands-FNFXUA5L.js} +14 -12
  73. package/{docStore-Q5AFYT6G.js → docStore-DBFNPMHU.js} +13 -13
  74. package/{docUpdateCommands-WBRODQ7P.js → docUpdateCommands-X2HNDVUC.js} +14 -12
  75. package/{fetchMessages-U6ZHN56A.js → fetchMessages-KTNM7QAR.js} +2 -2
  76. package/{getPricing-PWPJ6MNV.js → getPricing-3E6UNPKL.js} +3 -3
  77. package/{handleSendMessageAction-PPIGKCBQ.js → handleSendMessageAction-G3WLT6I7.js} +12 -12
  78. package/index.js +45 -45
  79. package/{localDialogRead-Z5UTAJPU.js → localDialogRead-2VRI24F4.js} +1 -1
  80. package/{machineCommands-3D7JMHUP.js → machineCommands-GPEWO27H.js} +37 -34
  81. package/{machineWsRunDispatch-PA5BR4AX.js → machineWsRunDispatch-2LSYCV4S.js} +34 -31
  82. package/{models-XLEOET3E.js → models-4OPOOLFS.js} +2 -2
  83. package/package.json +3 -2
  84. package/{readlineWorkspace-7WPA5OUS.js → readlineWorkspace-UL4LXWHX.js} +252 -78
  85. package/{removeDialogAgentAction-3MUQGFZX.js → removeDialogAgentAction-U3CP2M2H.js} +4 -4
  86. package/{runAgentClientLoop-DRAXPP6R.js → runAgentClientLoop-KKV7BWWC.js} +27 -24
  87. package/{setDialogExtraReferencesAction-MXHX2HPK.js → setDialogExtraReferencesAction-S7GUFLTN.js} +2 -2
  88. package/{setPrimaryDialogAgentAction-7DLDZHDT.js → setPrimaryDialogAgentAction-5SF7G5OS.js} +4 -4
  89. package/{settingSlice-PNLASZGI.js → settingSlice-EXYZ5EFP.js} +3 -3
  90. package/skillDiscovery-UGSQGX2U.js +16 -0
  91. package/{spaceCommands-ORSFAWEY.js → spaceCommands-E7VOF4LO.js} +16 -19
  92. package/{spaceSlice-5F2CDP2O.js → spaceSlice-KIDVQWOV.js} +16 -14
  93. package/{streamAgentChatTurn-ROOB5RLM.js → streamAgentChatTurn-YQH6ZGE6.js} +41 -36
  94. package/{tools-BAWXW4F6.js → tools-5C7OGJEW.js} +21 -19
  95. package/{tuiSummaryLlmCaller-JSI4GL6W.js → tuiSummaryLlmCaller-RV3THLZF.js} +4 -4
  96. package/{understanding-GQKNDDWM.js → understanding-3CUQQ6SV.js} +3 -3
  97. package/{updateDialogTitleAction-KJM65IGF.js → updateDialogTitleAction-JHAVYVIP.js} +12 -12
  98. package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
@@ -15,7 +15,7 @@ import {
15
15
  isRecord
16
16
  } from "./chunk-KUG52IAP.js";
17
17
 
18
- // packages/ai/tools/toolNameAliases.ts
18
+ // packages/agent-runtime/toolNameAliases.ts
19
19
  var LEGACY_TOOL_NAME_ALIASES = {
20
20
  createPage: "createDoc",
21
21
  updatePage: "updateDoc",
@@ -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",
@@ -474,6 +476,9 @@ function buildNoloWorkspaceOpenAiTools(args) {
474
476
  add("readSkillDoc", "Read one skill doc in the Nolo workspace.", {
475
477
  doc: stringToolParam("Skill doc/page key.")
476
478
  }, ["doc"]);
479
+ 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.", {
480
+ name: stringToolParam("Skill name (the name advertised in the skill-discovery layer).")
481
+ }, ["name"]);
477
482
  add("listTables", "List tables in the current user scope or an optional space scope.", {
478
483
  limit: { type: "integer", description: "Maximum tables to return." },
479
484
  space: stringToolParam("Optional space id or URL."),
@@ -798,6 +803,8 @@ function buildNoloWorkspaceCommandArgs(call) {
798
803
  if (!doc) throw new Error("readSkillDoc requires doc.");
799
804
  return ["skill-doc", "read", doc];
800
805
  }
806
+ case "loadSkill":
807
+ throw new Error("loadSkill is a local-fs tool and has no CLI mapping; wire buildLoadSkillExecutor instead.");
801
808
  case "listTables": {
802
809
  const cliArgs = ["table", "list"];
803
810
  const limit = noloPositiveIntegerString(args.limit);
@@ -868,10 +875,62 @@ async function runNoloWorkspaceCliTool(call, args) {
868
875
  function buildNoloWorkspaceCliToolExecutors(args) {
869
876
  const executors = {};
870
877
  for (const toolName of NOLO_WORKSPACE_TOOL_NAMES) {
878
+ if (toolName === "loadSkill") continue;
871
879
  executors[toolName] = (call) => runNoloWorkspaceCliTool(call, args);
872
880
  }
873
881
  return executors;
874
882
  }
883
+ function buildLoadSkillExecutor(args) {
884
+ return async (call) => {
885
+ const parsed = parseNoloWorkspaceToolArguments(call.arguments);
886
+ const name = noloStringArg(parsed.name ?? parsed.skillName ?? parsed.skill);
887
+ if (!name) {
888
+ return {
889
+ content: await formatUnknownSkillMessage(args.cwd, "(no name provided)"),
890
+ metadata: { loadSkill: true, resolved: false }
891
+ };
892
+ }
893
+ const { resolveSkillByName } = await import("./skillDiscovery-UGSQGX2U.js");
894
+ const resolved = resolveSkillByName(args.cwd, name);
895
+ if (!resolved) {
896
+ return {
897
+ content: await formatUnknownSkillMessage(args.cwd, name),
898
+ metadata: { loadSkill: true, resolved: false, name, requestedName: name }
899
+ };
900
+ }
901
+ try {
902
+ const { readFileSync } = await import("node:fs");
903
+ const body = readFileSync(resolved, "utf8");
904
+ return {
905
+ content: `Skill "${name}" loaded inline. Follow its instructions.
906
+
907
+ ${body}`,
908
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved }
909
+ };
910
+ } catch (err) {
911
+ const message = err instanceof Error ? err.message : String(err);
912
+ return {
913
+ content: `Skill "${name}" could not be read: ${message}`,
914
+ metadata: { loadSkill: true, resolved: true, name, requestedName: name, path: resolved, readError: message }
915
+ };
916
+ }
917
+ };
918
+ }
919
+ async function formatUnknownSkillMessage(cwd, requestedName) {
920
+ const { discoverSkills } = await import("./skillDiscovery-UGSQGX2U.js");
921
+ let available = [];
922
+ try {
923
+ available = discoverSkills(cwd).map((s) => s.name);
924
+ } catch {
925
+ }
926
+ const header = `Skill "${requestedName}" not found in this workspace's skill directories (.agents/skills/<name>/SKILL.md, docs/skills/<name>.md).`;
927
+ if (available.length === 0) return `${header}
928
+
929
+ No skills were discovered in this workspace.`;
930
+ return `${header}
931
+
932
+ Available skills: ${available.join(", ")}`;
933
+ }
875
934
  var nodeSpawnFallback = (options) => {
876
935
  return spawnToWebStreams({ cmd: options.cmd, env: options.env });
877
936
  };
@@ -898,5 +957,6 @@ export {
898
957
  filterNoloDialogSubjectRefEvidence,
899
958
  verifyNoloDialogSubjectRefQuery,
900
959
  buildNoloTableQueryRequest,
901
- buildNoloWorkspaceCliToolExecutors
960
+ buildNoloWorkspaceCliToolExecutors,
961
+ buildLoadSkillExecutor
902
962
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-QTFSBLCF.js";
4
+ } from "./chunk-2BIV3FMX.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-RJKDVL4L.js";
5
+ } from "./chunk-SDJDLO5W.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-KQHGZWSV.js";
@@ -8,7 +8,7 @@ import {
8
8
  buildLocalAgentLookupKeys,
9
9
  normalizeAgentHandle,
10
10
  shouldReadAgentKeyRemotely
11
- } from "./chunk-DGFWICQJ.js";
11
+ } from "./chunk-N54XAP77.js";
12
12
  import {
13
13
  LOCAL_CODEX_AGENT_ID,
14
14
  LOCAL_CODEX_AGENT_KEY,
@@ -17,23 +17,23 @@ import {
17
17
  } from "./chunk-VHBWHNVT.js";
18
18
  import {
19
19
  inferCaptureIntent
20
- } from "./chunk-6XKX2N2E.js";
20
+ } from "./chunk-JRCUAPXX.js";
21
21
  import {
22
22
  CliProviderQuotaError,
23
23
  executeCli
24
- } from "./chunk-X7W4TNB4.js";
24
+ } from "./chunk-CMKUBIGW.js";
25
25
  import {
26
26
  buildCliPrompt
27
27
  } from "./chunk-ATNTHIZI.js";
28
28
  import {
29
29
  prepareTools
30
- } from "./chunk-JRPR5M4O.js";
30
+ } from "./chunk-C77B4AFC.js";
31
31
  import {
32
32
  getAntigravityUserAgent,
33
33
  isAntigravityOAuthAgent,
34
34
  readAntigravityProjectId,
35
35
  resolveAntigravityCloudCodeBaseUrl
36
- } from "./chunk-2MALU52L.js";
36
+ } from "./chunk-C3RUNRHT.js";
37
37
  import {
38
38
  FORCED_TOOLS,
39
39
  addDefaultLightWebToolsForConfiguredAgents,
@@ -43,7 +43,7 @@ import {
43
43
  readXPostFunctionSchema,
44
44
  readXhsProfileFunc,
45
45
  readXhsProfileFunctionSchema
46
- } from "./chunk-I6DI7SGU.js";
46
+ } from "./chunk-YRG2GO6E.js";
47
47
  import {
48
48
  normalizeDialogTitle
49
49
  } from "./chunk-OWOHNGCN.js";
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-4ZDM73SD.js";
53
53
  import {
54
54
  fetchServerSyncedCredential
55
- } from "./chunk-QKRUUZCL.js";
55
+ } from "./chunk-6RSAUKSQ.js";
56
56
  import {
57
57
  isCompiledBinary,
58
58
  parseUserIdFromAuthToken
@@ -73,7 +73,7 @@ import {
73
73
  parseSseDataLineJson,
74
74
  readOpenAiCompatibleSseCompletion,
75
75
  resolveOpenAiCompatibleProviderConfig
76
- } from "./chunk-SACYB45H.js";
76
+ } from "./chunk-O2ZNTTET.js";
77
77
  import {
78
78
  buildPlatformChatCompletionRequest,
79
79
  canUsePlatformChatProvider,
@@ -82,22 +82,23 @@ import {
82
82
  readSseDataValues,
83
83
  resolvePlatformChatProviderConfig,
84
84
  shouldUsePlatformChatProvider
85
- } from "./chunk-DSNONPGW.js";
85
+ } from "./chunk-5KLGBAAR.js";
86
86
  import {
87
87
  resolveAgentRuntimeConfigFromRecord
88
88
  } from "./chunk-TILFE6LV.js";
89
89
  import {
90
90
  parseToolArgumentsJson,
91
91
  summarizeToolArguments
92
- } from "./chunk-MXLQWBVM.js";
92
+ } from "./chunk-4QEWT7KD.js";
93
93
  import {
94
+ buildLoadSkillExecutor,
94
95
  buildNoloWorkspaceCliToolExecutors,
95
96
  buildNoloWorkspaceOpenAiTools,
96
97
  canonicalizeToolNames,
97
98
  filterNoloWorkspaceToolNames,
98
99
  parseNoloWorkspaceToolArguments,
99
100
  resolveRuntimeToolSurfaceForAgent
100
- } from "./chunk-DG7AAAR3.js";
101
+ } from "./chunk-P3PKED2I.js";
101
102
  import {
102
103
  clipCompactText
103
104
  } from "./chunk-5MMAK75Q.js";
@@ -123,9 +124,8 @@ import {
123
124
  asRecordOrEmpty
124
125
  } from "./chunk-KX6YBIHG.js";
125
126
  import {
126
- dialogMessageRange,
127
- require_index_umd
128
- } from "./chunk-SH2CFQOH.js";
127
+ dialogMessageRange
128
+ } from "./chunk-O4BU24WZ.js";
129
129
  import {
130
130
  asTrimmedNonEmptyStringArray
131
131
  } from "./chunk-I42VC5KR.js";
@@ -158,9 +158,6 @@ import {
158
158
  import {
159
159
  isRecord
160
160
  } from "./chunk-KUG52IAP.js";
161
- import {
162
- __toESM
163
- } from "./chunk-4VNS5WPM.js";
164
161
 
165
162
  // packages/cli/client/localRuntimeAdapter.ts
166
163
  import { dirname, extname, join } from "node:path";
@@ -1170,6 +1167,10 @@ function buildLocalToolExecutors(args) {
1170
1167
  env: args.env,
1171
1168
  cliEntrypoint: args.cliEntrypoint
1172
1169
  }),
1170
+ // loadSkill resolves SKILL.md from the agent's workspace root (local-fs,
1171
+ // no `nolo` CLI subcommand), so it is wired here instead of inside
1172
+ // buildCliWorkspaceToolExecutors.
1173
+ loadSkill: buildLoadSkillExecutor({ cwd: args.workspaceRoot }),
1173
1174
  read_x_post: async (call) => {
1174
1175
  const parsedArgs = (() => {
1175
1176
  try {
@@ -6329,6 +6330,24 @@ var CURSOR_CLIENT_VERSION = "cli-2026.01.09-231024f";
6329
6330
  var CURSOR_REQUEST_PATH = "/agent.v1.AgentService/Run";
6330
6331
  var CONNECT_END_STREAM_FLAG = 2;
6331
6332
  var HEARTBEAT_INTERVAL_MS = 5e3;
6333
+ var CURSOR_WIRE_MODEL_ALIASES = {
6334
+ // First-party — Cursor Models pool
6335
+ "cursor-grok-4.5": "cursor-grok-4.5-high",
6336
+ "cursor-grok-4.5-fast": "cursor-grok-4.5-high-fast",
6337
+ "grok-4.5": "cursor-grok-4.5-high",
6338
+ "grok-4.5-fast": "cursor-grok-4.5-high-fast",
6339
+ "cursor-composer-2.5": "composer-2.5-fast",
6340
+ "composer-2.5": "composer-2.5",
6341
+ // Third-party convenience aliases we previously published in the registry
6342
+ "cursor-claude-4.6-sonnet": "claude-4.6-sonnet-medium",
6343
+ "cursor-claude-4.6-opus": "claude-4.6-opus-high",
6344
+ "cursor-gemini-3.1-pro": "gemini-3.1-pro"
6345
+ };
6346
+ function resolveCursorWireModelId(model) {
6347
+ const trimmed = model.trim();
6348
+ if (!trimmed) return trimmed;
6349
+ return CURSOR_WIRE_MODEL_ALIASES[trimmed] ?? trimmed;
6350
+ }
6332
6351
  function createBlobId(data) {
6333
6352
  return new Uint8Array(createHash("sha256").update(data).digest());
6334
6353
  }
@@ -6624,11 +6643,11 @@ function buildCursorRunRequestBytes(args) {
6624
6643
  selfSummaryCount: 0,
6625
6644
  readPaths: []
6626
6645
  });
6627
- const wireModelId = args.model;
6646
+ const wireModelId = resolveCursorWireModelId(args.model);
6628
6647
  const modelDetails = create(ModelDetailsSchema, {
6629
6648
  modelId: wireModelId,
6630
- displayModelId: args.model,
6631
- displayName: args.model
6649
+ displayModelId: wireModelId,
6650
+ displayName: wireModelId
6632
6651
  });
6633
6652
  const requestedModel = create(RequestedModelSchema, {
6634
6653
  modelId: wireModelId,
@@ -7976,7 +7995,7 @@ function createCliHybridRecordStore(deps) {
7976
7995
  }
7977
7996
 
7978
7997
  // packages/cli/client/localRuntimeAdapter.ts
7979
- var import_ulid = __toESM(require_index_umd(), 1);
7998
+ import { ulid } from "ulid";
7980
7999
  var resolveRuntimeAuthToken2 = resolveRuntimeAuthToken;
7981
8000
  var currentMetaFile = fileURLToPath(import.meta.url);
7982
8001
  var isJsBundle = extname(currentMetaFile) === ".js";
@@ -7999,7 +8018,7 @@ async function defaultLocalRuntimeDb() {
7999
8018
  return getDefaultCliLocalRuntimeDb();
8000
8019
  }
8001
8020
  function createFallbackId() {
8002
- return (0, import_ulid.ulid)();
8021
+ return ulid();
8003
8022
  }
8004
8023
  function logLocalRuntimeDiagnostic(event, fields) {
8005
8024
  if (process.env.NOLO_LOCAL_RUNTIME_DEBUG !== "1" && process.env.NOLO_DEBUG !== "1") {
@@ -2,7 +2,7 @@ import {
2
2
  buildLocalAgentLookupKeys,
3
3
  normalizeAgentHandle,
4
4
  shouldReadAgentKeyRemotely
5
- } from "./chunk-DGFWICQJ.js";
5
+ } from "./chunk-N54XAP77.js";
6
6
  import {
7
7
  resolveCliAgentKeyInput
8
8
  } from "./chunk-VHBWHNVT.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-HNMXYYJR.js";
23
23
  import {
24
24
  createAgentKey
25
- } from "./chunk-SH2CFQOH.js";
25
+ } from "./chunk-O4BU24WZ.js";
26
26
 
27
27
  // packages/cli/agentRecordHelpers.ts
28
28
  import { readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-EQHI2AR3.js";
4
+ } from "./chunk-RM7KF6OT.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-I6DI7SGU.js";
7
+ } from "./chunk-YRG2GO6E.js";
8
8
  import {
9
9
  readPipeText,
10
10
  spawnProcess
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-OLZBQWZU.js";
18
18
  import {
19
19
  runLocalAgentTurn
20
- } from "./chunk-MXLQWBVM.js";
20
+ } from "./chunk-4QEWT7KD.js";
21
21
  import {
22
22
  resolveLocalRuntimeEnvFromPolicy
23
23
  } from "./chunk-5CS33IBL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageRange
3
- } from "./chunk-SH2CFQOH.js";
3
+ } from "./chunk-O4BU24WZ.js";
4
4
  import {
5
5
  isTombstoneRecord
6
6
  } from "./chunk-GBRG75BQ.js";
@@ -0,0 +1,298 @@
1
+ import {
2
+ dump,
3
+ load
4
+ } from "./chunk-WZSRQNQG.js";
5
+ import {
6
+ asTrimmedNonEmptyStringArray
7
+ } from "./chunk-I42VC5KR.js";
8
+ import {
9
+ asOptionalTrimmedString
10
+ } from "./chunk-G3SUCT4W.js";
11
+
12
+ // packages/ai/skills/skillDocProtocol.ts
13
+ var SKILL_DOC_ENUMS = {
14
+ triggerMode: ["explicit", "required", "recommended"],
15
+ budgetTier: ["low", "medium", "high"],
16
+ modality: ["text", "image", "video", "audio", "3d"],
17
+ docKind: ["knowledge", "instruction", "skill"]
18
+ };
19
+ var SKILL_CONFIG_BLOCK = "skill-config";
20
+ var EVAL_CONFIG_BLOCK = "eval-config";
21
+ var WORKFLOW_CONFIG_BLOCK = "workflow-config";
22
+ var normalizeStringArray = (value) => {
23
+ if (!Array.isArray(value)) return void 0;
24
+ const items = [...new Set(asTrimmedNonEmptyStringArray(value))];
25
+ return items.length > 0 ? items : void 0;
26
+ };
27
+ var normalizeBoolean = (value) => typeof value === "boolean" ? value : void 0;
28
+ var normalizeSkillEnumValue = (key, value) => typeof value === "string" && SKILL_DOC_ENUMS[key].includes(value) ? value : void 0;
29
+ var normalizeSkillBudgetTier = (value) => normalizeSkillEnumValue("budgetTier", value);
30
+ var normalizeSkillModalities = (value) => {
31
+ const raw = normalizeStringArray(value);
32
+ if (!raw) return void 0;
33
+ const filtered = raw.flatMap((item) => {
34
+ const modality = normalizeSkillEnumValue("modality", item);
35
+ return modality ? [modality] : [];
36
+ });
37
+ return filtered.length > 0 ? Array.from(new Set(filtered)) : void 0;
38
+ };
39
+ var normalizeSkillConfig = (value, fallbackTools) => {
40
+ if (!value || typeof value !== "object") return void 0;
41
+ const record = value;
42
+ const name = asOptionalTrimmedString(record.name) ?? "";
43
+ const description = asOptionalTrimmedString(record.description) ?? "";
44
+ if (!name || !description) return void 0;
45
+ const triggerMode = normalizeSkillEnumValue("triggerMode", record.triggerMode);
46
+ const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
47
+ const modalities = normalizeSkillModalities(record.modalities);
48
+ const toolNames = normalizeStringArray(record.toolNames) ?? normalizeStringArray(fallbackTools) ?? void 0;
49
+ const discover = record.discover && typeof record.discover === "object" ? {
50
+ keywords: normalizeStringArray(
51
+ record.discover.keywords
52
+ ),
53
+ examples: normalizeStringArray(
54
+ record.discover.examples
55
+ )
56
+ } : void 0;
57
+ return {
58
+ version: "0.1",
59
+ kind: "skill",
60
+ id: asOptionalTrimmedString(record.id),
61
+ name,
62
+ description,
63
+ triggerMode,
64
+ toolNames,
65
+ preferredAgents: normalizeStringArray(record.preferredAgents),
66
+ budgetTier,
67
+ dispatchPreferred: normalizeBoolean(record.dispatchPreferred),
68
+ modalities,
69
+ requiredSkills: normalizeStringArray(record.requiredSkills),
70
+ recommendedSkills: normalizeStringArray(record.recommendedSkills),
71
+ promptPatch: asOptionalTrimmedString(record.promptPatch),
72
+ discover: discover?.keywords || discover?.examples ? discover : void 0
73
+ };
74
+ };
75
+ var normalizeEvalConfig = (value) => {
76
+ if (!value || typeof value !== "object") return void 0;
77
+ const record = value;
78
+ if (!Array.isArray(record.cases)) return void 0;
79
+ const cases = [];
80
+ for (const item of record.cases) {
81
+ if (!item || typeof item !== "object") continue;
82
+ const testCase = item;
83
+ const input = asOptionalTrimmedString(testCase.input) ?? "";
84
+ if (!input) continue;
85
+ cases.push({
86
+ input,
87
+ expectedTools: normalizeStringArray(testCase.expectedTools),
88
+ expectedSignals: normalizeStringArray(testCase.expectedSignals),
89
+ forbiddenSignals: normalizeStringArray(testCase.forbiddenSignals)
90
+ });
91
+ }
92
+ return cases.length > 0 ? {
93
+ version: "0.1",
94
+ cases
95
+ } : void 0;
96
+ };
97
+ var normalizeWorkflowConfig = (value) => {
98
+ if (!value || typeof value !== "object") return void 0;
99
+ const record = value;
100
+ const name = asOptionalTrimmedString(record.name) ?? "";
101
+ const description = asOptionalTrimmedString(record.description) ?? "";
102
+ if (!name || !description) return void 0;
103
+ const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
104
+ return {
105
+ version: "0.1",
106
+ kind: "workflow",
107
+ id: asOptionalTrimmedString(record.id),
108
+ name,
109
+ description,
110
+ defaultAgent: asOptionalTrimmedString(record.defaultAgent),
111
+ inputs: normalizeStringArray(record.inputs),
112
+ recommendedTools: normalizeStringArray(record.recommendedTools),
113
+ requiredTools: normalizeStringArray(record.requiredTools),
114
+ requiredOutputs: normalizeStringArray(record.requiredOutputs),
115
+ gates: normalizeStringArray(record.gates),
116
+ budgetTier,
117
+ contextStrategy: asOptionalTrimmedString(record.contextStrategy),
118
+ failureProtocol: asOptionalTrimmedString(record.failureProtocol)
119
+ };
120
+ };
121
+ var normalizePageSkillMetadata = (value, fallbackTools) => {
122
+ if (!value || typeof value !== "object") return void 0;
123
+ const record = value;
124
+ const kind = normalizeSkillEnumValue("docKind", record.kind);
125
+ const meta = {
126
+ kind,
127
+ requiredSkills: normalizeStringArray(record.requiredSkills),
128
+ recommendedSkills: normalizeStringArray(record.recommendedSkills),
129
+ skillConfig: normalizeSkillConfig(record.skillConfig, fallbackTools),
130
+ evalConfig: normalizeEvalConfig(record.evalConfig),
131
+ workflowConfig: normalizeWorkflowConfig(record.workflowConfig)
132
+ };
133
+ if (meta.skillConfig && !meta.kind) {
134
+ meta.kind = "skill";
135
+ }
136
+ if (meta.workflowConfig && !meta.kind) {
137
+ meta.kind = "instruction";
138
+ }
139
+ return meta.kind || meta.requiredSkills || meta.recommendedSkills || meta.skillConfig || meta.evalConfig || meta.workflowConfig ? meta : void 0;
140
+ };
141
+ var extractCommentBlock = (markdown, blockName) => {
142
+ if (!markdown) return void 0;
143
+ const matcher = new RegExp(
144
+ `<!--\\s*${blockName}\\s*\\n([\\s\\S]*?)-->`,
145
+ "i"
146
+ );
147
+ const match = markdown.match(matcher);
148
+ return asOptionalTrimmedString(match?.[1]);
149
+ };
150
+ var removeCommentBlock = (markdown, blockName) => markdown.replace(
151
+ new RegExp(`\\n?<!--\\s*${blockName}\\s*\\n[\\s\\S]*?-->\\s*`, "gi"),
152
+ "\n\n"
153
+ );
154
+ var parseYamlObject = (raw) => {
155
+ if (!raw) return void 0;
156
+ try {
157
+ const parsed = load(raw);
158
+ return parsed && typeof parsed === "object" ? parsed : void 0;
159
+ } catch {
160
+ return void 0;
161
+ }
162
+ };
163
+ var parseSkillDocProtocol = (markdown, existingMeta, fallbackTools) => {
164
+ const source = typeof markdown === "string" ? markdown : "";
165
+ const skillBlock = parseYamlObject(extractCommentBlock(source, SKILL_CONFIG_BLOCK));
166
+ const evalBlock = parseYamlObject(extractCommentBlock(source, EVAL_CONFIG_BLOCK));
167
+ const workflowBlock = parseYamlObject(extractCommentBlock(source, WORKFLOW_CONFIG_BLOCK));
168
+ const cleanedContent = removeCommentBlock(
169
+ removeCommentBlock(
170
+ removeCommentBlock(source, SKILL_CONFIG_BLOCK),
171
+ EVAL_CONFIG_BLOCK
172
+ ),
173
+ WORKFLOW_CONFIG_BLOCK
174
+ ).replace(/\n{3,}/g, "\n\n").trim();
175
+ const parsedMeta = normalizePageSkillMetadata(
176
+ {
177
+ ...existingMeta ?? {},
178
+ ...skillBlock ? {
179
+ kind: existingMeta?.kind === "skill" || skillBlock.kind === "skill" ? "skill" : existingMeta?.kind,
180
+ requiredSkills: skillBlock.requiredSkills ?? existingMeta?.requiredSkills,
181
+ recommendedSkills: skillBlock.recommendedSkills ?? existingMeta?.recommendedSkills,
182
+ skillConfig: skillBlock
183
+ } : {},
184
+ ...evalBlock ? { evalConfig: evalBlock } : {},
185
+ ...workflowBlock ? { workflowConfig: workflowBlock } : {}
186
+ },
187
+ fallbackTools
188
+ );
189
+ return {
190
+ content: cleanedContent,
191
+ meta: parsedMeta
192
+ };
193
+ };
194
+ var resolvePageSkillMetadata = (page) => {
195
+ if (!page) return void 0;
196
+ const existingMeta = normalizePageSkillMetadata(page.meta, page.tools);
197
+ return parseSkillDocProtocol(page.content ?? "", existingMeta, page.tools).meta;
198
+ };
199
+ var yamlBlock = (value) => dump(value, { lineWidth: 120, noRefs: true }).trim();
200
+ var buildSkillConfigComment = (config) => {
201
+ const payload = {
202
+ version: config.version,
203
+ kind: config.kind,
204
+ ...config.id ? { id: config.id } : {},
205
+ name: config.name,
206
+ description: config.description,
207
+ ...config.triggerMode ? { triggerMode: config.triggerMode } : {},
208
+ ...config.requiredSkills?.length ? { requiredSkills: config.requiredSkills } : {},
209
+ ...config.recommendedSkills?.length ? { recommendedSkills: config.recommendedSkills } : {},
210
+ ...config.toolNames?.length ? { toolNames: config.toolNames } : {},
211
+ ...config.preferredAgents?.length ? { preferredAgents: config.preferredAgents } : {},
212
+ ...config.budgetTier ? { budgetTier: config.budgetTier } : {},
213
+ ...typeof config.dispatchPreferred === "boolean" ? { dispatchPreferred: config.dispatchPreferred } : {},
214
+ ...config.modalities?.length ? { modalities: config.modalities } : {},
215
+ ...config.discover?.keywords?.length || config.discover?.examples?.length ? {
216
+ discover: {
217
+ ...config.discover?.keywords?.length ? { keywords: config.discover.keywords } : {},
218
+ ...config.discover?.examples?.length ? { examples: config.discover.examples } : {}
219
+ }
220
+ } : {},
221
+ ...config.promptPatch ? { promptPatch: config.promptPatch } : {}
222
+ };
223
+ return `<!-- ${SKILL_CONFIG_BLOCK}
224
+ ${yamlBlock(payload)}
225
+ -->`;
226
+ };
227
+ var buildEvalConfigComment = (config) => `<!-- ${EVAL_CONFIG_BLOCK}
228
+ ${yamlBlock({
229
+ version: config.version,
230
+ cases: config.cases
231
+ })}
232
+ -->`;
233
+ var buildWorkflowConfigComment = (config) => `<!-- ${WORKFLOW_CONFIG_BLOCK}
234
+ ${yamlBlock({
235
+ version: config.version,
236
+ kind: config.kind,
237
+ ...config.id ? { id: config.id } : {},
238
+ name: config.name,
239
+ description: config.description,
240
+ ...config.defaultAgent ? { defaultAgent: config.defaultAgent } : {},
241
+ ...config.inputs?.length ? { inputs: config.inputs } : {},
242
+ ...config.recommendedTools?.length ? { recommendedTools: config.recommendedTools } : {},
243
+ ...config.requiredTools?.length ? { requiredTools: config.requiredTools } : {},
244
+ ...config.requiredOutputs?.length ? { requiredOutputs: config.requiredOutputs } : {},
245
+ ...config.gates?.length ? { gates: config.gates } : {},
246
+ ...config.budgetTier ? { budgetTier: config.budgetTier } : {},
247
+ ...config.contextStrategy ? { contextStrategy: config.contextStrategy } : {},
248
+ ...config.failureProtocol ? { failureProtocol: config.failureProtocol } : {}
249
+ })}
250
+ -->`;
251
+ var buildSkillDocMarkdown = (options) => {
252
+ const sections = [
253
+ asOptionalTrimmedString(options.body) ?? "",
254
+ buildSkillConfigComment(options.skillConfig),
255
+ options.evalConfig ? buildEvalConfigComment(options.evalConfig) : "",
256
+ options.workflowConfig ? buildWorkflowConfigComment(options.workflowConfig) : ""
257
+ ].filter(Boolean);
258
+ return sections.join("\n\n").trim();
259
+ };
260
+ var extractFrontmatter = (markdown) => {
261
+ const match = markdown.match(/^\s*---\s*\n([\s\S]*?)\n\s*---\s*\n?/);
262
+ if (!match) return { body: markdown.trim() };
263
+ const frontmatter = parseYamlObject(match[1]);
264
+ const body = markdown.slice(match[0].length).trim();
265
+ return { frontmatter, body };
266
+ };
267
+ var normalizeAllowedTools = (value) => {
268
+ if (Array.isArray(value)) {
269
+ return normalizeStringArray(value) ?? [];
270
+ }
271
+ if (typeof value === "string") {
272
+ return value.split(/\s+/).map((item) => item.trim()).filter(Boolean);
273
+ }
274
+ return [];
275
+ };
276
+ var parseExternalSkillMarkdown = (markdown) => {
277
+ const { frontmatter, body } = extractFrontmatter(markdown);
278
+ return {
279
+ name: asOptionalTrimmedString(frontmatter?.name),
280
+ description: asOptionalTrimmedString(frontmatter?.description),
281
+ compatibility: asOptionalTrimmedString(frontmatter?.compatibility),
282
+ allowedTools: normalizeAllowedTools(frontmatter?.["allowed-tools"]),
283
+ metadata: frontmatter?.metadata && typeof frontmatter.metadata === "object" ? Object.fromEntries(
284
+ Object.entries(frontmatter.metadata).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, String(value)])
285
+ ) : void 0,
286
+ body
287
+ };
288
+ };
289
+
290
+ export {
291
+ normalizeStringArray,
292
+ normalizeSkillBudgetTier,
293
+ normalizeSkillModalities,
294
+ parseSkillDocProtocol,
295
+ resolvePageSkillMetadata,
296
+ buildSkillDocMarkdown,
297
+ parseExternalSkillMarkdown
298
+ };
@@ -23,7 +23,7 @@ import {
23
23
  createMemoryOwnerIndexKey,
24
24
  createMemorySubjectKindIndexKey,
25
25
  memoryOwnerRange
26
- } from "./chunk-SH2CFQOH.js";
26
+ } from "./chunk-O4BU24WZ.js";
27
27
  import {
28
28
  asTrimmedNonEmptyStringArray
29
29
  } from "./chunk-I42VC5KR.js";