kiokuko 1.0.6 → 1.0.8

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 (179) hide show
  1. package/README.ja.md +1 -0
  2. package/README.md +6 -4
  3. package/dist/agent-file/render.d.ts +1 -1
  4. package/dist/agent-file/render.d.ts.map +1 -1
  5. package/dist/agent-file/render.js +6 -3
  6. package/dist/agent-file/render.js.map +1 -1
  7. package/dist/akinator/agent-task.d.ts +2 -0
  8. package/dist/akinator/agent-task.d.ts.map +1 -1
  9. package/dist/akinator/agent-task.js +13 -59
  10. package/dist/akinator/agent-task.js.map +1 -1
  11. package/dist/akinator/capabilities.d.ts +4 -3
  12. package/dist/akinator/capabilities.d.ts.map +1 -1
  13. package/dist/akinator/capabilities.js +51 -52
  14. package/dist/akinator/capabilities.js.map +1 -1
  15. package/dist/akinator/capability-binding.d.ts +1 -1
  16. package/dist/akinator/capability-binding.js +1 -1
  17. package/dist/akinator/instructions.d.ts +1 -1
  18. package/dist/akinator/instructions.d.ts.map +1 -1
  19. package/dist/akinator/instructions.js +1 -1
  20. package/dist/akinator/instructions.js.map +1 -1
  21. package/dist/akinator/memory-probe-types.d.ts +1 -1
  22. package/dist/assurance/codex-hooks.d.ts +7 -0
  23. package/dist/assurance/codex-hooks.d.ts.map +1 -0
  24. package/dist/assurance/codex-hooks.js +217 -0
  25. package/dist/assurance/codex-hooks.js.map +1 -0
  26. package/dist/assurance/contracts.d.ts +54 -0
  27. package/dist/assurance/contracts.d.ts.map +1 -0
  28. package/dist/assurance/contracts.js +37 -0
  29. package/dist/assurance/contracts.js.map +1 -0
  30. package/dist/assurance/doctor.d.ts +7 -0
  31. package/dist/assurance/doctor.d.ts.map +1 -0
  32. package/dist/assurance/doctor.js +39 -0
  33. package/dist/assurance/doctor.js.map +1 -0
  34. package/dist/assurance/inspect.d.ts +16 -0
  35. package/dist/assurance/inspect.d.ts.map +1 -0
  36. package/dist/assurance/inspect.js +29 -0
  37. package/dist/assurance/inspect.js.map +1 -0
  38. package/dist/assurance/instructions.d.ts +2 -0
  39. package/dist/assurance/instructions.d.ts.map +1 -0
  40. package/dist/assurance/instructions.js +2 -0
  41. package/dist/assurance/instructions.js.map +1 -0
  42. package/dist/assurance/refresh.d.ts +3 -0
  43. package/dist/assurance/refresh.d.ts.map +1 -0
  44. package/dist/assurance/refresh.js +73 -0
  45. package/dist/assurance/refresh.js.map +1 -0
  46. package/dist/assurance/service.d.ts +54 -0
  47. package/dist/assurance/service.d.ts.map +1 -0
  48. package/dist/assurance/service.js +183 -0
  49. package/dist/assurance/service.js.map +1 -0
  50. package/dist/assurance/snapshot.d.ts +3 -0
  51. package/dist/assurance/snapshot.d.ts.map +1 -0
  52. package/dist/assurance/snapshot.js +44 -0
  53. package/dist/assurance/snapshot.js.map +1 -0
  54. package/dist/cli.d.ts.map +1 -1
  55. package/dist/cli.js +2 -0
  56. package/dist/cli.js.map +1 -1
  57. package/dist/commands/codex-hook.d.ts +4 -0
  58. package/dist/commands/codex-hook.d.ts.map +1 -0
  59. package/dist/commands/codex-hook.js +36 -0
  60. package/dist/commands/codex-hook.js.map +1 -0
  61. package/dist/commands/doctor.d.ts +1 -0
  62. package/dist/commands/doctor.d.ts.map +1 -1
  63. package/dist/commands/doctor.js +3 -0
  64. package/dist/commands/doctor.js.map +1 -1
  65. package/dist/commands/setup.d.ts +1 -1
  66. package/dist/commands/setup.d.ts.map +1 -1
  67. package/dist/commands/setup.js +2 -0
  68. package/dist/commands/setup.js.map +1 -1
  69. package/dist/commands/uninstall.d.ts.map +1 -1
  70. package/dist/commands/uninstall.js +2 -1
  71. package/dist/commands/uninstall.js.map +1 -1
  72. package/dist/context/delivery.d.ts.map +1 -1
  73. package/dist/context/delivery.js +10 -8
  74. package/dist/context/delivery.js.map +1 -1
  75. package/dist/context/scoped-broker.d.ts +4 -3
  76. package/dist/context/scoped-broker.d.ts.map +1 -1
  77. package/dist/context/scoped-broker.js +15 -6
  78. package/dist/context/scoped-broker.js.map +1 -1
  79. package/dist/context/scoped-memory-use.d.ts +5 -0
  80. package/dist/context/scoped-memory-use.d.ts.map +1 -0
  81. package/dist/context/scoped-memory-use.js +60 -0
  82. package/dist/context/scoped-memory-use.js.map +1 -0
  83. package/dist/embedding/javascript-backend.d.ts.map +1 -1
  84. package/dist/embedding/javascript-backend.js +9 -0
  85. package/dist/embedding/javascript-backend.js.map +1 -1
  86. package/dist/embedding/sqlite-vec-backend.d.ts.map +1 -1
  87. package/dist/embedding/sqlite-vec-backend.js +9 -0
  88. package/dist/embedding/sqlite-vec-backend.js.map +1 -1
  89. package/dist/embedding/types.d.ts +1 -0
  90. package/dist/embedding/types.d.ts.map +1 -1
  91. package/dist/gateway/agent-service.d.ts.map +1 -1
  92. package/dist/gateway/agent-service.js +2 -0
  93. package/dist/gateway/agent-service.js.map +1 -1
  94. package/dist/ledger/checkpoint-contract.d.ts +1 -1
  95. package/dist/ledger/checkpoint-contract.d.ts.map +1 -1
  96. package/dist/ledger/checkpoint-contract.js +1 -1
  97. package/dist/ledger/checkpoint-contract.js.map +1 -1
  98. package/dist/mcp/request-deadline.d.ts +1 -1
  99. package/dist/mcp/request-deadline.d.ts.map +1 -1
  100. package/dist/mcp/request-deadline.js +4 -0
  101. package/dist/mcp/request-deadline.js.map +1 -1
  102. package/dist/mcp/server.d.ts +1 -0
  103. package/dist/mcp/server.d.ts.map +1 -1
  104. package/dist/mcp/server.js +57 -2
  105. package/dist/mcp/server.js.map +1 -1
  106. package/dist/memory/checkpoint-contract.d.ts +6 -6
  107. package/dist/memory/federated-retrieval.d.ts +17 -1
  108. package/dist/memory/federated-retrieval.d.ts.map +1 -1
  109. package/dist/memory/federated-retrieval.js +43 -13
  110. package/dist/memory/federated-retrieval.js.map +1 -1
  111. package/dist/memory/hybrid-retrieval.d.ts +1 -0
  112. package/dist/memory/hybrid-retrieval.d.ts.map +1 -1
  113. package/dist/memory/hybrid-retrieval.js +10 -0
  114. package/dist/memory/hybrid-retrieval.js.map +1 -1
  115. package/dist/memory/interaction-capture.d.ts +19 -0
  116. package/dist/memory/interaction-capture.d.ts.map +1 -0
  117. package/dist/memory/interaction-capture.js +147 -0
  118. package/dist/memory/interaction-capture.js.map +1 -0
  119. package/dist/memory/interaction-contract.d.ts +142 -0
  120. package/dist/memory/interaction-contract.d.ts.map +1 -0
  121. package/dist/memory/interaction-contract.js +51 -0
  122. package/dist/memory/interaction-contract.js.map +1 -0
  123. package/dist/memory/interaction-fingerprint.d.ts +11 -0
  124. package/dist/memory/interaction-fingerprint.d.ts.map +1 -0
  125. package/dist/memory/interaction-fingerprint.js +49 -0
  126. package/dist/memory/interaction-fingerprint.js.map +1 -0
  127. package/dist/memory/interaction-recall.d.ts +31 -0
  128. package/dist/memory/interaction-recall.d.ts.map +1 -0
  129. package/dist/memory/interaction-recall.js +71 -0
  130. package/dist/memory/interaction-recall.js.map +1 -0
  131. package/dist/memory/interaction-subjects.d.ts +9 -0
  132. package/dist/memory/interaction-subjects.d.ts.map +1 -0
  133. package/dist/memory/interaction-subjects.js +35 -0
  134. package/dist/memory/interaction-subjects.js.map +1 -0
  135. package/dist/memory/lifecycle.d.ts +1 -0
  136. package/dist/memory/lifecycle.d.ts.map +1 -1
  137. package/dist/memory/lifecycle.js +19 -18
  138. package/dist/memory/lifecycle.js.map +1 -1
  139. package/dist/memory/rebuild-search.d.ts.map +1 -1
  140. package/dist/memory/rebuild-search.js +2 -0
  141. package/dist/memory/rebuild-search.js.map +1 -1
  142. package/dist/memory/retrieval.d.ts +1 -0
  143. package/dist/memory/retrieval.d.ts.map +1 -1
  144. package/dist/memory/retrieval.js.map +1 -1
  145. package/dist/memory/scoped-memory.d.ts.map +1 -1
  146. package/dist/memory/scoped-memory.js +3 -0
  147. package/dist/memory/scoped-memory.js.map +1 -1
  148. package/dist/memory/structured-memory.d.ts.map +1 -1
  149. package/dist/memory/structured-memory.js +8 -0
  150. package/dist/memory/structured-memory.js.map +1 -1
  151. package/dist/server/agent-application.d.ts.map +1 -1
  152. package/dist/server/agent-application.js +4 -1
  153. package/dist/server/agent-application.js.map +1 -1
  154. package/dist/server/routes/agent-capability-gate.d.ts.map +1 -1
  155. package/dist/server/routes/agent-capability-gate.js +5 -0
  156. package/dist/server/routes/agent-capability-gate.js.map +1 -1
  157. package/dist/server/routes/task-assurance.d.ts +5 -0
  158. package/dist/server/routes/task-assurance.d.ts.map +1 -0
  159. package/dist/server/routes/task-assurance.js +43 -0
  160. package/dist/server/routes/task-assurance.js.map +1 -0
  161. package/dist/setup/codex-hooks.d.ts +5 -0
  162. package/dist/setup/codex-hooks.d.ts.map +1 -0
  163. package/dist/setup/codex-hooks.js +69 -0
  164. package/dist/setup/codex-hooks.js.map +1 -0
  165. package/dist/setup/render.d.ts.map +1 -1
  166. package/dist/setup/render.js +7 -2
  167. package/dist/setup/render.js.map +1 -1
  168. package/docs/README.md +1 -0
  169. package/docs/client-compatibility.md +9 -0
  170. package/docs/database.md +4 -0
  171. package/docs/interaction-memory-validation.md +108 -0
  172. package/docs/interaction-memory.md +121 -0
  173. package/docs/memory-assurance.md +127 -0
  174. package/migrations/003_interaction_memory.sql +17 -0
  175. package/migrations/004_memory_assurance.sql +74 -0
  176. package/package.json +6 -3
  177. package/skills/kiokuko-soul/SKILL.md +34 -0
  178. package/skills/memory-reasoning/SKILL.md +36 -3
  179. package/templates/AGENTS.md +7 -5
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/setup/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAA6B,MAAM,mBAAmB,CAA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,wBAAwB,CAAC,YAAY,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,2BAA2B,GAAG,kBAAkB,KAAK,SAAS;QAClE,CAAC,CAAC,yBAAyB,IAAI,UAAU;QACzC,CAAC,CAAC,kBAAkB,CAAC;IACvB,MAAM,KAAK,GAAG;QACZ,eAAe;QACf,+BAA+B;QAC/B,uBAAuB;QACvB,aAAa,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;QACtC,gBAAgB;QAChB,gBAAgB;QAChB,iBAAiB;QACjB,WAAW,mBAAmB,MAAM,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,IAAI;QACnF,aAAa;KACd,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,oBAAoB,CAAC,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,CAAC,CAAC;AACxG,CAAC"}
package/docs/README.md CHANGED
@@ -6,6 +6,7 @@ Choose a guide by what you need to do:
6
6
  - [npm notices and setup errors](../README.md#setup-messages) — review script approvals and distinguish them from missing embedding dependencies.
7
7
  - [Concepts](concepts.md) — RAG, memory lifecycle, Project/Ecosystem/Global scopes, and Akinator.
8
8
  - [Semantic retrieval](semantic-retrieval.md) — embedding runtime setup, operation, offline mode, and fallback.
9
+ - [Interaction memory](interaction-memory.md) — automatic candidate capture, subject recall, corrections, and the disable switch.
9
10
  - [Akinator profile memory](akinator-memory.md) — optional hints, strict target resolution, and index rebuilding.
10
11
  - [Security and trust](security-and-trust.md) — secret rejection, memory boundaries, External Skills, and public errors.
11
12
  - [CLI contract](cli-contract.md) — stable command and response details.
@@ -115,3 +115,12 @@ framework. `task_prepare` treats it as a first-party recommendation for concrete
115
115
  coding terms in English or Japanese. Explicit no-code, documentation-only, and
116
116
  image-only work do not trigger it. Kiokuko does not claim that availability alone
117
117
  forces model use.
118
+
119
+ ## Interaction memory
120
+
121
+ All four setup targets receive the same capture/recall instructions and bundled
122
+ Skills. `memory_capture` stores untrusted candidates without ending a task;
123
+ `memory_recall` serves global conversation without a project. Project preparation
124
+ and capability withholding retain their existing gates. Reload the client after
125
+ setup so new tools and instructions are visible. Configuration coverage is not
126
+ proof of model behavior; see [per-client validation](interaction-memory-validation.md).
package/docs/database.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Kiokuko 1.0 initializes a new database from `migrations/001_baseline.sql`.
4
4
  The baseline includes memory revisions, task intake and ledger, scoped context,
5
5
  external Skill discovery, CJK word/trigram search, and semantic search tables.
6
+ Additive migration `003_interaction_memory.sql` indexes normalized captured-content
7
+ fingerprints; revision hashes and existing entries keep their original meaning.
8
+ Edits/imports/rebuilds synchronize the index, superseding invalidates it, and purge
9
+ cascades deletion. Capture retry receipts contain hashes, IDs, and outcomes only.
6
10
  SQL performs no network access, model loading, or vector generation.
7
11
 
8
12
  `schema_migrations` binds the baseline filename and SHA-256 checksum. Reopening
@@ -0,0 +1,108 @@
1
+ # Interaction memory validation
2
+
3
+ Validated locally on 2026-09-19, macOS arm64, Node.js 26.5.0. These are source and
4
+ isolated-install results, not a published release or an update to a running client.
5
+
6
+ ## Automated checks
7
+
8
+ - TypeScript type checking, build, and the 1,685-test unit/integration suite pass.
9
+ - Retrieval evaluation: 110 queries, Recall@1 0.93, Recall@5 0.99, semantic-only
10
+ Recall@5 0.95, zero scope leaks, zero false-negative deliveries. These use the
11
+ existing deterministic evaluation corpus, not a claim about model behavior.
12
+ - Package dry-run includes migration 003, the two tools, updated Skills, templates,
13
+ and documentation. Isolated global installation verifies bundled Skill setup
14
+ across Codex, Claude Code, OpenCode, and Hermes.
15
+ - The schema-3 sample database passes baseline and Web API checks. A separate v2
16
+ upgrade test verifies that old entries and revision bytes are not reclassified.
17
+ - New tests cover standalone global operation without project state, subject
18
+ isolation, general preference injection, capability withholding, exact replay,
19
+ restarted connections, concurrent processes, operation conflicts, corrections
20
+ of verified memories, stale/ambiguous/protected targets, transactional failure,
21
+ secret rejection, purge retries, candidate edits, import, and index rebuilding.
22
+ - Both vector backends apply explicit subject filters before their candidate
23
+ limit. The regression places the matching entry behind 130 unrelated vectors.
24
+ - Project preference ranking uses `context-ranking-v7`, preventing replay of a
25
+ context selected under the previous ranking policy. Historical deliveries remain
26
+ readable; existing revision hashes are unchanged.
27
+
28
+ The first sandboxed suite could not bind local HTTP ports. The passing suite ran
29
+ with localhost access. Package installation used a temporary prefix and npm cache;
30
+ no user client configuration was rewritten.
31
+
32
+ ## Live model behavior
33
+
34
+ | Client | Result | Evidence / limit |
35
+ |---|---|---|
36
+ | Codex CLI 0.153.4 | Passed | Two fresh ephemeral conversations, real stdio MCP and a disposable SQLite database. The model chose capture, then recalled and used the preference. |
37
+ | Claude Code 2.1.220 | Blocked before inference | The isolated `--bare` probe reported `authentication_failed` / “Not logged in”. Bare mode intentionally does not use OAuth/keychain credentials. This does not establish the login state of the normal installed profile. |
38
+ | OpenCode 1.18.31 | Blocked before inference | The isolated config/data probe reported `ProviderAuthError`: its selected Google provider had no API key. Normal-profile authentication was not copied or inspected. |
39
+ | Hermes Agent | Not run | No `hermes` executable on the test process PATH. No conclusion about installations elsewhere. |
40
+
41
+ Codex's first natural message was:
42
+
43
+ > For Japanese grammar explanations, I prefer two examples about trains before grammatical terminology.
44
+
45
+ Its `memory_capture` call created a global candidate with subject
46
+ `japanese-grammar`. The second conversation received only this new message:
47
+
48
+ > Explain the difference between は and が in Japanese grammar.
49
+
50
+ The model used query-only `memory_recall`. Its answer gave these two train examples
51
+ before explaining topic and subject terminology:
52
+
53
+ > 電車は来ました。 — “The train has arrived.”
54
+ >
55
+ > 電車が来ました。 — “A train has arrived” or “The train is here.”
56
+
57
+ Both conversations read only their local copies of the bundled Skills. The second
58
+ had no first-conversation transcript or preference in its prompt. Database checks
59
+ confirmed zero repository locations, task runs, and intake sessions. This is live
60
+ proof of capture and later influence in Codex under the tested setup; it does not
61
+ prove every-turn interception or reliability in the other clients.
62
+
63
+ Two earlier probes exposed real integration boundaries. First, noninteractive
64
+ Codex denied the write tool under its approval policy. The test now preapproves
65
+ only its disposable server's `memory_capture` operation. Second, model-generated
66
+ labels differed (“Japanese grammar explanations” vs “Japanese grammar”), causing
67
+ an exact-filter miss. Bundled guidance now favors short topic labels and query-only
68
+ recall unless exact stored labels are known. The successful probe used that guidance.
69
+ Host/client tool approval still applies; Kiokuko does not bypass it.
70
+
71
+ Reproduce the Codex probe with an already-authenticated CLI:
72
+
73
+ ```bash
74
+ npm run test:interaction:live
75
+ ```
76
+
77
+ The script prints its temporary evidence directory, preserves protocol events and
78
+ answers there, and fails unless capture, later recall, and the train preference in
79
+ the second answer are observed. It uses process-only configuration, disables
80
+ native memory injection, ignores user config, and never resumes an old conversation.
81
+ It does not install or log into clients. For the other clients, use the same two
82
+ natural messages in separate fresh sessions with a disposable Kiokuko database,
83
+ then verify both tool calls and the second answer before marking them passed.
84
+
85
+ Codex configuration follows the official [configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
86
+ and [noninteractive mode guide](https://learn.chatgpt.com/docs/non-interactive-mode).
87
+ OpenCode isolation used its documented [CLI environment settings](https://opencode.ai/docs/cli/).
88
+
89
+ ## Measured scale
90
+
91
+ The interaction benchmark seeds 10,000 synthetic global captured facts in
92
+ **in-memory SQLite**, with embeddings disabled. It uses 10 recall/duplicate-capture
93
+ samples and 3 snapshot samples; values below are local measurements, not an SLA.
94
+
95
+ | Operation | Median | p95 |
96
+ |---|---:|---:|
97
+ | Query plus explicit subject recall | 27.47 ms | 35.32 ms |
98
+ | Exact duplicate capture | 0.38 ms | 2.56 ms |
99
+ | Existing project-context snapshot hash over 10,000 relevant entries | 1,447.14 ms | 1,469.49 ms |
100
+
101
+ Seeding took 8.29 seconds. The same snapshot path rejects 10,001 entries with its
102
+ existing integrity error. The snapshot measurement is one component of project
103
+ preparation, not the duration of a full `task_prepare`. Disk latency, providers,
104
+ large receipt histories, and long-running task ledgers were not benchmarked here.
105
+
106
+ ```bash
107
+ npm run test:interaction:benchmark
108
+ ```
@@ -0,0 +1,121 @@
1
+ # Memory from normal interaction
2
+
3
+ Kiokuko can save durable preferences, facts, decisions, and corrections from normal
4
+ conversation. The current client's model extracts concise memories and calls
5
+ `memory_capture`; no separate model service or credentials are needed. Each memory
6
+ is a revisioned SQLite entry. Automatic saves are **candidate / untrusted**, and
7
+ can immediately be recalled as advisory context. A stated evidence basis is not
8
+ proof of truth. Curator's reviewed global promotion remains a separate operation.
9
+
10
+ After updating Kiokuko, run `kiokuko setup` for your selected clients and restart
11
+ them so the new tools and bundled instructions load. Existing project work still
12
+ uses `task_prepare` / `task_answer`. General conversation uses `memory_recall`
13
+ without a repository, task run, or artificial intake answers.
14
+
15
+ ## What is saved
16
+
17
+ The model is instructed to capture explicit durable preferences and corrections,
18
+ settled decisions, verified results, and reusable troubleshooting lessons—even
19
+ without “remember this.” It skips routine progress, temporary requests, repetition,
20
+ unsupported assistant conclusions, sensitive personal profiling, and transcripts.
21
+ Secret detection rejects a whole batch before it writes anything.
22
+
23
+ Clearly general knowledge can be saved globally with a portability reason.
24
+ Project-specific knowledge requires the active project run after intake permits
25
+ progress. Uncertain scope stays local or is skipped outside a project. General
26
+ communication preferences must be explicitly general; subject preferences retain
27
+ their subjects. Memories never authorize actions or override current instructions.
28
+
29
+ ## MCP contract
30
+
31
+ `memory_capture` is non-terminal. Its input includes `operationId`, optional
32
+ `cwd` / `runId`, and one to five `memories`. Each item reuses the checkpoint fields
33
+ (kind, title, body, scope, applicability, tags, and portability reason), with:
34
+
35
+ - `body`: nonempty, at most 2,000 characters; optional summary at most 500.
36
+ - `subjects`: one to five labels, normalized to lowercase `subject:` tags.
37
+ - `basis`: `user_statement`, `user_correction`, or `observed_result`.
38
+ - `generalCommunication: true`: only for an unqualified global preference;
39
+ omit subjects and applicability in this case.
40
+ - `replaces: { entryId, expectedRevision }`: only with `user_correction`.
41
+
42
+ For example, a model can extract this from “When explaining Japanese grammar,
43
+ I prefer examples before terminology”:
44
+
45
+ ```json
46
+ {
47
+ "operationId": "conversation-1-preference-1",
48
+ "memories": [{
49
+ "kind": "preference",
50
+ "title": "Japanese grammar explanations",
51
+ "body": "For Japanese grammar explanations, give examples before terminology.",
52
+ "scope": "global",
53
+ "portableReason": "Applies to Japanese grammar explanations across projects.",
54
+ "subjects": ["Japanese grammar"],
55
+ "basis": "user_statement"
56
+ }]
57
+ }
58
+ ```
59
+
60
+ Responses contain entry IDs, revisions, workspace, created/duplicate/corrected
61
+ outcomes, and current/changed/superseded/unavailable availability. Reuse an
62
+ operation ID only for an exact retry; a different payload conflicts. Exact
63
+ normalized content across separate operations deduplicates independently of
64
+ timestamps, client provenance, and run IDs. Similar paraphrases are not merged.
65
+
66
+ Corrections require an exact current revision in the same scope. Creating the
67
+ replacement and superseding the old entry is atomic, including for a previously
68
+ verified entry. History remains accessible through existing review controls.
69
+ Stale revisions, duplicate correction targets, and managed entries are rejected.
70
+ Operation receipts contain no memory text. Retrying a purged operation acknowledges
71
+ its unavailable entry without recreating it. A new operation ID is a new request,
72
+ not a deletion tombstone bypass prevention mechanism.
73
+
74
+ `memory_recall` takes `soulRead: true`, the complete current capability catalog,
75
+ `query`, optional `subjects`, `limit` (default 8, maximum 20), and
76
+ `maxContextChars` (default 4,000, range 100–12,000). Read the exact local
77
+ `kiokuko-soul` and `memory-reasoning` Skills before advertising them. Missing SOUL
78
+ blocks recall; missing or unknown memory-reasoning withholds ordinary memories.
79
+ Current managed Curator projections retain the existing trusted-memory exception.
80
+
81
+ Recall searches only global memory, using lexical and optional semantic retrieval.
82
+ Explicit subjects restrict matching before result selection. Without explicit
83
+ subjects, at most two general communication preferences may appear without query
84
+ word overlap. Subject preferences require the subject in the query or an explicit
85
+ subject filter. Prefer query-only recall. Pass explicit filters only for exact known stored labels,
86
+ not guessed synonyms. Use short topic labels at capture time. Project preparation
87
+ uses the same preference selection within its existing budget and capability gate.
88
+ Returned records include IDs, revisions, subjects, status/trust labels, and concise
89
+ content. The character budget includes the serialized memory items, not protocol
90
+ or capability metadata.
91
+
92
+ Save important corrections promptly; batch other captures before the final answer.
93
+ Do not resubmit captured memories in `memory_checkpoint`, which remains terminal.
94
+
95
+ ## Disable capture
96
+
97
+ Set the environment variable on the Kiokuko MCP server process, then restart it:
98
+
99
+ ```bash
100
+ KIOKUKO_INTERACTION_MEMORY=off kiokuko mcp
101
+ ```
102
+
103
+ In a client's MCP configuration, put `KIOKUKO_INTERACTION_MEMORY = "off"` in its
104
+ server environment rather than starting a second server manually. Recall and
105
+ existing explicit checkpoints remain available. No new management UI is needed:
106
+ use the existing Web/CLI review, history, and deletion controls.
107
+
108
+ ## Storage and limits
109
+
110
+ Migration `003_interaction_memory.sql` adds an indexed fingerprint projection.
111
+ Revision hashes keep their original provenance-sensitive definition. Candidate
112
+ edits, imports, superseding, purge, and search-index rebuilding maintain the
113
+ projection. Existing memories are not automatically reclassified. Receipts are
114
+ local operational metadata; workspace exports include memories, not retry history.
115
+
116
+ One database represents one user. Capture is model-mediated and cannot intercept
117
+ every turn. SQLite capacity is not a promise of unlimited project retrieval: the
118
+ existing 10,000-entry project snapshot integrity limit remains in force.
119
+
120
+ See [interaction memory validation](interaction-memory-validation.md) for automated
121
+ checks, performance measurements, and separate live-client results.
@@ -0,0 +1,127 @@
1
+ # Memory application and execution evidence
2
+
3
+ Kiokuko tracks whether applicable delivered memory has a current decision and
4
+ regression evidence. It cannot prove that a model understood a memory, that a
5
+ stated rationale is correct, or that a chosen verifier is sufficient.
6
+
7
+ ## Workflow
8
+
9
+ 1. Read the bundled SOUL and memory-reasoning Skills and call `task_prepare`.
10
+ Complete the existing Akinator intake with `task_answer`.
11
+ 2. Read `assurance` in the preparation response or call `task_memory_status`.
12
+ It reports the current revision, missing decisions and stale verification.
13
+ 3. Call `task_memory_review` for selected actionable entries. Bind the run,
14
+ delivery ID, entry ID/revision and expected assurance revision. Choose
15
+ `adopted`, `inapplicable` or `contradicted`. All decisions need current evidence;
16
+ adoption also needs an invariant, counterexample and verifier.
17
+ 4. For implementation, run the verifier and link its evidence IDs with another
18
+ review. `task_memory_status` with `snapshot: true` returns the pre-execution
19
+ state digest required by `task_execution_evidence`. Public evidence is always
20
+ **model-reported**. The Codex adapter records **client-observed** results only
21
+ when the client supplies a recognized completed exit status.
22
+ 5. Use `task_memory_refresh` when new paths or errors change the search. Preserve
23
+ the run and exact capability catalog. A different delivery or entry revision
24
+ requires reconfirming affected reviews. Finish with the existing checkpoint.
25
+
26
+ Only memories selected as actionable require decisions. Incidental retrieval
27
+ results do not impose formal checklists. Code PLAN/review requires grounded
28
+ application decisions; implementation requires passing regression evidence.
29
+ Failure, cancellation and interruption can terminate without passing evidence.
30
+ Existing non-terminal server checkpoints remain non-terminal. Legacy callers
31
+ without the assurance contract remain unobserved, never retrospectively verified.
32
+
33
+ Retries use the same `requestId`, complete input and `expectedRevision`. A changed
34
+ request under the same ID or a stale revision conflicts. Review and evidence
35
+ records are durable. The repository state hash covers Git-visible tracked and
36
+ unignored files plus conventional local environment and Codex/Kiokuko config
37
+ files; edits invalidate prior results. Other ignored files are outside that snapshot. Symlinks, non-regular files, more than 20,000 files or 64 MiB of content
38
+ make snapshot verification unavailable rather than silently incomplete.
39
+
40
+ ## API
41
+
42
+ The MCP tools and authenticated server routes share the domain implementation:
43
+
44
+ | MCP tool | POST route under `/api/v1/agent/runs/:runId/` |
45
+ | --- | --- |
46
+ | `task_memory_review` | `memory-review` |
47
+ | `task_execution_evidence` | `execution-evidence` |
48
+ | `task_memory_refresh` | `memory-refresh` |
49
+ | `task_memory_status` | `memory-status` |
50
+
51
+ For HTTP, put the request ID in `Idempotency-Key`, the run ID in the path, and
52
+ remaining fields in the body. The status body accepts `cwd` and `snapshot`.
53
+ `task_inspect` provides bounded preparation reads and bundled Skill access
54
+ without executing a model-supplied shell command.
55
+
56
+ Capability normalization v2 reserves identity space before spending description
57
+ space. More than 200 valid capabilities are accepted. Oversized descriptions are
58
+ omitted without losing identities. Malformed inputs or identity-budget exhaustion
59
+ remain explicitly `unknown`. Digest version 2 conflicts with older bound runs;
60
+ start a new logical request after upgrading instead of resuming a v1 binding.
61
+
62
+ Scoped retrieval distinguishes `no_entries`, `no_match`, `out_of_scope`,
63
+ `capability_withheld`, and `delivered` in assurance diagnostics. Search exceptions
64
+ remain errors and never become a normal empty result. Counts describe the bounded
65
+ search lanes; they are not an inventory of unrelated project memories.
66
+
67
+ ## Codex setup and limits
68
+
69
+ ```sh
70
+ kiokuko setup --clients codex
71
+ kiokuko doctor
72
+ ```
73
+
74
+ Setup adds only Kiokuko-owned event handlers to Codex `hooks.json`; reinstall and
75
+ uninstall preserve other handlers and settings. Review the new hook definitions
76
+ in Codex `/hooks` and restart/reopen the client as required by its configuration
77
+ lifecycle. Configuration presence does not prove that the current client executes
78
+ hooks. Doctor distinguishes configured hooks, historical observations and the
79
+ unconfirmed current client, plus pending reviews and verification.
80
+
81
+ The adapter handles UserPromptSubmit, PreToolUse, PostToolUse, Stop, Interrupt and
82
+ explicit child lifecycle identities. It derives request bindings from client
83
+ hook events, never from a model-supplied session ID. It does not fabricate
84
+ `soulRead`. The supported preparation route permits Kiokuko operations and
85
+ `task_inspect`; arbitrary shell strings are not classified as read-only.
86
+ Unidentified child execution cannot inherit a parent's run. Delegation is denied
87
+ on paths where distinct child tool identities cannot be established.
88
+
89
+ Hooks are not execution isolation. Unsupported tool paths, disabled/untrusted
90
+ hooks, adapter startup failures and already running processes remain outside
91
+ complete enforcement. In particular, `write_stdin` does not repeat PreToolUse.
92
+ Stop cannot retract text already emitted; an incomplete report stops with an
93
+ explicit message instead of generating unlimited continuation turns. Interrupt
94
+ never requests continuation. Unknown execution result formats stay unknown.
95
+ In a local test with **codex-cli 0.153.4**, Bash PostToolUse supplied stdout as
96
+ a string (empty for `true`) and no exit-status field. That path cannot produce
97
+ observed passing evidence: stdout, JSON printed by a command, and text resembling
98
+ an exit header are never trusted as completion metadata. The dedicated live test
99
+ therefore fails its required execution-observation check on that client. The
100
+ deterministic adapter fixture with structured exit metadata passes; it is not
101
+ evidence that the installed CLI or desktop exposes that metadata.
102
+ See the [official Codex hook protocol](https://developers.openai.com/ja-JP/docs/hooks).
103
+
104
+ ## Validation
105
+
106
+ `tests/integration/memory-assurance.test.ts` exercises the next-migration
107
+ counterexample, actual migration execution, failed/passing evidence, restart,
108
+ stale source and memory revisions, retries, cancellation, atomic refresh failure,
109
+ and the shared MCP/server decision path. Historical schema fixtures may retain
110
+ fixed versions; current-schema expectations derive from the bundled migration
111
+ snapshot in `tests/fixtures/current-migrations.ts`.
112
+
113
+ ```sh
114
+ npm run typecheck
115
+ npm test
116
+ npm run build
117
+ npm run test:evaluation
118
+ npm run test:sampledb
119
+ npm run test:global-install
120
+ npm run pack:check
121
+ node scripts/run-memory-assurance-live.mjs
122
+ ```
123
+
124
+ The dedicated CLI test exits nonzero when the required runtime or observations
125
+ are missing. Protocol fixtures, real CLI operation, desktop operation and
126
+ model memory-application quality are separate evidence. A CLI pass does not
127
+ establish desktop acceptance or a measured improvement in application rate.
@@ -0,0 +1,17 @@
1
+ -- A rebuildable projection, not a replacement for immutable revision hashes.
2
+ CREATE TABLE interaction_memory_fingerprints (
3
+ entry_id TEXT PRIMARY KEY REFERENCES entries(id) ON DELETE CASCADE,
4
+ workspace TEXT NOT NULL,
5
+ revision INTEGER NOT NULL CHECK (revision > 0),
6
+ fingerprint TEXT NOT NULL CHECK (length(fingerprint) = 64),
7
+ FOREIGN KEY (entry_id, revision) REFERENCES entry_revisions(entry_id, revision) ON DELETE CASCADE
8
+ );
9
+ CREATE INDEX idx_interaction_memory_fingerprint
10
+ ON interaction_memory_fingerprints(workspace, fingerprint, entry_id);
11
+
12
+ CREATE TRIGGER interaction_memory_invalidate
13
+ AFTER UPDATE OF current_revision, status ON entries
14
+ WHEN NEW.current_revision <> OLD.current_revision OR NEW.status = 'superseded'
15
+ BEGIN
16
+ DELETE FROM interaction_memory_fingerprints WHERE entry_id = NEW.id;
17
+ END;
@@ -0,0 +1,74 @@
1
+ -- New runs opt into assurance. Historical runs and delivery records are untouched.
2
+ CREATE TABLE task_assurance (
3
+ run_id TEXT PRIMARY KEY REFERENCES ledger_runs(run_id),
4
+ revision INTEGER NOT NULL DEFAULT 0 CHECK(revision >= 0),
5
+ delivery_id TEXT,
6
+ repository_root TEXT,
7
+ observed_changes INTEGER NOT NULL DEFAULT 0 CHECK(observed_changes IN (0, 1)),
8
+ retrieval_status TEXT NOT NULL DEFAULT 'pending',
9
+ updated_at TEXT NOT NULL
10
+ ) STRICT;
11
+ CREATE TABLE task_memory_reviews (
12
+ run_id TEXT NOT NULL REFERENCES task_assurance(run_id),
13
+ delivery_id TEXT NOT NULL,
14
+ entry_id TEXT NOT NULL REFERENCES entries(id) ON DELETE CASCADE,
15
+ entry_revision INTEGER NOT NULL,
16
+ decision TEXT NOT NULL CHECK(decision IN ('adopted','inapplicable','contradicted')),
17
+ basis TEXT NOT NULL,
18
+ invariant_text TEXT NOT NULL,
19
+ counterexample TEXT NOT NULL,
20
+ verification TEXT NOT NULL,
21
+ evidence_ids_json TEXT NOT NULL CHECK(json_valid(evidence_ids_json)),
22
+ created_at TEXT NOT NULL,
23
+ PRIMARY KEY(run_id, delivery_id, entry_id, entry_revision)
24
+ ) STRICT;
25
+ CREATE TABLE task_execution_evidence (
26
+ evidence_id TEXT PRIMARY KEY,
27
+ run_id TEXT NOT NULL REFERENCES task_assurance(run_id),
28
+ delivery_id TEXT,
29
+ repository_root TEXT NOT NULL,
30
+ cwd TEXT NOT NULL,
31
+ execution_digest TEXT NOT NULL,
32
+ state_digest TEXT NOT NULL,
33
+ outcome TEXT NOT NULL CHECK(outcome IN ('passed','failed','skipped','unknown')),
34
+ exit_code INTEGER,
35
+ provenance TEXT NOT NULL CHECK(provenance IN ('model_reported','client_observed')),
36
+ created_at TEXT NOT NULL
37
+ ) STRICT;
38
+ CREATE INDEX task_execution_evidence_run ON task_execution_evidence(run_id);
39
+ CREATE TABLE task_assurance_requests (
40
+ run_id TEXT NOT NULL REFERENCES task_assurance(run_id),
41
+ request_id TEXT NOT NULL,
42
+ request_digest TEXT NOT NULL,
43
+ response_json TEXT NOT NULL CHECK(json_valid(response_json)),
44
+ PRIMARY KEY(run_id, request_id)
45
+ ) STRICT;
46
+ CREATE TABLE codex_hook_requests (
47
+ identity_digest TEXT PRIMARY KEY,
48
+ repository_root TEXT NOT NULL,
49
+ run_id TEXT REFERENCES ledger_runs(run_id),
50
+ request_id TEXT NOT NULL,
51
+ state TEXT NOT NULL CHECK(state IN ('pending','bound','cancelled')),
52
+ stop_notified INTEGER NOT NULL DEFAULT 0,
53
+ last_event TEXT NOT NULL,
54
+ updated_at TEXT NOT NULL
55
+ ) STRICT;
56
+ CREATE TABLE codex_hook_tools (
57
+ identity_digest TEXT NOT NULL REFERENCES codex_hook_requests(identity_digest),
58
+ call_id TEXT NOT NULL,
59
+ run_id TEXT,
60
+ delivery_id TEXT,
61
+ input_digest TEXT NOT NULL,
62
+ state_digest TEXT,
63
+ evidence_id TEXT,
64
+ post_state_digest TEXT,
65
+ PRIMARY KEY(identity_digest, call_id)
66
+ ) STRICT;
67
+ CREATE TABLE codex_hook_observations (
68
+ observation_id TEXT PRIMARY KEY,
69
+ event_name TEXT NOT NULL,
70
+ tool_name TEXT,
71
+ response_shape TEXT NOT NULL,
72
+ decision TEXT NOT NULL,
73
+ observed_at TEXT NOT NULL
74
+ ) STRICT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiokuko",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Model-agnostic external memory for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,13 +35,16 @@
35
35
  "test:sqlite-vec": "node --import tsx tests/ci/sqlite-vec-package-smoke.ts",
36
36
  "test:global-install": "node tests/ci/global-install-smoke.mjs",
37
37
  "test:evaluation": "npm run build && node scripts/run-retrieval-evaluation.mjs",
38
+ "test:interaction:live": "npm run build && node scripts/run-interaction-memory-smoke.mjs",
39
+ "test:interaction:benchmark": "npm run build && node scripts/run-interaction-memory-benchmark.mjs",
38
40
  "test:benchmark": "npm run build && node scripts/run-retrieval-benchmark.mjs",
39
41
  "sampledb:generate": "node --import tsx tests/fixtures/sample-database.ts tests/sampledb/kiokuko.sqlite3",
40
42
  "test:sampledb": "npm run build && node --import tsx tests/ci/verify-sample-database.ts",
41
43
  "pack:check": "npm pack --dry-run",
42
44
  "prepublishOnly": "npm run typecheck && npm test && npm run build && npm run pack:check",
43
45
  "test:evaluation:akinator": "npm run build && node scripts/run-akinator-memory-evaluation.mjs",
44
- "test:benchmark:akinator": "npm run build && node scripts/run-akinator-memory-benchmark.mjs"
46
+ "test:benchmark:akinator": "npm run build && node scripts/run-akinator-memory-benchmark.mjs",
47
+ "test:memory-assurance:live": "npm run build && node scripts/run-memory-assurance-live.mjs"
45
48
  },
46
49
  "dependencies": {
47
50
  "@modelcontextprotocol/sdk": "^1.30.0",
@@ -52,7 +55,7 @@
52
55
  "zod": "^4.4.3"
53
56
  },
54
57
  "overrides": {
55
- "adm-zip": "0.6.0",
58
+ "adm-zip": "0.6.1",
56
59
  "sharp": "0.35.4"
57
60
  },
58
61
  "allowScripts": {
@@ -17,6 +17,40 @@ This Skill owns the entry sequence and routes work. Akinator is the mandatory in
17
17
 
18
18
  Explicit user instructions outrank these Skills' design, style, workflow, and implementation preferences. They do not override host-enforced safety, authorization, identity, state, revision, or integrity invariants. Resolve routine choices from repository evidence and existing authorization; ask only when an unresolved assumption would materially change the intended result or permitted effects.
19
19
 
20
+ ## Ordinary conversation and interaction memory
21
+
22
+ For ordinary conversation that does not involve project work, use `memory_recall`
23
+ with the current query, optional subjects, `soulRead: true`, and the complete
24
+ capability catalog. Read `memory-reasoning` before advertising it. No repository,
25
+ task run, or Akinator answers are needed. This route cannot replace or bypass
26
+ intake for project work or an already-open project run.
27
+
28
+ Proactively use non-terminal `memory_capture` for durable user statements and
29
+ preferences, explicit corrections, settled decisions, and verified reusable
30
+ results, even without “remember this.” Extract at most five concise memories per
31
+ call with subjects and an honest basis. Use short topic labels such as “Japanese
32
+ grammar”, not task phrases such as “Japanese grammar explanations”. Prefer
33
+ query-only recall; pass subject filters only for exact known stored labels.
34
+ Save important corrections promptly and
35
+ batch other memories before the final answer. Save nothing when nothing is useful.
36
+ Skip routine progress, temporary requests, repetition, unsupported assistant
37
+ conclusions, sensitive personal profiling, secrets, and transcripts.
38
+
39
+ Project saves require the active run with completed intake. Clearly general
40
+ knowledge may use global scope with a portability reason. `generalCommunication`
41
+ is only for explicitly general communication preferences, without subjects or
42
+ applicability. Subject-specific preferences must retain their subjects. Correct
43
+ only a known entry ID and expected revision; never guess a replacement target.
44
+ All captures remain untrusted candidates, immediately eligible for advisory
45
+ recall. Curator still requires approval for verified global promotion.
46
+
47
+ `memory_capture` does not close the task. `memory_checkpoint` remains terminal;
48
+ do not repeat captured memories there. Exact transport retries reuse the capture
49
+ operation ID; changed payloads use a new operation. A purged receipt is not an
50
+ instruction to recreate content. `KIOKUKO_INTERACTION_MEMORY=off` disables capture
51
+ without disabling recall or explicit checkpoints. Tool use is model-mediated,
52
+ not a guarantee of interception on every turn.
53
+
20
54
  ## Required entry
21
55
 
22
56
  Read this Skill before any other bundled Kiokuko Skill.