nolo-cli 0.38.0-alpha.3 → 0.47.0-alpha.2
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.
- package/{_executeModel-SWONBJ7Z.js → _executeModel-5PG6CUWD.js} +41 -42
- package/{action-KMBZ3LCZ.js → action-FLLC2SIX.js} +7 -7
- package/{addContentAction-KQ44UT2U.js → addContentAction-SVSPUUK4.js} +6 -6
- package/{addDialogAgentAction-ILSDCMYL.js → addDialogAgentAction-W3JGU4F7.js} +5 -5
- package/{agentDeleteCommand-SMUJYI6N.js → agentDeleteCommand-SHSPQZHI.js} +25 -26
- package/{agentEmailCommands-YWCGZ4RO.js → agentEmailCommands-LQKO5GRW.js} +54 -55
- package/{agentListCommands-ULFV2XJQ.js → agentListCommands-5QTNEYMQ.js} +31 -29
- package/{agentMachineCommands-7YZ2TIYZ.js → agentMachineCommands-P5K454CN.js} +24 -25
- package/{agentPullCommand-TSWAJPS2.js → agentPullCommand-M552CYSI.js} +2 -2
- package/{agentRecordCommands-EVOSSHJR.js → agentRecordCommands-Z4QYCNP4.js} +50 -51
- package/{agentRunCommand-PO55WUIY.js → agentRunCommand-HV3Y34B5.js} +52 -53
- package/{agentRunControl-7MUPSYDQ.js → agentRunControl-LHXOP4IU.js} +43 -1
- package/{agentRuntimeLocal-Q6D3G6G7.js → agentRuntimeLocal-ZKXYFLXI.js} +20 -21
- package/{agentSlice-6TRUUOSX.js → agentSlice-NKFLP3RI.js} +6 -6
- package/{agentSuperviseCommands-MKWW3ICX.js → agentSuperviseCommands-IMRZ56RC.js} +2 -2
- package/{appDeleteCommands-JDBSRLTX.js → appDeleteCommands-XYGAZIJX.js} +24 -25
- package/{appDeployCommands-Q5H2NBKQ.js → appDeployCommands-7T5CABRB.js} +24 -25
- package/{appDeployStatusCommands-PSYBUIZT.js → appDeployStatusCommands-KTFQMRPZ.js} +24 -25
- package/{appGetCommands-IX64IUW6.js → appGetCommands-HOX2ULSV.js} +24 -25
- package/{appListCommands-BJZFX65H.js → appListCommands-3SLCEHND.js} +24 -25
- package/{authCommand-B2XRHNJH.js → authCommand-OY2E2VQK.js} +12 -12
- package/{authCommands-GWABTFMR.js → authCommands-SBQVTD6V.js} +5 -5
- package/{chatQueueReduxAdapter-N7Z5MUPU.js → chatQueueReduxAdapter-WMMBQK3Y.js} +20 -20
- package/chunk-25J3BB35.js +6041 -0
- package/{chunk-U6QQLXWI.js → chunk-2X5S4IBZ.js} +1 -1
- package/{chunk-MJWX4JQO.js → chunk-3EEK7T3D.js} +1 -1
- package/{chunk-UNHKVD2N.js → chunk-43CXXVJD.js} +1 -1
- package/{chunk-WRP5TTM6.js → chunk-4MXGXSYN.js} +83 -3
- package/{chunk-7N7XKGEQ.js → chunk-4ZNDBDWG.js} +6 -6
- package/{chunk-XVVNNJAA.js → chunk-5BPZLBFB.js} +20 -51
- package/{chunk-MWGCZ4CS.js → chunk-5PPFYHU2.js} +3 -3
- package/{chunk-W445DPVT.js → chunk-5QRCPERU.js} +1 -1
- package/{chunk-GKHV4UH5.js → chunk-5UOBIU5G.js} +31 -3
- package/{chunk-BMB563Y6.js → chunk-6BYAXNH5.js} +3 -3
- package/{chunk-SMPAUSX5.js → chunk-6FGXGFAH.js} +2 -2
- package/{chunk-46VPXYIV.js → chunk-6LYUN76O.js} +5 -5
- package/{chunk-FTM4KUOZ.js → chunk-7XTC3KRG.js} +1 -1
- package/{chunk-IMHO5LC6.js → chunk-7XZ5GXSN.js} +1 -1
- package/{chunk-E2OQ5N2F.js → chunk-AEXP2UZT.js} +341 -16
- package/{chunk-MZZZYUZS.js → chunk-AV2CELZZ.js} +37 -12
- package/{chunk-JI2TIPLP.js → chunk-AYXSUBVC.js} +1 -1
- package/{chunk-J6WH4PYZ.js → chunk-CIF4X6ZM.js} +1 -1
- package/{chunk-GZRMWK5R.js → chunk-DQLYEGP7.js} +2 -2
- package/{chunk-GUYMR3JL.js → chunk-E2QH2AYX.js} +69 -3
- package/{chunk-B6H5XCT2.js → chunk-EMEUU5IY.js} +3 -3
- package/{chunk-X6EN3KJX.js → chunk-ENYDQKOB.js} +319 -71
- package/{chunk-RCFIB45Q.js → chunk-EVBFYPDC.js} +2 -2
- package/{chunk-PV734VZX.js → chunk-EXLOROHG.js} +1 -1
- package/{chunk-WRN7L5CS.js → chunk-FA4SY4F5.js} +1 -1
- package/{chunk-4WVNHL3V.js → chunk-FAWK6DBF.js} +157 -51
- package/{chunk-IFS5CUEH.js → chunk-FJHLA6SX.js} +1 -1
- package/{chunk-T2BZICLK.js → chunk-G46DB6KG.js} +49 -6
- package/{chunk-FGLKRJDI.js → chunk-GK74OOFT.js} +2 -2
- package/{chunk-LM6IYQ3F.js → chunk-GLKOYSRU.js} +8 -1
- package/{chunk-JIADXJYU.js → chunk-H2G6JXTR.js} +1 -1
- package/{chunk-IKGHZMK2.js → chunk-H2JQB6B6.js} +12 -12
- package/{chunk-MGIHZ5CJ.js → chunk-HAPCUPEO.js} +2 -2
- package/{chunk-LD6Y6RJY.js → chunk-HGDOIDQ4.js} +2 -2
- package/{chunk-NZLQ7B5P.js → chunk-HOM6NILS.js} +3 -3
- package/{chunk-IZNJDUJ4.js → chunk-I4JISVWK.js} +1 -1
- package/{chunk-N4XRDM26.js → chunk-IA3A5373.js} +2 -2
- package/{chunk-Y5MMUI3L.js → chunk-IWUPQUWA.js} +2 -2
- package/{chunk-L7SMDIL6.js → chunk-JEGPB5H2.js} +3 -3
- package/{chunk-GEPHJJW4.js → chunk-L7NG2M6H.js} +1 -1
- package/{chunk-XQES6LXQ.js → chunk-LFLWZX76.js} +2 -2
- package/{chunk-IIOHYLIG.js → chunk-LGUQHYAL.js} +1 -1
- package/{chunk-4AWH4LQA.js → chunk-LYGNQHUW.js} +3 -1
- package/{db-3H3JECGY.js → chunk-M5PVFLD4.js} +11 -158
- package/{chunk-WN5AJG5I.js → chunk-MKZRKDQM.js} +1 -1
- package/{chunk-VOXNBPLB.js → chunk-MUIJYGYW.js} +649 -41
- package/{chunk-CYAC5WXX.js → chunk-MWT2BBCH.js} +213 -45
- package/{chunk-V5GA74HI.js → chunk-MZXZJVVD.js} +20 -39
- package/{chunk-ZBB3MZR3.js → chunk-OLNC7AWK.js} +7 -4
- package/{chunk-J5NMOM35.js → chunk-OYNDYVSE.js} +1 -1
- package/{chunk-C6ELZQ7H.js → chunk-OZVGA4SY.js} +1 -1
- package/{chunk-K4KIFRIN.js → chunk-Q24S4NDF.js} +1 -1
- package/{chunk-NRROOY22.js → chunk-Q6DMA2OM.js} +271 -130
- package/{chunk-2WKUUY2E.js → chunk-SVEUG45B.js} +5 -3
- package/{chunk-IZCHPD7T.js → chunk-TNPCQNGQ.js} +11 -6
- package/{chunk-4DMPISV6.js → chunk-URBGEE42.js} +2 -2
- package/{chunk-2KO5QQFV.js → chunk-V2IPBG5U.js} +1 -1
- package/{chunk-B6YYACBT.js → chunk-WPFNAEIW.js} +1 -1
- package/{chunk-23KKIMD5.js → chunk-WVGEBWA6.js} +4 -4
- package/{chunk-KU6CDTZ5.js → chunk-XMI3APSU.js} +61 -49
- package/{chunk-64KIQZA2.js → chunk-XO3G35OV.js} +1 -1
- package/{chunk-UWGWUOVN.js → chunk-YNOGNUBC.js} +108 -47
- package/{chunk-XT73C4VH.js → chunk-Z5NW3O7V.js} +1 -1
- package/{codingSkills-H6N5EKSX.js → codingSkills-BYQI6EPT.js} +2 -2
- package/{createAgentAutomationAction-U57ZMPMS.js → createAgentAutomationAction-ENDNA3Q4.js} +21 -21
- package/{createDialogAction-MAJLBNK4.js → createDialogAction-2KNX6S2D.js} +23 -23
- package/{createPageAction-4EX7HU6G.js → createPageAction-SNBCYPK6.js} +21 -21
- package/db-VQSAOWAO.js +162 -0
- package/{dbSlice-PIQGICNM.js → dbSlice-XWUM4QOF.js} +5 -5
- package/deleteFile-NPZ64DFN.js +1 -1
- package/{dialogCommands-4MHZXEIS.js → dialogCommands-6E5P35DG.js} +28 -26
- package/{dialogSlice-AL3UJLOJ.js → dialogSlice-RTPOD6EW.js} +20 -20
- package/{docCreateCommands-GDYFEK67.js → docCreateCommands-JWY25UFB.js} +23 -24
- package/{docDeleteCommands-WIE5CXED.js → docDeleteCommands-BPJOCSX4.js} +24 -25
- package/{docReadCommands-LTOOPJVC.js → docReadCommands-BSEZCYTQ.js} +23 -24
- package/{docStore-35B5VAFF.js → docStore-TYHVLU7G.js} +22 -22
- package/{docUpdateCommands-TZGAGXSG.js → docUpdateCommands-S2IE2VV4.js} +23 -24
- package/{fetchMessages-CUEFN4GQ.js → fetchMessages-KZQVBXKY.js} +3 -3
- package/{getPricing-P3E2WRIH.js → getPricing-X3HXP6VQ.js} +3 -3
- package/{handleSendMessageAction-PXX2R5JS.js → handleSendMessageAction-QYXDQXGH.js} +21 -21
- package/index.js +69 -69
- package/levelLazyShim-GZBKODGI.js +7 -0
- package/{localDialogRead-P7CHFMIC.js → localDialogRead-NQ33HBSI.js} +2 -2
- package/{localRuntimeAuthority-S77B5QVB.js → localRuntimeAuthority-KQDAE64E.js} +4 -4
- package/{localRuntimeDb-N3H3HQ7G.js → localRuntimeDb-PF7CFKDL.js} +2 -2
- package/{machineCommands-VCPPY23X.js → machineCommands-QCE4KLGR.js} +48 -49
- package/{machineWsRunDispatch-A4C727GL.js → machineWsRunDispatch-FBRMGU5D.js} +48 -49
- package/{models-L7S2EKPM.js → models-7LWATQFH.js} +2 -2
- package/package.json +1 -1
- package/{read-6C2XD3YZ.js → read-DQQ75VI3.js} +2 -2
- package/{readDocTool-Y7AB365O.js → readDocTool-HCQQFAZD.js} +1 -1
- package/{readlineWorkspace-BIBIM6DG.js → readlineWorkspace-2TACWKMN.js} +164 -78
- package/{removeDialogAgentAction-KG5WMJRZ.js → removeDialogAgentAction-DNONRKST.js} +7 -7
- package/{runAgentClientLoop-RKDXMIZW.js → runAgentClientLoop-GBLDVBT5.js} +39 -39
- package/{runtimeDoctorCommands-HT4O2PXL.js → runtimeDoctorCommands-JKTTN723.js} +4 -4
- package/serverStoreFactory-YMXDF4NI.js +20 -0
- package/{setDialogExtraReferencesAction-O2NLXMSM.js → setDialogExtraReferencesAction-ERHUPT3F.js} +6 -6
- package/{setPrimaryDialogAgentAction-FYYUY7PB.js → setPrimaryDialogAgentAction-6C2HYNEC.js} +7 -7
- package/{settingSlice-GPLI6E3M.js → settingSlice-YVRJFKQX.js} +6 -6
- package/{spaceCommands-4FMO3SNP.js → spaceCommands-XOLPJMRK.js} +23 -24
- package/{spaceSlice-2W4GJ2OE.js → spaceSlice-OQPAGQDP.js} +21 -21
- package/{streamAgentChatTurn-FS52LDQP.js → streamAgentChatTurn-SN5XJJ7U.js} +91 -49
- package/{switchDialogAgentAction-GH5P6Q3Z.js → switchDialogAgentAction-HP57XYFP.js} +5 -5
- package/{tools-3J5CKEE7.js → tools-Y65Y3CI4.js} +32 -32
- package/{tuiSummaryLlmCaller-SHRB4RWM.js → tuiSummaryLlmCaller-NBTWT57U.js} +25 -14
- package/{updateDialogTitleAction-5MGPA3OO.js → updateDialogTitleAction-OAOP7CCE.js} +24 -23
- package/chunk-4APLX2RT.js +0 -1514
- package/chunk-P66M7LSQ.js +0 -58
- package/{chunk-6WD3OOJS.js → chunk-UV6VISQJ.js} +0 -0
- package/{tableCommands-PQUJ55AS.js → tableCommands-P2TXJ3CF.js} +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
refreshAntigravityOAuthToken,
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
xaiRefresh
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I4JISVWK.js";
|
|
8
8
|
import {
|
|
9
9
|
clearCredentialAvailability,
|
|
10
10
|
markCredentialUnavailable,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-NI2BS6UD.js";
|
|
16
16
|
import {
|
|
17
17
|
buildLocalAgentLookupKeys
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OYNDYVSE.js";
|
|
19
19
|
import {
|
|
20
20
|
LOCAL_CODEX_AGENT_ID,
|
|
21
21
|
LOCAL_CODEX_AGENT_KEY,
|
|
@@ -28,28 +28,32 @@ import {
|
|
|
28
28
|
} from "./chunk-JDSUTNYY.js";
|
|
29
29
|
import {
|
|
30
30
|
ackRunRecord,
|
|
31
|
+
appendRunQueue,
|
|
31
32
|
checkStaleRun,
|
|
32
33
|
claimRunRecord,
|
|
33
34
|
commitRunRecordClaim,
|
|
34
35
|
finalizeRunRecord,
|
|
35
36
|
findRunRecord,
|
|
36
37
|
gcRunRecords,
|
|
38
|
+
popAllQueueEntries,
|
|
37
39
|
queryRunRecords,
|
|
38
40
|
releaseRunRecordAck,
|
|
39
41
|
resolveRunReportPath,
|
|
42
|
+
serializeQueueEntries,
|
|
40
43
|
spawnLocalBackgroundRun,
|
|
41
|
-
terminateRunProcess
|
|
42
|
-
|
|
44
|
+
terminateRunProcess,
|
|
45
|
+
withQueueLock
|
|
46
|
+
} from "./chunk-AEXP2UZT.js";
|
|
43
47
|
import {
|
|
44
48
|
inferCaptureIntent
|
|
45
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-AYXSUBVC.js";
|
|
46
50
|
import {
|
|
47
51
|
buildCliPrompt
|
|
48
52
|
} from "./chunk-ATNTHIZI.js";
|
|
49
53
|
import {
|
|
50
54
|
inlineImageUrlsForCustomProvider,
|
|
51
55
|
prepareTools
|
|
52
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-IWUPQUWA.js";
|
|
53
57
|
import {
|
|
54
58
|
getServerProviderSecret
|
|
55
59
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -58,7 +62,7 @@ import {
|
|
|
58
62
|
isAntigravityOAuthAgent,
|
|
59
63
|
readAntigravityProjectId,
|
|
60
64
|
resolveAntigravityCloudCodeBaseUrl
|
|
61
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-EXLOROHG.js";
|
|
62
66
|
import {
|
|
63
67
|
deleteMemoryFunctionSchema,
|
|
64
68
|
readXPostFunc,
|
|
@@ -68,7 +72,7 @@ import {
|
|
|
68
72
|
rememberMemoryFunctionSchema,
|
|
69
73
|
resolveAgentRequiredPackIds,
|
|
70
74
|
setTodoListFunc
|
|
71
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YNOGNUBC.js";
|
|
72
76
|
import {
|
|
73
77
|
createDrainExhaustedResponse,
|
|
74
78
|
isCoreDrainingBody,
|
|
@@ -93,19 +97,19 @@ import {
|
|
|
93
97
|
prepareTokenUsageData,
|
|
94
98
|
resolveBuiltinPlatformAgentConfig,
|
|
95
99
|
runKeyed
|
|
96
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FAWK6DBF.js";
|
|
97
101
|
import {
|
|
98
102
|
BUILTIN_TITLE_LLM_CONFIG
|
|
99
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-EVBFYPDC.js";
|
|
100
104
|
import {
|
|
101
105
|
fetchServerSyncedCredential
|
|
102
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-6LYUN76O.js";
|
|
103
107
|
import {
|
|
104
108
|
require_date_fns
|
|
105
109
|
} from "./chunk-M76ECQRD.js";
|
|
106
110
|
import {
|
|
107
111
|
getDefaultCliLocalRuntimeDb
|
|
108
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-IA3A5373.js";
|
|
109
113
|
import {
|
|
110
114
|
FORCED_TOOLS,
|
|
111
115
|
addDefaultLightWebToolsForConfiguredAgents,
|
|
@@ -115,7 +119,7 @@ import {
|
|
|
115
119
|
applySystemBuiltinSkillFilter,
|
|
116
120
|
expandEnabledPacks,
|
|
117
121
|
resolveEffectiveEnabledPacks
|
|
118
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-LGUQHYAL.js";
|
|
119
123
|
import {
|
|
120
124
|
aggregateResponsesStream,
|
|
121
125
|
buildLoadSkillExecutor,
|
|
@@ -138,7 +142,7 @@ import {
|
|
|
138
142
|
parseSyncServersEnv,
|
|
139
143
|
resolveOpenAiCompatibleProviderConfig,
|
|
140
144
|
summarizeToolArguments
|
|
141
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-MUIJYGYW.js";
|
|
142
146
|
import {
|
|
143
147
|
buildPlatformChatCompletionRequest,
|
|
144
148
|
canUsePlatformChatProvider,
|
|
@@ -150,23 +154,23 @@ import {
|
|
|
150
154
|
resolvePlatformChatProviderConfig,
|
|
151
155
|
shouldUsePlatformChatProvider,
|
|
152
156
|
streamSseDataValues
|
|
153
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-AV2CELZZ.js";
|
|
154
158
|
import {
|
|
155
159
|
resolveAgentRuntimeConfigFromRecord,
|
|
156
160
|
resolveHistoricalToolContentCap
|
|
157
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-XO3G35OV.js";
|
|
158
162
|
import {
|
|
159
163
|
convertMessagesToResponsesInput,
|
|
160
164
|
toResponsesTools
|
|
161
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-6BYAXNH5.js";
|
|
162
166
|
import {
|
|
163
167
|
resolvePlatformAuthToken
|
|
164
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-5UOBIU5G.js";
|
|
165
169
|
import {
|
|
166
170
|
buildNoloWorkspaceOpenAiTools,
|
|
167
171
|
parseNoloWorkspaceToolArguments,
|
|
168
172
|
resolveRuntimeToolSurfaceForAgent
|
|
169
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-TNPCQNGQ.js";
|
|
170
174
|
import {
|
|
171
175
|
mergeAvailabilityDeadline,
|
|
172
176
|
resolveAvailabilityAction,
|
|
@@ -178,13 +182,7 @@ import {
|
|
|
178
182
|
} from "./chunk-2MBTWINN.js";
|
|
179
183
|
import {
|
|
180
184
|
clipCompactText
|
|
181
|
-
} from "./chunk-
|
|
182
|
-
import {
|
|
183
|
-
isAdaptiveThinkingModelId
|
|
184
|
-
} from "./chunk-C6ELZQ7H.js";
|
|
185
|
-
import {
|
|
186
|
-
compactWhitespace
|
|
187
|
-
} from "./chunk-DWLEOOGR.js";
|
|
185
|
+
} from "./chunk-GK74OOFT.js";
|
|
188
186
|
import {
|
|
189
187
|
createFileCredentialBroker,
|
|
190
188
|
resolveCurrentRunRuntimeToolPolicy,
|
|
@@ -197,6 +195,12 @@ import {
|
|
|
197
195
|
readOAuthCredential,
|
|
198
196
|
resolveFreshAccessToken
|
|
199
197
|
} from "./chunk-FD36SCCD.js";
|
|
198
|
+
import {
|
|
199
|
+
isAdaptiveThinkingModelId
|
|
200
|
+
} from "./chunk-OZVGA4SY.js";
|
|
201
|
+
import {
|
|
202
|
+
compactWhitespace
|
|
203
|
+
} from "./chunk-DWLEOOGR.js";
|
|
200
204
|
import {
|
|
201
205
|
toErrorMessage
|
|
202
206
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -215,7 +219,7 @@ import {
|
|
|
215
219
|
createTokenStatsKey,
|
|
216
220
|
createUserKey,
|
|
217
221
|
dialogMessageRange
|
|
218
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-SVEUG45B.js";
|
|
219
223
|
import {
|
|
220
224
|
asTrimmedNonEmptyStringArray
|
|
221
225
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -224,7 +228,7 @@ import {
|
|
|
224
228
|
} from "./chunk-QSJ3HFEF.js";
|
|
225
229
|
import {
|
|
226
230
|
isSystemBuiltinTrustedAgentKey
|
|
227
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-Z5NW3O7V.js";
|
|
228
232
|
import {
|
|
229
233
|
isRecord
|
|
230
234
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -10537,7 +10541,7 @@ function deriveAgentRunTodoStatus(input) {
|
|
|
10537
10541
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10538
10542
|
import { homedir as nodeHomedir } from "node:os";
|
|
10539
10543
|
import { dirname, join } from "node:path";
|
|
10540
|
-
var
|
|
10544
|
+
var nodeFs2 = {
|
|
10541
10545
|
mkdirSync,
|
|
10542
10546
|
writeFileSync,
|
|
10543
10547
|
readFileSync,
|
|
@@ -10568,7 +10572,7 @@ function writeJson(path, data, fs) {
|
|
|
10568
10572
|
function createFileSystemTodoStore(opts = {}) {
|
|
10569
10573
|
const env = opts.env ?? process.env;
|
|
10570
10574
|
const homedir = opts.homedir ?? nodeHomedir;
|
|
10571
|
-
const fs = opts.fs ??
|
|
10575
|
+
const fs = opts.fs ?? nodeFs2;
|
|
10572
10576
|
const noloHome = resolveNoloHome(env, homedir);
|
|
10573
10577
|
const filePath = opts.filePath ?? join(noloHome, "agent_run_todos.json");
|
|
10574
10578
|
const oldFilePath = join(noloHome, "todos.json");
|
|
@@ -10825,6 +10829,60 @@ ${JSON.stringify(args.input)}`;
|
|
|
10825
10829
|
};
|
|
10826
10830
|
};
|
|
10827
10831
|
}
|
|
10832
|
+
async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
10833
|
+
if (!reconciled.dialogId) {
|
|
10834
|
+
throw new Error("\u8BE5 run \u65E0\u5173\u8054 dialog\uFF0C\u65E0\u6CD5\u7EED\u8DD1\u3002");
|
|
10835
|
+
}
|
|
10836
|
+
const agentKey = reconciled.agentKey;
|
|
10837
|
+
const agentName = reconciled.agentName;
|
|
10838
|
+
const rawArgs = [
|
|
10839
|
+
"--agent",
|
|
10840
|
+
agentKey,
|
|
10841
|
+
"--continue",
|
|
10842
|
+
reconciled.dialogId,
|
|
10843
|
+
"--msg-file",
|
|
10844
|
+
"PLACEHOLDER",
|
|
10845
|
+
"--bg",
|
|
10846
|
+
...reconciled.ephemeral === true ? ["--ephemeral"] : []
|
|
10847
|
+
];
|
|
10848
|
+
const { runId: newRunId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
|
|
10849
|
+
{
|
|
10850
|
+
rawArgs,
|
|
10851
|
+
commandPath: ["agent", "run"],
|
|
10852
|
+
cliEntrypointPath: deps.cliEntrypoint,
|
|
10853
|
+
agentKey,
|
|
10854
|
+
...agentName ? { agentName } : {},
|
|
10855
|
+
...reconciled.batchId ? { batchId: reconciled.batchId } : {},
|
|
10856
|
+
...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
|
|
10857
|
+
cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
|
|
10858
|
+
message: userInput,
|
|
10859
|
+
output: noopOutput
|
|
10860
|
+
},
|
|
10861
|
+
deps
|
|
10862
|
+
);
|
|
10863
|
+
const displayName = resolveRunLabel({ agentName, agentKey, runId: newRunId });
|
|
10864
|
+
const labels = agentRunCardLabels();
|
|
10865
|
+
const taskPreview = userInput.replace(/\s+/g, " ").trim().slice(0, TASK_PREVIEW_MAX);
|
|
10866
|
+
return {
|
|
10867
|
+
content: JSON.stringify({
|
|
10868
|
+
runId: reconciled.runId,
|
|
10869
|
+
newRunId,
|
|
10870
|
+
dialogId: reconciled.dialogId,
|
|
10871
|
+
mode: "continue",
|
|
10872
|
+
status: "running",
|
|
10873
|
+
...agentName ? { agentName } : {},
|
|
10874
|
+
...resolvedBatchId ? { batchId: resolvedBatchId } : {},
|
|
10875
|
+
...taskPreview ? { taskPreview } : {}
|
|
10876
|
+
}),
|
|
10877
|
+
metadata: {
|
|
10878
|
+
displayData: formatStartRunCard(displayName, "running", {
|
|
10879
|
+
task: taskPreview,
|
|
10880
|
+
runId: newRunId,
|
|
10881
|
+
labels
|
|
10882
|
+
})
|
|
10883
|
+
}
|
|
10884
|
+
};
|
|
10885
|
+
}
|
|
10828
10886
|
function createCliControlAgentRunExecutor(deps = {}) {
|
|
10829
10887
|
return async (call, opts) => {
|
|
10830
10888
|
const args = parseCallArgs(call);
|
|
@@ -10832,7 +10890,7 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
10832
10890
|
const action = typeof args.action === "string" ? args.action : "";
|
|
10833
10891
|
const tailLines = typeof args.tailLines === "number" ? args.tailLines : 0;
|
|
10834
10892
|
if (action === "list") {
|
|
10835
|
-
gcRunRecords(deps);
|
|
10893
|
+
await gcRunRecords(deps);
|
|
10836
10894
|
const { runs: records, total, hasMore } = queryRunRecords(
|
|
10837
10895
|
{
|
|
10838
10896
|
...typeof args.batchId === "string" && args.batchId.trim() ? { batchId: args.batchId.trim() } : {},
|
|
@@ -10937,68 +10995,80 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
10937
10995
|
if (!userInput) throw new Error(`controlAgentRun(action:"append"): \u7F3A\u5C11\u6709\u6548\u7684 userInput \u6587\u672C\u3002`);
|
|
10938
10996
|
const record2 = findRunRecord(String(args.runId), deps);
|
|
10939
10997
|
if (!record2) {
|
|
10940
|
-
const
|
|
10998
|
+
const labels2 = agentRunCardLabels();
|
|
10941
10999
|
return {
|
|
10942
11000
|
content: JSON.stringify({ runId: args.runId, found: false }),
|
|
10943
|
-
metadata: { displayData: formatNotFoundRunCard(
|
|
11001
|
+
metadata: { displayData: formatNotFoundRunCard(labels2) }
|
|
10944
11002
|
};
|
|
10945
11003
|
}
|
|
10946
|
-
|
|
11004
|
+
let reconciled = checkStaleRun(record2.runId, deps) ?? record2;
|
|
10947
11005
|
if (!isAgentRunTerminalStatus(reconciled.status)) {
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
if (!reconciled.dialogId) {
|
|
10951
|
-
throw new Error("\u8BE5 run \u65E0\u5173\u8054 dialog\uFF0C\u65E0\u6CD5\u7EED\u8DD1\u3002");
|
|
10952
|
-
}
|
|
10953
|
-
const agentKey = reconciled.agentKey;
|
|
10954
|
-
const agentName = reconciled.agentName;
|
|
10955
|
-
const rawArgs = [
|
|
10956
|
-
"--agent",
|
|
10957
|
-
agentKey,
|
|
10958
|
-
"--continue",
|
|
10959
|
-
reconciled.dialogId,
|
|
10960
|
-
"--msg-file",
|
|
10961
|
-
"PLACEHOLDER",
|
|
10962
|
-
"--bg",
|
|
10963
|
-
...reconciled.ephemeral === true ? ["--ephemeral"] : []
|
|
10964
|
-
];
|
|
10965
|
-
const { runId: newRunId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
|
|
10966
|
-
{
|
|
10967
|
-
rawArgs,
|
|
10968
|
-
commandPath: ["agent", "run"],
|
|
10969
|
-
cliEntrypointPath: deps.cliEntrypoint,
|
|
10970
|
-
agentKey,
|
|
10971
|
-
...agentName ? { agentName } : {},
|
|
10972
|
-
...reconciled.batchId ? { batchId: reconciled.batchId } : {},
|
|
10973
|
-
...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
|
|
10974
|
-
cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
|
|
10975
|
-
message: userInput,
|
|
10976
|
-
output: noopOutput
|
|
10977
|
-
},
|
|
10978
|
-
deps
|
|
10979
|
-
);
|
|
10980
|
-
const displayName = resolveRunLabel({ agentName, agentKey, runId: newRunId });
|
|
10981
|
-
const labels2 = agentRunCardLabels();
|
|
10982
|
-
const taskPreview = userInput.replace(/\s+/g, " ").trim().slice(0, TASK_PREVIEW_MAX);
|
|
10983
|
-
return {
|
|
10984
|
-
content: JSON.stringify({
|
|
10985
|
-
runId: reconciled.runId,
|
|
10986
|
-
newRunId,
|
|
10987
|
-
dialogId: reconciled.dialogId,
|
|
10988
|
-
mode: "continue",
|
|
10989
|
-
status: "running",
|
|
10990
|
-
...agentName ? { agentName } : {},
|
|
10991
|
-
...resolvedBatchId ? { batchId: resolvedBatchId } : {},
|
|
10992
|
-
...taskPreview ? { taskPreview } : {}
|
|
10993
|
-
}),
|
|
10994
|
-
metadata: {
|
|
10995
|
-
displayData: formatStartRunCard(displayName, "running", {
|
|
10996
|
-
task: taskPreview,
|
|
10997
|
-
runId: newRunId,
|
|
10998
|
-
labels: labels2
|
|
10999
|
-
})
|
|
11006
|
+
if (!reconciled.queuePath) {
|
|
11007
|
+
throw new Error("\u8BE5 run \u542F\u52A8\u65F6\u4E0D\u652F\u6301\u8FD0\u884C\u4E2D\u5165\u961F\uFF08\u65E0\u961F\u5217\u901A\u9053\uFF09\uFF0C\u8BF7\u7B49\u7EC8\u6001\u540E\u518D append");
|
|
11000
11008
|
}
|
|
11001
|
-
|
|
11009
|
+
const queuePath = reconciled.queuePath;
|
|
11010
|
+
const { queuedCount, entryId } = await appendRunQueue(queuePath, userInput, deps);
|
|
11011
|
+
const displayName = resolveRunLabel({
|
|
11012
|
+
agentName: reconciled.agentName,
|
|
11013
|
+
agentKey: reconciled.agentKey,
|
|
11014
|
+
runId: reconciled.runId
|
|
11015
|
+
});
|
|
11016
|
+
const labels2 = agentRunCardLabels();
|
|
11017
|
+
const taskPreview = userInput.replace(/\s+/g, " ").trim().slice(0, TASK_PREVIEW_MAX);
|
|
11018
|
+
const afterCheck = checkStaleRun(reconciled.runId, deps) ?? reconciled;
|
|
11019
|
+
if (isAgentRunTerminalStatus(afterCheck.status)) {
|
|
11020
|
+
const remainingEntries = await popAllQueueEntries(queuePath, deps);
|
|
11021
|
+
const ourEntryFound = remainingEntries.some((e) => e.id === entryId);
|
|
11022
|
+
if (!ourEntryFound) {
|
|
11023
|
+
if (remainingEntries.length > 0) {
|
|
11024
|
+
await withQueueLock(queuePath, deps, () => {
|
|
11025
|
+
const fs = deps.fs ?? nodeFs;
|
|
11026
|
+
const existing = fs.existsSync(queuePath) ? fs.readFileSync(queuePath, "utf8") : "";
|
|
11027
|
+
fs.writeFileSync(queuePath, serializeQueueEntries(remainingEntries) + existing, "utf8");
|
|
11028
|
+
});
|
|
11029
|
+
}
|
|
11030
|
+
return {
|
|
11031
|
+
content: JSON.stringify({
|
|
11032
|
+
runId: reconciled.runId,
|
|
11033
|
+
...afterCheck.dialogId || reconciled.dialogId ? { dialogId: afterCheck.dialogId ?? reconciled.dialogId } : {},
|
|
11034
|
+
mode: "enqueue",
|
|
11035
|
+
consumed: true,
|
|
11036
|
+
status: afterCheck.status,
|
|
11037
|
+
...reconciled.agentName ? { agentName: reconciled.agentName } : {},
|
|
11038
|
+
...taskPreview ? { taskPreview } : {}
|
|
11039
|
+
}),
|
|
11040
|
+
metadata: {
|
|
11041
|
+
displayData: formatStartRunCard(displayName, afterCheck.status, {
|
|
11042
|
+
task: `[consumed] ${taskPreview}`,
|
|
11043
|
+
runId: reconciled.runId,
|
|
11044
|
+
labels: labels2
|
|
11045
|
+
})
|
|
11046
|
+
}
|
|
11047
|
+
};
|
|
11048
|
+
}
|
|
11049
|
+
const mergedMessage = remainingEntries.map((e) => e.text).join("\n\n");
|
|
11050
|
+
return await spawnContinuationRun(afterCheck, mergedMessage, deps);
|
|
11051
|
+
}
|
|
11052
|
+
return {
|
|
11053
|
+
content: JSON.stringify({
|
|
11054
|
+
runId: reconciled.runId,
|
|
11055
|
+
...reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
|
|
11056
|
+
mode: "enqueue",
|
|
11057
|
+
queued: queuedCount,
|
|
11058
|
+
status: "running",
|
|
11059
|
+
...reconciled.agentName ? { agentName: reconciled.agentName } : {},
|
|
11060
|
+
...taskPreview ? { taskPreview } : {}
|
|
11061
|
+
}),
|
|
11062
|
+
metadata: {
|
|
11063
|
+
displayData: formatStartRunCard(displayName, "running", {
|
|
11064
|
+
task: `[enqueued ${queuedCount}] ${taskPreview}`,
|
|
11065
|
+
runId: reconciled.runId,
|
|
11066
|
+
labels: labels2
|
|
11067
|
+
})
|
|
11068
|
+
}
|
|
11069
|
+
};
|
|
11070
|
+
}
|
|
11071
|
+
return await spawnContinuationRun(reconciled, userInput, deps);
|
|
11002
11072
|
}
|
|
11003
11073
|
if (action !== "status" && action !== "stop" && action !== "wait") {
|
|
11004
11074
|
throw new Error(`controlAgentRun: \u672A\u77E5 action "${action}"\u3002`);
|
|
@@ -11485,6 +11555,10 @@ async function generateLocalDialogTitle(input) {
|
|
|
11485
11555
|
const request = input.buildRequest({
|
|
11486
11556
|
providerConfig,
|
|
11487
11557
|
messages: [
|
|
11558
|
+
{
|
|
11559
|
+
role: "system",
|
|
11560
|
+
content: BUILTIN_TITLE_LLM_CONFIG.prompt
|
|
11561
|
+
},
|
|
11488
11562
|
{
|
|
11489
11563
|
role: "user",
|
|
11490
11564
|
content: JSON.stringify(visibleMessages)
|
|
@@ -11492,8 +11566,20 @@ async function generateLocalDialogTitle(input) {
|
|
|
11492
11566
|
],
|
|
11493
11567
|
stream: false
|
|
11494
11568
|
});
|
|
11569
|
+
let parsedBody = {};
|
|
11570
|
+
if (typeof request.init?.body === "string") {
|
|
11571
|
+
parsedBody = safeParseJson(request.init.body) ?? {};
|
|
11572
|
+
} else if (typeof request.init?.body === "object" && request.init?.body !== null) {
|
|
11573
|
+
parsedBody = request.init.body;
|
|
11574
|
+
}
|
|
11575
|
+
const patchedBody = {
|
|
11576
|
+
...parsedBody,
|
|
11577
|
+
reasoning_effort: "low",
|
|
11578
|
+
max_tokens: 512
|
|
11579
|
+
};
|
|
11495
11580
|
const res = await input.fetchImpl(request.url, {
|
|
11496
11581
|
...request.init,
|
|
11582
|
+
body: JSON.stringify(patchedBody),
|
|
11497
11583
|
signal: AbortSignal.timeout(timeoutMs)
|
|
11498
11584
|
});
|
|
11499
11585
|
if (res.ok) {
|
|
@@ -11550,6 +11636,9 @@ async function generateLocalDialogTitle(input) {
|
|
|
11550
11636
|
{ role: "system", content: BUILTIN_TITLE_LLM_CONFIG.prompt },
|
|
11551
11637
|
{ role: "user", content: JSON.stringify(visibleMessages) }
|
|
11552
11638
|
],
|
|
11639
|
+
// reasoning_effort/max_tokens 优化标题延迟与消耗;注意部分严格 OpenAI 兼容服务端(如某些 vLLM 部署)若拒绝未知参数会降级到 fallback。
|
|
11640
|
+
reasoning_effort: "low",
|
|
11641
|
+
max_tokens: 512,
|
|
11553
11642
|
stream: false
|
|
11554
11643
|
}),
|
|
11555
11644
|
signal: AbortSignal.timeout(timeoutMs)
|
|
@@ -11631,6 +11720,8 @@ async function getOrCreateSharedStore(deps) {
|
|
|
11631
11720
|
}
|
|
11632
11721
|
return storePromise;
|
|
11633
11722
|
}
|
|
11723
|
+
var TITLE_WARN_THROTTLE_MS = 30 * 60 * 1e3;
|
|
11724
|
+
var lastTitleWarnAtMs = 0;
|
|
11634
11725
|
function createLocalDialogTitleGenerator(deps, ctx) {
|
|
11635
11726
|
if (!canUsePlatformChatProvider(deps.env) && !hasDirectOpenAiCompatibleProvider(deps.env)) {
|
|
11636
11727
|
return null;
|
|
@@ -11672,9 +11763,17 @@ function createLocalDialogTitleGenerator(deps, ctx) {
|
|
|
11672
11763
|
trace: []
|
|
11673
11764
|
}),
|
|
11674
11765
|
fallbackTitle: input.fallbackTitle,
|
|
11675
|
-
timeoutMs:
|
|
11766
|
+
timeoutMs: 3e4
|
|
11676
11767
|
});
|
|
11677
|
-
|
|
11768
|
+
if (result.source !== "llm") {
|
|
11769
|
+
const now = Date.now();
|
|
11770
|
+
if (now - lastTitleWarnAtMs >= TITLE_WARN_THROTTLE_MS) {
|
|
11771
|
+
lastTitleWarnAtMs = now;
|
|
11772
|
+
process.stderr.write("[nolo] Dialog title LLM unavailable; using fallback title.\n");
|
|
11773
|
+
}
|
|
11774
|
+
return null;
|
|
11775
|
+
}
|
|
11776
|
+
return result.title;
|
|
11678
11777
|
};
|
|
11679
11778
|
}
|
|
11680
11779
|
async function writeLocalTokenRecord(args) {
|
|
@@ -11736,7 +11835,8 @@ async function writeLocalTokenRecord(args) {
|
|
|
11736
11835
|
provider: prepared.recordProvider,
|
|
11737
11836
|
input_tokens: prepared.usage.input_tokens,
|
|
11738
11837
|
output_tokens: prepared.usage.output_tokens,
|
|
11739
|
-
cost: prepared.tokenData.cost
|
|
11838
|
+
cost: prepared.tokenData.cost,
|
|
11839
|
+
billingCategory: prepared.tokenData.billable ?? false ? "platform" : "subscription"
|
|
11740
11840
|
});
|
|
11741
11841
|
const statsRecord = { ...newStats, id: statsKey, type: "token" };
|
|
11742
11842
|
await args.store.write(statsKey, statsRecord);
|
|
@@ -11950,6 +12050,69 @@ var isJsBundle = extname(currentMetaFile) === ".js";
|
|
|
11950
12050
|
var SOURCE_CLI_DIR = isJsBundle ? dirname2(currentMetaFile) : dirname2(dirname2(currentMetaFile));
|
|
11951
12051
|
var CLI_DIR = isCompiledBinary() ? dirname2(process.execPath) : SOURCE_CLI_DIR;
|
|
11952
12052
|
var CLI_ENTRYPOINT = isCompiledBinary() ? process.execPath : isJsBundle ? currentMetaFile : join2(SOURCE_CLI_DIR, "index.ts");
|
|
12053
|
+
async function recordLocalAvailabilityForAgent(args) {
|
|
12054
|
+
const now = args.now ?? Date.now;
|
|
12055
|
+
const { deps, status } = args;
|
|
12056
|
+
const agentConfig = args.agentConfig;
|
|
12057
|
+
const key = typeof agentConfig?.key === "string" ? agentConfig.key : "";
|
|
12058
|
+
if (!key) return void 0;
|
|
12059
|
+
const action = resolveAvailabilityAction(status, args.body, now());
|
|
12060
|
+
if (action.kind === "noop") return void 0;
|
|
12061
|
+
const credentialKey = resolveCredentialKeyWithFallback(agentConfig);
|
|
12062
|
+
if (credentialKey) {
|
|
12063
|
+
if (action.kind === "mark") {
|
|
12064
|
+
await markCredentialUnavailable(
|
|
12065
|
+
credentialKey,
|
|
12066
|
+
action.nextAvailableAt,
|
|
12067
|
+
deps.env,
|
|
12068
|
+
now()
|
|
12069
|
+
).catch(() => void 0);
|
|
12070
|
+
} else {
|
|
12071
|
+
await clearCredentialAvailability(
|
|
12072
|
+
credentialKey,
|
|
12073
|
+
deps.env,
|
|
12074
|
+
now()
|
|
12075
|
+
).catch(() => void 0);
|
|
12076
|
+
}
|
|
12077
|
+
}
|
|
12078
|
+
const store = await getOrCreateSharedStore(deps);
|
|
12079
|
+
const current = await store.read(key, { remote: false }).catch(() => null);
|
|
12080
|
+
if (!current || typeof current !== "object") {
|
|
12081
|
+
if (action.kind !== "mark" || !credentialKey) return void 0;
|
|
12082
|
+
const entry = await readCredentialEntry(credentialKey, deps.env, now()).catch(
|
|
12083
|
+
() => void 0
|
|
12084
|
+
);
|
|
12085
|
+
return typeof entry?.nextAvailableAt === "number" ? entry.nextAvailableAt : action.nextAvailableAt;
|
|
12086
|
+
}
|
|
12087
|
+
const record = current;
|
|
12088
|
+
if (action.kind === "clear" && !("nextAvailableAt" in record)) return void 0;
|
|
12089
|
+
const next = { ...record };
|
|
12090
|
+
let effectiveNextAvailableAt;
|
|
12091
|
+
if (action.kind === "mark") {
|
|
12092
|
+
const merged = mergeAvailabilityDeadline(
|
|
12093
|
+
record.nextAvailableAt,
|
|
12094
|
+
action.nextAvailableAt
|
|
12095
|
+
);
|
|
12096
|
+
next.nextAvailableAt = merged;
|
|
12097
|
+
effectiveNextAvailableAt = merged;
|
|
12098
|
+
} else {
|
|
12099
|
+
delete next.nextAvailableAt;
|
|
12100
|
+
}
|
|
12101
|
+
await store.write(key, next).catch(() => void 0);
|
|
12102
|
+
if (action.kind !== "mark") return void 0;
|
|
12103
|
+
if (credentialKey) {
|
|
12104
|
+
const entry = await readCredentialEntry(credentialKey, deps.env, now()).catch(
|
|
12105
|
+
() => void 0
|
|
12106
|
+
);
|
|
12107
|
+
if (typeof entry?.nextAvailableAt === "number") {
|
|
12108
|
+
effectiveNextAvailableAt = mergeAvailabilityDeadline(
|
|
12109
|
+
entry.nextAvailableAt,
|
|
12110
|
+
effectiveNextAvailableAt ?? entry.nextAvailableAt
|
|
12111
|
+
);
|
|
12112
|
+
}
|
|
12113
|
+
}
|
|
12114
|
+
return effectiveNextAvailableAt;
|
|
12115
|
+
}
|
|
11953
12116
|
function createCliLocalRuntimeAdapter(deps) {
|
|
11954
12117
|
const now = deps.now ?? Date.now;
|
|
11955
12118
|
const createId = deps.createId ?? createFallbackId;
|
|
@@ -12107,46 +12270,13 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12107
12270
|
agentLevelNextAvailableAt,
|
|
12108
12271
|
credentialCooldownAt
|
|
12109
12272
|
) : agentLevelNextAvailableAt;
|
|
12110
|
-
const recordLocalAvailability =
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
);
|
|
12118
|
-
if (credentialKey) {
|
|
12119
|
-
if (action.kind === "mark") {
|
|
12120
|
-
await markCredentialUnavailable(
|
|
12121
|
-
credentialKey,
|
|
12122
|
-
action.nextAvailableAt,
|
|
12123
|
-
deps.env,
|
|
12124
|
-
now()
|
|
12125
|
-
).catch(() => void 0);
|
|
12126
|
-
} else {
|
|
12127
|
-
await clearCredentialAvailability(
|
|
12128
|
-
credentialKey,
|
|
12129
|
-
deps.env,
|
|
12130
|
-
now()
|
|
12131
|
-
).catch(() => void 0);
|
|
12132
|
-
}
|
|
12133
|
-
}
|
|
12134
|
-
const store = await getOrCreateSharedStore(deps);
|
|
12135
|
-
const current = await store.read(key, { remote: false }).catch(() => null);
|
|
12136
|
-
if (!current || typeof current !== "object") return;
|
|
12137
|
-
const record = current;
|
|
12138
|
-
if (action.kind === "clear" && !("nextAvailableAt" in record)) return;
|
|
12139
|
-
const next = { ...record };
|
|
12140
|
-
if (action.kind === "mark") {
|
|
12141
|
-
next.nextAvailableAt = mergeAvailabilityDeadline(
|
|
12142
|
-
record.nextAvailableAt,
|
|
12143
|
-
action.nextAvailableAt
|
|
12144
|
-
);
|
|
12145
|
-
} else {
|
|
12146
|
-
delete next.nextAvailableAt;
|
|
12147
|
-
}
|
|
12148
|
-
await store.write(key, next).catch(() => void 0);
|
|
12149
|
-
};
|
|
12273
|
+
const recordLocalAvailability = (status, body) => recordLocalAvailabilityForAgent({
|
|
12274
|
+
deps,
|
|
12275
|
+
agentConfig,
|
|
12276
|
+
status,
|
|
12277
|
+
body,
|
|
12278
|
+
now
|
|
12279
|
+
}).then(() => void 0);
|
|
12150
12280
|
const gateEntry = credentialKeyForGate ? await readCredentialEntry(credentialKeyForGate, deps.env, nowMs).catch(
|
|
12151
12281
|
() => void 0
|
|
12152
12282
|
) : void 0;
|
|
@@ -12264,6 +12394,17 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12264
12394
|
...deps,
|
|
12265
12395
|
retryOnly: isBusyProviderStreamError
|
|
12266
12396
|
}) : withProviderStreamRetry(provider, deps);
|
|
12397
|
+
},
|
|
12398
|
+
recordStartupAvailabilityForAgent: async (agentRef, status, body) => {
|
|
12399
|
+
const agentConfig = await adapterBase.loadAgentConfig(agentRef);
|
|
12400
|
+
if (!agentConfig) return void 0;
|
|
12401
|
+
return recordLocalAvailabilityForAgent({
|
|
12402
|
+
deps,
|
|
12403
|
+
agentConfig,
|
|
12404
|
+
status,
|
|
12405
|
+
body,
|
|
12406
|
+
now
|
|
12407
|
+
});
|
|
12267
12408
|
}
|
|
12268
12409
|
};
|
|
12269
12410
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
asNonEmptyStringArray
|
|
3
|
-
} from "./chunk-I42VC5KR.js";
|
|
4
1
|
import {
|
|
5
2
|
asOptionalFiniteNumber
|
|
6
3
|
} from "./chunk-WWC7I6TA.js";
|
|
4
|
+
import {
|
|
5
|
+
asNonEmptyStringArray
|
|
6
|
+
} from "./chunk-I42VC5KR.js";
|
|
7
7
|
import {
|
|
8
8
|
asTrimmedString
|
|
9
9
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -2780,6 +2780,8 @@ var createTokenKey = {
|
|
|
2780
2780
|
),
|
|
2781
2781
|
/** Server provider-call record: retry-stable even when the retry clock changes. */
|
|
2782
2782
|
recordForStableCall: (userId, callId) => createKey("token", userId, "call", encodeURIComponent(callId)),
|
|
2783
|
+
/** Server provider-call failure audit record: preserved separately from retry success in a collision-free namespace. */
|
|
2784
|
+
recordForFailedStableCall: (userId, callId) => createKey("token", userId, "failed-call", encodeURIComponent(callId)),
|
|
2783
2785
|
range: (userId, timestamp) => ({
|
|
2784
2786
|
start: createKey("token", userId, timestamp.toString()),
|
|
2785
2787
|
end: createKey("token", userId, (timestamp + 864e5).toString())
|