nolo-cli 0.19.0 → 0.24.0-alpha.14
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 +9 -18
- package/{_executeModel-X5PCIZN6.js → _executeModel-ZPNYAEFW.js} +46 -44
- package/{action-LT7BRFLK.js → action-5MNAXR5B.js} +7 -6
- package/{addContentAction-PL3KKBDH.js → addContentAction-UNSYTVTB.js} +5 -5
- package/{addDialogAgentAction-FCMSKYAF.js → addDialogAgentAction-LJGNP2AO.js} +5 -5
- package/{agentDeleteCommand-2BZDQV36.js → agentDeleteCommand-5ZV4433K.js} +27 -26
- package/{agentEmailCommands-2QJDGRMB.js → agentEmailCommands-Z7KOYDVQ.js} +57 -55
- package/{agentListCommands-6VEPTKBI.js → agentListCommands-UQUXJYUN.js} +30 -26
- package/{agentMachineCommands-NVVHNWYI.js → agentMachineCommands-53O6P6L5.js} +25 -24
- package/{agentRecordCommands-4GGRDMD4.js → agentRecordCommands-ZRYNBSSS.js} +52 -50
- package/{agentRunCommand-XOLQNKBZ.js → agentRunCommand-B73MKVOG.js} +55 -54
- package/{agentRunControl-Y5AFH5PQ.js → agentRunControl-SNUKXN6J.js} +6 -2
- package/{agentRuntimeLocal-7WYWCGL4.js → agentRuntimeLocal-GVNERRKQ.js} +21 -18
- package/{agentSlice-EAXPGEYV.js → agentSlice-OJBHIL34.js} +5 -5
- package/{appDeleteCommands-77KR2RJ4.js → appDeleteCommands-23Z3Z6KE.js} +23 -22
- package/{appDeployCommands-K7CAHGBI.js → appDeployCommands-3MFAR4Z7.js} +23 -22
- package/{appDeployStatusCommands-4OEKLTBT.js → appDeployStatusCommands-JHU6GSN4.js} +23 -22
- package/{appGetCommands-VM2WDLAZ.js → appGetCommands-24J55H2Y.js} +23 -22
- package/{appListCommands-GX6BBA6U.js → appListCommands-HE5KP3PH.js} +23 -22
- package/{authCommand-DY6UUL6O.js → authCommand-KGRK6MNU.js} +12 -13
- package/{authCommands-XTBV7OFZ.js → authCommands-JSOG2H4E.js} +4 -5
- package/{chunk-OWOHNGCN.js → chunk-2MBTWINN.js} +42 -3
- package/{chunk-MVQ4TBSD.js → chunk-54VHTARN.js} +1 -1
- package/{chunk-RQN4SEKL.js → chunk-5DWZ46RJ.js} +1 -1
- package/{chunk-VYHDJEQD.js → chunk-5EDKWSQN.js} +136 -78
- package/{chunk-Z4NR32XR.js → chunk-5RGU3J7P.js} +13 -0
- package/{chunk-7BUYEZ6U.js → chunk-7H3UTGPM.js} +12 -72
- package/{chunk-3ZX7PERL.js → chunk-AAWJ5S3G.js} +20 -7
- package/{chunk-SCTYAHYK.js → chunk-ADE6577S.js} +237 -142
- package/{chunk-PJSV3IZ5.js → chunk-AOPOTHFK.js} +1 -1
- package/{chunk-3ND52WIL.js → chunk-ATWUOTJP.js} +180 -24
- package/{chunk-SWDPIPOY.js → chunk-AZW5AHMW.js} +1 -1
- package/chunk-CF7S2RYZ.js +376 -0
- package/{chunk-L4F3I4SR.js → chunk-CV6BM7LU.js} +4 -6
- package/{chunk-G5U6LDLG.js → chunk-CWTT2NZ6.js} +6 -6
- package/{chunk-MKA6QE5E.js → chunk-CZHE6LLV.js} +135 -55
- package/{chunk-KFEVY3ST.js → chunk-D34RI6NI.js} +18 -8
- package/{chunk-XRZJGPFI.js → chunk-FON47ACC.js} +4 -4
- package/{chunk-K6EUAOW3.js → chunk-FXFGNOT2.js} +67 -1
- package/{chunk-LLWKHDG4.js → chunk-G36SUBHA.js} +14 -6
- package/{chunk-REA4JLBH.js → chunk-GD23ZX7Z.js} +7 -6
- package/{chunk-ROWQEJRP.js → chunk-GE6IWA5N.js} +12 -4
- package/{chunk-EDV7EBOI.js → chunk-GGB6MPHD.js} +2155 -1503
- package/{chunk-IYEXFJPC.js → chunk-GNGOZMU2.js} +64 -57
- package/{chunk-4T5F7YZQ.js → chunk-I6RJGORZ.js} +1 -1
- package/{chunk-DFCFMCY6.js → chunk-J2WT5CEO.js} +2 -2
- package/{chunk-AHCY2S2I.js → chunk-JJ2WUBFN.js} +1 -1
- package/{chunk-UGUW3FHG.js → chunk-JMSCXQUG.js} +2 -2
- package/{chunk-VDXCXCXH.js → chunk-KURQBS7S.js} +1 -1
- package/{chunk-FQZZLA3C.js → chunk-KXKQO4Q6.js} +17 -0
- package/{chunk-3Q7WHGCB.js → chunk-L65QKSVJ.js} +1 -1
- package/{chunk-UAIVG4J6.js → chunk-LEHTC2FI.js} +1 -8
- package/{chunk-UBHAWFQ6.js → chunk-LLDGWLML.js} +42 -19
- package/{chunk-JLA4FXYC.js → chunk-MALVZUYL.js} +1 -1
- package/{chunk-N54HIJVJ.js → chunk-MCXQNEJ3.js} +101 -9
- package/{chunk-GFUIQ4RY.js → chunk-MXFQHRSS.js} +1 -1
- package/{chunk-LSFAWXKC.js → chunk-N7J63Q6C.js} +1 -0
- package/{chunk-6Y7A3OQQ.js → chunk-NRY4GCKJ.js} +2 -0
- package/{chunk-ELT65PZW.js → chunk-OXLLFZNF.js} +1 -1
- package/{chunk-YGW4G5W5.js → chunk-P3RZ6DHN.js} +133 -25
- package/{chunk-5MIDPSSK.js → chunk-PB7G5MAM.js} +3 -3
- package/{chunk-HEGV7BH3.js → chunk-PMCKFQYC.js} +1 -1
- package/{chunk-23FZYPLC.js → chunk-PTKI7TIN.js} +911 -1064
- package/{chunk-MHSGJW4Z.js → chunk-PXPISYEH.js} +44 -14
- package/{chunk-I2ZJKTG5.js → chunk-PY7VGC5M.js} +29 -10
- package/{chunk-PIZYJVHQ.js → chunk-RM464B7I.js} +4 -4
- package/{chunk-XHG22OEX.js → chunk-ROJI6DRT.js} +2 -2
- package/{chunk-VNAEBGDK.js → chunk-RZNYL4LW.js} +123 -26
- package/{chunk-RVOUXDFU.js → chunk-S6KVFOUG.js} +6 -34
- package/{chunk-BV4VEE3W.js → chunk-S7AV3NCK.js} +277 -357
- package/{chunk-R35XMF6F.js → chunk-SIUEKVK4.js} +484 -67
- package/{chunk-B5TOXZAK.js → chunk-SIZQB7BD.js} +1 -1
- package/{chunk-DFFIZ25G.js → chunk-SLOGKB7M.js} +4 -1
- package/{chunk-MPVYDS7I.js → chunk-TLYHUIWF.js} +3 -3
- package/{chunk-HWW2M4SN.js → chunk-TNM27YZ7.js} +5 -4
- package/{chunk-OK6YSWLH.js → chunk-TWA4L7J7.js} +1 -1
- package/chunk-UZ6XXCVR.js +50 -0
- package/{chunk-DKZFOK24.js → chunk-WCP5FDTF.js} +16 -304
- package/{chunk-TRT4I4UD.js → chunk-WSQLK2KR.js} +2 -2
- package/{chunk-FXUSIQC2.js → chunk-XNZJVYFS.js} +1 -1
- package/{chunk-V3ED5AWK.js → chunk-YJY7HODU.js} +27 -16
- package/chunk-YYLHWIW6.js +48 -0
- package/{chunk-CZ6NYQTV.js → chunk-ZFL3LTU7.js} +2 -2
- package/{chunk-34WPV75U.js → chunk-ZUXIXYJI.js} +1 -1
- package/{chunk-VC6OZXO5.js → chunk-ZWJOGMKH.js} +2 -26
- package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
- package/{codingSkills-36KN5NQT.js → codingSkills-EN6Z6G6U.js} +4 -4
- package/{createAgentAutomationAction-GNFF524X.js → createAgentAutomationAction-PO62NUR7.js} +19 -18
- package/{createDialogAction-RB55KCLO.js → createDialogAction-ORFRYI3C.js} +22 -20
- package/{createPageAction-Y7343GLU.js → createPageAction-XWVMNTYH.js} +20 -19
- package/{db-W3O47YGF.js → db-W5UHK4P3.js} +150 -0
- package/{dbSlice-CGSRFJN3.js → dbSlice-5BKDURDL.js} +4 -4
- package/{dialogCommands-IAZK6YHQ.js → dialogCommands-XTJHROXM.js} +24 -23
- package/{dialogSlice-UQAXF23P.js → dialogSlice-DJXC53YW.js} +24 -18
- package/{docCreateCommands-I2EWZGCI.js → docCreateCommands-T2XRVXYS.js} +24 -27
- package/{docDeleteCommands-IZ45UZKG.js → docDeleteCommands-L7RXFXY3.js} +25 -24
- package/{docReadCommands-R6Z4QJYU.js → docReadCommands-M5PYNADQ.js} +24 -23
- package/{docStore-5HOJ4D7D.js → docStore-6LKLLFDW.js} +20 -19
- package/{docUpdateCommands-2LRBKQPY.js → docUpdateCommands-OA5EGPLQ.js} +24 -27
- package/{fetchMessages-BMGVZVSE.js → fetchMessages-W4IKHPCS.js} +2 -3
- package/{getPricing-G7DLAST6.js → getPricing-6C3C47Y4.js} +3 -3
- package/{handleSendMessageAction-Q4HY35WX.js → handleSendMessageAction-ILFGZTN5.js} +23 -20
- package/index.js +74 -74
- package/{localDialogRead-4H3QJFLW.js → localDialogRead-JXTAHW2E.js} +2 -2
- package/{machineCommands-PKBPQKTY.js → machineCommands-AKAQGPAO.js} +59 -57
- package/{machineWsRunDispatch-UZAW4OXJ.js → machineWsRunDispatch-RSBERM64.js} +51 -49
- package/{models-DJFSJ7SW.js → models-ILWKIX2Y.js} +2 -2
- package/package.json +1 -1
- package/{read-3FMPZPER.js → read-F3L3T2WJ.js} +2 -1
- package/{readDocTool-VSYHKK3V.js → readDocTool-FOHWVA4R.js} +1 -1
- package/{readlineWorkspace-Y2RDOFZG.js → readlineWorkspace-TUH3SFHO.js} +937 -430
- package/{removeDialogAgentAction-OAGA2G3U.js → removeDialogAgentAction-QCFGIUIH.js} +8 -7
- package/{runAgentClientLoop-NBPIKJ6J.js → runAgentClientLoop-C3QB2EXV.js} +45 -38
- package/{setDialogExtraReferencesAction-JZEXA5SL.js → setDialogExtraReferencesAction-DK4CKERU.js} +5 -5
- package/{setPrimaryDialogAgentAction-4ZUQQKDG.js → setPrimaryDialogAgentAction-SJSO6N27.js} +8 -7
- package/{settingSlice-7MNKHZ6R.js → settingSlice-XNM5AFPU.js} +6 -5
- package/{spaceCommands-DHCZ7J5I.js → spaceCommands-SXYOFGUJ.js} +25 -24
- package/{spaceSlice-ZXLLG3CR.js → spaceSlice-6BHMRP5O.js} +21 -18
- package/{streamAgentChatTurn-L3YW6LSB.js → streamAgentChatTurn-GF5W5OIP.js} +140 -98
- package/switchDialogAgentAction-4OAC6QRN.js +61 -0
- package/{tableCommands-BEQAGE4I.js → tableCommands-QSZILI7I.js} +1 -1
- package/{toolApiClient-QI3YBNWB.js → toolApiClient-ISM4ZQX4.js} +2 -2
- package/{tools-ECGXR5QF.js → tools-KBCLJ43G.js} +36 -33
- package/{tuiSummaryLlmCaller-OMSCNHXA.js → tuiSummaryLlmCaller-ARIMGILF.js} +6 -6
- package/{updateCommands-XTW55TOT.js → updateCommands-AK2RDOFR.js} +8 -2
- package/{updateDialogTitleAction-HQ2EUDFT.js → updateDialogTitleAction-LMHZUY4Q.js} +28 -27
- package/chunk-DL6EPNIK.js +0 -50
- package/chunk-V5R4NZP2.js +0 -78
- package/chunk-X4Q4UZEY.js +0 -26
- package/queryRunOverlay-O4LOMMPO.js +0 -161
- package/runOverlayPresentation-ZO4VCWEU.js +0 -11
- package/types-ZSTJ7MPR.js +0 -7
- package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
- package/{runtimeDoctorCommands-E2OUORHK.js → runtimeDoctorCommands-HSU632DY.js} +3 -3
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TOOL_PACKS,
|
|
3
|
+
buildCodeWorkDiscipline
|
|
4
|
+
} from "./chunk-CF7S2RYZ.js";
|
|
1
5
|
import {
|
|
2
6
|
buildSkillDocMarkdown,
|
|
3
7
|
resolvePageSkillMetadata
|
|
4
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZWJOGMKH.js";
|
|
5
9
|
import {
|
|
6
10
|
canonicalizeToolNames
|
|
7
11
|
} from "./chunk-ZZ2MH7LE.js";
|
|
@@ -176,48 +180,17 @@ var CODING_SKILL_SEEDS = [
|
|
|
176
180
|
].join("\n"),
|
|
177
181
|
triggerMode: "required",
|
|
178
182
|
requiredSkillSlugs: ["coding-review"],
|
|
183
|
+
// 与「代码执行」能力包共用同一份本地代码工具清单,外加编排三件套
|
|
184
|
+
// (派 review 用)。以前这里是手抄的 15 个名字,和能力包各存一份。
|
|
179
185
|
toolNames: [
|
|
180
|
-
|
|
181
|
-
"writeFile",
|
|
182
|
-
"editFile",
|
|
183
|
-
"applyEdit",
|
|
184
|
-
"applyLineEdits",
|
|
185
|
-
"codeSearch",
|
|
186
|
-
"globFiles",
|
|
187
|
-
"searchFiles",
|
|
188
|
-
"listFiles",
|
|
189
|
-
"execShell",
|
|
190
|
-
"launchProcess",
|
|
191
|
-
"listProcesses",
|
|
186
|
+
...TOOL_PACKS.CODE,
|
|
192
187
|
"startAgentRun",
|
|
193
188
|
"controlAgentRun",
|
|
194
189
|
"listAgents"
|
|
195
190
|
],
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"## \u6548\u7387\u4F18\u5148\uFF08\u7701 token\uFF09",
|
|
200
|
-
"- \u4E0D\u590D\u8FF0\u9700\u6C42\uFF0C\u4E0D\u89E3\u91CA\u300C\u6253\u7B97\u600E\u4E48\u505A\u300D\uFF0C\u76F4\u63A5\u52A8\u624B\u3002\u6539\u5B8C\u53EA\u7528\u4E00\u4E24\u53E5\u8BDD\u8BF4\u6E05\u300C\u6539\u4E86\u4EC0\u4E48\u3001\u53BB\u54EA\u770B\u300D\u3002",
|
|
201
|
-
"- \u601D\u8003\u7B80\u77ED\uFF1A\u5B9A\u4F4D\u95EE\u9898\u5373\u53EF\uFF0C\u4E0D\u505A\u957F\u7BC7\u63A8\u6F14\u3002",
|
|
202
|
-
"- \u5C0F\u6539\u52A8\u8D70\u6700\u77ED\u8DEF\u5F84\uFF1AsearchFiles/globFiles \u5B9A\u4F4D \u2192 readFile \u786E\u8BA4 \u2192 editFile \u7CBE\u786E\u66FF\u6362\u3002\u80FD\u4E00\u6B21\u547D\u4E2D\u5C31\u4E0D\u8981\u53CD\u590D\u8BFB\u6587\u4EF6\u3002",
|
|
203
|
-
"- \u5DF2\u7ECF\u77E5\u9053\u6587\u4EF6\u548C\u4F4D\u7F6E\u65F6\uFF0C\u8DF3\u8FC7\u591A\u4F59\u7684 search/read\uFF0C\u76F4\u63A5 edit\u3002",
|
|
204
|
-
"- \u7981\u6B62\u4E3A\u4E00\u4E2A\u5C0F\u6539\u52A8\u6574\u9875\u91CD\u5199\u6216\u8FDE\u5E26\u6539\u52A8\u672A\u547D\u4E2D\u7684\u90E8\u5206\u3002",
|
|
205
|
-
"",
|
|
206
|
-
"## \u4EE3\u7801\u4FEE\u6539\u7EAA\u5F8B",
|
|
207
|
-
"- \u7F16\u8F91\u524D\u5148 readFile \u786E\u8BA4\u5F53\u524D\u5185\u5BB9\uFF0C\u907F\u514D stale hash \u9519\u8BEF\u3002",
|
|
208
|
-
"- \u53EA\u78B0\u4EFB\u52A1\u4E66\u5217\u51FA\u7684\u6587\u4EF6\uFF1B\u6539\u5B8C\u7528 `git status --short` \u81EA\u67E5\uFF0C\u82E5\u6539\u5230\u6E05\u5355\u5916\u6587\u4EF6\uFF0C\u5982\u5B9E\u62A5\u544A\u3002",
|
|
209
|
-
"- \u4E0D\u8981 `git add` / `git commit` / `git push` / `git stash` / `git reset` / `git checkout` / `git clean`\u2014\u2014\u6539\u52A8\u7559\u5728\u5DE5\u4F5C\u533A\uFF0C\u63D0\u4EA4\u7531\u8C03\u7528\u65B9\u9A8C\u6536\u540E\u5904\u7406\u3002",
|
|
210
|
-
"- \u53EA\u8DD1\u4EFB\u52A1\u91CC\u5217\u51FA\u7684\u6D4B\u8BD5\u6587\u4EF6\uFF0C\u4E0D\u8981\u8DD1 broader \u6D4B\u8BD5\u3002",
|
|
211
|
-
"",
|
|
212
|
-
"## Review \u7EAA\u5F8B\uFF08commit \u524D\u786C\u95E8\uFF09",
|
|
213
|
-
"- \u9664 \u22642 \u6B65\u96F6\u903B\u8F91\u98CE\u9669\u7684\u673A\u68B0\u6539\u52A8\uFF08\u9519\u522B\u5B57/\u683C\u5F0F/CSS \u5FAE\u8C03\uFF09\u5916\uFF0C\u6240\u6709\u4EE3\u7801\u53D8\u66F4 commit \u524D\u5FC5\u987B\u5148\u6D3E**\u5176\u4ED6 agent**\uFF08\u4E0D\u540C\u6A21\u578B\u5BB6\u65CF\u4F18\u5148\uFF09review \u5DE5\u4F5C\u533A diff\uFF08`git diff`\uFF0C\u672A\u63D0\u4EA4\u7684\u6539\u52A8\uFF09\u3002reviewer \u4E0D\u53EF\u662F\u81EA\u5DF1\u3002\u65E0 review \u4E0D commit\u2014\u2014\u8FD9\u662F\u786C\u95E8\uFF0C\u4E0D\u662F\u5EFA\u8BAE\u3002",
|
|
214
|
-
"- \u6D3E\u53D1\u8D70 `startAgentRun(agentKey, task, { ephemeral: true })`\uFF08web/\u684C\u9762\u7AEF\u6CA1\u6709 nolo CLI\uFF0C\u6240\u6709 host \u90FD\u6709\u8FD9\u4E2A\u5DE5\u5177\uFF09\u3002ephemeral \u8BA9 review \u5B8C\u6210\u540E\u4E0D\u7559 dialog \u8BB0\u5F55\u3002",
|
|
215
|
-
"- task \u91CC\u5FC5\u987B\u5199\u660E\u5BA1\u67E5\u5BF9\u8C61\uFF08`git diff` \u770B\u5DE5\u4F5C\u533A\u6539\u52A8\uFF0C\u6216 `git diff alpha...HEAD` \u770B\u5DF2\u63D0\u4EA4\u6539\u52A8\uFF09\uFF0C\u5426\u5219 reviewer \u4E0D\u77E5\u9053\u5BA1\u4EC0\u4E48\u3002",
|
|
216
|
-
'- \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',
|
|
217
|
-
"- 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",
|
|
218
|
-
"- review \u53EF\u80FD\u591A\u8F6E\u6536\u655B\uFF08\u6709 finding\u2192\u4FEE\u2192\u518D\u5BA1\u2192\u76F4\u5230 APPROVE\uFF09\u3002\u6BCF\u8F6E review \u662F\u65E0\u4E0A\u4E0B\u6587\u7684\u2014\u2014reviewer \u53EA\u770B\u5F53\u524D\u5DE5\u4F5C\u533A diff\uFF0C\u4E0D\u5E26\u4E0A\u4E00\u8F6E finding \u8BB0\u5FC6\u3002",
|
|
219
|
-
"- \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\uFF0C\u5141\u8BB8\u5E26\u539F\u56E0\u8DF3\u8FC7\uFF08commit message \u6CE8\u660E [no-review: \u539F\u56E0]\uFF09\uFF0C\u4F46\u9ED8\u8BA4\u5FC5\u987B\u6D3E review\u3002"
|
|
220
|
-
].join("\n")
|
|
191
|
+
// 与「代码执行」能力包共用同一份纪律正文(唯一真相源)。
|
|
192
|
+
// 两份曾逐字抄写并已漂移——能力包那版多了两句理由,这里以合并后的为准。
|
|
193
|
+
promptPatch: buildCodeWorkDiscipline("\u5199\u4EE3\u7801\u7EAA\u5F8B")
|
|
221
194
|
},
|
|
222
195
|
{
|
|
223
196
|
slug: "coding-review",
|
|
@@ -612,38 +585,6 @@ async function resolveCodingEffectiveTools(userId) {
|
|
|
612
585
|
});
|
|
613
586
|
return resolved.requiredTools;
|
|
614
587
|
}
|
|
615
|
-
function ensureCodingSkills(userId) {
|
|
616
|
-
return async (dispatch) => {
|
|
617
|
-
const { readAndWait, write } = await import("./dbSlice-CGSRFJN3.js");
|
|
618
|
-
const { DataType } = await import("./types-ZSTJ7MPR.js");
|
|
619
|
-
const now = Date.now();
|
|
620
|
-
const pages = buildCodingSkillPageRecords(userId);
|
|
621
|
-
for (const page of pages) {
|
|
622
|
-
try {
|
|
623
|
-
const existing = await dispatch(readAndWait(page.dbKey)).unwrap().catch(() => null);
|
|
624
|
-
if (!existing) {
|
|
625
|
-
await dispatch(
|
|
626
|
-
write({
|
|
627
|
-
data: {
|
|
628
|
-
id: page.skillId,
|
|
629
|
-
dbKey: page.dbKey,
|
|
630
|
-
type: DataType.DOC,
|
|
631
|
-
userId,
|
|
632
|
-
title: page.title,
|
|
633
|
-
content: page.content,
|
|
634
|
-
created: new Date(now).toISOString(),
|
|
635
|
-
createdAt: now,
|
|
636
|
-
updatedAt: String(now)
|
|
637
|
-
},
|
|
638
|
-
customKey: page.dbKey
|
|
639
|
-
})
|
|
640
|
-
).unwrap();
|
|
641
|
-
}
|
|
642
|
-
} catch {
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
588
|
|
|
648
589
|
export {
|
|
649
590
|
extractRuntimePageCapabilities,
|
|
@@ -666,6 +607,5 @@ export {
|
|
|
666
607
|
CODING_ROOT_SKILL_REFERENCE,
|
|
667
608
|
resolveCodingBuiltinSlug,
|
|
668
609
|
buildCodingSkillContentByKey,
|
|
669
|
-
resolveCodingEffectiveTools
|
|
670
|
-
ensureCodingSkills
|
|
610
|
+
resolveCodingEffectiveTools
|
|
671
611
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isOAuthApiKeyRef
|
|
3
|
+
} from "./chunk-YYLHWIW6.js";
|
|
1
4
|
import {
|
|
2
5
|
getModelAbility
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-G36SUBHA.js";
|
|
4
7
|
|
|
5
8
|
// packages/ai/agent/safeAgentSummary.ts
|
|
6
9
|
function parseTimestamp(val) {
|
|
@@ -103,10 +106,12 @@ function toSafeAgentSummary(record, options) {
|
|
|
103
106
|
const favStatus = resolveFavoriteStatus(record, options);
|
|
104
107
|
const isPublic = record?.isPublic === true || record?.isPublicFlag === true || record?.publicRecordExists === true;
|
|
105
108
|
const updatedAt = safeTimestamp(record?.updatedAt ?? record?.createdAt ?? record?.created);
|
|
109
|
+
const nextAvailableAt = typeof record?.nextAvailableAt === "number" && Number.isFinite(record.nextAvailableAt) ? record.nextAvailableAt : void 0;
|
|
106
110
|
const currentUserId = options?.userId;
|
|
107
111
|
const isOwnedByRecord = Boolean(currentUserId) && (typeof record?.userId === "string" && record.userId === currentUserId || typeof record?.ownerId === "string" && record.ownerId === currentUserId);
|
|
108
112
|
const isOwnedByDbKey = Boolean(currentUserId) && typeof record?.dbKey === "string" && record.dbKey.startsWith(`agent-${currentUserId}-`);
|
|
109
113
|
const isOwned = isOwnedByRecord || isOwnedByDbKey;
|
|
114
|
+
const isOAuth = isOAuthApiKeyRef(record?.apiKeyRef);
|
|
110
115
|
let agentKey;
|
|
111
116
|
if (Boolean(currentUserId) && id) {
|
|
112
117
|
if (isOwned) {
|
|
@@ -134,19 +139,27 @@ function toSafeAgentSummary(record, options) {
|
|
|
134
139
|
favoritedAt: favStatus.favoritedAt,
|
|
135
140
|
isPublic,
|
|
136
141
|
isOwned,
|
|
142
|
+
isOAuth,
|
|
143
|
+
...nextAvailableAt !== void 0 ? { nextAvailableAt } : {},
|
|
137
144
|
updatedAt
|
|
138
145
|
};
|
|
139
146
|
}
|
|
140
147
|
function sortSafeAgentSummaries(agents) {
|
|
141
148
|
return [...agents].sort((left, right) => {
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
const isUserConfigured = (agent) => agent.isOAuth === true || agent.isOwned === true && agent.apiSource === "custom";
|
|
150
|
+
const priority = (agent) => {
|
|
151
|
+
const favorite = agent.isFavorite === true;
|
|
152
|
+
const configured = isUserConfigured(agent);
|
|
153
|
+
if (favorite && configured) return 0;
|
|
154
|
+
if (favorite) return 1;
|
|
155
|
+
if (configured) return 2;
|
|
156
|
+
if (agent.isOwned === true) return 3;
|
|
157
|
+
return 4;
|
|
158
|
+
};
|
|
159
|
+
const priorityDiff = priority(left) - priority(right);
|
|
160
|
+
if (priorityDiff !== 0) return priorityDiff;
|
|
146
161
|
const leftFav = left.isFavorite === true;
|
|
147
162
|
const rightFav = right.isFavorite === true;
|
|
148
|
-
if (leftFav && !rightFav) return -1;
|
|
149
|
-
if (!leftFav && rightFav) return 1;
|
|
150
163
|
if (leftFav && rightFav) {
|
|
151
164
|
const leftFavAt = parseTimestamp(left.favoritedAt);
|
|
152
165
|
const rightFavAt = parseTimestamp(right.favoritedAt);
|