@surething/cockpit 1.0.247 → 1.0.248
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/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +2 -2
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +2 -2
- package/.next-prod/server/chunks/4848.js +68 -13
- package/.next-prod/server/chunks/6038.js +1 -1
- package/.next-prod/server/chunks/9658.js +3 -3
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{6784-59c6418d36cf5a13.js → 6784-4a7131705a94a485.js} +0 -0
- package/.next-prod/static/chunks/{8010-75928e3e1e85c88e.js → 8010-feeef81a0401286a.js} +1 -1
- package/.next-prod/trace +14 -14
- package/.next-prod/trace-build +1 -1
- package/dist/scheduledTasks.mjs +70 -37
- package/package.json +1 -1
- /package/.next-prod/static/{CQYkjM0s2vhvvRjWjJ865 → 16e9CEOqCbMBCySF862ss}/_buildManifest.js +0 -0
- /package/.next-prod/static/{CQYkjM0s2vhvvRjWjJ865 → 16e9CEOqCbMBCySF862ss}/_ssgManifest.js +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":19542636,"timestamp":265259864,"id":14,"parentId":1,"tags":{},"startTime":1784734691672,"traceId":"6e82f9e117ec3c81"},{"name":"run-typescript","duration":18233820,"timestamp":284806379,"id":1661,"parentId":1,"tags":{},"startTime":1784734711218,"traceId":"6e82f9e117ec3c81"},{"name":"static-check","duration":1143131,"timestamp":303082866,"id":1664,"parentId":1,"tags":{},"startTime":1784734729495,"traceId":"6e82f9e117ec3c81"},{"name":"static-generation","duration":6391359,"timestamp":304328236,"id":1950,"parentId":1,"tags":{},"startTime":1784734730740,"traceId":"6e82f9e117ec3c81"},{"name":"collect-build-traces","duration":19716907,"timestamp":304226644,"id":1947,"parentId":1,"tags":{},"startTime":1784734730639,"traceId":"6e82f9e117ec3c81"},{"name":"telemetry-flush","duration":57,"timestamp":323948071,"id":1959,"parentId":1,"tags":{},"startTime":1784734750360,"traceId":"6e82f9e117ec3c81"},{"name":"next-build","duration":58859929,"timestamp":265088212,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1784734691500,"traceId":"6e82f9e117ec3c81"}]
|
package/dist/scheduledTasks.mjs
CHANGED
|
@@ -186,8 +186,6 @@ Always update it with the Edit tool (Write only when first creating it),
|
|
|
186
186
|
never through shell redirection.`;
|
|
187
187
|
|
|
188
188
|
// packages/feature/agent/src/server/lib/ccPrompt.ts
|
|
189
|
-
var CC_LABEL_ZH = "\u4EFB\u52A1\uFF1A";
|
|
190
|
-
var CC_LABEL_EN = "Task: ";
|
|
191
189
|
var CC_PROMPT_ZH = `---
|
|
192
190
|
name: cc
|
|
193
191
|
description: "\u8FDB\u5165 Cockpit CLI\uFF08cock/cockpit \u5B50\u547D\u4EE4\uFF09\u64CD\u4F5C\u6A21\u5F0F\uFF1A\u901A\u8FC7\u7626\u5BA2\u6237\u7AEF\u9A71\u52A8\u672C\u673A server \u7684 terminal/browser \u6C14\u6CE1\u4E0E codegraph \u7B49\u5B50\u547D\u4EE4\u3002"
|
|
@@ -320,8 +318,6 @@ cockpit codegraph <subsubcmd> --help
|
|
|
320
318
|
\`\`\``;
|
|
321
319
|
|
|
322
320
|
// packages/feature/agent/src/server/lib/cgPrompt.ts
|
|
323
|
-
var CG_LABEL_ZH = "\u63A2\u7D22\u95EE\u9898\uFF1A";
|
|
324
|
-
var CG_LABEL_EN = "Exploration: ";
|
|
325
321
|
var CG_PROMPT_ZH = `---
|
|
326
322
|
name: cg
|
|
327
323
|
description: "\u8FDB\u5165\u9879\u76EE\u56FE\u8C31\uFF08CodeGraph\uFF09\u63A2\u7D22\u6A21\u5F0F\uFF1A\u7528\u9884\u5EFA\u7684\u7B26\u53F7 + \u8C03\u7528\u56FE + git \u534F\u540C\u89C6\u56FE\uFF08search/callers/callees/impact/file/coedit + context/related/risk/affected\uFF09\u8FFD\u4EE3\u7801\u3001\u8BC4\u4F30\u5F71\u54CD\u8303\u56F4\uFF0C\u8FD4\u56DE\u5750\u6807\u800C\u975E\u6E90\u7801\u3002"
|
|
@@ -1162,12 +1158,27 @@ argument-hint: "\u63CF\u8FF0\u4F60\u60F3\u8981\u7684\u5C0F\u5E94\u7528"
|
|
|
1162
1158
|
# \u751F\u6210 Cockpit \u5C0F\u5E94\u7528
|
|
1163
1159
|
|
|
1164
1160
|
\u4E00\u4E2A\u80FD\u53D6/\u6539\u6570\u636E\u7684\u5C0F\u5E94\u7528\uFF1A\u9884\u89C8\u65F6\u6CE8\u5165\u4E86\u5168\u5C40 \`window.cockpit\` SDK \u2014\u2014 \u672C\u8D28\u5C31\u662F Bash
|
|
1165
|
-
\u5DE5\u5177\u66B4\u9732\u7ED9\u9875\u9762\uFF0C\u9875\u9762\u6309\u94AE\u80FD \`curl\`\u3001\u8BFB\u5199\u6587\u4EF6\u3001\u8DD1\u811A\u672C\u3002
|
|
1161
|
+
\u5DE5\u5177\u66B4\u9732\u7ED9\u9875\u9762\uFF0C\u9875\u9762\u6309\u94AE\u80FD \`curl\`\u3001\u8BFB\u5199\u6587\u4EF6\u3001\u8DD1\u811A\u672C\u3002
|
|
1166
1162
|
|
|
1167
1163
|
**\u9ED8\u8BA4\u7528 React \u5199**\uFF08\u4E0B\u9762\u7684\u672C\u5730\u96F6\u6784\u5EFA\u6808\uFF0Cproductized\u3001AI \u6700\u719F\uFF0C\u9002\u5408\u6709\u72B6\u6001 / \u591A\u89C6\u56FE /
|
|
1168
1164
|
\u8868\u5355\uFF09\uFF1B\u53EA\u6709**\u6781\u7B80\u5355\u7684\u5355\u89C6\u56FE\u3001\u6216\u7EAF\u9759\u6001\u4E00\u6B21\u6027\u9875**\u624D\u9000\u56DE\u5355\u6587\u4EF6\u5185\u8054 HTML\u3002\u4E24\u79CD\u6A21\u5F0F\u5171\u7528\u4E0B\u9762
|
|
1169
1165
|
\u8FD9\u5957\u5951\u7EA6\u3002
|
|
1170
1166
|
|
|
1167
|
+
## \u6D41\u7A0B\uFF1A\u5148\u5BF9\u9F50\uFF0C\u786E\u8BA4\u540E\u518D\u5199\uFF08\u91CD\u8981\uFF09
|
|
1168
|
+
|
|
1169
|
+
**\u522B\u4E00\u4E0A\u6765\u5C31\u5199\u6587\u4EF6**\uFF0C\u5206\u4E09\u6B65\uFF1A
|
|
1170
|
+
|
|
1171
|
+
1. **\u5BF9\u9F50\u9700\u6C42** \u2014\u2014 \u5148\u590D\u8FF0\u4F60\u5BF9\u8FD9\u4E2A\u5C0F\u5E94\u7528\u7684\u7406\u89E3\uFF08\u505A\u4EC0\u4E48\u3001\u7528 React \u8FD8\u662F\u5355\u6587\u4EF6\u3001\u6570\u636E\u4ECE\u54EA\u6765\u3001
|
|
1172
|
+
\u5173\u952E\u529F\u80FD\u4E0E\u4EA4\u4E92\uFF09\u3002\u4EC5\u5F53\u9700\u6C42\u6709\u6B67\u4E49\u6216\u5B58\u5728\u591A\u79CD\u5408\u7406\u89E3\u8BFB\u65F6\u624D\u56DE\u95EE\uFF1B\u5DF2\u7ECF\u6E05\u695A\u5C31\u76F4\u63A5\u7ED9\u4E00\u6BB5\u7B80\u77ED
|
|
1173
|
+
\u7684\u7406\u89E3\u6458\u8981\uFF0C\u4E0D\u5FC5\u9010\u6761\u8FFD\u95EE\u3002
|
|
1174
|
+
2. **\u544A\u77E5\u5B58\u653E\u76EE\u5F55** \u2014\u2014 \u6309\u4E0B\u9762\u300C\u5B58\u653E\u4F4D\u7F6E\u300D\u89C4\u5219\u5B9A\u51FA \`<\u76EE\u5F55>/<name>/\`\uFF0C\u660E\u786E\u544A\u8BC9\u7528\u6237\u51C6\u5907\u5B58\u54EA\u3001
|
|
1175
|
+
\u53EB\u4EC0\u4E48\u540D\uFF1B\u7528\u6237\u53EF\u5426\u51B3\u6216\u6539\u76EE\u5F55 / \u6539\u540D\u3002
|
|
1176
|
+
3. **\u786E\u8BA4\u540E\u624D\u5199** \u2014\u2014 \u7B49\u7528\u6237\u660E\u786E\u540C\u610F\uFF08\u786E\u8BA4 / \u5F00\u59CB / \u5199\u5427 / go \u7B49\u4EFB\u610F\u80AF\u5B9A\u8868\u793A\uFF09\u518D \`Write\`
|
|
1177
|
+
\u843D\u76D8\u3002\u786E\u8BA4\u4E4B\u524D\u53EA\u8BA8\u8BBA\u3001\u4E0D\u5199\u6587\u4EF6\u3002
|
|
1178
|
+
|
|
1179
|
+
\u5373\u4FBF\u7528\u6237\u5728 \`/html\` \u540E\u5DF2\u7ECF\u628A\u9700\u6C42\u548C\u76EE\u5F55\u90FD\u5199\u6E05\u695A\u4E86\uFF0C\u4E5F\u8981\u5148\u505C\u4E00\u8F6E\uFF0C\u7ED9\u51FA\u300C\u7406\u89E3 + \u76EE\u5F55 + \u4E00\u53E5
|
|
1180
|
+
\u300E\u786E\u8BA4\u5C31\u5F00\u59CB\u5199?\u300F\u300D\u7B49\u5F85\u786E\u8BA4\u2014\u2014\u4F46\u8FD9\u4E00\u8F6E\u8981**\u8F7B\u91CF**\uFF0C\u522B\u53CD\u590D\u8FFD\u95EE\u3002
|
|
1181
|
+
|
|
1171
1182
|
## \u5951\u7EA6\uFF1Awindow.cockpit\uFF08\u4E24\u6A21\u5F0F\u5171\u7528\uFF0C\u53EA\u6B64\u4E00\u5904\uFF09
|
|
1172
1183
|
|
|
1173
1184
|
\u9875\u9762\u52A0\u8F7D\u65F6 SDK \u5DF2\u5C31\u7EEA\uFF0C\u65E0\u9700\u5F15\u5165\u4EFB\u4F55\u5E93\uFF1A
|
|
@@ -1293,7 +1304,17 @@ function App() {
|
|
|
1293
1304
|
</script>
|
|
1294
1305
|
\`\`\`
|
|
1295
1306
|
|
|
1296
|
-
|
|
1307
|
+
## \u5B58\u653E\u4F4D\u7F6E
|
|
1308
|
+
|
|
1309
|
+
\u4E00\u4E2A app \u7684\u6240\u6709\u6587\u4EF6\uFF08\`index.html\` + \`app.jsx\` + \`api.mjs\` \u2026\uFF09\u653E\u8FDB\u540C\u4E00\u4E2A \`<name>/\`
|
|
1310
|
+
\u5B50\u76EE\u5F55\u3002\`<name>\` **\u4E00\u5F8B\u7531\u4F60\u6309\u9700\u6C42\u8D77\u540D**\uFF08\u77ED\u6A2A\u7EBF\u5C0F\u5199\uFF0C\u4E0E \`cockpit-name\` \u4E00\u81F4\uFF09\uFF0C\u7528\u6237\u53EA
|
|
1311
|
+
\u63CF\u8FF0\u9700\u6C42\u3001\u4E0D\u8D1F\u8D23\u8D77\u540D\u3002\u76EE\u6807\u76EE\u5F55\u6309\u4E0B\u9762\u89C4\u5219\u786E\u5B9A\uFF1A
|
|
1312
|
+
|
|
1313
|
+
- \u7528\u6237\u5728\u9700\u6C42\u91CC\u7ED9\u4E86\u76EE\u5F55 \u2192 \u5B58\u5230 \`<\u7528\u6237\u7ED9\u7684\u76EE\u5F55>/<name>/\`
|
|
1314
|
+
- \u7528\u6237\u6CA1\u7ED9 \u2192 \u5B58\u5230**\u5F53\u524D\u804A\u5929\u5DE5\u4F5C\u76EE\u5F55**\uFF08\u672C\u6B21\u4F1A\u8BDD\u7684 cwd\uFF09\u4E0B\u7684 \`<name>/\`
|
|
1315
|
+
|
|
1316
|
+
\u522B\u628A\u6587\u4EF6\u6563\u843D\u5230\u522B\u5904\u6216\u81EA\u9020 \`.cockpit-apps\` \u4E4B\u7C7B\u76EE\u5F55\u3002\u8FD9\u4E2A\u76EE\u5F55\u5C31\u662F\u4E0A\u9762\u300C\u6D41\u7A0B\u300D\u7B2C 2 \u6B65\u8981\u544A\u77E5\u7528\u6237\u7684\uFF1B**\u7528\u6237\u786E\u8BA4\u540E**\u518D\u7528 \`Write\` \u5199\u51FA\uFF0C\u7528\u6237\u70B9\u51FB
|
|
1317
|
+
\u5373\u53EF\u9884\u89C8\u5E76\u4EA4\u4E92\u3002`;
|
|
1297
1318
|
var HTML_PROMPT_EN = `---
|
|
1298
1319
|
name: html
|
|
1299
1320
|
description: "Generate an interactive small app with the built-in cockpit bash SDK to fetch/update data"
|
|
@@ -1304,13 +1325,32 @@ argument-hint: "describe the small app you want"
|
|
|
1304
1325
|
|
|
1305
1326
|
A small app that can fetch/update data: the preview injects a global
|
|
1306
1327
|
\`window.cockpit\` SDK \u2014 essentially the Bash tool exposed to the page, so buttons can
|
|
1307
|
-
\`curl\`, read/write files, and run scripts.
|
|
1328
|
+
\`curl\`, read/write files, and run scripts.
|
|
1308
1329
|
|
|
1309
1330
|
**Default to React** (the local zero-build stack below \u2014 productized, most AI-familiar,
|
|
1310
1331
|
ideal for stateful / multi-view / form apps); fall back to single-file inline HTML only
|
|
1311
1332
|
for a **trivial single view or a purely static one-off**. Both modes share the one
|
|
1312
1333
|
contract below.
|
|
1313
1334
|
|
|
1335
|
+
## Flow: align first, write only after confirmation (important)
|
|
1336
|
+
|
|
1337
|
+
**Don't write files up front.** Three steps:
|
|
1338
|
+
|
|
1339
|
+
1. **Align on the requirement** \u2014 restate your understanding of the app (what it does,
|
|
1340
|
+
React vs single-file, where data comes from, key features/interactions). Ask back only
|
|
1341
|
+
when the requirement is ambiguous or has several reasonable readings; if it's already
|
|
1342
|
+
clear, just give a short understanding summary \u2014 don't interrogate.
|
|
1343
|
+
2. **Tell the storage directory** \u2014 resolve \`<dir>/<name>/\` per the "Where to store" rules
|
|
1344
|
+
below and tell the user exactly where it'll go and what it's named; the user may reject
|
|
1345
|
+
or change the directory / name.
|
|
1346
|
+
3. **Write only after confirmation** \u2014 \`Write\` the files only once the user clearly agrees
|
|
1347
|
+
(confirm / start / go / "write it" \u2014 any affirmative). Until then, only discuss \u2014 write
|
|
1348
|
+
nothing to disk.
|
|
1349
|
+
|
|
1350
|
+
Even if the user already spelled out the requirement and directory in the \`/html\` call,
|
|
1351
|
+
still stop once to present "understanding + directory + a 'shall I start writing?'" and
|
|
1352
|
+
wait \u2014 but keep this round **lightweight**, don't re-interrogate.
|
|
1353
|
+
|
|
1314
1354
|
## Contract: window.cockpit (shared by both modes, stated once)
|
|
1315
1355
|
|
|
1316
1356
|
The SDK is ready on load \u2014 no library to import:
|
|
@@ -1442,11 +1482,20 @@ Background (live log):
|
|
|
1442
1482
|
</script>
|
|
1443
1483
|
\`\`\`
|
|
1444
1484
|
|
|
1445
|
-
|
|
1485
|
+
## Where to store it
|
|
1486
|
+
|
|
1487
|
+
Put all of an app's files (\`index.html\` + \`app.jsx\` + \`api.mjs\` \u2026) in a single
|
|
1488
|
+
\`<name>/\` subdirectory. **You always pick \`<name>\`** from the request (lowercase
|
|
1489
|
+
kebab-case, matching \`cockpit-name\`) \u2014 the user only describes the app, they don't
|
|
1490
|
+
name it. Resolve the target directory as follows:
|
|
1491
|
+
|
|
1492
|
+
- The user gave a directory in the request \u2192 store under \`<the given directory>/<name>/\`.
|
|
1493
|
+
- The user gave none \u2192 store under the **current chat working directory** (this session's cwd), i.e. \`<cwd>/<name>/\`.
|
|
1494
|
+
|
|
1495
|
+
Don't scatter files elsewhere or invent a directory like \`.cockpit-apps\`. This directory is what step 2 of the flow above tells the user; **after the user confirms**,
|
|
1496
|
+
\`Write\` the files; the user clicks to preview and interact.`;
|
|
1446
1497
|
|
|
1447
1498
|
// packages/feature/agent/src/server/lib/newBranchPrompt.ts
|
|
1448
|
-
var NEW_BRANCH_LABEL_ZH = "\u9700\u6C42\uFF1A";
|
|
1449
|
-
var NEW_BRANCH_LABEL_EN = "Intent: ";
|
|
1450
1499
|
var NEW_BRANCH_PROMPT_ZH = `---
|
|
1451
1500
|
name: new-branch
|
|
1452
1501
|
description: "\u521B\u5EFA\u4E00\u4E2A\u57FA\u4E8E\u6700\u65B0 origin/main \u7684\u65B0\u5206\u652F\uFF1Afetch \u8FDC\u7AEF \u2192 \u4ECE origin/main \u5207\u51FA\u65B0\u5206\u652F \u2192 \u6821\u9A8C\u5DF2\u4E0E\u8FDC\u7AEF\u540C\u6B65\u3002\u7528\u4E8E\uFF1A\u7528\u6237\u8BF4\u300E\u65B0\u5EFA\u5206\u652F / \u521B\u5EFA\u5206\u652F / new branch\u300F\uFF0C\u5E0C\u671B\u65B0\u5206\u652F\u5E72\u51C0\u5730\u8D77\u6B65\u4E8E\u6700\u65B0\u4E3B\u5E72\u3002"
|
|
@@ -1599,8 +1648,6 @@ Follow the KISS principle.
|
|
|
1599
1648
|
Output your understanding only; do not modify code.`;
|
|
1600
1649
|
|
|
1601
1650
|
// packages/feature/agent/src/server/lib/skillifyPrompt.ts
|
|
1602
|
-
var SKILLIFY_LABEL_ZH = "\u76EE\u6807\uFF1A";
|
|
1603
|
-
var SKILLIFY_LABEL_EN = "Target: ";
|
|
1604
1651
|
var SKILLIFY_PROMPT_ZH = `---
|
|
1605
1652
|
name: skillify
|
|
1606
1653
|
description: "\u628A\u4E00\u6B21\u6210\u529F\u7684\u5904\u7406\u6D41\u7A0B / \u8C03\u7814\u65B9\u5F0F / \u5DE5\u5177\u7EC4\u5408 / \u4E60\u60EF\uFF0C\u6C89\u6DC0\u6210\u4E00\u4E2A\u53EF\u590D\u7528\u7684 Skill\u3002\u5148\u5206\u6790\u5386\u53F2\u4F1A\u8BDD\u6709\u6CA1\u6709\u503C\u5F97\u63D0\u53D6\u7684\u77E5\u8BC6\uFF0C\u518D\u63D0\u70BC\uFF0C\u6700\u540E\u6309\u6307\u5B9A\u76EE\u5F55\u4FDD\u5B58\u3002"
|
|
@@ -1620,7 +1667,7 @@ argument-hint: "[\u653E\u7F6E\u76EE\u5F55] [\u8981 skillify \u7684\u5BF9\u8C61]"
|
|
|
1620
1667
|
|
|
1621
1668
|
## \u53C2\u6570\uFF08\u90FD\u53EF\u9009\uFF0C\u4FDD\u5B58\u65F6\u624D\u7528\uFF09
|
|
1622
1669
|
|
|
1623
|
-
- **\u5C3E\u968F\u6587\u672C**\uFF08
|
|
1670
|
+
- **\u5C3E\u968F\u6587\u672C**\uFF08\`/skillify\` \u540E\u9762\u90A3\u6BB5\uFF09= \u60F3 skillify \u7684\u5BF9\u8C61 / \u7EBF\u7D22\uFF1B\u4E0D\u7ED9\u5C31\u4ECE\u6700\u8FD1\u4E0A\u4E0B\u6587\u91CC\u81EA\u52A8\u63D0\u70BC\u3002
|
|
1624
1671
|
- **\u653E\u7F6E\u76EE\u5F55 \`<skills-dir>\`** = skill \u843D\u76D8\u4F4D\u7F6E\uFF0Ccanonical source \u5199\u5230 \`<skills-dir>/<slug>/SKILL.md\`\u3002**\u5230"\u4FDD\u5B58"\u90A3\u4E00\u6B65\u624D\u9700\u8981**\uFF1B\u7528\u6237\u6CA1\u7ED9\u518D\u95EE\uFF0C\u4E0D\u8981\u5728\u5206\u6790\u524D\u5C31\u5148\u95EE\u3002
|
|
1625
1672
|
|
|
1626
1673
|
## \u7B2C 1 \u6B65\uFF1A\u5206\u6790 \u2014\u2014 \u6709\u6CA1\u6709\u503C\u5F97\u6C89\u6DC0\u7684\u77E5\u8BC6\uFF08\u626B\u63CF \u2192 \u95F8\u95E8\uFF09
|
|
@@ -1806,7 +1853,7 @@ Core goal: **turn a one-time success into a stable procedure, not copy a transie
|
|
|
1806
1853
|
|
|
1807
1854
|
## Arguments (all optional; used only at save time)
|
|
1808
1855
|
|
|
1809
|
-
- **Trailing text** (after \`
|
|
1856
|
+
- **Trailing text** (after \`/skillify\`) = the object / lead to skillify; if omitted, distil from recent context.
|
|
1810
1857
|
- **Placement directory \`<skills-dir>\`** = where the skill lands; the canonical source goes to \`<skills-dir>/<slug>/SKILL.md\`. **Only needed at the "save" step**; ask only if the user hasn't provided it \u2014 never ask before analysis.
|
|
1811
1858
|
|
|
1812
1859
|
## Step 1: Analyze \u2014 is there knowledge worth capturing (scan \u2192 gate)
|
|
@@ -1982,21 +2029,11 @@ var COMMAND_CONTENT = {
|
|
|
1982
2029
|
ex: { zh: EX_PROMPT_ZH, en: EX_PROMPT_EN },
|
|
1983
2030
|
go: { zh: GO_PROMPT_ZH, en: GO_PROMPT_EN },
|
|
1984
2031
|
html: { zh: HTML_PROMPT_ZH, en: HTML_PROMPT_EN },
|
|
1985
|
-
cg: { zh: CG_PROMPT_ZH, en: CG_PROMPT_EN
|
|
1986
|
-
cc: { zh: CC_PROMPT_ZH, en: CC_PROMPT_EN
|
|
2032
|
+
cg: { zh: CG_PROMPT_ZH, en: CG_PROMPT_EN },
|
|
2033
|
+
cc: { zh: CC_PROMPT_ZH, en: CC_PROMPT_EN },
|
|
1987
2034
|
cr: { zh: CR_PROMPT_ZH, en: CR_PROMPT_EN },
|
|
1988
|
-
"new-branch": {
|
|
1989
|
-
|
|
1990
|
-
en: NEW_BRANCH_PROMPT_EN,
|
|
1991
|
-
labelZh: NEW_BRANCH_LABEL_ZH,
|
|
1992
|
-
labelEn: NEW_BRANCH_LABEL_EN
|
|
1993
|
-
},
|
|
1994
|
-
skillify: {
|
|
1995
|
-
zh: SKILLIFY_PROMPT_ZH,
|
|
1996
|
-
en: SKILLIFY_PROMPT_EN,
|
|
1997
|
-
labelZh: SKILLIFY_LABEL_ZH,
|
|
1998
|
-
labelEn: SKILLIFY_LABEL_EN
|
|
1999
|
-
}
|
|
2035
|
+
"new-branch": { zh: NEW_BRANCH_PROMPT_ZH, en: NEW_BRANCH_PROMPT_EN },
|
|
2036
|
+
skillify: { zh: SKILLIFY_PROMPT_ZH, en: SKILLIFY_PROMPT_EN }
|
|
2000
2037
|
};
|
|
2001
2038
|
var BUILTIN_SKILLS_DIR = join(COCKPIT_DIR, "skills");
|
|
2002
2039
|
function deriveBaseUrl() {
|
|
@@ -2025,17 +2062,18 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
|
|
|
2025
2062
|
});
|
|
2026
2063
|
const baseUrl = deriveBaseUrl();
|
|
2027
2064
|
const resolved = steps.map((s) => resolveStep(s, lang, baseUrl, userSkills));
|
|
2065
|
+
const then = lang === "zh" ? "\u7136\u540E\uFF1A" : "Then: ";
|
|
2028
2066
|
if (resolved.length === 1 && resolved[0].marker === "/" && !preamble) {
|
|
2029
2067
|
const r = resolved[0];
|
|
2030
2068
|
return r.body ? `${r.pointer}
|
|
2031
2069
|
|
|
2032
|
-
${
|
|
2070
|
+
${then}${r.body}` : r.pointer;
|
|
2033
2071
|
}
|
|
2034
2072
|
const intro = lang === "zh" ? "\u8BF7\u6309\u4EE5\u4E0B\u6B65\u9AA4\u4F9D\u6B21\u5B8C\u6210\uFF1A" : "Complete the following steps in order:";
|
|
2035
2073
|
const blocks = resolved.map((r, idx) => {
|
|
2036
2074
|
const where = stepHeader(idx + 1, r.marker, lang);
|
|
2037
2075
|
const bodyPart = r.body ? `
|
|
2038
|
-
${
|
|
2076
|
+
${then}${r.body}` : "";
|
|
2039
2077
|
return `${where}
|
|
2040
2078
|
${r.pointer}${bodyPart}`;
|
|
2041
2079
|
});
|
|
@@ -2047,13 +2085,13 @@ ${r.pointer}${bodyPart}`;
|
|
|
2047
2085
|
function resolveStep(step, lang, baseUrl, userSkills) {
|
|
2048
2086
|
const skill = userSkills.find((s) => s.name === step.cmd);
|
|
2049
2087
|
if (skill) {
|
|
2050
|
-
return { marker: step.marker, body: step.body,
|
|
2088
|
+
return { marker: step.marker, body: step.body, pointer: readSkillPointer(skill.path, lang) };
|
|
2051
2089
|
}
|
|
2052
2090
|
const entry = COMMAND_CONTENT[step.cmd];
|
|
2053
2091
|
const content = entry[lang].replaceAll("{{BASE_URL}}", baseUrl);
|
|
2054
2092
|
const skillPath = writeBuiltinSkill(step.cmd, content);
|
|
2055
2093
|
const pointer = skillPath ? readSkillPointer(skillPath, lang) : content;
|
|
2056
|
-
return { marker: step.marker, body: step.body,
|
|
2094
|
+
return { marker: step.marker, body: step.body, pointer };
|
|
2057
2095
|
}
|
|
2058
2096
|
function readSkillPointer(skillPath, lang) {
|
|
2059
2097
|
return lang === "zh" ? `\u8BF7\u8BFB\u53D6\u8FD9\u4E2A skill \u6587\u4EF6\uFF1A
|
|
@@ -2102,11 +2140,6 @@ function writeBuiltinSkill(cmd, content) {
|
|
|
2102
2140
|
return null;
|
|
2103
2141
|
}
|
|
2104
2142
|
}
|
|
2105
|
-
function labelFor(entry, lang) {
|
|
2106
|
-
const custom2 = lang === "zh" ? entry.labelZh : entry.labelEn;
|
|
2107
|
-
if (custom2) return custom2;
|
|
2108
|
-
return lang === "zh" ? "\u95EE\u9898\uFF1A" : "Question: ";
|
|
2109
|
-
}
|
|
2110
2143
|
|
|
2111
2144
|
// packages/feature/agent/src/server/engines/orchestrator.ts
|
|
2112
2145
|
import { randomUUID } from "crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surething/cockpit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.248",
|
|
4
4
|
"description": "The open-source Claude Code GUI — an IDE-like workbench for parallel AI coding. Drive Claude (default), Codex, DeepSeek, Kimi, or local Ollama in tabs. Terminal, browser & DB bubbles, code review. Self-host on a shared dev box — a seat for every teammate. Local-first, MIT.",
|
|
5
5
|
"author": "Robert",
|
|
6
6
|
"license": "MIT",
|
/package/.next-prod/static/{CQYkjM0s2vhvvRjWjJ865 → 16e9CEOqCbMBCySF862ss}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|