kiokuko-dsh 0.2.36 → 0.2.38

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 (131) hide show
  1. package/PERMISSIONS.md +11 -5
  2. package/README.ja.md +82 -26
  3. package/README.ko.md +80 -23
  4. package/README.md +82 -23
  5. package/README.zh-CN.md +80 -23
  6. package/dist/client.cjs +97 -5
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/dsh/answer-review/contracts.js +1 -1
  9. package/dist/dsh/answer-review/contracts.js.map +1 -1
  10. package/dist/dsh/completion-report.d.ts +29 -1
  11. package/dist/dsh/completion-report.d.ts.map +1 -1
  12. package/dist/dsh/completion-report.js +58 -14
  13. package/dist/dsh/completion-report.js.map +1 -1
  14. package/dist/dsh/config.d.ts +12 -0
  15. package/dist/dsh/config.d.ts.map +1 -1
  16. package/dist/dsh/config.js +3 -0
  17. package/dist/dsh/config.js.map +1 -1
  18. package/dist/dsh/core/host.d.ts +12 -0
  19. package/dist/dsh/core/host.d.ts.map +1 -1
  20. package/dist/dsh/core/host.js +4 -0
  21. package/dist/dsh/core/host.js.map +1 -1
  22. package/dist/dsh/core/index.d.ts +32 -0
  23. package/dist/dsh/core/index.d.ts.map +1 -1
  24. package/dist/dsh/decisions/host.d.ts.map +1 -1
  25. package/dist/dsh/decisions/host.js +5 -0
  26. package/dist/dsh/decisions/host.js.map +1 -1
  27. package/dist/dsh/decisions/intent-assessment.d.ts +15 -0
  28. package/dist/dsh/decisions/intent-assessment.d.ts.map +1 -1
  29. package/dist/dsh/decisions/intent-assessment.js +10 -0
  30. package/dist/dsh/decisions/intent-assessment.js.map +1 -1
  31. package/dist/dsh/decisions/service.d.ts +2 -0
  32. package/dist/dsh/decisions/service.d.ts.map +1 -1
  33. package/dist/dsh/decisions/service.js +9 -0
  34. package/dist/dsh/decisions/service.js.map +1 -1
  35. package/dist/dsh/guardrail/contracts.d.ts +1 -1
  36. package/dist/dsh/guardrail/contracts.d.ts.map +1 -1
  37. package/dist/dsh/guardrail/evidence.d.ts.map +1 -1
  38. package/dist/dsh/guardrail/evidence.js +4 -0
  39. package/dist/dsh/guardrail/evidence.js.map +1 -1
  40. package/dist/dsh/host-adapter.d.ts +2 -0
  41. package/dist/dsh/host-adapter.d.ts.map +1 -1
  42. package/dist/dsh/host-adapter.js +5 -1
  43. package/dist/dsh/host-adapter.js.map +1 -1
  44. package/dist/dsh/index.d.ts +10 -2
  45. package/dist/dsh/index.d.ts.map +1 -1
  46. package/dist/dsh/index.js +6 -3
  47. package/dist/dsh/index.js.map +1 -1
  48. package/dist/dsh/lisp/host-tool-dispatch.d.ts +2 -0
  49. package/dist/dsh/lisp/host-tool-dispatch.d.ts.map +1 -1
  50. package/dist/dsh/lisp/host-tool-dispatch.js +9 -1
  51. package/dist/dsh/lisp/host-tool-dispatch.js.map +1 -1
  52. package/dist/dsh/lisp/http.d.ts.map +1 -1
  53. package/dist/dsh/lisp/http.js +13 -1
  54. package/dist/dsh/lisp/http.js.map +1 -1
  55. package/dist/dsh/lisp/manager.d.ts +4 -0
  56. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  57. package/dist/dsh/lisp/manager.js +35 -9
  58. package/dist/dsh/lisp/manager.js.map +1 -1
  59. package/dist/dsh/lisp/native-stop-receipt.d.ts +25 -0
  60. package/dist/dsh/lisp/native-stop-receipt.d.ts.map +1 -0
  61. package/dist/dsh/lisp/native-stop-receipt.js +22 -0
  62. package/dist/dsh/lisp/native-stop-receipt.js.map +1 -0
  63. package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
  64. package/dist/dsh/lisp/proposal-batch.js +2 -1
  65. package/dist/dsh/lisp/proposal-batch.js.map +1 -1
  66. package/dist/dsh/lisp/status-text.d.ts +34 -0
  67. package/dist/dsh/lisp/status-text.d.ts.map +1 -0
  68. package/dist/dsh/lisp/status-text.js +65 -0
  69. package/dist/dsh/lisp/status-text.js.map +1 -0
  70. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  71. package/dist/dsh/lisp/surface.js +44 -10
  72. package/dist/dsh/lisp/surface.js.map +1 -1
  73. package/dist/dsh/live-config.d.ts +49 -0
  74. package/dist/dsh/live-config.d.ts.map +1 -0
  75. package/dist/dsh/live-config.js +77 -0
  76. package/dist/dsh/live-config.js.map +1 -0
  77. package/dist/dsh/managed-file-deployment.d.ts +6 -0
  78. package/dist/dsh/managed-file-deployment.d.ts.map +1 -1
  79. package/dist/dsh/managed-file-deployment.js +17 -1
  80. package/dist/dsh/managed-file-deployment.js.map +1 -1
  81. package/dist/dsh/managed-operation-journal.d.ts +5 -1
  82. package/dist/dsh/managed-operation-journal.d.ts.map +1 -1
  83. package/dist/dsh/managed-operation-journal.js +17 -4
  84. package/dist/dsh/managed-operation-journal.js.map +1 -1
  85. package/dist/dsh/on-demand-intake.d.ts +2 -0
  86. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  87. package/dist/dsh/on-demand-intake.js +22 -3
  88. package/dist/dsh/on-demand-intake.js.map +1 -1
  89. package/dist/dsh/setup.d.ts +22 -0
  90. package/dist/dsh/setup.d.ts.map +1 -1
  91. package/dist/dsh/setup.js +57 -5
  92. package/dist/dsh/setup.js.map +1 -1
  93. package/dist/dsh/standard-skill-deployment.d.ts +12 -1
  94. package/dist/dsh/standard-skill-deployment.d.ts.map +1 -1
  95. package/dist/dsh/standard-skill-deployment.js +76 -4
  96. package/dist/dsh/standard-skill-deployment.js.map +1 -1
  97. package/dist/dsh/startup-defaults-settings.d.ts +20 -0
  98. package/dist/dsh/startup-defaults-settings.d.ts.map +1 -0
  99. package/dist/dsh/startup-defaults-settings.js +27 -0
  100. package/dist/dsh/startup-defaults-settings.js.map +1 -0
  101. package/dist/dsh/startup-defaults.d.ts +41 -0
  102. package/dist/dsh/startup-defaults.d.ts.map +1 -0
  103. package/dist/dsh/startup-defaults.js +29 -0
  104. package/dist/dsh/startup-defaults.js.map +1 -0
  105. package/dist/dsh/task-startup.d.ts +3 -0
  106. package/dist/dsh/task-startup.d.ts.map +1 -1
  107. package/dist/dsh/task-startup.js +22 -7
  108. package/dist/dsh/task-startup.js.map +1 -1
  109. package/dist/enno-oduno/verifier.d.ts.map +1 -1
  110. package/dist/enno-oduno/verifier.js +5 -1
  111. package/dist/enno-oduno/verifier.js.map +1 -1
  112. package/dist/locale/en.json +1 -1
  113. package/dist/locale/ja.json +1 -1
  114. package/dist/locale/ko.json +1 -1
  115. package/dist/locale/zh-CN.json +1 -1
  116. package/docs/README.ja.md +2 -0
  117. package/docs/README.md +2 -0
  118. package/docs/answer-review.md +8 -0
  119. package/docs/dsh-plugin.md +42 -14
  120. package/docs/getting-started.ja.md +2 -0
  121. package/docs/getting-started.md +2 -0
  122. package/docs/lisp.md +45 -4
  123. package/docs/model-selection.ja.md +2 -2
  124. package/docs/model-selection.md +2 -2
  125. package/docs/store-evidence.md +6 -0
  126. package/docs/typed-decisions.md +88 -7
  127. package/docs/typesafe.md +8 -3
  128. package/docs/verification.md +28 -3
  129. package/package.json +4 -3
  130. package/scripts/prepare-build.mjs +13 -0
  131. package/scripts/setup-dsh.mjs +8 -3
