nolo-cli 0.16.0 → 0.17.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 (132) hide show
  1. package/{_executeModel-AVCA2NAV.js → _executeModel-WPNX5DH4.js} +49 -43
  2. package/{action-F5JACQBG.js → action-LT7BRFLK.js} +10 -9
  3. package/{addContentAction-AQXEYRBE.js → addContentAction-PL3KKBDH.js} +9 -8
  4. package/{addDialogAgentAction-EJHHJZWW.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
  5. package/{agentDeleteCommand-QW5PUMDQ.js → agentDeleteCommand-L3357EFL.js} +31 -28
  6. package/{agentEmailCommands-4ORVLGVQ.js → agentEmailCommands-N65AVLEI.js} +61 -55
  7. package/{agentListCommands-YWBYRTYC.js → agentListCommands-CH27FTI2.js} +30 -27
  8. package/{agentMachineCommands-JSQW4FOA.js → agentMachineCommands-PPK5HJZB.js} +29 -26
  9. package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
  10. package/{agentRecordCommands-AASIWOBT.js → agentRecordCommands-HTVXD4TT.js} +56 -50
  11. package/{agentRunCommand-TB5BHXUH.js → agentRunCommand-MGLVJUA5.js} +62 -53
  12. package/{agentRunControl-6ADXVYMR.js → agentRunControl-P75VPTGS.js} +24 -1
  13. package/{agentRuntimeLocal-QNPNJRVH.js → agentRuntimeLocal-QUTBSY3I.js} +24 -21
  14. package/{agentSlice-RUNXC62Y.js → agentSlice-DOGRCMWK.js} +9 -8
  15. package/appDeleteCommands-FEEVXUBG.js +127 -0
  16. package/appDeployCommands-C4HCGC4B.js +166 -0
  17. package/appDeployStatusCommands-IR5ZUZBQ.js +147 -0
  18. package/appGetCommands-6RJGZ66Z.js +122 -0
  19. package/appListCommands-VMTF5YZF.js +125 -0
  20. package/{authCommand-YFTR3347.js → authCommand-WJZPOLSS.js} +16 -9
  21. package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
  22. package/{chunk-XPC5C7BK.js → chunk-3ND52WIL.js} +2 -2
  23. package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
  24. package/{chunk-M43KDE25.js → chunk-45BY7RLP.js} +2 -8
  25. package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
  26. package/{chunk-6N4KODMN.js → chunk-4T5F7YZQ.js} +1 -1
  27. package/chunk-7BUYEZ6U.js +671 -0
  28. package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
  29. package/{chunk-AVVZUXXC.js → chunk-AAODAAUQ.js} +34 -13
  30. package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
  31. package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
  32. package/{chunk-AUURUT6L.js → chunk-BT6K76S7.js} +238 -424
  33. package/chunk-CEFXYF66.js +107 -0
  34. package/{chunk-RLCXU7A5.js → chunk-D3HVJJIA.js} +1 -1
  35. package/{chunk-JTMNCCWF.js → chunk-DKZFOK24.js} +16 -87
  36. package/chunk-DL6EPNIK.js +50 -0
  37. package/{chunk-4L2OJPCU.js → chunk-EGPCU42M.js} +58 -8
  38. package/{chunk-IWLUTMYX.js → chunk-ELT65PZW.js} +2 -2
  39. package/chunk-FKXFCYVO.js +221 -0
  40. package/{chunk-4FX6NVDW.js → chunk-FPKLD4KB.js} +3 -136
  41. package/{chunk-PCTUYVUM.js → chunk-FVIPEIVX.js} +10 -3
  42. package/chunk-GFUIQ4RY.js +136 -0
  43. package/{chunk-66X4VSRC.js → chunk-HQPG2PIV.js} +41 -1
  44. package/{chunk-IGXREZW2.js → chunk-HV2A3B4W.js} +1 -1
  45. package/{chunk-LPEUV5RE.js → chunk-IOOMJJ4Z.js} +2 -2
  46. package/{setDialogExtraReferencesAction-LR6MSIXO.js → chunk-JLA4FXYC.js} +2 -17
  47. package/{chunk-3OIRVWXA.js → chunk-JP7REMYP.js} +10 -1
  48. package/chunk-KFEVY3ST.js +255 -0
  49. package/{chunk-P3RIAYGG.js → chunk-L2MLZQXU.js} +3 -3
  50. package/{chunk-55NSNCFM.js → chunk-L6NVTGI7.js} +1 -1
  51. package/{chunk-3WGLLTK4.js → chunk-LSFAWXKC.js} +100 -3
  52. package/{chunk-S2LXHNHG.js → chunk-MD3V54DA.js} +6 -6
  53. package/{chunk-6EVITP2G.js → chunk-MUCU6ATG.js} +2 -251
  54. package/{chunk-KFHN5NGJ.js → chunk-MVQ4TBSD.js} +1 -1
  55. package/{chunk-ZQBL7LIC.js → chunk-NEKFSXOP.js} +310 -211
  56. package/{chunk-NSCHQQPU.js → chunk-NVB267BZ.js} +397 -324
  57. package/{chunk-Z5JQNBNY.js → chunk-NYUXSXLY.js} +33 -14
  58. package/{chunk-FRV6A633.js → chunk-PZCBZO4J.js} +2 -2
  59. package/{chunk-GSINCD4P.js → chunk-QCJITMYO.js} +21 -11
  60. package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
  61. package/{chunk-4IJYA27C.js → chunk-RG2U2MTJ.js} +1 -1
  62. package/{chunk-BEBNFWDU.js → chunk-RRGVDPH3.js} +3 -3
  63. package/{chunk-EABWT43X.js → chunk-RVOUXDFU.js} +5 -5
  64. package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
  65. package/{chunk-3663CXZN.js → chunk-SNZV4QCE.js} +65 -22
  66. package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
  67. package/{chunk-MYMMNKYL.js → chunk-TSIYZBTH.js} +156 -6
  68. package/{chunk-EHLHSX7R.js → chunk-UB4RYYNQ.js} +9 -2
  69. package/{chunk-YJKXGHJ6.js → chunk-UGUW3FHG.js} +4 -4
  70. package/{chunk-DPAB4FQ7.js → chunk-UZY4BEBR.js} +1579 -212
  71. package/chunk-V5R4NZP2.js +78 -0
  72. package/{chunk-MR6ISAGB.js → chunk-VDNQF5VI.js} +6 -6
  73. package/{chunk-33BJUVK4.js → chunk-VGMJ6PDJ.js} +5 -5
  74. package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
  75. package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
  76. package/chunk-X4Q4UZEY.js +26 -0
  77. package/{chunk-RPDGJO4D.js → chunk-XHG22OEX.js} +4 -4
  78. package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
  79. package/{chunk-3S2VOMIF.js → chunk-XRZJGPFI.js} +7 -7
  80. package/{chunk-7UKFVQ5W.js → chunk-YLRTBX4Y.js} +105 -36
  81. package/{chunk-DGEYDWEZ.js → chunk-YXTRNO5W.js} +3 -3
  82. package/{chunk-FY233ZFU.js → chunk-ZJZCMKOR.js} +107 -177
  83. package/{chunk-NVEWUJVX.js → chunk-ZVOZH2HW.js} +1 -1
  84. package/chunk-ZZ2MH7LE.js +84 -0
  85. package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
  86. package/codingSkills-36KN5NQT.js +48 -0
  87. package/{createAgentAutomationAction-FNHPSKKO.js → createAgentAutomationAction-PMOLEPGJ.js} +19 -18
  88. package/{createDialogAction-TZCVQ3NU.js → createDialogAction-DPRTYNAK.js} +21 -20
  89. package/{createPageAction-EIGZ3BKT.js → createPageAction-JGZK3WAM.js} +25 -24
  90. package/{dbSlice-7KQH6GOU.js → dbSlice-CGSRFJN3.js} +8 -7
  91. package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
  92. package/{dialogCommands-FO77J5DQ.js → dialogCommands-XED6DKLV.js} +29 -26
  93. package/{dialogSlice-MM5U4KE2.js → dialogSlice-KO4NRNKC.js} +19 -18
  94. package/{docCreateCommands-I3BS3AZI.js → docCreateCommands-P6DYWHH3.js} +32 -27
  95. package/{docDeleteCommands-Q2OPV52P.js → docDeleteCommands-KUWXAMSN.js} +31 -26
  96. package/{docReadCommands-YOOFACYZ.js → docReadCommands-ECW55TKB.js} +30 -25
  97. package/{docStore-NGYQ2JTR.js → docStore-6KMERNUY.js} +20 -19
  98. package/{docUpdateCommands-2B32ITHN.js → docUpdateCommands-5J4BTJQN.js} +31 -26
  99. package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
  100. package/{getPricing-P4XRJRZB.js → getPricing-RYY6OBA4.js} +2 -2
  101. package/{handleSendMessageAction-JRZWWBKP.js → handleSendMessageAction-R3ZHTVU4.js} +20 -19
  102. package/index.js +95 -64
  103. package/{localDialogRead-2VRI24F4.js → localDialogRead-HQZPVIE3.js} +1 -1
  104. package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
  105. package/{machineCommands-WRWF2ICZ.js → machineCommands-JF2YL34J.js} +62 -56
  106. package/{machineWsRunDispatch-ZX7Q3TWZ.js → machineWsRunDispatch-ON4AEOJL.js} +54 -48
  107. package/{models-WQ5N4OJM.js → models-5K5G2CZI.js} +1 -1
  108. package/package.json +1 -1
  109. package/queryRunOverlay-O4LOMMPO.js +161 -0
  110. package/{read-CN3TNXIP.js → read-3FMPZPER.js} +3 -3
  111. package/{readDocTool-WF3675ED.js → readDocTool-VSYHKK3V.js} +1 -1
  112. package/{readlineWorkspace-ZTGRGW46.js → readlineWorkspace-SUCINTL7.js} +354 -185
  113. package/{removeDialogAgentAction-YDHBFEGI.js → removeDialogAgentAction-OAGA2G3U.js} +10 -9
  114. package/{runAgentClientLoop-JZCOP7LG.js → runAgentClientLoop-OBD2AVEL.js} +43 -37
  115. package/runOverlayPresentation-ZO4VCWEU.js +11 -0
  116. package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
  117. package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
  118. package/{setPrimaryDialogAgentAction-IIVDCY5C.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +26 -17
  119. package/{settingSlice-O23YDK2O.js → settingSlice-7MNKHZ6R.js} +9 -8
  120. package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
  121. package/{spaceCommands-VV4GTPQK.js → spaceCommands-32NTNLHS.js} +30 -27
  122. package/{spaceSlice-DRWWZJP7.js → spaceSlice-P7VOXLY6.js} +19 -18
  123. package/{streamAgentChatTurn-Y6WGATQR.js → streamAgentChatTurn-UHEMNI3X.js} +97 -56
  124. package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
  125. package/{tools-PUNBY3AH.js → tools-BMXIXHMB.js} +32 -27
  126. package/{tuiSummaryLlmCaller-F64WLSAF.js → tuiSummaryLlmCaller-VUNVBRX3.js} +5 -4
  127. package/types-ZSTJ7MPR.js +7 -0
  128. package/{updateDialogTitleAction-YSR4TCMB.js → updateDialogTitleAction-LJBDYZLH.js} +22 -21
  129. package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
  130. package/{chunk-XBS2WYJ2.js → chunk-RK5NYQEL.js} +0 -0
  131. package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
  132. package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
@@ -1,22 +1,19 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-PCTUYVUM.js";
4
+ } from "./chunk-FVIPEIVX.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
8
8
  import {
9
- buildSkillDocMarkdown
10
- } from "./chunk-VC6OZXO5.js";
9
+ createSpaceKey
10
+ } from "./chunk-ELT65PZW.js";
11
11
  import {
12
12
  parseUserIdFromAuthToken,
13
13
  readOption,
14
14
  resolveAuthToken,
15
15
  resolveServerUrl
16
16
  } from "./chunk-A7GB5UGH.js";
