kiokuko-dsh 0.2.30 → 0.2.32

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 (85) hide show
  1. package/README.ja.md +1 -0
  2. package/dist/client.cjs +208 -3
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/dsh/composition.d.ts.map +1 -1
  6. package/dist/dsh/composition.js +2 -0
  7. package/dist/dsh/composition.js.map +1 -1
  8. package/dist/dsh/core/host.d.ts.map +1 -1
  9. package/dist/dsh/core/host.js +0 -10
  10. package/dist/dsh/core/host.js.map +1 -1
  11. package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
  12. package/dist/dsh/host-adapter/routing.js +131 -114
  13. package/dist/dsh/host-adapter/routing.js.map +1 -1
  14. package/dist/dsh/host-adapter.d.ts.map +1 -1
  15. package/dist/dsh/host-adapter.js +2 -1
  16. package/dist/dsh/host-adapter.js.map +1 -1
  17. package/dist/dsh/index.d.ts.map +1 -1
  18. package/dist/dsh/index.js +0 -8
  19. package/dist/dsh/index.js.map +1 -1
  20. package/dist/dsh/lisp/coding-preparation.d.ts +1 -1
  21. package/dist/dsh/lisp/coding-preparation.d.ts.map +1 -1
  22. package/dist/dsh/lisp/coding-preparation.js +1 -1
  23. package/dist/dsh/lisp/coding-preparation.js.map +1 -1
  24. package/dist/dsh/lisp/compiled-cache.d.ts +1 -1
  25. package/dist/dsh/lisp/compiled-cache.d.ts.map +1 -1
  26. package/dist/dsh/lisp/compiled-cache.js +12 -3
  27. package/dist/dsh/lisp/compiled-cache.js.map +1 -1
  28. package/dist/dsh/lisp/manager.d.ts +1 -0
  29. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  30. package/dist/dsh/lisp/manager.js +52 -51
  31. package/dist/dsh/lisp/manager.js.map +1 -1
  32. package/dist/dsh/lisp/store.d.ts +4 -0
  33. package/dist/dsh/lisp/store.d.ts.map +1 -1
  34. package/dist/dsh/lisp/store.js +61 -15
  35. package/dist/dsh/lisp/store.js.map +1 -1
  36. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  37. package/dist/dsh/lisp/surface.js +30 -5
  38. package/dist/dsh/lisp/surface.js.map +1 -1
  39. package/dist/dsh/lisp-tool-identity.d.ts +5 -0
  40. package/dist/dsh/lisp-tool-identity.d.ts.map +1 -1
  41. package/dist/dsh/lisp-tool-identity.js +10 -0
  42. package/dist/dsh/lisp-tool-identity.js.map +1 -1
  43. package/dist/dsh/model-routing.d.ts +1 -0
  44. package/dist/dsh/model-routing.d.ts.map +1 -1
  45. package/dist/dsh/model-routing.js +4 -0
  46. package/dist/dsh/model-routing.js.map +1 -1
  47. package/dist/dsh/models/index.d.ts +6 -0
  48. package/dist/dsh/models/index.d.ts.map +1 -0
  49. package/dist/dsh/models/index.js +8 -0
  50. package/dist/dsh/models/index.js.map +1 -0
  51. package/dist/dsh/models/surface.d.ts +1 -1
  52. package/dist/dsh/models/surface.d.ts.map +1 -1
  53. package/dist/dsh/models/surface.js +21 -13
  54. package/dist/dsh/models/surface.js.map +1 -1
  55. package/dist/dsh/native-tool-surface.d.ts +16 -0
  56. package/dist/dsh/native-tool-surface.d.ts.map +1 -0
  57. package/dist/dsh/native-tool-surface.js +64 -0
  58. package/dist/dsh/native-tool-surface.js.map +1 -0
  59. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  60. package/dist/dsh/on-demand-intake.js +57 -25
  61. package/dist/dsh/on-demand-intake.js.map +1 -1
  62. package/dist/dsh/session-recovery-surface.d.ts +7 -0
  63. package/dist/dsh/session-recovery-surface.d.ts.map +1 -0
  64. package/dist/dsh/session-recovery-surface.js +86 -0
  65. package/dist/dsh/session-recovery-surface.js.map +1 -0
  66. package/dist/dsh/session-recovery.d.ts +78 -0
  67. package/dist/dsh/session-recovery.d.ts.map +1 -0
  68. package/dist/dsh/session-recovery.js +303 -0
  69. package/dist/dsh/session-recovery.js.map +1 -0
  70. package/dist/dsh/skill-prompts.json +1 -1
  71. package/dist/locale/en.json +1 -1
  72. package/dist/locale/ja.json +1 -1
  73. package/dist/locale/ko.json +1 -1
  74. package/dist/locale/zh-CN.json +1 -1
  75. package/dist/recovery-client.d.ts +5 -0
  76. package/dist/recovery-client.d.ts.map +1 -0
  77. package/dist/recovery-client.js +166 -0
  78. package/dist/recovery-client.js.map +1 -0
  79. package/docs/lisp.md +20 -2
  80. package/docs/session-recovery.md +24 -0
  81. package/dsh/cordis.patch.yml +4 -0
  82. package/migrations/049_lisp_session_hosts.sql +10 -0
  83. package/package.json +6 -2
  84. package/skills/coding-ideal-routine-skill/SKILL.md +28 -1
  85. package/skills/kiokuko-lisp/SKILL.md +4 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "Version 0.2.30 — Kiokuko plugin for DeepSeek Harness"