package/PERMISSIONS.md CHANGED
@@ -39,8 +39,10 @@ Skill collisions before mounting its runtime; it does not rewrite `AGENTS.md`.
39
39
  the startup directory’s `AGENTS.md` with the DSH host-owned contract. Preserves
40
40
  instructions outside the markers; absent or unmanaged files stay untouched.
41
41
  Refuses linked files or ambiguous markers. The bundled `scripts/setup-dsh.mjs`
42
- provides the same repair for an explicit workspace and a read-only `--check`.
43
- It does not scan parent/global instruction files or other session workspaces.
42
+ provides the same repair for an explicit workspace, a read-only `--check`, and
43
+ explicit `--remove` retirement of byte-identical deployed files and its managed
44
+ block. It does not scan parent/global instruction files or other session
45
+ workspaces.
44
46
  - On plugin load, enumerates stored DSH session IDs and validates each history.
45
47
  When DSH rejects a v3 history containing legacy Kiokuko informational
46
48
  events, reads that exact native session file and marks the five supported
@@ -131,13 +133,17 @@ Skill collisions before mounting its runtime; it does not rewrite `AGENTS.md`.
131
133
 
132
134
  ## Installation lifecycle
133
135
 
134
- The only npm lifecycle hook is:
136
+ The source-install preparation hook is:
135
137
 
136
138
  ```text
137
- prepare = npm run build
139
+ prepare = node scripts/prepare-build.mjs
138
140
  ```
139
141
 
140
- It builds the package from the fixed source checkout. It does not modify a DSH
142
+ It normally runs the invoking package manager's `run build` from the source
143
+ checkout. Only an explicit `CI=true` plus `KIOKUKO_CI_DEFER_PREPARE=1` defers
144
+ this package's duplicate prepare build to the selected verifier's required clean
145
+ build. Dependency lifecycle scripts still run; source/build digests and tested
146
+ archive receipts remain required. It does not modify a DSH
141
147
  profile, contact an external service, or edit user configuration. A Git source
142
148
  install must pin a full commit and authorize the exact generated archive key
143
149
  with pnpm `allowBuilds`; the npm tarball already contains `dist/`.