17
- import {
18
- createSpaceKey
19
- } from "./chunk-IWLUTMYX.js";
20
17
  import {
21
18
  asTrimmedLowercaseString
22
19
  } from "./chunk-QSJ3HFEF.js";
@@ -30,128 +27,6 @@ import {
30
27
  normalizeServerOrigin
31
28
  } from "./chunk-CF7PE763.js";
32
29
 
33
- // packages/cli/docPageHelpers.ts
34
- import { readFileSync } from "node:fs";
35
- import { ulid } from "ulid";
36
- function getCliArg(args, flag) {
37
- const idx = args.indexOf(flag);
38
- return idx !== -1 ? args[idx + 1] : void 0;
39
- }
40
- function readBodyArg(args, fallback = "") {
41
- const bodyFile = getCliArg(args, "--body-file");
42
- if (bodyFile !== void 0) {
43
- return readFileSync(bodyFile, "utf8");
44
- }
45
- return getCliArg(args, "--body") ?? fallback;
46
- }
47
- function textToSlate(text) {
48
- return text.split("\n").map((line) => ({
49
- type: "paragraph",
50
- children: [{ text: line }]
51
- }));
52
- }
53
- function createPageId() {
54
- return ulid();
55
- }
56
- function buildPageKey(userId, pageId) {
57
- return `page-${userId}-${pageId}`;
58
- }
59
- function buildPageRecord(args) {
60
- const { dbKey, pageId, title, spaceId, content, existing, meta, slateData } = args;
61
- const now = Date.now();
62
- const createdAt = typeof existing?.createdAt === "number" ? existing.createdAt : now;
63
- const created = typeof existing?.created === "string" ? existing.created : new Date(createdAt).toISOString();
64
- const nextRecord = {
65
- ...existing ?? {},
66
- id: existing?.id ?? pageId,
67
- dbKey,
68
- type: "page",
69
- title,
70
- spaceId,
71
- content,
72
- updatedAt: now,
73
- createdAt,
74
- created
75
- };
76
- if (meta !== void 0) {
77
- if (meta === null) {
78
- delete nextRecord.meta;
79
- } else {
80
- nextRecord.meta = meta;
81
- }
82
- }
83
- if (slateData !== void 0) {
84
- if (slateData === null) {
85
- delete nextRecord.slateData;
86
- } else {
87
- nextRecord.slateData = slateData;
88
- }
89
- } else if (!existing?.slateData) {
90
- nextRecord.slateData = textToSlate(content);
91
- }
92
- return nextRecord;
93
- }
94
-
95
- // packages/cli/docSkillHelpers.ts
96
- function normalizeSkillSeed(input) {
97
- return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
98
- }
99
- function deterministicId(prefix, seed) {
100
- let h = 2166136261;
101
- for (let i = 0; i < seed.length; i++) {
102
- h ^= seed.charCodeAt(i);
103
- h = h * 16777619 >>> 0;
104
- }
105
- const suffix = h.toString(36).toUpperCase().padStart(14, "0");
106
- return (prefix + suffix).slice(0, 26);
107
- }
108
- function buildSkillDocId(input) {
109
- return deterministicId("01SK", normalizeSkillSeed(input) || input);
110
- }
111
- function buildSkillPageKey(userId, skillId) {
112
- return buildPageKey(userId, skillId);
113
- }
114
- function buildSkillPageRecord(args) {
115
- const {
116
- dbKey,
117
- skillId,
118
- title,
119
- spaceId,
120
- body,
121
- skillConfig,
122
- evalConfig,
123
- workflowConfig,
124
- existing
125
- } = args;
126
- return {
127
- ...buildPageRecord({
128
- dbKey,
129
- pageId: skillId,
130
- title,
131
- spaceId,
132
- content: buildSkillDocMarkdown({
133
- body,
134
- skillConfig,
135
- evalConfig,
136
- workflowConfig
137
- }),
138
- existing,
139
- meta: {
140
- ...existing?.meta ?? {},
141
- kind: "skill",
142
- skillConfig,
143
- ...evalConfig ? { evalConfig } : {},
144
- ...workflowConfig ? { workflowConfig } : {}
145
- },
146
- slateData: null
147
- })
148
- };
149
- }
150
- function parseJsonArg(raw, fallback) {
151
- if (raw === void 0) return fallback;
152
- return JSON.parse(raw);
153
- }
154
-
155
30
  // packages/cli/docSpaceHelpers.ts
