nolo-cli 0.107.0-alpha.4 → 0.107.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 +1 -1
- package/{_executeModel-UDCSOTD2.js → _executeModel-M573MKVE.js} +78 -70
- package/action-GVA5ARSJ.js +20 -0
- package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
- package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
- package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-ZFHYRHBS.js} +118 -43
- package/{agentEmailCommands-AU5I4M4W.js → agentEmailCommands-X6AVPIVQ.js} +100 -90
- package/agentListCommands-PAD2CI2I.js +741 -0
- package/{agentMachineCommands-YMNME2L6.js → agentMachineCommands-UPH6RJCC.js} +50 -46
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-UMACPRAF.js +138 -0
- package/agentRunCommand-H6KKHHMU.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
- package/{agentSlice-R7PR6KYM.js → agentSlice-2LPP43XH.js} +15 -14
- package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
- package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
- package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
- package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
- package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
- package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
- package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
- package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
- package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
- package/{chunk-XT35TTFG.js → chunk-3IXAHOJS.js} +19 -21
- package/{chunk-UVA7OYO3.js → chunk-3W67RV75.js} +29 -9
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/{chunk-C3M4465B.js → chunk-5HYJ3DSZ.js} +404 -659
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
- package/{chunk-3UZPUAES.js → chunk-74PPKIY2.js} +1 -1
- package/chunk-76HO2DP6.js +15 -0
- package/{chunk-ASIFZ2WY.js → chunk-7BBP7ZX3.js} +66 -54
- package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
- package/{chunk-IBOZNTG2.js → chunk-7X5XZ34C.js} +23 -28
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-5UTFL4QJ.js → chunk-APO5TOXO.js} +1 -1
- package/{chunk-EEGDMATE.js → chunk-AZOVPTL6.js} +91 -81
- package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
- package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
- package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
- package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-W7HLWAQ7.js → chunk-DE45KZNH.js} +118 -90
- package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
- package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
- package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
- package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
- package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
- package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
- package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
- package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
- package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
- package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
- package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
- package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
- package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
- package/{chunk-4CR5I7BD.js → chunk-KFWDYYSS.js} +47 -67
- package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
- package/{chunk-JDPFV2JV.js → chunk-KWUKOQM2.js} +20 -11
- package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
- package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
- package/chunk-LWLNLZC5.js +265 -0
- package/chunk-N4NGJDT6.js +929 -0
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/chunk-O7SVKKLY.js +875 -0
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
- package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
- package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
- package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
- package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
- package/chunk-RQ6CTX2E.js +164 -0
- package/{chunk-MS7TSPZR.js → chunk-RU36ZYSG.js} +19 -17
- package/{chunk-ALXHV7NK.js → chunk-RWXLPUKI.js} +40 -4
- package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
- package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
- package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
- package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
- package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
- package/{chunk-NOF3HDSN.js → chunk-TFOIJFCM.js} +11 -9
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/chunk-UM7TA3K4.js +1008 -0
- package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
- package/{chunk-GL3EHUR4.js → chunk-VHGYUYQ3.js} +69 -47
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/chunk-VM6IE2GN.js +8004 -0
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/chunk-VZLO4XJD.js +17 -0
- package/chunk-W32HPLTL.js +13692 -0
- package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
- package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
- package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
- package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
- package/chunk-YV25TM3R.js +780 -0
- package/chunk-ZRAU6T47.js +56 -0
- package/{chunk-IBOOZVVD.js → chunk-ZTKZZY2A.js} +851 -279
- package/commandRegistry-ASW6IVZ3.js +833 -0
- package/{contentThunks-IV2T3EJC.js → contentThunks-4XNVOIR7.js} +39 -36
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-NHHTCJMC.js} +40 -37
- package/createDialogAction-XEBTHDB3.js +70 -0
- package/{createPageAction-D2VOOLP3.js → createPageAction-VR3WW2AQ.js} +47 -43
- package/{chunk-FG3HKPQP.js → cursorProvider-YGGNMVWX.js} +2751 -10185
- package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
- package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
- package/{dialogCommands-H7FPUYUQ.js → dialogCommands-FJWQG3MX.js} +50 -47
- package/{dialogSlice-6JZOOTDS.js → dialogSlice-GVRDGCRG.js} +57 -37
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
- package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
- package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
- package/{docStore-HUPQ2FSS.js → docStore-SUZUUWDI.js} +17 -13
- package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
- package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-VC6VTFKS.js} +109 -42
- package/index.js +87 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-M2T2I5NF.js → machineCommands-M634V2L3.js} +98 -89
- package/machineWsRunDispatch-Z3HUSTFI.js +154 -0
- package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
- package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
- package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
- package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
- package/{readlineWorkspace-XQRDGWRZ.js → readlineWorkspace-J3YD3DNW.js} +2596 -2032
- package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
- package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-APSMCLAF.js} +79 -72
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
- package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
- package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
- package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-DNY2PSRW.js} +215 -115
- package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
- package/tools-X5UWATZK.js +117 -0
- package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-YSY5BF5A.js} +84 -45
- package/action-P4TNFGAD.js +0 -31
- package/agentListCommands-B2V4YAC4.js +0 -410
- package/agentRecordCommands-G4KK4R7H.js +0 -128
- package/agentRunCommand-UTZJA23G.js +0 -156
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-T75QD6AB.js +0 -20923
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-NGG7YVNU.js +0 -65
- package/machineWsRunDispatch-ISBKOOD7.js +0 -144
- package/settingSlice-P4ZW7K5X.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-KMGFWO43.js +0 -110
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
buildBuiltinObjectSkillDbKey,
|
|
7
7
|
buildBuiltinObjectSkillPageContent,
|
|
8
8
|
buildCodeWorkDiscipline
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LUBFABMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillDocMarkdown,
|
|
12
12
|
resolvePageSkillMetadata
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
canonicalizeToolNames
|
|
16
|
-
} from "./chunk-O6OSWFZQ.js";
|
|
13
|
+
} from "./chunk-DMXLXZKL.js";
|
|
17
14
|
import {
|
|
18
15
|
nolotusId
|
|
19
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-76HO2DP6.js";
|
|
17
|
+
import {
|
|
18
|
+
canonicalizeToolNames
|
|
19
|
+
} from "./chunk-IHPDK6UD.js";
|
|
20
20
|
import {
|
|
21
21
|
asNonEmptyStringArray
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OKGVNZTL.js";
|
|
23
23
|
import {
|
|
24
24
|
asOptionalTrimmedString
|
|
25
25
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -242,7 +242,7 @@ var CODING_SKILL_SEEDS = [
|
|
|
242
242
|
"## \u6D41\u7A0B",
|
|
243
243
|
"1. Gather\uFF1A\u8BFB spec \u7ED9\u7684\u5BA1\u67E5\u547D\u4EE4\uFF08`git diff` \u6216 `git diff alpha...HEAD`\uFF09\uFF0C\u62FF\u5230 diff\uFF1B\u65E0\u6539\u52A8\u76F4\u63A5 Clean review\u3002",
|
|
244
244
|
"2. Scope\uFF1A\u786E\u8BA4\u6539\u52A8\u8303\u56F4\uFF0C\u53EA\u5BA1 diff \u89E6\u53CA\u7684\u6587\u4EF6\uFF0C\u5F04\u6E05\u5BF9\u5E94\u4EC0\u4E48\u529F\u80FD/\u4FEE\u590D\u3002",
|
|
245
|
-
"3. Context\uFF1A\u4E0D\u8981\u53EA\u770B hunk\uFF1B\u8BFB\u5468\u56F4\u5B9E\u73B0\u3001imports\u3001\u8C03\u7528\u65B9\u3002",
|
|
245
|
+
"3. Context\uFF1A\u4E0D\u8981\u53EA\u770B hunk\uFF1B\u8BFB\u5468\u56F4\u5B9E\u73B0\u3001imports\u3001\u8C03\u7528\u65B9\u3002**\u4EE3\u7801\u771F\u503C\u4F18\u5148**\uFF1Areview brief\u3001prompt\u3001\u6CE8\u91CA\u548C\u6D4B\u8BD5\u540D\u4E0D\u662F\u5B9E\u73B0\u771F\u503C\uFF1B\u6D89\u53CA\u884C\u4E3A\u5951\u7EA6\u65F6\u4EE5\u5B9E\u9645\u5B9E\u73B0\u3001\u7C7B\u578B\u548C\u53EF\u6267\u884C\u6D4B\u8BD5\u4E3A\u51C6\uFF0C\u51B2\u7A81\u5FC5\u987B\u62A5\u544A\uFF0C\u672A\u7ECF\u9A8C\u8BC1\u4E0D\u5F97 APPROVE\u3002",
|
|
246
246
|
"4. Checklist\uFF1A\u6309\u89D2\u8272\u4ECE CRITICAL \u2192 LOW\uFF1B\u53EA\u62A5 >80% \u6709\u628A\u63E1\u7684\u771F\u5B9E\u95EE\u9898\u3002",
|
|
247
247
|
"5. Report\uFF1A\u4EA7\u51FA finding \u8868 + Verdict\uFF1B\u540C\u7C7B\u95EE\u9898\u5408\u5E76\u3002",
|
|
248
248
|
"",
|
|
@@ -252,8 +252,15 @@ var CODING_SKILL_SEEDS = [
|
|
|
252
252
|
"\u4EFB\u4E00\u7B54\u300C\u5426\u300D\u6216\u300C\u4E0D\u786E\u5B9A\u300D\u5219\u964D\u7EA7\u6216\u4E22\u5F03\uFF1A",
|
|
253
253
|
"1. \u80FD\u5F15\u7528\u786E\u5207\u884C\u53F7\uFF1F\uFF08\u6A21\u7CCA\u53D1\u73B0\u4E0D actionable\uFF09",
|
|
254
254
|
"2. \u80FD\u63CF\u8FF0\u5177\u4F53\u5931\u8D25\u6A21\u5F0F\uFF1F\uFF08\u547D\u540D\u8F93\u5165\u3001\u72B6\u6001\u3001\u574F\u7ED3\u679C\uFF1B\u8BF4\u4E0D\u51FA\u89E6\u53D1\u6761\u4EF6 = \u6A21\u5F0F\u5339\u914D\uFF09",
|
|
255
|
-
"3. \
|
|
256
|
-
"4. \
|
|
255
|
+
"3. \u8BFB\u8FC7\u5468\u56F4\u4E0A\u4E0B\u6587\uFF1F\uFF08\u67E5\u8FC7\u8C03\u7528\u65B9\u3001imports\u3001\u6D4B\u8BD5\uFF1B\u5F88\u591A\u8868\u9762\u95EE\u9898\u4E0A\u4E00\u5C42\u5DF2\u5904\u7406\u6216\u6709\u7C7B\u578B guard\uFF09",
|
|
256
|
+
"4. \u4E25\u91CD\u5EA6\u7AD9\u5F97\u4F4F\uFF1F\uFF08\u7F3A JSDoc \u6C38\u8FDC\u4E0D\u662F HIGH\uFF1B\u6D4B\u8BD5 fixture \u91CC\u7684 `any` \u6C38\u8FDC\u4E0D\u662F CRITICAL\uFF1B\u4E25\u91CD\u5EA6\u81A8\u80C0\u6BD4\u6F0F\u62A5\u66F4\u4F24\u4FE1\u4EFB\uFF09",
|
|
257
|
+
"\u53E6\u6709\u5224\u65AD\u6807\u5C3A\u2014\u2014**\u8FD9\u4E2A\u56E2\u961F\u7684\u9AD8\u7EA7\u5DE5\u7A0B\u5E08\u771F\u4F1A\u5728 review \u91CC\u6539\u8FD9\u4E2A\u5417?** \u4E0D\u4F1A\u5C31\u8DF3\u8FC7\u3002\u6BCF\u6761 finding \u9644\u4EE3\u7801\u7EA7\u4FEE\u590D\u5EFA\u8BAE\uFF08Fix\uFF09\uFF0C\u4E0D\u662F\u9AD8\u5C42\u5EFA\u8BAE\u3002",
|
|
258
|
+
"",
|
|
259
|
+
"### HIGH / CRITICAL \u5FC5\u987B\u5E26\u8BC1\u636E",
|
|
260
|
+
"\u7F3A\u4EFB\u4E00\u6761\u5219\u964D\u7EA7\u5230 MEDIUM \u6216\u4E22\u5F03\uFF1A\u2460 \u786E\u5207\u4EE3\u7801\u7247\u6BB5 + \u884C\u53F7\uFF1B\u2461 \u5177\u4F53\u5931\u8D25\u573A\u666F\uFF08\u4EC0\u4E48\u8F93\u5165 \u2192 \u4EC0\u4E48\u72B6\u6001 \u2192 \u4EC0\u4E48\u574F\u7ED3\u679C\uFF09\uFF1B\u2462 \u4E3A\u4EC0\u4E48\u73B0\u6709\u9632\u62A4\uFF08\u7C7B\u578B\u7CFB\u7EDF/\u6821\u9A8C/\u6846\u67B6\u9ED8\u8BA4\uFF09\u6321\u4E0D\u4F4F\u3002",
|
|
261
|
+
"",
|
|
262
|
+
"### \u96F6\u53D1\u73B0\u662F\u5408\u6CD5\u7ED3\u679C",
|
|
263
|
+
"\u5E72\u51C0\u7684 review \u662F\u6709\u6548\u7684 review\uFF1Adiff \u5C0F\u3001\u7C7B\u578B\u5B8C\u5907\u3001\u6709\u6D4B\u8BD5\u3001\u9075\u5FAA\u9879\u76EE\u6A21\u5F0F\u65F6\uFF0C\u6B63\u786E\u8F93\u51FA\u662F\u96F6 finding + `Clean review`\u3002\u4E0D\u8981\u4E3A\u8BC1\u660E\u8DD1\u8FC7\u800C\u5236\u9020 finding\u3001\u586B\u5145\u5F0F nitpick \u6216\u65E0\u89E6\u53D1\u6761\u4EF6\u7684\u5047\u8BBE\u6027 edge case\u3002",
|
|
257
264
|
"",
|
|
258
265
|
"## \u5047\u9633\u6027\u6E05\u5355\uFF08\u8FD9\u4E9B\u4E0D\u62A5\uFF09",
|
|
259
266
|
"- \u300C\u8003\u8651\u52A0\u9519\u8BEF\u5904\u7406\u300D\uFF1A\u5148\u67E5\u8C03\u7528\u65B9/\u6846\u67B6\u662F\u5426\u5DF2\u5904\u7406\u3002",
|
|
@@ -1112,9 +1119,72 @@ function buildSearchSpaceSkillContentBySlug(slug) {
|
|
|
1112
1119
|
});
|
|
1113
1120
|
}
|
|
1114
1121
|
|
|
1122
|
+
// packages/ai/skills/autoReviewSkill.ts
|
|
1123
|
+
var AUTO_REVIEW_SKILL_SLUGS = ["auto-review"];
|
|
1124
|
+
function deterministicId6(prefix, seed) {
|
|
1125
|
+
let h = 2166136261;
|
|
1126
|
+
for (let i = 0; i < seed.length; i++) {
|
|
1127
|
+
h ^= seed.charCodeAt(i);
|
|
1128
|
+
h = h * 16777619 >>> 0;
|
|
1129
|
+
}
|
|
1130
|
+
const suffix = h.toString(36).toUpperCase().padStart(14, "0");
|
|
1131
|
+
return (prefix + suffix).slice(0, 26);
|
|
1132
|
+
}
|
|
1133
|
+
function buildAutoReviewSkillId(slug) {
|
|
1134
|
+
return deterministicId6("01SK", slug);
|
|
1135
|
+
}
|
|
1136
|
+
function buildAutoReviewSkillPageKey(userId, slug) {
|
|
1137
|
+
return `page-${userId}-${buildAutoReviewSkillId(slug)}`;
|
|
1138
|
+
}
|
|
1139
|
+
function buildAutoReviewSkillConfig(slug) {
|
|
1140
|
+
return {
|
|
1141
|
+
version: "0.1",
|
|
1142
|
+
kind: "skill",
|
|
1143
|
+
id: buildAutoReviewSkillId(slug),
|
|
1144
|
+
name: "\u81EA\u52A8\u5BA1\u67E5\u5408\u5E76\uFF08auto-review\uFF09",
|
|
1145
|
+
triggerMode: "explicit",
|
|
1146
|
+
description: "\u6539\u52A8\u5B8C\u6210\u540E\u81EA\u52A8\u8D70\u5B8C\u300C\u72EC\u7ACB reviewer \u5BA1\u67E5 \u2192 \u4FEE\u590D \u2192 \u63D0\u4EA4 \u2192 \u5408\u5E76\u5230\u672C\u5730\u96C6\u6210\u5206\u652F\u300D\u3002\u5F00\u542F\u5373\u6388\u6743 review \u901A\u8FC7\u540E\u81EA\u52A8\u63D0\u4EA4\u4E0E\u672C\u5730\u5408\u5E76\uFF0C\u4F46\u7EDD\u4E0D\u81EA\u52A8 push\u3001\u4E0D\u5408\u5E76\u8FDC\u7AEF\u6216\u4E3B\u5E72\u3001\u4E0D\u53D1\u5E03\u3002\u89E6\u53D1\u8BCD\uFF1Aauto-review\u3001\u81EA\u52A8\u5BA1\u67E5\u3001review \u540E\u81EA\u52A8\u5408\u5E76\u3001\u5BA1\u5B8C\u76F4\u63A5\u63D0\u4EA4\u5408\u5E76\u3001auto review\u3002\u4E0D\u9002\u7528\uFF1A\u53EA\u8BFB\u4EFB\u52A1\u3001\u7528\u6237\u8981\u5148\u9A8C\u6536\u6548\u679C\u7684\u6539\u52A8\uFF08\u5148\u4EA4\u4ED8\u4EA7\u7269\u7B49\u53CD\u9988\uFF09\u3002"
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
var BODY = [
|
|
1150
|
+
"\u4F60\u662F\u300C\u81EA\u52A8\u5BA1\u67E5\u5408\u5E76\u300D\u6D41\u7A0B\u7684\u6267\u884C\u8005\uFF1A\u6539\u52A8\u505A\u5B8C\u540E\uFF0C\u4E0D\u7B49\u7528\u6237\u9010\u6B65\u70B9\u5934\uFF0C\u81EA\u5DF1\u628A\u5BA1\u67E5\u3001\u63D0\u4EA4\u3001\u672C\u5730\u5408\u5E76\u8D70\u5B8C\u3002",
|
|
1151
|
+
"",
|
|
1152
|
+
"## \u5F00\u542F\u6761\u4EF6\u4E0E\u8FB9\u754C",
|
|
1153
|
+
"- \u4EC5\u5728\u7528\u6237\u663E\u5F0F\u5F00\u542F\uFF08\u8BF4 auto-review / \u81EA\u52A8\u5BA1\u67E5\u5408\u5E76\uFF09\u540E\u4F7F\u7528\uFF1B\u5F00\u542F\u53EA\u6388\u6743**\u672C\u5730\u63D0\u4EA4\u4E0E\u672C\u5730\u96C6\u6210\u5206\u652F\u5408\u5E76**\u3002",
|
|
1154
|
+
"- \u6C38\u8FDC\u9700\u8981\u5F53\u6B21\u660E\u786E\u6279\u51C6\uFF1A`git push`\u3001\u5408\u5E76\u5230\u8FDC\u7AEF\u6216\u4E3B\u5E72\u5206\u652F\u3001\u53D1\u5E03/\u90E8\u7F72\u3001\u56DE\u6EDA\u3002\u5F00\u542F\u672C skill \u4E0D\u653E\u5BBD\u8FD9\u4E9B\u3002",
|
|
1155
|
+
"- \u9700\u8981\u7528\u6237\u4EB2\u81EA\u9A8C\u6536\u7684\u6539\u52A8\uFF08UI\u3001\u4F53\u9A8C\u7C7B\uFF09\uFF1A\u5148\u4EA4\u4ED8\u53EF\u6D4B\u8BD5\u4EA7\u7269\u5E76\u505C\u4E0B\uFF0C\u7B49\u7528\u6237\u786E\u8BA4\u300C\u53EF\u4EE5\u300D\u518D\u8FDB\u5165\u4E0B\u9762\u6D41\u7A0B\u3002",
|
|
1156
|
+
"",
|
|
1157
|
+
"## \u6D41\u7A0B",
|
|
1158
|
+
"1. **\u9694\u79BB**\uFF1A\u6539\u52A8\u5E94\u5DF2\u5728\u72EC\u7ACB worktree/\u5206\u652F\u91CC\uFF08\u89C1 `worktree-isolation`\uFF09\uFF1B\u4E0D\u5728\u5C31\u5148\u5EFA\u3002",
|
|
1159
|
+
"2. **\u6D3E reviewer**\uFF1A\u4E0E\u4F5C\u8005\u4E0D\u540C\u7684 agent \u5B9E\u4F8B\uFF0C\u53EA\u8BFB\u5BA1 diff\uFF0C\u53EA\u4F20 worktree \u8DEF\u5F84\u4E0E\u6587\u4EF6\u6E05\u5355\uFF0C\u4E0D\u5185\u5D4C diff\u3002brief \u8981\u6C42\u6700\u7EC8\u6587\u672C\u542B Verdict\uFF08APPROVE / WARNING / BLOCK\uFF09\u4E0E\u5E26\u884C\u53F7\u7684 finding\u3002",
|
|
1160
|
+
"3. **\u5224\u5B9A**\uFF1A",
|
|
1161
|
+
" - \u6700\u7EC8\u6587\u672C\u542B\u660E\u786E APPROVE \u4E14\u65E0 CRITICAL/HIGH \u2192 \u7EE7\u7EED\uFF1B",
|
|
1162
|
+
" - BLOCK \u2192 \u4FEE\u590D\u540E\u590D\u5BA1\uFF0C\u5FAA\u73AF\u76F4\u5230 APPROVE\uFF1B",
|
|
1163
|
+
" - WARNING\uFF08\u6709 HIGH\uFF09\u2192 \u505C\u4E0B\uFF0C\u628A finding \u62A5\u7ED9\u7528\u6237\u51B3\u5B9A\uFF0C\u4E0D\u81EA\u52A8\u5408\u5E76\uFF1B",
|
|
1164
|
+
" - \u7A7A\u56DE\u590D\u3001\u8D85\u65F6\u3001\u53EA\u8BF4\u300C\u6211\u5148\u68C0\u67E5\u300D\u90FD\u4E0D\u662F\u5BA1\u67E5\u8BC1\u636E\uFF1A\u6700\u591A\u91CD\u8BD5\u4E00\u6B21\uFF0C\u4ECD\u65E0\u7ED3\u8BBA\u5C31\u62A5\u544A `review incomplete`\uFF0C\u4EA4\u7528\u6237\u5904\u7406\u3002",
|
|
1165
|
+
"4. **\u63D0\u4EA4**\uFF1A\u6309\u9879\u76EE\u7684\u63D0\u4EA4\u89C4\u8303\u5199 message\uFF1B\u5982\u5B9E\u8BB0\u5F55\u8C01\u5BA1\u7684\u3001\u7ED3\u8BBA\u662F\u4EC0\u4E48\u3002\u65E0 review \u4E0D\u63D0\u4EA4\uFF08\u22642 \u6B65\u96F6\u903B\u8F91\u98CE\u9669\u7684\u673A\u68B0\u6539\u52A8\u9664\u5916\uFF0C\u987B\u5728 message \u6CE8\u660E\u539F\u56E0\uFF09\u3002",
|
|
1166
|
+
"5. **\u5408\u5E76**\uFF1A\u5728\u4E3B\u4ED3\u7528 `git merge --no-ff <\u5206\u652F>` \u5408\u5E76\u5230\u672C\u5730\u96C6\u6210\u5206\u652F\uFF0C\u4FDD\u7559\u5206\u652F\u5386\u53F2\u3002",
|
|
1167
|
+
"6. **\u6E05\u7406**\uFF1A\u5408\u5E76\u6210\u529F\u540E\uFF0C\u4E3B\u52A8\u5217\u51FA\u672C\u6B21\u4EA7\u751F\u7684\u5F85\u6E05\u7406\u8D44\u6E90\u6E05\u5355\uFF08\u786E\u5207\u7684 worktree \u76F8\u5BF9\u8DEF\u5F84\u4E0E\u5206\u652F\u540D\u79F0\uFF09\uFF1B\u83B7\u5F97\u7528\u6237\u660E\u786E\u786E\u8BA4\u540E\uFF0C\u6267\u884C `git worktree remove <worktreePath>` \u4E0E `git branch -d <branchName>` \u5B8C\u6210\u6E05\u7406\u95ED\u73AF\uFF1B\u4E25\u7981\u9759\u9ED8\u5220\u9664\u6216\u5148\u5220\u540E\u62A5\u3002",
|
|
1168
|
+
"7. **\u6536\u5C3E**\uFF1A\u6C47\u62A5 commit\u3001\u5408\u5E76\u4E0E\u6E05\u7406\u7ED3\u679C\u3001reviewer \u4E0E Verdict\u3001\u672A\u5904\u7406\u7684 WARNING\u3002\u5230\u6B64\u4E3A\u6B62\uFF0C\u4E0D push\u3002",
|
|
1169
|
+
"",
|
|
1170
|
+
"## \u9009 reviewer",
|
|
1171
|
+
"- \u6309\u5E73\u53F0\u9009\u4EBA\u5951\u7EA6\uFF1A\u6536\u85CF\u7684\u79C1\u6709\u8BA2\u9605/\u81EA\u5E26 key agent \u4F18\u5148\uFF0C\u5176\u6B21\u5176\u4ED6\u6536\u85CF\uFF0C\u518D\u5176\u6B21\u672A\u6536\u85CF\u7684\u79C1\u6709 agent\uFF1B\u4F4E\u4EF7\u80DC\u4EFB\u8005\u5373\u53EF\u3002\u53EA\u6709\u67B6\u6784/\u8BA1\u8D39/\u5B89\u5168/\u6570\u636E\u5B8C\u6574\u6027\u9AD8\u98CE\u9669\u6539\u52A8\u624D\u7528\u9876\u6863\u3002",
|
|
1172
|
+
"- \u4F1A\u6D88\u8017\u5E73\u53F0\u79EF\u5206\u7684 agent \u5FC5\u987B\u5148\u5F81\u5F97\u7528\u6237\u5F53\u6B21\u540C\u610F\u3002",
|
|
1173
|
+
"",
|
|
1174
|
+
"## Boundaries",
|
|
1175
|
+
"- \u4E0D\u66FF\u4EE3 reviewer \u4FA7\u7684\u8D28\u91CF\u95E8\uFF0C\u4E5F\u4E0D\u66FF\u4EE3\u6D4B\u8BD5\uFF1B\u6D4B\u8BD5\u6CA1\u8DD1\u8FC7\u4E0D\u8981\u5408\u5E76\u3002",
|
|
1176
|
+
"- \u4E0D\u4F2A\u9020 review \u8BC1\u636E\uFF1B\u4E0D\u7528 `--no-verify` \u7ED5\u8FC7\u63D0\u4EA4\u6216\u5408\u5E76\u94A9\u5B50\u3002"
|
|
1177
|
+
].join("\n");
|
|
1178
|
+
function buildAutoReviewSkillContentBySlug(slug) {
|
|
1179
|
+
return buildSkillDocMarkdown({
|
|
1180
|
+
body: BODY,
|
|
1181
|
+
skillConfig: buildAutoReviewSkillConfig(slug)
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1115
1185
|
// packages/ai/skills/worktreeSkill.ts
|
|
1116
1186
|
var WORKTREE_SKILL_SLUGS = ["worktree-isolation"];
|
|
1117
|
-
function
|
|
1187
|
+
function deterministicId7(prefix, seed) {
|
|
1118
1188
|
let h = 2166136261;
|
|
1119
1189
|
for (let i = 0; i < seed.length; i++) {
|
|
1120
1190
|
h ^= seed.charCodeAt(i);
|
|
@@ -1127,7 +1197,7 @@ function normalizeSkillSeed6(input) {
|
|
|
1127
1197
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1128
1198
|
}
|
|
1129
1199
|
function buildWorktreeSkillId(slug) {
|
|
1130
|
-
return
|
|
1200
|
+
return deterministicId7("01SK", normalizeSkillSeed6(slug) || slug);
|
|
1131
1201
|
}
|
|
1132
1202
|
function buildWorktreeSkillPageKey(userId, slug) {
|
|
1133
1203
|
return `page-${userId}-${buildWorktreeSkillId(slug)}`;
|
|
@@ -1194,7 +1264,7 @@ function buildWorktreeSkillContentBySlug(slug) {
|
|
|
1194
1264
|
|
|
1195
1265
|
// packages/ai/skills/systematicInvestigationSkill.ts
|
|
1196
1266
|
var SYSTEMATIC_INVESTIGATION_SKILL_SLUGS = ["systematic-investigation"];
|
|
1197
|
-
function
|
|
1267
|
+
function deterministicId8(prefix, seed) {
|
|
1198
1268
|
let h = 2166136261;
|
|
1199
1269
|
for (let i = 0; i < seed.length; i++) {
|
|
1200
1270
|
h ^= seed.charCodeAt(i);
|
|
@@ -1207,7 +1277,7 @@ function normalizeSkillSeed7(input) {
|
|
|
1207
1277
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1208
1278
|
}
|
|
1209
1279
|
function buildSystematicinvestigationSkillId(slug) {
|
|
1210
|
-
return
|
|
1280
|
+
return deterministicId8("01SK", normalizeSkillSeed7(slug) || slug);
|
|
1211
1281
|
}
|
|
1212
1282
|
function buildSystematicinvestigationSkillPageKey(userId, slug) {
|
|
1213
1283
|
return `page-${userId}-${buildSystematicinvestigationSkillId(slug)}`;
|
|
@@ -1231,7 +1301,7 @@ function buildSystematicinvestigationSkillContentBySlug(slug) {
|
|
|
1231
1301
|
|
|
1232
1302
|
// packages/ai/skills/showMeSkill.ts
|
|
1233
1303
|
var SHOW_ME_SKILL_SLUGS = ["show-me"];
|
|
1234
|
-
function
|
|
1304
|
+
function deterministicId9(prefix, seed) {
|
|
1235
1305
|
let h = 2166136261;
|
|
1236
1306
|
for (let i = 0; i < seed.length; i++) {
|
|
1237
1307
|
h ^= seed.charCodeAt(i);
|
|
@@ -1244,7 +1314,7 @@ function normalizeSkillSeed8(input) {
|
|
|
1244
1314
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1245
1315
|
}
|
|
1246
1316
|
function buildShowmeSkillId(slug) {
|
|
1247
|
-
return
|
|
1317
|
+
return deterministicId9("01SK", normalizeSkillSeed8(slug) || slug);
|
|
1248
1318
|
}
|
|
1249
1319
|
function buildShowmeSkillPageKey(userId, slug) {
|
|
1250
1320
|
return `page-${userId}-${buildShowmeSkillId(slug)}`;
|
|
@@ -1268,7 +1338,7 @@ function buildShowmeSkillContentBySlug(slug) {
|
|
|
1268
1338
|
|
|
1269
1339
|
// packages/ai/skills/cavemanSkill.ts
|
|
1270
1340
|
var CAVEMAN_SKILL_SLUGS = ["caveman"];
|
|
1271
|
-
function
|
|
1341
|
+
function deterministicId10(prefix, seed) {
|
|
1272
1342
|
let h = 2166136261;
|
|
1273
1343
|
for (let i = 0; i < seed.length; i++) {
|
|
1274
1344
|
h ^= seed.charCodeAt(i);
|
|
@@ -1281,7 +1351,7 @@ function normalizeSkillSeed9(input) {
|
|
|
1281
1351
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1282
1352
|
}
|
|
1283
1353
|
function buildCavemanSkillId(slug) {
|
|
1284
|
-
return
|
|
1354
|
+
return deterministicId10("01SK", normalizeSkillSeed9(slug) || slug);
|
|
1285
1355
|
}
|
|
1286
1356
|
function buildCavemanSkillPageKey(userId, slug) {
|
|
1287
1357
|
return `page-${userId}-${buildCavemanSkillId(slug)}`;
|
|
@@ -1305,7 +1375,7 @@ function buildCavemanSkillContentBySlug(slug) {
|
|
|
1305
1375
|
|
|
1306
1376
|
// packages/ai/skills/skillCreatorSkill.ts
|
|
1307
1377
|
var SKILL_CREATOR_SKILL_SLUGS = ["skill-creator"];
|
|
1308
|
-
function
|
|
1378
|
+
function deterministicId11(prefix, seed) {
|
|
1309
1379
|
let h = 2166136261;
|
|
1310
1380
|
for (let i = 0; i < seed.length; i++) {
|
|
1311
1381
|
h ^= seed.charCodeAt(i);
|
|
@@ -1318,7 +1388,7 @@ function normalizeSkillSeed10(input) {
|
|
|
1318
1388
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1319
1389
|
}
|
|
1320
1390
|
function buildSkillCreatorSkillId(slug) {
|
|
1321
|
-
return
|
|
1391
|
+
return deterministicId11("01SK", normalizeSkillSeed10(slug) || slug);
|
|
1322
1392
|
}
|
|
1323
1393
|
function buildSkillCreatorSkillPageKey(userId, slug) {
|
|
1324
1394
|
return `page-${userId}-${buildSkillCreatorSkillId(slug)}`;
|
|
@@ -1342,7 +1412,7 @@ function buildSkillCreatorSkillContentBySlug(slug) {
|
|
|
1342
1412
|
|
|
1343
1413
|
// packages/ai/skills/agentProviderSetupSkill.ts
|
|
1344
1414
|
var AGENT_PROVIDER_SETUP_SKILL_SLUGS = ["agent-provider-setup"];
|
|
1345
|
-
function
|
|
1415
|
+
function deterministicId12(prefix, seed) {
|
|
1346
1416
|
let h = 2166136261;
|
|
1347
1417
|
for (let i = 0; i < seed.length; i++) {
|
|
1348
1418
|
h ^= seed.charCodeAt(i);
|
|
@@ -1355,7 +1425,7 @@ function normalizeSkillSeed11(input) {
|
|
|
1355
1425
|
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1356
1426
|
}
|
|
1357
1427
|
function buildAgentProviderSetupSkillId(slug) {
|
|
1358
|
-
return
|
|
1428
|
+
return deterministicId12("01SK", normalizeSkillSeed11(slug) || slug);
|
|
1359
1429
|
}
|
|
1360
1430
|
function buildAgentProviderSetupSkillPageKey(userId, slug) {
|
|
1361
1431
|
return `page-${userId}-${buildAgentProviderSetupSkillId(slug)}`;
|
|
@@ -1486,6 +1556,13 @@ var SOURCES = [
|
|
|
1486
1556
|
buildConfig: buildSearchSpaceSkillConfig,
|
|
1487
1557
|
buildContent: buildSearchSpaceSkillContentBySlug
|
|
1488
1558
|
},
|
|
1559
|
+
{
|
|
1560
|
+
slugs: AUTO_REVIEW_SKILL_SLUGS,
|
|
1561
|
+
buildSkillId: buildAutoReviewSkillId,
|
|
1562
|
+
buildPageKey: buildAutoReviewSkillPageKey,
|
|
1563
|
+
buildConfig: buildAutoReviewSkillConfig,
|
|
1564
|
+
buildContent: buildAutoReviewSkillContentBySlug
|
|
1565
|
+
},
|
|
1489
1566
|
{
|
|
1490
1567
|
slugs: WORKTREE_SKILL_SLUGS,
|
|
1491
1568
|
buildSkillId: buildWorktreeSkillId,
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOAuthApiKeyRef
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UKZX3NHN.js";
|
|
4
4
|
import {
|
|
5
5
|
compareAgentSelection
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SJKULPGX.js";
|
|
7
|
+
import {
|
|
8
|
+
isAgentUnavailableNow
|
|
9
|
+
} from "./chunk-H6A6X4EK.js";
|
|
10
|
+
import {
|
|
11
|
+
isSubscriptionEndpoint,
|
|
12
|
+
isSubscriptionOAuthCredential
|
|
13
|
+
} from "./chunk-RXA3HAVW.js";
|
|
7
14
|
import {
|
|
8
15
|
isAntigravityOAuthAgent
|
|
9
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KHKTDMYG.js";
|
|
10
17
|
import {
|
|
11
18
|
getModelAbility
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EHSYSKXV.js";
|
|
20
|
+
import {
|
|
21
|
+
fnv1a32Hex
|
|
22
|
+
} from "./chunk-O7SVKKLY.js";
|
|
13
23
|
import {
|
|
14
24
|
isOwnedAgentKey,
|
|
15
25
|
ownedAgentKey,
|
|
16
26
|
publicAgentKey
|
|
17
27
|
} from "./chunk-M2EJHDJP.js";
|
|
18
|
-
import {
|
|
19
|
-
fnv1a32Hex
|
|
20
|
-
} from "./chunk-UKWGR5SS.js";
|
|
21
28
|
|
|
22
29
|
// packages/ai/agent/agentBilling.ts
|
|
23
30
|
function resolveBillingSource(candidate) {
|
|
@@ -36,6 +43,9 @@ function resolveBillingSource(candidate) {
|
|
|
36
43
|
}
|
|
37
44
|
if (candidate?.isOAuth === true || candidate?.billingSource === "user_subscription" || candidate?.apiSource === "oauth" || isOAuthApiKeyRef(candidate?.apiKeyRef)) return "user_subscription";
|
|
38
45
|
if (candidate?.apiSource === "custom" || candidate?.billingSource === "user_api") {
|
|
46
|
+
if (isSubscriptionEndpoint(candidate?.customProviderUrl) || isSubscriptionOAuthCredential(candidate?.apiKeyRef)) {
|
|
47
|
+
return "user_subscription";
|
|
48
|
+
}
|
|
39
49
|
return "user_api";
|
|
40
50
|
}
|
|
41
51
|
return "platform_credits";
|
|
@@ -227,6 +237,16 @@ function deriveCredentialGroup(ref) {
|
|
|
227
237
|
credentialKind: "api-key"
|
|
228
238
|
};
|
|
229
239
|
}
|
|
240
|
+
function deriveCustomProviderCredentialGroup(userId, customProviderUrl) {
|
|
241
|
+
if (typeof customProviderUrl !== "string" || !customProviderUrl.trim()) {
|
|
242
|
+
return void 0;
|
|
243
|
+
}
|
|
244
|
+
const basis = `${userId ?? ""}|${customProviderUrl.trim().toLowerCase()}`;
|
|
245
|
+
return {
|
|
246
|
+
credentialGroup: `custom-${fnv1a32Hex(basis)}`,
|
|
247
|
+
credentialKind: "api-key"
|
|
248
|
+
};
|
|
249
|
+
}
|
|
230
250
|
function summarizeCredentialGroups(agents, now = Date.now()) {
|
|
231
251
|
const groups = /* @__PURE__ */ new Map();
|
|
232
252
|
for (const agent of agents) {
|
|
@@ -327,6 +347,15 @@ function resolveFavoriteStatus(record, options) {
|
|
|
327
347
|
}
|
|
328
348
|
return { isFavorite: false, favoritedAt: null };
|
|
329
349
|
}
|
|
350
|
+
function isOwnedAgentRecord(record, userId) {
|
|
351
|
+
if (!userId) return false;
|
|
352
|
+
if (typeof record?.userId === "string" && record.userId === userId || typeof record?.ownerId === "string" && record.ownerId === userId) {
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
return [record?.dbKey, record?.privateKey].some(
|
|
356
|
+
(key) => isOwnedAgentKey(key, userId)
|
|
357
|
+
);
|
|
358
|
+
}
|
|
330
359
|
function toSafeAgentSummary(record, options) {
|
|
331
360
|
const rawId = parseAgentRecordId(
|
|
332
361
|
typeof record?.privateKey === "string" ? record.privateKey : record?.dbKey,
|
|
@@ -359,11 +388,10 @@ function toSafeAgentSummary(record, options) {
|
|
|
359
388
|
const rawQuota = record?.quota;
|
|
360
389
|
const quota = rawQuota && typeof rawQuota === "object" && Array.isArray(rawQuota.windows) && typeof rawQuota.observedAt === "number" && Number.isFinite(rawQuota.observedAt) ? rawQuota : void 0;
|
|
361
390
|
const currentUserId = options?.userId;
|
|
362
|
-
const isOwnedByRecord = Boolean(currentUserId) && (typeof record?.userId === "string" && record.userId === currentUserId || typeof record?.ownerId === "string" && record.ownerId === currentUserId);
|
|
363
391
|
const ownedKey = currentUserId ? [record?.dbKey, record?.privateKey].find(
|
|
364
392
|
(key) => isOwnedAgentKey(key, currentUserId)
|
|
365
393
|
) : void 0;
|
|
366
|
-
const isOwned =
|
|
394
|
+
const isOwned = isOwnedAgentRecord(record, currentUserId);
|
|
367
395
|
const isOAuth = isOAuthApiKeyRef(record?.apiKeyRef);
|
|
368
396
|
const billingSource = resolveBillingSource({
|
|
369
397
|
...record,
|
|
@@ -506,12 +534,131 @@ function toUnavailableAgentSummary(summary) {
|
|
|
506
534
|
return item;
|
|
507
535
|
}
|
|
508
536
|
|
|
537
|
+
// packages/ai/agent/agentDiscovery.ts
|
|
538
|
+
function isPreferredAgent(agent) {
|
|
539
|
+
return agent.isFavorite === true || agent.isOwned === true || agent.isOAuth === true || agent.billingSource === "user_subscription" || agent.billingSource === "user_api" || agent.billingSource === "local";
|
|
540
|
+
}
|
|
541
|
+
function isPublicDiscoveryAgent(agent) {
|
|
542
|
+
return agent.isPublic === true && !isPreferredAgent(agent);
|
|
543
|
+
}
|
|
544
|
+
function resolveDiscoveryScope(args) {
|
|
545
|
+
const rawScope = typeof args?.scope === "string" ? args.scope.trim().toLowerCase() : void 0;
|
|
546
|
+
const hasScope = rawScope !== void 0 && rawScope !== "";
|
|
547
|
+
const hasPublicOnly = typeof args?.publicOnly === "boolean";
|
|
548
|
+
const publicOnly = args?.publicOnly === true;
|
|
549
|
+
if (hasScope) {
|
|
550
|
+
if (rawScope !== "preferred" && rawScope !== "public" && rawScope !== "all") {
|
|
551
|
+
throw new Error(`Invalid scope '${args?.scope}': must be 'preferred', 'public', or 'all'.`);
|
|
552
|
+
}
|
|
553
|
+
const scope = rawScope;
|
|
554
|
+
if (hasPublicOnly) {
|
|
555
|
+
if (publicOnly && scope !== "public") {
|
|
556
|
+
throw new Error(
|
|
557
|
+
`Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=true.`
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
if (!publicOnly && scope === "public") {
|
|
561
|
+
throw new Error(
|
|
562
|
+
`Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=false.`
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return scope;
|
|
567
|
+
}
|
|
568
|
+
if (hasPublicOnly && publicOnly) {
|
|
569
|
+
return "public";
|
|
570
|
+
}
|
|
571
|
+
return "preferred";
|
|
572
|
+
}
|
|
573
|
+
function agentIdentityKeys(agent) {
|
|
574
|
+
return [agent.agentKey, agent.publicKey, agent.id].filter(
|
|
575
|
+
(key) => typeof key === "string" && key.length > 0
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
function deduplicateAgentSummaries(agents) {
|
|
579
|
+
const byIdentity = /* @__PURE__ */ new Map();
|
|
580
|
+
for (const agent of agents) {
|
|
581
|
+
const keys = agentIdentityKeys(agent);
|
|
582
|
+
const existing = keys.map((key) => byIdentity.get(key)).find(Boolean);
|
|
583
|
+
if (!existing) {
|
|
584
|
+
for (const key of keys) byIdentity.set(key, agent);
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
const winner = isPreferredAgent(agent) && !isPreferredAgent(existing) ? agent : existing;
|
|
588
|
+
for (const key of /* @__PURE__ */ new Set([...agentIdentityKeys(existing), ...keys])) byIdentity.set(key, winner);
|
|
589
|
+
}
|
|
590
|
+
return [...new Set(byIdentity.values())];
|
|
591
|
+
}
|
|
592
|
+
function filterAgentsByScope(agents, scope) {
|
|
593
|
+
const unique = deduplicateAgentSummaries(agents);
|
|
594
|
+
if (scope === "preferred") return unique.filter((agent) => isPreferredAgent(agent));
|
|
595
|
+
if (scope === "public") return unique.filter((agent) => isPublicDiscoveryAgent(agent));
|
|
596
|
+
return unique.filter((agent) => isPreferredAgent(agent) || agent.isPublic === true);
|
|
597
|
+
}
|
|
598
|
+
function matchesAgentQuery(agent, query) {
|
|
599
|
+
if (!query || typeof query !== "string") return true;
|
|
600
|
+
const q = query.trim().toLowerCase();
|
|
601
|
+
if (!q) return true;
|
|
602
|
+
const candidates = [
|
|
603
|
+
agent.name,
|
|
604
|
+
agent.model,
|
|
605
|
+
agent.provider,
|
|
606
|
+
agent.handle,
|
|
607
|
+
agent.agentKey,
|
|
608
|
+
agent.publicKey,
|
|
609
|
+
agent.id
|
|
610
|
+
];
|
|
611
|
+
return candidates.some((text) => typeof text === "string" && text.toLowerCase().includes(q));
|
|
612
|
+
}
|
|
613
|
+
function buildAgentDiscoveryResult(options) {
|
|
614
|
+
const scope = resolveDiscoveryScope({
|
|
615
|
+
scope: options.scope,
|
|
616
|
+
publicOnly: options.publicOnly
|
|
617
|
+
});
|
|
618
|
+
const now = options.now ?? Date.now();
|
|
619
|
+
let scopedAgents = filterAgentsByScope(options.agents, scope);
|
|
620
|
+
if (options.query && typeof options.query === "string" && options.query.trim()) {
|
|
621
|
+
scopedAgents = scopedAgents.filter((a) => matchesAgentQuery(a, options.query));
|
|
622
|
+
}
|
|
623
|
+
const unavailableList = scopedAgents.filter((a) => isAgentUnavailableNow(a, now));
|
|
624
|
+
const unavailableCount = unavailableList.length;
|
|
625
|
+
const unavailableAgents = sortSafeAgentSummaries(unavailableList).map(toUnavailableAgentSummary);
|
|
626
|
+
const credentialGroups = summarizeCredentialGroups(scopedAgents, now);
|
|
627
|
+
if (options.showUnavailable !== true) {
|
|
628
|
+
scopedAgents = scopedAgents.filter((a) => !isAgentUnavailableNow(a, now));
|
|
629
|
+
}
|
|
630
|
+
const sortedAgents = sortSafeAgentSummaries(scopedAgents);
|
|
631
|
+
const projectedAgents = options.verbose === true ? sortedAgents.map(omitNullishAgentSummaryFields) : sortedAgents.map(toCompactAgentSummary);
|
|
632
|
+
return {
|
|
633
|
+
total: projectedAgents.length,
|
|
634
|
+
unavailableCount,
|
|
635
|
+
unavailableAgents,
|
|
636
|
+
credentialGroups,
|
|
637
|
+
agents: projectedAgents
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
function toDiscoverySafeAgentSummary(record, options) {
|
|
641
|
+
const mergedOptions = record?.publicRecordExists === true ? { ...options, publicRecordExists: true } : options;
|
|
642
|
+
return toSafeAgentSummary(record, mergedOptions);
|
|
643
|
+
}
|
|
644
|
+
function assembleAgentDiscoveryResult(options) {
|
|
645
|
+
const { records, summaryOptions, ...discoveryOptions } = options;
|
|
646
|
+
const agents = records.map(
|
|
647
|
+
(record) => toDiscoverySafeAgentSummary(
|
|
648
|
+
record,
|
|
649
|
+
typeof summaryOptions === "function" ? summaryOptions(record) : summaryOptions
|
|
650
|
+
)
|
|
651
|
+
);
|
|
652
|
+
return buildAgentDiscoveryResult({ ...discoveryOptions, agents });
|
|
653
|
+
}
|
|
654
|
+
|
|
509
655
|
export {
|
|
510
656
|
deriveCredentialGroup,
|
|
657
|
+
deriveCustomProviderCredentialGroup,
|
|
511
658
|
summarizeCredentialGroups,
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
659
|
+
resolveDiscoveryScope,
|
|
660
|
+
matchesAgentQuery,
|
|
661
|
+
buildAgentDiscoveryResult,
|
|
662
|
+
toDiscoverySafeAgentSummary,
|
|
663
|
+
assembleAgentDiscoveryResult
|
|
517
664
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createFileCredentialBroker,
|
|
4
4
|
migrateAgentSecrets,
|
|
5
5
|
normalizeAgentRuntimeToolPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2U3NHADM.js";
|
|
7
7
|
import {
|
|
8
8
|
asRecordOrEmpty
|
|
9
9
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -11,16 +11,18 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WPHY3VPF.js";
|
|
15
|
+
import {
|
|
16
|
+
getRuntimeServerContext
|
|
17
|
+
} from "./chunk-O7SVKKLY.js";
|
|
15
18
|
import {
|
|
16
19
|
createAgentKey,
|
|
17
20
|
toTrimmedString
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OKGVNZTL.js";
|
|
19
22
|
import {
|
|
20
23
|
asyncThunkCreator,
|
|
21
|
-
buildCreateSlice
|
|
22
|
-
|
|
23
|
-
} from "./chunk-UKWGR5SS.js";
|
|
24
|
+
buildCreateSlice
|
|
25
|
+
} from "./chunk-VY6VFGKR.js";
|
|
24
26
|
import {
|
|
25
27
|
asTrimmedString
|
|
26
28
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -304,7 +306,7 @@ var slice = createSliceWithThunks({
|
|
|
304
306
|
const overrides = {};
|
|
305
307
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
308
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
309
|
+
const { _executeModel } = await import("./_executeModel-M573MKVE.js");
|
|
308
310
|
return _executeModel(
|
|
309
311
|
{
|
|
310
312
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +327,7 @@ var slice = createSliceWithThunks({
|
|
|
325
327
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
328
|
*/
|
|
327
329
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
330
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-APSMCLAF.js");
|
|
329
331
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
332
|
{
|
|
331
333
|
agentKey: args.agentKey,
|
|
@@ -341,7 +343,7 @@ var slice = createSliceWithThunks({
|
|
|
341
343
|
* 聊天轮次流式 Agent 调用
|
|
342
344
|
*/
|
|
343
345
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
346
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-DNY2PSRW.js");
|
|
345
347
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
348
|
}),
|
|
347
349
|
/**
|
|
@@ -308,6 +308,8 @@ function saveProfileOAuthSync(provider, sync, path = getDefaultProfileConfigPath
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
export {
|
|
311
|
+
normalizeProfileServerUrl,
|
|
312
|
+
isProtectedHomeProfileWrite,
|
|
311
313
|
getDefaultProfileConfigPath,
|
|
312
314
|
loadProfileConfig,
|
|
313
315
|
clearProfileAuthToken,
|
|
@@ -319,6 +321,8 @@ export {
|
|
|
319
321
|
getCurrentProfile,
|
|
320
322
|
saveProfileLocale,
|
|
321
323
|
getAgentSelectionAuditPath,
|
|
324
|
+
redactArgvSecrets,
|
|
325
|
+
appendAgentSelectionAudit,
|
|
322
326
|
readLastAgentSelectionAudit,
|
|
323
327
|
saveProfileAgentSelection,
|
|
324
328
|
getProfileOAuthSync,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isLevelNotFoundError
|
|
3
|
+
} from "./chunk-OW765XBU.js";
|
|
4
|
+
|
|
5
|
+
// packages/ai/memory/vnext/store.ts
|
|
6
|
+
var enc = (value) => encodeURIComponent(value).replace(/-/g, "%2D");
|
|
7
|
+
var rangeOf = (prefix) => ({ gte: prefix, lte: `${prefix}\uFFFF` });
|
|
8
|
+
var entityKey = (ownerId, id) => `mem2-e-${enc(ownerId)}-${enc(id)}`;
|
|
9
|
+
var entityOwnerPrefix = (ownerId) => `mem2-e-${enc(ownerId)}-`;
|
|
10
|
+
var stateKey = (ownerId, id) => `mem2-s-${enc(ownerId)}-${enc(id)}`;
|
|
11
|
+
var stateEntityIndexKey = (ownerId, entityId, stateId) => `mem2-si-${enc(ownerId)}-${enc(entityId)}-${enc(stateId)}`;
|
|
12
|
+
var stateEntityIndexPrefix = (ownerId, entityId) => `mem2-si-${enc(ownerId)}-${enc(entityId)}-`;
|
|
13
|
+
var evidenceKey = (ownerId, id) => `mem2-v-${enc(ownerId)}-${enc(id)}`;
|
|
14
|
+
var relationKey = (ownerId, id) => `mem2-r-${enc(ownerId)}-${enc(id)}`;
|
|
15
|
+
var relationFromIndexKey = (ownerId, from, relationId) => `mem2-rf-${enc(ownerId)}-${enc(from)}-${enc(relationId)}`;
|
|
16
|
+
var relationToIndexKey = (ownerId, to, relationId) => `mem2-rt-${enc(ownerId)}-${enc(to)}-${enc(relationId)}`;
|
|
17
|
+
var readIndexed = async (db, prefix) => {
|
|
18
|
+
const refs = [];
|
|
19
|
+
for await (const [, value] of db.iterator({ ...rangeOf(prefix), reverse: false })) {
|
|
20
|
+
if (typeof value?.key === "string") refs.push(value.key);
|
|
21
|
+
}
|
|
22
|
+
const rows = await Promise.all(refs.map((key) => db.get(key).catch(() => null)));
|
|
23
|
+
return rows.filter((row) => !!row);
|
|
24
|
+
};
|
|
25
|
+
var getMemoryEntityVNext = async (db, ownerId, entityId) => db.get(entityKey(ownerId, entityId)).catch(() => null);
|
|
26
|
+
var listMemoryEntitiesVNext = async (db, ownerId) => {
|
|
27
|
+
const rows = [];
|
|
28
|
+
for await (const [, value] of db.iterator({
|
|
29
|
+
...rangeOf(entityOwnerPrefix(ownerId)),
|
|
30
|
+
reverse: false
|
|
31
|
+
})) {
|
|
32
|
+
if (value) rows.push(value);
|
|
33
|
+
}
|
|
34
|
+
return rows;
|
|
35
|
+
};
|
|
36
|
+
var loadMemoryVNextCatalog = async (db, ownerId) => {
|
|
37
|
+
const entities = await listMemoryEntitiesVNext(db, ownerId);
|
|
38
|
+
const states = (await Promise.all(entities.map((entity) => listMemoryStatesForEntityVNext(db, ownerId, entity.id)))).flat();
|
|
39
|
+
return { entities, states };
|
|
40
|
+
};
|
|
41
|
+
var getMemoryStateVNext = async (db, ownerId, stateId) => db.get(stateKey(ownerId, stateId)).catch(() => null);
|
|
42
|
+
var listMemoryStatesForEntityVNext = (db, ownerId, entityId) => readIndexed(db, stateEntityIndexPrefix(ownerId, entityId));
|
|
43
|
+
var putMemoryEvidenceVNext = async (db, evidence) => {
|
|
44
|
+
await db.put(evidenceKey(evidence.ownerId, evidence.id), evidence);
|
|
45
|
+
};
|
|
46
|
+
var getMemoryEvidenceVNext = async (db, ownerId, evidenceId) => db.get(evidenceKey(ownerId, evidenceId)).catch(() => null);
|
|
47
|
+
var getMemoryEvidenceVNextStrict = async (db, ownerId, evidenceId) => {
|
|
48
|
+
try {
|
|
49
|
+
return await db.get(evidenceKey(ownerId, evidenceId));
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (isLevelNotFoundError(error)) return null;
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var _appendEntityBatch = (batch, entity) => {
|
|
56
|
+
batch.put(entityKey(entity.ownerId, entity.id), entity);
|
|
57
|
+
};
|
|
58
|
+
var _appendEvidenceBatch = (batch, evidence) => {
|
|
59
|
+
batch.put(evidenceKey(evidence.ownerId, evidence.id), evidence);
|
|
60
|
+
};
|
|
61
|
+
var _appendStateBatch = (batch, state) => {
|
|
62
|
+
const key = stateKey(state.ownerId, state.id);
|
|
63
|
+
batch.put(key, state);
|
|
64
|
+
batch.put(stateEntityIndexKey(state.ownerId, state.entityId, state.id), { key });
|
|
65
|
+
};
|
|
66
|
+
var _appendRetiredStateBatch = (batch, state) => {
|
|
67
|
+
batch.put(stateKey(state.ownerId, state.id), state);
|
|
68
|
+
};
|
|
69
|
+
var _appendRelationBatch = (batch, relation) => {
|
|
70
|
+
const key = relationKey(relation.ownerId, relation.id);
|
|
71
|
+
batch.put(key, relation);
|
|
72
|
+
batch.put(relationFromIndexKey(relation.ownerId, relation.from, relation.id), { key });
|
|
73
|
+
batch.put(relationToIndexKey(relation.ownerId, relation.to, relation.id), { key });
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
getMemoryEntityVNext,
|
|
78
|
+
loadMemoryVNextCatalog,
|
|
79
|
+
getMemoryStateVNext,
|
|
80
|
+
listMemoryStatesForEntityVNext,
|
|
81
|
+
putMemoryEvidenceVNext,
|
|
82
|
+
getMemoryEvidenceVNext,
|
|
83
|
+
getMemoryEvidenceVNextStrict,
|
|
84
|
+
_appendEntityBatch,
|
|
85
|
+
_appendEvidenceBatch,
|
|
86
|
+
_appendStateBatch,
|
|
87
|
+
_appendRetiredStateBatch,
|
|
88
|
+
_appendRelationBatch
|
|
89
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAgentRunTerminalStatus
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E3YWHWCR.js";
|
|
4
4
|
import {
|
|
5
5
|
isCompiledBinary,
|
|
6
6
|
resolveCliEntrypointPath
|
|
@@ -1056,7 +1056,14 @@ function defaultGetProcessStartTime(pid) {
|
|
|
1056
1056
|
const output = nodeExecFileSync("ps", ["-o", "lstart=", "-p", String(pid)], {
|
|
1057
1057
|
encoding: "utf8",
|
|
1058
1058
|
stdio: ["ignore", "pipe", "ignore"],
|
|
1059
|
-
timeout: 1e3
|
|
1059
|
+
timeout: 1e3,
|
|
1060
|
+
// `ps -o lstart` 的日期串随系统 locale 变化:
|
|
1061
|
+
// LANG=en_US.UTF-8 → "Thu Oct 8 08:54:18 2026"(new Date 可解析)
|
|
1062
|
+
// LANG=zh_CN.UTF-8 → "四 10月 8 08:54:18 2026"(new Date → NaN → null)
|
|
1063
|
+
// 这会让 isPidReused 的结论依赖调用者环境:同一条 run 记录在英文
|
|
1064
|
+
// locale 下被判 pid reused → orphaned,中文 locale 下不判。强制 C
|
|
1065
|
+
// locale 让输出恒为可解析的英文格式,结果与 locale 无关。
|
|
1066
|
+
env: { ...process.env, LC_ALL: "C", LANG: "C" }
|
|
1060
1067
|
}).trim();
|
|
1061
1068
|
if (!output) return null;
|
|
1062
1069
|
const d = new Date(output);
|