@deepseek-insight/dsi 0.9.1 → 0.10.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.
Files changed (60) hide show
  1. package/.agents/skills/glass-dsi/scripts/_connect.mjs +49 -9
  2. package/.agents/skills/glass-dsi/scripts/glass.mjs +6 -5
  3. package/.agents/skills/glass-url/scripts/_connect.mjs +56 -9
  4. package/.agents/skills/glass-url/scripts/glass-url.mjs +5 -4
  5. package/README.md +21 -0
  6. package/bin/dsi.mjs +44 -7
  7. package/bin/lib/dev-mode.mjs +8 -5
  8. package/bin/lib/glass-browser-bootstrap.mjs +115 -0
  9. package/bin/lib/mcp-banner.mjs +26 -0
  10. package/build/client/_app/immutable/assets/0.CxUWwepa.css +2 -0
  11. package/build/client/_app/immutable/assets/{2.D0QOh44D.css → 2.CSFboNRO.css} +1 -1
  12. package/build/client/_app/immutable/chunks/C4M9oU_3.js +1 -0
  13. package/build/client/_app/immutable/chunks/CNT-CapI.js +1 -0
  14. package/build/client/_app/immutable/chunks/{BFNQKoqg.js → DttyJZuo.js} +2 -2
  15. package/build/client/_app/immutable/chunks/{DXD_Wzp9.js → UcxQDPMg.js} +1 -1
  16. package/build/client/_app/immutable/entry/{app.C_yn4m6w.js → app.GxH1nznH.js} +2 -2
  17. package/build/client/_app/immutable/entry/start.P-LmBYpD.js +1 -0
  18. package/build/client/_app/immutable/nodes/{1.DZxzqrcK.js → 1.BVvBJtMj.js} +1 -1
  19. package/build/client/_app/immutable/nodes/{2.ckwEPlsL.js → 2.D0JzdegJ.js} +107 -107
  20. package/build/client/_app/version.json +1 -1
  21. package/build/handler.js +4 -4
  22. package/build/index.js +4 -4
  23. package/build/server/chunks/chunks/{internal2.js-zTmbne6n.js → internal2.js-BRzR_ZGp.js} +2 -2
  24. package/build/server/chunks/chunks/{registry.js-CWnRQ4vx.js → registry.js-6St5Biiy.js} +96 -10
  25. package/build/server/chunks/chunks/{state.js-CPIukTkD.js → state.js-Ct6h8rMl.js} +2 -2
  26. package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-sXqf-okw.js → _server.ts.js-DYvCel9L.js} +2 -2
  27. package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-Byj9ApJh.js → _server.ts.js-CDNbpOqu.js} +2 -2
  28. package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-DOIsrzvg.js → _server.ts.js-C8UZMTcb.js} +2 -2
  29. package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-Cq3gmRfE.js → _server.ts.js-CERwttQS.js} +2 -2
  30. package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-BGSLIV0t.js → _server.ts.js-DtVkS-mH.js} +2 -2
  31. package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-8slca75-.js → _server.ts.js-C85umKKr.js} +2 -2
  32. package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-CpbdTYds.js → _server.ts.js-CrTtygPQ.js} +2 -2
  33. package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-Bls9LtLY.js → _server.ts.js-DgJ6DXVr.js} +2 -2
  34. package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-DqNi_iW_.js → _server.ts.js-Bj9bKEEv.js} +2 -2
  35. package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-DuXWwo7i.js → _server.ts.js--1WTGEfT.js} +2 -2
  36. package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-DXfqBDEw.js → _server.ts.js-D8hQe810.js} +2 -2
  37. package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-Bgnl8lYs.js → _server.ts.js-CSYYFlm2.js} +2 -2
  38. package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-FHmQVbrv.js → _server.ts.js-KJjT8zXH.js} +2 -2
  39. package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-BV4cBtSA.js → _server.ts.js-DQtzgPeG.js} +2 -2
  40. package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-4vgkwh7v.js → _server.ts.js-DSkCBGRA.js} +6 -3
  41. package/build/server/chunks/entries/pages/{_error.svelte.js-Dss5_PtG.js → _error.svelte.js-BXD7Pthk.js} +3 -3
  42. package/build/server/chunks/entries/pages/{_page.svelte.js-CJboFEGf.js → _page.svelte.js-DaZfwP76.js} +298 -28
  43. package/build/server/chunks/{handler-Bn-Z9bWE.js → handler-C5_-AjlT.js} +3 -3
  44. package/build/server/chunks/{index.js-NQAT8Awn.js → index.js-BECscw6k.js} +2 -2
  45. package/build/server/chunks/{manifest.js-hlUhRW1X.js → manifest.js-aksIjogg.js} +20 -20
  46. package/build/server/chunks/nodes/{0.js-CuV3dXVD.js → 0.js-xX4GZsu5.js} +3 -3
  47. package/build/server/chunks/nodes/1.js-BaNGyV1A.js +9 -0
  48. package/build/server/chunks/nodes/{2.js-_lM-D6Dt.js → 2.js-CBdFoBFK.js} +4 -4
  49. package/package.json +2 -2
  50. package/skills/dsi-drive-terminal/SKILL.md +219 -0
  51. package/skills/dsi-publish/SKILL.md +67 -0
  52. package/template/.dsi/prompts.sqlite-shm +0 -0
  53. package/template/.dsi/prompts.sqlite-wal +0 -0
  54. package/template/.dsi/settings.yaml +1 -2
  55. package/build/client/_app/immutable/assets/0.Ch5VtsKp.css +0 -2
  56. package/build/client/_app/immutable/chunks/Be-_M64M.js +0 -1
  57. package/build/client/_app/immutable/chunks/Ds3NY1WI.js +0 -1
  58. package/build/client/_app/immutable/entry/start.Cvx_lhm5.js +0 -1
  59. package/build/server/chunks/nodes/1.js-CxcLyijV.js +0 -9
  60. /package/build/client/_app/immutable/nodes/{0.fsrqKU9i.js → 0.CfpMgVS-.js} +0 -0
