kiokuko-dsh 0.2.34 → 0.2.37

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 (172) hide show
  1. package/PERMISSIONS.md +22 -7
  2. package/README.ja.md +56 -23
  3. package/README.ko.md +55 -24
  4. package/README.md +54 -23
  5. package/README.zh-CN.md +55 -24
  6. package/dist/deep-thinker/abortable-stream.d.ts.map +1 -1
  7. package/dist/deep-thinker/abortable-stream.js +2 -0
  8. package/dist/deep-thinker/abortable-stream.js.map +1 -1
  9. package/dist/deep-thinker/core/contracts.d.ts +5 -5
  10. package/dist/deep-thinker/memory-finalizer.d.ts +1 -1
  11. package/dist/deep-thinker/store.d.ts +1 -1
  12. package/dist/dsh/agenticreplay-security.d.ts +1 -0
  13. package/dist/dsh/agenticreplay-security.d.ts.map +1 -1
  14. package/dist/dsh/agenticreplay-security.js +1 -1
  15. package/dist/dsh/agenticreplay-security.js.map +1 -1
  16. package/dist/dsh/auxiliary-recovery.d.ts +68 -0
  17. package/dist/dsh/auxiliary-recovery.d.ts.map +1 -0
  18. package/dist/dsh/auxiliary-recovery.js +218 -0
  19. package/dist/dsh/auxiliary-recovery.js.map +1 -0
  20. package/dist/dsh/boundary-worker.js +1 -0
  21. package/dist/dsh/boundary-worker.js.map +1 -1
  22. package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
  23. package/dist/dsh/coding-workflow/intent.js +2 -0
  24. package/dist/dsh/coding-workflow/intent.js.map +1 -1
  25. package/dist/dsh/config.d.ts +16 -2
  26. package/dist/dsh/config.d.ts.map +1 -1
  27. package/dist/dsh/core/host.d.ts +14 -0
  28. package/dist/dsh/core/host.d.ts.map +1 -1
  29. package/dist/dsh/core/host.js +20 -6
  30. package/dist/dsh/core/host.js.map +1 -1
  31. package/dist/dsh/core/index.d.ts +56 -2
  32. package/dist/dsh/core/index.d.ts.map +1 -1
  33. package/dist/dsh/core/tasks.d.ts +4 -0
  34. package/dist/dsh/core/tasks.d.ts.map +1 -1
  35. package/dist/dsh/core/tasks.js +9 -0
  36. package/dist/dsh/core/tasks.js.map +1 -1
  37. package/dist/dsh/core-runtime.d.ts +2 -0
  38. package/dist/dsh/core-runtime.d.ts.map +1 -1
  39. package/dist/dsh/core-runtime.js +4 -0
  40. package/dist/dsh/core-runtime.js.map +1 -1
  41. package/dist/dsh/decisions/config.d.ts +29 -0
  42. package/dist/dsh/decisions/config.d.ts.map +1 -1
  43. package/dist/dsh/decisions/config.js +13 -2
  44. package/dist/dsh/decisions/config.js.map +1 -1
  45. package/dist/dsh/decisions/diagnostics.d.ts +30 -8
  46. package/dist/dsh/decisions/diagnostics.d.ts.map +1 -1
  47. package/dist/dsh/decisions/diagnostics.js +2 -1
  48. package/dist/dsh/decisions/diagnostics.js.map +1 -1
  49. package/dist/dsh/decisions/host.d.ts.map +1 -1
  50. package/dist/dsh/decisions/host.js +25 -6
  51. package/dist/dsh/decisions/host.js.map +1 -1
  52. package/dist/dsh/decisions/intent-assessment.d.ts +3 -1
  53. package/dist/dsh/decisions/intent-assessment.d.ts.map +1 -1
  54. package/dist/dsh/decisions/intent-assessment.js +1 -1
  55. package/dist/dsh/decisions/intent-assessment.js.map +1 -1
  56. package/dist/dsh/decisions/openai.d.ts +27 -0
  57. package/dist/dsh/decisions/openai.d.ts.map +1 -0
  58. package/dist/dsh/decisions/openai.js +107 -0
  59. package/dist/dsh/decisions/openai.js.map +1 -0
  60. package/dist/dsh/decisions/providers.d.ts +10 -1
  61. package/dist/dsh/decisions/providers.d.ts.map +1 -1
  62. package/dist/dsh/decisions/providers.js +2 -2
  63. package/dist/dsh/decisions/providers.js.map +1 -1
  64. package/dist/dsh/decisions/request-intent.d.ts +1 -1
  65. package/dist/dsh/decisions/service.d.ts +12 -1
  66. package/dist/dsh/decisions/service.d.ts.map +1 -1
  67. package/dist/dsh/decisions/service.js +63 -14
  68. package/dist/dsh/decisions/service.js.map +1 -1
  69. package/dist/dsh/execution-selection.d.ts +5 -5
  70. package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
  71. package/dist/dsh/host-adapter/routing.js +8 -3
  72. package/dist/dsh/host-adapter/routing.js.map +1 -1
  73. package/dist/dsh/host-adapter/session-access.d.ts +2 -0
  74. package/dist/dsh/host-adapter/session-access.d.ts.map +1 -1
  75. package/dist/dsh/host-adapter/session-access.js +2 -0
  76. package/dist/dsh/host-adapter/session-access.js.map +1 -1
  77. package/dist/dsh/host-adapter.d.ts.map +1 -1
  78. package/dist/dsh/host-adapter.js +11 -3
  79. package/dist/dsh/host-adapter.js.map +1 -1
  80. package/dist/dsh/index.d.ts +32 -6
  81. package/dist/dsh/index.d.ts.map +1 -1
  82. package/dist/dsh/lisp/code-intelligence-contracts.js +2 -2
  83. package/dist/dsh/lisp/coding-choice.d.ts +7 -0
  84. package/dist/dsh/lisp/coding-choice.d.ts.map +1 -1
  85. package/dist/dsh/lisp/coding-choice.js +2 -0
  86. package/dist/dsh/lisp/coding-choice.js.map +1 -1
  87. package/dist/dsh/lisp/coding-preparation.d.ts +6 -1
  88. package/dist/dsh/lisp/coding-preparation.d.ts.map +1 -1
  89. package/dist/dsh/lisp/coding-preparation.js +40 -3
  90. package/dist/dsh/lisp/coding-preparation.js.map +1 -1
  91. package/dist/dsh/lisp/manager.d.ts +2 -0
  92. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  93. package/dist/dsh/lisp/manager.js +74 -14
  94. package/dist/dsh/lisp/manager.js.map +1 -1
  95. package/dist/dsh/lisp/store.d.ts.map +1 -1
  96. package/dist/dsh/lisp/store.js +6 -10
  97. package/dist/dsh/lisp/store.js.map +1 -1
  98. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  99. package/dist/dsh/lisp/surface.js +3 -2
  100. package/dist/dsh/lisp/surface.js.map +1 -1
  101. package/dist/dsh/lisp/worker.d.ts +4 -1
  102. package/dist/dsh/lisp/worker.d.ts.map +1 -1
  103. package/dist/dsh/lisp/worker.js +56 -6
  104. package/dist/dsh/lisp/worker.js.map +1 -1
  105. package/dist/dsh/lisp-config.js +1 -1
  106. package/dist/dsh/lisp-config.js.map +1 -1
  107. package/dist/dsh/managed-file-deployment.d.ts.map +1 -1
  108. package/dist/dsh/managed-file-deployment.js +3 -1
  109. package/dist/dsh/managed-file-deployment.js.map +1 -1
  110. package/dist/dsh/model-auto/coordinator.js +1 -1
  111. package/dist/dsh/model-auto/coordinator.js.map +1 -1
  112. package/dist/dsh/model-configuration.d.ts +6 -6
  113. package/dist/dsh/modules/enno.d.ts +1 -1
  114. package/dist/dsh/on-demand-intake.d.ts +15 -2
  115. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  116. package/dist/dsh/on-demand-intake.js +130 -9
  117. package/dist/dsh/on-demand-intake.js.map +1 -1
  118. package/dist/dsh/session-export-analysis.d.ts +20 -0
  119. package/dist/dsh/session-export-analysis.d.ts.map +1 -0
  120. package/dist/dsh/session-export-analysis.js +90 -0
  121. package/dist/dsh/session-export-analysis.js.map +1 -0
  122. package/dist/dsh/session-log-export.d.ts +1 -0
  123. package/dist/dsh/session-log-export.d.ts.map +1 -1
  124. package/dist/dsh/session-log-export.js +19 -3
  125. package/dist/dsh/session-log-export.js.map +1 -1
  126. package/dist/dsh/session-log-mirror.d.ts +1 -1
  127. package/dist/dsh/session-log-mirror.d.ts.map +1 -1
  128. package/dist/dsh/session-log-mirror.js +5 -2
  129. package/dist/dsh/session-log-mirror.js.map +1 -1
  130. package/dist/dsh/setup.d.ts +22 -0
  131. package/dist/dsh/setup.d.ts.map +1 -1
  132. package/dist/dsh/setup.js +50 -4
  133. package/dist/dsh/setup.js.map +1 -1
  134. package/dist/dsh/skill-prompts.json +1 -1
  135. package/dist/dsh/standard-skill-deployment.d.ts +12 -1
  136. package/dist/dsh/standard-skill-deployment.d.ts.map +1 -1
  137. package/dist/dsh/standard-skill-deployment.js +76 -4
  138. package/dist/dsh/standard-skill-deployment.js.map +1 -1
  139. package/dist/dsh/task-startup.d.ts +24 -0
  140. package/dist/dsh/task-startup.d.ts.map +1 -0
  141. package/dist/dsh/task-startup.js +126 -0
  142. package/dist/dsh/task-startup.js.map +1 -0
  143. package/dist/dsh/tool-exposure-config.d.ts +1 -1
  144. package/dist/locale/en.json +1 -1
  145. package/dist/locale/ja.json +1 -1
  146. package/dist/locale/ko.json +1 -1
  147. package/dist/locale/zh-CN.json +1 -1
  148. package/dist/memory/lifecycle.d.ts +1 -1
  149. package/docs/README.ja.md +1 -0
  150. package/docs/README.md +1 -0
  151. package/docs/dsh-plugin.md +42 -14
  152. package/docs/getting-started.ja.md +2 -0
  153. package/docs/getting-started.md +2 -0
  154. package/docs/lisp-hot-tools.md +7 -4
  155. package/docs/lisp.md +19 -5
  156. package/docs/model-selection.ja.md +2 -2
  157. package/docs/model-selection.md +2 -2
  158. package/docs/store-evidence.md +6 -0
  159. package/docs/typed-decisions.md +103 -2
  160. package/docs/typesafe.md +8 -3
  161. package/docs/verification.md +28 -3
  162. package/lisp/process-identity.d.mts +2 -0
  163. package/lisp/process-identity.mjs +34 -0
  164. package/lisp/repository-owner.d.mts +1 -0
  165. package/lisp/repository-owner.mjs +58 -0
  166. package/lisp/supervisor.mjs +19 -2
  167. package/lisp/tools.lisp +17 -5
  168. package/migrations/050_auxiliary_recovery.sql +11 -0
  169. package/package.json +6 -4
  170. package/scripts/prepare-build.mjs +13 -0
  171. package/scripts/setup-dsh.mjs +8 -3
  172. package/skills/kiokuko-lisp/SKILL.md +5 -3
