nolo-cli 0.31.0-alpha.9 → 0.32.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.
- package/{_executeModel-6FRIQJJC.js → _executeModel-LTMSIBS4.js} +14 -14
- package/{agentDeleteCommand-MD3266WY.js → agentDeleteCommand-D3MYZK6E.js} +11 -11
- package/{agentEmailCommands-P4Z57QRY.js → agentEmailCommands-6BXS574I.js} +16 -16
- package/{agentListCommands-S4J6EYVS.js → agentListCommands-SF3HEUTT.js} +13 -13
- package/{agentMachineCommands-IMWA26SD.js → agentMachineCommands-YARVXRR6.js} +11 -11
- package/{agentRecordCommands-KEA6IXKP.js → agentRecordCommands-JFZRQJQ4.js} +16 -16
- package/{agentRunCommand-JECNTAJA.js → agentRunCommand-NOX5FLKO.js} +16 -16
- package/{agentRuntimeLocal-HKJKTCW4.js → agentRuntimeLocal-ATGJY6WC.js} +8 -8
- package/{agentSlice-7ELXNOJA.js → agentSlice-4XWW344Y.js} +1 -1
- package/{appDeleteCommands-EZRWLQSL.js → appDeleteCommands-63JO7RXS.js} +12 -12
- package/{appDeployCommands-G3JQ5UXL.js → appDeployCommands-Y7EWYUGM.js} +12 -12
- package/{appDeployStatusCommands-ZADWE6HA.js → appDeployStatusCommands-ZBEY3DWB.js} +12 -12
- package/{appGetCommands-G6YN7F2Z.js → appGetCommands-QSSOSEYL.js} +12 -12
- package/{appListCommands-E3TGPLEB.js → appListCommands-PH3XWNDX.js} +12 -12
- package/{chunk-GPKB5TIJ.js → chunk-2HXKAPH7.js} +2 -2
- package/{chunk-PKB24CKO.js → chunk-2ZRP5RUG.js} +4 -4
- package/{chunk-2UFKPJJI.js → chunk-3FCNXC2J.js} +2 -2
- package/{chunk-OYACR5WZ.js → chunk-3GZT3L6F.js} +8 -8
- package/{chunk-7I44EILD.js → chunk-3UGKATZQ.js} +2 -2
- package/{chunk-ILQALSPF.js → chunk-4PNU7W7K.js} +7 -7
- package/{chunk-WCZ6NCQN.js → chunk-AYMOSAHE.js} +8 -10
- package/{chunk-THJJUY7I.js → chunk-D2BPX6DQ.js} +3 -3
- package/{chunk-2UX66SH3.js → chunk-DLWCWUNW.js} +3 -3
- package/{chunk-JNU5ISIG.js → chunk-EEF23OOK.js} +2 -2
- package/{chunk-CNTHYPHP.js → chunk-GAF5X6B7.js} +96 -144
- package/{chunk-5LZTGR74.js → chunk-MITD7CON.js} +9 -9
- package/{chunk-ZW6KKTYZ.js → chunk-O3JR45Q2.js} +8 -8
- package/{chunk-RZN2YWPC.js → chunk-O5OMJPPF.js} +3 -3
- package/{chunk-AROB24VV.js → chunk-ODS2MVMU.js} +3 -3
- package/{chunk-ZLMXXZVX.js → chunk-OWHNFZNW.js} +1 -1
- package/{chunk-Q6U2SGFX.js → chunk-Q76I4SXI.js} +1 -1
- package/{chunk-VQREJRUO.js → chunk-RH53LMEJ.js} +2 -2
- package/{chunk-OFGTZ35R.js → chunk-RXVX5LFR.js} +1 -1
- package/{chunk-3K55GMMW.js → chunk-TA6EA2A3.js} +2 -2
- package/{chunk-Z6V33HCT.js → chunk-TEYN42N3.js} +1 -1
- package/{chunk-NXLUGU6X.js → chunk-UOJRKY5J.js} +2 -2
- package/{chunk-7RP2PSIN.js → chunk-V42OE5HT.js} +1 -1
- package/{chunk-AWKR4MMR.js → chunk-VVEH6XUE.js} +1 -1
- package/{chunk-TVBDE6LJ.js → chunk-W367V5CH.js} +5 -5
- package/{chunk-NBWOCRU3.js → chunk-XDHHF73Q.js} +1 -1
- package/{createAgentAutomationAction-ZLJRVATF.js → createAgentAutomationAction-WLRNE7C4.js} +3 -3
- package/{createDialogAction-CFYGC6NF.js → createDialogAction-Y6YV64QB.js} +4 -4
- package/{createPageAction-Y2H5GYJU.js → createPageAction-7YROVZ3W.js} +3 -3
- package/{dialogCommands-4DYAWH6L.js → dialogCommands-XLO5CAHZ.js} +12 -12
- package/{dialogSlice-23SPNP3O.js → dialogSlice-N4HPG6HM.js} +2 -2
- package/{docCreateCommands-OXEKIA6S.js → docCreateCommands-GRA5BHSA.js} +11 -11
- package/{docDeleteCommands-P3PR6NS7.js → docDeleteCommands-ONIJM5MD.js} +12 -12
- package/{docReadCommands-MS2WXJIA.js → docReadCommands-H55VQ2US.js} +11 -11
- package/{docStore-2DWKYPQO.js → docStore-B5AHDNW5.js} +4 -4
- package/{docUpdateCommands-N54A2KBE.js → docUpdateCommands-ZQIQVGC2.js} +11 -11
- package/{handleSendMessageAction-RL25MK5X.js → handleSendMessageAction-IN5XX5U7.js} +2 -2
- package/index.js +40 -40
- package/{machineCommands-DVMG4LQ2.js → machineCommands-H3UMKE76.js} +15 -15
- package/{machineWsRunDispatch-5R4FV3HQ.js → machineWsRunDispatch-HONRUK3R.js} +15 -15
- package/package.json +1 -1
- package/{readlineWorkspace-3BJXQE3S.js → readlineWorkspace-XVJZDCSC.js} +19 -19
- package/{runAgentClientLoop-GNDHLSYM.js → runAgentClientLoop-H7U53QB6.js} +11 -11
- package/{spaceCommands-BXG3LHG4.js → spaceCommands-7VVKJBDV.js} +11 -11
- package/{spaceSlice-4JKOTPHQ.js → spaceSlice-T6YK6D34.js} +3 -3
- package/{streamAgentChatTurn-VJ4JB3MV.js → streamAgentChatTurn-RQ63QFQ7.js} +13 -13
- package/{tools-ISIPHXWB.js → tools-KYZX3BGO.js} +8 -8
- package/{updateDialogTitleAction-HRSMYRLK.js → updateDialogTitleAction-BBDSWHNG.js} +3 -3
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-Q3CSL43H.js";
|
|
28
28
|
import {
|
|
29
29
|
buildLocalAgentLookupKeys
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VVEH6XUE.js";
|
|
31
31
|
import {
|
|
32
32
|
LOCAL_CODEX_AGENT_ID,
|
|
33
33
|
LOCAL_CODEX_AGENT_KEY,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
readOpenAiCompatibleSseCompletion,
|
|
55
55
|
resolveAgentNextAvailableAt,
|
|
56
56
|
resolveOpenAiCompatibleProviderConfig
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DLWCWUNW.js";
|
|
58
58
|
import {
|
|
59
59
|
buildPlatformChatCompletionRequest,
|
|
60
60
|
canUsePlatformChatProvider,
|
|
@@ -74,12 +74,12 @@ import {
|
|
|
74
74
|
import {
|
|
75
75
|
inlineImageUrlsForCustomProvider,
|
|
76
76
|
prepareTools
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-XDHHF73Q.js";
|
|
78
78
|
import {
|
|
79
79
|
inferCaptureIntent,
|
|
80
80
|
resolveHistoricalToolContentCap,
|
|
81
81
|
summarizeToolArguments
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-AYMOSAHE.js";
|
|
83
83
|
import {
|
|
84
84
|
getAntigravityUserAgent,
|
|
85
85
|
isAntigravityOAuthAgent,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
readXhsProfileFunctionSchema,
|
|
105
105
|
rememberMemoryFunctionSchema,
|
|
106
106
|
setTodoListFunc
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-MITD7CON.js";
|
|
108
108
|
import {
|
|
109
109
|
createDrainExhaustedResponse,
|
|
110
110
|
isCoreDrainingBody,
|
|
@@ -128,13 +128,13 @@ import {
|
|
|
128
128
|
parseNoloWorkspaceToolArguments,
|
|
129
129
|
resolveAgentRequiredPackIds,
|
|
130
130
|
resolveRuntimeToolSurfaceForAgent
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-D2BPX6DQ.js";
|
|
132
132
|
import {
|
|
133
133
|
applyTokenUsageToDayStats,
|
|
134
134
|
prepareTokenUsageData,
|
|
135
135
|
resolveBuiltinPlatformAgentConfig,
|
|
136
136
|
runKeyed
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-3GZT3L6F.js";
|
|
138
138
|
import {
|
|
139
139
|
BUILTIN_TITLE_LLM_CONFIG,
|
|
140
140
|
clipCompactText
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
resolveCurrentRunRuntimeToolPolicy,
|
|
146
146
|
resolveLocalWorkspaceExecutorOptionsFromPolicy,
|
|
147
147
|
resolveRequestedRuntimeToolNames
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-ODS2MVMU.js";
|
|
149
149
|
import {
|
|
150
150
|
createOAuthTokenStore,
|
|
151
151
|
isTokenExpired,
|
|
@@ -10622,62 +10622,8 @@ function isRemoteAuthEndpoint(endpoint) {
|
|
|
10622
10622
|
return false;
|
|
10623
10623
|
}
|
|
10624
10624
|
|
|
10625
|
-
// packages/core/concurrencyLimiter.ts
|
|
10626
|
-
function createConcurrencyLimiter(maxConcurrent) {
|
|
10627
|
-
if (!Number.isInteger(maxConcurrent) || maxConcurrent < 1) {
|
|
10628
|
-
throw new RangeError("maxConcurrent must be a positive integer");
|
|
10629
|
-
}
|
|
10630
|
-
let active = 0;
|
|
10631
|
-
const pending = [];
|
|
10632
|
-
function drain() {
|
|
10633
|
-
while (active < maxConcurrent && pending.length > 0) {
|
|
10634
|
-
const entry = pending.shift();
|
|
10635
|
-
active += 1;
|
|
10636
|
-
Promise.resolve().then(() => entry.task()).then(
|
|
10637
|
-
(value) => entry.resolve(value),
|
|
10638
|
-
(error) => entry.reject(error)
|
|
10639
|
-
).finally(() => {
|
|
10640
|
-
active -= 1;
|
|
10641
|
-
drain();
|
|
10642
|
-
});
|
|
10643
|
-
}
|
|
10644
|
-
}
|
|
10645
|
-
return {
|
|
10646
|
-
run(task) {
|
|
10647
|
-
return new Promise((resolve, reject) => {
|
|
10648
|
-
pending.push({ task, resolve, reject });
|
|
10649
|
-
drain();
|
|
10650
|
-
});
|
|
10651
|
-
},
|
|
10652
|
-
get activeCount() {
|
|
10653
|
-
return active;
|
|
10654
|
-
},
|
|
10655
|
-
get pendingCount() {
|
|
10656
|
-
return pending.length;
|
|
10657
|
-
}
|
|
10658
|
-
};
|
|
10659
|
-
}
|
|
10660
|
-
|
|
10661
10625
|
// packages/cli/client/localRuntimeDialog.ts
|
|
10662
10626
|
var import_date_fns = __toESM(require_date_fns(), 1);
|
|
10663
|
-
var MAX_TITLE_PATCH_CONCURRENT = 2;
|
|
10664
|
-
var MAX_REMOTE_SYNC_CONCURRENT = 3;
|
|
10665
|
-
var titlePatchLimiter = createConcurrencyLimiter(MAX_TITLE_PATCH_CONCURRENT);
|
|
10666
|
-
var remoteSyncLimiter = createConcurrencyLimiter(MAX_REMOTE_SYNC_CONCURRENT);
|
|
10667
|
-
function createPerfTracker(env) {
|
|
10668
|
-
const enabled = env?.NOLO_CLI_PERF === "1";
|
|
10669
|
-
const t0 = enabled ? performance.now() : 0;
|
|
10670
|
-
return {
|
|
10671
|
-
enabled,
|
|
10672
|
-
mark(label, since) {
|
|
10673
|
-
if (!enabled) return;
|
|
10674
|
-
const ms = (performance.now() - (since ?? t0)).toFixed(1);
|
|
10675
|
-
process.stderr.write(`[nolo-perf] writeDialog ${label}: ${ms}ms
|
|
10676
|
-
`);
|
|
10677
|
-
},
|
|
10678
|
-
t0
|
|
10679
|
-
};
|
|
10680
|
-
}
|
|
10681
10627
|
async function resolveStore(deps) {
|
|
10682
10628
|
if (deps.store) return deps.store;
|
|
10683
10629
|
return createCliHybridRecordStore({
|
|
@@ -10742,66 +10688,6 @@ function createLocalDialogTitleGenerator(deps, ctx) {
|
|
|
10742
10688
|
return result.source === "llm" ? result.title : null;
|
|
10743
10689
|
};
|
|
10744
10690
|
}
|
|
10745
|
-
function patchDialogTitleInBackground(args) {
|
|
10746
|
-
return args.titlePromise.then(async (resolvedTitle) => {
|
|
10747
|
-
if (!resolvedTitle) return;
|
|
10748
|
-
const limiter = args.limiter ?? titlePatchLimiter;
|
|
10749
|
-
await limiter.run(async () => {
|
|
10750
|
-
try {
|
|
10751
|
-
const existing = await args.store.read(args.dialogKey);
|
|
10752
|
-
if (!existing || typeof existing !== "object") return;
|
|
10753
|
-
if (existing?.titleSource === "manual") return;
|
|
10754
|
-
const existingTitleUpdatedAtMs = parseTitleUpdatedAtMs(existing);
|
|
10755
|
-
if (existingTitleUpdatedAtMs > args.nowMs) return;
|
|
10756
|
-
await args.store.write(args.dialogKey, {
|
|
10757
|
-
...existing,
|
|
10758
|
-
title: resolvedTitle,
|
|
10759
|
-
titleSource: "auto",
|
|
10760
|
-
titleUpdatedAt: new Date(args.nowMs).toISOString()
|
|
10761
|
-
});
|
|
10762
|
-
} catch {
|
|
10763
|
-
}
|
|
10764
|
-
});
|
|
10765
|
-
});
|
|
10766
|
-
}
|
|
10767
|
-
function syncDialogEvidence(args) {
|
|
10768
|
-
const syncArgs = {
|
|
10769
|
-
env: args.env,
|
|
10770
|
-
fetchImpl: args.fetchImpl,
|
|
10771
|
-
input: args.input,
|
|
10772
|
-
ops: args.ops,
|
|
10773
|
-
output: args.output,
|
|
10774
|
-
userId: args.userId
|
|
10775
|
-
};
|
|
10776
|
-
if (args.hasSubjectRefs) {
|
|
10777
|
-
return (async () => {
|
|
10778
|
-
const syncResult = await syncLocalDialogEvidenceToRemote(syncArgs);
|
|
10779
|
-
if (!syncResult.attempted) {
|
|
10780
|
-
args.output?.write(
|
|
10781
|
-
"[nolo] Local dialog evidence is local-only; set NOLO_SERVER and AUTH_TOKEN to make subjectRefs remotely queryable.\n"
|
|
10782
|
-
);
|
|
10783
|
-
}
|
|
10784
|
-
})();
|
|
10785
|
-
}
|
|
10786
|
-
const limiter = args.limiter ?? remoteSyncLimiter;
|
|
10787
|
-
return limiter.run(() => syncLocalDialogEvidenceToRemote(syncArgs)).catch((error) => {
|
|
10788
|
-
args.output?.write(
|
|
10789
|
-
`[nolo] Remote dialog evidence sync failed; local dialog only: ${toErrorMessage(error)}
|
|
10790
|
-
`
|
|
10791
|
-
);
|
|
10792
|
-
});
|
|
10793
|
-
}
|
|
10794
|
-
function shouldRegenerateTitle(existingDialog, nowMs) {
|
|
10795
|
-
const existingTitle = typeof existingDialog?.title === "string" ? existingDialog.title.trim() : "";
|
|
10796
|
-
const existingTitleSource = existingDialog?.titleSource;
|
|
10797
|
-
if (existingTitleSource === "manual") return false;
|
|
10798
|
-
if (!existingTitle) return true;
|
|
10799
|
-
const titleUpdatedAtMs = parseTitleUpdatedAtMs(existingDialog);
|
|
10800
|
-
if (titleUpdatedAtMs > 0) {
|
|
10801
|
-
return nowMs - titleUpdatedAtMs >= 30 * 60 * 1e3;
|
|
10802
|
-
}
|
|
10803
|
-
return false;
|
|
10804
|
-
}
|
|
10805
10691
|
async function writeLocalTokenRecord(args) {
|
|
10806
10692
|
const usageRecords = args.input.usageRecords?.length ? args.input.usageRecords : args.input.result.usage ? [{
|
|
10807
10693
|
callId: typeof args.input.result.usage?.provider_call_id === "string" && args.input.result.usage.provider_call_id.trim() ? args.input.result.usage.provider_call_id.trim() : args.createId(),
|
|
@@ -10870,15 +10756,36 @@ async function writeLocalTokenRecord(args) {
|
|
|
10870
10756
|
return ops;
|
|
10871
10757
|
}
|
|
10872
10758
|
async function writeDialog(args) {
|
|
10873
|
-
const
|
|
10759
|
+
const __perfEnabled = args.env?.NOLO_CLI_PERF === "1";
|
|
10760
|
+
const __perfT0 = __perfEnabled ? performance.now() : 0;
|
|
10874
10761
|
let existingDialog = null;
|
|
10875
10762
|
if (args.input.continueDialogId) {
|
|
10876
10763
|
const dialogKey = `dialog-${args.userId}-${args.input.continueDialogId}`;
|
|
10877
|
-
existingDialog = await args.store.read(dialogKey
|
|
10764
|
+
existingDialog = await args.store.read(dialogKey);
|
|
10765
|
+
}
|
|
10766
|
+
if (__perfEnabled) {
|
|
10767
|
+
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
10768
|
+
process.stderr.write(`[nolo-perf] writeDialog A:read-dialog: ${ms}ms
|
|
10769
|
+
`);
|
|
10878
10770
|
}
|
|
10879
|
-
perf.mark("A:read-dialog");
|
|
10880
10771
|
const nowMs = args.now();
|
|
10881
|
-
const
|
|
10772
|
+
const existingTitle = typeof existingDialog?.title === "string" ? existingDialog.title.trim() : "";
|
|
10773
|
+
const existingTitleSource = existingDialog?.titleSource;
|
|
10774
|
+
let needsTitleUpdate = false;
|
|
10775
|
+
if (existingTitleSource === "manual") {
|
|
10776
|
+
needsTitleUpdate = false;
|
|
10777
|
+
} else if (!existingTitle) {
|
|
10778
|
+
needsTitleUpdate = true;
|
|
10779
|
+
} else {
|
|
10780
|
+
const titleUpdatedAtMs = parseTitleUpdatedAtMs(existingDialog);
|
|
10781
|
+
if (titleUpdatedAtMs > 0) {
|
|
10782
|
+
if (nowMs - titleUpdatedAtMs >= 30 * 60 * 1e3) {
|
|
10783
|
+
needsTitleUpdate = true;
|
|
10784
|
+
}
|
|
10785
|
+
} else {
|
|
10786
|
+
needsTitleUpdate = false;
|
|
10787
|
+
}
|
|
10788
|
+
}
|
|
10882
10789
|
let titlePromise;
|
|
10883
10790
|
if (needsTitleUpdate && args.titleGenerator) {
|
|
10884
10791
|
const rawLastUserText = extractLastUserText(args.input.messages);
|
|
@@ -10894,7 +10801,11 @@ async function writeDialog(args) {
|
|
|
10894
10801
|
cwd: args.cwd
|
|
10895
10802
|
});
|
|
10896
10803
|
await args.store.batch(plan.ops);
|
|
10897
|
-
|
|
10804
|
+
if (__perfEnabled) {
|
|
10805
|
+
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
10806
|
+
process.stderr.write(`[nolo-perf] writeDialog C:store-batch (cumulative): ${ms}ms
|
|
10807
|
+
`);
|
|
10808
|
+
}
|
|
10898
10809
|
let tokenOps = [];
|
|
10899
10810
|
try {
|
|
10900
10811
|
tokenOps = await writeLocalTokenRecord({
|
|
@@ -10912,33 +10823,74 @@ async function writeDialog(args) {
|
|
|
10912
10823
|
`
|
|
10913
10824
|
);
|
|
10914
10825
|
}
|
|
10915
|
-
|
|
10826
|
+
if (__perfEnabled) {
|
|
10827
|
+
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
10828
|
+
process.stderr.write(`[nolo-perf] writeDialog D:token-record (cumulative): ${ms}ms
|
|
10829
|
+
`);
|
|
10830
|
+
}
|
|
10916
10831
|
const hasSubjectRefs = localTurnHasSubjectRefs(args.input);
|
|
10917
10832
|
const isLocalUser = args.userId === "local";
|
|
10918
10833
|
let remoteSyncPromise;
|
|
10919
10834
|
if (!isLocalUser) {
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10835
|
+
if (hasSubjectRefs) {
|
|
10836
|
+
remoteSyncPromise = (async () => {
|
|
10837
|
+
const syncResult = await syncLocalDialogEvidenceToRemote({
|
|
10838
|
+
env: args.env,
|
|
10839
|
+
fetchImpl: args.fetchImpl,
|
|
10840
|
+
input: args.input,
|
|
10841
|
+
ops: [...plan.ops, ...tokenOps],
|
|
10842
|
+
output: args.output,
|
|
10843
|
+
userId: args.userId
|
|
10844
|
+
});
|
|
10845
|
+
if (!syncResult.attempted) {
|
|
10846
|
+
args.output?.write(
|
|
10847
|
+
"[nolo] Local dialog evidence is local-only; set NOLO_SERVER and AUTH_TOKEN to make subjectRefs remotely queryable.\n"
|
|
10848
|
+
);
|
|
10849
|
+
}
|
|
10850
|
+
})();
|
|
10851
|
+
await remoteSyncPromise;
|
|
10852
|
+
} else {
|
|
10853
|
+
remoteSyncPromise = syncLocalDialogEvidenceToRemote({
|
|
10854
|
+
env: args.env,
|
|
10855
|
+
fetchImpl: args.fetchImpl,
|
|
10856
|
+
input: args.input,
|
|
10857
|
+
ops: [...plan.ops, ...tokenOps],
|
|
10858
|
+
output: args.output,
|
|
10859
|
+
userId: args.userId
|
|
10860
|
+
}).catch((error) => {
|
|
10861
|
+
args.output?.write(
|
|
10862
|
+
`[nolo] Remote dialog evidence sync failed; local dialog only: ${toErrorMessage(error)}
|
|
10863
|
+
`
|
|
10864
|
+
);
|
|
10865
|
+
});
|
|
10866
|
+
}
|
|
10930
10867
|
}
|
|
10931
10868
|
let titlePatchPromise;
|
|
10932
10869
|
if (titlePromise) {
|
|
10933
10870
|
const dialogKey = `dialog-${args.userId}-${plan.dialogId}`;
|
|
10934
|
-
titlePatchPromise =
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10871
|
+
titlePatchPromise = titlePromise.then(async (resolvedTitle) => {
|
|
10872
|
+
if (!resolvedTitle) return;
|
|
10873
|
+
try {
|
|
10874
|
+
const existing = await args.store.read(dialogKey);
|
|
10875
|
+
if (!existing || typeof existing !== "object") return;
|
|
10876
|
+
if (existing?.titleSource === "manual") return;
|
|
10877
|
+
const existingTitleUpdatedAtMs = parseTitleUpdatedAtMs(existing);
|
|
10878
|
+
if (existingTitleUpdatedAtMs > nowMs) return;
|
|
10879
|
+
await args.store.write(dialogKey, {
|
|
10880
|
+
...existing,
|
|
10881
|
+
title: resolvedTitle,
|
|
10882
|
+
titleSource: "auto",
|
|
10883
|
+
titleUpdatedAt: new Date(nowMs).toISOString()
|
|
10884
|
+
});
|
|
10885
|
+
} catch {
|
|
10886
|
+
}
|
|
10939
10887
|
});
|
|
10940
10888
|
}
|
|
10941
|
-
|
|
10889
|
+
if (__perfEnabled) {
|
|
10890
|
+
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
10891
|
+
process.stderr.write(`[nolo-perf] writeDialog total (blocking): ${ms}ms
|
|
10892
|
+
`);
|
|
10893
|
+
}
|
|
10942
10894
|
return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise };
|
|
10943
10895
|
}
|
|
10944
10896
|
function resolveCliDialogRecordKey(userId, dialogId) {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
sortSafeAgentSummaries,
|
|
19
19
|
toSafeAgentSummary
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TEYN42N3.js";
|
|
21
21
|
import {
|
|
22
22
|
getUserDataItemTimestamp,
|
|
23
23
|
mergeAndDedupUserData
|
|
@@ -43,10 +43,10 @@ import {
|
|
|
43
43
|
resolveNoloDialogInput,
|
|
44
44
|
toolRunUpdated,
|
|
45
45
|
verifyNoloDialogSubjectRefQuery
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-D2BPX6DQ.js";
|
|
47
47
|
import {
|
|
48
48
|
createDocState
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-EEF23OOK.js";
|
|
50
50
|
import {
|
|
51
51
|
setDialogExtraReferencesAction
|
|
52
52
|
} from "./chunk-43EPBPZ2.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
} from "./chunk-44HACRCK.js";
|
|
70
70
|
import {
|
|
71
71
|
createDialogAction
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-TA6EA2A3.js";
|
|
73
73
|
import {
|
|
74
74
|
markdownToSlate
|
|
75
75
|
} from "./chunk-3LY4F7SV.js";
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
selectCurrentSpaceId,
|
|
90
90
|
updateContentCategory,
|
|
91
91
|
updateContentTitle
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-3FCNXC2J.js";
|
|
93
93
|
import {
|
|
94
94
|
incrementFailedSteps,
|
|
95
95
|
incrementStepsExecuted,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
uiAskChoiceFunc,
|
|
104
104
|
uiAskChoiceFunctionSchema,
|
|
105
105
|
updateStep
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-3GZT3L6F.js";
|
|
107
107
|
import {
|
|
108
108
|
buildDatabaseFileContentUrl
|
|
109
109
|
} from "./chunk-BGTUGS3T.js";
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
runLlm,
|
|
113
113
|
streamAgentChatTurn,
|
|
114
114
|
updateAgent
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-ODS2MVMU.js";
|
|
116
116
|
import {
|
|
117
117
|
toErrorMessage
|
|
118
118
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -13929,7 +13929,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
13929
13929
|
const deletedDialogIds = [];
|
|
13930
13930
|
const deletedDialogKeys = [];
|
|
13931
13931
|
const failures = [];
|
|
13932
|
-
const { deleteDialog } = await import("./dialogSlice-
|
|
13932
|
+
const { deleteDialog } = await import("./dialogSlice-N4HPG6HM.js");
|
|
13933
13933
|
for (const target of targets) {
|
|
13934
13934
|
try {
|
|
13935
13935
|
await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
|
|
@@ -25684,7 +25684,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
25684
25684
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
25685
25685
|
};
|
|
25686
25686
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
25687
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
25687
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-B5AHDNW5.js");
|
|
25688
25688
|
if (getDocState().pageKey === id) {
|
|
25689
25689
|
applyExternalDocUpdate({
|
|
25690
25690
|
slateData: finalSlateData,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XDHHF73Q.js";
|
|
9
9
|
import {
|
|
10
10
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AYMOSAHE.js";
|
|
12
12
|
import {
|
|
13
13
|
accumulateToolCallDelta,
|
|
14
14
|
createThinkParserState,
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
} from "./chunk-N7J63Q6C.js";
|
|
21
21
|
import {
|
|
22
22
|
performFetchRequest
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-W367V5CH.js";
|
|
24
24
|
import {
|
|
25
25
|
createSSEParser,
|
|
26
26
|
findToolExecutor,
|
|
27
27
|
toolDefinitionsByName
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MITD7CON.js";
|
|
29
29
|
import {
|
|
30
30
|
createToolRunId,
|
|
31
31
|
getToolResultErrorData,
|
|
@@ -33,23 +33,23 @@ import {
|
|
|
33
33
|
toolRunSetPending,
|
|
34
34
|
toolRunStarted,
|
|
35
35
|
toolRunSucceeded
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-D2BPX6DQ.js";
|
|
37
37
|
import {
|
|
38
38
|
getPublicImageAgentMode
|
|
39
39
|
} from "./chunk-E3APEOIM.js";
|
|
40
40
|
import {
|
|
41
41
|
selectCurrentSpaceId
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-3FCNXC2J.js";
|
|
43
43
|
import {
|
|
44
44
|
addToolMessage,
|
|
45
45
|
getModelInfo,
|
|
46
46
|
messageStreamEnd,
|
|
47
47
|
messageStreaming,
|
|
48
48
|
updateToolMessage
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-3GZT3L6F.js";
|
|
50
50
|
import {
|
|
51
51
|
streamAgentChatTurn
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-ODS2MVMU.js";
|
|
53
53
|
import {
|
|
54
54
|
toErrorMessage
|
|
55
55
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q76I4SXI.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V42OE5HT.js";
|
|
8
8
|
import {
|
|
9
9
|
toSafeAgentSummary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TEYN42N3.js";
|
|
11
11
|
import {
|
|
12
12
|
PUBLIC_AGENT_KEY_PREFIX,
|
|
13
13
|
isOwnedAgentKey,
|
|
@@ -583,7 +583,7 @@ var slice = createSliceWithThunks({
|
|
|
583
583
|
const overrides = {};
|
|
584
584
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
585
585
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
586
|
-
const { _executeModel } = await import("./_executeModel-
|
|
586
|
+
const { _executeModel } = await import("./_executeModel-LTMSIBS4.js");
|
|
587
587
|
return _executeModel(
|
|
588
588
|
{
|
|
589
589
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -604,7 +604,7 @@ var slice = createSliceWithThunks({
|
|
|
604
604
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
605
605
|
*/
|
|
606
606
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
607
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
607
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-H7U53QB6.js");
|
|
608
608
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
609
609
|
{
|
|
610
610
|
agentKey: args.agentKey,
|
|
@@ -620,7 +620,7 @@ var slice = createSliceWithThunks({
|
|
|
620
620
|
* 聊天轮次流式 Agent 调用
|
|
621
621
|
*/
|
|
622
622
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
623
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
623
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-RQ63QFQ7.js");
|
|
624
624
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
625
625
|
}),
|
|
626
626
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveReferenceAssets
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W367V5CH.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchReferenceContents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3UGKATZQ.js";
|
|
7
7
|
|
|
8
8
|
// packages/ai/agent/fetchAgentContexts.ts
|
|
9
9
|
async function fetchAgentContexts(references, dispatch) {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-DCDL3GC4.js";
|
|
4
4
|
import {
|
|
5
5
|
addContentToSpace
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3FCNXC2J.js";
|
|
7
7
|
import {
|
|
8
8
|
prepareAndPersistMessage,
|
|
9
9
|
uiAskChoiceFunc,
|
|
10
10
|
uiAskChoiceFunctionSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3GZT3L6F.js";
|
|
12
12
|
import {
|
|
13
13
|
require_date_fns
|
|
14
14
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q76I4SXI.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3GZT3L6F.js";
|
|
15
15
|
import {
|
|
16
16
|
toErrorMessage
|
|
17
17
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
requiresBareImageUrl,
|
|
10
10
|
resolveToolGuidedSections,
|
|
11
11
|
toBareImageUrlMessages
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3UGKATZQ.js";
|
|
13
13
|
import {
|
|
14
14
|
convertMessagesToResponsesInput,
|
|
15
15
|
preserveAgentStateFields
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-XFG3BAKN.js";
|
|
27
27
|
import {
|
|
28
28
|
waitForAbortableDelay
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MITD7CON.js";
|
|
30
30
|
import {
|
|
31
31
|
createDrainExhaustedResponse,
|
|
32
32
|
isCoreDrainingBody,
|
|
@@ -36,17 +36,17 @@ import {
|
|
|
36
36
|
} from "./chunk-Z5MXSEOJ.js";
|
|
37
37
|
import {
|
|
38
38
|
resolveBuiltinSkillPage
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-D2BPX6DQ.js";
|
|
40
40
|
import {
|
|
41
41
|
shouldUseServerProxy
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-3GZT3L6F.js";
|
|
43
43
|
import {
|
|
44
44
|
estimateTokenCount
|
|
45
45
|
} from "./chunk-BGTUGS3T.js";
|
|
46
46
|
import {
|
|
47
47
|
createFileCredentialBroker,
|
|
48
48
|
fetchServerSyncedCredential
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-ODS2MVMU.js";
|
|
50
50
|
import {
|
|
51
51
|
toErrorMessage
|
|
52
52
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3FCNXC2J.js";
|
|
4
|
+
import "./chunk-3GZT3L6F.js";
|
|
5
5
|
import "./chunk-BGTUGS3T.js";
|
|
6
6
|
import "./chunk-ATK5WJOA.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ODS2MVMU.js";
|
|
8
8
|
import "./chunk-JZPBVBIY.js";
|
|
9
9
|
import "./chunk-5RGU3J7P.js";
|
|
10
10
|
import "./chunk-M76ECQRD.js";
|