4
+ "description": "Version 0.2.32 — Kiokuko plugin for DeepSeek Harness"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "バージョン 0.2.30 — DeepSeek Harness 向け Kiokuko プラグイン"
4
+ "description": "バージョン 0.2.32 — DeepSeek Harness 向け Kiokuko プラグイン"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "버전 0.2.30 — DeepSeek Harness용 Kiokuko 플러그인"
4
+ "description": "버전 0.2.32 — DeepSeek Harness용 Kiokuko 플러그인"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "版本 0.2.30 — DeepSeek Harness 的 Kiokuko 插件"
4
+ "description": "版本 0.2.32 — DeepSeek Harness 的 Kiokuko 插件"
5
5
  }
6
6
  }
@@ -0,0 +1,5 @@
1
+ import type { DshClientContext } from './client.js';
2
+ /** Initialize the exact native target generation before publishing navigation. */
3
+ export declare function openRecoveryDraft(ctx: DshClientContext, id: string, draft: string): void;
4
+ export declare function mountRecoveryClient(ctx: DshClientContext): void;
5
+ //# sourceMappingURL=recovery-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recovery-client.d.ts","sourceRoot":"","sources":["../src/recovery-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AA+BnD,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAWxF;AAqED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAU/D"}
@@ -0,0 +1,166 @@
1
+ const NS = 'kiokuko-session-recovery';
2
+ const en = {
3
+ open: 'Session recovery', title: 'Recover an interrupted conversation', refresh: 'Check again', checking: 'Checking…', close: 'Close',
4
+ continue: 'Continue with this history', fresh: 'Start a fresh conversation', working: 'Preparing…',
5
+ intro: 'The original history stays intact. Unknown tool outcomes are not automatically replayed. Old background-job IDs cannot be restored.',
6
+ unknown: 'Tool calls with unknown outcomes', request: 'Original requests, in order', model: 'Saved model', missing: 'Model connection unavailable. Restore the connection or select a model before continuing.',
7
+ running: 'This conversation is running. Recovery is disabled until it is idle.', healthy: 'No interrupted last turn was found. You can still create an empty conversation.',
8
+ created: 'A new empty conversation is ready. Review the request and attachments before sending; nothing has been submitted to the model.',
9
+ openNew: 'Open the new conversation with this draft', previous: 'Open the conversation already created', continued: 'Continuation requested. Check the response in this conversation.',
10
+ unavailable: 'Recovery is unavailable. The original history has been retained.', draft: 'Request to carry over',
11
+ };
12
+ const ja = {
13
+ open: 'セッション復旧', title: '中断した会話を復旧', refresh: '状態を再確認', checking: '確認中…', close: '閉じる',
14
+ continue: 'この履歴から続ける', fresh: '空の会話でやり直す', working: '準備中…',
15
+ intro: '元の履歴は残ります。結果不明のツール処理は自動再実行しません。前プロセスのジョブ ID は復元できません。',
16
+ unknown: '結果が不明なツール呼び出し', request: '元のユーザー依頼(時系列)', model: '保存されたモデル', missing: 'モデル接続が利用できません。接続を復旧するか、モデルを選び直してから続行してください。',
17
+ running: 'この会話は実行中です。終了するまで復旧操作できません。', healthy: '最後のターンに中断は見つかりませんでした。新しい空の会話は作成できます。',
18
+ created: '新しい空の会話を作成しました。依頼内容と添付を確認してから送信してください。まだモデルへ送信していません。',
19
+ openNew: 'この依頼文を新しい会話で開く', previous: '作成済みの会話を開く', continued: '続行を依頼しました。この会話の応答を確認してください。',
20
+ unavailable: '復旧機能に接続できません。元の履歴は保持されています。', draft: '引き継ぐ依頼文',
21
+ };
22
+ /** Initialize the exact native target generation before publishing navigation. */
23
+ export function openRecoveryDraft(ctx, id, draft) {
24
+ const sessions = ctx.get?.('sessions', false);
25
+ const conversation = ctx.get?.('conversation', false);
26
+ const workspace = ctx.get?.('uiWorkspace', false);
27
+ if (!sessions?.retain || !conversation?.input?.requestDraftInitialization || !workspace?.openSession)
28
+ throw new Error('新しい会話を開けません。一覧から会話を開き、表示された依頼文をコピーしてください。');
29
+ const reference = sessions.retain(id, { source: 'mainView' });
30
+ try {
31
+ const binding = sessions.binding(id);
32
+ if (!binding || conversation.input.requestDraftInitialization(binding, { prompt: draft, whenDraftExists: 'keep' }) === 'blocked')
33
+ throw new Error('新しい会話の入力欄を準備できません。元の会話と依頼文は保持されています。');
34
+ workspace.openSession(id);
35
+ }
36
+ finally {
37
+ reference.release();
38
+ }
39
+ }
40
+ async function api(id, body, signal) {
41
+ const response = await fetch(`/api/kiokuko.session-recovery?sessionId=${encodeURIComponent(id)}`, body ? { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body), ...(signal ? { signal } : {}) } : (signal ? { signal } : {}));
42
+ const value = await response.json().catch(() => ({ error: ja.unavailable }));
43
+ if (!response.ok)
44
+ throw new Error(typeof value.error === 'string' ? value.error : ja.unavailable);
45
+ return value;
46
+ }
47
+ function RecoveryAction(props) {
48
+ const id = String(props.sessionId);
49
+ const t = props.recoveryT;
50
+ const [open, setOpen] = useState(false), [busy, setBusy] = useState(false);
51
+ const [status, setStatus] = useState(null), [result, setResult] = useState(null);
52
+ const [error, setError] = useState(''), [draft, setDraft] = useState('');
53
+ const dialog = useRef(null), trigger = useRef(null);
54
+ const active = useRef(id), mounted = useRef(true), pending = useRef(false);
55
+ const operation = useRef(null);
56
+ active.current = id;
57
+ useEffect(() => { mounted.current = true; pending.current = false; operation.current = null; setOpen(false); setBusy(false); setStatus(null); setResult(null); setError(''); return () => { mounted.current = false; }; }, [id]);
58
+ useEffect(() => {
59
+ if (open && !dialog.current?.open)
60
+ dialog.current?.showModal();
61
+ else if (!open && dialog.current?.open) {
62
+ dialog.current.close();
63
+ trigger.current?.focus();
64
+ }
65
+ }, [open]);
66
+ const current = () => mounted.current && active.current === id;
67
+ const load = async () => {
68
+ if (pending.current)
69
+ return;
70
+ pending.current = true;
71
+ setBusy(true);
72
+ setError('');
73
+ setResult(null);
74
+ operation.current = null;
75
+ try {
76
+ const next = await api(id, undefined, AbortSignal.timeout(15000));
77
+ if (current())
78
+ setStatus(next);
79
+ }
80
+ catch (failure) {
81
+ if (current())
82
+ setError(failure instanceof Error ? failure.message : t('unavailable'));
83
+ }
84
+ finally {
85
+ if (current()) {
86
+ pending.current = false;
87
+ setBusy(false);
88
+ }
89
+ }
90
+ };
91
+ const act = async (action) => {
92
+ if (pending.current || !status)
93
+ return;
94
+ pending.current = true;
95
+ setBusy(true);
96
+ setError('');
97
+ const previous = operation.current;
98
+ const op = previous?.action === action && previous.seq === status.seq ? previous : { action, seq: status.seq, id: crypto.randomUUID() };
99
+ operation.current = op;
100
+ try {
101
+ const next = await api(id, { sessionId: id, action, expectedSeq: op.seq, operationId: op.id }, AbortSignal.timeout(30000));
102
+ if (current()) {
103
+ setResult(next);
104
+ setDraft(next.draft ?? '');
105
+ if (action === 'continue')
106
+ setStatus({ ...status, canContinue: false });
107
+ }
108
+ }
109
+ catch (failure) {
110
+ if (current())
111
+ setError(failure instanceof Error ? failure.message : t('unavailable'));
112
+ }
113
+ finally {
114
+ if (current()) {
115
+ pending.current = false;
116
+ setBusy(false);
117
+ }
118
+ }
119
+ };
120
+ const openTarget = (target, prompt) => {
121
+ try {
122
+ props.openRecovery(target, prompt);
123
+ setOpen(false);
124
+ }
125
+ catch (failure) {
126
+ setError(failure instanceof Error ? failure.message : t('unavailable'));
127
+ }
128
+ };
129
+ const button = (label, onClick, disabled = false) => jsx('button', { type: 'button', disabled: busy || disabled, onClick, children: label });
130
+ return jsxs(Fragment, { children: [
131
+ jsx('button', { ref: trigger, type: 'button', onClick: () => { setOpen(true); void load(); }, children: t('open') }),
132
+ jsxs('dialog', { ref: dialog, className: 'kiokuko-recovery-dialog', 'aria-label': t('title'), onCancel: (event) => { if (pending.current)
133
+ event.preventDefault();
134
+ else
135
+ setOpen(false); }, onClose: () => setOpen(false), children: [
136
+ jsx('h2', { children: t('title') }), jsx('p', { children: t('intro') }),
137
+ busy ? jsx('p', { role: 'status', children: t('working') }) : null,
138
+ error ? jsx('p', { role: 'alert', children: error }) : null,
139
+ status ? jsxs('div', { children: [
140
+ jsx('p', { children: `${t('model')}: ${status.model ? `${status.model.provider}/${status.model.model}` : '—'}` }),
141
+ status.busy ? jsx('p', { role: 'status', children: t('running') }) : null,
142
+ !status.interrupted ? jsx('p', { children: t('healthy') }) : null,
143
+ ...status.warnings.map((warning, index) => jsx('p', { children: warning }, `warning-${index}`)),
144
+ status.unknownCalls.length ? jsxs('div', { children: [jsx('h3', { children: t('unknown') }), jsx('ul', { children: status.unknownCalls.map(call => jsx('li', { children: `${call.name} (${call.id})` }, call.id)) })] }) : null,
145
+ jsx('label', { children: jsxs(Fragment, { children: [t('request'), jsx('textarea', { readOnly: true, rows: 5, value: status.originalRequest })] }) }),
146
+ jsxs('div', { className: 'kiokuko-recovery-actions', children: [button(t('continue'), () => void act('continue'), !status.canContinue || !!result), button(t('fresh'), () => void act('new'), !status.canRestart || !!result)] }),
147
+ status.lastRestart && !result ? button(t('previous'), () => openTarget(status.lastRestart.sessionId, status.lastRestart.draft)) : null,
148
+ ] }) : null,
149
+ result?.action === 'continue' ? jsx('p', { role: 'status', children: t('continued') }) : null,
150
+ result?.action === 'new' ? jsxs('div', { children: [jsx('p', { role: 'status', children: t('created') }), ...result.warnings.filter(warning => !status?.warnings.includes(warning)).map((warning, index) => jsx('p', { children: warning }, `result-warning-${index}`)), jsx('label', { children: jsxs(Fragment, { children: [t('draft'), jsx('textarea', { rows: 7, value: draft, onChange: (event) => setDraft(event.target.value) })] }) }), button(t('openNew'), () => openTarget(result.sessionId, draft))] }) : null,
151
+ jsxs('div', { className: 'kiokuko-recovery-actions', children: [button(t('refresh'), () => void load()), button(t('close'), () => setOpen(false))] }),
152
+ ] }),
153
+ ] });
154
+ }
155
+ export function mountRecoveryClient(ctx) {
156
+ ctx.effect(() => ctx.locale.register(NS, { en, ja }), 'kiokuko recovery dictionaries');
157
+ const t = ctx.locale.bind?.(NS) ?? ((key) => ja[key]);
158
+ ctx.slots.inject('conversation.session.header.utilities', () => ctx.slots.register({ name: 'conversation.session.header.utilities', id: 'kiokuko-session-recovery', locale: NS, inject: () => ({ recoveryT: t, openRecovery: (id, draft) => openRecoveryDraft(ctx, id, draft) }) }, RecoveryAction));
159
+ ctx.effect(() => {
160
+ const style = document.createElement('style');
161
+ style.textContent = '.kiokuko-recovery-dialog{box-sizing:border-box;width:min(46rem,calc(100vw - 2rem));max-height:85vh;overflow:auto;margin:auto;padding:20px;border:1px solid #888;border-radius:16px;background:var(--dsw-alias-background-primary,Canvas);color:var(--dsw-alias-text-primary,CanvasText)}.kiokuko-recovery-dialog textarea{display:block;box-sizing:border-box;width:100%;margin:8px 0 16px;padding:10px;background:transparent;color:inherit;border:1px solid #888;border-radius:6px}.kiokuko-recovery-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.kiokuko-recovery-dialog button{min-height:40px;padding:8px 12px}.kiokuko-recovery-dialog :focus-visible{outline:2px solid #3286ff;outline-offset:3px}';
162
+ document.head.append(style);
163
+ return () => style.remove();
164
+ }, 'kiokuko recovery style');
165
+ }
166
+ //# sourceMappingURL=recovery-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recovery-client.js","sourceRoot":"","sources":["../src/recovery-client.ts"],"names":[],"mappings":"AASA,MAAM,EAAE,GAAG,0BAA0B,CAAA;AACrC,MAAM,EAAE,GAAG;IACT,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,qCAAqC,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO;IACrI,QAAQ,EAAE,4BAA4B,EAAE,KAAK,EAAE,4BAA4B,EAAE,OAAO,EAAE,YAAY;IAClG,KAAK,EAAE,qIAAqI;IAC5I,OAAO,EAAE,kCAAkC,EAAE,OAAO,EAAE,6BAA6B,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,2FAA2F;IAC/M,OAAO,EAAE,sEAAsE,EAAE,OAAO,EAAE,iFAAiF;IAC3K,OAAO,EAAE,gIAAgI;IACzI,OAAO,EAAE,2CAA2C,EAAE,QAAQ,EAAE,uCAAuC,EAAE,SAAS,EAAE,kEAAkE;IACtL,WAAW,EAAE,kEAAkE,EAAE,KAAK,EAAE,uBAAuB;CAChH,CAAA;AACD,MAAM,EAAE,GAAoC;IAC1C,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;IACtF,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM;IAC1D,KAAK,EAAE,uDAAuD;IAC9D,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,6CAA6C;IAC7H,OAAO,EAAE,6BAA6B,EAAE,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AE,IAAI,EAAE,uCAAuC,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAU,EAAE,KAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC,CAAA;IACpT,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC7C,KAAK,CAAC,WAAW,GAAG,yrBAAyrB,CAAA;QAC7sB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC3B,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;IAC7B,CAAC,EAAE,wBAAwB,CAAC,CAAA;AAC9B,CAAC"}
package/docs/lisp.md CHANGED
@@ -1,4 +1,4 @@
1
- For configured semantic routing, use [provider-independent decisions](typed-decisions.md) and `kioku.decisions`. Lisp coexists with normal tools; routine development is authorized and destructive changes retain concrete review.
1
+ For configured semantic routing, use [provider-independent decisions](typed-decisions.md) and `kioku.decisions`. Enabled Lisp owns computation and shell orchestration; read/search and owned file tools remain available. Routine development is authorized and destructive changes retain concrete review.
2
2
 
