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.
- package/PERMISSIONS.md +11 -5
- package/README.ja.md +82 -26
- package/README.ko.md +80 -23
- package/README.md +82 -23
- package/README.zh-CN.md +80 -23
- package/dist/client.cjs +97 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/dsh/answer-review/contracts.js +1 -1
- package/dist/dsh/answer-review/contracts.js.map +1 -1
- package/dist/dsh/completion-report.d.ts +29 -1
- package/dist/dsh/completion-report.d.ts.map +1 -1
- package/dist/dsh/completion-report.js +58 -14
- package/dist/dsh/completion-report.js.map +1 -1
- package/dist/dsh/config.d.ts +12 -0
- package/dist/dsh/config.d.ts.map +1 -1
- package/dist/dsh/config.js +3 -0
- package/dist/dsh/config.js.map +1 -1
- package/dist/dsh/core/host.d.ts +12 -0
- package/dist/dsh/core/host.d.ts.map +1 -1
- package/dist/dsh/core/host.js +4 -0
- package/dist/dsh/core/host.js.map +1 -1
- package/dist/dsh/core/index.d.ts +32 -0
- package/dist/dsh/core/index.d.ts.map +1 -1
- package/dist/dsh/decisions/host.d.ts.map +1 -1
- package/dist/dsh/decisions/host.js +5 -0
- package/dist/dsh/decisions/host.js.map +1 -1
- package/dist/dsh/decisions/intent-assessment.d.ts +15 -0
- package/dist/dsh/decisions/intent-assessment.d.ts.map +1 -1
- package/dist/dsh/decisions/intent-assessment.js +10 -0
- package/dist/dsh/decisions/intent-assessment.js.map +1 -1
- package/dist/dsh/decisions/service.d.ts +2 -0
- package/dist/dsh/decisions/service.d.ts.map +1 -1
- package/dist/dsh/decisions/service.js +9 -0
- package/dist/dsh/decisions/service.js.map +1 -1
- package/dist/dsh/guardrail/contracts.d.ts +1 -1
- package/dist/dsh/guardrail/contracts.d.ts.map +1 -1
- package/dist/dsh/guardrail/evidence.d.ts.map +1 -1
- package/dist/dsh/guardrail/evidence.js +4 -0
- package/dist/dsh/guardrail/evidence.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts +2 -0
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +5 -1
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/index.d.ts +10 -2
- package/dist/dsh/index.d.ts.map +1 -1
- package/dist/dsh/index.js +6 -3
- package/dist/dsh/index.js.map +1 -1
- package/dist/dsh/lisp/host-tool-dispatch.d.ts +2 -0
- package/dist/dsh/lisp/host-tool-dispatch.d.ts.map +1 -1
- package/dist/dsh/lisp/host-tool-dispatch.js +9 -1
- package/dist/dsh/lisp/host-tool-dispatch.js.map +1 -1
- package/dist/dsh/lisp/http.d.ts.map +1 -1
- package/dist/dsh/lisp/http.js +13 -1
- package/dist/dsh/lisp/http.js.map +1 -1
- package/dist/dsh/lisp/manager.d.ts +4 -0
- package/dist/dsh/lisp/manager.d.ts.map +1 -1
- package/dist/dsh/lisp/manager.js +35 -9
- package/dist/dsh/lisp/manager.js.map +1 -1
- package/dist/dsh/lisp/native-stop-receipt.d.ts +25 -0
- package/dist/dsh/lisp/native-stop-receipt.d.ts.map +1 -0
- package/dist/dsh/lisp/native-stop-receipt.js +22 -0
- package/dist/dsh/lisp/native-stop-receipt.js.map +1 -0
- package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
- package/dist/dsh/lisp/proposal-batch.js +2 -1
- package/dist/dsh/lisp/proposal-batch.js.map +1 -1
- package/dist/dsh/lisp/status-text.d.ts +34 -0
- package/dist/dsh/lisp/status-text.d.ts.map +1 -0
- package/dist/dsh/lisp/status-text.js +65 -0
- package/dist/dsh/lisp/status-text.js.map +1 -0
- package/dist/dsh/lisp/surface.d.ts.map +1 -1
- package/dist/dsh/lisp/surface.js +44 -10
- package/dist/dsh/lisp/surface.js.map +1 -1
- package/dist/dsh/live-config.d.ts +49 -0
- package/dist/dsh/live-config.d.ts.map +1 -0
- package/dist/dsh/live-config.js +77 -0
- package/dist/dsh/live-config.js.map +1 -0
- package/dist/dsh/managed-file-deployment.d.ts +6 -0
- package/dist/dsh/managed-file-deployment.d.ts.map +1 -1
- package/dist/dsh/managed-file-deployment.js +17 -1
- package/dist/dsh/managed-file-deployment.js.map +1 -1
- package/dist/dsh/managed-operation-journal.d.ts +5 -1
- package/dist/dsh/managed-operation-journal.d.ts.map +1 -1
- package/dist/dsh/managed-operation-journal.js +17 -4
- package/dist/dsh/managed-operation-journal.js.map +1 -1
- package/dist/dsh/on-demand-intake.d.ts +2 -0
- package/dist/dsh/on-demand-intake.d.ts.map +1 -1
- package/dist/dsh/on-demand-intake.js +22 -3
- package/dist/dsh/on-demand-intake.js.map +1 -1
- package/dist/dsh/setup.d.ts +22 -0
- package/dist/dsh/setup.d.ts.map +1 -1
- package/dist/dsh/setup.js +57 -5
- package/dist/dsh/setup.js.map +1 -1
- package/dist/dsh/standard-skill-deployment.d.ts +12 -1
- package/dist/dsh/standard-skill-deployment.d.ts.map +1 -1
- package/dist/dsh/standard-skill-deployment.js +76 -4
- package/dist/dsh/standard-skill-deployment.js.map +1 -1
- package/dist/dsh/startup-defaults-settings.d.ts +20 -0
- package/dist/dsh/startup-defaults-settings.d.ts.map +1 -0
- package/dist/dsh/startup-defaults-settings.js +27 -0
- package/dist/dsh/startup-defaults-settings.js.map +1 -0
- package/dist/dsh/startup-defaults.d.ts +41 -0
- package/dist/dsh/startup-defaults.d.ts.map +1 -0
- package/dist/dsh/startup-defaults.js +29 -0
- package/dist/dsh/startup-defaults.js.map +1 -0
- package/dist/dsh/task-startup.d.ts +3 -0
- package/dist/dsh/task-startup.d.ts.map +1 -1
- package/dist/dsh/task-startup.js +22 -7
- package/dist/dsh/task-startup.js.map +1 -1
- package/dist/enno-oduno/verifier.d.ts.map +1 -1
- package/dist/enno-oduno/verifier.js +5 -1
- package/dist/enno-oduno/verifier.js.map +1 -1
- 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/README.ja.md +2 -0
- package/docs/README.md +2 -0
- package/docs/answer-review.md +8 -0
- package/docs/dsh-plugin.md +42 -14
- package/docs/getting-started.ja.md +2 -0
- package/docs/getting-started.md +2 -0
- package/docs/lisp.md +45 -4
- package/docs/model-selection.ja.md +2 -2
- package/docs/model-selection.md +2 -2
- package/docs/store-evidence.md +6 -0
- package/docs/typed-decisions.md +88 -7
- package/docs/typesafe.md +8 -3
- package/docs/verification.md +28 -3
- package/package.json +4 -3
- package/scripts/prepare-build.mjs +13 -0
- package/scripts/setup-dsh.mjs +8 -3
package/docs/dsh-plugin.md
CHANGED
|
@@ -53,7 +53,7 @@ requires an explicit resume and a new generation. Old results cannot complete
|
|
|
53
53
|
or modify that new generation. Model changes transfer the same task to the
|
|
54
54
|
verified primary continuation; CLI resume rereads its persisted state.
|
|
55
55
|
|
|
56
|
-
Jev/Laya interpretations are advisory. If they are unavailable or abstain, the
|
|
56
|
+
Jev/Laya/OpenAI interpretations are advisory. If they are unavailable or abstain, the
|
|
57
57
|
host records an unresolved decision and accepts a validated main-model
|
|
58
58
|
interpretation or an explicit operation. The original request and authority
|
|
59
59
|
checks remain in force. The CLI displays this SQLite snapshot and committed
|
|
@@ -220,6 +220,20 @@ Released v0/v1/v2/v3 history readers are bundled privately into the npm artifact
|
|
|
220
220
|
|
|
221
221
|
## Remove
|
|
222
222
|
|
|
223
|
+
| Target | After `dsh plugin remove` | How to remove it |
|
|
224
|
+
|---|---|---|
|
|
225
|
+
| DSH rows (`kiokuko-dsh` / `kiokuko-models`) | Removed; the stock export row is restored | No further action |
|
|
226
|
+
| Deployed Skills under `~/.agents/skills` | Remain | `setup-dsh.mjs --remove` |
|
|
227
|
+
| DSH block in `AGENTS.md` | Remains | `setup-dsh.mjs --remove` |
|
|
228
|
+
| `kiokuko-models.json` | Remains | Remove manually only when the saved provider definitions are no longer needed |
|
|
229
|
+
| Kiokuko database and `.agenticreplay/runs` | Remain intentionally | Do not remove them as part of plugin removal |
|
|
230
|
+
|
|
231
|
+
Disable individual rows when temporarily turning Kiokuko off. Disabling the whole
|
|
232
|
+
bundle also removes the provider referenced by `agent-default-model`, leaving its
|
|
233
|
+
default-model binding unresolved. `patchReload: "live"` has no reader in the
|
|
234
|
+
current DSH and must not be treated as evidence that a profile change took effect
|
|
235
|
+
immediately.
|
|
236
|
+
|
|
223
237
|
```bash
|
|
224
238
|
dsh plugin --profile web remove kiokuko-dsh
|
|
225
239
|
```
|
|
@@ -268,19 +282,24 @@ block in the startup directory’s `AGENTS.md`, as described below.
|
|
|
268
282
|
## Bundled standard Skills: canonical source and refresh
|
|
269
283
|
|
|
270
284
|
The repository's `skills/<name>/` directories are the single canonical source
|
|
271
|
-
for the
|
|
285
|
+
for the 16 standard Skills and for the separately bundled Japanese output and
|
|
286
|
+
Lisp Skills.
|
|
272
287
|
`src/dsh/standard-skills.ts` resolves them relative to the built module
|
|
273
288
|
(`dist/dsh/` → `../../skills/<name>`), and `src/dsh/standard-skill-integrity.ts`
|
|
274
289
|
refuses to load a tree that breaks the manifest: exactly one management marker
|
|
275
290
|
per file, frontmatter `name` equal to the manifest name with a non-empty
|
|
276
291
|
description and no `disable-model-invocation`, every local Markdown link
|
|
277
|
-
resolvable inside its own Skill, and exactly
|
|
278
|
-
|
|
292
|
+
resolvable inside its own Skill, and exactly 16 standard Skills with 42 Markdown
|
|
293
|
+
files and 26 reference files.
|
|
279
294
|
|
|
280
|
-
The Japanese output Skill
|
|
295
|
+
The Japanese output Skill and Lisp Skill bring the package inventory to 18 Skill
|
|
296
|
+
directories. The Japanese output directory is
|
|
281
297
|
`japanese-translation-for-oss-models/`; its frontmatter/provider name is
|
|
282
|
-
`natural-japanese-output`. Both names refer to the same Skill.
|
|
283
|
-
|
|
298
|
+
`natural-japanese-output`. Both names refer to the same Skill. Setup deploys the
|
|
299
|
+
16 standard Skills plus
|
|
300
|
+
Japanese output: 17 directories and 43 files, including the 26 references. Lisp
|
|
301
|
+
is supplied through the DSH Skill provider and is not installed globally by this
|
|
302
|
+
setup path.
|
|
284
303
|
|
|
285
304
|
`veteran-programmer-skill` checks workflow completeness before and after changes
|
|
286
305
|
spanning setup, delivery, persisted state or runtime handoffs. SOUL and the code
|
|
@@ -300,8 +319,9 @@ alone does not establish remaining input budget or model quality.
|
|
|
300
319
|
The enabled plugin runs setup on every load, before registering its DSH surfaces:
|
|
301
320
|
|
|
302
321
|
1. Validate the bundled Skills and preflight the deployment targets.
|
|
303
|
-
2. Synchronize all
|
|
304
|
-
`~/.agents/skills/`, creating missing files and replacing
|
|
322
|
+
2. Synchronize all 16 standard Skill directories and the Japanese output Skill
|
|
323
|
+
to the process user's `~/.agents/skills/`, creating missing files and replacing
|
|
324
|
+
stale managed files.
|
|
305
325
|
3. Replace the existing `<!-- BEGIN KIOKUKO-DSH MANAGED BLOCK -->` through
|
|
306
326
|
`<!-- END KIOKUKO-DSH MANAGED BLOCK -->` section of the startup directory's
|
|
307
327
|
`AGENTS.md` with the DSH contract. Preserve all text outside those markers.
|
|
@@ -356,6 +376,9 @@ npm run build
|
|
|
356
376
|
node scripts/setup-dsh.mjs --cwd /absolute/path/to/project --check
|
|
357
377
|
node scripts/setup-dsh.mjs --cwd /absolute/path/to/project
|
|
358
378
|
node scripts/setup-dsh.mjs --cwd /absolute/path/to/project --check
|
|
379
|
+
# Explicitly remove byte-identical deployed copies and the DSH AGENTS.md block.
|
|
380
|
+
node scripts/setup-dsh.mjs --cwd /absolute/path/to/project --remove
|
|
381
|
+
node scripts/setup-dsh.mjs --cwd /absolute/path/to/project --remove --check
|
|
359
382
|
```
|
|
360
383
|
|
|
361
384
|
The same `scripts/setup-dsh.mjs` ships in the installed package. Use the **actual
|
|
@@ -374,8 +397,8 @@ runtime user. Check the reported paths: a successful source build or bundled
|
|
|
374
397
|
parity check alone does not prove that another process's deployed files match.
|
|
375
398
|
|
|
376
399
|
`node scripts/verify-standard-skills.mjs` remains a source/bundle integrity check
|
|
377
|
-
for the
|
|
378
|
-
for the complete
|
|
400
|
+
for the 16 standard Skills (42 files, 26 references). Use `setup-dsh.mjs --check`
|
|
401
|
+
for the complete 17-directory, 43-file deployment **and** project instruction check.
|
|
379
402
|
|
|
380
403
|
## STORE contract and permissions
|
|
381
404
|
|
|
@@ -402,9 +425,14 @@ Runtime effects are explicit:
|
|
|
402
425
|
- optional GitHub or embedding credentials are supplied by the user and are
|
|
403
426
|
never bundled or persisted by the plugin.
|
|
404
427
|
|
|
405
|
-
`prepare` runs
|
|
406
|
-
|
|
407
|
-
|
|
428
|
+
`prepare` runs `node scripts/prepare-build.mjs`, which normally builds through
|
|
429
|
+
the invoking package manager. Only `CI=true` together with
|
|
430
|
+
`KIOKUKO_CI_DEFER_PREPARE=1` defers this package's duplicate build to the selected
|
|
431
|
+
verifier's clean build; dependency lifecycle scripts remain enabled. See
|
|
432
|
+
[CI build ownership](verification.md#consolidated-duplicate-invocations).
|
|
433
|
+
Git installs still need build approval in the consuming profile; use the
|
|
434
|
+
repository-scoped rule in [Install](#install) so ordinary updates do not require
|
|
435
|
+
another commit-specific permission.
|
|
408
436
|
|
|
409
437
|
The npm tarball already contains `dist/`, so its normal install path does not
|
|
410
438
|
depend on a consumer-side build permission.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
`kiokuko-dsh`はDeepSeek Harness向けPluginです。公開パッケージが提供する
|
|
4
4
|
のは`./dsh` Plugin entrypointだけです。導入、session、lifecycleはDSHが所有します。
|
|
5
5
|
|
|
6
|
+
補助判定でOpenAIを使う場合は、[OpenAI Decisionsの設定](../README.ja.md#openai-decisions-setup)でAPIキーの保存先とWeb profileとの違いを確認してください。主モデルのChatGPT/Codex OAuthとは別です。手順は現行ソースの対応を示し、公開済みnpmの `latest` に含まれることを保証しません。
|
|
7
|
+
|
|
6
8
|
## インストール
|
|
7
9
|
|
|
8
10
|
公式 DeepSeek Harness の現在のソースと Node.js 24.16.0 以上を使用します。DSH の版名による固定判定はせず、実際のホスト API と解決したソース revision に対する隔離試験で互換性を確認します。[検証範囲](current-upstream-compatibility-report.md)を参照してください。
|
package/docs/getting-started.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
`kiokuko-dsh` is a DeepSeek Harness plugin. The published package contains the
|
|
4
4
|
`./dsh` plugin entrypoint. DSH owns installation, sessions, and lifecycle.
|
|
5
5
|
|
|
6
|
+
Before choosing OpenAI for auxiliary decisions, follow the [OpenAI Decisions setup](../README.md#openai-decisions-setup) for API-key storage and the Web-profile path distinction. Main-model ChatGPT/Codex OAuth is separate. The guide describes current source support, not a guarantee about the published npm `latest`.
|
|
7
|
+
|
|
6
8
|
## Install
|
|
7
9
|
|
|
8
10
|
Use current official DeepSeek Harness and Node.js 24.16.0 or newer. Compatibility is checked against actual host APIs and the resolved upstream source revision, not a fixed DSH release label. See [verified scope](current-upstream-compatibility-report.md).
|
package/docs/lisp.md
CHANGED
|
@@ -282,6 +282,45 @@ remain available when the AI loop is stopped:
|
|
|
282
282
|
/kioku-lisp recover
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
+
The default `status` view shows counts and up to three unresolved Lisp operations
|
|
286
|
+
and three unresolved external operations, each with its exact `diagnostics` command.
|
|
287
|
+
Successful operation IDs stay in `/kioku-lisp status --json`; ordinary status does
|
|
288
|
+
not print the full history. Reading either view never starts or recovers a worker.
|
|
289
|
+
|
|
290
|
+
An owned file proposal rejected by the host before dispatch is `NOT_APPLIED`,
|
|
291
|
+
not an unknown mutation. The Lisp generation and its definitions remain usable;
|
|
292
|
+
the host's preparation and permission checks still apply to any later attempt.
|
|
293
|
+
An error after dispatch, even with identical text, remains `UNKNOWN`.
|
|
294
|
+
|
|
295
|
+
`RECONCILIATION_REQUIRED` means external effects still lack a verifiable receipt.
|
|
296
|
+
Inspect `/kioku-lisp diagnostics OPERATION_ID` and the original host evidence.
|
|
297
|
+
A SIGTERM or job settlement message alone is not proof that the process and its
|
|
298
|
+
resources stopped. No interrupted command is automatically retried.
|
|
299
|
+
|
|
300
|
+
Restarting Lisp cannot clear an unknown external operation, and neither can
|
|
301
|
+
`recover` or `abandon`. While one remains, every later effect is refused. After
|
|
302
|
+
inspecting the original receipt, end only the operations you have confirmed are
|
|
303
|
+
harmless; the recorded text is the human evidence, not an observed result:
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
/kioku-lisp abandon-managed OPERATION_ID
|
|
307
|
+
/kioku-lisp recover
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
`abandon-managed` accepts only `unknown` operations, requires the inspection
|
|
311
|
+
evidence, and records no success or failure outcome. It never re-executes the
|
|
312
|
+
command and never reverts an effect, so operations whose effects you cannot
|
|
313
|
+
verify must stay open until you resolve them yourself. The Lisp control beside
|
|
314
|
+
the session input offers the same action for the listed operations, and a scope
|
|
315
|
+
containing an abandoned operation cannot later be used as protocol test evidence.
|
|
316
|
+
|
|
317
|
+
A host that supplies versioned Bash termination receipts can reconcile an exact
|
|
318
|
+
original native child as `cancelled-confirmed` after observing its managed range
|
|
319
|
+
empty. The plugin checks the child/root call, agent, session and exact dispatched
|
|
320
|
+
working directory. The Lisp timeout or cancellation stays an error, and prior
|
|
321
|
+
command effects remain. Older hosts, missing receipts and mismatched identities
|
|
322
|
+
remain unresolved; text, SIGTERM and job settlement cannot substitute for proof.
|
|
323
|
+
|
|
285
324
|
In ordinary development conversations, `recover` starts a fresh worker after a
|
|
286
325
|
timeout, output limit or Stop, including between turns. It needs no task setup;
|
|
287
326
|
old turn permissions remain expired, and definitions/heap values are discarded.
|
|
@@ -430,9 +469,10 @@ The legacy lisp.approvalMode ask/auto configuration and profile commands remain
|
|
|
430
469
|
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).
|
|
431
470
|
<!-- /kiokuko:runtime -->
|
|
432
471
|
|
|
433
|
-
Pinned DSH stores
|
|
434
|
-
the host-owned profile identity. Current DSH exposes `lisp.approvalMode
|
|
435
|
-
|
|
472
|
+
Pinned DSH stores the approval setting in the native `kiokuko-lisp` namespace, keyed by
|
|
473
|
+
the host-owned profile identity. Current DSH exposes `lisp.approvalMode`, the
|
|
474
|
+
`startupDefaults` pair and `typedDecisions.provider` together through the native
|
|
475
|
+
`kiokuko-dsh` configuration form, and saves the profile patch. This
|
|
436
476
|
compatibility difference does not change the controls or scope. No separate
|
|
437
477
|
preference file or database migration is used.
|
|
438
478
|
|
|
@@ -530,6 +570,7 @@ Clean installation and platform status: [code intelligence setup](code-intellige
|
|
|
530
570
|
|
|
531
571
|
## Coding task choice and recovery
|
|
532
572
|
|
|
533
|
-
For a new coding task, `coding_workflow` first defines and displays the Goal, implementation items and observable conditions. The host then asks whether to use Lisp. Configuration alone never implies yes; an explicit manual session ON is reused as the selected route.
|
|
573
|
+
For a new coding task, `coding_workflow` first defines and displays the Goal, implementation items and observable conditions. The host then asks whether to use Lisp. Configuration alone never implies yes; an explicit manual session ON is reused as the selected route.
|
|
574
|
+
`startupDefaults.lisp` (default `ask`) only preselects the Lisp answer on the task-startup card, which stays editable; a saved answer still wins. The default never enables the module or satisfies a yes: a missing runtime or failed startup remains the same recoverable blocker. Closing the question leaves it pending and `coding_workflow next` reopens the same question. Explicit continuation after a host restart restores the task choice; a new task or material scope change asks again. A saved yes followed by startup failure remains a visible blocker; recover the runtime or explicitly change the task route with `/kioku-lisp disable`. No uses ordinary tools and still requires fresh item checks followed by a final user-entry Goal check. Lisp evaluation success alone is insufficient: bind `task_completion` and collect actual host process evidence. See [coding workflow](coding-workflow.md).
|
|
534
575
|
|
|
535
576
|
Live opt-in condition/restart recovery: see [bounded recovery](lisp-recovery.md).
|
|
@@ -14,7 +14,7 @@ DSHの権限判定、必要な検証を維持し、役小角の契約・WorkUnit
|
|
|
14
14
|
|
|
15
15
|
Webプロファイルでは [Kiokuko Models](kiokuko-models.md) から接続を設定できます。DSH本体のModelsで設定する必要はありません。登録したモデルは、通常会話・Enno・Deepでネイティブ接続と併用できます。
|
|
16
16
|
|
|
17
|
-
通常版・modular coreとも `modelAutoMode.mode: off` が既定です。同じDSHプロファイルでKiokuko Modelsまたはdsh-codexからCodexを認証し、Jev
|
|
17
|
+
通常版・modular coreとも `modelAutoMode.mode: off` が既定です。同じDSHプロファイルでKiokuko Modelsまたはdsh-codexからCodexを認証し、Jev・Laya・[OpenAI](typed-decisions.md#openai-credentials)のいずれかの判定を準備したうえで、まず `observe` で選択案を確認します。
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
modelAutoMode:
|
|
@@ -34,7 +34,7 @@ modelAutoMode:
|
|
|
34
34
|
|
|
35
35
|
初期候補は `gpt-6-luna` の low・medium・high と `gpt-6-sol` の high です。`modelAutoMode.routes` には最大4件、`id`(`luna-low`、`luna-medium`、`luna-high`、`sol-high`)と `binding`(`provider`、`model`、`reasoningEffort`)を指定できます。IDは経路のラベルなので、登録済みのAstraなども正確なbindingで割り当てられます。候補はCodex由来とResponses方式を確認でき、現在のモデル一覧、文脈容量・入力形式・推論強度、要求設定の検証、token meterを通った接続に限定します。ネイティブの `openai-codex` とKiokuko所有のCodex接続が対象です。名前だけを似せた接続やOpenAI API接続は対象外です。有効なbindingが2件未満なら判定しません。
|
|
36
36
|
|
|
37
|
-
新しい受付済みの通常タスクでは、現在の依頼文、タスク種別、添付の種類、経路IDと判定基準を選択中のJev
|
|
37
|
+
新しい受付済みの通常タスクでは、現在の依頼文、タスク種別、添付の種類、経路IDと判定基準を選択中のJev・Laya・OpenAIへ送ります。この判定のために添付の内容、全履歴、リポジトリ全体は送信しません。Choice 1問の結果をrunに保存し、継続では同じ経路を使います。再起動時に判定結果が不明なら再送せず元のモデルを維持します。`observe`、棄権、probe失敗、metadata不足、非対応effort、timeout、入力超過でも元のモデルを維持します。取消、セッション同一性の不一致、保存の整合性エラーでは要求を止めます。認証・利用枠・モデル利用不可によるdispatch失敗を別モデルへ自動再送しません。
|
|
38
38
|
|
|
39
39
|
状態表示では、設定・準備状態・選択案・適用したbindingと、nativeの `request/header` で確認した実モデルを区別します。初期候補は判定基準であり、品質・時間・利用枠の改善を保証しません。Enno、Deep、子、雑談、回答の再検討、保護されたLisp実行は既存の経路を使います。実装失敗後の自動昇格は初期版に含めません。
|
|
40
40
|
|
package/docs/model-selection.md
CHANGED
|
@@ -15,7 +15,7 @@ plan approval or automatic Enno continuation.
|
|
|
15
15
|
|
|
16
16
|
In Web profiles, [Kiokuko Models](kiokuko-models.md) manages connections without requiring DSH's Models settings. Its registered models are available to ordinary chat, Enno and Deep alongside native connections.
|
|
17
17
|
|
|
18
|
-
`modelAutoMode` is off by default in both the full plugin and modular core. To try it, authenticate Codex through Kiokuko Models or dsh-codex in the same DSH profile, configure a Jev or
|
|
18
|
+
`modelAutoMode` is off by default in both the full plugin and modular core. To try it, authenticate Codex through Kiokuko Models or dsh-codex in the same DSH profile, configure a Jev, Laya or [OpenAI typed-decision backend](typed-decisions.md#openai-credentials), then use `observe` before enabling automatic routing:
|
|
19
19
|
|
|
20
20
|
```yaml
|
|
21
21
|
modelAutoMode:
|
|
@@ -35,7 +35,7 @@ The command changes only the current native session. `on` also clears its manual
|
|
|
35
35
|
|
|
36
36
|
The initial preset offers `gpt-6-luna` at low, medium and high effort, plus `gpt-6-sol` at high effort. Up to four exact route bindings can be configured under `modelAutoMode.routes`; each has an `id` from `luna-low`, `luna-medium`, `luna-high`, `sol-high`, and a `binding` with `provider`, `model`, and `reasoningEffort`. These are route labels, so a registered Astra or other GPT model may be assigned explicitly. No new model ID is guessed or substituted. A candidate must have a validated Codex origin and Responses protocol, live model context and modality metadata, supported efforts, call-config validation and token meter. Both native `openai-codex` and Kiokuko-owned Codex routes qualify; an arbitrary provider name or OpenAI API connection does not. Fewer than two valid bindings skips classification.
|
|
37
37
|
|
|
38
|
-
For a new admitted normal task, Kiokuko sends the current task text, task type, attachment kinds, route IDs and rubric to the selected Jev or
|
|
38
|
+
For a new admitted normal task, Kiokuko sends the current task text, task type, attachment kinds, route IDs and rubric to the selected Jev, Laya or OpenAI backend. It does not send attachment bytes, full history or repository contents for this classification. One Choice result selects a route or abstains. The route is stored against the exact run and reused for continuations; an unknown in-flight decision after restart is retained without another classifier call. `observe` records a proposal but keeps the current model. A failed probe, missing metadata, unsupported effort, timeout, oversized input or abstention also keeps the current model. Cancellation, stale session identity and storage integrity failures stop the request. Dispatch authentication, quota and unavailable-model errors remain ordinary failures; no alternate model is retried automatically.
|
|
39
39
|
|
|
40
40
|
The status distinguishes the configured mode, readiness, proposal and selected binding from the model observed in a native `request/header`. The initial preset is a rubric, not a claim that it improves quality, elapsed time or subscription usage. Enno, Deep, children, chat, review continuation and protected Lisp execution retain their existing owners. Automatic escalation after a failed implementation pass is not enabled.
|
|
41
41
|
|
package/docs/store-evidence.md
CHANGED
|
@@ -17,6 +17,12 @@ permissions, and disposable-profile result independently.
|
|
|
17
17
|
| npm lifecycle | `prepare: npm run build` |
|
|
18
18
|
| Automatic size policy | intentionally exceeded; manual `user-reviewed` track |
|
|
19
19
|
|
|
20
|
+
This table records the **0.1.3 review snapshot**, including its original lifecycle
|
|
21
|
+
command; it is not the current package's release evidence. Current source uses
|
|
22
|
+
`prepare: node scripts/prepare-build.mjs` with normal builds and an explicit CI-only
|
|
23
|
+
deferral. See [current lifecycle and permissions](../PERMISSIONS.md#installation-lifecycle)
|
|
24
|
+
and [CI build ownership](verification.md#consolidated-duplicate-invocations).
|
|
25
|
+
|
|
20
26
|
The Commit field is filled only after the user commits and pushes the verified
|
|
21
27
|
working tree. The catalog must point to that full immutable Commit, not a branch
|
|
22
28
|
name or moving tag.
|
package/docs/typed-decisions.md
CHANGED
|
@@ -23,11 +23,16 @@ excerpted or rewritten, and classification grants no execution permission.
|
|
|
23
23
|
The common API also accepts explicit `noul` (yes probability) and `score`
|
|
24
24
|
(ordered rubric) questions. Their validated answers have `status: "measured"`;
|
|
25
25
|
they grant no permission. The existing Choice request and answer shapes remain
|
|
26
|
-
valid. TypeSafe can evaluate all three question types in one batch. Nimble and
|
|
26
|
+
valid. TypeSafe and OpenAI can evaluate all three question types in one batch. Nimble and
|
|
27
27
|
Laya accept Choice only and return `DECISION_UNSUPPORTED` before inference for
|
|
28
28
|
other kinds. The separate Lisp `kioku.typesafe:evaluate` API retains its own
|
|
29
29
|
wire contract.
|
|
30
30
|
|
|
31
|
+
The configured provider (`typedDecisions.provider`, default `typesafe`) is the default
|
|
32
|
+
for new requests whenever this project has no saved selection. `/kioku-decisions use`
|
|
33
|
+
still saves an explicit project selection, which the configured default never
|
|
34
|
+
overwrites; `use default` returns to it.
|
|
35
|
+
|
|
31
36
|
Switch backends in DSH without a restart:
|
|
32
37
|
|
|
33
38
|
```text
|
|
@@ -49,6 +54,59 @@ base configuration. A stale host cannot overwrite a selection saved by another
|
|
|
49
54
|
host; restart it to load the latest choice. Changing the base configuration uses
|
|
50
55
|
that configuration's selection, with the YAML provider as the default.
|
|
51
56
|
|
|
57
|
+
<a id="openai-credentials"></a>
|
|
58
|
+
## OpenAI credentials
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
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.
|
|
63
|
+
|
|
64
|
+
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:
|
|
65
|
+
|
|
66
|
+
| Configuration | Credential file |
|
|
67
|
+
|---|---|
|
|
68
|
+
| Default harness home | `~/.dsh/.credentials.yaml` |
|
|
69
|
+
| Custom `DSH_HOME` | `$DSH_HOME/.credentials.yaml` |
|
|
70
|
+
| Explicit `credentials.path` (the provider's `config.path`) | The configured path, overriding the home default |
|
|
71
|
+
|
|
72
|
+
`--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`.
|
|
73
|
+
|
|
74
|
+
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:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
version: 1
|
|
78
|
+
refs:
|
|
79
|
+
OPENAI_API_KEY: "OPENAI_API_KEY_EXAMPLE_ONLY"
|
|
80
|
+
records: {}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Replace the placeholder privately with your key. On macOS/Linux, protect the actual file; for the default path:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
chmod 600 "$HOME/.dsh/.credentials.yaml"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
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.
|
|
90
|
+
|
|
91
|
+
3. In DSH's command input, select OpenAI and inspect the result:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
/kioku-decisions use openai
|
|
95
|
+
/kioku-decisions status
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`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.
|
|
99
|
+
|
|
100
|
+
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:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
export OPENAI_API_KEY='OPENAI_API_KEY_EXAMPLE_ONLY'
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
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.
|
|
107
|
+
|
|
108
|
+
## Provider configuration
|
|
109
|
+
|
|
52
110
|
Configure `typedDecisions` on the full plugin or modular core:
|
|
53
111
|
|
|
54
112
|
OpenAI uses the distinct official [Decisions API](https://developers.openai.com/api/docs/guides/decisions),
|
|
@@ -56,21 +114,43 @@ OpenAI uses the distinct official [Decisions API](https://developers.openai.com/
|
|
|
56
114
|
It maps Choice, Noul (predicate) and Score to the native API and validates ordered
|
|
57
115
|
named answers, distributions, rubric levels and individual refusals. The default
|
|
58
116
|
model is `gpt-6-luna`; probability ≥ 0.9 and margin ≥ 0.2 are required for Choice.
|
|
59
|
-
|
|
60
|
-
|
|
117
|
+
Kiokuko resolves `OPENAI_API_KEY` through `ctx.credentials.resolve` when the service
|
|
118
|
+
exists; the standard local provider includes the launch environment and `.env`
|
|
119
|
+
fallbacks described [above](#openai-credentials). Only a composition without that
|
|
120
|
+
service uses Kiokuko's direct `process.env` fallback. A different credential
|
|
121
|
+
provider may have different resolution rules. TypeSafe credentials are never substituted. No redirects,
|
|
61
122
|
automatic retries, or provider fallback are added. `use openai` probes before
|
|
62
123
|
persisting; missing credentials, failed probes and cancellation leave selection unchanged.
|
|
63
124
|
Existing Jev/Laya stored configuration digests retain their original shape.
|
|
64
125
|
Current token records retain input/output totals; cached-token breakdown is not recorded.
|
|
65
126
|
|
|
127
|
+
To select OpenAI in the plugin or core configuration instead of a project command:
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
typedDecisions:
|
|
131
|
+
mode: auto
|
|
132
|
+
provider: openai
|
|
133
|
+
openai:
|
|
134
|
+
model: gpt-6-luna
|
|
135
|
+
timeoutMs: 5000
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Keep keys in the credential store, not in `typedDecisions`. A configured provider
|
|
139
|
+
is not evidence of a successful API call; use the command probe to verify access.
|
|
140
|
+
|
|
66
141
|
The normal startup card offers the four decision/Lisp ON/OFF combinations and Cancel
|
|
67
142
|
in one question before model tool assembly. It uses the currently selected backend,
|
|
68
143
|
shown in the card; selection does not prove authentication or successful inference.
|
|
144
|
+
`startupDefaults.decision` and `startupDefaults.lisp` (default `ask`) mark one of those
|
|
145
|
+
options as the preset; the native question UI preselects a label ending in
|
|
146
|
+
` (Recommended)`, so the card still opens editable. A preset grants no authority.
|
|
69
147
|
Immutable existing decision bindings also retain the task choice, without granting
|
|
70
148
|
tool or file authority. The same request and explicit continuation reuse the choice;
|
|
71
|
-
an unrelated new request asks again. Cancel/Skip starts no task. Headless operation
|
|
72
|
-
|
|
73
|
-
|
|
149
|
+
an unrelated new request asks again. Cancel/Skip starts no task. Headless operation with `ask` keeps the
|
|
150
|
+
configured decision mode and explicit manual Lisp preference; `on`/`off` supply that
|
|
151
|
+
answer instead. An explicit
|
|
152
|
+
`typedDecisions.startup: { decision: true, lisp: true }` config selects both and
|
|
153
|
+
outranks the startup defaults for binding.
|
|
74
154
|
Runtime failures retain the choice and permit explicit recovery without a new question.
|
|
75
155
|
|
|
76
156
|
Semantic-comparison diagnostics retain only the known criterion names
|
|
@@ -129,7 +209,8 @@ A live comparison requires explicit
|
|
|
129
209
|
`TYPESAFE_API_KEY`; it sends only the checked-in synthetic fixture and must not
|
|
130
210
|
be interpreted as a production accuracy estimate.
|
|
131
211
|
|
|
132
|
-
|
|
212
|
+
The following commands manage only the TypeSafe/Jev key; for OpenAI, use the
|
|
213
|
+
[credential-file setup](#openai-credentials). Set the TypeSafe key through DSH, then inspect status:
|
|
133
214
|
|
|
134
215
|
```text
|
|
135
216
|
/kioku-typesafe-key <key>
|
package/docs/typesafe.md
CHANGED
|
@@ -31,9 +31,14 @@ not verified. Invoke the same command with a new key to replace it immediately.
|
|
|
31
31
|
|
|
32
32
|
The first command reports configuration, source and writability. Clear removes
|
|
33
33
|
the stored key and reports any remaining source. DSH resolves `TYPESAFE_API_KEY`
|
|
34
|
-
for each call.
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
for each call. With the standard credentials-local provider, the saved file wins,
|
|
35
|
+
then the launch environment, project `.env` and harness-home `.env`. Saving writes
|
|
36
|
+
the higher-priority file even when an environment fallback exists. Default file
|
|
37
|
+
watching applies valid edits without a restart; an environment-only change must
|
|
38
|
+
be present when DSH is launched. Preserve existing `refs` and `records`.
|
|
39
|
+
See [credential paths, permissions and precedence](typed-decisions.md#openai-credentials).
|
|
40
|
+
Those storage rules also apply to `TYPESAFE_API_KEY`, but `/kioku-typesafe-key`
|
|
41
|
+
does not set `OPENAI_API_KEY`; ChatGPT/Codex OAuth is separate from both keys.
|
|
37
42
|
With no credential provider, evaluation can use the host's `TYPESAFE_API_KEY`,
|
|
38
43
|
but save/clear return `TYPESAFE_STORAGE_UNAVAILABLE`. Kiokuko creates no separate
|
|
39
44
|
credential file and never supplies the key to workers or their subprocesses.
|
package/docs/verification.md
CHANGED
|
@@ -15,9 +15,19 @@ Native fixture preparation is deferred until a selected, executable check declar
|
|
|
15
15
|
root dependencies (`npm ci`), not the DSH runtime fixture. Missing or invalid native
|
|
16
16
|
fixtures remain `prerequisite-missing` for checks that require them.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
CI schedules **Linux x64** and **macOS ARM64**. Full selection has 21 jobs:
|
|
19
|
+
selection, two native micro-judge builds, 17 verification lanes and the aggregate.
|
|
20
|
+
Linux ARM64 is not scheduled or claimed as CI coverage. Its runtime/build support
|
|
21
|
+
remains in the native target registry; this workflow does not produce its binary.
|
|
22
|
+
|
|
23
|
+
The required `verify` aggregate consumes `select`, `micro-judge-native` and `checks`.
|
|
24
|
+
Every selected lane and native artifact must be present, successful, fresh and
|
|
25
|
+
bound to the same selected plan and source. Failure, cancellation, a missing
|
|
26
|
+
selected report, an extra target or an altered artifact fails acceptance. Only
|
|
27
|
+
prose-only selection can legitimately skip both executable job groups. The
|
|
28
|
+
remaining Linux x64/macOS ARM64 check inventories and their deadlines are unchanged.
|
|
29
|
+
The CI review bundle contains exactly its selected targets; standalone native
|
|
30
|
+
bundle verification still requires the complete supported-target inventory.
|
|
21
31
|
|
|
22
32
|
Output defaults to a fresh OS temporary directory. Supply an empty directory
|
|
23
33
|
outside the repository with `--output`. `plan.json`, per-command logs, official
|
|
@@ -80,6 +90,21 @@ arbitrary stdout or a successful no-op process is insufficient.
|
|
|
80
90
|
|
|
81
91
|
## Consolidated duplicate invocations
|
|
82
92
|
|
|
93
|
+
Selected CI dependency installs set `KIOKUKO_CI_DEFER_PREPARE=1` only on the root
|
|
94
|
+
`npm ci` step. With `CI=true`, this defers this package's `prepare` build to the
|
|
95
|
+
verifier's required clean build; it does not disable dependency lifecycle scripts.
|
|
96
|
+
Ordinary npm/pnpm preparation still builds, including in CI without this explicit
|
|
97
|
+
flag, and build failure remains a failed prepare. The verifier's source/build
|
|
98
|
+
digests, packed-artifact receipts and stale-source rejection remain mandatory.
|
|
99
|
+
|
|
100
|
+
For full coverage, Linux ARM64 removal changes the planned job count from 27 to
|
|
101
|
+
21 and official DSH fixture builds from 19 to 15. Deferring prepare removes one
|
|
102
|
+
redundant plugin build in each of the remaining 17 verification lanes. This is an
|
|
103
|
+
execution-plan comparison, not a measured hosted-CI duration improvement. Official
|
|
104
|
+
DSH still builds separately for each selected fixture lane; no OS/architecture,
|
|
105
|
+
Node/ABI or native dependency is reused across platforms.
|
|
106
|
+
|
|
107
|
+
|
|
83
108
|
- `skill-prompts` is covered by `native-unit`: `tests/dsh/unit/skill-compiler.test.ts`, `tests/dsh/unit/skill-snapshot.test.ts`.
|
|
84
109
|
- `index-reasoning` is covered by `native-integration`: `tests/dsh/integration/index-reasoning.test.ts`, `tests/dsh/integration/index-reasoning-native.test.ts`, `tests/dsh/integration/index-reasoning-evaluation.test.ts`.
|
|
85
110
|
- `index-evaluation` is covered by `native-integration`: `tests/dsh/integration/index-reasoning-evaluation.test.ts`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiokuko-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38",
|
|
4
4
|
"description": "Kiokuko plugin for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"skills/",
|
|
25
25
|
"dsh/cordis.patch.yml",
|
|
26
26
|
"docs/",
|
|
27
|
+
"scripts/prepare-build.mjs",
|
|
27
28
|
"scripts/backfill-akinator-memory.mjs",
|
|
28
29
|
"scripts/setup-dsh.mjs",
|
|
29
30
|
"scripts/repair-session-log.mjs",
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
"Enabled source-candidate assessment distinguishes unavailable and incomplete checks from proof; the micro judge is native-verified on Apple Silicon macOS only, unsupported platforms report unavailable, and explicit typed-decision OFF records no assessment"
|
|
169
170
|
],
|
|
170
171
|
"lifecycleEvidence": [
|
|
171
|
-
"prepare
|
|
172
|
+
"prepare builds by default; selected CI installs defer to the verifier clean build",
|
|
172
173
|
"Git installs use repository-scoped pnpm allowBuilds approval on a supporting pnpm version; source revision pinning is optional and separate",
|
|
173
174
|
"Disposable-profile install, Web start, and uninstall evidence is recorded by CI"
|
|
174
175
|
]
|
|
@@ -201,7 +202,7 @@
|
|
|
201
202
|
"publint": "publint",
|
|
202
203
|
"pack:check": "node scripts/pack-check.mjs",
|
|
203
204
|
"prepublishOnly": "node scripts/prepublish.mjs",
|
|
204
|
-
"prepare": "
|
|
205
|
+
"prepare": "node scripts/prepare-build.mjs",
|
|
205
206
|
"test:agenticreplay:package": "npm run build && node scripts/verify-agenticreplay-consumer.mjs && node scripts/verify-agenticreplay-consumer.mjs --pnpm",
|
|
206
207
|
"test:memory-review": "node scripts/run-tests.mjs tests/dsh/unit/memory-review tests/dsh/integration/memory-review",
|
|
207
208
|
"test:evolution": "node scripts/run-tests.mjs tests/dsh/unit/evolution tests/dsh/integration/evolution",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// CI dependency installation may defer only this package's duplicate build.
|
|
2
|
+
// Dependency lifecycle scripts still run; the selected verifier builds from source.
|
|
3
|
+
import { spawnSync } from 'node:child_process'
|
|
4
|
+
|
|
5
|
+
if (process.env.CI === 'true' && process.env.KIOKUKO_CI_DEFER_PREPARE === '1') {
|
|
6
|
+
console.log('Deferring package prepare build to the selected verifier clean build.')
|
|
7
|
+
} else {
|
|
8
|
+
const runner=process.env.npm_execpath
|
|
9
|
+
if (!runner) throw new Error('Run prepare through npm or pnpm.')
|
|
10
|
+
const result=spawnSync(process.execPath,[runner,'run','build'],{stdio:'inherit'})
|
|
11
|
+
if (result.error) throw result.error
|
|
12
|
+
process.exitCode=result.status ?? 1
|
|
13
|
+
}
|
package/scripts/setup-dsh.mjs
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { parseArgs } from 'node:util'
|
|
2
|
-
import { setupDsh } from '../dist/dsh/setup.js'
|
|
2
|
+
import { removeDshSetup, setupDsh } from '../dist/dsh/setup.js'
|
|
3
3
|
|
|
4
4
|
try {
|
|
5
5
|
const { values } = parseArgs({ options: {
|
|
6
6
|
cwd: { type: 'string' }, home: { type: 'string' },
|
|
7
7
|
check: { type: 'boolean', default: false }, json: { type: 'boolean', default: false },
|
|
8
|
+
remove: { type: 'boolean', default: false },
|
|
8
9
|
} })
|
|
9
|
-
const result = await setupDsh({ cwd: values.cwd, homeDirectory: values.home, check: values.check })
|
|
10
|
+
const result = await (values.remove ? removeDshSetup : setupDsh)({ cwd: values.cwd, homeDirectory: values.home, check: values.check })
|
|
10
11
|
if (values.json) console.log(JSON.stringify(result, null, 2))
|
|
11
|
-
else {
|
|
12
|
+
else if (values.remove) {
|
|
13
|
+
console.log(values.check ? result.current ? 'Removal is current.' : 'Removal is needed; run again without --check.' : 'Removal complete.')
|
|
14
|
+
console.log(`Skills: ${result.skills.directory} (${result.skills.removed} ${values.check ? 'removable' : 'removed'}, ${result.skills.preserved} preserved)`)
|
|
15
|
+
console.log(`Project instructions: ${result.instructions.path} (${result.instructions.status})`)
|
|
16
|
+
} else {
|
|
12
17
|
console.log(values.check ? result.current ? 'Setup is current.' : 'Setup needs updating; run again without --check.' : 'Setup complete. Reload existing sessions to refresh their instructions.')
|
|
13
18
|
console.log(`Skills: ${result.skills.directory} (${result.skills.created} ${values.check ? 'missing' : 'created'}, ${result.skills.updated} ${values.check ? 'stale' : 'updated'}, ${result.skills.unchanged} unchanged)`)
|
|
14
19
|
console.log(`Project instructions: ${result.instructions.path} (${result.instructions.status})`)
|