nolo-cli 0.29.1 → 0.30.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 (138) hide show
  1. package/{_executeModel-TN7FW73L.js → _executeModel-VBHHG7LT.js} +62 -68
  2. package/{action-6BM26ZYM.js → action-FENWPT3C.js} +14 -15
  3. package/{addContentAction-HLTFX56O.js → addContentAction-Z5S5ZQ7I.js} +12 -12
  4. package/{addDialogAgentAction-Q2TYWDO6.js → addDialogAgentAction-VUNVD2XR.js} +11 -11
  5. package/{agentDeleteCommand-VP4VLCMG.js → agentDeleteCommand-LLGZXUYJ.js} +60 -39
  6. package/{agentEmailCommands-N32KWVCX.js → agentEmailCommands-LC2FPN6G.js} +76 -81
  7. package/{agentGrantCommands-JNDE4RWR.js → agentGrantCommands-E7ZZFRHK.js} +2 -1
  8. package/{agentListCommands-MXITEBUS.js → agentListCommands-A6OBQ3QX.js} +57 -40
  9. package/{agentMachineCommands-47Y2XEZZ.js → agentMachineCommands-4O4Q5B5X.js} +53 -35
  10. package/{agentPullCommand-ZZGU5KOY.js → agentPullCommand-4V36XNGV.js} +4 -3
  11. package/{agentRecordCommands-AK6ZRJLD.js → agentRecordCommands-W22RIQRV.js} +73 -78
  12. package/{agentRunCommand-24SNVDNC.js → agentRunCommand-V4OBU4FB.js} +77 -82
  13. package/{agentRunControl-SNUKXN6J.js → agentRunControl-AKBN2366.js} +13 -1
  14. package/{agentRuntimeLocal-VI3NHLDU.js → agentRuntimeLocal-I57YSGH4.js} +52 -34
  15. package/{agentSlice-D666DABC.js → agentSlice-3ZHY7RAO.js} +12 -13
  16. package/{appDeleteCommands-SF2V6QYZ.js → appDeleteCommands-DJJF466K.js} +53 -35
  17. package/{appDeployCommands-3EPVR545.js → appDeployCommands-WJZGIOEZ.js} +53 -35
  18. package/{appDeployStatusCommands-O65Y747J.js → appDeployStatusCommands-ICYXUJNO.js} +53 -35
  19. package/{appGetCommands-AHDOF4SS.js → appGetCommands-UOCWYJPV.js} +53 -35
  20. package/{appListCommands-Y7YCXODU.js → appListCommands-EOKWTXPW.js} +53 -35
  21. package/{authCommand-XMQHBK5L.js → authCommand-H5KE7K7K.js} +16 -16
  22. package/{authCommands-JSOG2H4E.js → authCommands-CXJ6PI2O.js} +7 -7
  23. package/{chunk-SNMJPH7J.js → chunk-2XM5KUNE.js} +4 -2
  24. package/{chunk-7H3UTGPM.js → chunk-3AUWC6EM.js} +82 -3
  25. package/{chunk-FVY6KI5A.js → chunk-3RIWR23B.js} +1 -1
  26. package/{chunk-ENUJPSZN.js → chunk-446VANPP.js} +18 -14
  27. package/{chunk-PB7G5MAM.js → chunk-44HACRCK.js} +4 -4
  28. package/{chunk-RZNYL4LW.js → chunk-4SAV7BD7.js} +65 -1
  29. package/{chunk-I5TJCJQP.js → chunk-56IUA7RU.js} +3 -3
  30. package/{chunk-STOUEEBU.js → chunk-66O5MZYH.js} +1 -1
  31. package/{chunk-PSK2RUHV.js → chunk-7CD24PU4.js} +360 -2
  32. package/{chunk-JYSXE6LE.js → chunk-A4JDTA5T.js} +13 -13
  33. package/{chunk-DZ3XJVET.js → chunk-AOS5IN2I.js} +1 -1
  34. package/{chunk-SKDNBYZK.js → chunk-BOL2D2JW.js} +1 -1
  35. package/{chunk-YTA2QOEE.js → chunk-CAENRKNJ.js} +15 -0
  36. package/{chunk-2TYLTEAH.js → chunk-CV6I4HBA.js} +1 -1
  37. package/chunk-DCDL3GC4.js +171 -0
  38. package/{chunk-WNENLKKI.js → chunk-DCWBP2O7.js} +42 -393
  39. package/{chunk-Y52E3TIS.js → chunk-DI6MXJK5.js} +37 -37
  40. package/{chunk-Z3LLUGD5.js → chunk-DKRT67FG.js} +11 -11
  41. package/{chunk-NWT2WUCY.js → chunk-DWQNDGO7.js} +20 -8
  42. package/{chunk-BPZSJH5X.js → chunk-FS5TTXPS.js} +6 -6
  43. package/chunk-G5JHHUAK.js +73 -0
  44. package/{chunk-GFVFYNL7.js → chunk-G6VITLCZ.js} +3 -3
  45. package/{chunk-MUI34IA2.js → chunk-GAGUBI42.js} +302 -14
  46. package/{chunk-YBHJZVWO.js → chunk-GVKTKT3O.js} +15 -8
  47. package/{chunk-GVYU3EVI.js → chunk-HI7QZNWX.js} +17 -10
  48. package/{chunk-MHHYH3JA.js → chunk-HLG6GAUD.js} +1 -1
  49. package/{chunk-MQRZ5QUH.js → chunk-IXZX5CJK.js} +1 -1
  50. package/{chunk-INWBJPQC.js → chunk-IZ3CBMD5.js} +3 -3
  51. package/{chunk-VHBWHNVT.js → chunk-K6QEHQZ3.js} +8 -4
  52. package/chunk-KW47OSRJ.js +3246 -0
  53. package/{chunk-F7S2SH5C.js → chunk-KWKD3BCC.js} +189 -122
  54. package/{chunk-L65QKSVJ.js → chunk-L3GCUVOH.js} +1 -1
  55. package/{chunk-XISENOC2.js → chunk-L3VQOVKK.js} +8 -8
  56. package/{chunk-HALKDXKP.js → chunk-MEUZFIAJ.js} +8 -4
  57. package/{chunk-XMAMUPXU.js → chunk-MMCVBEAD.js} +174 -149
  58. package/{chunk-XOIF2TNF.js → chunk-OB6FBSH3.js} +13 -0
  59. package/chunk-OYK7PA5U.js +1707 -0
  60. package/{chunk-WPRSBZYN.js → chunk-Q24P6TUS.js} +1 -1
  61. package/{chunk-7CP4UOUV.js → chunk-QLV2GKU5.js} +16 -178
  62. package/{chunk-2AX4ZWSG.js → chunk-SWOTB2TX.js} +135 -1166
  63. package/{chunk-BOPFLKHA.js → chunk-SWYMCHM7.js} +1 -69
  64. package/{chunk-YRMUYZ5H.js → chunk-SZ5CBYMZ.js} +4 -4
  65. package/chunk-T27IEBNQ.js +149 -0
  66. package/{chunk-WX3ZOSTL.js → chunk-T3Y5EMJS.js} +24 -26
  67. package/{chunk-RD6AOXQI.js → chunk-THTAR67C.js} +1056 -137
  68. package/{chunk-2FX23RGA.js → chunk-TJYWZ3LO.js} +4 -4
  69. package/{chunk-SLOGKB7M.js → chunk-TOW4E763.js} +9 -1
  70. package/{chunk-33K2M3AU.js → chunk-UKC5HU2C.js} +33 -40
  71. package/{chunk-STRCGEC6.js → chunk-UTQZ73QQ.js} +13 -9
  72. package/{chunk-GT3GG2H7.js → chunk-VSTUQGLT.js} +1 -1
  73. package/{chunk-4MCHUZUI.js → chunk-W2YKDXT7.js} +95 -95
  74. package/{chunk-L3QFIBZG.js → chunk-WTGCTVJG.js} +1 -1
  75. package/{chunk-XS7UPVR7.js → chunk-XD5NQEOH.js} +5 -5
  76. package/{chunk-WSQLK2KR.js → chunk-XFGM5PJP.js} +6 -6
  77. package/{chunk-DBUNOYLF.js → chunk-YLADSPDU.js} +3 -3
  78. package/{chunk-FRN5QOKN.js → chunk-YWGSCF37.js} +19 -4
  79. package/{codingSkills-EN6Z6G6U.js → codingSkills-V35TRR4Y.js} +1 -2
  80. package/{createAgentAutomationAction-VK3N263U.js → createAgentAutomationAction-3GMH6ORX.js} +30 -37
  81. package/{createDialogAction-KWZ74S2G.js → createDialogAction-R5MCL4RE.js} +32 -38
  82. package/{createPageAction-3CIZL5ZL.js → createPageAction-QYTG656R.js} +43 -50
  83. package/{db-W5UHK4P3.js → db-IPCJ43PW.js} +10 -6
  84. package/{dbSlice-GOKRGQ47.js → dbSlice-OBV7VFCF.js} +11 -11
  85. package/{deleteFile-WDZ3VM7B.js → deleteFile-AC45HYSM.js} +5 -5
  86. package/{dialogCommands-N4XKI6ZU.js → dialogCommands-NUQGIXVZ.js} +53 -37
  87. package/{dialogSlice-TKYB6VLO.js → dialogSlice-CFDECXEU.js} +27 -34
  88. package/{docCreateCommands-DTDKANXX.js → docCreateCommands-UNFCXB5N.js} +52 -36
  89. package/{docDeleteCommands-U4NB6OHK.js → docDeleteCommands-NG5IVKE5.js} +54 -38
  90. package/{docReadCommands-SDVQM3BH.js → docReadCommands-6J7MUUX6.js} +52 -36
  91. package/{docStore-E5QAM75M.js → docStore-MZZWJM4F.js} +28 -35
  92. package/{docUpdateCommands-O2O644FV.js → docUpdateCommands-6AW3VZOX.js} +55 -39
  93. package/{fetchMessages-W4IKHPCS.js → fetchMessages-VPPQDDZ4.js} +3 -3
  94. package/{getPricing-X6I23RN6.js → getPricing-XQYSSVV6.js} +6 -7
  95. package/{handleSendMessageAction-7OVC2SVU.js → handleSendMessageAction-IU2QNTLM.js} +30 -37
  96. package/index.js +72 -72
  97. package/localDialogRead-P72W2U2R.js +38 -0
  98. package/{machineCommands-6GNFKAVC.js → machineCommands-Z2QEWTHZ.js} +76 -81
  99. package/{machineWsRunDispatch-2DCHVG3U.js → machineWsRunDispatch-SJTYHZHN.js} +71 -76
  100. package/{models-YT32CTT5.js → models-WDUTTYFS.js} +2 -2
  101. package/{offlineMarxistsAgentCommand-5OOWZLJI.js → offlineMarxistsAgentCommand-E6LUG63A.js} +6 -2
  102. package/package.json +1 -1
  103. package/{read-A23NKT3O.js → read-QK7ZRX6G.js} +6 -6
  104. package/{readDocTool-JAM5BI5Q.js → readDocTool-EYDMVRBL.js} +2 -1
  105. package/{readlineWorkspace-KELDMUNZ.js → readlineWorkspace-EY3BPXIU.js} +151 -163
  106. package/{removeDialogAgentAction-K4HOWFHO.js → removeDialogAgentAction-TBW3UZJW.js} +15 -16
  107. package/{runAgentClientLoop-R3S7YN6Z.js → runAgentClientLoop-N3YDLTMS.js} +61 -66
  108. package/{setDialogExtraReferencesAction-JD7J7JM4.js → setDialogExtraReferencesAction-Q3ANF2NR.js} +12 -12
  109. package/{setPrimaryDialogAgentAction-YWSA5XEU.js → setPrimaryDialogAgentAction-FQ5R3EFJ.js} +15 -16
  110. package/{settingSlice-22GTX6CA.js → settingSlice-JKKV2T7O.js} +13 -14
  111. package/{skillDiscovery-ITA7BI7A.js → skillDiscovery-I3QRA7NE.js} +2 -2
  112. package/{spaceCommands-WM6W3WMQ.js → spaceCommands-R6AEQNLG.js} +57 -40
  113. package/{spaceSlice-RC2APBOD.js → spaceSlice-MCH7RLLP.js} +27 -34
  114. package/{streamAgentChatTurn-Q655CCVP.js → streamAgentChatTurn-Q4U2CVMI.js} +130 -1300
  115. package/{switchDialogAgentAction-6JKFBJVR.js → switchDialogAgentAction-QQGVE4SL.js} +11 -11
  116. package/{toolApiClient-ISM4ZQX4.js → toolApiClient-ARGFDJAG.js} +3 -3
  117. package/{tools-A6MUIA3Q.js → tools-Y3UBLLYW.js} +50 -56
  118. package/{tuiSummaryLlmCaller-GCUPULOV.js → tuiSummaryLlmCaller-4474IBTI.js} +12 -12
  119. package/{updateDialogTitleAction-DQYY564Y.js → updateDialogTitleAction-3J7GH67I.js} +35 -43
  120. package/chunk-3LJ4RSSF.js +0 -231
  121. package/chunk-5CS33IBL.js +0 -301
  122. package/chunk-5MMAK75Q.js +0 -15
  123. package/chunk-MRC4Q34M.js +0 -188
  124. package/chunk-P6TB7JIA.js +0 -1791
  125. package/chunk-PFTK5SEB.js +0 -620
  126. package/chunk-PMSG3OGF.js +0 -669
  127. package/chunk-SIZQB7BD.js +0 -91
  128. package/chunk-VIDPVFP3.js +0 -20
  129. package/chunk-Y5GCAMGP.js +0 -9
  130. package/chunk-YYLHWIW6.js +0 -48
  131. package/chunk-ZZ2MH7LE.js +0 -84
  132. package/localDialogRead-JXTAHW2E.js +0 -26
  133. package/{chunk-ZVZMT3EA.js → chunk-KWCLUYGQ.js} +3 -3
  134. package/{chunk-NRY4GCKJ.js → chunk-WHLVPK32.js} +3 -3
  135. package/{chunk-RQSOAMPJ.js → chunk-Z5MXSEOJ.js} +2 -2
  136. package/{chunk-XMLRJUU5.js → chunk-ZFTCLBEX.js} +9 -9
  137. package/{runtimeDoctorCommands-HSU632DY.js → runtimeDoctorCommands-E2OUORHK.js} +3 -3
  138. package/{tableCommands-QSZILI7I.js → tableCommands-PRJNWN6Q.js} +6 -6