156
31
  async function ensurePageAttachedToSpace(params) {
157
32
  const { baseUrl, userId, authToken, spaceId, contentKey, title, skillSummary } = params;
@@ -333,14 +208,6 @@ function buildSkillSummaryForRecord(record) {
333
208
  }
334
209
 
335
210
  export {
336
- readBodyArg,
337
- createPageId,
338
- buildPageKey,
339
- buildPageRecord,
340
- buildSkillDocId,
341
- buildSkillPageKey,
342
- buildSkillPageRecord,
343
- parseJsonArg,
344
211
  removePageFromSpace,
345
212
  hasHelpArg,
346
213
  hasFlag,
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
- normalizeAgentHandle,
4
3
  shouldReadAgentKeyRemotely
5
- } from "./chunk-M43KDE25.js";
4
+ } from "./chunk-45BY7RLP.js";
6
5
  import {
7
6
  resolveCliAgentKeyInput
8
7
  } from "./chunk-VHBWHNVT.js";
@@ -22,10 +21,17 @@ import {
22
21
  } from "./chunk-A7GB5UGH.js";
23
22
  import {
24
23
  createAgentKey
25
- } from "./chunk-O4BU24WZ.js";
24
+ } from "./chunk-6Y7A3OQQ.js";
26
25
 
