nolo-cli 0.240.0-alpha.3 → 0.242.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/README.md +3 -5
- package/{_executeModel-5NA4USGG.js → _executeModel-IZ2MCXHO.js} +77 -77
- package/{action-X75O3XPH.js → action-VDEW6WLI.js} +9 -9
- package/{addContentAction-GVC77QSN.js → addContentAction-7YVXHIPQ.js} +14 -14
- package/{addDialogAgentAction-KKDVAMW3.js → addDialogAgentAction-BX7B47HF.js} +17 -17
- package/{agentDeleteCommand-2RFGKFAB.js → agentDeleteCommand-N7ELXPLD.js} +107 -108
- package/{agentEmailCommands-GQCQKKOR.js → agentEmailCommands-OFS477PV.js} +110 -111
- package/{agentListCommands-HSGLDPDQ.js → agentListCommands-IQQHJSXP.js} +202 -164
- package/{agentMachineCommands-BISF6PVV.js → agentMachineCommands-NS65BEW7.js} +52 -49
- package/{agentProviderCommands-O3Q25PKU.js → agentProviderCommands-SS6M6VGY.js} +2 -2
- package/{agentPullCommand-G6U2LHMW.js → agentPullCommand-QQQZSC6S.js} +1 -1
- package/{agentRecordCommands-AOXPGYAJ.js → agentRecordCommands-4VE7CNLC.js} +103 -104
- package/{agentRunCommand-AFAIP7U7.js → agentRunCommand-2MUXHKNW.js} +109 -108
- package/{agentRunControl-VBL7UFSG.js → agentRunControl-55GL6Q3M.js} +11 -9
- package/{agentRuntimeLocal-T7BX2WGL.js → agentRuntimeLocal-5DB2P4MU.js} +51 -43
- package/{agentSlice-XJNKE3PG.js → agentSlice-5VTAFG43.js} +14 -14
- package/{appDeleteCommands-LURUSPY7.js → appDeleteCommands-EDKUPHJM.js} +52 -49
- package/{appDeployCommands-SMEW4AK2.js → appDeployCommands-JO74GW4L.js} +52 -49
- package/{appDeployStatusCommands-VYPJTBJK.js → appDeployStatusCommands-U77ZUHX7.js} +52 -49
- package/{appGetCommands-N4NI5GGJ.js → appGetCommands-QCMHBYPX.js} +52 -49
- package/{appListCommands-5C6ONN3Z.js → appListCommands-ZQJYEXI6.js} +52 -49
- package/{authCommand-4CVBDADE.js → authCommand-W4KXRZLI.js} +23 -19
- package/{authCommands-EHU2BHOX.js → authCommands-6AUYO65N.js} +10 -6
- package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +6 -6
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-CSDG2HYN.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
- package/{chunk-7TTMMOKH.js → chunk-247AAJRK.js} +1 -1
- package/{chunk-4X5AVCM7.js → chunk-2BSLGODA.js} +258 -23
- package/{chunk-P3IZUMIC.js → chunk-2N4UBHUU.js} +4 -4
- package/{chunk-A74QP4FI.js → chunk-2T5BHLID.js} +572 -208
- package/{chunk-H7ZYKHAZ.js → chunk-3OQFXODL.js} +102 -31
- package/{chunk-BIABIPGW.js → chunk-3ORFJP2Z.js} +1 -1
- package/{chunk-3FBAVU2Y.js → chunk-3UNAGTBW.js} +19 -84
- package/{chunk-DNZ4JJ7C.js → chunk-4F7SWSWO.js} +19 -6
- package/{chunk-2X7WFDT6.js → chunk-4FE3IWRE.js} +1 -1
- package/{chunk-N2JROHD3.js → chunk-4UK6UBXF.js} +3 -3
- package/{chunk-XS5A3EKX.js → chunk-4YFC3DWW.js} +75 -1
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-E5KJOZWY.js → chunk-5GRWWUB4.js} +3 -3
- package/{chunk-HCNOO374.js → chunk-6326DRQY.js} +1 -1
- package/{chunk-RM4UMFY4.js → chunk-6MQWGA5F.js} +10 -10
- package/{chunk-TEMLHVGX.js → chunk-6MX6S6TE.js} +3 -3
- package/{chunk-6WOLPIPY.js → chunk-6RSNVJGO.js} +2 -102
- package/{chunk-Y5OWZQMJ.js → chunk-6S6CZUXK.js} +19 -19
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-FZKA3XFA.js → chunk-6XLWUNZB.js} +27 -27
- package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
- package/{chunk-MYPKBJJO.js → chunk-7AWKDRXG.js} +2 -2
- package/{chunk-GDUC4VS2.js → chunk-7GTXPS3D.js} +10 -10
- package/{chunk-Z2WZAE4P.js → chunk-7HUHOCIY.js} +36 -30
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-ULLHVDTZ.js → chunk-BH7CEVOH.js} +4 -4
- package/{chunk-A3LUWRQK.js → chunk-C4KX626C.js} +5 -5
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-DXW5WDHZ.js → chunk-CHYYSFFM.js} +6 -6
- package/{chunk-O6IPRAVV.js → chunk-CJTB3OYB.js} +2 -2
- package/{chunk-AVJDELEA.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
- package/{chunk-VREG6ANQ.js → chunk-DPAIQLAL.js} +16 -16
- package/{chunk-ANJRDS6U.js → chunk-EKXPHL7M.js} +3 -3
- package/{chunk-TWTJV35S.js → chunk-ENYTIRIO.js} +3 -3
- package/{chunk-PGKA77TZ.js → chunk-ER3P6MBT.js} +170 -107
- package/{chunk-EEOOBRA7.js → chunk-F4MCAOWN.js} +2 -2
- package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
- package/{chunk-VSRISJXZ.js → chunk-GAHJLSDO.js} +1 -1
- package/{chunk-U3G7RRXJ.js → chunk-GES5GIAU.js} +8 -8
- package/{chunk-4IQVE43Z.js → chunk-HQVNO7FH.js} +22 -22
- package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
- package/{chunk-MECDGHLK.js → chunk-IIG3TT73.js} +43 -6
- package/{chunk-YGCOJNFZ.js → chunk-IZJFTY4R.js} +3 -3
- package/{chunk-BXSMFPTG.js → chunk-J25ESVUW.js} +10 -10
- package/{chunk-CVJRVBJL.js → chunk-J2XZZXIH.js} +4 -4
- package/{chunk-3EMIEC27.js → chunk-JVJ53XCH.js} +1 -1
- package/{chunk-AH5R7BYW.js → chunk-KC2QVCI7.js} +6 -6
- package/{chunk-MYOSN6BT.js → chunk-KF2DWSAH.js} +34 -13
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-PRMEU7BT.js → chunk-KLD7K5FD.js} +7 -7
- package/{chunk-7AJRJGSQ.js → chunk-KMW5CRRM.js} +801 -381
- package/{chunk-Y2MF4DCJ.js → chunk-LELADM5Q.js} +1 -1
- package/{chunk-RTHFJZ6M.js → chunk-LMFMV5UC.js} +2 -2
- package/{chunk-2574ANSV.js → chunk-LZOOUQAZ.js} +4 -4
- package/{chunk-HOM6LTEW.js → chunk-M5EA44QU.js} +6 -6
- package/{chunk-IUMS6F53.js → chunk-MEDPR36J.js} +9 -5
- package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CBUZ6DKA.js → chunk-N6EN3HK3.js} +1 -1
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-B7DE5XJW.js → chunk-ODGSLWLO.js} +249 -66
- package/{chunk-S2MHR4PU.js → chunk-OGZE6BZG.js} +190 -118
- package/{chunk-CD3RU7XL.js → chunk-OJRTTERA.js} +62 -2
- package/{chunk-GXXY2NL3.js → chunk-OKPC4QNX.js} +37 -2
- package/{chunk-5QZSEQSK.js → chunk-ONFFUQYM.js} +1 -1
- package/{chunk-BGGAY6OK.js → chunk-P244EH4W.js} +3 -3
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-UFC4J7OY.js → chunk-PK7VT4ZU.js} +3 -3
- package/{chunk-4FIO2S7Z.js → chunk-QLUYDJST.js} +1 -1
- package/{chunk-AEQMKYZN.js → chunk-QUJKDFZW.js} +7 -7
- package/{chunk-G22P367E.js → chunk-QXUVCIPB.js} +62 -18
- package/{chunk-IJTXNLQE.js → chunk-QYNABNNQ.js} +6 -6
- package/{chunk-TRHJ4NJB.js → chunk-RGUWOMXU.js} +626 -237
- package/{chunk-L32W3PRP.js → chunk-RH44TIHX.js} +165 -16
- package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-BGGV6B5O.js → chunk-SBRJOYND.js} +280 -139
- package/{chunk-KZPEGO6D.js → chunk-SBRSXY67.js} +6 -6
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-D374I563.js → chunk-T3WSFTBS.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
- package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
- package/{chunk-OX6GNNVT.js → chunk-U5LOKQ2R.js} +24 -13
- package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
- package/{chunk-CKZPMJNU.js → chunk-UQXOORR3.js} +5 -5
- package/{chunk-FFYE5ATM.js → chunk-UR7555FE.js} +11 -11
- package/{chunk-F3XI6WQP.js → chunk-UWOCASVL.js} +5 -5
- package/{chunk-A5EVA6HU.js → chunk-V2V5Q6DU.js} +2 -2
- package/{chunk-PROOOQZ3.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-F6YWDVIB.js → chunk-VMWY7TUA.js} +1 -1
- package/{chunk-RETQOQ4D.js → chunk-VNALJT32.js} +2 -2
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
- package/{chunk-ZEKUFJLW.js → chunk-WVOZ35E4.js} +7 -7
- package/{chunk-B5SV4H3J.js → chunk-XDNXKFWF.js} +4 -4
- package/{chunk-4Q6HQORG.js → chunk-XLN2GD6Z.js} +4 -4
- package/{chunk-HBRDSQ3M.js → chunk-XNEDFWT4.js} +2 -2
- package/{chunk-6CKUO32A.js → chunk-Y22P6ASC.js} +11 -8
- package/{chunk-SRCCSTIM.js → chunk-Y3DOUQQQ.js} +4 -4
- package/{chunk-6WZVM33D.js → chunk-Y5EBOURK.js} +3 -3
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-T6VROBY7.js → chunk-YTEY27GN.js} +2 -2
- package/{chunk-5ZUOVCKT.js → chunk-YUZ2DAIH.js} +3 -1
- package/{chunk-IUTUWIKE.js → chunk-ZCVBIIUE.js} +4 -4
- package/{chunk-VM72HKW2.js → chunk-ZCZLTJEW.js} +9 -36
- package/{cliAgentConfigHelpers-U5OAVAKQ.js → cliAgentConfigHelpers-6OFDHJFT.js} +8 -8
- package/{cliAuthorityBrokerClient-S42VMGB6.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-HVZAQCUD.js → cliLocalAgentRecordReader-FHIMCBUK.js} +52 -45
- package/{commandRegistry-TME7INFU.js → commandRegistry-OKIWAJIS.js} +101 -93
- package/{contentThunks-U6OC4R2N.js → contentThunks-VF2DCU46.js} +33 -32
- package/{cooldownCommands-U7XSRVJP.js → cooldownCommands-QL6DWGVU.js} +1 -1
- package/{createAgentAutomationAction-IP4LFN3W.js → createAgentAutomationAction-BGET7Q6K.js} +34 -33
- package/{createDialogAction-IAGQJ3LH.js → createDialogAction-XYDQZETK.js} +34 -33
- package/{createPageAction-AZ3UIFKA.js → createPageAction-74S5RO7U.js} +38 -37
- package/{db-M7FU2GNK.js → db-6NRZLEW2.js} +1 -1
- package/{dbSlice-DKKMJJYY.js → dbSlice-FI7VNDR5.js} +13 -13
- package/{deleteFile-TQSONMVU.js → deleteFile-GD62MPZW.js} +8 -8
- package/{dialogCommands-PCDRMBWG.js → dialogCommands-Y6DHZUAM.js} +56 -54
- package/{dialogNotifyCommand-O35MWMOS.js → dialogNotifyCommand-MKXL4NGL.js} +10 -10
- package/{dialogSlice-QAKYN4DE.js → dialogSlice-XAUKSWZ4.js} +32 -31
- package/{dialogUsageCommand-2SSLTXKO.js → dialogUsageCommand-BZPKR3DW.js} +5 -5
- package/{docCreateCommands-CFQFZOAD.js → docCreateCommands-PHDFOQBM.js} +51 -48
- package/{docDeleteCommands-5CPNTIIS.js → docDeleteCommands-OSHJM67Y.js} +53 -50
- package/{docReadCommands-XQILYSAJ.js → docReadCommands-E6QYCFMS.js} +51 -48
- package/{docStore-GIVRT7TQ.js → docStore-ZZT2BEBU.js} +15 -15
- package/{docUpdateCommands-VETKSUDD.js → docUpdateCommands-DHIOPK2C.js} +51 -48
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-RNRITFOP.js} +4 -4
- package/{handleSendMessageAction-HKIW4ZNO.js → handleSendMessageAction-ARUU6CNF.js} +71 -70
- package/{hostCredentialCreate-6VDJFNDO.js → hostCredentialCreate-SNQT73H4.js} +103 -104
- package/index.js +8 -8
- package/{localDialogRead-AV2VKKPG.js → localDialogRead-3T2KMCRC.js} +1 -1
- package/{localRuntimeAdapter-BQ4F5PZV.js → localRuntimeAdapter-MHI6Y2IZ.js} +112 -111
- package/{localRuntimeAuthority-WCNA4A3G.js → localRuntimeAuthority-7DKIT7UH.js} +2 -2
- package/{localRuntimeDb-CRNIBOOM.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-K6XIGOAD.js → machineCommands-3O6Y27R4.js} +229 -321
- package/{machineWsRunDispatch-4OO7Z6UM.js → machineWsRunDispatch-5PFLR5XC.js} +101 -102
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/{mcpLocalAuthorizeCommand-ZP6ESAGE.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +15 -15
- package/{memberThunks-PBJPZ2JU.js → memberThunks-TU6A6OBV.js} +16 -16
- package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-G7AOQPRW.js → projectArchive-X2EVXU3N.js} +40 -39
- package/{providerPresetApply-OPBCAONX.js → providerPresetApply-HUWNV2NI.js} +6 -6
- package/{providerRegistry-J2HCVTHE.js → providerRegistry-7FWKDKZJ.js} +6 -6
- package/{read-JEGPITEW.js → read-QAHEQID5.js} +8 -8
- package/{readDocTool-TE3XIU4Y.js → readDocTool-KG5DP6EM.js} +1 -1
- package/{readlineWorkspace-SOW5QUGZ.js → readlineWorkspace-SO3APHVP.js} +3300 -1518
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-CX3OAH4Y.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
- package/{runAgentClientLoop-HQJPDFGQ.js → runAgentClientLoop-FLHHCOVH.js} +77 -77
- package/{runtimeDoctorCommands-GUH2YGMH.js → runtimeDoctorCommands-DN3I52C6.js} +8 -8
- package/{secretCommands-NJXFVHZU.js → secretCommands-36BCE3UE.js} +2 -2
- package/{setDialogExtraReferencesAction-CGM67EEQ.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
- package/{setPrimaryDialogAgentAction-3ABWPPXR.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
- package/{settingThunks-AY76OHYX.js → settingThunks-MHGGP6UE.js} +23 -23
- package/{spaceCommands-G63QGYQO.js → spaceCommands-JH7UYE3K.js} +54 -51
- package/{streamAgentChatTurn-E3XH2KFD.js → streamAgentChatTurn-VDDA2TX6.js} +118 -118
- package/{switchDialogAgentAction-G6EZRKCQ.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
- package/{tableCommands-JI75ZHDI.js → tableCommands-UONBFC7L.js} +6 -6
- package/{toolApiClient-62UUPDUA.js → toolApiClient-53YMJ2G6.js} +7 -3
- package/{tools-7RSX22FT.js → tools-MIOCXKMG.js} +59 -60
- package/{tuiRestart-KAAA7TND.js → tuiRestart-ET3QISZ5.js} +10 -10
- package/{tuiSummaryLlmCaller-BVNHMWLR.js → tuiSummaryLlmCaller-MSINBP3M.js} +15 -14
- package/{updateCommands-ASK5XYPH.js → updateCommands-5OYND6EF.js} +3 -3
- package/{updateDialogTitleAction-SEWV252V.js → updateDialogTitleAction-2L4CC4YO.js} +35 -34
- package/{usageCommand-JVT5J3DC.js → usageCommand-JTKDAG6I.js} +2 -2
- package/{usageRebuildCommand-IZYYUTEW.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
- package/{windowsSelfUpdate-BSDIS2J5.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/{workContext-MM3P5GP5.js → workContext-Y3ADAPZU.js} +2 -1
- package/{workloadLifecycle-YIZ7KLUP.js → workloadLifecycle-ZCSQCHG3.js} +6 -6
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-XBAEM4RI.js +0 -272
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
- /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
|
@@ -2,23 +2,26 @@ import {
|
|
|
2
2
|
normalizeTimingMs
|
|
3
3
|
} from "./chunk-H57T64RA.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
sha256Hex
|
|
6
|
+
} from "./chunk-SR4FE5VD.js";
|
|
7
7
|
import {
|
|
8
8
|
estimateTokenCount
|
|
9
9
|
} from "./chunk-PSCNXBYA.js";
|
|
10
|
+
import {
|
|
11
|
+
isAbortError
|
|
12
|
+
} from "./chunk-7DPNBQSV.js";
|
|
10
13
|
import {
|
|
11
14
|
asTrimmedNonEmptyStringArray
|
|
12
15
|
} from "./chunk-I42VC5KR.js";
|
|
13
16
|
import {
|
|
14
17
|
ALL_MODELS
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
MODEL_LOOKUP_MAP
|
|
18
|
-
} from "./chunk-CD3RU7XL.js";
|
|
18
|
+
} from "./chunk-776CXKMX.js";
|
|
19
19
|
import {
|
|
20
20
|
asOptionalFiniteNumber
|
|
21
21
|
} from "./chunk-WWC7I6TA.js";
|
|
22
|
+
import {
|
|
23
|
+
MODEL_LOOKUP_MAP
|
|
24
|
+
} from "./chunk-OJRTTERA.js";
|
|
22
25
|
import {
|
|
23
26
|
asOptionalTrimmedString
|
|
24
27
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -26,7 +29,7 @@ import {
|
|
|
26
29
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
27
30
|
isPlatformManagedProvider,
|
|
28
31
|
resolvePlatformEffectiveModel
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-U4VSBDO5.js";
|
|
30
33
|
|
|
31
34
|
// packages/core/chat/messageContentSerialize.ts
|
|
32
35
|
var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
|
|
@@ -321,12 +324,6 @@ async function runSummaryWithContract(args) {
|
|
|
321
324
|
return execute("current");
|
|
322
325
|
}
|
|
323
326
|
|
|
324
|
-
// packages/core/sha256.ts
|
|
325
|
-
import SHA256 from "crypto-js/sha256.js";
|
|
326
|
-
function sha256Hex(text) {
|
|
327
|
-
return SHA256(text).toString();
|
|
328
|
-
}
|
|
329
|
-
|
|
330
327
|
// packages/ai/context/toolOutputCap.ts
|
|
331
328
|
var TOOL_OUTPUT_CAP_WINDOW_RATIO = 0.12;
|
|
332
329
|
var TOOL_OUTPUT_CAP_MIN_TOKENS = 4e3;
|
|
@@ -1174,6 +1171,156 @@ function buildSummarySourceDiagnostics(messages, anchor) {
|
|
|
1174
1171
|
}
|
|
1175
1172
|
return rows;
|
|
1176
1173
|
}
|
|
1174
|
+
var MAX_SUMMARY_SOURCE_SEGMENTS = 16;
|
|
1175
|
+
function buildSummarySourceSegments(messages, anchor) {
|
|
1176
|
+
if (!anchor) return [];
|
|
1177
|
+
let end = messages.findIndex((message) => message.id === anchor);
|
|
1178
|
+
if (end === -1) {
|
|
1179
|
+
const legacy = /^local-(0|[1-9]\d*)$/.exec(anchor);
|
|
1180
|
+
if (legacy) {
|
|
1181
|
+
const index = Number(legacy[1]);
|
|
1182
|
+
if (Number.isSafeInteger(index) && index < messages.length) {
|
|
1183
|
+
end = index;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
if (end < 0) return [];
|
|
1188
|
+
const totalCount = end + 1;
|
|
1189
|
+
const width = Math.max(1, Math.ceil(totalCount / MAX_SUMMARY_SOURCE_SEGMENTS));
|
|
1190
|
+
const segments = [];
|
|
1191
|
+
for (let start = 0; start < totalCount; start += width) {
|
|
1192
|
+
const segEnd = Math.min(end, start + width - 1);
|
|
1193
|
+
const group = messages.slice(start, segEnd + 1);
|
|
1194
|
+
const roleCounts = /* @__PURE__ */ new Map();
|
|
1195
|
+
for (const message of group) {
|
|
1196
|
+
const role = typeof message.role === "string" && message.role ? message.role : "unknown";
|
|
1197
|
+
roleCounts.set(role, (roleCounts.get(role) ?? 0) + 1);
|
|
1198
|
+
}
|
|
1199
|
+
const roles = Array.from(roleCounts.entries()).map(([role, count]) => `${role}:${count}`).join(",");
|
|
1200
|
+
const canonical = group.map((message, offset) => ({
|
|
1201
|
+
id: `local-${start + offset}`,
|
|
1202
|
+
role: message.role,
|
|
1203
|
+
content: message.content ?? "",
|
|
1204
|
+
...Array.isArray(message.tool_calls) ? { tool_calls: message.tool_calls } : {}
|
|
1205
|
+
}));
|
|
1206
|
+
const hash = sha256Hex(JSON.stringify(canonical)).slice(0, 16);
|
|
1207
|
+
segments.push({
|
|
1208
|
+
start,
|
|
1209
|
+
end: segEnd,
|
|
1210
|
+
count: group.length,
|
|
1211
|
+
roles,
|
|
1212
|
+
hash
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
return segments;
|
|
1216
|
+
}
|
|
1217
|
+
function diffSummarySourceSegments(savedSegments, currentSegments) {
|
|
1218
|
+
const saved = Array.isArray(savedSegments) ? savedSegments : [];
|
|
1219
|
+
const current = Array.isArray(currentSegments) ? currentSegments : [];
|
|
1220
|
+
const savedTotalCount = saved.reduce(
|
|
1221
|
+
(sum, seg) => sum + (typeof seg?.count === "number" && Number.isFinite(seg.count) ? seg.count : 0),
|
|
1222
|
+
0
|
|
1223
|
+
);
|
|
1224
|
+
const currentTotalCount = current.reduce(
|
|
1225
|
+
(sum, seg) => sum + (typeof seg?.count === "number" && Number.isFinite(seg.count) ? seg.count : 0),
|
|
1226
|
+
0
|
|
1227
|
+
);
|
|
1228
|
+
if (saved.length === 0) {
|
|
1229
|
+
return {
|
|
1230
|
+
matched: false,
|
|
1231
|
+
reason: "legacy_no_segments",
|
|
1232
|
+
firstMismatchIndex: null,
|
|
1233
|
+
savedSegmentCount: 0,
|
|
1234
|
+
currentSegmentCount: current.length,
|
|
1235
|
+
savedTotalCount: 0,
|
|
1236
|
+
currentTotalCount,
|
|
1237
|
+
savedSegment: null,
|
|
1238
|
+
currentSegment: null
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
if (current.length === 0) {
|
|
1242
|
+
return {
|
|
1243
|
+
matched: false,
|
|
1244
|
+
reason: "anchor_missing",
|
|
1245
|
+
firstMismatchIndex: null,
|
|
1246
|
+
savedSegmentCount: saved.length,
|
|
1247
|
+
currentSegmentCount: 0,
|
|
1248
|
+
savedTotalCount,
|
|
1249
|
+
currentTotalCount: 0,
|
|
1250
|
+
savedSegment: saved[0] ?? null,
|
|
1251
|
+
currentSegment: null
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
const minLen = Math.min(saved.length, current.length);
|
|
1255
|
+
let firstDiff = null;
|
|
1256
|
+
for (let i = 0; i < minLen; i++) {
|
|
1257
|
+
const s = saved[i];
|
|
1258
|
+
const c = current[i];
|
|
1259
|
+
if (!s || !c || s.start !== c.start || s.end !== c.end || s.count !== c.count || s.roles !== c.roles || s.hash !== c.hash) {
|
|
1260
|
+
firstDiff = i;
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
if (savedTotalCount !== currentTotalCount || saved.length !== current.length) {
|
|
1265
|
+
const idx = firstDiff ?? minLen;
|
|
1266
|
+
return {
|
|
1267
|
+
matched: false,
|
|
1268
|
+
reason: "count_changed",
|
|
1269
|
+
firstMismatchIndex: idx,
|
|
1270
|
+
savedSegmentCount: saved.length,
|
|
1271
|
+
currentSegmentCount: current.length,
|
|
1272
|
+
savedTotalCount,
|
|
1273
|
+
currentTotalCount,
|
|
1274
|
+
savedSegment: saved[idx] ?? null,
|
|
1275
|
+
currentSegment: current[idx] ?? null
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
if (firstDiff !== null) {
|
|
1279
|
+
const s = saved[firstDiff] ?? null;
|
|
1280
|
+
const c = current[firstDiff] ?? null;
|
|
1281
|
+
const boundsChanged = !s || !c || s.start !== c.start || s.end !== c.end || s.count !== c.count;
|
|
1282
|
+
return {
|
|
1283
|
+
matched: false,
|
|
1284
|
+
reason: boundsChanged ? "count_changed" : "segment_hash_changed",
|
|
1285
|
+
firstMismatchIndex: firstDiff,
|
|
1286
|
+
savedSegmentCount: saved.length,
|
|
1287
|
+
currentSegmentCount: current.length,
|
|
1288
|
+
savedTotalCount,
|
|
1289
|
+
currentTotalCount,
|
|
1290
|
+
savedSegment: s,
|
|
1291
|
+
currentSegment: c
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
return {
|
|
1295
|
+
matched: true,
|
|
1296
|
+
reason: "matched",
|
|
1297
|
+
firstMismatchIndex: null,
|
|
1298
|
+
savedSegmentCount: saved.length,
|
|
1299
|
+
currentSegmentCount: current.length,
|
|
1300
|
+
savedTotalCount,
|
|
1301
|
+
currentTotalCount,
|
|
1302
|
+
savedSegment: null,
|
|
1303
|
+
currentSegment: null
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
function sanitizeSummarySourceSegments(raw) {
|
|
1307
|
+
if (!Array.isArray(raw) || raw.length === 0) return void 0;
|
|
1308
|
+
const sanitized = [];
|
|
1309
|
+
for (const item of raw.slice(0, MAX_SUMMARY_SOURCE_SEGMENTS)) {
|
|
1310
|
+
if (!item || typeof item !== "object") continue;
|
|
1311
|
+
const candidate = item;
|
|
1312
|
+
const start = candidate.start;
|
|
1313
|
+
const end = candidate.end;
|
|
1314
|
+
const count = candidate.count;
|
|
1315
|
+
const roles = candidate.roles;
|
|
1316
|
+
const hash = candidate.hash;
|
|
1317
|
+
if (typeof start !== "number" || !Number.isSafeInteger(start) || start < 0 || typeof end !== "number" || !Number.isSafeInteger(end) || end < start || typeof count !== "number" || !Number.isSafeInteger(count) || count < 1 || typeof roles !== "string" || roles.length === 0 || roles.length > 128 || /[\r\n\0]/.test(roles) || typeof hash !== "string" || !/^[0-9a-f]{16}$/.test(hash)) {
|
|
1318
|
+
continue;
|
|
1319
|
+
}
|
|
1320
|
+
sanitized.push({ start, end, count, roles, hash });
|
|
1321
|
+
}
|
|
1322
|
+
return sanitized.length > 0 ? sanitized : void 0;
|
|
1323
|
+
}
|
|
1177
1324
|
|
|
1178
1325
|
// packages/ai/llm/getModelContextWindow.ts
|
|
1179
1326
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
@@ -1181,7 +1328,7 @@ var QWEN_3_6_CONTEXT_WINDOW = 262144;
|
|
|
1181
1328
|
var GLM_5_2_CONTEXT_WINDOW = 1e6;
|
|
1182
1329
|
var GPT_6_1_SOL_CONTEXT_WINDOW = 5e5;
|
|
1183
1330
|
var GPT_6_1_SOL_PATTERN = /(^|\/)gpt-6\.1[- ]sol(?![a-z])/;
|
|
1184
|
-
var GPT_6_1_PINNED_PATTERN = /(^|\/)gpt-6\.1[- ](sol|terra)(?![a-z0-9])/;
|
|
1331
|
+
var GPT_6_1_PINNED_PATTERN = /(^|\/)gpt-(?:6\.1[- ](sol|terra)|6\.2[- ](sol|astra))(?![a-z0-9])/;
|
|
1185
1332
|
var GPT_272K_PINNED_PATTERN = /(^|\/)(gpt-6[- ](astra|luna|sol)|gpt-5\.6[- ](sol|terra|luna))(?![a-z0-9])/;
|
|
1186
1333
|
var GPT_272K_CONTEXT_WINDOW = 272e3;
|
|
1187
1334
|
function channelPinnedContextWindow(normalizedName) {
|
|
@@ -1401,12 +1548,14 @@ export {
|
|
|
1401
1548
|
summaryCompletionTokens,
|
|
1402
1549
|
selectSummaryRoute,
|
|
1403
1550
|
runSummaryWithContract,
|
|
1404
|
-
sha256Hex,
|
|
1405
1551
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
1406
1552
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
1407
1553
|
buildBoundedCompactionRequest,
|
|
1408
1554
|
buildCompactionMetricsFromPlan,
|
|
1409
1555
|
formatCompactionMetricsLog,
|
|
1410
1556
|
computeSummarySourceMetadata,
|
|
1411
|
-
buildSummarySourceDiagnostics
|
|
1557
|
+
buildSummarySourceDiagnostics,
|
|
1558
|
+
buildSummarySourceSegments,
|
|
1559
|
+
diffSummarySourceSegments,
|
|
1560
|
+
sanitizeSummarySourceSegments
|
|
1412
1561
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
|
|
3
|
-
canonicalizeToolNames
|
|
4
|
-
} from "./chunk-6OVNSQHN.js";
|
|
5
1
|
import {
|
|
6
2
|
buildSkillDocMarkdown,
|
|
7
3
|
resolvePageSkillMetadata
|
|
8
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AETZ7AD6.js";
|
|
9
5
|
import {
|
|
10
6
|
nolotusId
|
|
11
7
|
} from "./chunk-ZVOL2MAJ.js";
|
|
12
8
|
import {
|
|
13
9
|
createKey
|
|
14
10
|
} from "./chunk-SYTHYBMI.js";
|
|
11
|
+
import {
|
|
12
|
+
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
|
|
13
|
+
canonicalizeToolNames
|
|
14
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
15
15
|
import {
|
|
16
16
|
asNonEmptyStringArray
|
|
17
17
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -19,6 +19,126 @@ import {
|
|
|
19
19
|
asOptionalTrimmedString
|
|
20
20
|
} from "./chunk-G3SUCT4W.js";
|
|
21
21
|
|
|
22
|
+
// packages/agent-runtime/pluginManagementSpecs.ts
|
|
23
|
+
var PLUGIN_MANAGEMENT_TOOL_NAMES = ["listPlugins", "setPluginEnabled", "configurePlugin", "diagnosePlugin"];
|
|
24
|
+
var PLUGIN_KINDS = ["ui", "data-source", "system-capability", "cloud", "mcp"];
|
|
25
|
+
var managementFailure = (code) => ({
|
|
26
|
+
ok: false,
|
|
27
|
+
error: { code }
|
|
28
|
+
});
|
|
29
|
+
var text = { type: "string", minLength: 1, maxLength: 128, pattern: "^[A-Za-z0-9][A-Za-z0-9_.:-]*$" };
|
|
30
|
+
var object = (properties, required = Object.keys(properties)) => ({
|
|
31
|
+
type: "object",
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
properties,
|
|
34
|
+
required
|
|
35
|
+
});
|
|
36
|
+
var target = {
|
|
37
|
+
oneOf: [
|
|
38
|
+
object({ kind: { enum: ["server", "local"] } }),
|
|
39
|
+
object({ kind: { const: "machine" }, machineId: text })
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
var subject = {
|
|
43
|
+
oneOf: [
|
|
44
|
+
object({ kind: { enum: ["ui", "data-source", "system-capability"] }, id: text }),
|
|
45
|
+
object({ kind: { const: "cloud" }, id: text, connectionId: text }, ["kind", "id"]),
|
|
46
|
+
object({ kind: { const: "mcp" }, id: text, connectionId: text }, ["kind", "id"]),
|
|
47
|
+
object({ kind: { const: "mcp" }, connectionId: text })
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
var revision = { type: "integer", minimum: 1, maximum: Number.MAX_SAFE_INTEGER };
|
|
51
|
+
var PLUGIN_MANAGEMENT_SCHEMAS = {
|
|
52
|
+
listPlugins: {
|
|
53
|
+
name: "listPlugins",
|
|
54
|
+
description: "Discover registered plugins and authenticated account configuration; does not connect or execute.",
|
|
55
|
+
parameters: object({ kind: { enum: PLUGIN_KINDS }, target }, [])
|
|
56
|
+
},
|
|
57
|
+
setPluginEnabled: {
|
|
58
|
+
name: "setPluginEnabled",
|
|
59
|
+
description: "Change an existing account plugin switch. MCP requires expectedRevision. Does not grant execution or start programs.",
|
|
60
|
+
parameters: object({ subject, target, enabled: { type: "boolean" }, expectedRevision: revision }, ["subject", "enabled"])
|
|
61
|
+
},
|
|
62
|
+
configurePlugin: {
|
|
63
|
+
name: "configurePlugin",
|
|
64
|
+
description: "Return the authenticated UI entry and required field metadata without reading secret endpoints or credential refs.",
|
|
65
|
+
parameters: object({ subject, target }, ["subject"])
|
|
66
|
+
},
|
|
67
|
+
diagnosePlugin: {
|
|
68
|
+
name: "diagnosePlugin",
|
|
69
|
+
description: "Inspect configuration facts. Connectivity requires the execution approval bridge; never implicitly launches or connects.",
|
|
70
|
+
parameters: object({ subject, target, mode: { enum: ["configuration", "connectivity"] } }, ["subject", "mode"])
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function record(value) {
|
|
74
|
+
return !!value && typeof value === "object" && !Array.isArray(value) && [Object.prototype, null].includes(Object.getPrototypeOf(value));
|
|
75
|
+
}
|
|
76
|
+
var identifier = (value) => typeof value === "string" && /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/.test(value);
|
|
77
|
+
var keys = (value, allowed) => Object.keys(value).every((key) => allowed.includes(key));
|
|
78
|
+
function parsePluginManagementInput(tool, value) {
|
|
79
|
+
const bad = () => managementFailure("invalid_input");
|
|
80
|
+
try {
|
|
81
|
+
if (!record(value) || !keys(value, Object.keys(PLUGIN_MANAGEMENT_SCHEMAS[tool].parameters.properties))) return bad();
|
|
82
|
+
if (value.target !== void 0) {
|
|
83
|
+
const t = value.target;
|
|
84
|
+
if (!record(t) || !keys(t, t.kind === "machine" ? ["kind", "machineId"] : ["kind"]) || !["server", "local", "machine"].includes(String(t.kind)) || t.kind === "machine" && !identifier(t.machineId)) {
|
|
85
|
+
return bad();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (tool === "listPlugins") {
|
|
89
|
+
if (value.kind !== void 0 && !PLUGIN_KINDS.includes(value.kind)) return bad();
|
|
90
|
+
} else {
|
|
91
|
+
const s = value.subject;
|
|
92
|
+
if (!record(s) || !keys(s, ["kind", "id", "connectionId"]) || !PLUGIN_KINDS.includes(s.kind) || s.id !== void 0 && !identifier(s.id) || s.connectionId !== void 0 && !identifier(s.connectionId) || (s.kind === "mcp" ? !s.id && !s.connectionId : !s.id)) {
|
|
93
|
+
return bad();
|
|
94
|
+
}
|
|
95
|
+
if (!["mcp", "cloud"].includes(String(s.kind)) && s.connectionId !== void 0) return bad();
|
|
96
|
+
if (tool === "setPluginEnabled" && (typeof value.enabled !== "boolean" || s.kind === "mcp" && !s.connectionId || s.kind === "mcp" && value.expectedRevision === void 0)) {
|
|
97
|
+
return bad();
|
|
98
|
+
}
|
|
99
|
+
if (value.expectedRevision !== void 0 && (!Number.isSafeInteger(value.expectedRevision) || value.expectedRevision < 1)) {
|
|
100
|
+
return bad();
|
|
101
|
+
}
|
|
102
|
+
if (tool === "diagnosePlugin" && !["configuration", "connectivity"].includes(String(value.mode))) return bad();
|
|
103
|
+
}
|
|
104
|
+
return { ok: true, value: structuredClone(value) };
|
|
105
|
+
} catch {
|
|
106
|
+
return bad();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// packages/ai/skills/pluginConfigurationSkill.ts
|
|
111
|
+
var PLUGIN_CONFIGURATION_SKILL_SLUGS = ["plugin-configuration"];
|
|
112
|
+
var buildPluginConfigurationSkillId = (_slug) => "builtin-plugin-config-v1";
|
|
113
|
+
var buildPluginConfigurationSkillPageKey = (userId, slug) => `page-${userId}-${buildPluginConfigurationSkillId(slug)}`;
|
|
114
|
+
function buildPluginConfigurationSkillConfig(_slug) {
|
|
115
|
+
return {
|
|
116
|
+
version: "0.1",
|
|
117
|
+
kind: "skill",
|
|
118
|
+
id: buildPluginConfigurationSkillId(_slug),
|
|
119
|
+
name: "\u63D2\u4EF6\u914D\u7F6E\u52A9\u624B\uFF08plugin-configuration\uFF09",
|
|
120
|
+
description: "\u901A\u8FC7\u5B9E\u9645\u7BA1\u7406\u5DE5\u5177\u53D1\u73B0\u3001\u542F\u505C\u3001\u53D7\u63A7\u914D\u7F6E\u548C\u8BCA\u65AD\u63D2\u4EF6\uFF1B\u6309\u5F53\u524D\u6267\u884C\u9762\u4E0E\u771F\u5B9E\u6CE8\u518C\u8868\u5224\u65AD\u53EF\u7528\u6027\u3002",
|
|
121
|
+
triggerMode: "explicit",
|
|
122
|
+
toolNames: [...PLUGIN_MANAGEMENT_TOOL_NAMES]
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function buildPluginConfigurationSkillContent(_slug) {
|
|
126
|
+
return buildSkillDocMarkdown({
|
|
127
|
+
skillConfig: buildPluginConfigurationSkillConfig(_slug),
|
|
128
|
+
body: `# \u63D2\u4EF6\u914D\u7F6E\u52A9\u624B
|
|
129
|
+
|
|
130
|
+
\u5148\u786E\u8BA4\u672C\u8F6E\u5B9E\u9645\u63D0\u4F9B\u4E86\u54EA\u4E9B\u7BA1\u7406\u5DE5\u5177\uFF1BSkill \u88AB\u52A0\u8F7D\u4E0D\u4EE3\u8868\u5DE5\u5177\u5DF2\u63A5\u7EBF\u6216\u5404\u7AEF\u5DF2\u652F\u6301\u3002
|
|
131
|
+
|
|
132
|
+
- \u7528 listPlugins \u8BFB\u53D6\u771F\u5B9E\u6CE8\u518C\u8868\u3001\u8D26\u53F7\u72B6\u6001\u53CA\u53EF\u7528\u52A8\u4F5C\uFF0C\u4E0D\u6309\u9884\u8BBE\u540D\u79F0\u731C\u5B57\u6BB5\uFF0C\u4E0D\u4E3A\u6BCF\u4E2A\u9884\u8BBE\u590D\u5236\u6D41\u7A0B\u3002
|
|
133
|
+
- \u7528 setPluginEnabled \u4FEE\u6539\u5DF2\u5B58\u5728\u7684\u5F00\u5173\uFF1BMCP \u4F7F\u7528\u8BFB\u53D6\u5230\u7684 connectionId \u4E0E revision\uFF0C\u51B2\u7A81\u65F6\u91CD\u8BFB\uFF0C\u4E0D\u8986\u76D6\u672A\u77E5\u72B6\u6001\u3002
|
|
134
|
+
- \u7528 configurePlugin \u8FDB\u5165\u73B0\u6709\u8BA4\u8BC1\u914D\u7F6E\u9875\u9762\uFF0C\u51ED\u636E\u7531\u7528\u6237\u5728\u53D7\u63A7\u5165\u53E3\u8F93\u5165\u3002\u8FD4\u56DE pending \u53EA\u8868\u793A\u4ECD\u5F85\u4EA4\u4E92\uFF0C\u4E0D\u80FD\u8BF4\u4FDD\u5B58\u5B8C\u6210\uFF1B\u6CA1\u6709\u771F\u5B9E\u5165\u53E3\u5219\u62A5\u544A unavailable\u3002
|
|
135
|
+
- diagnosePlugin \u7684 configuration \u4EC5\u63CF\u8FF0\u914D\u7F6E\u4E8B\u5B9E\uFF1Bconnectivity \u5F53\u524D\u987B\u4EA4\u5BA1\u6279/\u6267\u884C\u6865\uFF0C\u4E0D\u80FD\u4E3A\u8BCA\u65AD\u81EA\u884C\u8054\u7F51\u6216\u542F\u52A8\u7A0B\u5E8F\u3002\u914D\u7F6E\u53EF\u7528\u4E0D\u7B49\u4E8E\u8FDE\u63A5\u53EF\u7528\u6216\u6267\u884C\u5DF2\u83B7\u6388\u6743\u3002
|
|
136
|
+
- \u4EC5\u6D88\u8D39\u7BA1\u7406\u5DE5\u5177\u7684\u8131\u654F\u7ED3\u679C\uFF1B\u4E0D\u8981\u7D22\u53D6\u6216\u8F93\u51FA secret\u3001endpoint\u3001credentialRef\u3001envRefs\u3002local/machine \u4E0D\u53EF\u7528\u65F6\u5982\u5B9E\u62A5\u544A\uFF0C\u4E0D\u6539\u6210 server \u6216\u4E0A\u4F20\u672C\u673A\u8D44\u6E90\u3002
|
|
137
|
+
|
|
138
|
+
\u4EA7\u54C1\u4E0E\u6743\u9650\u539F\u5219\u5F15\u7528 docs/product-foundation.md \xA75\u3001docs/product/skill-model.md\uFF1B\u5F53\u524D\u7BA1\u7406\u5951\u7EA6\u89C1 packages/agent-runtime/pluginManagementSpecs.ts\u3002Skill \u4E0D\u4FDD\u5B58\u914D\u7F6E\u72B6\u6001\u3002`
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
22
142
|
// packages/ai/tools/agentCapabilities.ts
|
|
23
143
|
var SYSTEM_AGENT_CAPABILITIES = [
|
|
24
144
|
{
|
|
@@ -79,7 +199,7 @@ var CODE_WORK_DISCIPLINE_BODY = `## \u6548\u7387\u4F18\u5148\uFF08\u7701 token\u
|
|
|
79
199
|
- \u6309\u89D2\u8272\u52A0\u8F7D\u5BF9\u5E94 skill\uFF1Areviewer \u5148 \`loadSkill("coding-review")\` \u62FF\u901A\u7528\u6D41\u7A0B\uFF0C\u518D\u6309\u89D2\u8272 \`loadSkill("coding-review-<role>")\` \u62FF\u68C0\u67E5\u9879\u3002\u89D2\u8272\u6E05\u5355\uFF1Acode-quality\uFF08**\u5FC5\u8DD1**\uFF09/ architecture\uFF08**\u5355\u72EC\u6D3E\u53D1**\uFF0C\u4E2D\u7EA7\u4EE5\u4E0A\u95EE\u9898\uFF09/ security\uFF08\u6309\u9700 + \u5B89\u5168\u654F\u611F\u89E6\u53D1\u5FC5\u8DD1\uFF09/ frontend-ux\uFF08\u6D89\u53CA UI \u65F6\uFF09/ backend-data\uFF08\u6D89\u53CA server \u65F6\uFF09\u3002\u89D2\u8272\u5207\u5272\u7684\u76EE\u7684\u662F\u6CE8\u610F\u529B\u9694\u79BB\u2014\u2014\u6BCF\u4E2A\u89D2\u8272\u53EA\u76EF\u81EA\u5DF1\u7684\u68C0\u67E5\u9762\uFF0C\u6309\u9700\u542F\u7528\uFF0C\u907F\u514D\u4E00\u4E2A reviewer \u80CC\u6240\u6709\u89D2\u8272\u5BFC\u81F4\u6CE8\u610F\u529B\u7A00\u91CA\u3002
|
|
80
200
|
- Verdict \u6807\u51C6\uFF1AAPPROVE\uFF08\u65E0 CRITICAL \u6216 HIGH\uFF09\u2192 \u53EF commit\uFF1BWARNING\uFF08\u4EC5 HIGH\uFF09\u2192 \u62A5\u544A owner \u51B3\u5B9A\uFF1BBLOCK\uFF08\u6709 CRITICAL\uFF09\u2192 \u5FC5\u987B\u5148\u4FEE\u3002
|
|
81
201
|
- review \u662F\u591A\u8F6E\u6536\u655B\u7684\uFF1A\u6D3E reviewer \u5BA1\u5DE5\u4F5C\u533A diff \u2192 \u51FA finding \u5C31\u4FEE \u2192 \u590D\u5BA1\uFF0C\u76F4\u5230 APPROVE \u624D\u63D0\u4EA4\u3002\u6BCF\u8F6E review \u65E0\u4E0A\u4E0B\u6587\u2014\u2014reviewer \u53EA\u770B\u5F53\u524D\u5DE5\u4F5C\u533A diff\uFF0C\u4E0D\u5E26\u4E0A\u4E00\u8F6E finding \u8BB0\u5FC6\u3002**APPROVE \u53EA\u8986\u76D6\u88AB\u5BA1\u7684\u90A3\u4E00\u7248**\uFF1A\u6B64\u540E\u4EFB\u4F55\u6539\u52A8\uFF08\u542B\u91C7\u7EB3 nit\u3001\u542B\u53EA\u52A8\u6CE8\u91CA / \u6587\u6863\uFF09\u90FD\u8981\u91CD\u65B0\u8FC7\u4E00\u8F6E review\uFF0C\u4F5C\u8005\u81EA\u8BC4\u4E0D\u6784\u6210\u590D\u6838\uFF08\u771F\u6E90 docs/workflow.md\uFF09\u3002
|
|
82
|
-
- \u82E5\u5904\u4E8E\u5355 Agent \u72EC\u5360\u73AF\u5883\u3001\u5176\u4ED6 agent \u4E0D\u53EF\u8FBE\u3001\u6216\u7528\u6237\u660E\u786E\u8981\u6C42\u76F4\u63A5\u63D0\u4EA4\uFF1A\u4E0D\u8981\u8865\u5199\u6216\u4F2A\u9020 review \u8BC1\u636E\uFF0C\u4E5F**\u4E0D\u8981\u7528 [no-review: \u539F\u56E0] \u8FD9\u7C7B\u5199\u6CD5**\u2014\u2014\u5B83\u4EFB\u4F55\u5224\u636E\u90FD\u89E3\u6790\u4E0D\u4E86\uFF0C\u5199\u4E86\u7167\u6837\u88AB\u62E6\u3002\u81EA\u6709\u95F8\u95E8\u8BA4\u7684\u5F62\u5F0F\u662F Reviewed-by: <\u975E\u7A7A\u7F72\u540D> \u52A0 Review: \u5E26\u7ED3\u8BBA\uFF08APPROVE / Approved / WARNING\uFF0C\u5360\u4F4D\u7B26\u5982 <pending> \u4E0D\u7B97\uFF09\uFF0Ccommit-msg \u4E0E pre-merge \u90FD\u8D70\u8FD9\u4E00\u6761\u6B63\u5219\u3002pre-merge **\u53E6**\u8BA4\u4E00\u6761 owner-only \u8C41\u514D\uFF1A\u6B63\u6587\u5199 No-Review: <\u539F\u56E0> \u4E14 commit author email \u547D\u4E2D
|
|
202
|
+
- \u82E5\u5904\u4E8E\u5355 Agent \u72EC\u5360\u73AF\u5883\u3001\u5176\u4ED6 agent \u4E0D\u53EF\u8FBE\u3001\u6216\u7528\u6237\u660E\u786E\u8981\u6C42\u76F4\u63A5\u63D0\u4EA4\uFF1A\u4E0D\u8981\u8865\u5199\u6216\u4F2A\u9020 review \u8BC1\u636E\uFF0C\u4E5F**\u4E0D\u8981\u7528 [no-review: \u539F\u56E0] \u8FD9\u7C7B\u5199\u6CD5**\u2014\u2014\u5B83\u4EFB\u4F55\u5224\u636E\u90FD\u89E3\u6790\u4E0D\u4E86\uFF0C\u5199\u4E86\u7167\u6837\u88AB\u62E6\u3002\u81EA\u6709\u95F8\u95E8\u8BA4\u7684\u5F62\u5F0F\u662F Reviewed-by: <\u975E\u7A7A\u7F72\u540D> \u52A0 Review: \u5E26\u7ED3\u8BBA\uFF08APPROVE / Approved / WARNING\uFF0C\u5360\u4F4D\u7B26\u5982 <pending> \u4E0D\u7B97\uFF09\uFF0Ccommit-msg \u4E0E pre-merge \u90FD\u8D70\u8FD9\u4E00\u6761\u6B63\u5219\u3002pre-merge **\u53E6**\u8BA4\u4E00\u6761 owner-only \u8C41\u514D\uFF1A\u6B63\u6587\u5199 No-Review: <\u539F\u56E0> \u4E14 commit author email \u547D\u4E2D scripts/lib/reviewEvidencePolicy.ts \u7684 NO_REVIEW_OWNER_EMAILS \u767D\u540D\u5355\u2014\u2014agent \u8EAB\u4EFD\uFF08\u5982 app-builder@nolo.local\uFF09\u4E0D\u9002\u7528\u3002\u771F\u88AB\u5361\u4F4F\u5C31\u5982\u5B9E\u4E0A\u62A5\u5361\u70B9\u3001\u7531 owner \u51B3\u5B9A\uFF1B\u672C\u5730\u5DF2\u65E0\u63A8\u9001\u94A9\u5B50\uFF082026-11-09 \u79FB\u9664 pre-push\uFF09\uFF0C\u670D\u52A1\u7AEF G2 \u4E0D\u53EF\u7ED5\u8FC7\u3002`;
|
|
83
203
|
var buildCodeWorkDiscipline = (heading) => `# ${heading}
|
|
84
204
|
|
|
85
205
|
${CODE_WORK_DISCIPLINE_BODY}`;
|
|
@@ -135,6 +255,7 @@ var TOOL_PACKS = {
|
|
|
135
255
|
"applyLineEdits",
|
|
136
256
|
"codeSearch",
|
|
137
257
|
"globFiles",
|
|
258
|
+
"searchFiles",
|
|
138
259
|
"execShell",
|
|
139
260
|
"launchProcess",
|
|
140
261
|
"listProcesses",
|
|
@@ -518,8 +639,8 @@ var buildSkillGuidancePromptBlock = (options) => {
|
|
|
518
639
|
...skillPromptPatches
|
|
519
640
|
].filter(Boolean).join("\n");
|
|
520
641
|
};
|
|
521
|
-
var buildIdentifierCandidates = (
|
|
522
|
-
const trimmed =
|
|
642
|
+
var buildIdentifierCandidates = (identifier2, contentByKey) => {
|
|
643
|
+
const trimmed = identifier2.trim();
|
|
523
644
|
if (!trimmed || contentByKey.has(trimmed)) return trimmed;
|
|
524
645
|
const candidateToKey = /* @__PURE__ */ new Map();
|
|
525
646
|
for (const [key, page] of Array.from(contentByKey.entries())) {
|
|
@@ -546,21 +667,21 @@ async function resolveSkillGraphFromRoots(options) {
|
|
|
546
667
|
const contribution = createContribution();
|
|
547
668
|
const strict = options.strictRequiredDependencies === true;
|
|
548
669
|
const blockedRoots = [];
|
|
549
|
-
const mergeContribution = (
|
|
550
|
-
source.requiredTools.forEach((value) =>
|
|
551
|
-
source.recommendedTools.forEach((value) =>
|
|
552
|
-
source.recommendedSkillHints.forEach((value) =>
|
|
670
|
+
const mergeContribution = (target2, source) => {
|
|
671
|
+
source.requiredTools.forEach((value) => target2.requiredTools.add(value));
|
|
672
|
+
source.recommendedTools.forEach((value) => target2.recommendedTools.add(value));
|
|
673
|
+
source.recommendedSkillHints.forEach((value) => target2.recommendedSkillHints.add(value));
|
|
553
674
|
source.skillPromptPatches.forEach((value, skillId) => {
|
|
554
|
-
if (!
|
|
675
|
+
if (!target2.skillPromptPatches.has(skillId)) target2.skillPromptPatches.set(skillId, value);
|
|
555
676
|
});
|
|
556
677
|
for (const visit2 of source.visits) {
|
|
557
678
|
const key = `${visit2.mode}:${visit2.dbKey}`;
|
|
558
|
-
if (!
|
|
559
|
-
|
|
679
|
+
if (!target2.visited.has(key)) target2.visits.push(visit2);
|
|
680
|
+
target2.visited.add(key);
|
|
560
681
|
}
|
|
561
682
|
};
|
|
562
|
-
const loadPageCached = async (
|
|
563
|
-
const resolvedIdentifier = buildIdentifierCandidates(
|
|
683
|
+
const loadPageCached = async (identifier2) => {
|
|
684
|
+
const resolvedIdentifier = buildIdentifierCandidates(identifier2, contentByKey);
|
|
564
685
|
if (!resolvedIdentifier) return null;
|
|
565
686
|
if (contentByKey.has(resolvedIdentifier)) {
|
|
566
687
|
return contentByKey.get(resolvedIdentifier) ?? null;
|
|
@@ -574,9 +695,9 @@ async function resolveSkillGraphFromRoots(options) {
|
|
|
574
695
|
}
|
|
575
696
|
return page ?? null;
|
|
576
697
|
};
|
|
577
|
-
const visit = async (
|
|
578
|
-
const page = await loadPageCached(
|
|
579
|
-
if (!page?.dbKey) return strict ? [{ path: [...path,
|
|
698
|
+
const visit = async (identifier2, mode, sourceLabel, target2, path = []) => {
|
|
699
|
+
const page = await loadPageCached(identifier2);
|
|
700
|
+
if (!page?.dbKey) return strict ? [{ path: [...path, identifier2], reason: "missing" }] : [];
|
|
580
701
|
const meta = resolvePageSkillMetadata(page);
|
|
581
702
|
const canonicalIdentifier = asOptionalTrimmedString(meta?.skillConfig?.id) ?? page.dbKey;
|
|
582
703
|
const nextPath = [...path, canonicalIdentifier];
|
|
@@ -584,12 +705,12 @@ async function resolveSkillGraphFromRoots(options) {
|
|
|
584
705
|
return strict ? [{ path: nextPath, reason: "denied" }] : [];
|
|
585
706
|
}
|
|
586
707
|
const visitKey = `${mode}:${page.dbKey}`;
|
|
587
|
-
if (
|
|
588
|
-
|
|
708
|
+
if (target2.visited.has(visitKey)) return [];
|
|
709
|
+
target2.visited.add(visitKey);
|
|
589
710
|
const directTools = canonicalizeToolNames(page.tools ?? []);
|
|
590
711
|
const skillTools = canonicalizeToolNames(meta?.skillConfig?.toolNames ?? []);
|
|
591
712
|
const mergedTools = joinUniqueStrings(directTools, skillTools);
|
|
592
|
-
|
|
713
|
+
target2.visits.push({
|
|
593
714
|
dbKey: page.dbKey,
|
|
594
715
|
title: page.title,
|
|
595
716
|
mode,
|
|
@@ -597,46 +718,46 @@ async function resolveSkillGraphFromRoots(options) {
|
|
|
597
718
|
meta
|
|
598
719
|
});
|
|
599
720
|
if (mode === "required") {
|
|
600
|
-
mergedTools.forEach((toolName) =>
|
|
721
|
+
mergedTools.forEach((toolName) => target2.requiredTools.add(toolName));
|
|
601
722
|
if (meta?.skillConfig?.promptPatch) {
|
|
602
|
-
|
|
723
|
+
target2.skillPromptPatches.set(canonicalIdentifier, meta.skillConfig.promptPatch);
|
|
603
724
|
}
|
|
604
725
|
} else {
|
|
605
|
-
mergedTools.forEach((toolName) =>
|
|
726
|
+
mergedTools.forEach((toolName) => target2.recommendedTools.add(toolName));
|
|
606
727
|
if (meta?.skillConfig?.name) {
|
|
607
|
-
|
|
728
|
+
target2.recommendedSkillHints.add(meta.skillConfig.name);
|
|
608
729
|
}
|
|
609
730
|
}
|
|
610
731
|
const nextHard = meta?.requiredSkills ?? meta?.skillConfig?.requiredSkills ?? [];
|
|
611
732
|
const nextSoft = meta?.recommendedSkills ?? meta?.skillConfig?.recommendedSkills ?? [];
|
|
612
733
|
if (strict) {
|
|
613
734
|
const failures = (await Promise.all(nextHard.map(
|
|
614
|
-
(childKey) => visit(childKey, mode, page.dbKey,
|
|
735
|
+
(childKey) => visit(childKey, mode, page.dbKey, target2, nextPath)
|
|
615
736
|
))).flat();
|
|
616
737
|
await Promise.all(nextSoft.map(async (childKey) => {
|
|
617
|
-
const branch = createContribution(
|
|
738
|
+
const branch = createContribution(target2.visited);
|
|
618
739
|
const branchFailures = await visit(childKey, "recommended", page.dbKey, branch, nextPath);
|
|
619
|
-
if (branchFailures.length === 0) mergeContribution(
|
|
740
|
+
if (branchFailures.length === 0) mergeContribution(target2, branch);
|
|
620
741
|
}));
|
|
621
742
|
return failures;
|
|
622
743
|
}
|
|
623
744
|
if (mode === "required") {
|
|
624
|
-
await Promise.all(nextHard.map((childKey) => visit(childKey, "required", page.dbKey,
|
|
625
|
-
await Promise.all(nextSoft.map((childKey) => visit(childKey, "recommended", page.dbKey,
|
|
745
|
+
await Promise.all(nextHard.map((childKey) => visit(childKey, "required", page.dbKey, target2)));
|
|
746
|
+
await Promise.all(nextSoft.map((childKey) => visit(childKey, "recommended", page.dbKey, target2)));
|
|
626
747
|
return [];
|
|
627
748
|
}
|
|
628
|
-
await Promise.all([...nextHard, ...nextSoft].map((childKey) => visit(childKey, "recommended", page.dbKey,
|
|
749
|
+
await Promise.all([...nextHard, ...nextSoft].map((childKey) => visit(childKey, "recommended", page.dbKey, target2)));
|
|
629
750
|
return [];
|
|
630
751
|
};
|
|
631
752
|
if (strict) {
|
|
632
753
|
const results = await Promise.all(options.roots.map(async (root) => {
|
|
633
|
-
const
|
|
634
|
-
const failures = await visit(root.identifier, root.mode, root.sourceLabel,
|
|
635
|
-
return { root, target, failures };
|
|
754
|
+
const target2 = createContribution();
|
|
755
|
+
const failures = await visit(root.identifier, root.mode, root.sourceLabel, target2);
|
|
756
|
+
return { root, target: target2, failures };
|
|
636
757
|
}));
|
|
637
|
-
for (const { root, target, failures } of results) {
|
|
758
|
+
for (const { root, target: target2, failures } of results) {
|
|
638
759
|
if (failures.length > 0) blockedRoots.push(...failures.map((failure) => ({ root, ...failure })));
|
|
639
|
-
else mergeContribution(contribution,
|
|
760
|
+
else mergeContribution(contribution, target2);
|
|
640
761
|
}
|
|
641
762
|
} else {
|
|
642
763
|
await Promise.all(options.roots.map(
|
|
@@ -2725,6 +2846,13 @@ var SOURCES = [
|
|
|
2725
2846
|
buildConfig: buildCodingSkillConfig,
|
|
2726
2847
|
buildContent: buildCodingSkillContentBySlug
|
|
2727
2848
|
},
|
|
2849
|
+
{
|
|
2850
|
+
slugs: PLUGIN_CONFIGURATION_SKILL_SLUGS,
|
|
2851
|
+
buildSkillId: buildPluginConfigurationSkillId,
|
|
2852
|
+
buildPageKey: buildPluginConfigurationSkillPageKey,
|
|
2853
|
+
buildConfig: buildPluginConfigurationSkillConfig,
|
|
2854
|
+
buildContent: buildPluginConfigurationSkillContent
|
|
2855
|
+
},
|
|
2728
2856
|
{
|
|
2729
2857
|
slugs: SPECIALIST_SKILL_SLUGS,
|
|
2730
2858
|
buildSkillId: buildSpecialistSkillId,
|
|
@@ -2867,8 +2995,8 @@ var BY_LOWER_NAME = new Map(
|
|
|
2867
2995
|
REGISTRY.map((entry) => [entry.title.trim().toLowerCase(), entry])
|
|
2868
2996
|
);
|
|
2869
2997
|
var listBuiltinSkills = () => REGISTRY;
|
|
2870
|
-
var resolveBuiltinSkillEntry = (
|
|
2871
|
-
const raw = typeof
|
|
2998
|
+
var resolveBuiltinSkillEntry = (identifier2) => {
|
|
2999
|
+
const raw = typeof identifier2 === "string" ? identifier2.trim() : "";
|
|
2872
3000
|
if (!raw) return null;
|
|
2873
3001
|
const bySlug = BY_SLUG.get(raw);
|
|
2874
3002
|
if (bySlug) return bySlug;
|
|
@@ -2881,16 +3009,16 @@ var resolveBuiltinSkillEntry = (identifier) => {
|
|
|
2881
3009
|
}
|
|
2882
3010
|
return null;
|
|
2883
3011
|
};
|
|
2884
|
-
var resolveBuiltinSkillByName = (
|
|
2885
|
-
const raw = typeof
|
|
3012
|
+
var resolveBuiltinSkillByName = (identifier2) => {
|
|
3013
|
+
const raw = typeof identifier2 === "string" ? identifier2.trim() : "";
|
|
2886
3014
|
if (!raw) return null;
|
|
2887
3015
|
return resolveBuiltinSkillEntry(raw) ?? BY_LOWER_NAME.get(raw.toLowerCase()) ?? null;
|
|
2888
3016
|
};
|
|
2889
|
-
var resolveBuiltinSkillSlug = (
|
|
2890
|
-
var resolveBuiltinSkillPage = (
|
|
2891
|
-
const entry = resolveBuiltinSkillEntry(
|
|
3017
|
+
var resolveBuiltinSkillSlug = (identifier2) => resolveBuiltinSkillEntry(identifier2)?.slug ?? null;
|
|
3018
|
+
var resolveBuiltinSkillPage = (identifier2) => {
|
|
3019
|
+
const entry = resolveBuiltinSkillEntry(identifier2);
|
|
2892
3020
|
if (!entry) return null;
|
|
2893
|
-
const raw = typeof
|
|
3021
|
+
const raw = typeof identifier2 === "string" ? identifier2.trim() : entry.slug;
|
|
2894
3022
|
return {
|
|
2895
3023
|
dbKey: raw || entry.slug,
|
|
2896
3024
|
title: entry.title,
|
|
@@ -2921,6 +3049,10 @@ var CAPABILITY_SLUG_COLLISIONS = ["app-builder"];
|
|
|
2921
3049
|
|
|
2922
3050
|
export {
|
|
2923
3051
|
WORKTREE_ISOLATION_PRELUDE,
|
|
3052
|
+
PLUGIN_MANAGEMENT_TOOL_NAMES,
|
|
3053
|
+
managementFailure,
|
|
3054
|
+
PLUGIN_MANAGEMENT_SCHEMAS,
|
|
3055
|
+
parsePluginManagementInput,
|
|
2924
3056
|
DEFAULT_SYSTEM_AGENT_CAPABILITIES,
|
|
2925
3057
|
TOOL_PACKS,
|
|
2926
3058
|
CAPABILITY_PACKS,
|
|
@@ -287,12 +287,18 @@ function formatFinishedRunCard(agentName, status, opts) {
|
|
|
287
287
|
const L = resolveLabels(opts?.labels);
|
|
288
288
|
const icon = getAgentRunStatusIcon(status);
|
|
289
289
|
const age = formatRunAge(opts?.timing, opts?.now);
|
|
290
|
-
const
|
|
291
|
-
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
290
|
+
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L);
|
|
292
291
|
const identity = formatIdentityRow(agentName, opts?.runId, {
|
|
293
292
|
title: opts?.title,
|
|
294
293
|
unnamedAgent: L.unnamedAgent
|
|
295
294
|
});
|
|
295
|
+
if (status === "done" && !opts?.errorMessage?.trim()) {
|
|
296
|
+
const head = identity || L.statusWord(status);
|
|
297
|
+
const parts = [head, age, progress].filter(Boolean);
|
|
298
|
+
return `${icon} ${parts.join(" \xB7 ")}`;
|
|
299
|
+
}
|
|
300
|
+
const summary = [L.statusWord(status), age, progress].filter(Boolean).join(" \xB7 ");
|
|
301
|
+
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
296
302
|
if (identity) {
|
|
297
303
|
lines.push(` ${L.rows.agent}${identity}`);
|
|
298
304
|
}
|