package/chunk-5CS33IBL.js DELETED
@@ -1,301 +0,0 @@
1
- import {
2
- getCredentialsDir
3
- } from "./chunk-JZPBVBIY.js";
4
- import {
5
- asNonEmptyStringArray
6
- } from "./chunk-I42VC5KR.js";
7
- import {
8
- asTrimmedString
9
- } from "./chunk-3EUW3WEO.js";
10
- import {
11
- asOptionalPositiveFiniteNumber
12
- } from "./chunk-U6VC4MU4.js";
13
- import {
14
- isRecord
15
- } from "./chunk-KUG52IAP.js";
16
-
17
- // packages/agent-runtime/fileCredentialBroker.ts
18
- import {
19
- chmodSync,
20
- existsSync,
21
- mkdirSync,
22
- readFileSync,
23
- unlinkSync,
24
- writeFileSync
25
- } from "node:fs";
26
- import { homedir } from "node:os";
27
- import { join } from "node:path";
28
-
29
- // packages/agent-runtime/credentialBroker.ts
30
- function assertCredentialRef(ref) {
31
- const trimmed = asTrimmedString(ref);
32
- if (!trimmed) {
33
- throw new Error("invalid_ref");
34
- }
35
- if (trimmed.includes("..") || trimmed.includes("/") || trimmed.includes("\\")) {
36
- throw new Error("invalid_ref");
37
- }
38
- return trimmed;
39
- }
40
-
41
- // packages/agent-runtime/fileCredentialBroker.ts
42
- function getApiKeyCredentialsDir(homeDir = homedir()) {
43
- return join(getCredentialsDir(homeDir), "keys");
44
- }
45
- function credentialRefToFileName(ref) {
46
- const safe = assertCredentialRef(ref).replace(/[^a-zA-Z0-9._-]+/g, "_");
47
- if (!safe || safe === "." || safe === "..") {
48
- throw new Error(`Credential ref is not filesystem-safe: ${ref}`);
49
- }
50
- return `${safe}.json`;
51
- }
52
- function getApiKeyCredentialPath(ref, homeDir = homedir()) {
53
- return join(getApiKeyCredentialsDir(homeDir), credentialRefToFileName(ref));
54
- }
55
- function ensurePrivateDir(dir) {
56
- mkdirSync(dir, { recursive: true, mode: 448 });
57
- try {
58
- chmodSync(dir, 448);
59
- } catch {
60
- }
61
- }
62
- function writePrivateFile(path, body) {
63
- writeFileSync(path, body, { encoding: "utf8", mode: 384 });
64
- try {
65
- chmodSync(path, 384);
66
- } catch {
67
- }
68
- }
69
- function readApiKeyCredential(ref, homeDir = homedir()) {
70
- const path = getApiKeyCredentialPath(ref, homeDir);
71
- if (!existsSync(path)) return null;
72
- try {
73
- const raw = readFileSync(path, "utf8");
74
- const parsed = JSON.parse(raw);
75
- if (typeof parsed?.secret !== "string" || !parsed.secret) return null;
76
- return parsed.secret;
77
- } catch {
78
- return null;
79
- }
80
- }
81
- function writeApiKeyCredential(ref, secret, homeDir = homedir(), now = Date.now()) {
82
- const trimmedSecret = secret.trim();
83
- if (!trimmedSecret) {
84
- throw new Error("Cannot store an empty credential secret.");
85
- }
86
- assertCredentialRef(ref);
87
- const dir = getApiKeyCredentialsDir(homeDir);
88
- ensurePrivateDir(dir);
89
- const path = getApiKeyCredentialPath(ref, homeDir);
90
- const payload = {
91
- secret: trimmedSecret,
92
- updatedAt: now
93
- };
94
- writePrivateFile(path, `${JSON.stringify(payload, null, 2)}
95
- `);
96
- }
97
- function removeApiKeyCredential(ref, homeDir = homedir()) {
98
- assertCredentialRef(ref);
99
- const path = getApiKeyCredentialPath(ref, homeDir);
100
- if (!existsSync(path)) return;
101
- unlinkSync(path);
102
- }
103
- function hasApiKeyCredential(ref, homeDir = homedir()) {
104
- return readApiKeyCredential(ref, homeDir) !== null;
105
- }
106
- function createFileCredentialBroker(options = {}) {
107
- const homeDir = options.homeDir ?? homedir();
108
- const now = options.now ?? Date.now;
109
- return {
110
- get(ref) {
111
- return readApiKeyCredential(ref, homeDir);
112
- },
113
- put(ref, secret) {
114
- writeApiKeyCredential(ref, secret, homeDir, now());
115
- },
116
- delete(ref) {
117
- removeApiKeyCredential(ref, homeDir);
118
- },
119
- has(ref) {
120
- return hasApiKeyCredential(ref, homeDir);
121
- }
122
- };
123
- }
124
-
125
- // packages/agent-runtime/migrateAgentSecrets.ts
126
- function buildAgentApiKeyCredentialRef(agentKey) {
127
- const key = asTrimmedString(agentKey);
128
- if (!key) throw new Error("agentKey is required to build a credential ref.");
129
- return `api-key:${key}`;
130
- }
131
- function readRawApiKey(agent) {
132
- return asTrimmedString(agent.apiKey);
133
- }
134
- function resolveTargetRef(agent) {
135
- const fromCredential = asTrimmedString(agent.credentialRef);
136
- if (fromCredential) return fromCredential;
137
- const fromApiKeyRef = asTrimmedString(agent.apiKeyRef);
138
- if (fromApiKeyRef.startsWith("api-key:")) return fromApiKeyRef;
139
- return buildAgentApiKeyCredentialRef(agent.key);
140
- }
141
- async function brokerHas(broker, ref) {
142
- return Boolean(await broker.has(ref));
143
- }
144
- async function brokerPut(broker, ref, secret) {
145
- await broker.put(ref, secret);
146
- }
147
- async function migrateAgentSecrets(args) {
148
- const { agent, broker } = args;
149
- const raw = readRawApiKey(agent);
150
- const migration = asTrimmedString(agent.credentialMigration);
151
- if (migration === "done" && !raw) {
152
- const ref = typeof agent.credentialRef === "string" && agent.credentialRef.trim() || (typeof agent.apiKeyRef === "string" && agent.apiKeyRef.startsWith("api-key:") ? agent.apiKeyRef.trim() : "") || void 0;
153
- return {
154
- updates: {},
155
- status: "already-done",
156
- ...ref ? { credentialRef: ref } : {},
157
- phase: "complete"
158
- };
159
- }
160
- if (!raw && migration !== "pending") {
161
- return { updates: {}, status: "noop", phase: "none" };
162
- }
163
- const targetRef = resolveTargetRef(agent);
164
- if (raw) {
165
- await brokerPut(broker, targetRef, raw);
166
- const stored2 = await brokerHas(broker, targetRef);
167
- if (!stored2) {
168
- return {
169
- updates: {
170
- credentialRef: targetRef,
171
- credentialMigration: "pending"
172
- },
173
- status: "resumed-pending",
174
- credentialRef: targetRef,
175
- phase: "put"
176
- };
177
- }
178
- return {
179
- updates: {
180
- apiKey: null,
181
- credentialRef: targetRef,
182
- // Keep apiKeyRef for resolution if not already an OAuth provider name.
183
- // Prefer explicit credentialRef; set apiKeyRef only when empty so OAuth agents stay intact.
184
- ...!(typeof agent.apiKeyRef === "string" && agent.apiKeyRef.trim()) ? { apiKeyRef: targetRef } : {},
185
- credentialMigration: "done"
186
- },
187
- status: migration === "pending" ? "resumed-pending" : "migrated",
188
- credentialRef: targetRef,
189
- phase: "strip"
190
- };
191
- }
192
- const stored = await brokerHas(broker, targetRef);
193
- if (stored) {
194
- return {
195
- updates: {
196
- credentialRef: targetRef,
197
- credentialMigration: "done",
198
- ...!(typeof agent.apiKeyRef === "string" && agent.apiKeyRef.trim()) ? { apiKeyRef: targetRef } : {}
199
- },
200
- status: "resumed-pending",
201
- credentialRef: targetRef,
202
- phase: "complete"
203
- };
204
- }
205
- return {
206
- updates: {
207
- credentialRef: targetRef,
208
- credentialMigration: "pending"
209
- },
210
- status: "awaiting-secret",
211
- credentialRef: targetRef,
212
- phase: "put"
213
- };
214
- }
215
- function applyAgentSecretMigrationUpdates(record, updates) {
216
- const next = { ...record };
217
- if ("apiKey" in updates) {
218
- if (updates.apiKey === null || updates.apiKey === "") {
219
- delete next.apiKey;
220
- } else if (typeof updates.apiKey === "string") {
221
- next.apiKey = updates.apiKey;
222
- }
223
- }
224
- if (updates.apiKeyRef !== void 0) next.apiKeyRef = updates.apiKeyRef;
225
- if (updates.credentialRef !== void 0) next.credentialRef = updates.credentialRef;
226
- if (updates.credentialMigration !== void 0) {
227
- next.credentialMigration = updates.credentialMigration;
228
- }
229
- return next;
230
- }
231
-
232
- // packages/agent-runtime/runtimeToolPolicy.ts
233
- function unique(values) {
234
- return [...new Set(values)];
235
- }
236
- function normalizeAgentRuntimeToolPolicy(value) {
237
- if (!isRecord(value)) return void 0;
238
- return {
239
- version: 1,
240
- ...asNonEmptyStringArray(value.agentTools).length ? { agentTools: unique(asNonEmptyStringArray(value.agentTools)) } : {},
241
- ...asNonEmptyStringArray(value.runtimeTools).length ? { runtimeTools: unique(asNonEmptyStringArray(value.runtimeTools)) } : {},
242
- ...isRecord(value.workspace) ? { workspace: { ...value.workspace } } : {},
243
- ...isRecord(value.shell) ? { shell: { ...value.shell } } : {},
244
- ...isRecord(value.isolation) ? { isolation: { ...value.isolation } } : {},
245
- ...isRecord(value.git) ? { git: { ...value.git } } : {},
246
- ...isRecord(value.budget) ? { budget: { ...value.budget } } : {},
247
- ...isRecord(value.audit) ? { audit: { ...value.audit } } : {}
248
- };
249
- }
250
- function runtimeBindingRecord(runtimeBinding) {
251
- return isRecord(runtimeBinding) ? runtimeBinding : void 0;
252
- }
253
- function runtimeToolNamesFromPolicy(policy) {
254
- return asNonEmptyStringArray(policy?.runtimeTools);
255
- }
256
- function readPositiveNumber(value) {
257
- return asOptionalPositiveFiniteNumber(Number(value));
258
- }
259
- function resolveRequestedRuntimeToolNames(args) {
260
- const runtimeBinding = runtimeBindingRecord(args.agentConfig.runtimeBinding);
261
- const bindingPolicy = normalizeAgentRuntimeToolPolicy(
262
- runtimeBinding?.runtimeToolPolicy
263
- );
264
- const bindingSnapshotPolicy = normalizeAgentRuntimeToolPolicy(
265
- runtimeBinding?.runtimeToolPolicySnapshot
266
- );
267
- return unique([
268
- ...asNonEmptyStringArray(args.agentConfig.toolNames),
269
- ...runtimeToolNamesFromPolicy(
270
- normalizeAgentRuntimeToolPolicy(args.agentConfig.runtimeToolPolicy)
271
- ),
272
- ...runtimeToolNamesFromPolicy(bindingPolicy),
273
- ...runtimeToolNamesFromPolicy(bindingSnapshotPolicy)
274
- ]);
275
- }
276
- function resolveCurrentRunRuntimeToolPolicy(agentConfig) {
277
- const runtimeBinding = runtimeBindingRecord(agentConfig?.runtimeBinding);
278
- return normalizeAgentRuntimeToolPolicy(
279
- runtimeBinding?.runtimeToolPolicySnapshot ?? agentConfig?.runtimeToolPolicy ?? runtimeBinding?.runtimeToolPolicy
280
- );
281
- }
282
- function resolveLocalRuntimeEnvFromPolicy(runtimeEnv, policy) {
283
- return { ...runtimeEnv };
284
- }
285
- function resolveLocalWorkspaceExecutorOptionsFromPolicy(policy) {
286
- const maxOutputBytes = readPositiveNumber(policy?.shell?.maxOutputBytes);
287
- return {
288
- ...maxOutputBytes ? { commandOutputLimit: Math.floor(maxOutputBytes) } : {}
289
- };
290
- }
291
-
292
- export {
293
- createFileCredentialBroker,
294
- migrateAgentSecrets,
295
- applyAgentSecretMigrationUpdates,
296
- normalizeAgentRuntimeToolPolicy,
297
- resolveRequestedRuntimeToolNames,
298
- resolveCurrentRunRuntimeToolPolicy,
299
- resolveLocalRuntimeEnvFromPolicy,
300
- resolveLocalWorkspaceExecutorOptionsFromPolicy
301
- };
package/chunk-5MMAK75Q.js DELETED
@@ -1,15 +0,0 @@
1
- import {
2
- compactWhitespace
3
- } from "./chunk-DWLEOOGR.js";
4
-
5
- // packages/core/clipCompactText.ts
6
- function clipCompactText(value, max, ellipsis = "...") {
7
- const compact = compactWhitespace(value);
8
- if (compact.length <= max) return compact;
9
- if (max <= ellipsis.length) return compact.slice(0, max);
10
- return `${compact.slice(0, max - ellipsis.length)}${ellipsis}`;
11
- }
12
-
13
- export {
14
- clipCompactText
15
- };
package/chunk-MRC4Q34M.js DELETED
@@ -1,188 +0,0 @@
1
- import {
2
- API_VERSION
3
- } from "./chunk-LCBAMY2M.js";
4
-
5
- // packages/auth/routes.ts
6
- var authRoutes = {
7
- login: {
8
- path: `${API_VERSION}/users/login`,
9
- method: "POST",
10
- createPath: () => `${API_VERSION}/users/login`
11
- },
12
- signup: {
13
- path: `${API_VERSION}/users/signup`,
14
- method: "POST",
15
- createPath: () => `${API_VERSION}/users/signup`
16
- },
17
- users: {
18
- cliLoginStart: {
19
- path: `${API_VERSION}/users/cli-login/start`,
20
- method: "POST",
21
- createPath: () => `${API_VERSION}/users/cli-login/start`
22
- },
23
- cliLoginAuthorize: {
24
- path: `${API_VERSION}/users/cli-login/authorize`,
25
- method: "POST",
26
- createPath: () => `${API_VERSION}/users/cli-login/authorize`
27
- },
28
- cliLoginPoll: {
29
- path: `${API_VERSION}/users/cli-login/poll`,
30
- method: "POST",
31
- createPath: () => `${API_VERSION}/users/cli-login/poll`
32
- },
33
- list: {
34
- path: `${API_VERSION}/users`,
35
- method: "GET",
36
- createPath: () => `${API_VERSION}/users`
37
- },
38
- usageReport: {
39
- path: `${API_VERSION}/users/usage-report`,
40
- method: "GET",
41
- createPath: () => `${API_VERSION}/users/usage-report`
42
- },
43
- growthReport: {
44
- path: `${API_VERSION}/users/growth-report`,
45
- method: "GET",
46
- createPath: () => `${API_VERSION}/users/growth-report`
47
- },
48
- providerBillingHealth: {
49
- path: `${API_VERSION}/users/provider-billing-health`,
50
- method: "GET",
51
- createPath: () => `${API_VERSION}/users/provider-billing-health`
52
- },
53
- providerBillingDrilldown: {
54
- path: `${API_VERSION}/users/provider-billing-drilldown`,
55
- method: "GET",
56
- createPath: () => `${API_VERSION}/users/provider-billing-drilldown`
57
- },
58
- providerCredentials: {
59
- path: `${API_VERSION}/users/provider-credentials`,
60
- method: "GET",
61
- createPath: () => `${API_VERSION}/users/provider-credentials`
62
- },
63
- providerCredentialLifecycle: {
64
- path: `${API_VERSION}/users/provider-credentials/lifecycle`,
65
- method: "POST",
66
- createPath: () => `${API_VERSION}/users/provider-credentials/lifecycle`
67
- },
68
- billingAnomalyLifecycle: {
69
- path: `${API_VERSION}/users/billing-anomalies/lifecycle`,
70
- method: "POST",
71
- createPath: () => `${API_VERSION}/users/billing-anomalies/lifecycle`
72
- },
73
- billingAnomalyDrilldown: {
74
- path: `${API_VERSION}/users/billing-anomalies/drilldown`,
75
- method: "GET",
76
- createPath: () => `${API_VERSION}/users/billing-anomalies/drilldown`
77
- },
78
- billingAnomalyAudit: {
79
- path: `${API_VERSION}/users/billing-anomalies/audit`,
80
- method: "POST",
81
- createPath: () => `${API_VERSION}/users/billing-anomalies/audit`
82
- },
83
- detail: {
84
- path: `${API_VERSION}/users/:userId`,
85
- method: "GET",
86
- createPath: (params) => `${API_VERSION}/users/${params.userId}`
87
- },
88
- sessionRevoke: {
89
- path: `${API_VERSION}/users/session-revoke`,
90
- method: "POST",
91
- createPath: () => `${API_VERSION}/users/session-revoke`
92
- },
93
- transfer: {
94
- path: `${API_VERSION}/users/:userId/transfer`,
95
- method: "POST",
96
- createPath: (params) => `${API_VERSION}/users/${params.userId}/transfer`
97
- },
98
- delete: {
99
- path: `${API_VERSION}/users/:userId`,
100
- method: "DELETE",
101
- createPath: (params) => `${API_VERSION}/users/${params.userId}`
102
- },
103
- disable: {
104
- path: `${API_VERSION}/users/:userId/disable`,
105
- method: "POST",
106
- createPath: (params) => `${API_VERSION}/users/${params.userId}/disable`
107
- },
108
- enable: {
109
- path: `${API_VERSION}/users/:userId/enable`,
110
- method: "POST",
111
- createPath: (params) => `${API_VERSION}/users/${params.userId}/enable`
112
- },
113
- adminPermissions: {
114
- path: `${API_VERSION}/users/:userId/admin-permissions`,
115
- method: "POST",
116
- createPath: (params) => `${API_VERSION}/users/${params.userId}/admin-permissions`
117
- },
118
- sendEmail: {
119
- path: `${API_VERSION}/users/send-email`,
120
- method: "POST",
121
- createPath: () => `${API_VERSION}/users/send-email`
122
- },
123
- spaceInvite: {
124
- path: `${API_VERSION}/users/space-invite`,
125
- method: "POST",
126
- createPath: () => `${API_VERSION}/users/space-invite`
127
- },
128
- spaceInviteStatus: {
129
- path: `${API_VERSION}/users/space-invite/status`,
130
- method: "GET",
131
- createPath: () => `${API_VERSION}/users/space-invite/status`
132
- },
133
- spaceInviteAccept: {
134
- path: `${API_VERSION}/users/space-invite/accept`,
135
- method: "POST",
136
- createPath: () => `${API_VERSION}/users/space-invite/accept`
137
- },
138
- emailPreferencesGet: {
139
- path: `${API_VERSION}/users/email-preferences`,
140
- method: "GET",
141
- createPath: () => `${API_VERSION}/users/email-preferences`
142
- },
143
- emailPreferencesUpdate: {
144
- path: `${API_VERSION}/users/email-preferences`,
145
- method: "POST",
146
- createPath: () => `${API_VERSION}/users/email-preferences`
147
- },
148
- emailReport: {
149
- path: `${API_VERSION}/users/email-report`,
150
- method: "GET",
151
- createPath: () => `${API_VERSION}/users/email-report`
152
- },
153
- emailRetryRun: {
154
- path: `${API_VERSION}/users/email-retry/run`,
155
- method: "POST",
156
- createPath: () => `${API_VERSION}/users/email-retry/run`
157
- },
158
- emailReplayFailures: {
159
- path: `${API_VERSION}/users/email-replay-failures`,
160
- method: "POST",
161
- createPath: () => `${API_VERSION}/users/email-replay-failures`
162
- },
163
- emailConfigGet: {
164
- path: `${API_VERSION}/users/email-config`,
165
- method: "GET",
166
- createPath: () => `${API_VERSION}/users/email-config`
167
- },
168
- emailConfigUpdate: {
169
- path: `${API_VERSION}/users/email-config`,
170
- method: "POST",
171
- createPath: () => `${API_VERSION}/users/email-config`
172
- },
173
- emailUnsubscribe: {
174
- path: `${API_VERSION}/users/email-unsubscribe`,
175
- method: "GET",
176
- createPath: () => `${API_VERSION}/users/email-unsubscribe`
177
- },
178
- rechargeHistory: {
179
- path: `${API_VERSION}/users/:userId/recharge-history`,
180
- method: "POST",
181
- createPath: (params) => `${API_VERSION}/users/${params.userId}/recharge-history`
182
- }
183
- }
184
- };
185
-
186
- export {
187
- authRoutes
188
- };