@@ -5,11 +5,22 @@ export interface StandardSkillDeployment {
5
5
  readonly updated: number;
6
6
  readonly unchanged: number;
7
7
  }
8
+ export interface StandardSkillRetirement {
9
+ readonly directory: string;
10
+ readonly removed: number;
11
+ readonly preserved: number;
12
+ }
8
13
  /** Preflight all standard Skills plus Japanese output without writing files. */
9
- export declare function planStandardSkills(homeDirectory?: string): Promise<{
14
+ export declare function planStandardSkills(homeDirectory?: string, options?: {
15
+ preserveUnmanaged?: boolean;
16
+ }): Promise<{
10
17
  home: string;
11
18
  directory: string;
12
19
  files: DeploymentFile[];
13
20
  }>;
14
21
  export declare function synchronizeStandardSkills(homeDirectory?: string): Promise<StandardSkillDeployment>;
22
+ /** Remove only deployed files that still match this package byte-for-byte. */
23
+ export declare function retireStandardSkills(homeDirectory?: string, options?: {
24
+ check?: boolean;
25
+ }): Promise<StandardSkillRetirement>;
15
26
  //# sourceMappingURL=standard-skill-deployment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"standard-skill-deployment.d.ts","sourceRoot":"","sources":["../../src/dsh/standard-skill-deployment.ts"],"names":[],"mappings":"AAQA,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAEjG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,gFAAgF;AAChF,wBAAsB,kBAAkB,CAAC,aAAa,GAAE,MAAqB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAuBpJ;AAED,wBAAsB,yBAAyB,CAAC,aAAa,GAAE,MAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAStH"}
1
+ {"version":3,"file":"standard-skill-deployment.d.ts","sourceRoot":"","sources":["../../src/dsh/standard-skill-deployment.ts"],"names":[],"mappings":"AAQA,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAEjG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,gFAAgF;AAChF,wBAAsB,kBAAkB,CAAC,aAAa,GAAE,MAAqB,EAAE,OAAO,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAuBnM;AAED,wBAAsB,yBAAyB,CAAC,aAAa,GAAE,MAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAStH;AA+BD,8EAA8E;AAC9E,wBAAsB,oBAAoB,CAAC,aAAa,GAAE,MAAqB,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA6BpJ"}
@@ -1,4 +1,4 @@
1
- import { realpath } from 'node:fs/promises';
1
+ import { readdir, realpath, rmdir, unlink } from 'node:fs/promises';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  import { readRegularFile } from '../config/read-regular-file.js';
@@ -8,7 +8,7 @@ import { renderStandardSkillFile } from './standard-skills.js';
8
8
  import { JAPANESE_OUTPUT_SKILL_DIRECTORY, JAPANESE_OUTPUT_SKILL_MANAGED_MARKER, loadJapaneseOutputSkill } from './japanese-output-skill.js';
9
9
  import { deploymentParent, publishFile } from './managed-file-deployment.js';
10
10
  /** Preflight all standard Skills plus Japanese output without writing files. */
11
- export async function planStandardSkills(homeDirectory = os.homedir()) {
11
+ export async function planStandardSkills(homeDirectory = os.homedir(), options = {}) {
12
12
  if (!path.isAbsolute(homeDirectory) || homeDirectory.includes('\0') || path.resolve(homeDirectory) === path.parse(homeDirectory).root) {
13
13
  throw new KiokukoError('VALIDATION_ERROR', 'Standard Skill deployment requires an absolute user home');
14
14
  }
@@ -27,8 +27,8 @@ export async function planStandardSkills(homeDirectory = os.homedir()) {
27
27
  const target = path.join(directory, bundled.directoryName, bundled.relativePath);
28
28
  await deploymentParent(home, target, false);
29
29
  const previous = await readRegularFile(target, { containmentRoot: home });
30
- const rendered = renderStandardSkillFile(previous?.content, bundled, target);
31
- files.push({ target, content: rendered.content, previous });
30
+ const content = options.preserveUnmanaged ? bundled.content : renderStandardSkillFile(previous?.content, bundled, target).content;
31
+ files.push({ target, content, previous });
32
32
  }
33
33
  return { home, directory, files };
34
34
  }
@@ -44,4 +44,76 @@ export async function synchronizeStandardSkills(homeDirectory = os.homedir()) {
44
44
  // Atomicity is per file. An interrupted tree is completed on the next plugin load.
45
45
  return result;
46
46
  }
47
+ async function countUnplannedEntries(directory, planned) {
48
+ let entries;
49
+ try {
50
+ entries = await readdir(directory, { withFileTypes: true });
51
+ }
52
+ catch (error) {
53
+ if (error.code === 'ENOENT')
54
+ return 0;
55
+ throw error;
56
+ }
57
+ let count = 0;
58
+ for (const entry of entries) {
59
+ const target = path.join(directory, entry.name);
60
+ if (entry.isDirectory())
61
+ count += await countUnplannedEntries(target, planned);
62
+ else if (!planned.has(target))
63
+ count++;
64
+ }
65
+ return count;
66
+ }
67
+ async function removeEmptyDeploymentDirectories(directory, files) {
68
+ const directories = new Set();
69
+ for (const file of files) {
70
+ let current = path.dirname(file.target);
71
+ while (current !== directory && current.startsWith(`${directory}${path.sep}`)) {
72
+ directories.add(current);
73
+ current = path.dirname(current);
74
+ }
75
+ }
76
+ for (const target of [...directories].sort((left, right) => right.length - left.length)) {
77
+ try {
78
+ await rmdir(target);
79
+ }
80
+ catch { /* Preserve non-empty, absent, or otherwise unavailable directories. */ }
81
+ }
82
+ }
83
+ /** Remove only deployed files that still match this package byte-for-byte. */
84
+ export async function retireStandardSkills(homeDirectory = os.homedir(), options = {}) {
85
+ const { home, directory, files } = await planStandardSkills(homeDirectory, { preserveUnmanaged: true });
86
+ const planned = new Set(files.map(file => file.target));
87
+ const result = { directory, removed: 0, preserved: await countUnplannedEntries(directory, planned) };
88
+ for (const file of files) {
89
+ if (file.previous === undefined)
90
+ continue;
91
+ if (file.previous.content !== file.content) {
92
+ result.preserved++;
93
+ continue;
94
+ }
95
+ if (options.check) {
96
+ result.removed++;
97
+ continue;
98
+ }
99
+ const current = await readRegularFile(file.target, { containmentRoot: home });
100
+ if (current === undefined)
101
+ continue;
102
+ if (current.content !== file.content) {
103
+ result.preserved++;
104
+ continue;
105
+ }
106
+ try {
107
+ await unlink(file.target);
108
+ result.removed++;
109
+ }
110
+ catch (error) {
111
+ if (error.code !== 'ENOENT')
112
+ throw error;
113
+ }
114
+ }
115
+ if (!options.check)
116
+ await removeEmptyDeploymentDirectories(directory, files);
117
+ return result;
118
+ }
47
119
  //# sourceMappingURL=standard-skill-deployment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standard-skill-deployment.js","sourceRoot":"","sources":["../../src/dsh/standard-skill-deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,+BAA+B,EAAE,oCAAoC,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAC3I,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAuB,MAAM,8BAA8B,CAAA;AASjG,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAA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C;QACD,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,MAAM,CAAC,OAAO,EAAE,CAAA;YAChB,SAAQ;QACV,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAA;QAC7E,IAAI,OAAO,KAAK,SAAS;YAAE,SAAQ;QACnC,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YACrC,MAAM,CAAC,SAAS,EAAE,CAAA;YAClB,SAAQ;QACV,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YACzB,MAAM,CAAC,OAAO,EAAE,CAAA;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAA;QACrE,CAAC;IACH,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,KAAK;QAAE,MAAM,gCAAgC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IAC5E,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { DshUserQuestions } from './intake-questions.js';
2
+ import { type DecisionConfiguration } from './decisions/config.js';
3
+ import type { DecisionService } from './decisions/service.js';
4
+ import type { LispCodingInput, LispCodingService } from './lisp/coding-choice.js';
5
+ export type TaskStartupChoice = NonNullable<DecisionConfiguration['startup']>;
6
+ export declare const TASK_STARTUP_OPTIONS: readonly ["decision ON / Lisp ON", "decision ON / Lisp OFF", "decision OFF / Lisp ON", "decision OFF / Lisp OFF", "取消・作業を保持"];
7
+ export declare function parseTaskStartupAnswer(response: unknown, questionId: string): TaskStartupChoice | undefined;
8
+ /** One pre-assembly choice, stored in existing immutable decision bindings. No execution authority is created. */
9
+ export declare class TaskStartup {
10
+ private readonly host;
11
+ private readonly active;
12
+ private readonly last;
13
+ constructor(host: {
14
+ decisions: DecisionService;
15
+ questions?: DshUserQuestions;
16
+ root(agent: LispCodingInput['agent']): string;
17
+ lisp(): LispCodingService | undefined;
18
+ });
19
+ prepare(input: LispCodingInput & {
20
+ sessionId: string;
21
+ }): Promise<void>;
22
+ private choose;
23
+ }
24
+ //# sourceMappingURL=task-startup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-startup.d.ts","sourceRoot":"","sources":["../../src/dsh/task-startup.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAA4B,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEjF,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAA;AAC7E,eAAO,MAAM,oBAAoB,+HAGvB,CAAA;AACV,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAW3G;AAKD,kHAAkH;AAClH,qBAAa,WAAW;IAGV,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8F;IACrH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmE;gBAC3D,IAAI,EAAE;QACjC,SAAS,EAAE,eAAe,CAAC;QAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;QACxD,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;QAC7C,IAAI,IAAI,iBAAiB,GAAG,SAAS,CAAA;KACtC;IACD,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAgBxD,MAAM;CA0DrB"}
@@ -0,0 +1,126 @@
1
+ import { canonicalContentHash } from '../serialization/validate.js';
2
+ import { abortable } from './http-json.js';
3
+ import { LispCodingCancelled } from './coding-question.js';
4
+ import { codingContinuation } from './coding-workflow/intent.js';
5
+ import { dshTurnRequestId } from './intake-profile-resolver.js';
6
+ import { ExecutionSelectionPending } from './execution-pending.js';
7
+ import { selectedDecisionSettings } from './decisions/config.js';
8
+ export const TASK_STARTUP_OPTIONS = [
9
+ 'decision ON / Lisp ON', 'decision ON / Lisp OFF',
10
+ 'decision OFF / Lisp ON', 'decision OFF / Lisp OFF', '取消・作業を保持',
11
+ ];
12
+ export function parseTaskStartupAnswer(response, questionId) {
13
+ const answers = response?.answers;
14
+ if (!Array.isArray(answers) || answers.length !== 1 || answers[0]?.id !== questionId)
15
+ return undefined;
16
+ const a = answers[0];
17
+ if (!Array.isArray(a.selected) || a.selected.length > 1 || !a.selected.every((s) => typeof s === 'string')
18
+ || a.custom !== undefined && typeof a.custom !== 'string')
19
+ return undefined;
20
+ if (!a.selected.length && !a.custom?.trim())
21
+ return { decision: false, lisp: false, cancelled: true };
22
+ const text = a.custom?.trim() || a.selected[0];
23
+ const index = /^[1-5]$/.test(text) ? Number(text) - 1 : TASK_STARTUP_OPTIONS.indexOf(text);
24
+ return index < 0 ? undefined : index === 4 ? { decision: false, lisp: false, cancelled: true }
25
+ : { decision: index < 2, lisp: index % 2 === 0 };
26
+ }
27
+ function continuation(task) {
28
+ return codingContinuation(task) || /^(?:continue|resume|keep going|続けて(?:ください)?|続行(?:して)?|再開(?:して)?)[.!。!]?$/iu.test(task.trim());
29
+ }
30
+ /** One pre-assembly choice, stored in existing immutable decision bindings. No execution authority is created. */
31
+ export class TaskStartup {
32
+ host;
33
+ active = new WeakMap();
34
+ last = new Map();
35
+ constructor(host) {
36
+ this.host = host;
37
+ }
38
+ prepare(input) {
39
+ const root = this.host.root(input.agent);
40
+ const prefix = `task-startup:${canonicalContentHash([input.sessionId, root])}:`;
41
+ const turn = String(input.turn).padStart(16, '0');
42
+ const key = `${prefix}${turn}:${canonicalContentHash(input.task)}`;
43
+ const old = this.active.get(input.agent);
44
+ if (old?.key === key)
45
+ return old.pending;
46
+ old?.controller.abort();
47
+ const controller = new AbortController(), signal = AbortSignal.any([input.signal, controller.signal]);
48
+ const pending = this.choose({ ...input, signal }, key, prefix, `${prefix}${turn}:`);
49
+ this.active.set(input.agent, { key, controller, pending });
50
+ void pending.catch(error => {
51
+ if (this.active.get(input.agent)?.pending === pending && error?.code !== 'ASK_CANCELLED')
52
+ this.active.delete(input.agent);
53
+ });
54
+ return pending;
55
+ }
56
+ async choose(input, key, prefix, before) {
57
+ const { decisions } = this.host, lisp = this.host.lisp();
58
+ const current = () => {
59
+ input.signal.throwIfAborted();
60
+ if (`task-startup:${canonicalContentHash([input.sessionId, this.host.root(input.agent)])}:` !== prefix
61
+ || (input.agent.session?.id ?? input.sessionId) !== input.sessionId)
62
+ throw new LispCodingCancelled('Task startup identity changed');
63
+ };
64
+ input.signal.throwIfAborted();
65
+ const requestId = dshTurnRequestId({ dshSessionId: input.sessionId, turn: input.turn });
66
+ let receipt = await decisions.readStartup(key);
67
+ if (!receipt?.startup) {
68
+ const configured = await decisions.startupConfiguration();
69
+ const config = await decisions.readStartup(requestId) ?? configured;
70
+ let choice = configured.startup;
71
+ if (!choice && continuation(input.task)) {
72
+ const previous = this.last.get(prefix);
73
+ const rows = previous && previous.id < before ? [previous] : await decisions.startupBefore(prefix, before);
74
+ // Ambiguous same-turn generations cannot donate a choice to another task.
75
+ if (rows[0]?.config.startup && (!rows[1] || rows[0].id.split(':')[2] !== rows[1].id.split(':')[2])) {
76
+ choice = rows[0].config.startup;
77
+ const manual = lisp?.manualOverride?.(input.agent);
78
+ if (manual && !choice.cancelled)
79
+ choice = { ...choice, lisp: manual.choice === 'yes' };
80
+ }
81
+ }
82
+ if (!choice && this.host.questions) {
83
+ const response = await abortable(this.host.questions.ask({ agent: input.agent, signal: input.signal, questions: [{
84
+ id: key, header: 'Kiokuko · 作業開始', question: 'この作業で decision と Lisp を使いますか?',
85
+ detail: `選択はこの作業に適用します。decision: ${config.provider} / ${selectedDecisionSettings(config)?.model ?? '未設定'}。未認証時に他へ切り替えません。Lisp の通常の権限・承認・Stop は維持します。取消・Skip は作業を保持して中止します。`,
86
+ options: TASK_STARTUP_OPTIONS.map(label => ({ label })),
87
+ }] }), input.signal).catch(error => {
88
+ if (error?.code === 'ASK_CANCELLED' && !input.signal.aborted)
89
+ return { answers: [{ id: key, selected: [] }] };
90
+ throw error;
91
+ });
92
+ choice = parseTaskStartupAnswer(response, key);
93
+ if (!choice)
94
+ throw new ExecutionSelectionPending('Invalid decision/Lisp startup answer; no work started');
95
+ }
96
+ if (!choice) {
97
+ // Headless preserves existing configuration, including an explicit manual Lisp preference.
98
+ // Module availability never implicitly turns Lisp on.
99
+ choice = config.startup ?? { decision: config.mode !== 'off', lisp: await lisp?.manualSelected?.(input.agent) === true };
100
+ }
101
+ current();
102
+ receipt = await decisions.bindStartup(key, choice, input.signal, config);
103
+ }
104
+ current();
105
+ const choice = receipt.startup;
106
+ this.last.set(prefix, { id: key, config: receipt });
107
+ if (this.last.size > 128)
108
+ this.last.delete(this.last.keys().next().value);
109
+ if (choice.cancelled) {
110
+ lisp?.cancelled?.(input.agent, input.task);
111
+ throw new LispCodingCancelled('Task startup cancelled; work retained');
112
+ }
113
+ await decisions.bindStartup(requestId, choice, input.signal, receipt).catch(error => {
114
+ if (error?.code === 'DECISION_INVALID_INPUT')
115
+ throw new ExecutionSelectionPending('This request already has an immutable decision binding. Start a new request to change decision mode; the existing backend was not substituted.');
116
+ throw error;
117
+ });
118
+ current();
119
+ if (lisp?.selectTask)
120
+ await lisp.selectTask(input, choice.lisp ? 'yes' : 'no', key);
121
+ else if (choice.lisp)
122
+ throw new ExecutionSelectionPending('Selected Lisp runtime is unavailable; choice retained');
123
+ current();
124
+ }
125
+ }
126
+ //# sourceMappingURL=task-startup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-startup.js","sourceRoot":"","sources":["../../src/dsh/task-startup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,wBAAwB,EAA8B,MAAM,uBAAuB,CAAA;AAK5F,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,uBAAuB,EAAE,wBAAwB;IACjD,wBAAwB,EAAE,yBAAyB,EAAE,UAAU;CACvD,CAAA;AACV,MAAM,UAAU,sBAAsB,CAAC,QAAiB,EAAE,UAAkB;IAC1E,MAAM,OAAO,GAAI,QAAgB,EAAE,OAAO,CAAA;IAC1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,UAAU;QAAE,OAAO,SAAS,CAAA;IACtG,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;WAC9G,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,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3
  export declare const ToolExposureConfig: z.ZodObject<{
4
4
  mode: z.ZodDefault<z.ZodEnum<{
5
5
  auto: "auto";
6
- phase: "phase";
7
6
  full: "full";
7
+ phase: "phase";
8
8
  lean: "lean";
9
9
  }>>;
10
10
  }, z.core.$strict>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "Version 0.2.34 — Kiokuko plugin for DeepSeek Harness"
4
+ "description": "Version 0.2.37 — Kiokuko plugin for DeepSeek Harness"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "バージョン 0.2.34 — DeepSeek Harness 向け Kiokuko プラグイン"
4
+ "description": "バージョン 0.2.37 — DeepSeek Harness 向け Kiokuko プラグイン"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "버전 0.2.34 — DeepSeek Harness용 Kiokuko 플러그인"
4
+ "description": "버전 0.2.37 — DeepSeek Harness용 Kiokuko 플러그인"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "kiokuko-dsh",
4
- "description": "版本 0.2.34 — DeepSeek Harness 的 Kiokuko 插件"
4
+ "description": "版本 0.2.37 — DeepSeek Harness 的 Kiokuko 插件"
5
5
  }
6
6
  }