27
26
  // packages/cli/agentRecordHelpers.ts
28
27
  import { readFileSync } from "node:fs";
28
+
29
+ // packages/core/agentHandle.ts
30
+ function normalizeAgentHandle(value) {
31
+ return typeof value === "string" && value.trim() ? value.trim().toLowerCase().replace(/\s+/g, " ") : void 0;
32
+ }
33
+
34
+ // packages/cli/agentRecordHelpers.ts
29
35
  var PROVIDER_COPY_FIELDS = [
30
36
  "apiSource",
31
37
  "provider",
@@ -612,6 +618,7 @@ async function buildUpdatedAgentRecord(args) {
612
618
  }
613
619
 
614
620
  export {
621
+ normalizeAgentHandle,
615
622
  fetchWithTransportFallback,
616
623
  readAgentRecord,
617
624
  readDbRecord,
@@ -0,0 +1,136 @@
1
+ import {
2
+ buildSkillDocMarkdown
3
+ } from "./chunk-VC6OZXO5.js";
4
+
5
+ // packages/cli/docPageHelpers.ts
6
+ import { readFileSync } from "node:fs";
7
+ import { ulid } from "ulid";
8
+ function getCliArg(args, flag) {
9
+ const idx = args.indexOf(flag);
10
+ return idx !== -1 ? args[idx + 1] : void 0;
11
+ }
12
+ function readBodyArg(args, fallback = "") {
13
+ const bodyFile = getCliArg(args, "--body-file");
14
+ if (bodyFile !== void 0) {
15
+ return readFileSync(bodyFile, "utf8");
16
+ }
17
+ return getCliArg(args, "--body") ?? fallback;
18
+ }
19
+ function textToSlate(text) {
20
+ return text.split("\n").map((line) => ({
21
+ type: "paragraph",
22
+ children: [{ text: line }]
23
+ }));
24
+ }
25
+ function createPageId() {
26
+ return ulid();
27
+ }
28
+ function buildPageKey(userId, pageId) {
29
+ return `page-${userId}-${pageId}`;
30
+ }
31
+ function buildPageRecord(args) {
32
+ const { dbKey, pageId, title, spaceId, content, existing, meta, slateData } = args;
33
+ const now = Date.now();
34
+ const createdAt = typeof existing?.createdAt === "number" ? existing.createdAt : now;
35
+ const created = typeof existing?.created === "string" ? existing.created : new Date(createdAt).toISOString();
36
+ const nextRecord = {
37
+ ...existing ?? {},
38
+ id: existing?.id ?? pageId,
39
+ dbKey,
40
+ type: "page",
41
+ title,
42
+ spaceId,
43
+ content,
44
+ updatedAt: now,
45
+ createdAt,
46
+ created
47
+ };
48
+ if (meta !== void 0) {
49
+ if (meta === null) {
50
+ delete nextRecord.meta;
51
+ } else {
52
+ nextRecord.meta = meta;
53
+ }
54
+ }
55
+ if (slateData !== void 0) {
56
+ if (slateData === null) {
57
+ delete nextRecord.slateData;
58
+ } else {
59
+ nextRecord.slateData = slateData;
60
+ }
61
+ } else if (!existing?.slateData) {
62
+ nextRecord.slateData = textToSlate(content);
63
+ }
64
+ return nextRecord;
65
+ }
66
+
67
+ // packages/cli/docSkillHelpers.ts
68
+ function normalizeSkillSeed(input) {
69
+ return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
70
+ }
71
+ function deterministicId(prefix, seed) {
72
+ let h = 2166136261;
73
+ for (let i = 0; i < seed.length; i++) {
74
+ h ^= seed.charCodeAt(i);
75
+ h = h * 16777619 >>> 0;
76
+ }
77
+ const suffix = h.toString(36).toUpperCase().padStart(14, "0");
78
+ return (prefix + suffix).slice(0, 26);
79
+ }
80
+ function buildSkillDocId(input) {
81
+ return deterministicId("01SK", normalizeSkillSeed(input) || input);
82
+ }
83
+ function buildSkillPageKey(userId, skillId) {
84
+ return buildPageKey(userId, skillId);
85
+ }
86
+ function buildSkillPageRecord(args) {
87
+ const {
88
+ dbKey,
89
+ skillId,
90
+ title,
91
+ spaceId,
92
+ body,
93
+ skillConfig,
94
+ evalConfig,
95
+ workflowConfig,
96
+ existing
97
+ } = args;
98
+ return {
99
+ ...buildPageRecord({
100
+ dbKey,
101
+ pageId: skillId,
102
+ title,
103
+ spaceId,
104
+ content: buildSkillDocMarkdown({
105
+ body,
106
+ skillConfig,
107
+ evalConfig,
108
+ workflowConfig
109
+ }),
110
+ existing,
111
+ meta: {
112
+ ...existing?.meta ?? {},
113
+ kind: "skill",
114
+ skillConfig,
115
+ ...evalConfig ? { evalConfig } : {},
116
+ ...workflowConfig ? { workflowConfig } : {}
117
+ },
118
+ slateData: null
119
+ })
120
+ };
121
+ }
122
+ function parseJsonArg(raw, fallback) {
123
+ if (raw === void 0) return fallback;
124
+ return JSON.parse(raw);
125
+ }
126
+
127
+ export {
128
+ readBodyArg,
129
+ createPageId,
130
+ buildPageKey,
131
+ buildPageRecord,
132
+ buildSkillDocId,
133
+ buildSkillPageKey,
134
+ buildSkillPageRecord,
135
+ parseJsonArg
136
+ };
@@ -78,6 +78,45 @@ var anthropicModels = [
78
78
  }
79
79
  ];
80
80
 
81
+ // packages/integrations/anthropic/anthropicOAuthModels.ts
82
+ var oauthModel = ({ name, displayName, contextWindow, thinkingMode, maxOutputTokens }) => ({
83
+ name,
84
+ displayName,
85
+ hasVision: true,
86
+ description: `OAuth \u8BA2\u9605\u6A21\u578B\uFF08${displayName}\uFF0C${thinkingMode === "adaptive" ? "Adaptive thinking" : "Extended thinking"}\uFF09`,
87
+ contextWindow,
88
+ ...maxOutputTokens ? { maxOutputTokens } : {},
89
+ supportsReasoningEffort: true,
90
+ price: { input: 0, output: 0 }
91
+ });
92
+ var anthropicOAuthModels = [
93
+ // 5 代(1M + Adaptive thinking always-on;官方 max output 128k)
94
+ oauthModel({ name: "claude-fable-5", displayName: "Claude Fable 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
95
+ oauthModel({ name: "claude-opus-5", displayName: "Claude Opus 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
96
+ oauthModel({ name: "claude-sonnet-5", displayName: "Claude Sonnet 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
97
+ // 4.6/4.7/4.8 系(Adaptive thinking;context 官方未单列,参照 fuzzy claude-4.6→1M)
98
+ oauthModel({ name: "claude-opus-4-8", displayName: "Claude Opus 4.8", contextWindow: 1e6, thinkingMode: "adaptive" }),
99
+ oauthModel({ name: "claude-opus-4-7", displayName: "Claude Opus 4.7", contextWindow: 1e6, thinkingMode: "adaptive" }),
100
+ oauthModel({ name: "claude-sonnet-4-6", displayName: "Claude Sonnet 4.6", contextWindow: 1e6, thinkingMode: "adaptive" }),
101
+ oauthModel({ name: "claude-opus-4-6", displayName: "Claude Opus 4.6", contextWindow: 1e6, thinkingMode: "adaptive" }),
102
+ // 4.5 系(Extended thinking;官方发布规格 1M)
103
+ oauthModel({ name: "claude-opus-4-5-20251101", displayName: "Claude Opus 4.5", contextWindow: 1e6, thinkingMode: "extended" }),
104
+ oauthModel({ name: "claude-sonnet-4-5-20250929", displayName: "Claude Sonnet 4.5", contextWindow: 1e6, thinkingMode: "extended" }),
105
+ // haiku-4-5(官方明确 context=200k + Extended thinking)
106
+ oauthModel({ name: "claude-haiku-4-5-20251001", displayName: "Claude Haiku 4.5", contextWindow: 2e5, thinkingMode: "extended" })
107
+ ];
108
+ var OAUTH_MODEL_THINKING_MODE = new Map(
109
+ anthropicOAuthModels.map((m) => [m.name, m.thinkingMode])
110
+ );
111
+ function isAdaptiveThinkingModelId(model) {
112
+ if (!model) return false;
113
+ const tableMode = OAUTH_MODEL_THINKING_MODE.get(model);
114
+ if (tableMode === "adaptive") return true;
115
+ if (tableMode === "extended") return false;
116
+ const n = model.toLowerCase();
117
+ return n.includes("fable-5") || n.includes("opus-5") || n.includes("sonnet-5") || n.includes("opus-4-8") || n.includes("opus-4-7") || n.includes("sonnet-4-6") || n.includes("opus-4-6");
118
+ }
119
+
81
120
  // packages/integrations/qwen/models.ts
82
121
  var qwenModels = [
83
122
  // ── Qwen3 旗舰 ──
@@ -4683,7 +4722,7 @@ var MODEL_MAP = {
4683
4722
  moonshot: moonshotAllModels
4684
4723
  };
4685
4724
  var MODEL_LOOKUP_MAP = {
4686
- anthropic: anthropicModels,
4725
+ anthropic: [...anthropicModels, ...anthropicOAuthModels],
4687
4726
  xai: xaiModels,
4688
4727
  ...MODEL_MAP
4689
4728
  };
@@ -4892,6 +4931,7 @@ function getApiEndpoint(agent) {
4892
4931
  }
4893
4932
 
4894
4933
  export {
4934
+ isAdaptiveThinkingModelId,
4895
4935
  isModelSupportReasoningEffort,
4896
4936
  clampReasoningEffort,
4897
4937
  MODEL_LOOKUP_MAP,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-FY233ZFU.js";
4
+ } from "./chunk-ZJZCMKOR.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isImageUrlPart
3
- } from "./chunk-6EVITP2G.js";
3
+ } from "./chunk-KFEVY3ST.js";
4
4
  import {
5
5
  canonicalizeToolNames
6
- } from "./chunk-JTMNCCWF.js";
6
+ } from "./chunk-ZZ2MH7LE.js";
7
7
  import {
8
8
  asTrimmedLowercaseString
9
9
  } from "./chunk-QSJ3HFEF.js";
@@ -7,23 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-3S2VOMIF.js";
11
- import "./chunk-O4BU24WZ.js";
12
- import "./chunk-I42VC5KR.js";
13
- import "./chunk-WWC7I6TA.js";
14
- import "./chunk-JTINRTBT.js";
15
- import "./chunk-QSJ3HFEF.js";
16
- import "./chunk-XPC5C7BK.js";
17
- import "./chunk-DVRHHFEA.js";
18
- import "./chunk-OOSFSFMA.js";
19
- import "./chunk-GBRG75BQ.js";
20
- import "./chunk-3EUW3WEO.js";
21
- import "./chunk-U6VC4MU4.js";
22
- import "./chunk-KUG52IAP.js";
23
- import "./chunk-LCBAMY2M.js";
24
- import "./chunk-4SN6J65J.js";
25
- import "./chunk-CF7PE763.js";
26
- import "./chunk-G3SUCT4W.js";
10
+ } from "./chunk-XRZJGPFI.js";
27
11
  import {
28
12
  __toESM
29
13
  } from "./chunk-4VNS5WPM.js";
@@ -54,6 +38,7 @@ var setDialogExtraReferencesAction = async (extraReferences, thunkApi) => {
54
38
  })
55
39
  ).unwrap();
56
40
  };
41
+
57
42
  export {
58
43
  setDialogExtraReferencesAction
59
44
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelAbility
3
- } from "./chunk-XBS2WYJ2.js";
3
+ } from "./chunk-RK5NYQEL.js";
4
4
 
5
5
  // packages/ai/agent/safeAgentSummary.ts
6
6
  function parseTimestamp(val) {
@@ -107,8 +107,17 @@ function toSafeAgentSummary(record, options) {
107
107
  const isOwnedByRecord = Boolean(currentUserId) && (typeof record?.userId === "string" && record.userId === currentUserId || typeof record?.ownerId === "string" && record.ownerId === currentUserId);
108
108
  const isOwnedByDbKey = Boolean(currentUserId) && typeof record?.dbKey === "string" && record.dbKey.startsWith(`agent-${currentUserId}-`);
109
109
  const isOwned = isOwnedByRecord || isOwnedByDbKey;
110
+ let agentKey;
111
+ if (Boolean(currentUserId) && id) {
112
+ if (isOwned) {
113
+ agentKey = `agent-${currentUserId}-${id}`;
114
+ } else if (publicKey) {
115
+ agentKey = publicKey;
116
+ }
117
+ }
110
118
  return {
111
119
  id,
120
+ ...agentKey !== void 0 ? { agentKey } : {},
112
121
  ...publicKey !== void 0 ? { publicKey } : {},
113
122
  name,
114
123
  handle,