package/README.ja.md CHANGED
@@ -125,12 +125,40 @@ DSH 更新後に Kiokuko を読み込めない場合は、[起動失敗時の復
125
125
 
126
126
  既定の開発モードでは Bubblewrap は不要です。Linux で明示的に保護互換モードを選ぶ場合に必要です。
127
127
  「使う」は Lisp、「使わない」は通常ツール、「取消・作業を保持」は準備内容を残して取消です。閉じる・未回答では実装を始めません。通常実行/役小角の選択は別に保持します。Lisp の起動失敗はブロッカーとして残し、復旧または明示的な経路変更後に再開します。
128
+
129
+ Lisp を毎回選び直す必要はありません。`startupDefaults.lisp` を設定すると、作業開始カードがその回答を選んだ状態で表示され、その場で変更もできます。[作業開始時の既定値](#startup-defaults)を参照してください。
128
130
  選択後の通常の編集・テストには追加確認を求めません。ソース・実データの削除と既存の永続DB変更は対象を確認します。各項目の最新の証拠と、通常の利用入口からの最終確認が揃った場合だけ完了します。[Goal 駆動コーディング](docs/coding-workflow.md)と[独自実行、レシート、記憶の再利用](docs/owned-execution.md)を参照してください。
129
131
  [設定、API、停止・復旧方法](docs/lisp.md)を参照してください。
130
132
 
131
- ## 型付き判定(Jev / Laya / Nimble)
133
+ <a id="startup-defaults"></a>
134
+ ## Lisp と判定の既定値
135
+
136
+ 通常の作業では、型付き判定を使うか Lisp を使うかを一度だけ確認し、その依頼のあいだ選択を保持します。設定 → 一般 → **Kiokuko の作業開始時の既定値** を指定すると、このカードが最初から選んだ状態で表示され、いつもの選択から作業を始められます。
137
+
138
+ | 設定 | 値 | 動作 |
139
+ |---|---|---|
140
+ | `startupDefaults.decision` | `ask`(既定)、`on`、`off` | 型付き判定を使うかを先に選び、質問UIがない場合はその値で決定します |
141
+ | `startupDefaults.lisp` | `ask`(既定)、`on`、`off` | Lisp を実行経路にするかを先に選びます |
142
+ | `typedDecisions.provider` | `typesafe`(既定)、`openai`、`nimble`、`laya-coreml` | 新しい依頼で使う判定provider |
143
+
144
+ `ask` はカードを未選択のままにし、これまでの動作を変えません。既定値は、もともと提示している回答のどれかを先に選ぶだけで、実行権限を増やしたり、無効なモジュールを有効にしたり、Lispの起動・承認・Stopの確認を省いたりはしません。カードは表示され、もう一方の選択肢も残ります。その場で選んだ回答は、その依頼では既定値より優先します。
145
+
146
+ ```yaml
147
+ - id: kiokuko-dsh
148
+ config:
149
+ startupDefaults:
150
+ decision: on
151
+ lisp: on
152
+ typedDecisions:
153
+ provider: openai
154
+ ```
155
+
156
+ provider の既定値は、そのプロジェクトに `/kioku-decisions use` の選択が保存されていない場合に使います。明示した選択はそのまま優先し、既定値で上書きしません。`use default` で設定値に戻ります。Nimble の endpoint と model のように設定が不足しているproviderは、別のbackendへ切り替えず、これまでどおり利用不可として扱います。
157
+
158
+ 質問サービスがないヘッドレス環境では、`ask` は従来どおり既存設定と手動のセッション選択に従い、`on`/`off` はその回答を明示します。
159
+ ## 型付き判定(Jev / Laya / OpenAI / Nimble)
132
160
 
133
- 任意の[モデル自動選択](docs/model-selection.ja.md#通常実行のモデル自動選択)は、新しい通常タスクで検証済みの `openai-codex` モデルと推論強度を選びます。既定値は `modelAutoMode.mode: off` です。`/kioku-model-auto on | observe | off | status` は現在のセッションだけを変更します。`observe` は候補を計測し、実モデルは変えません。利用にはJevかLayaの準備完了、dsh-codex、DSHのモデル情報とtoken meterが必要です。判定不能なら現在のモデルを維持し、手動選択を優先します。
161
+ 任意の[モデル自動選択](docs/model-selection.ja.md#通常実行のモデル自動選択)は、新しい通常タスクで検証済みの `openai-codex` モデルと推論強度を選びます。既定値は `modelAutoMode.mode: off` です。`/kioku-model-auto on | observe | off | status` は現在のセッションだけを変更します。`observe` は候補を計測し、実モデルは変えません。利用にはJev・Laya・OpenAIのいずれかの準備完了、dsh-codex、DSHのモデル情報とtoken meterが必要です。判定不能なら現在のモデルを維持し、手動選択を優先します。
134
162
 
135
163
  [回答の再検討](docs/answer-review.md)は、表示済みの通常回答を評価し、指摘があれば同じ主モデルに一度だけ見直させる機能です。通常版・modular coreで既定で有効です。既定値は次のとおりです。
136
164
 
@@ -140,46 +168,74 @@ answerReview:
140
168
  budgetMs: 5000
141
169
  ```
142
170
 
143
- 無効にする場合は `answerReview.mode: off` を指定します。評価providerは `typedDecisions` のJev/Laya/Nimbleを継承します。選択したproviderが利用できない場合は評価をスキップし、元の回答で終了します。別providerへの自動切替はありません。最初の回答はそのまま表示され、評価の追加推論と、最大1回の主モデルによる再検討が発生します。Laya v1はworker内部の切り詰めを確認できないため、指摘は未確認の候補として扱います。`/kioku-decisions status` で進行状態・スキップ理由を確認できます。正しさを保証する機能ではありません。
171
+ 無効にする場合は `answerReview.mode: off` を指定します。評価providerは `typedDecisions` のJev/Laya/OpenAI/Nimbleを継承します。選択したproviderが利用できない場合は評価をスキップし、元の回答で終了します。別providerへの自動切替はありません。最初の回答はそのまま表示され、評価の追加推論と、最大1回の主モデルによる再検討が発生します。Laya v1はworker内部の切り詰めを確認できないため、指摘は未確認の候補として扱います。`/kioku-decisions status` で進行状態・スキップ理由を確認できます。正しさを保証する機能ではありません。
144
172
 
145
173
 
146
- Jevが既定です。DSHのコマンド入力欄で切り替えられます。設定編集や再起動は不要です。
174
+ 通常の作業開始時に、decision/Lisp の4通りのON/OFFを一つのカードで選べます。取消・Skipでは開始しません。選択は依頼に保存し、同じ依頼の再処理・再起動・明示的な「続けて」では再利用します。別の依頼では確認し直します。LispがONでも既存の権限・承認・Stopは維持します。ヘッドレスでは既存設定と明示的なLispセッション設定を保ち、`typedDecisions.startup: {decision: true, lisp: true}` でも明示できます。ONは利用成功の証明ではなく、認証不足や判断失敗は記録して主モデルへ戻します。
147
175
 
148
- ```text
149
- /kioku-decisions use jev
150
- /kioku-decisions use laya
151
- /kioku-decisions use openai
152
- /kioku-decisions use nimble
153
- /kioku-decisions use default
154
- ```
176
+ <a id="openai-decisions-setup"></a>
177
+ ### OpenAI Decisions の設定
155
178
 
156
- Layaは`start-laya`で起動済みのworkerへ直接接続します。workerの差し替えやfingerprint設定は不要です。JevにはTypeSafeキー、Nimbleには接続先・モデルの事前設定が必要です。probeが成功してから選択をプロジェクト単位で保存し、次のリクエストへ適用します。再起動後も保持し、進行中のリクエストは変更しません。`use default`でプラグイン設定へ戻せます。
179
+ 既定はJevで、OpenAI・ローカルのLaya・Nimbleも選べます。OpenAIは公式 [Decisions API](https://developers.openai.com/api/docs/guides/decisions) の `POST /v1/decisions` を使い、このソースの既定判定モデルは `gpt-6-luna` です。主モデルの認証とは別です。ChatGPT/CodexのOAuthログインから `OPENAI_API_KEY` は供給されず、TypeSafe/Jevのキーも代用できません。
157
180
 
158
- OpenAIは公式 Decisions API (`POST /v1/decisions`、既定モデル `gpt-6-luna`) を使います。DSH credentials の `OPENAI_API_KEY`、credentialsサービスがない構成では同名環境変数が必要です。Jevのキーは使いません。切替時のprobeはAPI呼出しを伴い、失敗・取消時は切替を保存しません。
181
+ 以下は現行ソースの手順で、公開済みnpmの `latest` にOpenAI対応が含まれることを示すものではありません。`use openai` がない場合は、まず導入済みbuildのコマンド対応を確認してください。
159
182
 
160
- 通常の作業開始時に、decision/Lisp の4通りのON/OFFを一つのカードで選べます。取消・Skipでは開始しません。選択は依頼に保存し、同じ依頼の再処理・再起動・明示的な「続けて」では再利用します。別の依頼では確認し直します。LispがONでも既存の権限・承認・Stopは維持します。ヘッドレスでは既存設定と明示的なLispセッション設定を保ち、`typedDecisions.startup: {decision: true, lisp: true}` でも明示できます。ONは利用成功の証明ではなく、認証不足や判断失敗は記録して主モデルへ戻します。
183
+ 1. OpenAI APIプロジェクトのAPIキーを作り、稼働中DSHが使う保存先へ追加します。標準の `credentials-local` では次のように決まります。
161
184
 
162
- APIキーは DSH の `~/.dsh/.credentials.yaml`(`DSH_HOME` を設定している場合は `$DSH_HOME/.credentials.yaml`)に書くか、`/kioku-typesafe-key YOUR_KEY` で保存します。既存の項目は残してください。
185
+ | 設定 | credentialsファイル |
186
+ |---|---|
187
+ | 既定のharness home | `~/.dsh/.credentials.yaml` |
188
+ | `DSH_HOME` を指定 | `$DSH_HOME/.credentials.yaml` |
189
+ | `credentials.path` を明示(providerの `config.path`) | homeの既定値より優先される指定先 |
163
190
 
164
- ```yaml
165
- version: 1
166
- refs:
167
- TYPESAFE_API_KEY: YOUR_KEY
191
+ `--profile web` のパッケージ・patchは `$DSH_HOME/profiles/web` にありますが、指定だけでcredentialsの保存先は移動しません。profileで `credentials.path` を変えた場合や、launcherが別の `DSH_HOME` を使う場合は、その実際の保存先を編集します。`profiles/web/.credentials.yaml` と推測しないでください。
192
+
193
+ 2. 既存ファイルでは `refs` に `OPENAI_API_KEY` だけを追加し、ほかの `refs` と `records` はすべて残します。次は無効な例示キーを使った**新規ファイル用の最小例**です。
194
+
195
+ ```yaml
196
+ version: 1
197
+ refs:
198
+ OPENAI_API_KEY: "OPENAI_API_KEY_EXAMPLE_ONLY"
199
+ records: {}
200
+ ```
201
+
202
+ 例示値を手元で実際のキーへ置き換えます。macOS/Linuxでは実際の保存先を権限600にします。既定パスの場合:
203
+
204
+ ```sh
205
+ chmod 600 "$HOME/.dsh/.credentials.yaml"
206
+ ```
207
+
208
+ 保存先を変更している場合はコマンドのパスも変更します。既定の `watch: true` なら、有効なファイル編集は自動再読され、次の要求から使われます。DSH再起動は不要です。キーを会話・スクリーンショット・Gitへ貼らないでください。
209
+
210
+ 3. DSHのコマンド入力欄で切り替え、状態を確認します。
211
+
212
+ ```text
213
+ /kioku-decisions use openai
214
+ /kioku-decisions status
215
+ ```
216
+
217
+ `use openai` のprobeは実API呼出しで、利用料金が発生する場合があります。probeと保存の成功後だけ、このプロジェクトの新しい要求へ選択を保存します。失敗・取消時は元の選択を保持し、進行中の要求のbindingも変えません。`status` は推論を呼びません。任意の `/kioku-decisions probe` は追加の実probeを行います。
218
+
219
+ 標準providerの優先順位は **保存ファイル > 起動時環境変数 > projectの `.env` > harness homeの `.env`** です。credentialsサービスがある構成でも、保存値で上書きされていなければ環境変数を使えます。環境変数だけで設定する場合は、同じシェルからDSHを起動する**前**に設定します。
220
+
221
+ ```sh
222
+ export OPENAI_API_KEY='OPENAI_API_KEY_EXAMPLE_ONLY'
168
223
  ```
169
224
 
170
- YAMLファイルを手動で作る場合は `chmod 600 ~/.dsh/.credentials.yaml` を実行してください(`DSH_HOME` を設定している場合はそのパスを使用)。
225
+ この値は使用できない例示値です。DSH起動後に別シェルでexportしても起動時snapshotは変わりません。稼働中の更新にはwatch対象のファイルを使います。キーを書いた `.env` もGitへ追加しないでください。
171
226
 
172
- DSHのコマンド入力欄で利用可能な状態を確認します。
227
+ ほかの選択肢も維持しています。
173
228
 
174
229
  ```text
175
- /kioku-typesafe-key status
176
- /kioku-decisions probe
177
- /kioku-decisions status
230
+ /kioku-decisions use jev
231
+ /kioku-decisions use laya
232
+ /kioku-decisions use nimble
233
+ /kioku-decisions use default
178
234
  ```
179
235
 
180
- `probe` は検査用のAPIリクエストを送ります。`status` は送信しません。保存したキーは `/kioku-typesafe-key clear` で削除できます。`/kioku-typesafe-key YOUR_KEY` の入力中はキーが画面に表示されます。詳しくは[型付き判定](docs/typed-decisions.md)と[Lispからの明示的な呼び出し](docs/typesafe.md)を参照してください。
236
+ Jevは `TYPESAFE_API_KEY` を使います。`/kioku-typesafe-key` が管理するのはこのキーだけで、OpenAIのキーは保存しません。Layaは `start-laya` で起動済みのworkerへ `~/Library/Caches/laya-coreml/worker.sock` のv1 `health`/`predict` で接続します。`install-laya` はworkerを再利用するか導入手順を案内します。Nimbleは接続先とモデルの事前設定が必要です。`use default` はプラグイン設定に戻します。
181
237
 
182
- Jevが既定です。Nimbleとローカルの[Laya-CoreML](docs/Laya-CoreML-ja.md)も選べます。Layaは`~/Library/Caches/laya-coreml/worker.sock`へ直接接続し、既存のv1 `health`/`predict`を使います。`/kioku-decisions install-laya`でも起動済みworkerを利用でき、接続できなければ導入手順を案内します。
238
+ 詳しくは[優先順位・設定・トラブル対処](docs/typed-decisions.md#openai-credentials)、[公式credentials仕様](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials-local/README.md)、[TypeSafeのLisp API](docs/typesafe.md)を参照してください。
183
239
 
184
240
  英語を含め、どの言語でも `aac6fef/laya-multilingual-coreml` を使います。入力上限は質問・選択肢・判定対象を合わせて1,024 tokensで、`-ane` 版は96 tokensのみです。[開発元のモデル仕様](https://github.com/mizorewww/laya-coreml#available-checkpoints)を参照してください。[初期導入](docs/Laya-CoreML-ja.md)を済ませてから、次のコマンドを実行します。起動中のLaya workerがあれば停止してから新しいモデルで起動してください。`LAYA_MODEL` の指定は、既存workerスクリプトの古い既定値も上書きします。
185
241
 
package/README.ko.md CHANGED
@@ -13,7 +13,7 @@ DSH 표준 agent preset은 `subagent`와 `subagent_fork`를 제공합니다. 일
13
13
 
14
14
  새 변경 작업에서는 일반 실행 또는 役小角(enno-oduno)를 선택할 수 있습니다. 역할별 모델은 추천 템플릿이나 DSH에 설정된 모델에서 선택합니다. [모델 선택과 연결 제한](docs/model-selection.md).
15
15
 
16
- 선택 기능인 [자동 모델 선택](docs/model-selection.md#automatic-model-selection)은 기본적으로 꺼져 있습니다(`modelAutoMode.mode: off`). `/kioku-model-auto on | observe | off | status`는 현재 세션만 바꿉니다. `observe`는 제안만 기록하고 실제 모델은 유지합니다. 일반 작업에서 준비된 Jev 또는 Laya, dsh-codex, DSH 모델 메타데이터와 token meter가 필요합니다. 판정에 실패하면 현재 모델을 유지하고 수동 선택을 우선합니다.
16
+ 선택 기능인 [자동 모델 선택](docs/model-selection.md#automatic-model-selection)은 기본적으로 꺼져 있습니다(`modelAutoMode.mode: off`). `/kioku-model-auto on | observe | off | status`는 현재 세션만 바꿉니다. `observe`는 제안만 기록하고 실제 모델은 유지합니다. 일반 작업에서 준비된 Jev, Laya 또는 OpenAI, dsh-codex, DSH 모델 메타데이터와 token meter가 필요합니다. 판정에 실패하면 현재 모델을 유지하고 수동 선택을 우선합니다.
17
17
 
18
18
  메모리는 선택 기능입니다. 작업이 끝나면 Kiokuko가 기록된 경험을 정리할지 묻고 임시 미리보기를 보여 주며, 사용자가 승인한 정확한 수정본만 저장합니다. 자동 메모리 쓰기는 더 이상 사용하지 않습니다. [검토, 회상 및 잊기](docs/replay-memory-review.md).
19
19
 
@@ -115,11 +115,11 @@ DSH 업데이트 후 Kiokuko를 불러오지 못하면 [시작 오류 복구 절
115
115
 
116
116
  [문서](docs/README.md) · [권한](PERMISSIONS.md) · [MIT 라이선스](LICENSE)
117
117
 
118
- ## 타입 기반 판정(Jev / Laya / Nimble)
118
+ ## 타입 기반 판정(Jev / Laya / OpenAI / Nimble)
119
119
 
120
- 선택 기능인 [자동 모델 선택](docs/model-selection.md#automatic-model-selection)은 새 일반 작업에 사용할 검증된 `openai-codex` 모델과 추론 강도를 선택합니다. 기본값은 `modelAutoMode.mode: off`이며, `/kioku-model-auto on | observe | off | status`는 현재 세션만 변경합니다. `observe`는 제안을 평가하지만 모델은 변경하지 않습니다. 준비된 Jev 또는 Laya 백엔드, dsh-codex, 기본 모델 메타데이터와 token meter가 필요합니다. 분류에 실패하거나 사용할 수 없으면 현재 모델을 유지하며, 수동 모델 선택을 우선합니다.
120
+ 선택 기능인 [자동 모델 선택](docs/model-selection.md#automatic-model-selection)은 새 일반 작업에 사용할 검증된 `openai-codex` 모델과 추론 강도를 선택합니다. 기본값은 `modelAutoMode.mode: off`이며, `/kioku-model-auto on | observe | off | status`는 현재 세션만 변경합니다. `observe`는 제안을 평가하지만 모델은 변경하지 않습니다. 준비된 Jev, Laya 또는 OpenAI 백엔드, dsh-codex, 기본 모델 메타데이터와 token meter가 필요합니다. 분류에 실패하거나 사용할 수 없으면 현재 모델을 유지하며, 수동 모델 선택을 우선합니다.
121
121
 
122
- [답변 검토](docs/answer-review.md)는 전체 플러그인과 모듈형 코어에서 기본으로 활성화됩니다. 설정된 Jev, Laya 또는 Nimble provider로 이미 표시된 일반 답변을 평가하고, 같은 주 모델에 한 번 재검토를 요청할 수 있습니다. 기본 설정은 다음과 같습니다.
122
+ [답변 검토](docs/answer-review.md)는 전체 플러그인과 모듈형 코어에서 기본으로 활성화됩니다. 설정된 Jev, Laya, OpenAI 또는 Nimble provider로 이미 표시된 일반 답변을 평가하고, 같은 주 모델에 한 번 재검토를 요청할 수 있습니다. 기본 설정은 다음과 같습니다.
123
123
 
124
124
  ```yaml
125
125
  answerReview:
@@ -129,38 +129,95 @@ answerReview:
129
129
 
130
130
  끄려면 `answerReview.mode: off`를 설정하세요. `typedDecisions` 설정을 이어받으며, 평가 추론과 최대 한 턴의 주 모델 호출이 추가되지만 첫 답변을 지연시키지는 않습니다. 선택한 provider를 사용할 수 없으면 검토를 건너뛰고 원래 답변을 유지하며, 다른 provider로 대체하지 않습니다. Laya v1의 결과는 worker 내부의 잘림을 확인할 수 없어 검증되지 않은 제안으로 취급합니다. `/kioku-decisions status`는 진행 상황과 건너뛴 이유를 보여 줄 뿐, 정확성을 보증하지 않습니다.
131
131
 
132
- 기본값은 Jev입니다. 설정 파일을 수정하거나 DSH를 다시 시작하지 않고 DSH 명령 입력란에서 전환할 수 있습니다.
132
+ <a id="startup-defaults"></a>
133
+ ## Lisp 및 판정 기본값
133
134
 
134
- ```text
135
- /kioku-decisions use jev
136
- /kioku-decisions use laya
137
- /kioku-decisions use nimble
138
- /kioku-decisions use default
139
- ```
135
+ 일반 작업을 시작할 때 형식화된 판정과 Lisp 사용 여부를 한 번 묻고 그 요청 동안 선택을 유지합니다. 설정 → 일반 → **Kiokuko 작업 시작 시 기본값** 을 지정하면 이 카드가 미리 선택된 상태로 표시되어, 평소 선택으로 작업을 시작할 수 있습니다.
140
136
 
141
- Laya는 `start-laya`로 시작한 기존 worker에 직접 연결하므로 worker 교체나 fingerprint 설정이 필요하지 않습니다. Jev에는 TypeSafe 키가 필요하고, Nimble은 엔드포인트와 모델을 먼저 설정해야 합니다. 연결 검사가 성공하면 선택을 프로젝트별로 저장하고 새 요청에 적용합니다. 재시작 후에도 유지되며 진행 중인 요청의 provider 연결은 바뀌지 않습니다. `use default`는 플러그인 설정으로 되돌립니다.
137
+ | 설정 | 값 | 동작 |
138
+ |---|---|---|
139
+ | `startupDefaults.decision` | `ask`(기본), `on`, `off` | 형식화된 판정 사용 여부를 미리 선택하고, 질문 UI가 없으면 그 값으로 결정합니다 |
140
+ | `startupDefaults.lisp` | `ask`(기본), `on`, `off` | Lisp를 실행 경로로 쓸지 미리 선택합니다 |
141
+ | `typedDecisions.provider` | `typesafe`(기본), `openai`, `nimble`, `laya-coreml` | 새 요청에 사용할 판정 provider |
142
142
 
143
- DSH의 `~/.dsh/.credentials.yaml`(`DSH_HOME`을 설정했다면 `$DSH_HOME/.credentials.yaml`)에 API 키를 설정하거나 `/kioku-typesafe-key YOUR_KEY`를 사용하세요. 기존 항목은 유지하세요.
143
+ `ask`는 카드를 미선택 상태로 두고 이전 동작을 유지합니다. 기본값은 이미 제시된 답변 하나를 미리 고를 뿐이며, 실행 권한을 늘리거나 비활성 모듈을 켜거나 Lisp의 시작·승인·Stop 검사를 생략하지 않습니다. 카드는 계속 표시되고 다른 선택지도 남으며, 그 자리에서 고른 답변이 해당 요청에서 기본값보다 우선합니다.
144
144
 
145
145
  ```yaml
146
- version: 1
147
- refs:
148
- TYPESAFE_API_KEY: YOUR_KEY
146
+ - id: kiokuko-dsh
147
+ config:
148
+ startupDefaults:
149
+ decision: on
150
+ lisp: on
151
+ typedDecisions:
152
+ provider: openai
149
153
  ```
150
154
 
151
- YAML 파일을 직접 만들었다면 `chmod 600 ~/.dsh/.credentials.yaml`을 실행하세요(`DSH_HOME`을 설정했다면 해당 경로 사용).
155
+ provider 기본값은 해당 프로젝트에 `/kioku-decisions use` 선택이 저장되지 않은 경우에만 적용됩니다. 명시적인 선택은 그대로 우선하며 기본값이 덮어쓰지 않습니다. `use default` 는 설정값으로 돌아갑니다. Nimble에 endpoint와 model이 없는 경우처럼 설정이 불완전한 provider는 다른 backend로 대체하지 않고 사용할 수 없는 상태로 남습니다.
156
+
157
+ 질문 서비스가 없는 헤드리스 환경에서 `ask` 는 기존 설정과 수동 세션 선택을 따르고, `on`/`off` 는 그 답변을 명시합니다.
158
+ <a id="openai-decisions-setup"></a>
159
+ ### OpenAI Decisions 설정
160
+
161
+ 기본값은 Jev이며 OpenAI, 로컬 Laya, Nimble도 선택할 수 있습니다. OpenAI는 공식 [Decisions API](https://developers.openai.com/api/docs/guides/decisions)의 `POST /v1/decisions`를 사용하며, 이 소스의 기본 판정 모델은 `gpt-6-luna`입니다. 주 채팅 모델의 인증과는 별개입니다. ChatGPT/Codex OAuth 로그인은 `OPENAI_API_KEY`를 제공하지 않으며 TypeSafe/Jev 키로 대체할 수도 없습니다.
162
+
163
+ 아래 내용은 현재 소스를 기준으로 하며, 공개된 npm `latest`에 OpenAI 지원이 이미 포함되었다는 뜻은 아닙니다. `use openai`가 없다면 먼저 설치된 build의 명령 지원을 확인하세요.
164
+
165
+ 1. OpenAI API 프로젝트의 API 키를 만들고 실행 중인 DSH의 저장소에 추가하세요. 표준 `credentials-local`에서는 다음 경로를 사용합니다.
166
+
167
+ | 설정 | 자격 증명 파일 |
168
+ |---|---|
169
+ | 기본 harness home | `~/.dsh/.credentials.yaml` |
170
+ | 사용자 지정 `DSH_HOME` | `$DSH_HOME/.credentials.yaml` |
171
+ | 명시적인 `credentials.path` (provider의 `config.path`) | home 기본값보다 우선하는 지정 경로 |
172
+
173
+ `--profile web`의 패키지와 patch는 `$DSH_HOME/profiles/web`에 있지만, 이 옵션만으로 자격 증명 경로가 바뀌지는 않습니다. profile의 `credentials.path`나 launcher의 `DSH_HOME`이 다르면 실제 경로를 사용하세요. `profiles/web/.credentials.yaml`로 추측하지 마세요.
174
+
175
+ 2. 기존 파일에서는 `refs` 아래에 `OPENAI_API_KEY`만 추가하고 나머지 `refs`와 `records`를 모두 유지하세요. 다음은 실제로 작동하지 않는 예시 키를 넣은 **새 파일용 최소 예제**입니다.
176
+
177
+ ```yaml
178
+ version: 1
179
+ refs:
180
+ OPENAI_API_KEY: "OPENAI_API_KEY_EXAMPLE_ONLY"
181
+ records: {}
182
+ ```
183
+
184
+ 예시 값은 본인의 환경에서 실제 키로 바꾸세요. macOS/Linux에서는 실제 파일의 권한을 600으로 설정하세요. 기본 경로라면:
152
185
 
153
- DSH 명령 UI에서 키를 확인하고 연결을 검사하세요.
186
+ ```sh
187
+ chmod 600 "$HOME/.dsh/.credentials.yaml"
188
+ ```
189
+
190
+ 경로를 변경했다면 명령에도 해당 경로를 사용하세요. 기본 `watch: true`는 유효한 파일 수정을 자동으로 다시 읽어 다음 요청부터 사용하므로 DSH 재시작이 필요 없습니다. 키를 대화, 스크린샷 또는 Git에 올리지 마세요.
191
+
192
+ 3. DSH 명령 입력란에서 OpenAI로 전환하고 결과를 확인하세요.
193
+
194
+ ```text
195
+ /kioku-decisions use openai
196
+ /kioku-decisions status
197
+ ```
198
+
199
+ `use openai`의 probe는 실제 API 호출이며 사용 요금이 발생할 수 있습니다. probe와 저장이 성공해야 프로젝트의 새 요청에 선택이 저장됩니다. 실패하거나 취소하면 이전 선택을 유지하며 진행 중인 요청의 binding은 바꾸지 않습니다. `status`는 추론을 호출하지 않습니다. 선택 사항인 `/kioku-decisions probe`는 실제 probe를 한 번 더 보냅니다.
200
+
201
+ 표준 provider의 우선순위는 **저장 파일 > 시작 시 환경 변수 > 프로젝트 `.env` > harness home `.env`**입니다. credentials 서비스가 있어도 저장 값이 우선하지 않는 경우 환경 변수를 사용할 수 있습니다. 환경 변수만 사용하려면 같은 셸에서 DSH를 시작하기 **전에** 설정하세요.
202
+
203
+ ```sh
204
+ export OPENAI_API_KEY='OPENAI_API_KEY_EXAMPLE_ONLY'
205
+ ```
206
+
207
+ 이 값은 사용할 수 없는 예시입니다. DSH 시작 후 다른 셸에서 export해도 시작 시 snapshot은 갱신되지 않습니다. 실행 중인 인스턴스에는 watch 대상 파일을 수정하세요. 키가 들어 있는 `.env`도 Git에 추가하지 마세요.
208
+
209
+ 다른 선택도 계속 사용할 수 있습니다.
154
210
 
155
211
  ```text
156
- /kioku-typesafe-key status
157
- /kioku-decisions probe
158
- /kioku-decisions status
212
+ /kioku-decisions use jev
213
+ /kioku-decisions use laya
214
+ /kioku-decisions use nimble
215
+ /kioku-decisions use default
159
216
  ```
160
217
 
161
- `probe`는 합성 API 테스트 요청을 보내지만 `status`는 보내지 않습니다. `/kioku-typesafe-key clear`는 저장된 키를 삭제합니다. `/kioku-typesafe-key YOUR_KEY`를 사용할 때 입력한 키가 화면에 표시됩니다. 자세한 내용은 [타입 기반 판정](docs/typed-decisions.md)과 [명시적 Lisp API](docs/typesafe.md)를 참고하세요.
218
+ Jev는 `TYPESAFE_API_KEY`를 사용합니다. `/kioku-typesafe-key`는 이 키만 관리하며 OpenAI 키를 저장하지 않습니다. Laya는 `start-laya`로 실행한 기존 worker에 `~/Library/Caches/laya-coreml/worker.sock`의 v1 `health`/`predict`로 연결합니다. `install-laya`는 worker를 재사용하거나 설치 방법을 안내합니다. Nimble은 엔드포인트와 모델을 미리 설정해야 합니다. `use default`는 플러그인 설정으로 되돌립니다.
162
219
 
163
- Jev가 기본값이며 Nimble과 로컬 [Laya-CoreML](docs/laya-coreml.md)을 대안으로 선택할 수 있습니다. Laya는 기존 v1 `health`/`predict` 프로토콜로 `~/Library/Caches/laya-coreml/worker.sock`에 직접 연결합니다. `/kioku-decisions install-laya`는 실행 중인 worker를 재사용하거나 설정 안내를 표시합니다.
220
+ [우선순위·설정·문제 해결](docs/typed-decisions.md#openai-credentials), [공식 자격 증명 저장소 문서](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials-local/README.md), [TypeSafe Lisp API](docs/typesafe.md)를 참고하세요.
164
221
 
165
222
  영어 및 다른 언어에는 `aac6fef/laya-multilingual-coreml`을 사용하세요. 1,024-token 입력 한도에는 질문, 선택지, 상태가 모두 포함되며, `-ane` 변형은 96 tokens만 허용합니다. [원본 모델 사양](https://github.com/mizorewww/laya-coreml#available-checkpoints)을 참고하세요. [초기 설정](docs/Laya-CoreML-ja.md)을 마친 뒤 아래 명령을 사용하세요. 실행 중인 Laya worker를 종료한 후 새 모델로 시작해야 합니다. `LAYA_MODEL`은 기존 worker 스크립트의 이전 기본값도 덮어씁니다.
166
223
 
package/README.md CHANGED
@@ -126,14 +126,42 @@ Check it with `dsh --profile <profile> --dump-config`, using the same profile na
126
126
 
127
127
  The default development mode does not require Bubblewrap. The explicit protected compatibility mode does on Linux.
128
128
  Choose “使う” to use Lisp, “使わない” to use ordinary tools, or “取消・作業を保持” to cancel while preserving prepared work. Closing the question leaves implementation pending. Lisp choice and normal/Enno selection are separate. A failed Lisp startup remains a recoverable blocker until the selected route works or you explicitly change it.
129
+
130
+ A Lisp default does not have to be chosen again for every task. Set `startupDefaults.lisp` to preselect it; the task card then marks that answer and still lets you change it. See [Startup defaults](#startup-defaults).
129
131
  Ordinary edits and tests run without further confirmation after that choice. Source/data deletion and existing durable user database mutation require a concrete review. Lisp and ordinary tools coexist. Completion requires current item evidence and a fresh final check through the user’s entry point. See [Goal-driven coding](docs/coding-workflow.md) and [owned execution, receipts and memory reuse](docs/owned-execution.md).
130
132
  See [setup, APIs, limits and recovery](docs/lisp.md).
131
133
 
132
- ## Typed decisions (Jev / Laya / Nimble)
134
+ <a id="startup-defaults"></a>
135
+ ## Startup defaults for Lisp and decisions
136
+
137
+ Every non-trivial task asks once whether to use typed decisions and Lisp, then remembers the answer for that request. Settings → General → **Kiokuko startup defaults** sets the answer that card preselects, so a routine task starts from your usual choice.
133
138
 
134
- Optional [automatic model selection](docs/model-selection.md#automatic-model-selection) chooses a validated `openai-codex` model and reasoning effort for a new normal task. It defaults to `modelAutoMode.mode: off`; `/kioku-model-auto on | observe | off | status` changes only the current session. `observe` measures a proposal without changing the model. It requires a ready Jev or Laya backend, dsh-codex, native model metadata and a token meter. Failed or unavailable classification keeps the current model; manual model selection takes priority.
139
+ | Setting | Values | Effect |
140
+ |---|---|---|
141
+ | `startupDefaults.decision` | `ask` (default), `on`, `off` | Preselects whether typed decisions are used, and decides it when no question UI is available |
142
+ | `startupDefaults.lisp` | `ask` (default), `on`, `off` | Preselects whether Lisp is the execution route |
143
+ | `typedDecisions.provider` | `typesafe` (default), `openai`, `nimble`, `laya-coreml` | Backend for new requests |
135
144
 
136
- [Answer review](docs/answer-review.md) is enabled by default on the full plugin and modular core. It evaluates an already displayed normal answer using the configured Jev, Laya or Nimble provider and may ask the same main model to reconsider once. The defaults are:
145
+ `ask` leaves the card neutral and preserves the previous behaviour. A default only selects an answer that is already offered: it never grants execution authority, enables a disabled module, or skips the Lisp runtime, approval and Stop checks. The card still appears, still marks the alternative, and the answer picked there wins for that request.
146
+
147
+ ```yaml
148
+ - id: kiokuko-dsh
149
+ config:
150
+ startupDefaults:
151
+ decision: on
152
+ lisp: on
153
+ typedDecisions:
154
+ provider: openai
155
+ ```
156
+
157
+ The provider default applies wherever no `/kioku-decisions use` selection was saved for this project. An explicit selection stays authoritative and is not overwritten; `use default` returns to the configured value. A provider whose configuration is incomplete, such as Nimble without an endpoint and model, still fails closed rather than substituting another backend.
158
+
159
+ In a headless host with no question service, `ask` keeps the previous behaviour of following the existing configuration and manual session choice, while `on`/`off` supply that answer explicitly.
160
+ ## Typed decisions (Jev / Laya / OpenAI / Nimble)
161
+
162
+ Optional [automatic model selection](docs/model-selection.md#automatic-model-selection) chooses a validated `openai-codex` model and reasoning effort for a new normal task. It defaults to `modelAutoMode.mode: off`; `/kioku-model-auto on | observe | off | status` changes only the current session. `observe` measures a proposal without changing the model. It requires a ready Jev, Laya or OpenAI backend, dsh-codex, native model metadata and a token meter. Failed or unavailable classification keeps the current model; manual model selection takes priority.
163
+
164
+ [Answer review](docs/answer-review.md) is enabled by default on the full plugin and modular core. It evaluates an already displayed normal answer using the configured Jev, Laya, OpenAI or Nimble provider and may ask the same main model to reconsider once. The defaults are:
137
165
 
138
166
  ```yaml
139
167
  answerReview:
@@ -144,38 +172,69 @@ answerReview:
144
172
  Set `answerReview.mode: off` to disable it. It inherits `typedDecisions`, adds evaluation inference (and at most one main-model turn), and does not delay the first answer. If the selected provider is unavailable, review is skipped and the original answer is preserved; no other provider is substituted. Laya v1 findings are unverified suggestions because worker-side truncation cannot be checked. `/kioku-decisions status` reports progress and skip reasons; it does not certify correctness.
145
173
 
146
174
 
147
- Jev is the default. Switch in DSH's command input without editing configuration or restarting DSH:
175
+ <a id="openai-decisions-setup"></a>
176
+ ### Set up OpenAI Decisions
148
177
 
149
- ```text
150
- /kioku-decisions use jev
151
- /kioku-decisions use laya
152
- /kioku-decisions use nimble
153
- /kioku-decisions use default
154
- ```
178
+ Jev remains the default; OpenAI, local Laya and Nimble are alternatives. OpenAI uses the official [Decisions API](https://developers.openai.com/api/docs/guides/decisions), `POST /v1/decisions`, with `gpt-6-luna` as this checkout's default decision model. This is separate from the main chat model: ChatGPT/Codex OAuth login does not supply `OPENAI_API_KEY`, and a TypeSafe/Jev key cannot replace it.
155
179
 
156
- Laya connects directly to the existing worker started by `start-laya`; no worker replacement or fingerprint setup is needed. Jev needs a TypeSafe key; Nimble needs an endpoint and model configured first. A successful probe saves the selection for this project and applies it to new requests. It survives restarts and preserves in-flight request bindings. `use default` restores the plugin configuration.
180
+ These instructions describe the current source. They do not assert that the published npm `latest` already includes OpenAI support. If `use openai` is unavailable, check the installed build's command support first.
157
181
 
158
- Set the API key in DSH's `~/.dsh/.credentials.yaml` (`$DSH_HOME/.credentials.yaml` if set), or use `/kioku-typesafe-key YOUR_KEY`. Keep any existing entries:
182
+ 1. Create an API key for your OpenAI API project and add it to the credential store used by the running DSH. With the standard `credentials-local` provider, choose the path as follows:
159
183
 
160
- ```yaml
161
- version: 1
162
- refs:
163
- TYPESAFE_API_KEY: YOUR_KEY
184
+ | Configuration | Credential file |
185
+ |---|---|
186
+ | Default harness home | `~/.dsh/.credentials.yaml` |
187
+ | Custom `DSH_HOME` | `$DSH_HOME/.credentials.yaml` |
188
+ | Explicit `credentials.path` (the provider's `config.path`) | The configured path, overriding the home default |
189
+
190
+ `--profile web` keeps profile packages and patches under `$DSH_HOME/profiles/web`; it does **not** by itself move credentials there. A profile can override `credentials.path`, or its launcher can use another `DSH_HOME`. Use that effective file, not a guessed `profiles/web/.credentials.yaml`.
191
+
192
+ 2. In an existing file, add only `OPENAI_API_KEY` under `refs` and preserve all other `refs` and `records`. This is a minimal **new-file example**, with a nonfunctional placeholder:
193
+
194
+ ```yaml
195
+ version: 1
196
+ refs:
197
+ OPENAI_API_KEY: "OPENAI_API_KEY_EXAMPLE_ONLY"
198
+ records: {}
199
+ ```
200
+
201
+ Replace the placeholder privately with your key. On macOS/Linux, protect the actual file; for the default path:
202
+
203
+ ```sh
204
+ chmod 600 "$HOME/.dsh/.credentials.yaml"
205
+ ```
206
+
207
+ Use your configured path instead when it differs. The default `watch: true` reloads valid file edits automatically for subsequent requests; restarting DSH is unnecessary. Do not paste keys into chat, screenshots or Git.
208
+
209
+ 3. In DSH's command input, select OpenAI and inspect the result:
210
+
211
+ ```text
212
+ /kioku-decisions use openai
213
+ /kioku-decisions status
214
+ ```
215
+
216
+ `use openai` makes a real API probe, which may incur usage charges. Only a successful probe and save persist the choice for this project and new requests; failure or cancellation keeps the prior choice. Existing requests keep their binding. `status` makes no inference call. Optional `/kioku-decisions probe` makes another real probe.
217
+
218
+ The standard provider resolves **saved file > launch environment > project `.env` > harness-home `.env`**. Environment variables still work when the credentials service is present, unless a saved value overrides them. For an environment-only setup, export the key **before** launching DSH from that shell:
219
+
220
+ ```sh
221
+ export OPENAI_API_KEY='OPENAI_API_KEY_EXAMPLE_ONLY'
164
222
  ```
165
223
 
166
- If creating the YAML file yourself, run `chmod 600 ~/.dsh/.credentials.yaml` (use `$DSH_HOME` if set).
224
+ This is a placeholder, not a usable key. An export in another shell after DSH has started does not update its launch snapshot; use the watched file to update an already running instance. Keep credential-bearing `.env` files out of Git.
167
225
 
168
- In the DSH command UI, check the key and test the connection:
226
+ Other selections remain available:
169
227
 
170
228
  ```text
171
- /kioku-typesafe-key status
172
- /kioku-decisions probe
173
- /kioku-decisions status
229
+ /kioku-decisions use jev
230
+ /kioku-decisions use laya
231
+ /kioku-decisions use nimble
232
+ /kioku-decisions use default
174
233
  ```
175
234
 
176
- `probe` sends a synthetic API request; `status` does not. `/kioku-typesafe-key clear` removes the stored key. Key input is visible when using `/kioku-typesafe-key YOUR_KEY`. See [typed decisions](docs/typed-decisions.md) and the [explicit Lisp API](docs/typesafe.md) for more.
235
+ Jev uses `TYPESAFE_API_KEY`; `/kioku-typesafe-key` manages only that key, never the OpenAI key. Laya connects to the existing `start-laya` worker at `~/Library/Caches/laya-coreml/worker.sock` using v1 `health`/`predict`. `install-laya` reuses a worker or shows setup instructions. Nimble requires its configured endpoint and model. `use default` restores the plugin configuration.
177
236
 
178
- Jev remains the default. Nimble and local [Laya-CoreML](docs/laya-coreml.md) are optional alternatives; Laya connects directly to `~/Library/Caches/laya-coreml/worker.sock` using the existing v1 `health`/`predict` protocol. `/kioku-decisions install-laya` reuses a running worker or shows setup instructions.
237
+ See [credential precedence, troubleshooting and configuration](docs/typed-decisions.md#openai-credentials), the [official credential-store reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/credentials/credentials-local/README.md), and the [TypeSafe Lisp API](docs/typesafe.md).
179
238
 
180
239
  Use `aac6fef/laya-multilingual-coreml` for English and other languages. Its 1,024-token input capacity includes the question, options and state; the `-ane` variant allows only 96 tokens. See the [upstream model specifications](https://github.com/mizorewww/laya-coreml#available-checkpoints). After the [initial setup](docs/Laya-CoreML-ja.md), use the following commands. Stop any running Laya worker before starting it with the new model; `LAYA_MODEL` also overrides the old default in an existing worker script.
181
240