nolo-cli 0.102.0 → 0.102.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-WLFACVFR.js → _executeModel-B6SS2ISV.js} +32 -32
- package/{action-PNPQLJHG.js → action-C4KMTCJF.js} +2 -2
- package/{addContentAction-RBOUD7SJ.js → addContentAction-7TNIOVZI.js} +6 -6
- package/{addDialogAgentAction-IODCR6TB.js → addDialogAgentAction-O47J3MVW.js} +5 -5
- package/{agentDeleteCommand-EFWZSSZA.js → agentDeleteCommand-MEKEAJS6.js} +87 -17
- package/{agentEmailCommands-FJ2DAY5M.js → agentEmailCommands-NCQSCDX7.js} +36 -36
- package/{agentListCommands-EDV4RJ4D.js → agentListCommands-VLNQH2BR.js} +19 -19
- package/{agentMachineCommands-UOEI4TPN.js → agentMachineCommands-ZYKZGX65.js} +17 -17
- package/{agentRecordCommands-MLDVCTFN.js → agentRecordCommands-2INKPT2O.js} +36 -36
- package/{agentRunCommand-SY7N2BDL.js → agentRunCommand-2SZBC7BP.js} +36 -36
- package/{agentRuntimeLocal-SXYAKX3A.js → agentRuntimeLocal-7VIX3R3R.js} +14 -14
- package/{agentSlice-WBSSBKBB.js → agentSlice-4JIT2XG4.js} +7 -7
- package/{appDeleteCommands-GTTBG53T.js → appDeleteCommands-YLCAVP4I.js} +18 -18
- package/{appDeployCommands-ZZCHUJAT.js → appDeployCommands-7PQPIIEL.js} +18 -18
- package/{appDeployStatusCommands-GZLLGY7Z.js → appDeployStatusCommands-Z3YBCYU3.js} +18 -18
- package/{appGetCommands-ZRLWHJ3C.js → appGetCommands-MCY6JLD3.js} +18 -18
- package/{appListCommands-OHARWLIL.js → appListCommands-O6QDXYKT.js} +18 -18
- package/{authCommand-NHDLY3IB.js → authCommand-I6LVUQKM.js} +2 -2
- package/{authCommands-UDBJVSZU.js → authCommands-LWLOZETU.js} +2 -2
- package/{builtinSkillRegistry-MAR5LPAC.js → builtinSkillRegistry-GFY77VRN.js} +4 -4
- package/{chunk-UM4PH574.js → chunk-22RVE2PC.js} +1 -1
- package/{chunk-XFUBXRVI.js → chunk-2H6SEVDS.js} +1 -1
- package/{chunk-PCF3QU5Q.js → chunk-2K4TM6AW.js} +1 -1
- package/{chunk-5LTAPGPV.js → chunk-2K54PIZY.js} +2 -2
- package/{chunk-VEYL5MO5.js → chunk-4G4C5SXT.js} +3 -3
- package/{chunk-WCGC6S77.js → chunk-4HTMUQIZ.js} +2 -2
- package/{chunk-4FFUDT6D.js → chunk-56HJ2LAA.js} +17 -7
- package/{chunk-E73ON47R.js → chunk-5EPHWMP5.js} +2 -2
- package/{chunk-DNHENQ3T.js → chunk-5UQRASYE.js} +5 -5
- package/{chunk-NZWAO6LH.js → chunk-6UEJDFF7.js} +28 -2
- package/{chunk-5OA5HMTL.js → chunk-7JWCVINR.js} +1 -1
- package/{chunk-4YSOUKUR.js → chunk-7KWFIKKK.js} +1 -1
- package/{chunk-6O4IK4V2.js → chunk-CUF4MYKI.js} +1 -1
- package/{chunk-PTDYOADJ.js → chunk-D2GQE6AF.js} +1 -1
- package/{chunk-OYPMWCIQ.js → chunk-DLXHN5XZ.js} +9 -9
- package/{chunk-KLUBZL6X.js → chunk-ERFIIS4C.js} +1 -1
- package/{chunk-46Y5D2BZ.js → chunk-EV235ILT.js} +1 -1
- package/{chunk-FY7DCYW7.js → chunk-F6DFZLO4.js} +3 -3
- package/{chunk-FJ5BGMNM.js → chunk-FBTNYNAL.js} +1 -1
- package/{chunk-YPOPJAKN.js → chunk-GCTKWVLU.js} +1 -1
- package/{chunk-U6IGAJT4.js → chunk-GJ647AYV.js} +7 -7
- package/{chunk-SEB5HAUU.js → chunk-HD3S2F7U.js} +1 -1
- package/{chunk-LKERWYPX.js → chunk-IRZTHHNM.js} +2 -2
- package/{chunk-V5OWQOJZ.js → chunk-K4URP6NQ.js} +1 -1
- package/{chunk-7TKWCTSY.js → chunk-KNVDNYH7.js} +2 -2
- package/{chunk-7MMSLEPA.js → chunk-LB5A6JTU.js} +3 -3
- package/{chunk-TVCAR26G.js → chunk-MSFZ7FMO.js} +1 -1
- package/{chunk-XIRXOUBV.js → chunk-NGO72MN2.js} +6 -6
- package/{chunk-CJN5OERD.js → chunk-NMMU6M4Z.js} +22 -22
- package/{chunk-UJXNKP5V.js → chunk-O7SVKKLY.js} +129 -14
- package/{chunk-SNMQMOD2.js → chunk-Q7O72MF5.js} +1 -1
- package/{chunk-GARACBQB.js → chunk-RILRSUGC.js} +1 -1
- package/{chunk-X34KOYU2.js → chunk-S7HQBOEA.js} +10 -10
- package/{chunk-CHNCM7EF.js → chunk-TAPMD4SO.js} +7 -7
- package/{chunk-UVKDJUTL.js → chunk-TSXNDTXL.js} +1 -1
- package/{chunk-GUYEMTRK.js → chunk-TTMNMJVI.js} +45 -32
- package/{chunk-W72ISAKC.js → chunk-UNAOTLKO.js} +1 -1
- package/{chunk-PH275YDS.js → chunk-V3R3UZ4F.js} +24 -17
- package/{chunk-V7Y6KRAH.js → chunk-V6YASAZR.js} +1 -1
- package/{chunk-AUDNYVRC.js → chunk-VLGL7FOL.js} +1 -1
- package/{chunk-ODTDLPBV.js → chunk-VPNDYFUB.js} +3 -3
- package/{chunk-LNVJHIGA.js → chunk-XMUZHRSB.js} +6 -6
- package/{chunk-Z56IK6UT.js → chunk-XTM4WSXT.js} +8 -8
- package/{chunk-ADBZWMFB.js → chunk-YDO5ERB4.js} +1 -1
- package/{chunk-U7XXEI5R.js → chunk-YGCJITP3.js} +2 -2
- package/{chunk-NRUSXKH7.js → chunk-Z5X5MD6D.js} +7 -6
- package/{chunk-G53AA7RW.js → chunk-ZQZZJIQI.js} +63 -14
- package/{commandRegistry-2HPRUR3I.js → commandRegistry-X7FA6WJQ.js} +50 -50
- package/{contentThunks-F2BNWOZV.js → contentThunks-CH5Z3XAD.js} +15 -15
- package/{createAgentAutomationAction-5N2NRNR7.js → createAgentAutomationAction-4MV3MWVE.js} +15 -15
- package/{createDialogAction-DSEG4L5Y.js → createDialogAction-BYCJKWFY.js} +18 -18
- package/{createPageAction-K32FYQPE.js → createPageAction-XWDTQHFL.js} +16 -16
- package/{dbSlice-Q25STFGJ.js → dbSlice-QOLNF5GN.js} +5 -5
- package/{deleteFile-AJ2EZMHT.js → deleteFile-KESP65GC.js} +2 -2
- package/{dialogCommands-LF7PLYAD.js → dialogCommands-NNSKMYZR.js} +19 -19
- package/{dialogSlice-4GBOUTGL.js → dialogSlice-LUUVLJKZ.js} +14 -14
- package/{docCreateCommands-NQR3S7A4.js → docCreateCommands-BKCYZTJW.js} +19 -19
- package/{docDeleteCommands-V3IAQ2HT.js → docDeleteCommands-AJDU5BUV.js} +20 -20
- package/{docReadCommands-GDX4CLSU.js → docReadCommands-PPI2UAIW.js} +19 -19
- package/{docStore-ZTYSP3YE.js → docStore-RRAGFCNQ.js} +6 -6
- package/{docUpdateCommands-QMYXWQOU.js → docUpdateCommands-62WIRKAN.js} +19 -19
- package/{fetchMessages-I5ICDDHM.js → fetchMessages-5L7OVM5Y.js} +2 -2
- package/{handleSendMessageAction-XFZH2TQS.js → handleSendMessageAction-CW5HSH4E.js} +14 -14
- package/index.js +3 -3
- package/{localDialogRead-ZHZ3KXDM.js → localDialogRead-O5A26FDK.js} +1 -1
- package/{machineCommands-KMU3D5I5.js → machineCommands-FG6HBFB7.js} +35 -35
- package/{machineWsRunDispatch-6GJ5YOSW.js → machineWsRunDispatch-7JCANNGT.js} +35 -35
- package/{memberThunks-R75S3RWP.js → memberThunks-25K6DDRA.js} +6 -6
- package/package.json +1 -1
- package/{read-SRQMNO26.js → read-PJIT2YEJ.js} +2 -2
- package/{readDocTool-RC3JUNJ2.js → readDocTool-DRSXHGNL.js} +1 -1
- package/{readlineWorkspace-ZMNRQXMC.js → readlineWorkspace-HISW3JNJ.js} +40 -40
- package/{removeDialogAgentAction-46XQV5Q7.js → removeDialogAgentAction-VIWJL6MX.js} +6 -6
- package/{runAgentClientLoop-URRDZ5WG.js → runAgentClientLoop-4XIIPXH3.js} +30 -30
- package/{setDialogExtraReferencesAction-J4V5ADQF.js → setDialogExtraReferencesAction-A7VA3NFM.js} +6 -6
- package/{setPrimaryDialogAgentAction-UHHV2QZW.js → setPrimaryDialogAgentAction-B4P7YQX2.js} +6 -6
- package/{settingThunks-PPZZZOWN.js → settingThunks-KOYSAT65.js} +5 -5
- package/{spaceCommands-2P2X37MC.js → spaceCommands-BBEY2U7J.js} +17 -17
- package/{streamAgentChatTurn-YPUYKXDX.js → streamAgentChatTurn-WRLQAWTW.js} +32 -32
- package/{switchDialogAgentAction-A2TMVGAE.js → switchDialogAgentAction-3VYWHZKH.js} +5 -5
- package/{tools-M5ENXZRJ.js → tools-NPSZ3DTN.js} +27 -27
- package/{tuiSummaryLlmCaller-Q65IBDGO.js → tuiSummaryLlmCaller-O3DZKOHE.js} +8 -8
- package/{updateDialogTitleAction-7PNUE23W.js → updateDialogTitleAction-DBW4OTMM.js} +15 -15
- /package/{chunk-3AH7LNUB.js → chunk-ODAPITXL.js} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TSXNDTXL.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchWithTransientRetry,
|
|
13
13
|
parsePositiveFiniteNumberOrFallback
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
buildDialogAttachmentPlan,
|
|
28
28
|
extractFileContentIds
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CUF4MYKI.js";
|
|
30
30
|
import {
|
|
31
31
|
boundSummaryText,
|
|
32
32
|
buildDialogReadEnvelope,
|
|
33
33
|
projectDialogReadForAgent
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7KWFIKKK.js";
|
|
35
35
|
import {
|
|
36
36
|
asRecordOrEmpty
|
|
37
37
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
import {
|
|
53
53
|
asNonEmptyStringArray,
|
|
54
54
|
asTrimmedNonEmptyStringArray
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ODAPITXL.js";
|
|
56
56
|
import {
|
|
57
57
|
createClientLogger
|
|
58
58
|
} from "./chunk-HIM3FCLF.js";
|
|
@@ -723,7 +723,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
|
|
|
723
723
|
return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
|
|
724
724
|
}
|
|
725
725
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
726
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
726
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-O5A26FDK.js")).readDialogFromLocalDb;
|
|
727
727
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
728
728
|
return {
|
|
729
729
|
...result,
|
|
@@ -740,7 +740,7 @@ async function readLocalDialogAtDbPathDefault(args) {
|
|
|
740
740
|
const [{ Level }, { safeJsonEncoding }, { fetchMessages }] = await Promise.all([
|
|
741
741
|
import("./levelLazyShim-GZBKODGI.js"),
|
|
742
742
|
import("./serverStoreFactory-YMXDF4NI.js"),
|
|
743
|
-
import("./fetchMessages-
|
|
743
|
+
import("./fetchMessages-5L7OVM5Y.js")
|
|
744
744
|
]);
|
|
745
745
|
const db = new Level(args.dbPath, {
|
|
746
746
|
valueEncoding: safeJsonEncoding,
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2K54PIZY.js";
|
|
9
9
|
import {
|
|
10
10
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
11
11
|
buildInvalidToolCallSelfHealResult,
|
|
12
12
|
parseToolCallArguments,
|
|
13
13
|
performFetchRequest,
|
|
14
14
|
sanitizeOutboundMessages
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DLXHN5XZ.js";
|
|
16
16
|
import {
|
|
17
17
|
createSSEParser,
|
|
18
18
|
createToolRunId,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolRunSetPending,
|
|
24
24
|
toolRunStarted,
|
|
25
25
|
toolRunSucceeded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TTMNMJVI.js";
|
|
27
27
|
import {
|
|
28
28
|
getPublicImageAgentMode
|
|
29
29
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -38,10 +38,10 @@ import {
|
|
|
38
38
|
messageStreamEnd,
|
|
39
39
|
messageStreaming,
|
|
40
40
|
updateToolMessage
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-NMMU6M4Z.js";
|
|
42
42
|
import {
|
|
43
43
|
streamAgentChatTurn
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-TAPMD4SO.js";
|
|
45
45
|
import {
|
|
46
46
|
addActiveController,
|
|
47
47
|
removeActiveController,
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
import {
|
|
60
60
|
EMPTY_ASSISTANT_REPAIR_PROMPT,
|
|
61
61
|
getModelInfo
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-IRZTHHNM.js";
|
|
63
63
|
import {
|
|
64
64
|
write
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-56HJ2LAA.js";
|
|
66
66
|
import {
|
|
67
67
|
getApiEndpoint
|
|
68
68
|
} from "./chunk-3BXNTXYI.js";
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
createDialogMessageKeyAndId,
|
|
83
83
|
dialogMessageKey,
|
|
84
84
|
toTrimmedString
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-ODAPITXL.js";
|
|
86
86
|
import {
|
|
87
87
|
createAsyncThunk
|
|
88
88
|
} from "./chunk-VY6VFGKR.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YYLHWIW6.js";
|
|
4
4
|
import {
|
|
5
5
|
compareAgentSelection
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7KWFIKKK.js";
|
|
7
7
|
import {
|
|
8
8
|
isAgentUnavailableNow
|
|
9
9
|
} from "./chunk-H6A6X4EK.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-CYSYR67N.js";
|
|
20
20
|
import {
|
|
21
21
|
fnv1a32Hex
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O7SVKKLY.js";
|
|
23
23
|
import {
|
|
24
24
|
isOwnedAgentKey,
|
|
25
25
|
ownedAgentKey,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V3R3UZ4F.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-LOCNXNOU.js";
|
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
buildUpdatedAgentRecord,
|
|
10
10
|
normalizeAgentRecordForOutput,
|
|
11
11
|
parseAgentUpdateArgs,
|
|
12
|
+
refreshAgentRecordCache,
|
|
12
13
|
resolveAgentRecordFromHybridStore,
|
|
13
14
|
sanitizeAgentRecordForCliOutput,
|
|
14
15
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6UEJDFF7.js";
|
|
16
17
|
import {
|
|
17
18
|
resolveCliAgentKeyInput
|
|
18
19
|
} from "./chunk-SV5IJK6K.js";
|
|
@@ -130,10 +131,10 @@ async function runAgentUpdateCommand(args, deps = {}) {
|
|
|
130
131
|
userId,
|
|
131
132
|
record: built.nextRecord
|
|
132
133
|
});
|
|
133
|
-
await
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
await refreshAgentRecordCache({
|
|
135
|
+
db,
|
|
136
|
+
agentKey: built.agentKey,
|
|
137
|
+
record: built.nextRecord,
|
|
137
138
|
serverOrigin: built.serverUrl
|
|
138
139
|
});
|
|
139
140
|
clearCliLocalRuntimePreparedAgentCache();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
flushChatCompletionStream,
|
|
12
12
|
providerHttpFailure,
|
|
13
13
|
throwIfChatCompletionStreamFailed
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K4URP6NQ.js";
|
|
15
15
|
import {
|
|
16
16
|
readSseFrames
|
|
17
17
|
} from "./chunk-GMZLP5DV.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveHistoricalToolContentCap,
|
|
28
28
|
resolveToolOutputProfile,
|
|
29
29
|
stripImagePartsFromMessages
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HD3S2F7U.js";
|
|
31
31
|
import {
|
|
32
32
|
downgradeUnparsableToolCalls,
|
|
33
33
|
hasParsableObjectArguments,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
requiresBareImageUrl,
|
|
55
55
|
resolveToolGuidedSections,
|
|
56
56
|
toBareImageUrlMessages
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-KNVDNYH7.js";
|
|
58
58
|
import {
|
|
59
59
|
convertMessagesToResponsesInput,
|
|
60
60
|
extractReasoningFromResponseOutput,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
parseNoloWorkspaceToolArguments,
|
|
81
81
|
readTextStreamUpToChars,
|
|
82
82
|
resolveNoloDialogInput
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-7KWFIKKK.js";
|
|
84
84
|
import {
|
|
85
85
|
buildDialogFallbackTitleFromUserInput
|
|
86
86
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
resolveEmptyAssistantFallbackMessage,
|
|
95
95
|
resolveEmptyAssistantOutcome,
|
|
96
96
|
resolveTruncatedReasoningTailLog
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-IRZTHHNM.js";
|
|
98
98
|
import {
|
|
99
99
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
100
100
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
resolveCompressionTriggerRatio,
|
|
113
113
|
truncateToolOutputForContext,
|
|
114
114
|
withProviderCallTimingFields
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-LB5A6JTU.js";
|
|
116
116
|
import {
|
|
117
117
|
clipCompactText
|
|
118
118
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
asTrimmedNonEmptyStringArray,
|
|
153
153
|
dialogMessageKey,
|
|
154
154
|
dialogMessageRange
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-ODAPITXL.js";
|
|
156
156
|
import {
|
|
157
157
|
asOptionalFiniteNumber
|
|
158
158
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -12517,7 +12517,7 @@ function formatToolOverflowMarker(args2) {
|
|
|
12517
12517
|
}
|
|
12518
12518
|
|
|
12519
12519
|
// packages/agent-runtime/localAutoCompaction.ts
|
|
12520
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
12520
|
+
import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
12521
12521
|
function toPlanCompressionMessages(history) {
|
|
12522
12522
|
return history.map((message, index) => ({
|
|
12523
12523
|
id: `local-${index}`,
|
|
@@ -12688,6 +12688,37 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12688
12688
|
return projectExisting();
|
|
12689
12689
|
}
|
|
12690
12690
|
emitPhase({ kind: "compaction-start" });
|
|
12691
|
+
const compactionAttemptId = randomUUID();
|
|
12692
|
+
let compactionT0 = Date.now();
|
|
12693
|
+
let compactionInputTokens;
|
|
12694
|
+
let compactionPrevSummaryTokens;
|
|
12695
|
+
let compactionInputSource;
|
|
12696
|
+
let compactionPrevSummarySource;
|
|
12697
|
+
let primaryElapsedMs;
|
|
12698
|
+
let saveElapsedMs;
|
|
12699
|
+
const logCompactionTiming = (outcome, fields) => {
|
|
12700
|
+
if (compactionInputTokens === void 0 && compactionInputSource !== void 0) {
|
|
12701
|
+
compactionInputTokens = estimateTokenCount(compactionInputSource);
|
|
12702
|
+
}
|
|
12703
|
+
if (compactionPrevSummaryTokens === void 0 && compactionPrevSummarySource !== void 0) {
|
|
12704
|
+
compactionPrevSummaryTokens = estimateTokenCount(compactionPrevSummarySource);
|
|
12705
|
+
}
|
|
12706
|
+
console.log(
|
|
12707
|
+
`[compaction-timing] ${JSON.stringify({
|
|
12708
|
+
attemptId: compactionAttemptId,
|
|
12709
|
+
model: fields.model ?? args2.model ?? null,
|
|
12710
|
+
inputTokens: compactionInputTokens ?? null,
|
|
12711
|
+
prevSummaryTokens: compactionPrevSummaryTokens ?? null,
|
|
12712
|
+
outputChars: fields.outputChars ?? null,
|
|
12713
|
+
elapsedMs: Date.now() - compactionT0,
|
|
12714
|
+
primaryElapsedMs: primaryElapsedMs ?? null,
|
|
12715
|
+
// main 无 fallback 通道,保留该字段以兼容日志 schema。
|
|
12716
|
+
fallbackElapsedMs: null,
|
|
12717
|
+
saveElapsedMs: saveElapsedMs ?? null,
|
|
12718
|
+
outcome
|
|
12719
|
+
})}`
|
|
12720
|
+
);
|
|
12721
|
+
};
|
|
12691
12722
|
try {
|
|
12692
12723
|
if (args2.abortSignal?.aborted) {
|
|
12693
12724
|
throw Object.assign(new Error("auto-compaction aborted"), { compactionReason: "aborted" });
|
|
@@ -12708,13 +12739,22 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12708
12739
|
fileOpsText
|
|
12709
12740
|
});
|
|
12710
12741
|
emitPhase({ kind: "waiting-provider" });
|
|
12742
|
+
compactionInputSource = messagesText;
|
|
12743
|
+
compactionPrevSummarySource = existingSummary;
|
|
12744
|
+
compactionT0 = Date.now();
|
|
12711
12745
|
const timeoutMs = typeof args2.timeoutMs === "number" && Number.isFinite(args2.timeoutMs) && args2.timeoutMs > 0 ? args2.timeoutMs : void 0;
|
|
12712
12746
|
const requestController = new AbortController();
|
|
12713
12747
|
let timeoutHandle;
|
|
12714
12748
|
let abortListener;
|
|
12715
12749
|
const request3 = provider.complete(
|
|
12716
12750
|
[{ role: "system", content: COMPACTION_SUMMARY_SYSTEM_PROMPT }, { role: "user", content: promptContent }],
|
|
12717
|
-
{
|
|
12751
|
+
{
|
|
12752
|
+
signal: requestController.signal,
|
|
12753
|
+
...timeoutMs ? { timeoutMs } : {},
|
|
12754
|
+
// 仅日志用的 attempt id:让 compaction 埋点与 transport 诊断日志 /
|
|
12755
|
+
// 服务端 x-request-id 可对上,用于关联请求级证据。不进 prompt/摘要/持久化。
|
|
12756
|
+
requestId: compactionAttemptId
|
|
12757
|
+
}
|
|
12718
12758
|
).then(
|
|
12719
12759
|
(value) => ({ kind: "done", value }),
|
|
12720
12760
|
(error) => ({ kind: "provider-error", error })
|
|
@@ -12734,6 +12774,7 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12734
12774
|
args2.abortSignal?.addEventListener("abort", abortListener, { once: true });
|
|
12735
12775
|
}));
|
|
12736
12776
|
const outcome = guards.length ? await Promise.race([request3, ...guards]) : await request3;
|
|
12777
|
+
primaryElapsedMs = Date.now() - compactionT0;
|
|
12737
12778
|
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
12738
12779
|
if (abortListener) args2.abortSignal?.removeEventListener("abort", abortListener);
|
|
12739
12780
|
if (outcome.kind !== "done") {
|
|
@@ -12747,6 +12788,7 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12747
12788
|
console.warn(
|
|
12748
12789
|
"[localLoop] auto-compaction produced empty summary; keeping prior projection"
|
|
12749
12790
|
);
|
|
12791
|
+
logCompactionTiming("empty", {});
|
|
12750
12792
|
const failureReason = "provider-error";
|
|
12751
12793
|
emitPhase({ kind: "compaction-failed", reason: failureReason });
|
|
12752
12794
|
return {
|
|
@@ -12760,6 +12802,7 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12760
12802
|
}
|
|
12761
12803
|
};
|
|
12762
12804
|
}
|
|
12805
|
+
const saveT0 = Date.now();
|
|
12763
12806
|
await adapter.saveDialogSummary({
|
|
12764
12807
|
dialogId,
|
|
12765
12808
|
summary: newSummary,
|
|
@@ -12773,6 +12816,7 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12773
12816
|
})(),
|
|
12774
12817
|
schemaVersion: COMPACTION_SUMMARY_SCHEMA_VERSION
|
|
12775
12818
|
});
|
|
12819
|
+
saveElapsedMs = Date.now() - saveT0;
|
|
12776
12820
|
const metricsReason = invalidSummary ? "invalid_summary" : coldResume ? "cold_resume" : "context_budget";
|
|
12777
12821
|
const metrics = buildCompactionMetricsFromPlan({
|
|
12778
12822
|
reason: metricsReason,
|
|
@@ -12782,6 +12826,10 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12782
12826
|
summaryUsage: result4.usage
|
|
12783
12827
|
});
|
|
12784
12828
|
console.log(formatCompactionMetricsLog(metrics));
|
|
12829
|
+
logCompactionTiming("success", {
|
|
12830
|
+
model: result4?.model ?? args2.model ?? null,
|
|
12831
|
+
outputChars: newSummary.length
|
|
12832
|
+
});
|
|
12785
12833
|
emitPhase({ kind: "compaction-end" });
|
|
12786
12834
|
return {
|
|
12787
12835
|
history: projectHistoryWithSummary({
|
|
@@ -12811,6 +12859,7 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
12811
12859
|
console.warn("[localLoop] auto-compaction failed:", error);
|
|
12812
12860
|
const failureMessage = error instanceof Error && error.message ? error.message.slice(0, 200) : String(error).slice(0, 200);
|
|
12813
12861
|
const failureReason = error instanceof Error && "compactionReason" in error ? error.compactionReason : "provider-error";
|
|
12862
|
+
logCompactionTiming(failureReason, {});
|
|
12814
12863
|
emitPhase({ kind: "compaction-failed", reason: failureReason });
|
|
12815
12864
|
return {
|
|
12816
12865
|
...projectExisting(),
|
|
@@ -19997,7 +20046,7 @@ function buildLoadSkillExecutor(args2) {
|
|
|
19997
20046
|
const { resolveSkillByName } = await import("./skillDiscovery-ZBU76COE.js");
|
|
19998
20047
|
const resolved = resolveSkillByName(args2.cwd, name);
|
|
19999
20048
|
if (!resolved) {
|
|
20000
|
-
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-
|
|
20049
|
+
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-GFY77VRN.js");
|
|
20001
20050
|
const builtin = resolveBuiltinSkillByName(name);
|
|
20002
20051
|
if (builtin) {
|
|
20003
20052
|
return {
|
|
@@ -20075,7 +20124,7 @@ function resolveSessionKey(args2) {
|
|
|
20075
20124
|
}
|
|
20076
20125
|
|
|
20077
20126
|
// packages/agent-runtime/devin/devinProvider.ts
|
|
20078
|
-
import { randomBytes, randomUUID } from "node:crypto";
|
|
20127
|
+
import { randomBytes, randomUUID as randomUUID2 } from "node:crypto";
|
|
20079
20128
|
var CLIENT_NAME = "chisel";
|
|
20080
20129
|
var CLIENT_VERSION = "3000.11.3";
|
|
20081
20130
|
function writeVarint(fieldNum, value) {
|
|
@@ -20135,7 +20184,7 @@ function encodeDevinClientMetadata(token) {
|
|
|
20135
20184
|
]);
|
|
20136
20185
|
}
|
|
20137
20186
|
function devinId(id, purpose) {
|
|
20138
|
-
return id?.sessionKey && isStableSessionIdentityEnabled() ? deriveStableUuid(id.sessionKey, purpose) :
|
|
20187
|
+
return id?.sessionKey && isStableSessionIdentityEnabled() ? deriveStableUuid(id.sessionKey, purpose) : randomUUID2();
|
|
20139
20188
|
}
|
|
20140
20189
|
function encodeDevinChatMessage(msg, identity2, index = 0) {
|
|
20141
20190
|
const source = msg.role === "assistant" ? 2 : msg.role === "tool" ? 4 : 1;
|
|
@@ -20229,7 +20278,7 @@ ${item.text}`;
|
|
|
20229
20278
|
const chatMessageBuffers = coalesced.map((m, i) => encodeDevinChatMessage(m, identity2, i));
|
|
20230
20279
|
const completionConfig = buildCompletionConfig({ temperature });
|
|
20231
20280
|
const modelConfig = Buffer.concat([
|
|
20232
|
-
writeStringField(1,
|
|
20281
|
+
writeStringField(1, randomUUID2()),
|
|
20233
20282
|
writeVarint(2, 1),
|
|
20234
20283
|
writeVarint(3, 4)
|
|
20235
20284
|
]);
|
|
@@ -20241,7 +20290,7 @@ ${item.text}`;
|
|
|
20241
20290
|
writeMessageField(8, completionConfig),
|
|
20242
20291
|
...tools.map((tool) => writeMessageField(10, encodeDevinToolDefinition(tool))),
|
|
20243
20292
|
writeMessageField(15, modelConfig),
|
|
20244
|
-
writeStringField(16,
|
|
20293
|
+
writeStringField(16, randomUUID2()),
|
|
20245
20294
|
writeVarint(20, 1),
|
|
20246
20295
|
writeStringField(21, model)
|
|
20247
20296
|
]);
|