kiokuko-dsh 0.2.44 → 0.2.45
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/PERMISSIONS.md +3 -3
- package/README.ja.md +10 -4
- package/README.ko.md +10 -3
- package/README.md +10 -4
- package/README.zh-CN.md +10 -3
- package/dist/build-info.json +7 -0
- package/dist/dsh/agenticreplay-hooks.js +1 -1
- package/dist/dsh/agenticreplay-hooks.js.map +1 -1
- package/dist/dsh/agenticreplay-recorder.d.ts +5 -2
- package/dist/dsh/agenticreplay-recorder.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-recorder.js +19 -9
- package/dist/dsh/agenticreplay-recorder.js.map +1 -1
- package/dist/dsh/core/host.d.ts.map +1 -1
- package/dist/dsh/core/host.js +2 -1
- package/dist/dsh/core/host.js.map +1 -1
- package/dist/dsh/core/tasks.js +1 -1
- package/dist/dsh/core/tasks.js.map +1 -1
- package/dist/dsh/decisions/akinator-answers.d.ts +3 -3
- package/dist/dsh/decisions/akinator-answers.d.ts.map +1 -1
- package/dist/dsh/decisions/akinator-answers.js +5 -5
- package/dist/dsh/decisions/akinator-answers.js.map +1 -1
- package/dist/dsh/decisions/diagnostics.js +2 -2
- package/dist/dsh/decisions/diagnostics.js.map +1 -1
- package/dist/dsh/decisions/request-intent.d.ts +3 -0
- package/dist/dsh/decisions/request-intent.d.ts.map +1 -1
- package/dist/dsh/decisions/request-intent.js +11 -2
- package/dist/dsh/decisions/request-intent.js.map +1 -1
- package/dist/dsh/existing-task-intake.js +1 -1
- package/dist/dsh/existing-task-intake.js.map +1 -1
- package/dist/dsh/failure-diagnostic.d.ts +3 -0
- package/dist/dsh/failure-diagnostic.d.ts.map +1 -0
- package/dist/dsh/failure-diagnostic.js +30 -0
- package/dist/dsh/failure-diagnostic.js.map +1 -0
- package/dist/dsh/harness/factory.d.ts.map +1 -1
- package/dist/dsh/harness/factory.js +4 -2
- package/dist/dsh/harness/factory.js.map +1 -1
- package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
- package/dist/dsh/host-adapter/admission.js +17 -1
- package/dist/dsh/host-adapter/admission.js.map +1 -1
- package/dist/dsh/host-adapter/routing.d.ts +3 -2
- package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
- package/dist/dsh/host-adapter/routing.js +18 -5
- package/dist/dsh/host-adapter/routing.js.map +1 -1
- package/dist/dsh/host-adapter/session-observation.d.ts.map +1 -1
- package/dist/dsh/host-adapter/session-observation.js +4 -1
- package/dist/dsh/host-adapter/session-observation.js.map +1 -1
- package/dist/dsh/host-adapter/turn-state.d.ts +1 -0
- package/dist/dsh/host-adapter/turn-state.d.ts.map +1 -1
- package/dist/dsh/host-adapter/turn-state.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +5 -27
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/index.d.ts.map +1 -1
- package/dist/dsh/index.js +3 -1
- package/dist/dsh/index.js.map +1 -1
- package/dist/dsh/intake-gate.js +1 -1
- package/dist/dsh/intake-gate.js.map +1 -1
- package/dist/dsh/lisp/proposal-batch.d.ts +1 -1
- package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
- package/dist/dsh/lisp/proposal-batch.js +5 -46
- package/dist/dsh/lisp/proposal-batch.js.map +1 -1
- package/dist/dsh/lisp/surface.d.ts.map +1 -1
- package/dist/dsh/lisp/surface.js +4 -5
- package/dist/dsh/lisp/surface.js.map +1 -1
- package/dist/dsh/models/profiles.d.ts.map +1 -1
- package/dist/dsh/models/profiles.js +5 -0
- package/dist/dsh/models/profiles.js.map +1 -1
- package/dist/dsh/models/service.d.ts.map +1 -1
- package/dist/dsh/models/service.js +33 -5
- package/dist/dsh/models/service.js.map +1 -1
- package/dist/dsh/models/vendor/infron-listing.d.ts +2 -2
- package/dist/dsh/models/vendor/infron-listing.d.ts.map +1 -1
- package/dist/dsh/models/vendor/infron-listing.js +10 -4
- package/dist/dsh/models/vendor/infron-listing.js.map +1 -1
- package/dist/dsh/on-demand-intake.d.ts +2 -1
- package/dist/dsh/on-demand-intake.d.ts.map +1 -1
- package/dist/dsh/on-demand-intake.js +12 -9
- package/dist/dsh/on-demand-intake.js.map +1 -1
- package/dist/dsh/owned-execution.d.ts +0 -1
- package/dist/dsh/owned-execution.d.ts.map +1 -1
- package/dist/dsh/owned-execution.js +28 -49
- package/dist/dsh/owned-execution.js.map +1 -1
- package/dist/dsh/plugin-evidence.d.ts +9 -0
- package/dist/dsh/plugin-evidence.d.ts.map +1 -0
- package/dist/dsh/plugin-evidence.js +33 -0
- package/dist/dsh/plugin-evidence.js.map +1 -0
- package/dist/dsh/session-history-compatibility.d.ts.map +1 -1
- package/dist/dsh/session-history-compatibility.js +7 -4
- package/dist/dsh/session-history-compatibility.js.map +1 -1
- package/dist/dsh/setup.d.ts +1 -1
- package/dist/dsh/setup.d.ts.map +1 -1
- package/dist/dsh/setup.js +1 -1
- package/dist/dsh/skill-prompts.json +1 -1
- package/dist/dsh/task-completion-guidance.js +1 -1
- package/dist/dsh/task-completion-guidance.js.map +1 -1
- package/dist/dsh/task-completion-host.d.ts.map +1 -1
- package/dist/dsh/task-completion-host.js +17 -6
- package/dist/dsh/task-completion-host.js.map +1 -1
- package/dist/dsh/task-startup.js +1 -1
- package/dist/dsh/task-startup.js.map +1 -1
- package/dist/dsh/task-state-host.js +1 -1
- package/dist/dsh/task-state-host.js.map +1 -1
- package/dist/dsh/tool-exposure-diagnostics.d.ts +29 -0
- package/dist/dsh/tool-exposure-diagnostics.d.ts.map +1 -0
- package/dist/dsh/tool-exposure-diagnostics.js +33 -0
- package/dist/dsh/tool-exposure-diagnostics.js.map +1 -0
- package/dist/locale/en.json +1 -1
- package/dist/locale/ja.json +1 -1
- package/dist/locale/ko.json +1 -1
- package/dist/locale/zh-CN.json +1 -1
- package/docs/agenticreplay-log-investigation-2026-11-04.ja.md +234 -0
- package/docs/lisp.md +7 -7
- package/docs/owned-execution.md +4 -3
- package/docs/patches/dsh-latest-local-update.patch +42 -0
- package/package.json +3 -3
- package/skills/kiokuko-lisp/SKILL.md +6 -6
- package/skills/kiokuko-soul/SKILL.md +4 -4
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# AgenticReplayログの不具合調査レポート
|
|
2
|
+
|
|
3
|
+
調査日: 2026年11月4日(JST)
|
|
4
|
+
|
|
5
|
+
対象: `/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay`
|
|
6
|
+
|
|
7
|
+
ブランチ: `main` / HEAD: `e48af320d78f3c807502e0801eb65a579f73d42e`
|
|
8
|
+
|
|
9
|
+
## 結論
|
|
10
|
+
|
|
11
|
+
記録済みログの破損は確認されなかった。確認できた主な問題は、**失敗理由をAgenticReplayへ引き継がない記録処理、保存済みモデルの推論強度メタデータ欠落、継続処理・完了基準の入力不一致**である。
|
|
12
|
+
|
|
13
|
+
実際にターンが停止した記録は2件あり、そのうち1件は同一Infronモデルへの6回の失敗で終わっている。ただし、元のエラーコード・メッセージ・HTTPステータスが記録されていないため、**最初のモデル失敗の根本原因はこのログだけでは確定できない**。もう1件も直前のツールは成功しており、例外の詳細が欠けている。
|
|
14
|
+
|
|
15
|
+
追加提示された `toolExposure ... session_failed` は、先行するエラーを受けてツール構成の変更を見送った結果である。警告を最初の失敗原因と判断する根拠はない。
|
|
16
|
+
|
|
17
|
+
推論強度の修正は調査開始前から作業ツリーで進行していた。調査中の変更を含む特定時点では関連89テストが通過したが、稼働中プロファイルへの反映や実サービスでの解消は今回確認していない。本調査では製品コードを変更していない。
|
|
18
|
+
|
|
19
|
+
## 対象と検証範囲
|
|
20
|
+
|
|
21
|
+
2026-11-04 **16:10:01〜16:10:02 JST** に各ログのmanifestとeventsを読み取り、以後はその範囲を固定した。全ディレクトリを同時に取得したスナップショットではない。記録中のC・Eには取得後のイベントを含めない。
|
|
22
|
+
|
|
23
|
+
| 記号 | run ID | イベント | 参照blob | 状態 | ツール失敗 |
|
|
24
|
+
|---|---|---:|---:|---|---:|
|
|
25
|
+
| A | `run_084d215cb10d4aa5ef61db26` | 1,310 | 149 | 完了済み | 19 |
|
|
26
|
+
| B | `run_fcbbfb4169971d07cd1a3cef` | 2,054 | 243 | 完了済み | 18 |
|
|
27
|
+
| C | `run_c9a67481283045a1a79b7e59` | 859 | 83 | 未完了・追記を観測 | 9 |
|
|
28
|
+
| D | `run_408764c7882abae195a63f26` | 411 | 39 | 完了済み | 2 |
|
|
29
|
+
| E | `run_96c9377e3f14debd31d650a8` | 147 | 15 | 未完了・追記を観測 | 0 |
|
|
30
|
+
|
|
31
|
+
合計4,781イベント、runごとの参照blob数の合計529件、JSONLと参照blobの合計276,791,887バイト。ツール結果554件中、`is_error=true` は48件。これには正常な権限制御、探索失敗、開発途中のテスト失敗も含まれるため、「製品不具合48件」を意味しない。
|
|
32
|
+
|
|
33
|
+
実施した検査:
|
|
34
|
+
|
|
35
|
+
- 全manifest・全イベントをローカルのAgenticReplay schemaで検証。記録側coreは0.1.12、検証側coreは0.1.9であり、同一バージョンでの公式検証ではない。
|
|
36
|
+
- UTF-8/JSON解析、JSONL末尾改行、0起点の連番、`causes` の既出イベント参照を確認。
|
|
37
|
+
- 各参照blobの存在・JSON解析・バイト数・SHA-256を照合。参照blobの不整合は0件。
|
|
38
|
+
- 完了済みA・B・Dのmanifest内のイベント数・blob数・イベントSHA-256を照合。すべて一致。
|
|
39
|
+
- 完了済みA・B・Dの物理blobはすべて参照され、物理blobのSHA-256も一致。`redactions.json` は3件ともJSONとして解析できた。任意の秘密情報を完全に除去できているかは未監査。
|
|
40
|
+
- ツールのcall/resultとモデルのrequest/responseをIDで照合。固定範囲では孤立したツール結果はなく、Eの最後のモデルrequestだけが応答待ち。未完了ログのため破損とは扱わない。
|
|
41
|
+
|
|
42
|
+
A・B・Dの `recording_complete=true` は記録処理の完了を示し、作業成功を示さない。Bには `payload_limit` によるモデルrequest本文の省略が20件ある。`missing_events=0` と「本文をすべて保持した」は別条件である。
|
|
43
|
+
|
|
44
|
+
## 1. エラー詳細が記録の途中で失われる【確定・優先度高】
|
|
45
|
+
|
|
46
|
+
Bの09:37:38〜09:37:57 JSTでは、`kiokuko-infron-c979e6cb / deepseek/deepseek-v4.1-flash:free` に6回リクエストし、毎回 `stop_reason=error`、空の `blocks` で終了している。5回のretryの後に `native_turn_failed` となった。入力・出力tokenはログ上0だが、これだけでサーバー未到達や無課金とは判断できない。
|
|
47
|
+
|
|
48
|
+
根拠: [B seq=3](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:4)、seq=8/13/18/23/28、[B seq=31](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:32)。
|
|
49
|
+
|
|
50
|
+
現行ソースに、詳細を落とす経路が3か所ある。
|
|
51
|
+
|
|
52
|
+
1. streamのfinishから `failure.code` を読むものの、記録するのは2種類のメモリ関連コードだけ。通常のproviderエラーのcode/message/statusをmodel.responseへ持ち越していない。[src/dsh/agenticreplay-recorder.ts:289](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-recorder.ts:289)、[src/dsh/agenticreplay-recorder.ts:378](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-recorder.ts:378)。
|
|
53
|
+
2. `agent/error` のフックはbindingだけを `nativeFailure` に渡し、元のerrorを渡していない。生成されるerrorイベントは固定の `native_turn_failed` のみ。[src/dsh/agenticreplay-hooks.ts:28](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-hooks.ts:28)、[src/dsh/agenticreplay-recorder.ts:476](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-recorder.ts:476)。
|
|
54
|
+
3. ハーネス本体は `diagnostic` を作成・保存するが、AgenticReplayの `harnessAction` はaction/phase/step等だけを転記し、diagnosticを除外する。[src/dsh/harness/factory.ts:27](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/harness/factory.ts:27)、[src/dsh/harness/factory.ts:94](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/harness/factory.ts:94)、[src/dsh/agenticreplay-recorder.ts:224](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-recorder.ts:224)。
|
|
55
|
+
|
|
56
|
+
Bの2回目のターン失敗は10:09:44 JST。直前の `coding_workflow_apply` は `is_error=false`、状態readyで返っており、その後にstep=59のturn errorがある。単に「直前のツールが失敗した」とは説明できない。[B seq=761](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:762)、[B seq=764](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:765)。
|
|
57
|
+
|
|
58
|
+
**判断:** 診断情報が失われる実装は確認できた。元の通信失敗・停止を引き起こした原因は未確定。記録不足と、元の不具合を区別する必要がある。
|
|
59
|
+
|
|
60
|
+
**修正候補:** 失敗時に安全なcode/status/requestIdと、長さ制限・秘匿処理を通したmessageを引き継ぐ。生の認証情報やHTTP本文の丸ごと保存は不要。通常のprovider拒否・stream例外・ツール成功後のagent例外で、元の診断が最終ログまで残ることを受け入れ条件にする。
|
|
61
|
+
|
|
62
|
+
## 2. 修正済みソースと当時のインストール版が一致していない【記録上確定】
|
|
63
|
+
|
|
64
|
+
Bでは作業リポジトリが0.2.43である一方、Webプロファイル内のpackageは0.2.41で、ハーネスの例外処理に汎用の `KIOKUKO_HARNESS_ERROR` が残っていた。この版の例外経路なら、ユーザー向け表示が「Kiokuko execution failed...」だけになる。ただしBを記録したプロセスのロード済みファイルidentityまでは、この検査結果だけでは証明できない。根拠: [B seq=42](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:43)、[B seq=204](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:205)。
|
|
65
|
+
|
|
66
|
+
同じログの後半には、インストール版0.2.44、旧sentinel件数0、rejection reason helperあり、という再確認結果もある。したがって、古い版が**現在も**インストールされているとは断定できない。ディスク上の更新確認と、既存プロセスの再起動・実行中コードの切替も別である。根拠: [B seq=1283](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl:1284)。
|
|
67
|
+
|
|
68
|
+
OpenCode adapterでHTTP拒否理由を捨てていた問題は、B内の回帰テストでも確認されている。期待する理由文がなく `HTTP 400` だけになる失敗がseq=998/1032にあり、現行ソースには理由の抽出・秘匿・上限処理がある。[src/dsh/models/vendor/opencode-adapter.ts:212](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/models/vendor/opencode-adapter.ts:212)。
|
|
69
|
+
|
|
70
|
+
ただし、そのテストの「image input非対応」は合成fixtureの値であり、B冒頭の実障害原因ではない。Bには別の画像・payloadサイズ・reasoning設定のprobeがHTTP 200になった結果もある(seq=576/586/602)。これらも元の6回と同一リクエストではないため、元の失敗を再現・解消した証拠にはしない。
|
|
71
|
+
|
|
72
|
+
## 3. 保存済みInfron/Nousモデルの推論強度が一覧へ届かない【過去の欠落を確認・修正進行中】
|
|
73
|
+
|
|
74
|
+
Cのseq=491/583では、保存済みモデルを再読込した後の推論強度一覧が、期待する `off/low/high/max` ではなく `undefined` になっている。InfronとNousの両方で失敗した。根拠: [C seq=491](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59/events.jsonl:492)、[C seq=583](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59/events.jsonl:584)。
|
|
75
|
+
|
|
76
|
+
HEAD版の `start()` は保存設定をそのまま公開し、古い行に不足する能力情報を補完していなかった。また `ModelsAdapter.listModels()` は所有モデルの保存行をそのまま返し、adapterが解決する `reasoning.efforts` へ変換していなかった。保存契約の `reasoningEfforts`、profileの `thinkingLevelMap`、UI側が読む `reasoning.efforts` は別の表現である。
|
|
77
|
+
|
|
78
|
+
調査時の既存変更には、保存済みInfron/Nous行のカタログ補完と、一覧で `resolveModel()` を通す処理がある。[src/dsh/models/service.ts:130](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/models/service.ts:130)、[src/dsh/models/service.ts:287](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/models/service.ts:287)、[src/dsh/models/service.ts:377](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/models/service.ts:377)、[src/dsh/models/profiles.ts:237](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/models/profiles.ts:237)。
|
|
79
|
+
|
|
80
|
+
Cのseq=685の `Models service stopped` はその途中のテスト実行で発生した別の失敗であり、元のUI症状の原因と同一視しない。調査中にもprofilesとテストが更新され、最終の限定テスト実行ではこの系統を含め89件すべて通過した。これは本調査による修正成果ではなく、並行変更を含む観測結果である。
|
|
81
|
+
|
|
82
|
+
**残る確認:** 古い保存設定を持つ実ユーザーが通常起動し、モデルを選び、推論強度を切り替えたときのUI・実際の送信・再起動後の保持。今回のテストはローカルfixtureによるもので、稼働環境の受け入れ確認ではない。
|
|
83
|
+
|
|
84
|
+
## 4. 完了基準IDの取り違えと継続入力の不一致【確定範囲と仮説を分離】
|
|
85
|
+
|
|
86
|
+
### 完了基準ID: 直接原因を特定
|
|
87
|
+
|
|
88
|
+
Aは `c-adopt` / `c-wire`、Cは `gateway-regression` をそのまま `task_completion.bind` に渡して失敗した。実際のcompletion側IDは `coding:<workflowId>:<criterionId>` である。
|
|
89
|
+
|
|
90
|
+
Aのstatus(seq=1001)が完全なIDを返した後、seq=1011/1017ではbindが成功している。Cもseq=443の失敗後、seq=453で成功した。これは基準そのものの消失を証明するものではなく、**2つのAPIのID表現を混同した呼出し**で説明できる。根拠: [A seq=985](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003456-kiokuko-dsh-infron-api-cannot-pick-thinking-reasoning-level-please-fix-it-084d215cb10d4aa5ef61db26/events.jsonl:986)、[A seq=1001](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003456-kiokuko-dsh-infron-api-cannot-pick-thinking-reasoning-level-please-fix-it-084d215cb10d4aa5ef61db26/events.jsonl:1002)、[A seq=1011](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003456-kiokuko-dsh-infron-api-cannot-pick-thinking-reasoning-level-please-fix-it-084d215cb10d4aa5ef61db26/events.jsonl:1012)、[C seq=443](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59/events.jsonl:444)、[C seq=453](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59/events.jsonl:454)。ソース: [src/dsh/task-completion.ts:192](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/task-completion.ts:192)、[src/dsh/task-completion-host.ts:57](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/task-completion-host.ts:57)。
|
|
91
|
+
|
|
92
|
+
### 継続入力: 拒否は確認、具体的な不一致フィールドは未確定
|
|
93
|
+
|
|
94
|
+
Bのseq=852/872で `dsh continued turn was reused with different bound input` が2回返っている。2回目は `evidenceRefs` にmessage参照を追加しているが、記録にはcached fingerprintや比較対象のnative object identityがない。
|
|
95
|
+
|
|
96
|
+
現行コードは同じ継続turnのfingerprint・nativeAgent・nativeSessionを比較し、不一致を拒否する。特定の未解決bindingだけを解消する例外経路もある。[src/dsh/host-adapter/admission.ts:756](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter/admission.ts:756)。
|
|
97
|
+
|
|
98
|
+
**仮説:** 継続中にrequest/context/evidence等が変わったか、native identityが変わった。どの比較で拒否されたかまでは確定できない。検証条件を弱める修正ではなく、比較項目ごとの差分理由と、同じ入力の再送・正当な継続の区別を観測できる診断が必要。
|
|
99
|
+
|
|
100
|
+
Lisp経路指定、prototype結果の確認前実行、Goal未定義、完了後の実行、Goal ID変更もログにある。これらは制御条件による拒否であり、すべてを製品クラッシュに分類しない。BのGoal ID変更拒否は `goalId` が安定したidentityであるという現行契約と一致する。
|
|
101
|
+
|
|
102
|
+
## 5. 追加提示されたtoolExposure等のログ
|
|
103
|
+
|
|
104
|
+
追加ログには日時・session IDがないため、A〜Eの特定イベントとの同一性は確認できない。以下は提示文と現行コードの照合結果である。
|
|
105
|
+
|
|
106
|
+
| ログ | 発生条件・意味 | 原因調査上の判断 |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| `auto:pre_step_missing_turn` | 入力claimにもcurrent recordにもturnがない | pre-stepの関連付けが未成立。コードはnative workerの経路へ返る。この警告自体はthrowしない |
|
|
109
|
+
| `auto:unbound:turn_record_missing` | `currentSession()` のrecordがない | ツール構成を変更せず返す。初期状態か、記録の紐付け不備かはこの1行では分からない |
|
|
110
|
+
| `auto:unbound:session_failed` | 既存recordの `failed` がtrue | `agent/error` の通知でtrueになるため、先行エラーの結果。警告を根本原因として扱わない |
|
|
111
|
+
| `registration_provenance_unavailable` | 外部・非所有ツールの削減理由欄に設定される固定値 | 動的なpackage登録失敗の検出結果ではない |
|
|
112
|
+
| `Session ID check: 503/503 ... 0 repaired, 0 failed` | セッションID検査で修復・失敗が0 | この検査の範囲では正常。モデル通信や全履歴の正常性を保証しない |
|
|
113
|
+
| DeepSeekのmodel listingが2件、skip 0 | 両経路でモデル一覧を読み込めた | 一覧取得の成功。生成リクエストの成功や推論強度対応は別 |
|
|
114
|
+
|
|
115
|
+
呼び出し順は `agent/error → item.failed=true → toolExposureがsession_failedを検出 → 元のtoolsを維持`。根拠: [src/dsh/host-adapter/session-observation.ts:108](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter/session-observation.ts:108)、[src/dsh/host-adapter/routing.ts:150](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter/routing.ts:150)、[src/dsh/host-adapter/routing.ts:229](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter/routing.ts:229)。
|
|
116
|
+
|
|
117
|
+
`pre_step_missing_turn` の根拠: [src/dsh/host-adapter/routing.ts:264](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter/routing.ts:264)。外部ツールの削減理由の固定値: [src/dsh/tool-exposure.ts:84](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/tool-exposure.ts:84)。ID検査の集計: [src/dsh/session-history-compatibility.ts:244](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/session-history-compatibility.ts:244)。
|
|
118
|
+
|
|
119
|
+
提示された3件のlean projectionは、すべて説明文1件を417バイト短縮している。82→82、82→82、80→80でツール数は不変、引数定義のバイト数も不変、task/phaseによる削除も0件。**この3行から「必要なツールが削られて失敗した」とは言えない**。80と82の差は別の入力surfaceの差であり、各projectionの削減ではない。
|
|
120
|
+
|
|
121
|
+
現在の警告出力はモードと理由だけで、session/run/turn/call IDを出していない。また理由ごとに重複出力を抑止する。別セッションが並行している場合、コンソール上の隣接行だけで因果関係を結ぶのは危険。[src/dsh/host-adapter.ts:469](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/host-adapter.ts:469)。
|
|
122
|
+
|
|
123
|
+
## 6. 記録の制限と、追加障害ではないもの
|
|
124
|
+
|
|
125
|
+
- Bのrequest本文省略20件は `payload_limit` と明示されている(seq=1423〜1632)。この範囲の完全な入力内容・秘密情報除去前の内容・HTTP送信を復元できない。
|
|
126
|
+
- A/Bのrequestには1 MiB超のblobがそれぞれ36/65イベントある。既定のshow上限やexport上限では閲覧・出力を拒否し得る。A/Bは既定8 MiB export入力上限も超える。これは制限と実データの差であり、保存データの破損を意味しない。[src/dsh/agenticreplay-files.ts:68](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-files.ts:68)、[src/dsh/agenticreplay-files.ts:116](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-files.ts:116)。
|
|
127
|
+
- `native_is_error=false` でも非ゼロ終了コードを基に `is_error=true` へ補正した結果が11件ある。失敗フラグの差は記録の誤りとは限らない。[src/dsh/agenticreplay-event-mapper.ts:135](/Users/dkc/Sites/Src/kiokuko-dsh/src/dsh/agenticreplay-event-mapper.ts:135)。
|
|
128
|
+
- B seq=84は検索コマンドの終了コード1、seq=612は `/tmp` からのES module依存解決失敗。これらを利用者のprovider障害と混同しない。
|
|
129
|
+
- AのUIテストはseq=1185で失敗し、その後seq=1273で成功している。開発中のRed/Greenを、未修正の障害件数へ単純加算しない。
|
|
130
|
+
- 元のログにはDSH 0.2.2-alpha.3 / Node v26.12.1が記録されているが、すべてのイベントにkiokuko-dshのcommitやロード済みpackage identityがあるわけではない。現行ソースの読み取りだけでは当時の全実装を証明できない。
|
|
131
|
+
|
|
132
|
+
## 検証結果と対応順
|
|
133
|
+
|
|
134
|
+
| 確認 | 結果 | 制約 |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| 固定範囲4,781イベントの構造・参照・hash検査 | 合格 | 未完了2runの最終manifest整合性は未検証 |
|
|
137
|
+
| `node scripts/run-tests.mjs tests/dsh/unit/opencode-stream-lifecycle.test.ts tests/dsh/unit/kiokuko-models-service.test.ts` | 89件成功、失敗/skip 0 | 16:13:34 JST開始。関連5ファイルの実行前後SHA-256一致。ローカル合成transportで検証 |
|
|
138
|
+
| `node scripts/run-tests.mjs tests/dsh/unit/tool-exposure.test.ts` | 38件成功、失敗/skip 0 | projectionの既存単体テスト。追加ログそのものの実セッション再現ではない |
|
|
139
|
+
| 実サービス再現、稼働中プロセス確認、全体verify、remote CI | 未実施 | 調査範囲を越える公開・インストール・実API再送は行っていない |
|
|
140
|
+
|
|
141
|
+
最初の限定テストはsandboxのlocalhost listen制限で失敗した。許可された環境での再実行中には、並行変更途中のoff送信形式の不一致が2件あった。その後、関連ソースの実行前後hashを固定して上記89件の成功を確認した。途中結果を最終版の不具合として残さない。
|
|
142
|
+
|
|
143
|
+
対応の優先順位:
|
|
144
|
+
|
|
145
|
+
1. **エラー詳細の記録経路を補う。** これが元の通信失敗と、ツール成功後の停止を区別する前提になる。
|
|
146
|
+
2. **実行中のpackage identityと元エラーを同じsession/turnで照合する。** 過去のディスク更新を現在のロード済みコードの証拠にしない。
|
|
147
|
+
3. **並行修正中のモデル能力伝達を通常のWeb利用経路で受け入れ確認する。** ローカル89件成功だけで稼働解消を宣言しない。
|
|
148
|
+
4. **継続binding・completion ID・toolExposureの診断を具体化する。** identity検査を緩めるのではなく、呼出し側が正しい次の操作を選べる情報を返す。
|
|
149
|
+
|
|
150
|
+
## 根拠ファイルと取得時点
|
|
151
|
+
|
|
152
|
+
イベント番号は0起点の `seq`。JSONLの行番号は `seq+1`。本文がblob参照の場合は、イベントの `$blob` が内容を一意に指定する。
|
|
153
|
+
|
|
154
|
+
- **A**: [20261104003456-kiokuko-dsh-infron-api-cannot-pick-thinking-reasoning-level-please-fix-it-084d215cb10d4aa5ef61db26](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003456-kiokuko-dsh-infron-api-cannot-pick-thinking-reasoning-level-please-fix-it-084d215cb10d4aa5ef61db26/events.jsonl)
|
|
155
|
+
最終取得イベント時刻: `2026-11-04T06:53:26.000Z`(UTC) / events SHA-256: `c0d5842decc8e829d6d2ec126981dc12b198008a5effdcf9e7c1ec955e6613cb`
|
|
156
|
+
- **B**: [20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104003738-kiokuko-dsh-please-fix-this-konotanhashibaishimashitakiokuko-execution-failed-inspect-the-re-fcbbfb4169971d07cd1a3cef/events.jsonl)
|
|
157
|
+
最終取得イベント時刻: `2026-11-04T06:53:25.993Z`(UTC) / events SHA-256: `ccbda6fdc68277e2d15b698e77a5b56970e36835787aef641c1e4f851ad4de61`
|
|
158
|
+
- **C**: [20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104065920-kiokuko-dsh-session-c9a67481283045a1a79b7e59/events.jsonl)
|
|
159
|
+
最終取得イベント時刻: `2026-11-04T07:09:43.412Z`(UTC) / events SHA-256: `5137f2b2d0e704e2923b45da3275b5ca5b77a56f77176a75ad19b1e4708c3dc0`
|
|
160
|
+
- **D**: [20261104070125-kiokuko-dsh-read-only-investigation-in-users-dkc-sites-src-kiokuko-dsh-user-wants-infron-and-408764c7882abae195a63f26](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104070125-kiokuko-dsh-read-only-investigation-in-users-dkc-sites-src-kiokuko-dsh-user-wants-infron-and-408764c7882abae195a63f26/events.jsonl)
|
|
161
|
+
最終取得イベント時刻: `2026-11-04T07:04:48.650Z`(UTC) / events SHA-256: `213d23f32fff2cf19e1ca69e65deeafa6aa1600d675a127ff5f7d761d3112530`
|
|
162
|
+
- **E**: [20261104070902-kiokuko-dsh-session-96c9377e3f14debd31d650a8](/Users/dkc/Sites/Src/kiokuko-dsh/.agenticreplay/runs/20261104070902-kiokuko-dsh-session-96c9377e3f14debd31d650a8/events.jsonl)
|
|
163
|
+
最終取得イベント時刻: `2026-11-04T07:09:54.381Z`(UTC) / events SHA-256: `03d08a70e83ff11b16ce58f318376b895abf43a029a59133ae1206e1952e23e5`
|
|
164
|
+
|
|
165
|
+
調査開始時の既存変更はserviceとテストの2ファイル。調査中にprofiles、owned-execution、そのintegrationテスト、Lisp efficiencyテストにも変更が現れた。後者の無関係な変更は検査対象に含めず保全した。本レポート以外の変更は本調査では作成していない。ログ・設定・資格情報・DBの修正、commit、push、インストールは行っていない。
|
|
166
|
+
|
|
167
|
+
限定テスト成功時の関連ソースSHA-256(実行前後で一致):
|
|
168
|
+
|
|
169
|
+
| ファイル | SHA-256 |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `src/dsh/models/service.ts` | `c113768dba16e0e47d511e8d0248134dda32966bc5f67c9a020bd2dfcce3eb69` |
|
|
172
|
+
| `src/dsh/models/profiles.ts` | `0827cf7e459ccb27c05945dbbae3035caad4a0ae8587feab909b41f3f62d37b6` |
|
|
173
|
+
| `tests/dsh/unit/kiokuko-models-service.test.ts` | `b06cacba77f7f810fa10bf8d2f607220363110b9081a612f46c2084e56946d1d` |
|
|
174
|
+
| `src/dsh/models/vendor/opencode-adapter.ts` | `5195215dd5cc3578754acdc901621f203998b5ff54882d7f2c1c65e5414205fa` |
|
|
175
|
+
| `tests/dsh/unit/opencode-stream-lifecycle.test.ts` | `1833d9361ba3636b239086909b81298c27dbe278c3741ce58f6d783b0cefdf12` |
|
|
176
|
+
|
|
177
|
+
## 追補:修正と検証(2026-11-04)
|
|
178
|
+
|
|
179
|
+
上記は調査時点の記録である。以下は、その後の5項目の修正依頼に対する結果。既存・並行作業の差分は保持し、コミット・公開・稼働中プロファイルの更新は行っていない。DSH本体については、ユーザーの追加指示「今回は修正案までにする」に従った。
|
|
180
|
+
|
|
181
|
+
### 1. エラー詳細の欠落
|
|
182
|
+
|
|
183
|
+
`agenticreplay-hooks.ts`、`agenticreplay-recorder.ts`、`harness/factory.ts`を修正した。モデルのerror/aborted finish、stream例外、agent/error、harness-actionの各経路で、診断コード・HTTP status・provider request ID・再試行待ち時間・秘匿化した説明を保持する。modelCallId、session ID、turn、step、native sequenceで関連イベントを照合できる。例外は元の実行経路へそのまま返し、観測処理のために実行結果を置き換えない。
|
|
184
|
+
|
|
185
|
+
診断は明示的なフィールドに限定し、説明は最大2,000文字。metadataモードでは説明を記録しない。認証情報、スタック、任意のcause、HTTP body/headerを丸ごと保存しない。既に欠落した過去ログの詳細は復元できない。
|
|
186
|
+
|
|
187
|
+
### 2. 指定の更新コマンドと配布物
|
|
188
|
+
|
|
189
|
+
実際のpnpm 12.16.1と一時プロファイルで、`file:old.tgz`依存に対する`update kiokuko-dsh --latest`が成功終了しても、0.0.1のまま残ることを再現した。localhostの模擬レジストリが0.0.2を返す条件でも同じであった。提案する`add kiokuko-dsh@latest`への変換では0.0.2へ移行し、依存指定もレジストリ形式になる。
|
|
190
|
+
|
|
191
|
+
[DSH本体への修正案](patches/dsh-latest-local-update.patch)は、単一のインストール済みfile/link依存を明示的に`update/up/upgrade ... --latest`する場合だけレジストリ最新版へ変換する。通常のレジストリ依存、未インストール、Git固定、`--latest`なし、追加オプションのある形式は変更しない。対象の公式DSHリビジョン`8bd073392eef6f54e921a093b95076248eb08cbb`に対する`git apply --check`は通過した。**DSH本体への適用、DSH本体のテスト実行・配布は行っていない。修正案のpnpm引数の実行確認と、DSH全体での受け入れ確認は区別する。**
|
|
192
|
+
|
|
193
|
+
kiokuko-dshには`dist/build-info.json`の生成を追加した。起動ログ、toolExposure診断、AgenticReplayのrun.startに、ロード時点のpluginVersion・buildId・sourceCommit・Node版を記録する。buildIdは配布されるdistファイルの内容から生成する。sourceCommitはベースコミットであり、未コミット差分を含むビルドの完全な同一性はbuildIdで確認する。ソース実行や旧配布物で取得できない値はnullで示す。
|
|
194
|
+
|
|
195
|
+
現在のソースは未公開である。また、DSH修正案も未適用のため、**提示された4コマンドだけで今回の修正が導入される状態になったとは報告しない**。
|
|
196
|
+
|
|
197
|
+
### 3. 保存済みInfron/Nousの推論強度
|
|
198
|
+
|
|
199
|
+
既存の修正を保持し、保存済み設定の起動時復元、一覧表示、明示的な無効化・独自レベルの維持、high/offの実送信形式を確認した。モデル再取得は`save()`の共通補完を経由しており、Nousも補完される。Infronだけだった再取得の回帰テストをNousにも拡張した。実サービスへの認証付きリクエストは行わず、通信形式はlocalhostの模擬APIで検証した。
|
|
200
|
+
|
|
201
|
+
### 4. 完了基準IDと継続入力
|
|
202
|
+
|
|
203
|
+
完了基準は、現在のcoding workflow内の短いcriterionIdを正式な`coding:<workflowId>:<criterionId>`へ解決する。別workflowの名前空間付きIDは書き換えず拒否し、修正方法を構造化したエラーで返す。短いIDと正式IDで同じcallIdを再送しても、一つのbindingとして扱い、再承認しない。bindingだけで検証済みにする処理は追加していない。
|
|
204
|
+
|
|
205
|
+
継続入力では、同一native turn内の追加ユーザー入力を実際のDSHループで再現した。旧入力のキャッシュを使い続けると`dsh continued turn was reused with different bound input`が発生した。現在のtask leaseと出所に結び付いた判断を確認した後で旧キャッシュを失効させ、新しい入力のbindingを保持するよう修正した。公開プラグイン/アダプター両経路で同じrunを継続でき、別owner・別repository・古いrevision/generation・停止状態の拒否も維持される。
|
|
206
|
+
|
|
207
|
+
### 5. toolExposure等の診断
|
|
208
|
+
|
|
209
|
+
警告・投影ログにschema、時刻、diagnosticId、agent/session/run ID、論理turn・native turn・step・native sequence、prepare generation、intake/selection/policy状態、closed/failed、取得可能な直前の失敗診断、ロードされた版・ビルドIDを追加した。従来のツール数・説明量・削減できなかった理由は保持した。同じ理由が別sessionで起きた場合も記録され、重複抑制の保持数は512件に制限する。
|
|
210
|
+
|
|
211
|
+
Session ID検査にはscanId、時刻、所要時間、失敗一覧の省略件数、ロード版を付け、個別失敗を同じscanIdで照合できるようにした。providerプラグイン由来のDeepSeekモデル一覧取得ログはこのリポジトリの出力ではないため変更していない。toolExposureはコンソール診断であり、全コンソール出力をAgenticReplayへ自動転記する変更ではない。
|
|
212
|
+
|
|
213
|
+
### 検証範囲
|
|
214
|
+
|
|
215
|
+
検証には公式DSH `8bd073392eef6f54e921a093b95076248eb08cbb`/`0.2.2-alpha.3`、macOS arm64、Node 26.12.1を使用した。途中で開発依存とfixtureのDSH版が混在していたため、リポジトリ既定のstage処理で同一リビジョンに揃えた。混在時の`tools.restrict()`失敗と、修正対象の継続入力エラーを区別した。
|
|
216
|
+
|
|
217
|
+
| 検証 | 結果 | 証拠ログ |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| 記録、モデル設定、完了基準、継続入力、toolExposure、履歴、ハーネスの関連15ファイル | 334件成功、失敗0、skip 0 | `/tmp/kiokuko-five-final-tests.log` |
|
|
220
|
+
| 最終のエラー通知修正後、ハーネス・記録・native E2Eを再検証 | 29件成功、失敗0、skip 0(上記との重複あり) | `/tmp/kiokuko-five-harness-final.log` |
|
|
221
|
+
| `npm run typecheck` / `npm run build` | 成功 | `/tmp/kiokuko-five-delivery-typecheck.log`、`/tmp/kiokuko-five-delivery-build.log` |
|
|
222
|
+
| `node scripts/verify-agenticreplay-consumer.mjs --pnpm` | 空の利用環境へのインストール、7イベントの保存・読出し、診断とbuildIdの照合が成功 | `/tmp/kiokuko-five-delivery-consumer.log` |
|
|
223
|
+
| `node scripts/pack-check.mjs`(通常モード) | import、クライアント成果物、相対参照、同梱guardrailのnative smokeが成功 | `/tmp/kiokuko-five-delivery-standard-pack.log` |
|
|
224
|
+
| 同検査の公式DSH・Lisp有効モード | 成功。修正した判定入力テストを含む配布物のnative受け入れ検証も通過 | `/tmp/kiokuko-five-delivery-native-pack-green.log` |
|
|
225
|
+
| pnpmの更新再現と提案する引数の検証 | 現行updateは0.0.1のまま、提案addは0.0.2へ更新 | `/tmp/kiokuko-five-update-before.log`、`/tmp/kiokuko-five-update-proposed.log` |
|
|
226
|
+
| DSH修正案の`git apply --check` / `git diff --check` | 成功。DSH本体の対象ファイルは未変更 | 修正案:`docs/patches/dsh-latest-local-update.patch` |
|
|
227
|
+
|
|
228
|
+
334件の一括検証中は、対象ソース・スクリプト・テスト等1,154ファイルの実行前後のハッシュが一致した。その後のエラー通知の説明文を秘匿化する修正で型不整合を検出し、修正後に上記29件・型検査・ビルド・配布物の利用環境検証を実行した。失敗した中間版を最終成功の証拠にはしていない。
|
|
229
|
+
|
|
230
|
+
追加した配布物のnative検査では、Lisp提案テストの旧期待値「意図判定が合計1回」が失敗した。事前判定はqueued messageだけを持ち、実ターンではhostに結び付いたworkspaceが追加されるため、判定入力は異なる。テストを、2回の入力の差分がworkspaceだけであること、実ターンのworkspaceが実際の作業ディレクトリと一致すること、ユーザーへの確認は1回だけであることの検証に更新した。単独再検証(`/tmp/kiokuko-five-pack-isolated-green.log`)と配布物のnative検査の再実行は成功した。製品の判定や確認処理はこのテスト修正で変更していない。
|
|
231
|
+
|
|
232
|
+
最終の配布候補はversion `0.2.44`、buildId `e887c4ce64ac0c1e00a169985057311cc1f47a9f9e2a04c08e82d999654d3018`。これはローカルで作成・検証した配布候補の識別子であり、公開済みパッケージや現在動いているプロファイルの識別子ではない。
|
|
233
|
+
|
|
234
|
+
全リポジトリのfull検証・リモートCI・liveサービス・既存プロファイルの入れ替えは今回の確認に含めない。
|
package/docs/lisp.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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.
|
|
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. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation.
|
|
2
2
|
|
|
3
3
|
# Common Lisp tools
|
|
4
4
|
|
|
@@ -176,7 +176,7 @@ reload does not silently restore the direct shell route; recover Lisp or explici
|
|
|
176
176
|
use `/kioku-lisp disable`.
|
|
177
177
|
Existing DSH `read`, `glob`, `grep` and `skill` tools remain available under native
|
|
178
178
|
session permissions, so project files and applicable Skills can be inspected.
|
|
179
|
-
File changes can use owned native tools or Lisp proposals.
|
|
179
|
+
File changes can use owned native tools or Lisp proposals. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. For a coding task with a saved yes, recover Lisp or explicitly choose another task route before continuing implementation.
|
|
180
180
|
The protected agent uses native tool presentation even in a PTC deployment.
|
|
181
181
|
|
|
182
182
|
`sbclPath` can point to an explicit installed SBCL launcher. Its runtime files must
|
|
@@ -227,10 +227,10 @@ not the complete worker startup or the speed of an individual Lisp computation.
|
|
|
227
227
|
absolute paths are refused. The original attachment store stays inaccessible to
|
|
228
228
|
Lisp and its subprocesses. Limits: 64 MiB per file, 256 MiB per worker generation.
|
|
229
229
|
- Lisp/FFI runs inside OS isolation without workspace access or inherited credentials. Project file changes and external Python/shell commands cross the host tool boundary, which checks operation permissions and records the result.
|
|
230
|
-
- Project proposals freeze targets, preserve backups and reject duplicate targets.
|
|
231
|
-
-
|
|
232
|
-
File identities/content are
|
|
233
|
-
database files/sidecars, common credential paths and plugin/state data
|
|
230
|
+
- Project proposals freeze targets, preserve backups and reject duplicate targets. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. Generated/temp/disposable artifacts are routine development.
|
|
231
|
+
- Where approval is required, refusal, skip, timeout, cancellation or unavailable UI means no change.
|
|
232
|
+
File identities/content are rechecked before effects. Protected compatibility mode refuses links,
|
|
233
|
+
directories, database files/sidecars, common credential paths and plugin/state data.
|
|
234
234
|
- Backups are independent copies, never hard links. Their global reservation limit
|
|
235
235
|
is 1 GiB in this implementation; reaching it stops changes without pruning data.
|
|
236
236
|
- The host journal distinguishes success, failure, no change, in progress and
|
|
@@ -498,7 +498,7 @@ Native `ask_user_question` and `exit_plan_mode` remain available in both Lisp mo
|
|
|
498
498
|
<!-- kiokuko:runtime approval-policy -->
|
|
499
499
|
## Development approval policy
|
|
500
500
|
|
|
501
|
-
The legacy lisp.approvalMode ask/auto configuration and profile commands remain readable. Both authorize routine project edits, tests, helper registration and Kioku saving.
|
|
501
|
+
The legacy lisp.approvalMode ask/auto configuration and profile commands remain readable. Both authorize routine project edits, tests, helper registration and Kioku saving. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. A worker failure leaves normal tools available. Refusal, cancellation, changed targets and unknown outcomes cannot authorize effects.
|
|
502
502
|
|
|
503
503
|
Use kioku_read/write/edit/remove/exec/result for observed work. Host receipts distinguish actual process outcome, source-bound verification and saving status. Lisp/model passed fields are advisory. Saving can be retried without repeating development effects; after restart an interrupted process remains unknown. See [owned execution](owned-execution.md).
|
|
504
504
|
<!-- /kiokuko:runtime -->
|
package/docs/owned-execution.md
CHANGED
|
@@ -9,9 +9,10 @@ scope still apply.
|
|
|
9
9
|
|
|
10
10
|
Ordinary project reads, edits, builds, tests, PATH commands and investigation
|
|
11
11
|
needed for development require no additional confirmation. Bash/zsh inherit
|
|
12
|
-
the user's environment and may start child processes.
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
the user's environment and may start child processes. Working-project changes,
|
|
13
|
+
including source/data deletion, replacement and project DB updates, need no extra
|
|
14
|
+
confirmation. Canonical targets outside the project, including symlink escapes,
|
|
15
|
+
require concrete approval even in temporary directories. Declare
|
|
15
16
|
`destructiveTargets` for destructive commands: arbitrary shell/Lisp/FFI code
|
|
16
17
|
cannot be completely classified in advance. An unknown side effect does not
|
|
17
18
|
justify refusing execution or treating its result as verification.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
--- a/packages/boot/plugin-manager/src/operations.ts
|
|
2
|
+
+++ b/packages/boot/plugin-manager/src/operations.ts
|
|
3
|
+
@@ -151,2 +151,12 @@
|
|
4
|
+
+/** Explicit latest for one installed local package means its registry release.
|
|
5
|
+
+ * Keep registry, Git, missing packages and all other pnpm forms unchanged.
|
|
6
|
+
+ */
|
|
7
|
+
+export function latestRegistryUpdate(args: readonly string[], dependencies: Readonly<Record<string, string>>): readonly string[] {
|
|
8
|
+
+ if (!['update', 'up', 'upgrade'].includes(args[0] ?? '') || args.length !== 3 || !args.includes('--latest')) return args
|
|
9
|
+
+ const name = args[1] === '--latest' ? args[2] : args[1]
|
|
10
|
+
+ if (!name || !/^(?:@[a-z0-9._-]+\/)?[a-z0-9._-]+$/i.test(name) || !/^(?:file:|link:)/.test(dependencies[name] ?? '')) return args
|
|
11
|
+
+ return ['add', `${name}@latest`]
|
|
12
|
+
+}
|
|
13
|
+
+
|
|
14
|
+
/** Install commands that take the packages to install as positionals. */
|
|
15
|
+
const INSTALL_COMMANDS = new Set(['add', 'install', 'i'])
|
|
16
|
+
@@ -313,5 +323,6 @@
|
|
17
|
+
}
|
|
18
|
+
const before = readProfileManifest('dsh', dir)
|
|
19
|
+
const savedFiles = ['package.json', 'pnpm-lock.yaml'].map(name => ({ path: join(dir, name), text: optionalFile(join(dir, name)) }))
|
|
20
|
+
+ args = latestRegistryUpdate(args, before.dependencies ?? {})
|
|
21
|
+
const beforeDependencies = directDependencies(before)
|
|
22
|
+
const installedBefore = new Map(Object.keys(beforeDependencies).map(name => [name, optionalFile(join(dir, 'node_modules', name, 'package.json'))]))
|
|
23
|
+
--- /dev/null
|
|
24
|
+
+++ b/packages/boot/plugin-manager/tests/latest-local-update.spec.ts
|
|
25
|
+
@@ -0,0 +1,17 @@
|
|
26
|
+
+import { expect, it } from 'vitest'
|
|
27
|
+
+import { latestRegistryUpdate } from '../src/operations.ts'
|
|
28
|
+
+
|
|
29
|
+
+it('explicit latest replaces a local profile package with its registry release', () => {
|
|
30
|
+
+ for (const source of ['file:/tmp/kiokuko-dsh-old.tgz', 'link:../../../checkout']) {
|
|
31
|
+
+ expect(latestRegistryUpdate(['update', 'kiokuko-dsh', '--latest'], { 'kiokuko-dsh': source })).toEqual(['add', 'kiokuko-dsh@latest'])
|
|
32
|
+
+ }
|
|
33
|
+
+})
|
|
34
|
+
+it('preserves registry updates, missing packages and non-latest or Git-pinned intent', () => {
|
|
35
|
+
+ for (const source of [undefined, '^0.2.44', 'git+https://example.invalid/pkg#fixed']) {
|
|
36
|
+
+ const args = ['update', 'kiokuko-dsh', '--latest']
|
|
37
|
+
+ expect(latestRegistryUpdate(args, source ? { 'kiokuko-dsh': source } : {})).toBe(args)
|
|
38
|
+
+ }
|
|
39
|
+
+ for (const args of [['update', 'kiokuko-dsh'], ['update', '--latest'], ['update', 'kiokuko-dsh', '--latest', '--recursive']]) {
|
|
40
|
+
+ expect(latestRegistryUpdate(args, { 'kiokuko-dsh': 'file:old.tgz' })).toBe(args)
|
|
41
|
+
+ }
|
|
42
|
+
+})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiokuko-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "Kiokuko plugin for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
117
|
"permissions": {
|
|
118
|
-
"summary": "Kiokuko-owned local development execution, candidate memory and host receipts; normal user environment, PATH commands and child processes.
|
|
118
|
+
"summary": "Kiokuko-owned local development execution, candidate memory and host receipts; normal user environment, PATH commands and child processes. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation.",
|
|
119
119
|
"readPaths": [
|
|
120
120
|
"Configured Kiokuko SQLite database and embedding assets",
|
|
121
121
|
"Registered project roots and their repository metadata",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
"scripts": {
|
|
179
179
|
"clean:dist": "node --input-type=module --eval \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\"",
|
|
180
|
-
"build": "npm run clean:dist && tsc -p tsconfig.build.json && node scripts/build-model-transports.mjs && node scripts/compile-skill-prompts.mjs && node scripts/build-dsh-client.mjs && node scripts/build-history-codecs.mjs && node scripts/build-plugin-entry.mjs && node scripts/guardrail-artifacts.mjs --verify-bundled --quiet && node scripts/verify-micro-judge.mjs",
|
|
180
|
+
"build": "npm run clean:dist && tsc -p tsconfig.build.json && node scripts/build-model-transports.mjs && node scripts/compile-skill-prompts.mjs && node scripts/build-dsh-client.mjs && node scripts/build-history-codecs.mjs && node scripts/build-plugin-entry.mjs && node scripts/guardrail-artifacts.mjs --verify-bundled --quiet && node scripts/verify-micro-judge.mjs && node scripts/build-runtime-manifest.mjs",
|
|
181
181
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
182
182
|
"test": "node scripts/run-tests.mjs tests/dsh",
|
|
183
183
|
"test:harness": "node --import tsx scripts/run-harness-evaluation.mjs",
|
|
@@ -16,7 +16,7 @@ Coding: coding_workflow defines Goal/items/checks before the task Lisp choice. P
|
|
|
16
16
|
|
|
17
17
|
Persistent: coding choice or /kioku-lisp enable. /kioku-lisp enable-task optionally selects disposable scratch evaluations. lisp_define, lisp_call and lisp_observe need no task-mode switch or Working task. Compose functions by exact dependency refs; reuse only your own protected worker, otherwise compute in private protected scratch with no repository mount or host RPC. Schemas never prove arbitrary Lisp safe. A child inherits only capabilities visible in its native scope, not the parent's task lease, heap, or result refs. Shared publication and real effects retain their approval and authority checks. 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
|
-
Owned kioku_read/write/edit/remove/exec/result retain development receipts. Ordinary commands, investigation, builds/tests, edits and disposable artifacts need no routine confirmation.
|
|
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. Declare destructiveTargets for known command effects. Arbitrary code effects are not exhaustively classified. Organize memory only after completion and permission; save only the exact approved content.
|
|
20
20
|
|
|
21
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. All workers are OS-isolated; direct Lisp/FFI cannot access workspace files or inherited credentials. 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
|
|
|
@@ -60,10 +60,10 @@ identity/size/digest and read-only copies; other absolute paths fail. Limits: 64
|
|
|
60
60
|
256 MiB/generation. `kioku.files:input`: read; `kioku.files:scratch`: write/unzip. Reimport
|
|
61
61
|
applied files for comparison; export only when authorized. `kioku.files:propose-write`:
|
|
62
62
|
relative paths, successful evaluation, durable recording.
|
|
63
|
-
|
|
63
|
+
Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. Protected compatibility mode retains frozen targets and its protected-path restrictions. Duplicate targets fail;
|
|
64
64
|
unchanged writes do nothing. Refusal/skip/UI failure/cancellation never authorizes.
|
|
65
65
|
Trust APPLIED/UNCHANGED/NOT_APPLIED/UNKNOWN receipts; partial failure stops later writes.
|
|
66
|
-
Never retry unknown effects. Use owned tools for
|
|
66
|
+
Never retry unknown effects. Use owned tools for working-project files and project DB updates; protected compatibility mode refuses its protected paths/databases/links and recursive deletion. Independent backups never auto-prune. RUNNING lasts until
|
|
67
67
|
receipts save; restart repairs finalization without reapplying effects.
|
|
68
68
|
|
|
69
69
|
## Programs, verification and packages
|
|
@@ -185,7 +185,7 @@ Native tool schemas remain authoritative for exact arguments.
|
|
|
185
185
|
captured bytes in private scratch and runs an approved host verifier. Observe
|
|
186
186
|
all required files, including `package.json`; missing dependencies/scripts
|
|
187
187
|
fail or return NOT_APPLIED. `testStatus:unknown` is not a passing test.
|
|
188
|
-
- `lisp_apply`: `{operationId, candidateRef, verificationRef?}` uses owned execution in development mode
|
|
188
|
+
- `lisp_apply`: `{operationId, candidateRef, verificationRef?}` uses owned execution in development mode without extra approval for local changes; it rechecks the read set and frozen targets, and accepts only a successful
|
|
189
189
|
verification receipt for the same candidate. Without one, it reports `not-run`.
|
|
190
190
|
- `lisp_compare`: `{operationId, leftRef, rightRef}` compares saved bases and
|
|
191
191
|
operation/content hashes without executing either candidate.
|
|
@@ -349,11 +349,11 @@ shortlist order for selection; source and test for diagnosis. Define `obj` first
|
|
|
349
349
|
<!-- kiokuko:documentation approval-help -->
|
|
350
350
|
## Development approval policy
|
|
351
351
|
|
|
352
|
-
Project edits, verification, helper compilation/registration and ordinary Kioku storage are authorized.
|
|
352
|
+
Project edits, verification, helper compilation/registration and ordinary Kioku storage are authorized. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. Legacy lisp.approvalMode ask/auto does not add confirmation for local files. Old profile settings still load. Do not request conversational permission before a required host review. Refusal, cancellation, stale targets and uncertain outcomes remain authoritative; never replay effects.
|
|
353
353
|
|
|
354
354
|
<!-- /kiokuko:documentation -->
|
|
355
355
|
<!-- kiokuko:runtime approval-policy -->
|
|
356
|
-
Routine development and helper registration are authorized.
|
|
356
|
+
Routine development and helper registration are authorized. Lisp failure retains the selected shell route. Report execution, verification and saving separately; retry saving without replaying effects.
|
|
357
357
|
<!-- /kiokuko:runtime -->
|
|
358
358
|
|
|
359
359
|
|
|
@@ -8,16 +8,16 @@ description: Kiokuko's entry router for non-trivial DSH work. Read it before any
|
|
|
8
8
|
<!-- kiokuko:runtime contract -->
|
|
9
9
|
# SOUL router
|
|
10
10
|
|
|
11
|
-
Read first. Host owns intake
|
|
11
|
+
Read first. Host owns intake, identity, capabilities and routing; require ready/exhausted and permissive nextAction. Never invent a profile.
|
|
12
12
|
|
|
13
|
-
User instructions outrank Skills. Preserve identity
|
|
13
|
+
User instructions outrank Skills. Preserve identity, revisions, leases, Plan, cancellation and ownership. Optional enrichment never vetoes work. Clarify unclear intent or destructive effects; finish, verify and report blockers.
|
|
14
14
|
|
|
15
15
|
**本当に、それを全部計算・保存・検索する必要があるのか?**
|
|
16
16
|
Preserve results: eliminate needless computation/storage/search, narrow scope, then optimize. Justify exhaustive work. Never silently approximate/delete data or waive validation, recovery or audit. No extra approvals/artifacts.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Read relevant Skill indexes and risk-selected references; non-code needs no coding startup. Preserve roles, exclusions and recovery.
|
|
19
19
|
|
|
20
|
-
Use current model/memory/Skills and kioku_read/write/edit/remove/exec/result.
|
|
20
|
+
Use current model/memory/Skills and kioku_read/write/edit/remove/exec/result. Changes within the working project directory, including deletion, replacement and project DB updates, need no extra user permission. Outside-project changes require concrete confirmation. PATH/bash/zsh, Lisp and builds/tests remain authorized; native permissions and integrity checks still apply. Recover Lisp or explicitly change route. Pre-bind source/test/config checks; collect final background receipts. Receipts establish observations only; check recalled candidates against current sources. Report work, verification and memory saving separately. After completion, get permission to organize memory; show the exact proposal and save only its user-approved revision. Comments need new previews; decline saves nothing. Memory failure never blocks work. Reconcile uncertain approved saves with the original key; never replay work or invent save identities. Human implementation requests or Plan approval request exit at the next accepted boundary; plan-only answers stay in Plan.
|
|
21
21
|
|
|
22
22
|
Without Skills, use current evidence within host identity/authority/integrity; never substitute required Skills or auto-install/execute fetched ones. Claim no unread Skills or unrun checks. Check supported file types before diagnostics; manually check Markdown/unsupported documents for structure, requirements and whitespace. Unavailable diagnostics stay unverified. After each successful edit/write, re-read before the next mutation; reconcile stale content and never force overwrites. Never repeat unsupported diagnostics unchanged.
|
|
23
23
|
|