@@ -10,11 +10,11 @@ return {
10
10
  assets: new Set(["favicon.svg"]),
11
11
  mimeTypes: {".svg":"image/svg+xml"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.Cvx_lhm5.js",app:"_app/immutable/entry/app.C_yn4m6w.js",imports:["_app/immutable/entry/start.Cvx_lhm5.js","_app/immutable/chunks/BFNQKoqg.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/entry/app.C_yn4m6w.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/HclGiUj8.js","_app/immutable/chunks/xihTtKlq.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.P-LmBYpD.js",app:"_app/immutable/entry/app.GxH1nznH.js",imports:["_app/immutable/entry/start.P-LmBYpD.js","_app/immutable/chunks/DttyJZuo.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/entry/app.GxH1nznH.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/HclGiUj8.js","_app/immutable/chunks/xihTtKlq.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
- __memo(() => import('./nodes/0.js-CuV3dXVD.js')),
16
- __memo(() => import('./nodes/1.js-CxcLyijV.js')),
17
- __memo(() => import('./nodes/2.js-_lM-D6Dt.js'))
15
+ __memo(() => import('./nodes/0.js-xX4GZsu5.js')),
16
+ __memo(() => import('./nodes/1.js-BaNGyV1A.js')),
17
+ __memo(() => import('./nodes/2.js-CBdFoBFK.js'))
18
18
  ],
19
19
  remotes: {
20
20
 
@@ -53,105 +53,105 @@ return {
53
53
  pattern: /^\/api\/browser\/?$/,
54
54
  params: [],
55
55
  page: null,
56
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_server.ts.js-4vgkwh7v.js'))
56
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_server.ts.js-DSkCBGRA.js'))
57
57
  },
58
58
  {
59
59
  id: "/api/browser/[id]/activate",
60
60
  pattern: /^\/api\/browser\/([^/]+?)\/activate\/?$/,
61
61
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
62
62
  page: null,
63
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/activate/_server.ts.js-sXqf-okw.js'))
63
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/activate/_server.ts.js-DYvCel9L.js'))
64
64
  },
65
65
  {
66
66
  id: "/api/browser/[id]/closetab",
67
67
  pattern: /^\/api\/browser\/([^/]+?)\/closetab\/?$/,
68
68
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
69
69
  page: null,
70
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/closetab/_server.ts.js-DOIsrzvg.js'))
70
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/closetab/_server.ts.js-C8UZMTcb.js'))
71
71
  },
72
72
  {
73
73
  id: "/api/browser/[id]/close",
74
74
  pattern: /^\/api\/browser\/([^/]+?)\/close\/?$/,
75
75
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
76
76
  page: null,
77
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/close/_server.ts.js-Byj9ApJh.js'))
77
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/close/_server.ts.js-CDNbpOqu.js'))
78
78
  },
79
79
  {
80
80
  id: "/api/browser/[id]/element",
81
81
  pattern: /^\/api\/browser\/([^/]+?)\/element\/?$/,
82
82
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
83
83
  page: null,
84
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/element/_server.ts.js-Cq3gmRfE.js'))
84
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/element/_server.ts.js-CERwttQS.js'))
85
85
  },
86
86
  {
87
87
  id: "/api/browser/[id]/history",
88
88
  pattern: /^\/api\/browser\/([^/]+?)\/history\/?$/,
89
89
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
90
90
  page: null,
91
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/history/_server.ts.js-BGSLIV0t.js'))
91
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/history/_server.ts.js-DtVkS-mH.js'))
92
92
  },
93
93
  {
94
94
  id: "/api/browser/[id]/input",
95
95
  pattern: /^\/api\/browser\/([^/]+?)\/input\/?$/,
96
96
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
97
97
  page: null,
98
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/input/_server.ts.js-8slca75-.js'))
98
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/input/_server.ts.js-C85umKKr.js'))
99
99
  },
100
100
  {
101
101
  id: "/api/browser/[id]/mcp",
102
102
  pattern: /^\/api\/browser\/([^/]+?)\/mcp\/?$/,
103
103
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
104
104
  page: null,
105
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/mcp/_server.ts.js-CpbdTYds.js'))
105
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/mcp/_server.ts.js-CrTtygPQ.js'))
106
106
  },
107
107
  {
108
108
  id: "/api/browser/[id]/navigate",
109
109
  pattern: /^\/api\/browser\/([^/]+?)\/navigate\/?$/,
110
110
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
111
111
  page: null,
112
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/navigate/_server.ts.js-Bls9LtLY.js'))
112
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/navigate/_server.ts.js-DgJ6DXVr.js'))
113
113
  },
114
114
  {
115
115
  id: "/api/browser/[id]/opentab",
116
116
  pattern: /^\/api\/browser\/([^/]+?)\/opentab\/?$/,
117
117
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
118
118
  page: null,
119
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/opentab/_server.ts.js-DqNi_iW_.js'))
119
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/opentab/_server.ts.js-Bj9bKEEv.js'))
120
120
  },
121
121
  {
122
122
  id: "/api/browser/[id]/page",
123
123
  pattern: /^\/api\/browser\/([^/]+?)\/page\/?$/,
124
124
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
125
125
  page: null,
126
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/page/_server.ts.js-DuXWwo7i.js'))
126
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/page/_server.ts.js--1WTGEfT.js'))
127
127
  },
128
128
  {
129
129
  id: "/api/browser/[id]/stream",
130
130
  pattern: /^\/api\/browser\/([^/]+?)\/stream\/?$/,
131
131
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
132
132
  page: null,
133
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/stream/_server.ts.js-DXfqBDEw.js'))
133
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/stream/_server.ts.js-D8hQe810.js'))
134
134
  },
135
135
  {
136
136
  id: "/api/browser/[id]/tabs",
137
137
  pattern: /^\/api\/browser\/([^/]+?)\/tabs\/?$/,
138
138
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
139
139
  page: null,
140
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/tabs/_server.ts.js-Bgnl8lYs.js'))
140
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/tabs/_server.ts.js-CSYYFlm2.js'))
141
141
  },
142
142
  {
143
143
  id: "/api/browser/[id]/viewport",
144
144
  pattern: /^\/api\/browser\/([^/]+?)\/viewport\/?$/,
145
145
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
146
146
  page: null,
147
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/viewport/_server.ts.js-FHmQVbrv.js'))
147
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/viewport/_server.ts.js-KJjT8zXH.js'))
148
148
  },
149
149
  {
150
150
  id: "/api/browser/[id]/zoom",
151
151
  pattern: /^\/api\/browser\/([^/]+?)\/zoom\/?$/,
152
152
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
153
153
  page: null,
154
- endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/zoom/_server.ts.js-BV4cBtSA.js'))
154
+ endpoint: __memo(() => import('./entries/endpoints/api/browser/_id_/zoom/_server.ts.js-DQtzgPeG.js'))
155
155
  },
156
156
  {
157
157
  id: "/api/config",
@@ -592,4 +592,4 @@ return {
592
592
  })();
593
593
 
594
594
  export { manifest as m };
595
- //# sourceMappingURL=manifest.js-hlUhRW1X.js.map
595
+ //# sourceMappingURL=manifest.js-aksIjogg.js.map
@@ -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.fsrqKU9i.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.Ch5VtsKp.css"];
7
+ const imports = ["_app/immutable/nodes/0.CfpMgVS-.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.CxUWwepa.css"];
9
9
  const fonts = [];
10
10
 
11
11
  export { component, fonts, imports, index, stylesheets, universal_id };
12
- //# sourceMappingURL=0.js-CuV3dXVD.js.map
12
+ //# sourceMappingURL=0.js-xX4GZsu5.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-BXD7Pthk.js')).default;
4
+ const imports = ["_app/immutable/nodes/1.BVvBJtMj.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/UcxQDPMg.js","_app/immutable/chunks/DttyJZuo.js","_app/immutable/chunks/D9jhmf3I.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=1.js-BaNGyV1A.js.map
@@ -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-CJboFEGf.js')).default;
22
+ const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js-DaZfwP76.js')).default;
23
23
  const server_id = "src/routes/+page.server.ts";
24
- const imports = ["_app/immutable/nodes/2.ckwEPlsL.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/BFNQKoqg.js","_app/immutable/chunks/HclGiUj8.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/D9jhmf3I.js","_app/immutable/chunks/CTWtsoJD.js","_app/immutable/chunks/DXD_Wzp9.js"];
25
- const stylesheets = ["_app/immutable/assets/2.D0QOh44D.css"];
24
+ const imports = ["_app/immutable/nodes/2.D0JzdegJ.js","_app/immutable/chunks/0Tfhif1V.js","_app/immutable/chunks/DttyJZuo.js","_app/immutable/chunks/HclGiUj8.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/D9jhmf3I.js","_app/immutable/chunks/CTWtsoJD.js","_app/immutable/chunks/UcxQDPMg.js"];
25
+ const stylesheets = ["_app/immutable/assets/2.CSFboNRO.css"];
26
26
  const fonts = [];
27
27
 
28
28
  export { component, fonts, imports, index, server_id, stylesheets };
29
- //# sourceMappingURL=2.js-_lM-D6Dt.js.map
29
+ //# sourceMappingURL=2.js-CBdFoBFK.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepseek-insight/dsi",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
4
4
  "description": "See your multiple agents run on the floor (agent, sub-agent, etc), each conversation on the floor are updated instantly.",
5
5
  "keywords": [
6
6
  "Deepseek",
@@ -38,7 +38,7 @@
38
38
  "node": ">=22.19"
39
39
  },
40
40
  "dsh": {
41
- "webVersion": "0.2.2-alpha.2"
41
+ "webVersion": "0.2.2-rc.1"
42
42
  },
43
43
  "bin": {
44
44
  "dsi": "bin/dsi.mjs"
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: "dsi-drive-terminal"
3
+ description: "Drive the operator's live Terminal Desk tab (T1, T2, …) over DSI's terminal wire with curl — baton etiquette, human-pace typing, ring reads, silent-eater escapes. Reserved keyword"
4
+ ---
5
+
6
+ # Drive Terminal
7
+
8
+ One goal → a live terminal session driven over DSI's terminal wire with
9
+ curl: take the baton, type like a human, read what the shell said — while
10
+ the operator watches the same bytes paint their desk tab.
11
+
12
+ ## SYSTEM PROTOCOL: THE BATON LAW
13
+
14
+ The session's write token is a baton with ONE holder. Every rule below
15
+ instantiates it (ADR The Surviving Shell 2026-09-24 + amendments
16
+ 2026-11-04; mechanics: `dev/feature-contract-scenario/terminal-driving.md`):
17
+
18
+ ### 1. BATON ETIQUETTE (who may type)
19
+ - Take the baton (`reattach`) only when about to write; a refused write
20
+ (`403 FOREIGN_SESSION`) means heal — reattach once, retry the SAME
21
+ keystroke — never retry blind, never re-mint in a loop.
22
+ - The operator's tab heals identically (their first key after your takeover
23
+ shows the heal badge); watching is token-free, so displays never break.
24
+
25
+ ### 2. THE DESK IS THE UX (what the operator sees)
26
+ - Run commands UNPIPED — the operator watches progress paint live; `| tail`
27
+ a build they are watching and you have hidden their own terminal.
28
+ - The PTY echoes reality: no echo = the write was refused or the shell is
29
+ busy. NEVER type while a command is still running (keystrokes go into
30
+ that process's stdin, silently).
31
+
32
+ ### 3. ESCAPE THE SILENT EATER (writes say `written:true`, nothing executes)
33
+ - An interactive prompt is consuming stdin — met live: `git push` username
34
+ prompt, open commit editor, package-manager approve prompt.
35
+ - Escape: `\u0003\u0003` (Ctrl+C ×2), or ESC + `:qa!\r` (vi family), then a
36
+ marker (`echo ALIVE\r\n`) to confirm the prompt answers.
37
+
38
+ ### Enforcement Rules
39
+ - Every write response MUST be checked: `{"written":true}` or handled
40
+ (`403` → heal, `409 SEND_ACTIVE` → wait, `400` → fix the body).
41
+ - **The receipt is necessary, never sufficient**: a dead session still
42
+ answers `written:true` (known trap — `session.ts` silently no-ops an
43
+ exited target; honest refusal deferred). Completion gates on ECHO +
44
+ the exit marker in the ring, never on the receipt alone. A receipt
45
+ with no echo → check `GET /api/terminal` `exited` first, silent
46
+ eater second (RCA 2026-11-04).
47
+
48
+ ---
49
+
50
+ ## When to Use
51
+
52
+ - User says `/dsi-drive-terminal {what to run}` or "drive T1"
53
+ - User asks to install/build/run something "on the terminal" while their
54
+ desk tab is the surface they will judge
55
+ - Agent needs to execute on a remote box the operator's shell is SSH'd into
56
+
57
+ ### Step 0: No Params — Usage Guide
58
+
59
+ When the user sends `/dsi-drive-terminal` with no arguments:
60
+
61
+ 1. Ask which session and what to run:
62
+ 2. Reply with a usage guide — NOT execution
63
+
64
+ **Response format:**
65
+
66
+ ```
67
+ 📋 **Drive Terminal** — No inputs specified. I need two things:
68
+
69
+ 1. **Session** — the desk tab (T1, T2, …) or "open a new one"
70
+ 2. **Command / goal** — what to run, e.g. "pnpm install then build"
71
+
72
+ Usage: `/dsi-drive-terminal {session} {command}`
73
+ ```
74
+
75
+ **Rules:**
76
+ - If the goal spans many commands, confirm the order before typing
77
+ - Do NOT take the baton until the goal is confirmed
78
+
79
+ ## Pipeline
80
+
81
+ ```mermaid
82
+ flowchart LR
83
+ A["/dsi-drive-terminal"] --> B["Step 1<br/>floor + baton"]
84
+ B --> C["Step 2<br/>type (paced, checked)"]
85
+ C --> D["Step 3<br/>read promptly"]
86
+ D --> E{"done?"}
87
+ E -->|"no"| C
88
+ E -->|"yes"| F["report what the<br/>operator saw"]
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Step 1: Floor + Baton ⛔ MANDATORY
94
+
95
+ Resolve the floor port by PROBE, never by memory of a previous session:
96
+
97
+ ```sh
98
+ PORT=5175 # only after a listener probe confirms it
99
+ curl -s http://127.0.0.1:$PORT/api/terminal # list sessions
100
+ curl -s -X POST http://127.0.0.1:$PORT/api/terminal/$ID/reattach -o /tmp/t.json
101
+ TOK=$(sed 's/.*"token":"\([^"]*\)".*/\1/' /tmp/t.json)
102
+ OFF=$(sed 's/.*"fromByte":\([0-9]*\).*/\1/' /tmp/t.json)
103
+ ```
104
+
105
+ - No live session → `POST /api/terminal` opens one (new T-tab on the desk).
106
+ - `403`/foreign responses on write → heal: reattach, retry the same write.
107
+ - **Resolve the session id from evidence, never from the tab position.**
108
+ The desk badge names its session: `T{position}:{id}` (`T1:7` = tab
109
+ index 1, session `t-7`; splits join with `+`, unassigned tabs show
110
+ plain `Tn`). Cross-check `GET /api/terminal` (`exited` flag) — the
111
+ live trap: desk tab "T1" drove session `t-7` while `t-1` was an hour
112
+ dead, and 69 keystrokes vanished (RCA 2026-11-04, "The Surface That Only
113
+ Ever Said Yes").
114
+
115
+ ---
116
+
117
+ ## Step 2: Type ⛔ MANDATORY
118
+
119
+ Build the JSON body with node — never inline-quote shell strings (one bad
120
+ escape is a silent `BAD_REQUEST`):
121
+
122
+ ```sh
123
+ node -e 'const fs=require("fs");const tok=fs.readFileSync("/tmp/t1-token","utf8").trim();
124
+ fs.writeFileSync("/tmp/t1-cmd.json",JSON.stringify({token:tok,action:"write",data:"uname -a\r\n"}))'
125
+ curl -s -X POST http://127.0.0.1:$PORT/api/terminal/$ID/send \
126
+ -H 'content-type: application/json' --data-binary @/tmp/t1-cmd.json
127
+ ```
128
+
129
+ - **Human pace when the operator watches**: one char per write, ~120 ms
130
+ apart, each response checked `{"written":true}`. Faster bursts hit the
131
+ write fence and DROP characters (live: `sudo apt update` →
132
+ `sudoaptupdate`, zsh "command not found").
133
+ - **Passwords**: same pacing; PTY echo is off — the secret never lands in
134
+ scrollback, the desk shows dots.
135
+ - **End every long command with a marker**: `; echo STEP-DONE-$?` — the
136
+ marker is the completion gate (exit code included).
137
+
138
+ ---
139
+
140
+ ## Step 3: Read ⛔ MANDATORY
141
+
142
+ ```sh
143
+ curl -s "http://127.0.0.1:$PORT/api/terminal/$ID/output?fromByte=$OFF"
144
+ ```
145
+
146
+ - `$OFF` captured BEFORE the command; read right after it finishes.
147
+ - ANSI strip: `sed 's/\\u001b\[[0-9;?]*[a-zA-Z=]//g; s/\\u0007//g; s/\\r\\n/\n/g; s/\\n/\n/g; s/\\r//g'`
148
+ - Empty/short read → the ring rotated; re-read `fromByte=0` (full retained
149
+ ring) or re-run redirecting output to a file and `cat` a slice.
150
+
151
+ ---
152
+
153
+ ## Step 4: Silent Eater ⛔ MANDATORY
154
+
155
+ Writes say `written:true` but nothing executes or echoes → an interactive
156
+ prompt is consuming stdin (credential prompt, commit editor, approve
157
+ prompt). Escape per SYSTEM PROTOCOL §3, confirm with a marker, re-send.
158
+
159
+ ---
160
+
161
+ ## Drive Checklist — MANDATORY
162
+
163
+ This is the ONLY checklist output to the user. Declared at the start,
164
+ verified at the end.
165
+
166
+ ```
167
+ 📋 drive-terminal: {session} — {goal}
168
+
169
+ [ ] 1.1 ⛔ Floor port probed (listener confirmed, not assumed)
170
+ [ ] 1.2 ⛔ Baton taken (reattach → token + offset captured)
171
+ [ ] 1.3 ⛔ Session id resolved from badge suffix / sessions list — NOT assumed from the tab position
172
+ [ ] 2.1 ⛔ Every write response checked (written / healed / refused)
173
+ [ ] 2.2 ⛔ Long commands carry an exit marker; completion gated on it
174
+ [ ] 2.4 ⛔ Receipt cross-checked by echo + marker (dead sessions answer written:true)
175
+ [ ] 2.3 ⛔ Operator-paced typing (≈120 ms/char, verified) when watched
176
+ [ ] 3.1 ⛔ Output read from pre-captured offset, promptly
177
+ [ ] 3.2 ⛔ Ring misses recovered (fromByte=0 or file+cat)
178
+ [ ] 4.1 ⛔ Any silent eater escaped (Ctrl+C / :qa!) and marker-confirmed
179
+ [ ] 4.2 ⛔ Dead-session eater ruled OUT via GET /api/terminal exited flag (RCA 2026-11-04)
180
+ [ ] 5.1 ⛔ Commands ran UNPIPED — the operator could watch everything
181
+ [ ] 5.2 ⛔ Report states what the desk showed, not just what was read
182
+
183
+ ⛔ Behavioral Commitments:
184
+ [ ] I will NOT retry a refused write blind — heal (reattach) first
185
+ [ ] I will NOT type while a command is still running
186
+ [ ] I will NOT pipe or silence output the operator is watching
187
+ [ ] I will NOT send keystrokes into an unverified prompt state
188
+ [ ] I will NOT claim success without the exit marker in the read
189
+ [ ] I will re-output this checklist at each step transition
190
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
191
+ ```
192
+
193
+ ### Check-Off Rules
194
+
195
+ - Re-output the checklist with `[✅]` / `[🔄]` / `[ ]` at each step
196
+ transition (1→2, 2→3, 3→4).
197
+ - At completion, output the final checklist: ALL `[✅]`, any `[❌]`.
198
+ - Do NOT deliver without the final checklist.
199
+ <!-- RCA: AI-Research/LLMs Skip Mandatory Steps/001. LLMs Skip Mandatory Steps/002.The Visible checklist Pattern/2026-06-11 - The Visible Checklist Pattern - AI Research v1 - report.md -->
200
+
201
+ ---
202
+
203
+ ## How This Skill Connects to the Docs
204
+
205
+ The skill is the DO-path; the docs carry the WHY and the CONTRACT.
206
+
207
+ ```mermaid
208
+ flowchart LR
209
+ A["/dsi-drive-terminal<br/>this skill"] --> B["KB terminal-driving.md<br/>feature / contract / scenario"]
210
+ B --> C["ADR The Surviving Shell<br/>lease + auto-heal decisions"]
211
+ A --> D["Live floor<br/>the operator's desk tab"]
212
+ ```
213
+
214
+ ## Attention-Degradation Protection
215
+
216
+ This skill stays SHORT. The mechanics and contract live in the KB note
217
+ (`dev/feature-contract-scenario/terminal-driving.md`); the decisions live in
218
+ the ADR. This skill only orchestrates the drive.
219
+ <!-- RCA: AI-Research/YT-Research/2026-06-22 - Why Long Instructions Make AI Dumber - Attention Degradation Science.md -->
@@ -0,0 +1,67 @@
1
+ # DSI Publish (verified ritual)
2
+
3
+ Publish `@deepseek-insight/dsi` to npm with the machine sanity-checked FIRST —
4
+ so a shadowed build tool fails a 5-second probe, not the publish gate.
5
+ Run AFTER `dsi-bump-up` (the version must already be bumped and committed).
6
+
7
+ ## 0. Preconditions
8
+
9
+ - Repo: `~/agentic-ai/deepseek-insight`, clean tree (`git status -s` empty).
10
+ - Version in `package.json` equals the latest `chore: bump version` commit
11
+ (if not, run `/dsi-bump-up` first — never publish an unbumped version).
12
+ - `npm whoami` prints your account (log in with `npm login` if not).
13
+
14
+ ## 1. Tool sanity gate ⛔ (the pnpm-from-another-planet guard)
15
+
16
+ A stray global install can shadow the real pnpm (RCA 2026-11-04: a
17
+ Linux-ARM binary at `~/node_modules/.bin/pnpm` won every PATH race and
18
+ killed the publish with exit 126).
19
+
20
+ ```sh
21
+ which pnpm # expect: /Users/<you>/Library/pnpm/pnpm (or corepack)
22
+ pnpm --version # expect: a number, no error
23
+ file "$(which pnpm)" # expect: Mach-O / shell script — NEVER "ELF"
24
+ ```
25
+
26
+ Any ELF answer, `~/node_modules/.bin` path, or "cannot execute binary file"
27
+ → STOP: remove the stray install (verify its contents first: it should
28
+ contain only the bad package), `hash -r`, re-run this gate. Never chmod a
29
+ "cannot execute binary file" — a Linux binary is not a permission problem.
30
+
31
+ ## 2. Build (the publish hook will run it anyway — fail here, loudly)
32
+
33
+ ```sh
34
+ pnpm run build
35
+ test -f build/index.js && echo 'build ok' # prepublishOnly runs it again; this is the dry run
36
+ ```
37
+
38
+ ## 3. Publish
39
+
40
+ ```sh
41
+ cd ~/agentic-ai/deepseek-insight
42
+ npm publish --access public
43
+ ```
44
+
45
+ - Check exit code; on failure read the npm error block before retrying —
46
+ a failed prepublishOnly is usually the tool gate (step 1), not npm.
47
+ - First publish of a NEW version must come from a committed tree: if the
48
+ bump commit is missing, stop and finish `dsi-bump-up` first.
49
+
50
+ ## 4. Verify
51
+
52
+ ```sh
53
+ npm view @deepseek-insight/dsi version # expect the just-published version
54
+ ```
55
+
56
+ The registry can lag a few minutes; `+ @deepseek-insight/dsi@<version>`
57
+ in the publish output is the primary proof.
58
+
59
+ ## 5. Mirror
60
+
61
+ Run `/dsi-sync` — the release is not done until the GitHub mirror push
62
+ settles (a real release never reports "no changes").
63
+
64
+ ## Report
65
+
66
+ End with: version published, npm push result (`+ @deepseek-insight/dsi@x.y.z`),
67
+ registry check result, mirror sync result.
Binary file
Binary file
@@ -23,8 +23,8 @@ panel:
23
23
  minZoom: 0.25
24
24
  maxZoom: 1.25
25
25
  sidebar: { width: {2: 340, 4: 400}, state: {1, 3: collapse} }
26
- agent: { width: {1: 630, 2: 808, 3: 808, 4: 505} }
27
26
  glass: { width: {1: 860, 2: 800, 3: 1270, 4: 1570} }
27
+ agent: { width: {1: 630, 2: 808, 3: 808, 4: 505} }
28
28
  zoom: { width: {1: 77, 2: 90, 3: 90, 4: 90} }
29
29
  sidebar:
30
30
  placement: none
@@ -33,7 +33,6 @@ sidebar:
33
33
  maxWidth: 500
34
34
  prompts:
35
35
  tags: session lookup macro skill plan rca git cov ptc cordis standard minimal
36
- dbPath: ~/agentic-ai/deepseek-insight/template/.dsi/
37
36
  dsh:
38
37
  authToken: Hjb44MjBpiDchF6FAGdxFMk2-CKVBwjKjbvmFXboqZU
39
38
  presetEnglish: true