@@ -28,9 +28,9 @@ export declare const MemoryObservation: z.ZodObject<{
28
28
  kind: z.ZodEnum<{
29
29
  build: "build";
30
30
  other: "other";
31
+ inspect: "inspect";
31
32
  edit: "edit";
32
33
  test: "test";
33
- inspect: "inspect";
34
34
  explain: "explain";
35
35
  recover: "recover";
36
36
  }>;
package/docs/README.ja.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  目的別に参照してください。
4
4
 
5
+ - [OpenAI Decisionsの設定](../README.ja.md#openai-decisions-setup) — APIキーの保存先・自動再読・優先順位・判定providerの切替。[詳細な設定(英語)](typed-decisions.md#openai-credentials)。
5
6
  - [導入ガイド](getting-started.ja.md) — DeepSeek Harness Pluginの導入と実行。
6
7
  - [基本概念](concepts.ja.md) — RAG、記憶のライフサイクル、Project/Ecosystem/Global、Akinator。
7
8
  - [役小角(enno-oduno)](enno-oduno.ja.md) — Agent Loop、確認、回復、継続、検証、Advisory Round。
package/docs/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Choose a guide by what you need to do:
4
4
 
5
+ - [OpenAI Decisions setup](../README.md#openai-decisions-setup) — API key, credential file paths, automatic reload, precedence and provider switching; [detailed configuration](typed-decisions.md#openai-credentials).
5
6
  - [Getting started](getting-started.md) — install and run the DeepSeek Harness plugin.
6
7
  - [Concepts](concepts.md) — RAG, memory lifecycle, Project/Ecosystem/Global scopes, and Akinator.
7
8
  - [役小角(enno-oduno)](enno-oduno.md) — the agent loop, confirmation, recovery, continuation, verification, and Advisory Round.
@@ -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 eight standard Skills and for the bundled Japanese output Skill.
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 8 Skills with 27 Markdown files and
278
- 19 reference files.
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 is an additional ninth Skill. Its directory is
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. Deployment includes
283
- all nine Skills and 28 Markdown files, including the 19 references.
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 eight managed Skill directories to the process user's
304
- `~/.agents/skills/`, creating missing files and replacing stale managed files.
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 eight standard Skills (27 files, 19 references). Use `setup-dsh.mjs --check`
378
- for the complete nine-Skill deployment **and** project instruction check.
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 only `npm run build`. Git installs need build approval in the
406
- consuming profile; use the repository-scoped rule in [Install](#install) so
407
- ordinary updates do not require another commit-specific permission.
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)を参照してください。
@@ -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).
@@ -24,7 +24,9 @@ ZIP の試作をそのまま別の実行環境にするのではなく、既存
24
24
  設定の `lisp.enabled: true` と SBCL が必要です。既存の選択画面で Lisp を選べば、
25
25
  共有関数をそのまま利用できます。選択肢の順序、番号キー・修飾キー・Enterによる操作、
26
26
  通常実行/役小角の選択とは別に、Lisp の選択をタスクと scopeVersion に保存します。新しい実装タスクでは再確認し、未回答・閉じる操作では起動しません。
27
- 従来の常駐Lispも維持し、共有関数は別の保護付きワーカーで実行します。
27
+ 常駐Lispがある場合は、同じsession・agent・repoの評価枠を再利用します。
28
+ PID・世代・既存定義を維持し、別SBCLの起動やmode切替はしません。評価中は `BUSY`、
29
+ 別ownerの場合は `REPOSITORY_IN_USE` です。常駐workerがない作業用modeでは従来の一回限りworkerを使います。
28
30
  ワーカー枠がすべて使用中の場合は `WORKER_LIMIT` で停止します。
29
31
 
30
32
  次は任意の確認コマンドです。有効化の追加操作は不要です。
@@ -108,11 +110,12 @@ ZIP の試作をそのまま別の実行環境にするのではなく、既存
108
110
  - カタログ上限はプロジェクトごとに条件・版の合計10,000件 / 1 GiB、全体4 GiB。
109
111
  超過時は稼働版を削除せず、新しい登録を拒否します。操作履歴にも既存の上限があります。
110
112
  - 条件は1〜32件、JSON全体64 KiB、依存関数を含むコードは256 KiBまでです。
111
- 各検証は独立したワーカーで行うため、条件が多いほど更新時間が増えます。
113
+ 各検証は新しいpackageで行います。常駐ownerがない場合は検証ごとにworkerを起動します。
112
114
  - 入力・結果はセッションとエージェントに束縛されます。共有関数の呼び出しは
113
115
  他人の `resultRef` の参照権限や、作業ファイルの書き込み権限を与えません。
114
- - グローバル変数やヒープの移行はありません。コードは呼び出しごとに新しい
115
- 保護付きワーカーで実行し、ホスト RPC は許可しません。
116
+ - 常駐workerを再利用する呼び出しは、新しいpackage・object参照表・専用結果scratchを使い、
117
+ host RPCを許可しません。同じownerのCommon Lisp heap全体を隔離する仕組みではないため、
118
+ 明示的な依存関数と入力だけを使う純粋関数として記述してください。別ownerとはworkerを共有しません。
116
119
 
117
120
  再送は同一の操作 ID と同一の引数で行います。保存結果を返し、再実行しません。
118
121
  `UNKNOWN` は成功でも安全な再試行でもありません。
package/docs/lisp.md CHANGED
@@ -79,20 +79,34 @@ lisp:
79
79
  sbclPath: sbcl
80
80
  ```
81
81
 
82
- Workers idle for five minutes stop automatically. Configure `idleTimeoutMs`
83
- (1000–3600000, default 300000) to change this interval. When `maxWorkers`
84
- (default 4) is reached, the longest-idle eligible worker stops before a new one
85
- starts. Active agent turns, evaluations, approvals and running jobs are excluded.
82
+ Workers preserve their state by default (`idleTimeoutMs: 0`). An explicit
83
+ `idleTimeoutMs` of 1000–3600000 opts into idle suspension. When `maxWorkers`
84
+ (default 4) is reached, admission returns `WORKER_LIMIT`; existing workers remain.
85
+ Active agent turns, evaluations, approvals and running jobs cannot idle-suspend.
86
86
  Session disposal also stops its workers. Normal suspension appears as `SUSPENDED`,
87
87
  retains protection and resumes automatically on the next use; status polling never
88
88
  starts a worker. Variables, definitions and references are lost on restart; the
89
89
  agent receives the new generation and must rebuild helpers without replaying
90
90
  completed effects. Crashes and explicit cancellation still require human recovery.
91
91
 
92
+ One canonical repository has one runtime owner and one persistent supervisor/SBCL,
93
+ including across separate DSH databases and sessions. Git subdirectories and symlink
94
+ aliases resolve to the same repository; separate worktrees retain their own root.
95
+ The existing supervisor holds an OS-backed SQLite lease under the current user's
96
+ private `/tmp/kiokuko-lisp-owners-<uid>` directory. A duplicate returns
97
+ `REPOSITORY_IN_USE`; it never disconnects or kills the existing owner. A crash leaves
98
+ runtime birth-identity evidence, so PID reuse is not mistaken for a live owner and
99
+ a still-live orphan cannot silently donate its lease. Unsupported/unknown process
100
+ identity remains conservative. No daemon, Rust wrapper, OS service or credential is added.
101
+
92
102
  Multiple host processes can share the same Kiokuko database and Lisp data directory.
93
103
  Each session has one host owner; other sessions and projects run independently,
94
104
  including when their agent and operation IDs are identical. `maxWorkers` applies
95
- per host. Compilers publish private builds atomically and verify a concurrent
105
+ per host. Capacity pressure returns `WORKER_LIMIT` and preserves other repository
106
+ workers and their definitions; it does not evict them. `lisp_status` reports the
107
+ canonical repository, owning session/agent, host PID, supervisor PID and runtime PID.
108
+ For protected execution the runtime PID may belong to the sandbox launcher.
109
+ Compilers publish private builds atomically and verify a concurrent
96
110
  winner before reusing it. Starting or stopping a host does not recover another
97
111
  host's live operations. A session whose owner has exited is claimed on its next
98
112
  admission, and unfinished operations become `UNKNOWN` without replay. Concurrent