3
3
  # Common Lisp tools
4
4
 
@@ -89,7 +89,18 @@ starts a worker. Variables, definitions and references are lost on restart; the
89
89
  agent receives the new generation and must rebuild helpers without replaying
90
90
  completed effects. Crashes and explicit cancellation still require human recovery.
91
91
 
92
- Enter a normal implementation or debugging request in DSH, including dsh-cli. Clear unowned native implementation requests now offer Lisp before model generation, including native Bash. A manually enabled session uses the selected route. Ordinary development prefers Lisp for useful calculations and transformations but does not require a preliminary prototype or automatic Lisp-to-Bash fallback. An explicitly protected coding workflow still requires a fresh `lisp_eval` prototype (`prototype: true`) followed by complete saved-result inspection through `lisp_inspect` before implementation, with its two-failure retry budget. ON alone is not verification. Explicit cancellation, numeric cancel, submitted Skip and `ASK_CANCELLED` end the implementation attempt while preserving work; hiding a named card alone leaves its question pending. Cancellation never authorizes a different execution route. A new independent conversation/read does not inherit the ended question gate. Native permissions, Stop and read-only conversation/research remain independent.
92
+ Multiple host processes can share the same Kiokuko database and Lisp data directory.
93
+ Each session has one host owner; other sessions and projects run independently,
94
+ including when their agent and operation IDs are identical. `maxWorkers` applies
95
+ per host. Compilers publish private builds atomically and verify a concurrent
96
+ winner before reusing it. Starting or stopping a host does not recover another
97
+ host's live operations. A session whose owner has exited is claimed on its next
98
+ admission, and unfinished operations become `UNKNOWN` without replay. Concurrent
99
+ protected workspace proposals for the same file still return `TARGET_LOCKED` to prevent overwrites.
100
+ When upgrading from the older exclusive `host.lock` implementation, stop the old
101
+ hosts before starting the updated hosts.
102
+
103
+ Enter a normal implementation or debugging request in DSH, including dsh-cli. Clear unowned native implementation requests now offer Lisp before model generation, including native Bash. A manually enabled session uses the selected route. When Lisp is selected, ordinary development uses Lisp for computation and command orchestration without requiring a preliminary prototype. Direct native shell calls are rejected; external programs run through Lisp's process APIs. An explicitly protected coding workflow still requires a fresh `lisp_eval` prototype (`prototype: true`) followed by complete saved-result inspection through `lisp_inspect` before implementation, with its two-failure retry budget. ON alone is not verification. Explicit cancellation, numeric cancel, submitted Skip and `ASK_CANCELLED` end the implementation attempt while preserving work; hiding a named card alone leaves its question pending. Cancellation never authorizes a different execution route. A new independent conversation/read does not inherit the ended question gate. Native permissions, Stop and read-only conversation/research remain independent.
93
104
  With `typedDecisions.mode: auto`, an accepted Jev/Laya `build` or `debug`
