@deepseek-insight/dsi 0.10.1 → 0.10.2
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/.agents/skills/glass-dsi/scripts/_connect.mjs +21 -2
- package/.agents/skills/glass-url/scripts/_connect.mjs +4 -2
- package/README.md +30 -22
- package/bin/lib/glass-browser-bootstrap.mjs +19 -2
- package/bin/lib/zai-patch.mjs +3 -1
- package/build/client/_app/immutable/assets/{0.CxUWwepa.css → 0.B2rul4Mk.css} +1 -1
- package/build/client/_app/immutable/assets/2.glyfXGzi.css +1 -0
- package/build/client/_app/immutable/chunks/{UcxQDPMg.js → BodLd2is.js} +1 -1
- package/build/client/_app/immutable/chunks/Cy4hfhN-.js +1 -0
- package/build/client/_app/immutable/chunks/D17XAauH.js +2 -0
- package/build/client/_app/immutable/chunks/FY34R_78.js +1 -0
- package/build/client/_app/immutable/entry/{app.GxH1nznH.js → app.ClaEF2lH.js} +2 -2
- package/build/client/_app/immutable/entry/start.CU6iOT39.js +1 -0
- package/build/client/_app/immutable/nodes/{1.BVvBJtMj.js → 1.CSTMQTZ7.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.D0JzdegJ.js → 2.CdbJFHUF.js} +197 -199
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +5 -5
- package/build/index.js +5 -5
- package/build/server/chunks/chunks/{db.js-f2PmBjyD.js → db.js-BGSxIVb3.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-DkwY64WO.js → db2.js-vQNFcVO7.js} +2 -2
- package/build/server/chunks/chunks/{dsh-connection.js-BW07Aicl.js → dsh-connection.js-Dcdxqp52.js} +27 -7
- package/build/server/chunks/chunks/{exports.js-DH_tjtdv.js → exports.js-D5zA1U7A.js} +42 -4
- package/build/server/chunks/chunks/{git-probe.js-CQqTV7XX.js → git-probe.js-BIieYqLU.js} +2 -2
- package/build/server/chunks/chunks/{insight-config.js-C5-Rhh5A.js → insight-config.js-ylYA2CXm.js} +2 -2
- package/build/server/chunks/chunks/{internal2.js-BRzR_ZGp.js → internal2.js-XxZ8wzRE.js} +3 -3
- package/build/server/chunks/chunks/{registry.js-6St5Biiy.js → registry.js-ClhrzR6O.js} +51 -48
- package/build/server/chunks/chunks/{registry2.js-CFzpvj9c.js → registry2.js-BZfrwsOy.js} +20 -1
- package/build/server/chunks/chunks/{settings-document.js-DxKURfc_.js → settings-document.js-BIxaivJ1.js} +23 -8
- package/build/server/chunks/chunks/{state.js-Ct6h8rMl.js → state.js-D5zsYmjz.js} +3 -3
- package/build/server/chunks/chunks/{watcher.js-DvlNn8X0.js → watcher.js-Bcm29AuA.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-DItDXV23.js → _server.ts.js-BbIEpZB5.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-Hor8QZb1.js → _server.ts.js-Daho1I-l.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-CEvvsa8B.js → _server.ts.js-C5X77Uef.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-DYvCel9L.js → _server.ts.js-B-Ns5pyR.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-CDNbpOqu.js → _server.ts.js-CzXe-sTr.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-C8UZMTcb.js → _server.ts.js-Ct465_rt.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-CERwttQS.js → _server.ts.js-6mdytkvM.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-DtVkS-mH.js → _server.ts.js-BwUPVQGx.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-C85umKKr.js → _server.ts.js-8Nq3JxSo.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-CrTtygPQ.js → _server.ts.js-B9eKtj1-.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-DgJ6DXVr.js → _server.ts.js-CHJs9Qbl.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-Bj9bKEEv.js → _server.ts.js-B32Ow0Y2.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js--1WTGEfT.js → _server.ts.js-Cpv4BolN.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-D8hQe810.js → _server.ts.js-DJqJImSI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-CSYYFlm2.js → _server.ts.js-Bm6IAZF6.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-KJjT8zXH.js → _server.ts.js-B1VVzfCk.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-DQtzgPeG.js → _server.ts.js-CoUpqHeq.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-DSkCBGRA.js → _server.ts.js-D9hK0CG8.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-C_9kwANR.js → _server.ts.js-DqPIv-gn.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-h1OTHcL4.js → _server.ts.js-DzFVVhO_.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/jobs/{_server.ts.js-B6nih9Sd.js → _server.ts.js-DvuZUgbK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/jobs/follow/{_server.ts.js-Cf17SVmD.js → _server.ts.js-D6brRlYZ.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-DjNwMbdS.js → _server.ts.js-8nNlcikK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-Cz5aaEhC.js → _server.ts.js-C8AZBt63.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-BFBy5O9Y.js → _server.ts.js-BFfr6uJh.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-CgEdCo3T.js → _server.ts.js-DSSgbD87.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-Bo_aEnHh.js → _server.ts.js-DYtrYC2P.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/changes/{_server.ts.js-Bd2G_GaH.js → _server.ts.js-HxI5M4jg.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-DL64FyRw.js → _server.ts.js-Ch0dMm33.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-MhOGB66D.js → _server.ts.js-BG5C--Ok.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-MjPgXgGO.js → _server.ts.js-B64YyaFI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-BUjDae5H.js → _server.ts.js-0RtL-9Zr.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-dTKd7Hsv.js → _server.ts.js-C4k-RTIw.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-B82rvKoI.js → _server.ts.js-CU38DxMt.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/path/{_server.ts.js-Cqijsi-c.js → _server.ts.js-BXphf5ux.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-CL_vVv2p.js → _server.ts.js-DQ5FG9Pc.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-WS4W9Ly4.js → _server.ts.js-In3bXhUO.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-B72KGRGh.js → _server.ts.js-Bd0KF8Qm.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-DK5xb2b5.js → _server.ts.js-4Y-KAw2r.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-lhT87EQu.js → _server.ts.js-zXYA1AJD.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-CMhfhbkN.js → _server.ts.js-vh7lFV0n.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/subagents/{_server.ts.js-BLvcFsg6.js → _server.ts.js-DH7OEWm0.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-D_rw2Uq6.js → _server.ts.js-CDwgBp7D.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-DfXpMMpw.js → _server.ts.js-CtFxC_yV.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-2mJCJVxk.js → _server.ts.js-DRNzGdAj.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-BCx0Lzjf.js → _server.ts.js-DIjNfN0d.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-DECaSjwp.js → _server.ts.js-CtV7JhrK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-i_ciJzlb.js → _server.ts.js-Cg9zHbUP.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-BO1pScn7.js → _server.ts.js-DOHmlKvl.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-Buhpf7WE.js → _server.ts.js-COVyy224.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-DngUQzcT.js → _server.ts.js-HjpfRAaT.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/delete/_server.ts.js-D9UU6xR6.js +42 -0
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/output/{_server.ts.js-DLETP4yQ.js → _server.ts.js-BqJRMRsb.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/reattach/{_server.ts.js-uWl6oxPS.js → _server.ts.js-D6bMXeOk.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/send/{_server.ts.js-DYNmXaAd.js → _server.ts.js-BRgsqPFM.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/stream/{_server.ts.js-C5m3Ktho.js → _server.ts.js-EWo4sSmg.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/{_server.ts.js-DoTNvcOa.js → _server.ts.js-v1ixRdpN.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/terminal/stream/_server.ts.js-BQOQyT7o.js +185 -0
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-BzYOJSkI.js → _server.ts.js-CjU6bLOf.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-xcNesei9.js → _server.ts.js-CYU0btiH.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-DsJWYdxt.js → _server.ts.js-Du9YcwLw.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-CNCku9BR.js → _server.ts.js-BdV_KDjb.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-nLsNjOxj.js → _server.ts.js-C-C84Yzu.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/write-gate/{_server.ts.js-urQk2-ds.js → _server.ts.js-D9uFvZya.js} +5 -5
- package/build/server/chunks/entries/{hooks.server.js-CU2RE5vs.js → hooks.server.js-YJQlamhk.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-BXD7Pthk.js → _error.svelte.js-TrOSxb0e.js} +4 -4
- package/build/server/chunks/entries/pages/{_page.server.ts.js-BK3Y6eff.js → _page.server.ts.js-BFDPRDEm.js} +2 -2
- package/build/server/chunks/entries/pages/{_page.svelte.js-DaZfwP76.js → _page.svelte.js-BUuXoaje.js} +477 -139
- package/build/server/chunks/{handler-C5_-AjlT.js → handler-BOqY82LA.js} +3 -3
- package/build/server/chunks/{index.js-BECscw6k.js → index.js-M1GginY2.js} +3 -44
- package/build/server/chunks/{manifest.js-aksIjogg.js → manifest.js-BEmwisii.js} +81 -67
- package/build/server/chunks/nodes/{0.js-xX4GZsu5.js → 0.js-Do4ZKaKe.js} +3 -3
- package/build/server/chunks/nodes/1.js-CRbdbfof.js +9 -0
- package/build/server/chunks/nodes/{2.js-CBdFoBFK.js → 2.js-BFX_zPfJ.js} +8 -8
- package/package.json +1 -1
- package/skills/dsi-drive-terminal/SKILL.md +23 -1
- package/skills/dsi-spec/SKILL.md +8 -0
- package/skills/dsi-task/SKILL.md +34 -0
- package/skills/dsi-token-spent/SKILL.md +122 -0
- package/template/.dsi/prompts.sqlite +0 -0
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/build/client/_app/immutable/assets/2.CSFboNRO.css +0 -1
- package/build/client/_app/immutable/chunks/C4M9oU_3.js +0 -1
- package/build/client/_app/immutable/chunks/CNT-CapI.js +0 -1
- package/build/client/_app/immutable/chunks/DttyJZuo.js +0 -2
- package/build/client/_app/immutable/entry/start.P-LmBYpD.js +0 -1
- package/build/server/chunks/nodes/1.js-BaNGyV1A.js +0 -9
- /package/build/client/_app/immutable/nodes/{0.CfpMgVS-.js → 0.CYP0vr1_.js} +0 -0
|
@@ -4,9 +4,9 @@ const index = 0;
|
|
|
4
4
|
let component_cache;
|
|
5
5
|
const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js-DRfiLzlz.js')).default;
|
|
6
6
|
const universal_id = "src/routes/+layout.ts";
|
|
7
|
-
const imports = ["_app/immutable/nodes/0.
|
|
8
|
-
const stylesheets = ["_app/immutable/assets/0.
|
|
7
|
+
const imports = ["_app/immutable/nodes/0.CYP0vr1_.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/CTWtsoJD.js","_app/immutable/chunks/D9jhmf3I.js"];
|
|
8
|
+
const stylesheets = ["_app/immutable/assets/0.B2rul4Mk.css"];
|
|
9
9
|
const fonts = [];
|
|
10
10
|
|
|
11
11
|
export { component, fonts, imports, index, stylesheets, universal_id };
|
|
12
|
-
//# sourceMappingURL=0.js-
|
|
12
|
+
//# sourceMappingURL=0.js-Do4ZKaKe.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 1;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('../entries/pages/_error.svelte.js-TrOSxb0e.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/1.CSTMQTZ7.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/BodLd2is.js","_app/immutable/chunks/D17XAauH.js","_app/immutable/chunks/D9jhmf3I.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=1.js-CRbdbfof.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { _ as server } from '../entries/pages/_page.server.ts.js-
|
|
2
|
-
import '../chunks/dsh-connection.js-
|
|
3
|
-
import '../chunks/insight-config.js-
|
|
1
|
+
export { _ as server } from '../entries/pages/_page.server.ts.js-BFDPRDEm.js';
|
|
2
|
+
import '../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
3
|
+
import '../chunks/insight-config.js-ylYA2CXm.js';
|
|
4
4
|
import '../chunks/config.js-r_jw_bQQ.js';
|
|
5
|
-
import '../chunks/settings-document.js-
|
|
5
|
+
import '../chunks/settings-document.js-BIxaivJ1.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import 'node:os';
|
|
@@ -19,11 +19,11 @@ import '../chunks/uneval.js-BJ9Qq2SF.js';
|
|
|
19
19
|
|
|
20
20
|
const index = 2;
|
|
21
21
|
let component_cache;
|
|
22
|
-
const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js-
|
|
22
|
+
const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js-BUuXoaje.js')).default;
|
|
23
23
|
const server_id = "src/routes/+page.server.ts";
|
|
24
|
-
const imports = ["_app/immutable/nodes/2.
|
|
25
|
-
const stylesheets = ["_app/immutable/assets/2.
|
|
24
|
+
const imports = ["_app/immutable/nodes/2.CdbJFHUF.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/D17XAauH.js","_app/immutable/chunks/HclGiUj8.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/D9jhmf3I.js","_app/immutable/chunks/CTWtsoJD.js","_app/immutable/chunks/BodLd2is.js"];
|
|
25
|
+
const stylesheets = ["_app/immutable/assets/2.glyfXGzi.css"];
|
|
26
26
|
const fonts = [];
|
|
27
27
|
|
|
28
28
|
export { component, fonts, imports, index, server_id, stylesheets };
|
|
29
|
-
//# sourceMappingURL=2.js-
|
|
29
|
+
//# sourceMappingURL=2.js-BFX_zPfJ.js.map
|
package/package.json
CHANGED
|
@@ -126,7 +126,7 @@ curl -s -X POST http://127.0.0.1:$PORT/api/terminal/$ID/send \
|
|
|
126
126
|
-H 'content-type: application/json' --data-binary @/tmp/t1-cmd.json
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
- **Human pace when the operator watches**: one char per write, ~
|
|
129
|
+
- **Human pace when the operator watches**: one char per write, ~60 ms
|
|
130
130
|
apart, each response checked `{"written":true}`. Faster bursts hit the
|
|
131
131
|
write fence and DROP characters (live: `sudo apt update` →
|
|
132
132
|
`sudoaptupdate`, zsh "command not found").
|
|
@@ -200,6 +200,28 @@ verified at the end.
|
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
203
|
+
## --peek — the Read-Only Mode (2026-11-07, ADR amendment D7)
|
|
204
|
+
|
|
205
|
+
\`/dsi-drive-terminal --peek {session or tab badge}\` checks WHAT IS GOING ON
|
|
206
|
+
on the designated terminal and writes NOTHING. No baton is taken — watching
|
|
207
|
+
is token-free, so the operator's tab never heals, never blinks.
|
|
208
|
+
|
|
209
|
+
Recipe (all reads, zero writes):
|
|
210
|
+
|
|
211
|
+
1. Resolve the session id from evidence — the badge law stands: read the
|
|
212
|
+
desk badge \`T{n}:{id}\` or \`GET /api/terminal\` (\`curl -s http://127.0.0.1:$PORT/api/terminal\`),
|
|
213
|
+
cross-check the \`exited\` flag. NEVER assume tab position = session id.
|
|
214
|
+
2. Read the ring tail — the watcher path, no token:
|
|
215
|
+
\`curl -s "http://127.0.0.1:$PORT/api/terminal/$ID/output?fromByte=0"\`
|
|
216
|
+
(the retained ring is the authority; ANSI-strip the tail per Step 3).
|
|
217
|
+
3. Report: session id, exited or live, the last screenful of output, and —
|
|
218
|
+
if live — the likely foreground command visible in the scrollback.
|
|
219
|
+
|
|
220
|
+
Peek NEVER: reattaches, writes bytes, mints or accepts a token. If the
|
|
221
|
+
operator then says "drive it", hand over to the full drive pipeline (Step 1).
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
203
225
|
## How This Skill Connects to the Docs
|
|
204
226
|
|
|
205
227
|
The skill is the DO-path; the docs carry the WHY and the CONTRACT.
|
package/skills/dsi-spec/SKILL.md
CHANGED
|
@@ -204,6 +204,12 @@ Save to: `{project-path}/dev/specs/{YYYY-MM}/{TODAY} - {Feature Name}/karpathy-c
|
|
|
204
204
|
|
|
205
205
|
**Contents:** All 3 layers as structured markdown. This is the internal context file the task-executor loads when executing.
|
|
206
206
|
|
|
207
|
+
**Self-sufficiency contract (2026-11-07, the 5.7M lesson):** under the split-session flow (AGENTS.md,
|
|
208
|
+
Split-Session Execution) a fresh NORMAL session (auto-spawned via `schedule_create` `new_once`)
|
|
209
|
+
executes from this folder alone — the planner is gone when it runs. Every file:line fact, decision rationale, rejected alternative, and verification command the
|
|
210
|
+
executor will need MUST be written here while the planner still holds it; a gap means the child
|
|
211
|
+
re-does the discovery, which is the exact cost the split exists to cut.
|
|
212
|
+
|
|
207
213
|
### Document 4: Tasks Machine Twin (Tasks.json)
|
|
208
214
|
|
|
209
215
|
Save to: `{project-path}/dev/specs/{YYYY-MM}/{TODAY} - {Feature Name}/Tasks.json`
|
|
@@ -291,6 +297,8 @@ This is the ONLY checklist output to the user. Declared at the start. Verified a
|
|
|
291
297
|
|
|
292
298
|
## How This Skill Connects to task-executor
|
|
293
299
|
|
|
300
|
+
⛔ **MANDATORY HANDOFF (2026-11-07, earned twice)**: when this skill's four deliverables are saved, the NEXT action in the same session is invoking `dsi-task` (repo skills copy: `skills/dsi-task/SKILL.md`) — its Step 3.10 Wave Executor and Step 3.11 Churn Discipline are the only sanctioned execution path for the produced waves. Do NOT implement the waves inline in the parent; do not end the turn with "deliverables ready" and treat execution as a separate discretionary task. Writing Tasks.md discharges NOTHING — the consuming skill does (AGENTS.md hard gate). Skipping it re-burns the spend the amendments were written to save (2026-11-07: 10.6M lesson, re-paid at 16.6M).
|
|
301
|
+
|
|
294
302
|
After `/feature-spec` produces the deliverables, the user can run `/execute-tasks` to begin implementation. The task-executor skill loads the Karpathy context and tasks document produced by this skill.
|
|
295
303
|
|
|
296
304
|
```mermaid
|
package/skills/dsi-task/SKILL.md
CHANGED
|
@@ -91,6 +91,13 @@ Before any execution, load exactly these files:
|
|
|
91
91
|
|
|
92
92
|
Read these files at the start. Do NOT carry them from previous conversation context — reload fresh.
|
|
93
93
|
|
|
94
|
+
> **Handoff-valid (2026-11-07, the 5.7M lesson):** this skill is designed to be loaded by a FRESH
|
|
95
|
+
> NORMAL session dispatched by the planner via `schedule_create` `new_once` (AGENTS.md, Split-Session
|
|
96
|
+
> Execution — never a subagent: Step 3.10/Step 4 need depth-1 children) — Step 1's
|
|
97
|
+
> two disk files ARE the whole contract, no planner context required. If the dispatch prompt names a
|
|
98
|
+
> spec folder, resolve karpathy-context + Tasks from it and begin; anything the spec folder fails to
|
|
99
|
+
> answer is a STOP-and-report, never a re-discovery.
|
|
100
|
+
|
|
94
101
|
---
|
|
95
102
|
|
|
96
103
|
## Step 1.5: Date Resolution ⛔ MANDATORY
|
|
@@ -231,6 +238,33 @@ When a gate or spec pins a tag-filtered run (`--grep @tag`):
|
|
|
231
238
|
Criterion: the tagged invocation reports the expected collected count, and every failure in a newly reachable suite is classified with git-log evidence.
|
|
232
239
|
<!-- RCA: 2026-08-17 openclaw-insight Control Room Recovery W5 — the spec-pinned `--grep @orchestration` had selected zero tests ever since the base config gained its exclusion grep; a sibling config (spread base, clear only grep) un-buried the recovery spec (5/5 green) plus a 2026-08-08 suite asserting the removed pre-redesign page — stale, documented, not rewritten. -->
|
|
233
240
|
|
|
241
|
+
|
|
242
|
+
### Step 3.10: Wave Executor — Cost-Driven Sub-Agent Delegation
|
|
243
|
+
|
|
244
|
+
When a wave's declared tasks imply >= 8 mechanical execution steps (test authoring + reruns, sibling-suite surveys, file migrations, gate runs), delegate the execution loop to ONE sub-agent and keep decisions in the parent. Never delegate acceptance-scenario adjudication (Step 3.1), commits, or operator-gesture tasks (glass live passes).
|
|
245
|
+
|
|
246
|
+
1. **Wave-pack**: mechanical extraction from Tasks.md + karpathy-context.md, verbatim — the wave header (tasks, touched-file contract, checklist, gate command), Layer-3 constraint/boundary/shared-layer excerpts, compatibility-matrix rows proved by this wave, risk-register rows pinned by this wave's -T tasks, behavioral commitments, TODAY.
|
|
247
|
+
2. **Child runs scoped suites freely**; the parent re-runs the completion gate itself before marking the wave done.
|
|
248
|
+
3. **Deviation protocol**: the child never silently expands the touched-file contract — out-of-contract need is PROPOSED to the parent (files + why), never executed unasked.
|
|
249
|
+
4. **Escalation budget**: > 3 consecutive failing runs with the same root cause -> return `ESCALATED: <finding>` with evidence; never grind.
|
|
250
|
+
5. **Parent duties**: adjudicate the structured return (gate output, git status, failure ledger with root causes, escalations), assert the touched-file contract including approved deviations, keep the checklist in the parent transcript. The child holds no commit or next-wave authority.
|
|
251
|
+
6. **Rolling pool**: a -T task that is a cluster of >= 3 independent file migrations may run as TWO children, one wave-pack slice per file. Feature-code tasks never parallelize — they share files across waves.
|
|
252
|
+
|
|
253
|
+
Criterion: delegated wave completes with parent-adjudicated gate output, touched-file contract asserted, and zero unapproved scope expansions.
|
|
254
|
+
<!-- RCA: 2026-11-07 deepseek-insight Terminal Stream Hub — Waves 3+4 burned 61 percent of 10.6M tok on 47 percent of steps at 110-150k per-step context; a child runs the same steps at 20-60k. The streamEnded arc (unhandled rejection skipped the unmount cleanup) is the escalation-valve case: the child returns the finding, the parent decides with session memory. Real Wave-3 touched 7 files against a 3-file contract — hence the deviation protocol. -->
|
|
255
|
+
|
|
256
|
+
### Step 3.11: Churn Discipline ⛔
|
|
257
|
+
|
|
258
|
+
1. **Contract pins before consumer waves**: when a wave changes a shared contract (wire shapes, URL grammar, store fields), its -T tests pin the NEW contract first; dependent suites migrate only after the pin is green.
|
|
259
|
+
2. **Batch-then-run**: author a wave's full test set, then one scoped run — no run-per-test authoring.
|
|
260
|
+
3. **Scoped suites per wave**; the full suite only in the final gates wave (Step 5 already scopes this — apply it inside waves too).
|
|
261
|
+
4. **Assertions match the implementation as written**: read the diff before finalizing test text; tests drafted from the intended design produce assertion churn.
|
|
262
|
+
5. **Failure ledger**: every test-fix step classifies the failure test-side / regression / environment. Two consecutive test-side failures on the same suite -> stop, re-read the implementation, rewrite the test.
|
|
263
|
+
6. **Churn budget**: a wave burning > 50 percent of its steps on fix loops triggers a scope-or-contract review — fix the cause, not the symptom.
|
|
264
|
+
|
|
265
|
+
Criterion: a wave's fix-loop steps stay under half its step count, and every fix-loop step names its failure class.
|
|
266
|
+
<!-- RCA: 2026-11-07 deepseek-insight Terminal Stream Hub — 17 of 111 steps were fix loops; 10 were test-side assertions drafted from intended design instead of the written code; batching + scoped suites would have collapsed most. Deferral of tests to feature-end rejected: it moves the same fix steps to maximum context with N-wave attribution bisection. -->
|
|
267
|
+
|
|
234
268
|
## Step 4: Sub-Agent Safety — When Spawning Children
|
|
235
269
|
|
|
236
270
|
Only fires when a task requires spawning a sub-agent. If no sub-agents are spawned, mark `[⊘]` in the checklist and skip this step.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "dsi-token-spent"
|
|
3
|
+
description: "Reconstruct the current session's token spend — phase breakdown, tool-call error ledger, degenerate-loop detection — and write a dated TL;DR report with flow + sequence diagrams under dev/token-spent/, ADR-style filename. Reserved keyword: /dsi-token-spent."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DSI Token Spend Report
|
|
7
|
+
|
|
8
|
+
One trigger → full reconstruction pipeline. Rebuild how the session's tokens were actually spent (phases, tool calls, errors, loops), write a dated report with a TL;DR, a breakdown table, an error ledger, and two mermaid diagrams (flowchart + sequence), saved under `dev/token-spent/` with the ADR-style filename convention.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- User runs `/dsi-token-spent` or asks "how much did this session spend / where did the tokens go?"
|
|
13
|
+
- User asks for a spend/cost breakdown of the current conversation
|
|
14
|
+
- After a notably expensive session, to record where it went and what to carry forward
|
|
15
|
+
|
|
16
|
+
## Hard rules earned 2026-11-07 (the session this skill was born from)
|
|
17
|
+
|
|
18
|
+
1. **Never emit a placeholder call.** A call that does not advance the task is a STOP signal, not a stepping stone.
|
|
19
|
+
2. **Three identical calls with zero state change = hard halt** and surface to the operator. (The founding session looped 93 identical `console.log` calls at maximum context — plausibly a third of the session's spend.)
|
|
20
|
+
3. **On a quoting/parse failure, SWITCH TRANSPORT immediately** (direct file tool, or write a script file and run it) — never retry the same broken embedding.
|
|
21
|
+
4. **Load skills whole** — length-check the load (`TOTAL CHARS`) before executing; a truncated skill produces truncated work.
|
|
22
|
+
5. **Heavy waits go to background jobs on the first timeout** — the deadline is a signal, not a wall to bump.
|
|
23
|
+
|
|
24
|
+
These rules apply DURING this pipeline too — the report must not become the next offender.
|
|
25
|
+
|
|
26
|
+
## Step 0: No Params — Defaults
|
|
27
|
+
|
|
28
|
+
With no arguments, use these defaults (state them, don't ask):
|
|
29
|
+
|
|
30
|
+
- **Scope**: the CURRENT session, from its first turn to now
|
|
31
|
+
- **Output**: `dev/token-spent/{TODAY} - Token Spend Report — {TOTAL} tok — {a memorable claim about where it went}.md` (ADR-style naming: date prefix, the DSH-reported total token count, em-dash claim — see existing files in that folder). The TOTAL comes from DSH's own usage counters (Step 0.6) and is quoted verbatim in the filename; no estimate goes in the title.
|
|
32
|
+
- **Precision**: estimates ±20 percent, methodology stated in the report — never fake precision
|
|
33
|
+
|
|
34
|
+
## Step 0.5: Date Resolution ⛔ MANDATORY
|
|
35
|
+
|
|
36
|
+
Resolve today's date via `date +%Y-%m-%d`. Store as `TODAY`. Never infer from context.
|
|
37
|
+
|
|
38
|
+
## Step 0.6: Read DSH's own usage counters ⛔ MANDATORY (hard data)
|
|
39
|
+
|
|
40
|
+
The operator's DSH GUI shows a session usage strip (turns / steps / tok/s / total tok / cache hit %). Before ANY estimation:
|
|
41
|
+
|
|
42
|
+
1. Ask the operator for that strip, or read it from the harness surface if reachable — **these counters outrank every estimate**.
|
|
43
|
+
2. Quote them verbatim in the TL;DR and put the total in the filename/title.
|
|
44
|
+
3. Count steps THE WAY DSH counts steps: one step = one model round-trip (every tool call is a step), NOT one operator-visible message. A 12-message session is routinely 100+ steps.
|
|
45
|
+
4. Total token count includes CACHED input — a high cache-hit percent reduces COST, never the token TOTAL. Never model "cost" and report it as "tokens".
|
|
46
|
+
|
|
47
|
+
## Pipeline Checklist — MANDATORY
|
|
48
|
+
|
|
49
|
+
This is the ONLY checklist output to the user. Declared at the start. Re-rendered with `[✅]/[🔄]/[ ]` at each phase transition. Verified at the end.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
📋 dsi-token-spent: {session summary}
|
|
53
|
+
|
|
54
|
+
[ ] 0.5 ⛔ Resolve today's date via `date +%Y-%m-%d` (store as TODAY)
|
|
55
|
+
[ ] 0.6 ⛔ Read DSH's usage counters (turns / steps / total tok / cache hit %) — TOTAL goes in the title verbatim
|
|
56
|
+
|
|
57
|
+
Step 1: Reconstruct the transcript
|
|
58
|
+
[ ] 1.1 Turn count and phase boundaries identified
|
|
59
|
+
[ ] 1.2 Tool calls counted by category (bash/read/write/edit/skills/goal ops)
|
|
60
|
+
[ ] 1.3 Tool-call ERRORS counted with per-error root cause (the ledger)
|
|
61
|
+
[ ] 1.4 Degenerate loops detected: identical no-op calls counted (the 3-identical rule, applied retroactively)
|
|
62
|
+
|
|
63
|
+
Step 2: Spend analysis
|
|
64
|
+
[ ] 2.1 Phase breakdown table with share + estimated tokens + WHY each phase cost what it cost — RECOUNTED from the transcript's step sequence (tally shown, anchored to the DSH step/total counters), never a rescale of a wrong estimate
|
|
65
|
+
[ ] 2.2 Session-overhead tax accounted (preamble/skills re-sent every turn)
|
|
66
|
+
[ ] 2.3 Methodology paragraph written (estimates, ±20 percent, no fake precision)
|
|
67
|
+
[ ] 2.4 Operator captures (usage screenshots) quoted as hard data when available
|
|
68
|
+
|
|
69
|
+
Step 3: Write the report
|
|
70
|
+
[ ] 3.1 TL;DR — the headline numbers and the headline lesson
|
|
71
|
+
[ ] 3.2 Breakdown table + tool-call ledger + error ledger with root causes
|
|
72
|
+
[ ] 3.3 Mermaid flowchart (spend concentration) + sequenceDiagram (a typical error or loop round-trip) — per the mermaid syntax rules (no colons in labels, no style in sequence blocks)
|
|
73
|
+
[ ] 3.4 Operator complaints/quotes verbatim as the entrance
|
|
74
|
+
[ ] 3.5 Carry-forward rules — numbered, each earned by a specific trap from THIS session
|
|
75
|
+
|
|
76
|
+
Step 4: Verify and save
|
|
77
|
+
[ ] 4.1 Report exists on disk at the ADR-style path (verified via ls)
|
|
78
|
+
[ ] 4.2 Both mermaid blocks present and syntax-clean (no stray semicolons/colons in labels)
|
|
79
|
+
[ ] 4.3 No placeholder or no-op calls were emitted during THIS pipeline (self-audit aloud)
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Step 1: Reconstruct the transcript
|
|
84
|
+
|
|
85
|
+
Walk the session from memory of the CURRENT context (the transcript is in it — do not guess):
|
|
86
|
+
|
|
87
|
+
- **Phase boundaries**: feature/bug/report arcs, with turn ranges
|
|
88
|
+
- **Tool calls by category**: bash, read, write, edit, skills, goal/todo/present/ask_user/job ops
|
|
89
|
+
- **Error ledger**: every rejected/failed call with its ROOT CAUSE (hygiene rule violated, path wrong, timeout, policy rejection), not just its text
|
|
90
|
+
- **Degenerate loops**: any run of identical or near-identical calls with zero state change. Count them. Name them. The founding session's 93-call `console.log('www…')` loop is the exemplar — it was the single largest cost line and the operator had to catch it.
|
|
91
|
+
|
|
92
|
+
## Step 2: Spend analysis
|
|
93
|
+
|
|
94
|
+
The harness re-feeds the whole conversation at every STEP (one step = one model round-trip; a tool call is a step): **total = sum of context at each step** — and the DSH counter counts cached input too. So:
|
|
95
|
+
|
|
96
|
+
- Late-session calls cost more than early ones (bigger re-feed) — weight accordingly
|
|
97
|
+
- Large artifacts written early (ADRs, PRDs, test outputs) are re-paid every later turn — artifacts ARE the budget
|
|
98
|
+
- Session overhead (system prompt + AGENTS.md + skill bodies) is a fixed tax on every turn
|
|
99
|
+
- Operator-provided usage counters (screenshots, the DSH strip) are HARD DATA — quote them; they outrank estimates. If your estimate disagrees with the counter by orders of magnitude, the estimate is wrong: explain the gap with a 5-why in the report, never defend the model
|
|
100
|
+
- State the ±20 percent band and the methodology in the report. Never invent precise numbers.
|
|
101
|
+
- **The breakdown table MUST be a recount, never a rescale.** Tally STEPS per phase from the actual call sequence in the transcript (one tool round-trip = one step — the tally should match the DSH step counter), price each phase's steps at the context size at its position, and show the arithmetic in the report (steps × avg context = tokens per phase, summing to the DSH total within a stated residual). A table whose phase tokens are the old wrong total re-labeled is a LAZY table — regenerate the arithmetic or do not write the section. If the tally misses the DSH step counter, say where the uncounted steps live; do not pad.
|
|
102
|
+
|
|
103
|
+
## Step 3: Write the report
|
|
104
|
+
|
|
105
|
+
Save to `dev/token-spent/{TODAY} - Token Spend Report — {claim}.md`:
|
|
106
|
+
|
|
107
|
+
1. **TL;DR** — headline numbers (total, calls, error count, commits), the headline lesson, the biggest avoidable cost
|
|
108
|
+
2. **The complaints/quotes in the operator's own words** — verbatim, numbered (they are the entrance of the story)
|
|
109
|
+
3. **Breakdown table** — phase | what | share | est. tokens | why it cost what it cost. Include degenerate loops as their OWN line item when found
|
|
110
|
+
4. **Tool-call ledger** — category counts, then the error ledger: # | error | root cause | cost shape
|
|
111
|
+
5. **Mermaid flowchart** — where the spend concentrates (turn → preamble → re-feed → tool → result/error → history grows)
|
|
112
|
+
6. **Mermaid sequenceDiagram** — a typical error or loop round-trip, actors labeled
|
|
113
|
+
7. **Carry-forward rules** — numbered, each phrased as a rule earned by a specific trap from this session ("be careful" is not a rule)
|
|
114
|
+
|
|
115
|
+
Writing rule: every section leads with a plain-language sentence; file/line citations are handles, not prose.
|
|
116
|
+
|
|
117
|
+
## Step 4: Verify and save
|
|
118
|
+
|
|
119
|
+
- `ls` the output path — the file exists
|
|
120
|
+
- Both mermaid blocks present; check syntax (no `;` in message text, no style directives in sequence blocks)
|
|
121
|
+
- Self-audit aloud: no placeholder calls were emitted during this pipeline; the 3-identical rule was not tripped
|
|
122
|
+
- Offer commit/push; do not push unasked
|
|
Binary file
|
|
Binary file
|
|
Binary file
|