kiokuko-dsh 0.1.44 → 0.1.46
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 +34 -3
- package/README.ja.md +8 -3
- package/README.ko.md +8 -3
- package/README.md +8 -3
- package/README.zh-CN.md +8 -3
- package/dist/client.cjs +22 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/dsh/config.d.ts +2 -0
- package/dist/dsh/config.d.ts.map +1 -1
- package/dist/dsh/config.js +2 -0
- package/dist/dsh/config.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +76 -54
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/index.d.ts.map +1 -1
- package/dist/dsh/index.js +2 -0
- package/dist/dsh/index.js.map +1 -1
- package/dist/dsh/input-claim.d.ts +2 -0
- package/dist/dsh/input-claim.d.ts.map +1 -1
- package/dist/dsh/input-claim.js +8 -0
- package/dist/dsh/input-claim.js.map +1 -1
- package/dist/dsh/japanese-output-skill.d.ts +2 -0
- package/dist/dsh/japanese-output-skill.d.ts.map +1 -1
- package/dist/dsh/japanese-output-skill.js +6 -1
- package/dist/dsh/japanese-output-skill.js.map +1 -1
- package/dist/dsh/managed-file-deployment.d.ts +11 -0
- package/dist/dsh/managed-file-deployment.d.ts.map +1 -0
- package/dist/dsh/managed-file-deployment.js +73 -0
- package/dist/dsh/managed-file-deployment.js.map +1 -0
- package/dist/dsh/orca-host.d.ts.map +1 -1
- package/dist/dsh/orca-host.js +16 -5
- package/dist/dsh/orca-host.js.map +1 -1
- package/dist/dsh/orca-session-choice.d.ts +7 -2
- package/dist/dsh/orca-session-choice.d.ts.map +1 -1
- package/dist/dsh/orca-session-choice.js +14 -3
- package/dist/dsh/orca-session-choice.js.map +1 -1
- package/dist/dsh/setup.d.ts +23 -0
- package/dist/dsh/setup.d.ts.map +1 -0
- package/dist/dsh/setup.js +83 -0
- package/dist/dsh/setup.js.map +1 -0
- package/dist/dsh/standard-skill-deployment.d.ts +15 -0
- package/dist/dsh/standard-skill-deployment.d.ts.map +1 -0
- package/dist/dsh/standard-skill-deployment.js +47 -0
- package/dist/dsh/standard-skill-deployment.js.map +1 -0
- package/dist/dsh/standard-skill-integrity.js +1 -1
- package/dist/dsh/standard-skills.d.ts +8 -1
- package/dist/dsh/standard-skills.d.ts.map +1 -1
- package/dist/dsh/standard-skills.js +9 -2
- package/dist/dsh/standard-skills.js.map +1 -1
- package/docs/dsh-plugin.md +96 -29
- package/docs/orca-recording.md +30 -17
- package/dsh/cordis.patch.yml +2 -0
- package/package.json +6 -2
- package/scripts/setup-dsh.mjs +20 -0
- package/skills/japanese-translation-for-oss-models/SKILL.md +146 -586
- package/skills/kiokuko-enno-oduno/SKILL.md +37 -50
- package/skills/kiokuko-simple-work/SKILL.md +21 -66
- package/skills/kiokuko-single-purpose-functions/SKILL.md +20 -35
- package/skills/kiokuko-single-purpose-functions/references/review-checklist.md +1 -8
- package/skills/kiokuko-soul/SKILL.md +17 -51
- package/skills/kiokuko-ui-design-soul/SKILL.md +13 -28
- package/skills/kiokuko-ui-design-soul/references/ui-checklist.md +12 -10
- package/skills/memory-reasoning/SKILL.md +15 -32
- package/skills/veteran-programmer-skill/SKILL.md +64 -0
package/PERMISSIONS.md
CHANGED
|
@@ -10,6 +10,24 @@ Kiokuko operation.
|
|
|
10
10
|
repository metadata.
|
|
11
11
|
- Writes the configured Kiokuko database and pre-migration backups, including
|
|
12
12
|
DSH leases, receipts, retrieval state, and embedding state.
|
|
13
|
+
- Stores the first native input batch of each governed turn in that database
|
|
14
|
+
for recovery before model or tool execution. This is an input-message copy,
|
|
15
|
+
not a backup of the workspace or whole session. Later step inputs do not
|
|
16
|
+
replace it. Storage failure cannot veto the native turn; observed model or
|
|
17
|
+
tool execution prevents automatic input replay.
|
|
18
|
+
- On enabled plugin load, synchronizes all eight bundled Skills and their
|
|
19
|
+
references to `~/.agents/skills/` before registering the DSH surfaces. Creates
|
|
20
|
+
missing files and atomically replaces files carrying their exact Kiokuko
|
|
21
|
+
management marker. Leaves unrelated files untouched and refuses unmanaged
|
|
22
|
+
collisions, symbolic links, and unsafe parent directories. A synchronization
|
|
23
|
+
failure warns that deployed copies may be stale; the bundled DSH provider
|
|
24
|
+
remains available. Interrupted synchronization resumes on the next load.
|
|
25
|
+
- On enabled plugin load, replaces only the existing Kiokuko managed block in
|
|
26
|
+
the startup directory’s `AGENTS.md` with the DSH host-owned contract. Preserves
|
|
27
|
+
instructions outside the markers; absent or unmanaged files stay untouched.
|
|
28
|
+
Refuses linked files or ambiguous markers. The bundled `scripts/setup-dsh.mjs`
|
|
29
|
+
provides the same repair for an explicit workspace and a read-only `--check`.
|
|
30
|
+
It does not scan parent/global instruction files or other session workspaces.
|
|
13
31
|
- On plugin load, enumerates stored DSH session IDs and validates each history.
|
|
14
32
|
When DSH rejects a v3 history containing legacy Kiokuko informational
|
|
15
33
|
events, reads that exact native session file and marks the five supported
|
|
@@ -62,6 +80,13 @@ profile, contact an external service, or edit user configuration. A Git source
|
|
|
62
80
|
install must pin a full commit and authorize the exact generated archive key
|
|
63
81
|
with pnpm `allowBuilds`; the npm tarball already contains `dist/`.
|
|
64
82
|
|
|
83
|
+
After `pnpm dsh plugin --profile web update kiokuko-dsh --latest`, reload the DSH
|
|
84
|
+
plugin or restart DSH. The newly loaded package synchronizes the standard Skills
|
|
85
|
+
before the first conversation; npm installation itself does not write them.
|
|
86
|
+
Other agents that cache `~/.agents/skills/` must reload their Skill catalog.
|
|
87
|
+
`natural-japanese-output` is deployed under `japanese-translation-for-oss-models/`,
|
|
88
|
+
matching its bundled directory; its public Skill name remains unchanged.
|
|
89
|
+
|
|
65
90
|
## Failure boundaries
|
|
66
91
|
|
|
67
92
|
`/deep-planning` creates native read-only child agents using explicitly selected
|
|
@@ -83,9 +108,15 @@ run.
|
|
|
83
108
|
## Orca recordings
|
|
84
109
|
|
|
85
110
|
`orca.enabled` defaults to `true`, including in the installed bundle configuration.
|
|
86
|
-
This enables the feature
|
|
87
|
-
|
|
88
|
-
|
|
111
|
+
This enables the feature, and configuration also approves it: each interactive
|
|
112
|
+
session is recorded without a question, and delegated or managed child sessions
|
|
113
|
+
follow the same default without ever being asked. `orca.askOnStart: true`
|
|
114
|
+
restores the per-session question instead, and child sessions then need an
|
|
115
|
+
explicit `/kioku-orca start`. Default recording, an affirmative answer or
|
|
116
|
+
`/kioku-orca start` authorize capture. Choices are
|
|
117
|
+
saved in SQLite and outrank the default, so a saved refusal keeps that session
|
|
118
|
+
unrecorded; with `askOnStart: true`, skip/cancel or unavailable UI continues
|
|
119
|
+
without recording.
|
|
89
120
|
Set it to `false` and reload to disable the feature. The runtime dependencies
|
|
90
121
|
`@orcareplay/core`, `@orcareplay/schema`, and `@orcareplay/viewer` with range `>=0.2.1`
|
|
91
122
|
are installed automatically by npm/pnpm with this package. No extra installer,
|
package/README.ja.md
CHANGED
|
@@ -27,10 +27,10 @@ pnpm dsh web
|
|
|
27
27
|
起動後は普通に依頼を入力します。Kiokuko 専用の setup 操作は不要です。
|
|
28
28
|
GitHub・ローカルからの導入は [プラグインガイド](docs/dsh-plugin.md) を参照してください。
|
|
29
29
|
|
|
30
|
-
OrcaReplay
|
|
31
|
-
|
|
30
|
+
OrcaReplay の機能設定は自動導入され、**手動設定は不要**です。各チャットは確認なしで詳細ログを記録します。
|
|
31
|
+
記録すると、モデル応答やツール実行結果が作業プロジェクトの `.orca/runs/` に保存されます。判断はセッションごとに保持されるため、`/kioku-orca stop` したチャットは記録されないままです。毎回確認したい場合は `orca.askOnStart: true` を設定します。
|
|
32
32
|
|
|
33
|
-
- `/kioku-orca start`:
|
|
33
|
+
- `/kioku-orca start`: 手動で記録を開始、または停止後に再開します。そのチャットを停止していなければ実行不要です。過去の動作は記録されません。
|
|
34
34
|
- `/kioku-orca status`: 記録状態・保存先・次の操作を短く表示します。診断用の詳細情報は `/kioku-orca status --json` で確認できます。
|
|
35
35
|
|
|
36
36
|
`/kioku-orca stop` でログを確定後、`list` で run ID を確認し、`show <run ID>` で内容を表示、`export <run ID>` で HTML を出力できます(いずれも `/kioku-orca` に続けて入力)。
|
|
@@ -44,8 +44,13 @@ OrcaReplay の機能設定は自動導入され、**手動設定は不要**で
|
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
pnpm dsh plugin --profile web update kiokuko-dsh --latest
|
|
47
|
+
pnpm dsh web
|
|
47
48
|
```
|
|
48
49
|
|
|
50
|
+
起動時に、日本語出力を含む全8 Skillと参照ファイルを `~/.agents/skills/` へ同期します。不足分を作成し、管理対象の旧版を更新します。非管理ファイルは上書きしません。他のエージェントではSkillカタログの再読み込みが必要です。
|
|
51
|
+
|
|
52
|
+
起動時には、起動ディレクトリの `AGENTS.md` にある既存の Kiokuko 管理ブロックも更新し、その外側の指示は保持します。パッケージ更新後は DSH を再起動してください。別の作業ディレクトリや配備コピーの確認・修復は[セットアップ手順](docs/dsh-plugin.md#what-setup-updates-and-when)を参照してください。`kiokuko use` は DSH のセットアップコマンドではありません。
|
|
53
|
+
|
|
49
54
|
Orca の 0.3.0 などが公開された後、Orca 関連の依存を更新する場合:
|
|
50
55
|
|
|
51
56
|
```bash
|
package/README.ko.md
CHANGED
|
@@ -22,10 +22,10 @@ pnpm dsh web
|
|
|
22
22
|
시작 후 평소처럼 작업을 입력하면 됩니다. Kiokuko 전용 setup 작업은 필요하지 않습니다.
|
|
23
23
|
GitHub 및 로컬 설치 방법은 [플러그인 안내](docs/dsh-plugin.md)를 참고하세요.
|
|
24
24
|
|
|
25
|
-
OrcaReplay 기능은 자동으로 설정되며 **수동 설정이 필요 없습니다**.
|
|
26
|
-
|
|
25
|
+
OrcaReplay 기능은 자동으로 설정되며 **수동 설정이 필요 없습니다**. 각 채팅은 확인 없이 상세 로그를 기록합니다.
|
|
26
|
+
기록하면 이후 모델 응답과 도구 실행 결과가 세션 작업 공간의 `.orca/runs/`에 저장됩니다. 결정은 세션별로 유지되므로 `/kioku-orca stop`한 채팅은 기록하지 않은 상태로 남습니다. 채팅 시작 시 확인하려면 `orca.askOnStart: true`를 설정하세요.
|
|
27
27
|
|
|
28
|
-
- `/kioku-orca start`: 기록을 수동으로 시작하거나 중지 후 다시 시작합니다.
|
|
28
|
+
- `/kioku-orca start`: 기록을 수동으로 시작하거나 중지 후 다시 시작합니다. 해당 채팅을 중지하지 않았다면 실행할 필요가 없습니다. 과거 동작은 기록되지 않습니다.
|
|
29
29
|
- `/kioku-orca status`: 기록 상태, 저장 위치와 다음 동작을 간단히 표시합니다. 진단용 상세 정보는 `/kioku-orca status --json`으로 확인할 수 있습니다.
|
|
30
30
|
|
|
31
31
|
`/kioku-orca stop`으로 로그를 확정한 뒤 `list`로 run ID를 확인하고, `show <run ID>`로 내용을 보거나 `export <run ID>`로 HTML을 내보낼 수 있습니다(모두 `/kioku-orca` 뒤에 입력).
|
|
@@ -37,8 +37,13 @@ OrcaReplay 기능은 자동으로 설정되며 **수동 설정이 필요 없습
|
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
pnpm dsh plugin --profile web update kiokuko-dsh --latest
|
|
40
|
+
pnpm dsh web
|
|
40
41
|
```
|
|
41
42
|
|
|
43
|
+
시작 시 일본어 출력 Skill을 포함한 번들 Skill 8개와 참조 파일을 `~/.agents/skills/`에 동기화합니다. 누락된 파일을 만들고 관리 대상 복사본을 업데이트하며, 비관리 파일은 덮어쓰지 않습니다. 다른 에이전트에서는 Skill 카탈로그를 다시 로드해야 합니다.
|
|
44
|
+
|
|
45
|
+
시작 시 시작 디렉터리의 `AGENTS.md`에 있는 기존 Kiokuko 관리 블록도 갱신하며, 블록 밖의 지침은 보존합니다. 패키지 업데이트 후 DSH를 다시 시작하세요. 다른 작업 디렉터리나 오래된 복사본의 확인 및 복구는 [설정 절차](docs/dsh-plugin.md#what-setup-updates-and-when)를 참고하세요. `kiokuko use`는 DSH 설정 명령이 아닙니다.
|
|
46
|
+
|
|
42
47
|
Orca 0.3.0 등 새 버전이 공개된 후 Orca 관련 의존 패키지를 업데이트하려면:
|
|
43
48
|
|
|
44
49
|
```bash
|
package/README.md
CHANGED
|
@@ -28,10 +28,10 @@ If you use a globally installed `dsh` CLI, omit `pnpm` from the commands.
|
|
|
28
28
|
Enter your task normally; no Kiokuko setup command is needed.
|
|
29
29
|
For GitHub/local installation, see the [plugin guide](docs/dsh-plugin.md).
|
|
30
30
|
|
|
31
|
-
OrcaReplay is configured automatically; **no manual setup is required**.
|
|
32
|
-
|
|
31
|
+
OrcaReplay is configured automatically; **no manual setup is required**. Every chat records detailed logs without asking.
|
|
32
|
+
Recording saves model responses and tool results to `.orca/runs/` in the session workspace. A decision is remembered per session, so `/kioku-orca stop` keeps that chat unrecorded; set `orca.askOnStart: true` to ask at the start of each chat instead.
|
|
33
33
|
|
|
34
|
-
- `/kioku-orca start`: start recording manually or resume after stopping. Not needed
|
|
34
|
+
- `/kioku-orca start`: start recording manually or resume after stopping. Not needed unless this chat was stopped earlier; past activity is not captured.
|
|
35
35
|
- `/kioku-orca status`: briefly show the recording state, storage location, and next action. Use `/kioku-orca status --json` for diagnostic details.
|
|
36
36
|
|
|
37
37
|
Use `/kioku-orca stop` to finalize the log, `list` to find its run ID, `show <run ID>` to inspect it, and `export <run ID>` to create HTML (all under `/kioku-orca`).
|
|
@@ -43,8 +43,13 @@ Finish active tasks and stop DSH before updating. Update the npm-installed plugi
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
pnpm dsh plugin --profile web update kiokuko-dsh --latest
|
|
46
|
+
pnpm dsh web
|
|
46
47
|
```
|
|
47
48
|
|
|
49
|
+
At startup, all eight bundled Skills (including Japanese output) and their references are synchronized to `~/.agents/skills/`. Missing files are created and managed copies are updated; unmanaged files are preserved. Other agents must reload their Skill catalog.
|
|
50
|
+
|
|
51
|
+
Startup also refreshes an existing Kiokuko managed block in the startup directory’s `AGENTS.md`, preserving your other instructions. Restart DSH after updating the package. See [setup and verification](docs/dsh-plugin.md#what-setup-updates-and-when) for another workspace or stale copies; `kiokuko use` is not the DSH setup command.
|
|
52
|
+
|
|
48
53
|
To update Orca dependencies after a release such as 0.3.0:
|
|
49
54
|
|
|
50
55
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -22,10 +22,10 @@ pnpm dsh web
|
|
|
22
22
|
启动后直接输入任务,无需额外的 Kiokuko setup 操作。
|
|
23
23
|
GitHub 和本地安装方式见[插件指南](docs/dsh-plugin.md)。
|
|
24
24
|
|
|
25
|
-
OrcaReplay
|
|
26
|
-
|
|
25
|
+
OrcaReplay 的功能配置会自动安装,**无需手动设置**。每次聊天都会在无需确认的情况下记录详细日志。
|
|
26
|
+
记录后,后续模型回复和工具执行结果将保存到会话工作目录的 `.orca/runs/`。决定按会话保存,因此执行过 `/kioku-orca stop` 的聊天保持不记录。若想在聊天开始时确认,请设置 `orca.askOnStart: true`。
|
|
27
27
|
|
|
28
|
-
- `/kioku-orca start
|
|
28
|
+
- `/kioku-orca start`:手动开始记录,或在停止后重新开始。若该聊天未被停止,则无需执行。不会补录过去的活动。
|
|
29
29
|
- `/kioku-orca status`:简要显示记录状态、保存位置和下一步操作。诊断详情可用 `/kioku-orca status --json` 查看。
|
|
30
30
|
|
|
31
31
|
用 `/kioku-orca stop` 完成日志记录后,用 `list` 查看 run ID、`show <run ID>` 查看内容、`export <run ID>` 导出 HTML(均在 `/kioku-orca` 后输入)。
|
|
@@ -37,8 +37,13 @@ OrcaReplay 的功能配置会自动安装,**无需手动设置**。聊天开
|
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
pnpm dsh plugin --profile web update kiokuko-dsh --latest
|
|
40
|
+
pnpm dsh web
|
|
40
41
|
```
|
|
41
42
|
|
|
43
|
+
启动时会将包括日语输出在内的全部8个内置 Skill 及其引用文件同步到 `~/.agents/skills/`,创建缺失文件并更新受管理的副本,不覆盖非受管理文件。其他代理需要重新加载 Skill 目录。
|
|
44
|
+
|
|
45
|
+
启动时也会更新启动目录中 `AGENTS.md` 的现有 Kiokuko 管理块,保留块外的指令。更新包后请重启 DSH。其他工作目录或旧副本的检查与修复请参阅[设置步骤](docs/dsh-plugin.md#what-setup-updates-and-when)。`kiokuko use` 不是 DSH 的设置命令。
|
|
46
|
+
|
|
42
47
|
Orca 发布 0.3.0 等新版本后,更新 Orca 相关依赖:
|
|
43
48
|
|
|
44
49
|
```bash
|
package/dist/client.cjs
CHANGED
|
@@ -322,16 +322,8 @@ window.__ModuleLoader__.load({
|
|
|
322
322
|
] });
|
|
323
323
|
}
|
|
324
324
|
const intakeDrafts = new WeakMap();
|
|
325
|
-
/**
|
|
326
|
-
|
|
327
|
-
* pair is matched exactly: another plugin's question that happens to share one
|
|
328
|
-
* half falls through to the native composer. `supported` keeps the option count
|
|
329
|
-
* inside the 1-9 range the number-key shortcut can address.
|
|
330
|
-
*/
|
|
331
|
-
const INTAKE_QUESTIONS = [
|
|
332
|
-
{ id: 'taskType', header: 'Kiokuko · 作業の選択' },
|
|
333
|
-
{ id: 'kioku-orca-recording', header: 'OrcaReplay · 詳細ログ' },
|
|
334
|
-
];
|
|
325
|
+
/** Option count a single number key addresses: the range the shortcut card covers. */
|
|
326
|
+
const DIGIT_ADDRESSABLE_OPTIONS = 9;
|
|
335
327
|
const ENNO_SELECTION_QUESTIONS = [
|
|
336
328
|
'enno-execution-mode', 'enno-model-source', 'enno-template', 'enno-template-provider',
|
|
337
329
|
'enno-template-unavailable', 'enno-bind-provider', 'enno-model-review', 'enno-catalog-retry',
|
|
@@ -351,19 +343,31 @@ window.__ModuleLoader__.load({
|
|
|
351
343
|
return 'value';
|
|
352
344
|
return 'choice';
|
|
353
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Decide whether this plugin's numbered card owns a native question carrier.
|
|
348
|
+
*
|
|
349
|
+
* The card claims every single-select question carrying one to nine options,
|
|
350
|
+
* whoever asked it — Kiokuko's own intake, an Enno or Deep selection, another
|
|
351
|
+
* plugin, or a question the model composed in chat — so a number-key plus Enter
|
|
352
|
+
* shortcut is never missing from a question this composer shows. Longer catalogs
|
|
353
|
+
* are claimed only by the Enno and Deep selection questions, whose typed search
|
|
354
|
+
* and value flows own their own addressing. Multi-select batches, optionless
|
|
355
|
+
* prompts, and multi-question batches have no single number per answer and stay
|
|
356
|
+
* with the native composer.
|
|
357
|
+
*/
|
|
354
358
|
function isSupportedQuestion(question) {
|
|
355
359
|
if (question === undefined || question.multiSelect === true)
|
|
356
360
|
return false;
|
|
357
361
|
const options = question.options?.length ?? 0;
|
|
358
362
|
if (options < 1)
|
|
359
363
|
return false;
|
|
364
|
+
if (options <= DIGIT_ADDRESSABLE_OPTIONS)
|
|
365
|
+
return true;
|
|
360
366
|
if (question.header === '実行方式とモデル' && (ENNO_SELECTION_QUESTIONS.includes(question.id) || isEnnoSearchQuestion(question)))
|
|
361
367
|
return true;
|
|
362
368
|
if (question.header === 'Deep planning' && DEEP_SELECTION_QUESTIONS.includes(question.id))
|
|
363
369
|
return true;
|
|
364
|
-
|
|
365
|
-
return false;
|
|
366
|
-
return INTAKE_QUESTIONS.some(kind => kind.id === question.id && kind.header === question.header);
|
|
370
|
+
return false;
|
|
367
371
|
}
|
|
368
372
|
function intakePending(props) {
|
|
369
373
|
const pending = props.pendingInteraction;
|
|
@@ -372,7 +376,11 @@ window.__ModuleLoader__.load({
|
|
|
372
376
|
&& typeof pending.answer === 'function' && typeof pending.cancel === 'function'
|
|
373
377
|
? pending : null;
|
|
374
378
|
}
|
|
375
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Native pending carrier, plugin-only presentation. The card answers through the
|
|
381
|
+
* carrier's own protocol, so claiming a question does not change what the asker
|
|
382
|
+
* receives — only how the option can be chosen.
|
|
383
|
+
*/
|
|
376
384
|
function IntakeQuestion(props) {
|
|
377
385
|
const pending = props.matched;
|
|
378
386
|
return jsx(IntakeQuestionCard, { key: pending.key, pending });
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/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AAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,GACrD,OAAO,CAAA;KACX,CAAA;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;IAChF,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,GAAG,OAAO,CAAA;CACtI;AA0ED,+EAA+E;AAC/E,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,GAAG,WAAW,CAAC,CAqBjH;AAuHD,eAAO,MAAM,MAAM,gDAAiD,CAAA;AAsVpE,mEAAmE;AACnE,wBAAgB,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAgCjD"}
|
package/dist/dsh/config.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { MemoryEvolutionConfig };
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
export declare const OrcaConfig: z.ZodObject<{
|
|
5
5
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
askOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
6
7
|
storage: z.ZodDefault<z.ZodEnum<{
|
|
7
8
|
project: "project";
|
|
8
9
|
"data-dir": "data-dir";
|
|
@@ -82,6 +83,7 @@ export declare const Config: z.ZodObject<{
|
|
|
82
83
|
}, z.core.$strict>>>;
|
|
83
84
|
orca: z.ZodPrefault<z.ZodObject<{
|
|
84
85
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
+
askOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
85
87
|
storage: z.ZodDefault<z.ZodEnum<{
|
|
86
88
|
project: "project";
|
|
87
89
|
"data-dir": "data-dir";
|
package/dist/dsh/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/dsh/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/dsh/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBrB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AACnD,eAAO,MAAM,gBAAgB;;kBAA6D,CAAA;AAC1F,eAAO,MAAM,kBAAkB;;;;;kBAAyG,CAAA;AACxI,mEAAmE;AACnE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQjB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAA"}
|
package/dist/dsh/config.js
CHANGED
|
@@ -6,6 +6,8 @@ import { DeepThinkerConfigSchema } from '../deep-thinker/core/contracts.js';
|
|
|
6
6
|
const limit = (value) => z.number().int().positive().max(Number.MAX_SAFE_INTEGER).default(value);
|
|
7
7
|
export const OrcaConfig = z.object({
|
|
8
8
|
enabled: z.boolean().default(true),
|
|
9
|
+
/** `false` records every interactive session without a per-session question; `true` asks first. */
|
|
10
|
+
askOnStart: z.boolean().default(false),
|
|
9
11
|
storage: z.enum(['project', 'data-dir']).default('project'),
|
|
10
12
|
includeAuxiliary: z.boolean().default(false),
|
|
11
13
|
capture: z.object({
|
package/dist/dsh/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/dsh/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAE3E,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACxG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC3D,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAA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AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAoED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWvE;AAOD,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAU/E;AAsBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKrE;AAED,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,GAAG,OAAO,CAU/F;AAiGD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,qBAA0B,GAAG,cAAc,CAspEtG;AAsBD,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
|
package/dist/dsh/host-adapter.js
CHANGED
|
@@ -47,7 +47,7 @@ import { checkpointDshMemory } from '../memory/scoped-memory.js';
|
|
|
47
47
|
import { LedgerStore } from '../ledger/store.js';
|
|
48
48
|
import { ENNO_APPLICABLE_TASK_TYPES } from '../enno-oduno/types.js';
|
|
49
49
|
import { commitExpectedFailure, ennoReceiptOperation, enqueueUnsubmittedTurn, isExpectedTurnFailure, phaseForOperation, prepareTurnIntent, readPendingOutbox, readTurnSeal, markOutboxObservedInTransaction, appliedTurnOutcome, replacePendingOutboxMessageInTransaction, supersedeBoundaryJobsAtOrBeforeRevisionInTransaction, supersedeOutboxAtOrBeforeRevisionInTransaction, } from './turn-process.js';
|
|
50
|
-
import { backupInputClaimInTransaction, markClaimProgressInTransaction, settleInputClaimInTransaction, takeRecoverableInputClaimInTransaction, unexecutedRunInput, } from './input-claim.js';
|
|
50
|
+
import { backupInputClaimInTransaction, readInputClaim, markClaimProgressInTransaction, settleInputClaimInTransaction, takeRecoverableInputClaimInTransaction, unexecutedRunInput, } from './input-claim.js';
|
|
51
51
|
import { DshSessionLogMirror } from './session-log-mirror.js';
|
|
52
52
|
import { abortable, DshBoundaryWorker } from './boundary-worker.js';
|
|
53
53
|
import { DshSessionLogExportService } from './session-log-export.js';
|
|
@@ -447,6 +447,32 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
447
447
|
const continuedTurns = new Map();
|
|
448
448
|
const resumedTurns = new Map();
|
|
449
449
|
const inMemoryClaims = new Map();
|
|
450
|
+
const captureInitialInput = async (sessionId, turn, messages) => {
|
|
451
|
+
const key = `${sessionId}\u0000${turn}`;
|
|
452
|
+
let initial = inMemoryClaims.get(key);
|
|
453
|
+
if (!initial) {
|
|
454
|
+
if (messages.length === 0)
|
|
455
|
+
return;
|
|
456
|
+
initial = { messages: Object.freeze([...messages]), providerStarted: false, sideEffectStarted: false, recovered: false };
|
|
457
|
+
inMemoryClaims.set(key, initial);
|
|
458
|
+
}
|
|
459
|
+
// Inbox claims are step-local. Preserve the first turn input and monotonic
|
|
460
|
+
// execution flags across assembly, pre-step, steering, and plugin reload.
|
|
461
|
+
const snapshot = initial;
|
|
462
|
+
try {
|
|
463
|
+
const stored = await runtime.withDatabase(database => withImmediateTransaction(database, () => (readInputClaim(database, sessionId, turn) ?? backupInputClaimInTransaction(database, {
|
|
464
|
+
dshSessionId: sessionId, nativeTurn: turn, messages: snapshot.messages,
|
|
465
|
+
}))));
|
|
466
|
+
snapshot.messages = stored.messages;
|
|
467
|
+
snapshot.providerStarted ||= stored.providerStarted;
|
|
468
|
+
snapshot.sideEffectStarted ||= stored.sideEffectStarted;
|
|
469
|
+
snapshot.recovered ||= stored.recoveryCount !== 0 || (stored.status !== 'claimed' && stored.status !== 'recoverable');
|
|
470
|
+
}
|
|
471
|
+
catch {
|
|
472
|
+
// Auxiliary persistence cannot veto native assembly or admission. The
|
|
473
|
+
// original process-local snapshot still covers a pre-provider failure.
|
|
474
|
+
}
|
|
475
|
+
};
|
|
450
476
|
let retireSupersededRun;
|
|
451
477
|
let resumeExistingRun;
|
|
452
478
|
const identityKey = (agentId, sessionId) => dshPonytailOwnerKey(agentId, sessionId);
|
|
@@ -767,27 +793,8 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
767
793
|
return downstream;
|
|
768
794
|
if (event.nativeAgent && selectionBlocked.has(event.nativeAgent))
|
|
769
795
|
return { kind: 'reject' };
|
|
770
|
-
const claimKey = `${event.sessionId}\u0000${event.turn}`;
|
|
771
796
|
const nativeMessages = Object.freeze([...(event.nativeMessages ?? [])]);
|
|
772
|
-
|
|
773
|
-
messages: nativeMessages,
|
|
774
|
-
providerStarted: false,
|
|
775
|
-
sideEffectStarted: false,
|
|
776
|
-
recovered: false,
|
|
777
|
-
});
|
|
778
|
-
try {
|
|
779
|
-
await runtime.withDatabase((database) => withImmediateTransaction(database, () => {
|
|
780
|
-
backupInputClaimInTransaction(database, {
|
|
781
|
-
dshSessionId: event.sessionId,
|
|
782
|
-
nativeTurn: event.turn,
|
|
783
|
-
messages: nativeMessages,
|
|
784
|
-
});
|
|
785
|
-
}));
|
|
786
|
-
}
|
|
787
|
-
catch {
|
|
788
|
-
// The in-memory copy still protects a pre-provider failure in this
|
|
789
|
-
// process. Durable backup failure cannot veto the native decision.
|
|
790
|
-
}
|
|
797
|
+
await captureInitialInput(event.sessionId, event.turn, nativeMessages);
|
|
791
798
|
const humanPresent = nativeMessages.some(isHumanMessage) || downstream.messages.some(isHumanMessage);
|
|
792
799
|
const seenContinuations = new Set();
|
|
793
800
|
let nativeDecision = {
|
|
@@ -1162,9 +1169,7 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1162
1169
|
// DSH claims input before assembly. Persist it before showing any UI so
|
|
1163
1170
|
// cancellation and restart cannot lose a prompt before the native log append.
|
|
1164
1171
|
if (agent.session && messages.length) {
|
|
1165
|
-
await
|
|
1166
|
-
dshSessionId: agent.session.id, nativeTurn: turn, messages,
|
|
1167
|
-
})));
|
|
1172
|
+
await captureInitialInput(agent.session.id, turn, messages);
|
|
1168
1173
|
}
|
|
1169
1174
|
try {
|
|
1170
1175
|
const event = await mapPreStep({ agent, messages, turn, step: 0, signal });
|
|
@@ -2189,11 +2194,29 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
2189
2194
|
});
|
|
2190
2195
|
});
|
|
2191
2196
|
const sessionEventDisposer = ctx.on('session/event', (session, event) => {
|
|
2197
|
+
const item = currentSession(session.id);
|
|
2198
|
+
const data = objectRecord(event.data);
|
|
2199
|
+
const eventTurn = typeof data?.turn === 'number' && Number.isSafeInteger(data.turn) ? data.turn : item?.turn;
|
|
2200
|
+
const ownsTurn = item !== undefined && !item.closed && eventTurn === item.turn && typeof event.type === 'string';
|
|
2201
|
+
const claimKey = `${session.id}\u0000${eventTurn}`;
|
|
2202
|
+
const fallback = ownsTurn ? inMemoryClaims.get(claimKey) : undefined;
|
|
2203
|
+
const providerStarted = event.type === 'request/header' || event.type === 'request/context'
|
|
2204
|
+
|| event.type === 'assistant/chunk' || event.type === 'assistant/message';
|
|
2205
|
+
const sideEffectStarted = event.type === 'tool/call';
|
|
2206
|
+
// Observe execution synchronously, before the mirror can yield or fail.
|
|
2207
|
+
// A later step/end callback must never see an earlier execution as unstarted.
|
|
2208
|
+
if (fallback) {
|
|
2209
|
+
fallback.providerStarted ||= providerStarted;
|
|
2210
|
+
fallback.sideEffectStarted ||= sideEffectStarted;
|
|
2211
|
+
}
|
|
2192
2212
|
// This observer is deliberately fire-and-contain. DSH persistence and the
|
|
2193
2213
|
// model turn must never depend on Kiokuko claim bookkeeping.
|
|
2194
2214
|
void (async () => {
|
|
2195
2215
|
if (typeof event.type === 'string' && typeof event.seq === 'number') {
|
|
2196
|
-
|
|
2216
|
+
try {
|
|
2217
|
+
await sessionMirror.observe(session.id, event);
|
|
2218
|
+
}
|
|
2219
|
+
catch { /* claim bookkeeping remains independent */ }
|
|
2197
2220
|
const continuationId = eventContinuationId(event.data);
|
|
2198
2221
|
if (continuationId !== undefined) {
|
|
2199
2222
|
try {
|
|
@@ -2207,26 +2230,8 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
2207
2230
|
}
|
|
2208
2231
|
}
|
|
2209
2232
|
}
|
|
2210
|
-
|
|
2211
|
-
if (item === undefined || item.closed || typeof event.type !== 'string')
|
|
2212
|
-
return;
|
|
2213
|
-
const data = objectRecord(event.data);
|
|
2214
|
-
const eventTurn = typeof data?.turn === 'number' && Number.isSafeInteger(data.turn)
|
|
2215
|
-
? data.turn
|
|
2216
|
-
: item.turn;
|
|
2217
|
-
if (eventTurn !== item.turn)
|
|
2233
|
+
if (!ownsTurn || item === undefined)
|
|
2218
2234
|
return;
|
|
2219
|
-
const claimKey = `${item.sessionId}\u0000${item.turn}`;
|
|
2220
|
-
const fallback = inMemoryClaims.get(claimKey);
|
|
2221
|
-
const providerStarted = event.type === 'request/header'
|
|
2222
|
-
|| event.type === 'request/context'
|
|
2223
|
-
|| event.type === 'assistant/chunk'
|
|
2224
|
-
|| event.type === 'assistant/message';
|
|
2225
|
-
const sideEffectStarted = event.type === 'tool/call';
|
|
2226
|
-
if (fallback !== undefined) {
|
|
2227
|
-
fallback.providerStarted ||= providerStarted;
|
|
2228
|
-
fallback.sideEffectStarted ||= sideEffectStarted;
|
|
2229
|
-
}
|
|
2230
2235
|
if (providerStarted || sideEffectStarted) {
|
|
2231
2236
|
try {
|
|
2232
2237
|
await runtime.withDatabase((database) => withImmediateTransaction(database, () => {
|
|
@@ -2247,13 +2252,23 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
2247
2252
|
const reason = objectRecord(data?.reason);
|
|
2248
2253
|
const turnEndedWithError = reason?.kind === 'error';
|
|
2249
2254
|
let durableRecoverable = false;
|
|
2255
|
+
let durableUnavailable = true;
|
|
2250
2256
|
try {
|
|
2251
|
-
const settled = await runtime.withDatabase((database) => withImmediateTransaction(database, () =>
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2257
|
+
const settled = await runtime.withDatabase((database) => withImmediateTransaction(database, () => {
|
|
2258
|
+
// Earlier observer writes may still be pending. Persist all execution
|
|
2259
|
+
// already observed locally before deciding whether replay is safe.
|
|
2260
|
+
markClaimProgressInTransaction(database, {
|
|
2261
|
+
dshSessionId: item.sessionId, nativeTurn: item.turn,
|
|
2262
|
+
providerStarted: fallback?.providerStarted === true, sideEffectStarted: fallback?.sideEffectStarted === true,
|
|
2263
|
+
});
|
|
2264
|
+
return settleInputClaimInTransaction(database, {
|
|
2265
|
+
dshSessionId: item.sessionId,
|
|
2266
|
+
nativeTurn: item.turn,
|
|
2267
|
+
turnEndedWithError,
|
|
2268
|
+
});
|
|
2269
|
+
}));
|
|
2256
2270
|
durableRecoverable = settled?.status === 'recoverable';
|
|
2271
|
+
durableUnavailable = settled === undefined;
|
|
2257
2272
|
}
|
|
2258
2273
|
catch {
|
|
2259
2274
|
// Fall through to the process-local decision.
|
|
@@ -2264,8 +2279,14 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
2264
2279
|
&& !fallback.sideEffectStarted
|
|
2265
2280
|
&& !fallback.recovered;
|
|
2266
2281
|
const steer = item.nativeAgent?.steer;
|
|
2267
|
-
|
|
2282
|
+
const recoveryAllowed = (fallback === undefined || locallyRecoverable)
|
|
2283
|
+
&& (durableRecoverable || durableUnavailable && locallyRecoverable);
|
|
2284
|
+
if (recoveryAllowed && steer !== undefined) {
|
|
2268
2285
|
let messages;
|
|
2286
|
+
// Reserve locally before awaiting the durable consumer; duplicate end
|
|
2287
|
+
// notifications cannot enqueue the same input again.
|
|
2288
|
+
if (fallback)
|
|
2289
|
+
fallback.recovered = true;
|
|
2269
2290
|
if (durableRecoverable) {
|
|
2270
2291
|
try {
|
|
2271
2292
|
const claim = await runtime.withDatabase((database) => withImmediateTransaction(database, () => (takeRecoverableInputClaimInTransaction(database, item.sessionId, item.turn))));
|
|
@@ -2273,17 +2294,18 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
2273
2294
|
}
|
|
2274
2295
|
catch {
|
|
2275
2296
|
// Use the exact in-memory batch if the durable consumer failed.
|
|
2297
|
+
messages = fallback?.messages;
|
|
2276
2298
|
}
|
|
2277
2299
|
}
|
|
2278
|
-
|
|
2300
|
+
else {
|
|
2301
|
+
messages = fallback?.messages;
|
|
2302
|
+
}
|
|
2279
2303
|
if (messages !== undefined && messages.length > 0) {
|
|
2280
|
-
if (fallback !== undefined)
|
|
2281
|
-
fallback.recovered = true;
|
|
2282
2304
|
for (const message of messages)
|
|
2283
2305
|
steer(message);
|
|
2284
2306
|
}
|
|
2285
2307
|
}
|
|
2286
|
-
if (!turnEndedWithError ||
|
|
2308
|
+
if (!turnEndedWithError || !recoveryAllowed)
|
|
2287
2309
|
inMemoryClaims.delete(claimKey);
|
|
2288
2310
|
if (reason?.kind === 'completed' && item.prepared.ennoOduno.applicable && !executionSupport.paused(item.sessionId)) {
|
|
2289
2311
|
await runtime.withDatabase(database => {
|