94
105
  classification reaches the existing Lisp question without repeating the task-category
95
106
  question. Laya receives complete requests up to 4096 UTF-8 bytes, including quoted
@@ -108,6 +119,13 @@ Normal/Enno execution mode and Lisp choice are separate. The task question remai
108
119
  ```
109
120
 
110
121
  This enables the Lisp tools and supplies the bundled `kiokuko-lisp` Skill.
122
+ While enabled, use Lisp for computation and orchestration. Direct native
123
+ Bash/zsh/PowerShell calls are rejected, including read-only commands. Run external
124
+ programs through `kioku.process:run` / `start-job` inside Lisp; the native command
125
+ bridge retains the host's permissions, approvals and Stop handling. Read/search,
126
+ Skill loading and owned file tools remain available. Worker failure or plugin
127
+ reload does not silently restore the direct shell route; recover Lisp or explicitly
128
+ use `/kioku-lisp disable`.
111
129
  Existing DSH `read`, `glob`, `grep` and `skill` tools remain available under native
112
130
  session permissions, so project files and applicable Skills can be inspected.
113
131
  File changes can use owned native tools or Lisp proposals. Ordinary writes/edits do not request approval; destructive source/data deletion retains a concrete review. For a coding task with a saved yes, recover Lisp or explicitly choose another task route before continuing implementation.
@@ -0,0 +1,24 @@
1
+ # 中断した会話の復旧
2
+
3
+ Web の会話上部にある **セッション復旧** から操作します。
4
+
5
+ - **この履歴から続ける**: 保存済み履歴を保ったまま、状態確認を求める新しい依頼を一度だけ送信します。保存されたモデル接続が利用できる必要があります。
6
+ - **空の会話でやり直す**: 同じ作業場所とプリセットで新しい会話を作成します。元のユーザー依頼を時系列で入力欄に引き継ぎ、確認後に送信します。元のモデル接続が失われていても作成できます。必要なら送信前にモデルを選択してください。
7
+
8
+ 元の履歴は削除・書き換えしません。実行中の会話では復旧操作を停止します。新規作成は元の実行環境を再開せず、保存履歴から行います。応答が届かなかった操作の再送では同じ復旧操作 ID を使い、二重作成・二重送信を防ぎます。
9
+
10
+ CLI では対象の会話を開いて、以下を入力します。
11
+
12
+ ```text
13
+ /kioku-recover status
14
+ /kioku-recover continue
15
+ /kioku-recover new
16
+ ```
17
+
18
+ `new` は先頭に作成した会話の `/resume ID` を返します。対応CLIでは複数行の結果を会話内に表示します。ID で空の会話を開き、表示された依頼文を確認して転記してください。まだモデルには送信しません。Web では依頼文を下書きへ転記できます。元の会話を開けない場合は Web の保存履歴から操作してください。
19
+
20
+ クラッシュ直前のツール処理は、実際には完了していても結果が保存されていない場合があります。復旧機能はそれを自動再実行せず、結果不明として状態確認をモデルへ指示します。復旧後のモデルによる処理は通常の権限管理に従います。前プロセスのバックグラウンドジョブやジョブ ID は復元できません。新規会話の添付ファイルは再添付してください。長い依頼文を自動転記できない場合はその旨を表示し、内容を黙って切り捨てません。
21
+
22
+ 更新したパッケージを使うにはホストの再起動が必要です。作業中のホストを強制終了せず、実行を終えてから通常の終了・起動を行ってください。
23
+
24
+ 保存済みモデルの登録は独立した `kiokuko-models` プラグインが担当します。Web・CLIとも同じプロファイルの `kiokuko-models.json` から登録し、Kiokuko本体の起動失敗で登録を失わない構成です。接続設定そのものが欠落・破損している場合や、プラグインを無効化した場合は復元できません。他のプロファイルから接続や資格情報を勝手にコピーすることはありません。
@@ -4,6 +4,10 @@
4
4
  - id: session-log-download
5
5
  disabled: true
6
6
  - insert:
7
+ # Saved model providers must survive a failure of the execution plugin.
8
+ - id: kiokuko-models
9
+ name: 'kiokuko-dsh/models'
10
+ inject: [llm, commands]
7
11
  - id: kiokuko-dsh
8
12
  name: 'kiokuko-dsh'
9
13
  inject: [skills, systemPrompt, tools, commands, userQuestions, sessions, sessionQuery, sessionPersistence, llm, agents, attachments, subagents, subprocess]
@@ -0,0 +1,10 @@
1
+ CREATE TABLE dsh_lisp_session_hosts (
2
+ session_id TEXT PRIMARY KEY,
3
+ root_path TEXT NOT NULL,
4
+ host_id TEXT NOT NULL,
5
+ pid INTEGER NOT NULL CHECK(pid > 0)
6
+ );
7
+
8
+ -- A frozen file change is exclusive across sessions and host processes.
9
+ CREATE UNIQUE INDEX dsh_lisp_proposal_target ON dsh_lisp_operations(json_extract(payload,'$.before.path'))
10
+ WHERE kind='proposal' AND state IN ('RUNNING','AWAITING_APPROVAL','APPLYING','UNKNOWN');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiokuko-dsh",
3
- "version": "0.2.30",
3
+ "version": "0.2.32",
4
4
  "description": "Kiokuko plugin for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -78,7 +78,11 @@
78
78
  "default": "./dist/dsh/modules/lisp.js"
79
79
  },
80
80
  "./package.json": "./package.json",
81
- "./locale/*.json": "./dist/locale/*.json"
81
+ "./locale/*.json": "./dist/locale/*.json",
82
+ "./models": {
83
+ "types": "./dist/dsh/models/index.d.ts",
84
+ "default": "./dist/dsh/models/index.js"
85
+ }
82
86
  },
83
87
  "dsh": {
84
88
  "displayName": "Kiokuko DSH",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: coding-ideal-routine-skill
3
- description: バグ修正・機能追加・挙動に関わる設定や配布物の変更で、調査→失敗するテスト→実装→実利用経路の受け入れ検証→事実に基づく報告を行う。部品単体は動くのに通常利用で失敗する抜けを防ぐ。単なる質問・説明・計画には実装手順を強制しない。
3
+ description: コードを書く、変更するすべての依頼で使用する。バグ修正・機能追加・リファクタリング・挙動に関わる設定や配布物の変更を、まず動かす→正しくする→実践を続ける順で進め、調査→失敗するテスト→実装→実利用経路の受け入れ検証→事実に基づく報告を行う。単なる質問・説明・計画には実装手順を強制しない。
4
4
  ---
5
5
 
6
6
  <!-- KIOKUKO MANAGED STANDARD SKILL: coding-ideal-routine-skill -->
@@ -9,6 +9,33 @@ description: バグ修正・機能追加・挙動に関わる設定や配布物
9
9
 
10
10
  目的は、変更箇所のテストを通すだけでなく、ユーザーが普段行う操作で要求を満たすこと。既存の作業規約とユーザーの目的・環境・権限を守り、変更リスクに見合う最小限の検証で根拠を積み上げる。
11
11
 
12
+ ## 基本原則: まず動かす → 正しくする → 実践を続ける
13
+
14
+ この順序は、動けば雑でよいという意味ではない。観測可能な成果を最小単位で成立させ、その挙動を固定してから構造を整え、再現可能な作業として仕上げる。[ub-mode](https://github.com/unclebob/ub-mode/blob/master/SKILL.md) の原則を、このリポジトリの権限・検証規約に合わせて次のように適用する。
15
+
16
+ ### まず動かす
17
+
18
+ - 一つの判断を一か所に置き、要求を満たす最小の編集から始める。ロジックを書く前にデータ形状と責務を決め、後続工程全体を簡単にする作業を先に行う。
19
+ - 共有状態を直ちにロックで囲わない。共有不要なら分離し、必要なら単一 writer を構造で保証する。外部入力は境界で一度検証・変換し、内部の業務判断は純粋で制約された値として扱う。コンパイラや型検査を黙らせない。
20
+ - 挙動変更は失敗する正直なテストから始め、期待した理由で失敗することを見て、通す最小変更を行う。現実の利用契約を表せないテストを数合わせで追加しない。
21
+ - 新要件を既存設計へ継ぎ足す前に、最初からその要件があればどう設計したかを考え、後戻りできる検証可能な単位へ分けて届ける。足す前に不要な複雑さを減らす。
22
+ - 同じ前提に立つ二つの修正が同じ関門で失敗したら、前提と状態を持つ主体を明示し、誤った責務の割当てを除いてから次の修正へ進む。
23
+ - 作業が一見して明らかでない反復なら、まず一単位を手で正しく実行し、それに一致する小さな道具を作る。違法状態を表現できないドメイン形状、共通語彙、再実行しても同じ終状態になる操作を優先する。既存コードが明快で局所的なら、抽象化を増やさない。
24
+
25
+ ### 正しくする
26
+
27
+ - 不具合は再現し、症状を隠す guard ではなく原因を直す。小さな単位を一つ終えて検証してから次へ進む。
28
+ - テストは内部実装ではなく、利用者と同じ入口から観測できる振る舞いを固定する。主要な処理が空でも通るテストは正しさの証拠にしない。
29
+ - Crapper、Dryer、Mutator または同等の品質ゲートが利用可能で変更リスクに見合う場合は、CRAP 10 未満、類似度 0.8 以上の重複除去、mutation survivor の排除を目安に使う。未導入の外部ツールを無断で追加せず、数値だけのために明快なコードを崩さない。
30
+ - リファクタリングでは先に現在の挙動を固定し、構造だけを変え、同じ外部挙動が保たれたことを証明する。
31
+
32
+ ### 実践を続ける
33
+
34
+ - 重要な操作、判断の根拠、観測した結果を簡潔な作業記録として残し、完了報告に要点を含める。非公開の推論過程や大量の生ログを開示しない。
35
+ - 主作業の文脈を小さく保ち、大きな出力は必要な証拠と要約だけを残す。
36
+ - worktree や一時成果物を片付ける前に利用中でないことを確認する。未コミット作業は削除せず、扱いを決めるまで保持する。
37
+ - 明示的に依頼された場合だけ commit や push を行う。その場合も、理由・変更・検証が対応する小さく順序立った commit にする。
38
+
12
39
  ## 1. 作業の種類と完了条件を決める
13
40
 
14
41
  - 質問・調査・計画だけなら、その回答を完成させる。依頼のない編集やテスト追加、記憶の読み直しを始めない。
@@ -14,11 +14,11 @@ Coding: coding_workflow defines Goal/items/checks before the task Lisp choice. P
14
14
 
15
15
 
16
16
 
17
- Persistent mode: coding choice or /kioku-lisp enable. Task mode uses /kioku-lisp enable-task with fresh workers per definition/call. Lisp and ordinary tools coexist. Coding-task startup failure blocks until recovery or explicit route change; legacy ordinary tools remain available. Never spoof host-bound session/agent/directory/generation.
17
+ Persistent: coding choice or /kioku-lisp enable. Task: /kioku-lisp enable-task, fresh workers per call. ON selects Lisp computation/orchestration; direct Bash/zsh/PowerShell is rejected, even reads. Run Git/gh/builds/tests through kioku.process:run / start-job. Read/search/Skill and owned file tools remain available. Failure requires recovery or explicit /kioku-lisp disable; no silent shell fallback. Never spoof host-bound session/agent/directory/generation.
18
18
 
19
- Use kioku_read, kioku_write, kioku_edit, kioku_remove, kioku_exec and kioku_result for observed development. PATH commands, bash/zsh, builds/tests, coding-needed external investigation and project edits need no routine confirmation. Source/data deletion and existing durable user database mutation need a concrete review; generated/temp/disposable artifacts are ordinary development. Memory organization waits until task completion and user permission; saving requires approval of the exact shown content. Declare destructiveTargets when executing commands with destructive intent. The host does not attempt to classify every side effect of arbitrary code.
19
+ Owned kioku_read/write/edit/remove/exec/result retain development receipts. Ordinary commands, investigation, builds/tests, edits and disposable artifacts need no routine confirmation. Source/data deletion and durable user DB mutation require concrete review; declare destructiveTargets. Arbitrary code effects are not exhaustively classified. Organize memory only after completion and permission; save only the exact approved content.
20
20
 
21
- Foreground kioku.process:run uses native Bash sandbox/approval/Stop without a memory task/Goal. Selected coding requires prototype/result inspection. Admitted workflows, owned tools, async jobs and protected mode keep task/protocol authority. Use kioku.tools:call-tool/broker receipts; direct Lisp/FFI or generated passed fields prove no verification. Bind task_completion conditions/source paths (subdirs too) before checks; collect async receipts with kioku_result. Cancellation/ownership remain authoritative. Admitted Plan allows read/search/status until human implementation/approval exits at the next boundary. Conversation: native policy.
21
+ Foreground kioku.process:run retains native Bash sandbox/approval/Stop without a memory task/Goal. Protected coding requires prototype/result inspection. Admitted workflows, owned tools and async jobs keep task/protocol authority. Use kioku.tools:call-tool/broker receipts; direct Lisp/FFI or generated passed fields prove no verification. Bind task_completion conditions/source paths before checks; collect async receipts with kioku_result. Cancellation/ownership remain authoritative. Plan permits read/search/status until human approval exits at the next boundary.
22
22
 
23
23
  Schemas define arguments; never guess. `lisp_describe` without a symbol gives the
24
24
  API/verifier map, even during recovery. Persistent `lisp_eval`: declared inputs;
@@ -345,7 +345,7 @@ Project edits, verification, helper compilation/registration and ordinary Kioku
345
345
 
346
346
  <!-- /kiokuko:documentation -->
347
347
  <!-- kiokuko:runtime approval-policy -->
348
- Routine development and helper registration are authorized. Concrete destructive review remains required. Lisp failure does not block ordinary tools. Report execution, verification and saving separately; retry saving without replaying effects.
348
+ Routine development and helper registration are authorized. Concrete destructive review remains required. Lisp failure retains the selected shell route. Report execution, verification and saving separately; retry saving without replaying effects.
349
349
  <!-- /kiokuko:runtime -->
350
350
 
351
351