nolo-cli 0.82.0-alpha.5 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/{_executeModel-225YRU52.js → _executeModel-FHVQOYWX.js} +48 -48
- package/{action-D22U6CTH.js → action-YVYQEAAV.js} +11 -11
- package/{addContentAction-XAPUTGL4.js → addContentAction-O7R66HEX.js} +9 -9
- package/{addDialogAgentAction-M7VLLBZM.js → addDialogAgentAction-74OA7KYP.js} +8 -8
- package/{agentDeleteCommand-ZJNQGVR2.js → agentDeleteCommand-4427YKQF.js} +31 -29
- package/{agentEmailCommands-VLVWFWX2.js → agentEmailCommands-LYDIAUOP.js} +67 -63
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-GHQGLAUU.js → agentListCommands-O4AEMQVV.js} +40 -32
- package/{agentMachineCommands-QDXYENZJ.js → agentMachineCommands-F6IHXMPD.js} +31 -29
- package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-GNPTL5XR.js} +87 -0
- package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
- package/agentRecordCommands-BDLFOU7E.js +128 -0
- package/{agentRunCommand-YSCD65HH.js → agentRunCommand-HSSYFGMC.js} +65 -61
- package/{agentRunControl-T44MESII.js → agentRunControl-WCTKX5VL.js} +2 -2
- package/{agentRuntimeLocal-ZOHB7OOO.js → agentRuntimeLocal-IW3IM5P6.js} +27 -25
- package/{agentSlice-O2SBU5TK.js → agentSlice-G54NT6PX.js} +10 -10
- package/{appDeleteCommands-PRT6K5N2.js → appDeleteCommands-ZXLXNRHF.js} +31 -29
- package/{appDeployCommands-63ZONFAN.js → appDeployCommands-PWB4YERK.js} +31 -29
- package/{appDeployStatusCommands-AFAYCVR3.js → appDeployStatusCommands-2EZKZP7Y.js} +31 -29
- package/{appGetCommands-TNZDZE36.js → appGetCommands-JNUKOWHO.js} +31 -29
- package/{appListCommands-IA4SPG2X.js → appListCommands-6X3H67SS.js} +31 -29
- package/{authCommand-EVGFLAHO.js → authCommand-F4EFRRX6.js} +164 -24
- package/{authCommands-ILTBI6JV.js → authCommands-RGOGCPP6.js} +4 -5
- package/builtinSkillRegistry-FUAVTRVZ.js +33 -0
- package/{chatQueueReduxAdapter-4SM3DAWX.js → chatQueueReduxAdapter-VJXYSZ2D.js} +24 -24
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-FZYAU75D.js} +1 -1
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-62P2Q2YB.js} +31 -1
- package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
- package/{chunk-QC5LGHYP.js → chunk-2YMRWISD.js} +10 -5
- package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
- package/{chunk-3QPYFHAH.js → chunk-3DII57IT.js} +1 -1
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-DWUCB2A3.js → chunk-42V6BK2E.js} +1 -1
- package/{chunk-KIS76A2P.js → chunk-4EZHSKTB.js} +38 -4
- package/{chunk-GBPZKFYK.js → chunk-53HEEOTT.js} +4 -4
- package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
- package/chunk-5ZUL4CUO.js +10 -0
- package/{chunk-E6RGHPDR.js → chunk-6D6VBVEW.js} +4 -6
- package/{chunk-CMH2SYHX.js → chunk-6OZ36FXI.js} +2 -2
- package/{chunk-NRALD3CC.js → chunk-76WEAXJB.js} +49 -10
- package/{chunk-3W2JJOH3.js → chunk-7REEVK4I.js} +3 -3
- package/{chunk-BYEJ7K2Z.js → chunk-7S4YWN7P.js} +1 -1
- package/{chunk-SREASRV5.js → chunk-ABQYVJBJ.js} +1 -1
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-XWNRAIUL.js → chunk-AFUORTY4.js} +6 -16
- package/{chunk-E36HZARC.js → chunk-ASQYTZTR.js} +46 -9
- package/{chunk-73IOJLK2.js → chunk-AVV3M6CX.js} +10 -10
- package/{chunk-WL2RKIBF.js → chunk-BLJWCTRL.js} +1 -1
- package/chunk-BNGW5ASC.js +344 -0
- package/{chunk-SZLVDREM.js → chunk-BP4XNZRM.js} +3 -3
- package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
- package/{chunk-MYU3MJCF.js → chunk-DHDMC6FO.js} +175 -7
- package/{chunk-FP27MNSX.js → chunk-DL2LVM5E.js} +3 -3
- package/{chunk-EXMHJN7C.js → chunk-EYAQT56M.js} +4 -3
- package/{chunk-5LSS6MFZ.js → chunk-F5OE5KSJ.js} +13 -15
- package/{chunk-CJCJF5XB.js → chunk-FDTR4QJ6.js} +4 -2
- package/{chunk-NJ6WLAPS.js → chunk-FEEHCOBD.js} +1 -1
- package/{chunk-YSKEOTPH.js → chunk-GGMVRZRO.js} +155 -795
- package/{chunk-PYXL2CJL.js → chunk-GPCZ7UXG.js} +1 -1
- package/{chunk-K7AG465Q.js → chunk-GQBOR3G6.js} +4 -2
- package/{chunk-YFADVSZE.js → chunk-H62HCIUP.js} +6 -6
- package/{chunk-PZM3EENV.js → chunk-HJUYAD4A.js} +1 -1
- package/{chunk-A3NNC2LA.js → chunk-HOBJGHLD.js} +1235 -59
- package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
- package/{chunk-6SD5OPQ4.js → chunk-IIBAPOTQ.js} +11 -173
- package/{chunk-ZVN6I33J.js → chunk-IIVGDG4I.js} +6 -5
- package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
- package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
- package/{chunk-6XIE5ZGI.js → chunk-JPGCXHNM.js} +1 -1
- package/chunk-JRQFUXY7.js +1625 -0
- package/chunk-KQ4ONNQD.js +677 -0
- package/{chunk-CPSZJBLK.js → chunk-L7I247DF.js} +105 -26
- package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
- package/{chunk-BJIRLHJR.js → chunk-M2EJHDJP.js} +4 -0
- package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
- package/{chunk-DSRXPQWA.js → chunk-NEDZDG3M.js} +43 -43
- package/{chunk-UJ63UXGE.js → chunk-OIVSQH2O.js} +1006 -801
- package/{chunk-AETZ7AD6.js → chunk-Q554LLSI.js} +1 -1
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{chunk-AJHEFRGJ.js → chunk-Q67DOFOO.js} +214 -5
- package/{chunk-UZ6XXCVR.js → chunk-QDSINZM3.js} +15 -2
- package/{chunk-D6XYLSOS.js → chunk-QIAVMDHY.js} +1 -1
- package/{chunk-YWG6EMH3.js → chunk-RG6JBBX5.js} +10 -6
- package/{chunk-YXLXHIT2.js → chunk-RTUYRRBM.js} +6 -6
- package/{chunk-HHLTFENG.js → chunk-SDTTBMBU.js} +907 -317
- package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
- package/{chunk-LSZXYE64.js → chunk-SL4QHSPQ.js} +756 -80
- package/{chunk-FNGAF7C4.js → chunk-SNPMM7H3.js} +137 -12
- package/{chunk-EM6MPSEI.js → chunk-SPUTJ4DW.js} +52 -30
- package/{chunk-SO7B7NW3.js → chunk-STHU4Y5X.js} +413 -62
- package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-KVDUCO4Q.js → chunk-TDRTS7QW.js} +16 -12
- package/{chunk-BJCWNHVU.js → chunk-TOP2VXOR.js} +2 -2
- package/{chunk-4EJ5QYB5.js → chunk-UKZDAFYT.js} +1 -1
- package/{chunk-PGSKWZCB.js → chunk-UZGQNTVW.js} +1 -1
- package/{chunk-ZZCJUXUI.js → chunk-V4MJDUSR.js} +2 -2
- package/{chunk-JYYZCK2Z.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-OZX2IPKM.js → chunk-VLTIYV3X.js} +1 -1
- package/{chunk-NHRQCXIQ.js → chunk-VMFTFOWF.js} +13 -3
- package/{chunk-4UW2LDVA.js → chunk-VQW3EKYS.js} +15 -15
- package/{chunk-HH65VA5U.js → chunk-WGR3J4Q6.js} +101 -4
- package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
- package/{chunk-Q46HQOW3.js → chunk-XTAZCQUT.js} +7 -7
- package/{chunk-DUJWWUGV.js → chunk-YQTQQX2H.js} +1 -1
- package/{chunk-BOYUESO7.js → chunk-Z77CRGTW.js} +1 -1
- package/{contentThunks-ENAVF2YU.js → contentThunks-D6QQKIPF.js} +25 -25
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-REAWYVTY.js} +2 -2
- package/{createAgentAutomationAction-CH6BYC7K.js → createAgentAutomationAction-UIPWW4DG.js} +25 -25
- package/{createDialogAction-23UDOXSO.js → createDialogAction-573VVP3X.js} +28 -28
- package/{createPageAction-J6AEMLHK.js → createPageAction-LRFSS6TD.js} +26 -26
- package/{dbSlice-GKGGFNOB.js → dbSlice-XVWBAGYN.js} +8 -8
- package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
- package/{dialogCommands-BJJGCCQR.js → dialogCommands-KFK2FF5B.js} +35 -31
- package/{dialogSlice-F7RD6PUY.js → dialogSlice-EXLC5XTD.js} +24 -24
- package/{docCreateCommands-53GB2FU3.js → docCreateCommands-V777WOZ7.js} +32 -30
- package/{docDeleteCommands-TAW5JEBU.js → docDeleteCommands-5KHT7Z5Q.js} +33 -31
- package/{docReadCommands-F5N7N5E3.js → docReadCommands-BLROGWP3.js} +32 -30
- package/{docStore-WX4YBGXC.js → docStore-DZNGJXX7.js} +9 -9
- package/{docUpdateCommands-YQ7TRT35.js → docUpdateCommands-QXOZHQ5H.js} +32 -30
- package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
- package/{getPricing-HRMSOF3E.js → getPricing-LUSEABA6.js} +4 -4
- package/{handleSendMessageAction-CW4LULIR.js → handleSendMessageAction-OROTZBPO.js} +24 -24
- package/index.js +102 -85
- package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
- package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
- package/{machineCommands-FIYWY5EU.js → machineCommands-IJWERHRH.js} +64 -60
- package/{machineWsRunDispatch-KQ4OFFNR.js → machineWsRunDispatch-XQ36M4L7.js} +62 -58
- package/{memberThunks-KATHH3F4.js → memberThunks-QGFLFVCI.js} +9 -9
- package/{models-GS72DVJS.js → models-T3SG6MJ5.js} +2 -2
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- package/package.json +1 -1
- package/providerPresetApply-FG6NZ57W.js +214 -0
- package/providerRegistry-757OWH3O.js +31 -0
- package/{read-LC6HVYBN.js → read-COE3ZYR6.js} +5 -4
- package/{readDocTool-N3ERJHHF.js → readDocTool-5USN4A6V.js} +1 -1
- package/{readlineWorkspace-QYI6BRNA.js → readlineWorkspace-EB3362L3.js} +144 -108
- package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-IX3MN2ZO.js} +11 -11
- package/{runAgentClientLoop-GZ5VUGAW.js → runAgentClientLoop-3MR2NPWR.js} +47 -47
- package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
- package/{setDialogExtraReferencesAction-AY4ZCF3A.js → setDialogExtraReferencesAction-X4HCPNZL.js} +9 -9
- package/{setPrimaryDialogAgentAction-HPMG7V3R.js → setPrimaryDialogAgentAction-4GMIQLOD.js} +11 -11
- package/{settingSlice-OEJA4NQO.js → settingSlice-ZQZVUPKK.js} +10 -10
- package/{spaceCommands-IYMIXCMC.js → spaceCommands-TIDVUPDV.js} +30 -28
- package/{streamAgentChatTurn-EAXIUJTK.js → streamAgentChatTurn-CLP2JWCQ.js} +59 -58
- package/{switchDialogAgentAction-HMDZTZ4I.js → switchDialogAgentAction-N52LRPA3.js} +8 -8
- package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
- package/{toolApiClient-VGYUB4P5.js → toolApiClient-QVJ6HDNN.js} +2 -2
- package/{tools-QWQOW6J4.js → tools-OXEEBABR.js} +43 -43
- package/tuiSummaryLlmCaller-VJY3YD2Q.js +127 -0
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-2HCE2M7S.js → updateDialogTitleAction-4YWKF2OE.js} +45 -28
- package/agentRecordCommands-AQFYM5HS.js +0 -124
- package/chunk-3IT2PFHL.js +0 -611
- package/chunk-I42VC5KR.js +0 -15
- package/chunk-NG4UT4K4.js +0 -79
- package/codingSkills-E6KSDNSJ.js +0 -48
- package/tuiSummaryLlmCaller-3Z24VUWM.js +0 -116
- package/{chunk-3RAG2NAD.js → chunk-UKWGR5SS.js} +3 -3
- package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
- package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BLJWCTRL.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchWithTransientRetry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5UTFL4QJ.js";
|
|
14
14
|
import {
|
|
15
15
|
DRAIN_EXHAUSTED_USER_MESSAGE,
|
|
16
16
|
isDrainExhaustedResponse
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
buildDialogAttachmentPlan,
|
|
20
20
|
extractFileContentIds
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3BMYXEUW.js";
|
|
22
22
|
import {
|
|
23
23
|
isLevelLockError
|
|
24
24
|
} from "./chunk-URMS4XY2.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
boundSummaryText,
|
|
31
31
|
buildDialogReadEnvelope,
|
|
32
32
|
projectDialogReadForAgent
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-IIVGDG4I.js";
|
|
34
34
|
import {
|
|
35
35
|
toErrorMessage
|
|
36
36
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -51,19 +51,19 @@ import {
|
|
|
51
51
|
import {
|
|
52
52
|
asNonEmptyStringArray,
|
|
53
53
|
asTrimmedNonEmptyStringArray
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VMFTFOWF.js";
|
|
55
55
|
import {
|
|
56
56
|
createClientLogger
|
|
57
57
|
} from "./chunk-QOKAKDPE.js";
|
|
58
58
|
import {
|
|
59
59
|
isLevelNotFoundError
|
|
60
60
|
} from "./chunk-OW765XBU.js";
|
|
61
|
-
import {
|
|
62
|
-
asTrimmedString
|
|
63
|
-
} from "./chunk-3EUW3WEO.js";
|
|
64
61
|
import {
|
|
65
62
|
isRecord
|
|
66
63
|
} from "./chunk-KUG52IAP.js";
|
|
64
|
+
import {
|
|
65
|
+
asTrimmedString
|
|
66
|
+
} from "./chunk-3EUW3WEO.js";
|
|
67
67
|
import {
|
|
68
68
|
DEFAULT_LOCAL_API_ORIGIN
|
|
69
69
|
} from "./chunk-4SN6J65J.js";
|
|
@@ -210,7 +210,8 @@ var VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
|
210
210
|
"--token",
|
|
211
211
|
"--machine-key",
|
|
212
212
|
"--user",
|
|
213
|
-
"--max-response-chars"
|
|
213
|
+
"--max-response-chars",
|
|
214
|
+
"--per-dialog"
|
|
214
215
|
]);
|
|
215
216
|
function hasFlag(args, flag) {
|
|
216
217
|
return args.includes(flag);
|
|
@@ -724,7 +725,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
|
|
|
724
725
|
return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
|
|
725
726
|
}
|
|
726
727
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
727
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
728
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-BTFJ4V2I.js")).readDialogFromLocalDb;
|
|
728
729
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
729
730
|
return {
|
|
730
731
|
...result,
|
|
@@ -741,7 +742,7 @@ async function readLocalDialogAtDbPathDefault(args) {
|
|
|
741
742
|
const [{ Level }, { safeJsonEncoding }, { fetchMessages }] = await Promise.all([
|
|
742
743
|
import("./levelLazyShim-GZBKODGI.js"),
|
|
743
744
|
import("./serverStoreFactory-YMXDF4NI.js"),
|
|
744
|
-
import("./fetchMessages-
|
|
745
|
+
import("./fetchMessages-EIU7UFFK.js")
|
|
745
746
|
]);
|
|
746
747
|
const db = new Level(args.dbPath, {
|
|
747
748
|
valueEncoding: safeJsonEncoding,
|
|
@@ -1820,6 +1821,129 @@ async function runDialogDeleteCommand(args, deps = {}) {
|
|
|
1820
1821
|
}
|
|
1821
1822
|
return hasErrors ? 1 : 0;
|
|
1822
1823
|
}
|
|
1824
|
+
function printSearchUsage(output) {
|
|
1825
|
+
output.write(`Usage:
|
|
1826
|
+
nolo dialog search <query> [--limit <n>] [--per-dialog <n>] [--json]
|
|
1827
|
+
|
|
1828
|
+
Options:
|
|
1829
|
+
--limit <n> Max dialogs to return (default 20, max 50).
|
|
1830
|
+
--per-dialog <n> Max match snippets per dialog (default 3, max 10).
|
|
1831
|
+
--json Print machine-readable JSON.
|
|
1832
|
+
--server <url> Override NOLO_SERVER/BASE_URL.
|
|
1833
|
+
--token <jwt> Override AUTH_TOKEN.
|
|
1834
|
+
|
|
1835
|
+
Searches messages across the current user's dialogs via the server endpoint.
|
|
1836
|
+
Server requires NOLO_DIALOG_SEARCH=1 to be enabled.
|
|
1837
|
+
`);
|
|
1838
|
+
}
|
|
1839
|
+
async function runDialogSearchCommand(args, deps = {}) {
|
|
1840
|
+
const env = deps.env ?? process.env;
|
|
1841
|
+
const output = deps.output ?? process.stdout;
|
|
1842
|
+
if (hasFlag(args, "--help") || hasFlag(args, "-h")) {
|
|
1843
|
+
printSearchUsage(output);
|
|
1844
|
+
return 0;
|
|
1845
|
+
}
|
|
1846
|
+
const query = readFirstPositional(args);
|
|
1847
|
+
if (!query) {
|
|
1848
|
+
output.write("[nolo] dialog search requires a search query.\n\n");
|
|
1849
|
+
printSearchUsage(output);
|
|
1850
|
+
return 1;
|
|
1851
|
+
}
|
|
1852
|
+
const authToken = resolveAuthToken(args, env);
|
|
1853
|
+
if (!authToken) {
|
|
1854
|
+
output.write("[nolo] dialog search requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
|
|
1855
|
+
return 1;
|
|
1856
|
+
}
|
|
1857
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
1858
|
+
const serverUrl = resolveServerUrl(args, env);
|
|
1859
|
+
const serverUrls = resolveServerCandidates(args, env, serverUrl);
|
|
1860
|
+
const limitRaw = readOption(args, "--limit");
|
|
1861
|
+
const perDialogRaw = readOption(args, "--per-dialog");
|
|
1862
|
+
const queryParams = new URLSearchParams({ q: query });
|
|
1863
|
+
if (limitRaw) queryParams.set("limit", limitRaw);
|
|
1864
|
+
if (perDialogRaw) queryParams.set("perDialog", perDialogRaw);
|
|
1865
|
+
const isJson = hasFlag(args, "--json");
|
|
1866
|
+
let lastError = null;
|
|
1867
|
+
let lastStatus = null;
|
|
1868
|
+
let searchResult = null;
|
|
1869
|
+
for (const candidateBase of serverUrls) {
|
|
1870
|
+
const trimmedBase = candidateBase.replace(/\/+$/, "");
|
|
1871
|
+
const targetUrl = `${trimmedBase}/api/dialog-search?${queryParams.toString()}`;
|
|
1872
|
+
try {
|
|
1873
|
+
const res = await fetchImpl(targetUrl, {
|
|
1874
|
+
method: "GET",
|
|
1875
|
+
headers: {
|
|
1876
|
+
Authorization: `Bearer ${authToken}`
|
|
1877
|
+
}
|
|
1878
|
+
});
|
|
1879
|
+
lastStatus = res.status;
|
|
1880
|
+
if (!res.ok) {
|
|
1881
|
+
const errorData = await res.json().catch(() => ({}));
|
|
1882
|
+
if (res.status === 403) {
|
|
1883
|
+
const hint = errorData?.hint ? ` (${errorData.hint})` : "";
|
|
1884
|
+
const msg = errorData?.message ? `: ${errorData.message}` : "";
|
|
1885
|
+
throw new Error(`Server returned 403 Forbidden${hint}${msg}. Please ensure NOLO_DIALOG_SEARCH=1 is enabled on the server.`);
|
|
1886
|
+
}
|
|
1887
|
+
if (res.status === 401) {
|
|
1888
|
+
throw new Error(`Server returned 401 Unauthorized. Please check your AUTH_TOKEN.`);
|
|
1889
|
+
}
|
|
1890
|
+
throw new Error(`HTTP ${res.status}: ${JSON.stringify(errorData)}`);
|
|
1891
|
+
}
|
|
1892
|
+
searchResult = await res.json();
|
|
1893
|
+
break;
|
|
1894
|
+
} catch (err) {
|
|
1895
|
+
lastError = err;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
if (!searchResult) {
|
|
1899
|
+
const errorMsg = lastError ? toErrorMessage(lastError) : "Failed to connect to candidate servers";
|
|
1900
|
+
if (isJson) {
|
|
1901
|
+
output.write(JSON.stringify({ error: errorMsg, status: lastStatus }, null, 2) + "\n");
|
|
1902
|
+
} else {
|
|
1903
|
+
output.write(`[nolo] dialog search failed: ${errorMsg}
|
|
1904
|
+
`);
|
|
1905
|
+
}
|
|
1906
|
+
return 1;
|
|
1907
|
+
}
|
|
1908
|
+
if (isJson) {
|
|
1909
|
+
output.write(JSON.stringify(searchResult, null, 2) + "\n");
|
|
1910
|
+
return 0;
|
|
1911
|
+
}
|
|
1912
|
+
const { dialogs, totalMatches, scannedDialogs, scannedMessages, elapsedMs, truncated } = searchResult;
|
|
1913
|
+
output.write(`query: ${query}
|
|
1914
|
+
`);
|
|
1915
|
+
output.write(`scanned: ${scannedDialogs} dialogs, ${scannedMessages} messages (${elapsedMs}ms)
|
|
1916
|
+
`);
|
|
1917
|
+
output.write(`matches: ${totalMatches} total match(es) across ${dialogs?.length ?? 0} dialog(s)`);
|
|
1918
|
+
if (truncated) {
|
|
1919
|
+
output.write(" [truncated]");
|
|
1920
|
+
}
|
|
1921
|
+
output.write("\n");
|
|
1922
|
+
if (!Array.isArray(dialogs) || dialogs.length === 0) {
|
|
1923
|
+
output.write("\nNo matching dialog messages found.\n");
|
|
1924
|
+
return 0;
|
|
1925
|
+
}
|
|
1926
|
+
for (const d of dialogs) {
|
|
1927
|
+
output.write(`
|
|
1928
|
+
${d.title}
|
|
1929
|
+
`);
|
|
1930
|
+
output.write(`id=${d.dialogId}
|
|
1931
|
+
`);
|
|
1932
|
+
output.write(`updatedAt=${d.updatedAt ?? "-"}
|
|
1933
|
+
`);
|
|
1934
|
+
output.write(`matches=${d.matchCount}
|
|
1935
|
+
`);
|
|
1936
|
+
if (Array.isArray(d.matches) && d.matches.length > 0) {
|
|
1937
|
+
for (const m of d.matches) {
|
|
1938
|
+
const role = m.role ? `[${m.role}]` : "";
|
|
1939
|
+
const snippet = String(m.snippet ?? "").replace(/\r?\n/g, " ");
|
|
1940
|
+
output.write(` - ${role} ${snippet}
|
|
1941
|
+
`);
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
return 0;
|
|
1946
|
+
}
|
|
1823
1947
|
|
|
1824
1948
|
export {
|
|
1825
1949
|
normalizeDialogRecord,
|
|
@@ -1832,5 +1956,6 @@ export {
|
|
|
1832
1956
|
runDialogStatusCommand,
|
|
1833
1957
|
runDialogQueryCommand,
|
|
1834
1958
|
runDialogListCommand,
|
|
1835
|
-
runDialogDeleteCommand
|
|
1959
|
+
runDialogDeleteCommand,
|
|
1960
|
+
runDialogSearchCommand
|
|
1836
1961
|
};
|
|
@@ -6,9 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-HS7MLR74.js";
|
|
7
7
|
import {
|
|
8
8
|
clipMultilineText,
|
|
9
|
-
fetchAndSerializeTable
|
|
10
|
-
|
|
11
|
-
} from "./chunk-YSKEOTPH.js";
|
|
9
|
+
fetchAndSerializeTable
|
|
10
|
+
} from "./chunk-GGMVRZRO.js";
|
|
12
11
|
import {
|
|
13
12
|
isGatewayHttpStatus
|
|
14
13
|
} from "./chunk-NF64D32W.js";
|
|
@@ -20,7 +19,7 @@ import {
|
|
|
20
19
|
} from "./chunk-3L2WKC3W.js";
|
|
21
20
|
import {
|
|
22
21
|
slateToSimplifiedMarkdown
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J4MOO56S.js";
|
|
24
23
|
import {
|
|
25
24
|
waitForAbortableDelay
|
|
26
25
|
} from "./chunk-N4G4PKQ6.js";
|
|
@@ -29,25 +28,27 @@ import {
|
|
|
29
28
|
} from "./chunk-MEYIRKDN.js";
|
|
30
29
|
import {
|
|
31
30
|
fetchAndCacheMessages
|
|
32
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-STHU4Y5X.js";
|
|
33
32
|
import {
|
|
34
33
|
shouldUseServerProxy
|
|
35
34
|
} from "./chunk-YYLHWIW6.js";
|
|
36
35
|
import {
|
|
37
36
|
fetchServerSyncedCredential
|
|
38
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XTAZCQUT.js";
|
|
39
38
|
import {
|
|
40
39
|
buildSkillGuidancePromptBlock,
|
|
41
40
|
extractRuntimePageCapabilities,
|
|
41
|
+
resolveBuiltinSkillPage,
|
|
42
42
|
resolveSkillGraphFromRoots
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-JRQFUXY7.js";
|
|
44
44
|
import {
|
|
45
45
|
buildIdentityBlock,
|
|
46
46
|
buildRuntimeGuidanceBlocks,
|
|
47
47
|
compileContextLayers,
|
|
48
|
+
detectDispatchIntentFromMessages,
|
|
48
49
|
normalizeChatCompletionsBodyForProvider,
|
|
49
50
|
resolveToolGuidedSections
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-L7I247DF.js";
|
|
51
52
|
import {
|
|
52
53
|
convertMessagesToResponsesInput,
|
|
53
54
|
getUsageRequestOptions,
|
|
@@ -57,26 +58,26 @@ import {
|
|
|
57
58
|
import {
|
|
58
59
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
59
60
|
isAntigravityOAuthAgent
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UZGQNTVW.js";
|
|
61
62
|
import {
|
|
62
63
|
buildProviderAuthHeaders
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-6OZ36FXI.js";
|
|
65
|
+
import {
|
|
66
|
+
estimateTokenCount
|
|
67
|
+
} from "./chunk-PSCNXBYA.js";
|
|
64
68
|
import {
|
|
65
69
|
isOpenAiResponsesModel,
|
|
66
70
|
resolvePlatformChatCompletionsEndpoint,
|
|
67
71
|
resolvePlatformResponsesEndpoint
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import {
|
|
70
|
-
estimateTokenCount
|
|
71
|
-
} from "./chunk-PSCNXBYA.js";
|
|
72
|
+
} from "./chunk-GQBOR3G6.js";
|
|
72
73
|
import {
|
|
73
74
|
clampReasoningEffort,
|
|
74
75
|
getModelConfig,
|
|
75
76
|
isModelSupportReasoningEffort
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-OIVSQH2O.js";
|
|
77
78
|
import {
|
|
78
79
|
createFileCredentialBroker
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-HVURBGF3.js";
|
|
80
81
|
import {
|
|
81
82
|
toErrorMessage
|
|
82
83
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -91,32 +92,33 @@ import {
|
|
|
91
92
|
import {
|
|
92
93
|
isDeepInfraKimiModel,
|
|
93
94
|
isFireworksKimiModel,
|
|
95
|
+
isPlatformMimoProviderModel,
|
|
94
96
|
resolveFireworksKimiModel
|
|
95
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-Q67DOFOO.js";
|
|
96
98
|
import {
|
|
97
99
|
createSpaceKey
|
|
98
100
|
} from "./chunk-UAD2WT54.js";
|
|
99
101
|
import {
|
|
100
102
|
read
|
|
101
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-H62HCIUP.js";
|
|
102
104
|
import {
|
|
103
105
|
asTrimmedLowercaseString
|
|
104
106
|
} from "./chunk-QSJ3HFEF.js";
|
|
105
107
|
import {
|
|
106
108
|
extractCustomId
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-M2EJHDJP.js";
|
|
108
110
|
import {
|
|
109
111
|
getRuntimeServerContext
|
|
110
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-UKWGR5SS.js";
|
|
111
113
|
import {
|
|
112
114
|
isAbortError
|
|
113
115
|
} from "./chunk-QOKAKDPE.js";
|
|
114
|
-
import {
|
|
115
|
-
asTrimmedString
|
|
116
|
-
} from "./chunk-3EUW3WEO.js";
|
|
117
116
|
import {
|
|
118
117
|
isRecord
|
|
119
118
|
} from "./chunk-KUG52IAP.js";
|
|
119
|
+
import {
|
|
120
|
+
asTrimmedString
|
|
121
|
+
} from "./chunk-3EUW3WEO.js";
|
|
120
122
|
import {
|
|
121
123
|
API_ENDPOINTS
|
|
122
124
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -367,10 +369,12 @@ function isResponsesConversationStateRejection(status, responseBody) {
|
|
|
367
369
|
// packages/agent-runtime/agentCallPlan.ts
|
|
368
370
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
369
371
|
var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
|
|
372
|
+
var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
|
|
370
373
|
function resolveClientWire(plan) {
|
|
371
374
|
if (plan.upstreamWire === "gemini-cca") return "chat.completions";
|
|
372
375
|
if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
|
|
373
376
|
if (plan.upstreamWire === "cursor-connect") return "chat.completions";
|
|
377
|
+
if (plan.upstreamWire === "devin-connect") return "chat.completions";
|
|
374
378
|
if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
|
|
375
379
|
return "chat.completions";
|
|
376
380
|
}
|
|
@@ -450,6 +454,16 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
450
454
|
vendor: provider || "cursor"
|
|
451
455
|
};
|
|
452
456
|
}
|
|
457
|
+
if (apiKeyRef === "devin" || provider === "devin") {
|
|
458
|
+
return {
|
|
459
|
+
authMethod: { kind: "oauth", ref: "devin" },
|
|
460
|
+
transport: "server-proxy",
|
|
461
|
+
upstreamWire: "devin-connect",
|
|
462
|
+
endpoint: DEVIN_CONNECT_URL,
|
|
463
|
+
requiredHeaders: ["connect-protocol-version"],
|
|
464
|
+
vendor: provider || "devin"
|
|
465
|
+
};
|
|
466
|
+
}
|
|
453
467
|
if (agentConfig.cliProvider || agentConfig.apiSource === "cli" || provider === "cli") {
|
|
454
468
|
return {
|
|
455
469
|
authMethod: { kind: "cli", provider: agentConfig.cliProvider || provider || "codex" },
|
|
@@ -606,7 +620,9 @@ var buildSystemPromptContext = (options) => {
|
|
|
606
620
|
${mainPrompt}` : "";
|
|
607
621
|
const agentTools = canonicalizeToolNames(agentConfig.tools ?? []);
|
|
608
622
|
const hasAskTool = agentTools.includes("ask_user");
|
|
609
|
-
const toolSections = resolveToolGuidedSections(agentTools
|
|
623
|
+
const toolSections = resolveToolGuidedSections(agentTools, {
|
|
624
|
+
dispatchIntent: options.dispatchIntent === true
|
|
625
|
+
});
|
|
610
626
|
const {
|
|
611
627
|
startupProtocol,
|
|
612
628
|
contextLayerContract,
|
|
@@ -686,8 +702,9 @@ var applyClaudeCache = (stableContent, dynamicContent) => {
|
|
|
686
702
|
var prependPromptMessage = (messages, agentConfig, resolvedModel, language, contexts, prependSystemPrompt = true) => {
|
|
687
703
|
if (!prependSystemPrompt) return messages;
|
|
688
704
|
if (!contexts && !agentConfig.prompt) return messages;
|
|
705
|
+
const dispatchIntent = detectDispatchIntentFromMessages(messages);
|
|
689
706
|
if (isClaudeModel(resolvedModel)) {
|
|
690
|
-
const compiled = buildSystemPromptContext({ agentConfig, language, contexts });
|
|
707
|
+
const compiled = buildSystemPromptContext({ agentConfig, language, contexts, dispatchIntent });
|
|
691
708
|
if (!compiled.content.trim()) return messages;
|
|
692
709
|
const content = applyClaudeCache(
|
|
693
710
|
compiled.stablePrefixContent,
|
|
@@ -696,7 +713,7 @@ var prependPromptMessage = (messages, agentConfig, resolvedModel, language, cont
|
|
|
696
713
|
const systemMessage2 = { role: "system", content };
|
|
697
714
|
return [systemMessage2, ...messages];
|
|
698
715
|
}
|
|
699
|
-
const promptContent = buildSystemPrompt({ agentConfig, language, contexts });
|
|
716
|
+
const promptContent = buildSystemPrompt({ agentConfig, language, contexts, dispatchIntent });
|
|
700
717
|
if (!promptContent.trim()) return messages;
|
|
701
718
|
const systemMessage = { role: "system", content: promptContent };
|
|
702
719
|
return [systemMessage, ...messages];
|
|
@@ -706,9 +723,12 @@ var shouldInjectLlamaCppThinkingToggle = (agentConfig) => {
|
|
|
706
723
|
if (!isLoopbackUrl(agentConfig.customProviderUrl)) return false;
|
|
707
724
|
return /qwen/i.test(agentConfig.model ?? "");
|
|
708
725
|
};
|
|
709
|
-
var shouldDisableMiMoThinking = (agentConfig) => {
|
|
726
|
+
var shouldDisableMiMoThinking = (agentConfig, resolvedModel) => {
|
|
710
727
|
if (agentConfig.enableThinking === true) return false;
|
|
711
|
-
|
|
728
|
+
if (/xiaomimimo\.com/i.test(agentConfig.customProviderUrl ?? "") || (agentConfig.provider ?? "").toLowerCase() === "mimo") {
|
|
729
|
+
return true;
|
|
730
|
+
}
|
|
731
|
+
return isPlatformMimoProviderModel(agentConfig.provider, resolvedModel);
|
|
712
732
|
};
|
|
713
733
|
var shouldDisableKimiThinking = (agentConfig, providerName, resolvedModel) => {
|
|
714
734
|
if (agentConfig.enableThinking !== false) return false;
|
|
@@ -823,7 +843,7 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
|
|
|
823
843
|
enable_thinking: agentConfig.enableThinking
|
|
824
844
|
};
|
|
825
845
|
}
|
|
826
|
-
if (shouldDisableMiMoThinking(agentConfig)) {
|
|
846
|
+
if (shouldDisableMiMoThinking(agentConfig, resolvedModel)) {
|
|
827
847
|
requestBody.thinking = { type: "disabled" };
|
|
828
848
|
}
|
|
829
849
|
if (shouldDisableKimiThinking(agentConfig, providerName, resolvedModel)) {
|
|
@@ -876,7 +896,9 @@ function generateResponseRequestBody(agentConfig, msgs, contexts, prependSystemP
|
|
|
876
896
|
const promptContent = buildSystemPrompt({
|
|
877
897
|
agentConfig,
|
|
878
898
|
language,
|
|
879
|
-
contexts
|
|
899
|
+
contexts,
|
|
900
|
+
// 按当前用户输入检测派发意图:无意图只注入最小派发协议(安全硬门常在)。
|
|
901
|
+
dispatchIntent: detectDispatchIntentFromMessages(msgs)
|
|
880
902
|
});
|
|
881
903
|
body.instructions = promptContent;
|
|
882
904
|
}
|