@cairnkeep/cli 2.3.1 → 2.5.0
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/CHANGELOG.md +85 -0
- package/README.md +232 -6
- package/bin/cairn +43 -2
- package/claude/capability-contract/hooks/capability-command-finish.sh +81 -0
- package/claude/capability-contract/hooks/capability-command-start.sh +76 -0
- package/claude/hooks/compaction-capture.sh +34 -0
- package/claude/hooks/memory-capture.sh +47 -5
- package/claude/hooks/memory-wakeup.sh +55 -2
- package/docs/building-an-overlay.md +4 -3
- package/docs/design/meta-agent.md +439 -0
- package/docs/harness-compatibility.md +117 -0
- package/docs/learning/CURRICULUM-MAP.md +91 -0
- package/docs/learning/FEATURE-GUIDE.md +86 -0
- package/docs/learning/PRODUCTION-PLAN.md +45 -14
- package/docs/learning/README.md +20 -1
- package/docs/learning/instructor-guide.md +6 -0
- package/docs/learning/lessons/L00-why-cairnkeep.md +20 -8
- package/docs/learning/lessons/L01-safe-trial.md +3 -3
- package/docs/learning/lessons/L02-installation.md +23 -5
- package/docs/learning/lessons/L03-first-project.md +7 -2
- package/docs/learning/lessons/L04-memory-fundamentals.md +4 -0
- package/docs/learning/lessons/L05-daily-workflow.md +4 -0
- package/docs/learning/lessons/L07-privacy-and-storage.md +3 -0
- package/docs/learning/lessons/L10-context-exploration.md +4 -2
- package/docs/learning/lessons/L12-managed-overlays.md +2 -0
- package/docs/learning/lessons/L13-session-evidence.md +71 -0
- package/docs/learning/lessons/L14-typed-memory.md +51 -0
- package/docs/learning/lessons/L15-capability-governance.md +56 -0
- package/docs/learning/lessons/L16-evaluation.md +67 -0
- package/docs/learning/lessons/L17-agent-boundary.md +55 -0
- package/docs/learning/templates/lesson-template.md +4 -1
- package/docs/learning/tracks/evidence-and-evaluation.md +20 -0
- package/docs/learning/tracks/operator.md +8 -2
- package/docs/learning/tracks/practitioner.md +6 -1
- package/docs/learning/tracks/quickstart.md +3 -0
- package/docs/learning/video-scripts/L00-why-cairnkeep.md +21 -17
- package/docs/learning/video-scripts/L02-installation.md +9 -2
- package/docs/learning/video-scripts/L03-first-project.md +3 -0
- package/docs/operating.md +567 -7
- package/docs/privacy-and-data-flow.md +417 -0
- package/docs/storage.md +252 -0
- package/examples/eval/README.md +42 -0
- package/examples/eval/adapter.json +12 -0
- package/examples/eval/bundled-fake.json +1 -0
- package/examples/eval/task-set.json +1 -0
- package/mcp-memory-server/dist/artifact-cli.js +184 -0
- package/mcp-memory-server/dist/artifact-schema.js +218 -0
- package/mcp-memory-server/dist/artifact-store.js +812 -0
- package/mcp-memory-server/dist/capability-adapter.js +286 -0
- package/mcp-memory-server/dist/capability-cli.js +361 -0
- package/mcp-memory-server/dist/capability-config.js +310 -0
- package/mcp-memory-server/dist/capability-harness.js +496 -0
- package/mcp-memory-server/dist/capability-registry.js +123 -0
- package/mcp-memory-server/dist/capability-schema.js +65 -0
- package/mcp-memory-server/dist/capability-store.js +431 -0
- package/mcp-memory-server/dist/compaction-normalize.js +267 -0
- package/mcp-memory-server/dist/eval-cli.js +523 -0
- package/mcp-memory-server/dist/eval-plan.js +346 -0
- package/mcp-memory-server/dist/eval-process.js +273 -0
- package/mcp-memory-server/dist/eval-report.js +609 -0
- package/mcp-memory-server/dist/eval-runner.js +827 -0
- package/mcp-memory-server/dist/eval-schema.js +368 -0
- package/mcp-memory-server/dist/eval-statistics.js +161 -0
- package/mcp-memory-server/dist/eval-workspace.js +313 -0
- package/mcp-memory-server/dist/failure-signature.js +141 -0
- package/mcp-memory-server/dist/index.js +600 -55
- package/mcp-memory-server/dist/node-cli.js +84 -0
- package/mcp-memory-server/dist/node-schema.js +170 -0
- package/mcp-memory-server/dist/node-store.js +455 -0
- package/mcp-memory-server/dist/note-cli.js +235 -0
- package/mcp-memory-server/dist/note-distiller.js +177 -0
- package/mcp-memory-server/dist/note-enrichment.js +93 -0
- package/mcp-memory-server/dist/note-schema.js +4 -0
- package/mcp-memory-server/dist/note-store.js +985 -0
- package/mcp-memory-server/dist/trajectory-cli.js +141 -0
- package/mcp-memory-server/dist/trajectory-normalize.js +448 -0
- package/mcp-memory-server/dist/trajectory-redaction.js +155 -0
- package/mcp-memory-server/dist/trajectory-schema.js +73 -0
- package/mcp-memory-server/dist/trajectory-store.js +339 -0
- package/mcp-memory-server/package.json +24 -2
- package/mcp-memory-server/scripts/fixtures/compaction-claude-code-2.1.219.json +9 -0
- package/mcp-memory-server/scripts/fixtures/compaction-claude-code-2.1.220.json +9 -0
- package/mcp-memory-server/scripts/fixtures/compaction-opencode-1.17.20-event.json +6 -0
- package/mcp-memory-server/scripts/fixtures/compaction-opencode-1.17.20-messages.json +119 -0
- package/mcp-memory-server/scripts/fixtures/compaction-unknown-version.json +17 -0
- package/opencode/capability-contract/plugins/capability-command.ts +319 -0
- package/opencode/command/graphify.md +25 -14
- package/opencode/plugins/memory-capture.ts +76 -10
- package/opencode/plugins/memory-wakeup.ts +58 -6
- package/package.json +8 -4
- package/pi/extensions/cairnkeep-trajectory.ts +55 -0
- package/schemas/artifact.schema.json +133 -0
- package/schemas/capability-callback.schema.json +68 -0
- package/schemas/capability-contract.schema.json +126 -0
- package/schemas/eval-adapter.schema.json +43 -0
- package/schemas/eval-protocol.schema.json +114 -0
- package/schemas/eval-report.schema.json +423 -0
- package/schemas/eval-task-set.schema.json +114 -0
- package/schemas/memory-node.schema.json +90 -0
- package/schemas/note.schema.json +112 -0
- package/schemas/trajectory-redaction.schema.json +25 -0
- package/schemas/trajectory.schema.json +82 -0
- package/scripts/bootstrap.sh +6 -0
- package/scripts/completion.sh +119 -5
- package/scripts/doctor.sh +284 -0
- package/scripts/fake-eval-adapter.mjs +120 -0
- package/scripts/fixtures/capability-harness-contracts.json +408 -0
- package/scripts/install-audit-timer.sh +3 -1
- package/scripts/lib/capability-opencode-plugin-harness.mjs +291 -0
- package/scripts/lib/trajectory-opencode-plugin-harness.mjs +25 -0
- package/scripts/lib/trajectory-pi-extension-harness.mjs +42 -0
- package/scripts/memory-wiki-audit.sh +49 -0
- package/scripts/smoke-bash32.sh +9 -0
- package/scripts/sync-claude-assets.sh +99 -6
- package/scripts/sync-opencode-graphify-assets.sh +24 -3
- package/scripts/sync-opencode-plugin-assets.sh +31 -5
- package/scripts/sync-opencode-security-assets.sh +24 -3
- package/scripts/sync-opencode-wiki-assets.sh +24 -3
- package/scripts/sync-pi-assets.sh +72 -0
- package/scripts/test-audit-timer.sh +98 -0
- package/scripts/test-bootstrap-untracked.sh +49 -0
- package/scripts/test-cli-dispatch.sh +41 -2
- package/scripts/test-compaction-hooks.sh +495 -0
- package/scripts/test-completion.sh +77 -0
- package/scripts/test-doctor.sh +348 -1
- package/scripts/test-eval-cli.sh +175 -0
- package/scripts/test-launcher-hooks.sh +630 -3
- package/scripts/test-learning-docs.sh +20 -4
- package/scripts/test-notes-cli.sh +114 -0
- package/scripts/test-package-install.sh +254 -0
- package/scripts/test-phase16-node-lifecycle.sh +50 -0
- package/scripts/test-phase17-artifact-lifecycle.sh +370 -0
- package/scripts/test-phase18-capability-lifecycle.sh +504 -0
- package/scripts/test-phase18-harness-boundary.sh +1060 -0
- package/scripts/test-phase19-eval-lifecycle.sh +1015 -0
- package/scripts/test-trajectory-cli.sh +87 -0
- package/scripts/test-trajectory-hooks.sh +142 -0
- package/scripts/test-uninstall.sh +231 -5
- package/scripts/uninstall.sh +38 -5
- package/scripts/verify-dependency-security.mjs +121 -0
- package/scripts/verify-docs-parity.sh +527 -1
- package/scripts/verify-phase18-runtime-evidence.mjs +895 -0
- package/scripts/verify-phase19-runtime-evidence.mjs +947 -0
- package/templates/capabilities.json.template +7 -0
- package/templates/env.example.template +51 -0
- package/templates/memory-wiki-audit.service.template +1 -1
- package/templates/start-claude.sh.template +36 -0
- package/templates/start-kimi.sh.template +39 -0
- package/templates/start-opencode.sh.template +47 -5
- package/templates/start-pi.sh.template +30 -0
- package/templates/trajectory-redaction.json.template +4 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"fixture_policy": "Strict target-version shapes with synthetic, value-free samples only.",
|
|
4
|
+
"claude": {
|
|
5
|
+
"version": "2.1.220",
|
|
6
|
+
"source": {
|
|
7
|
+
"kind": "official-current-documentation",
|
|
8
|
+
"url": "https://code.claude.com/docs/en/hooks",
|
|
9
|
+
"verified_on": "2026-07-27",
|
|
10
|
+
"notes": "The documentation identifies version-specific behavior through 2.1.220-era fields; this fixture pins the supported contract to Claude Code 2.1.220."
|
|
11
|
+
},
|
|
12
|
+
"common_input": {
|
|
13
|
+
"required_fields": [
|
|
14
|
+
"session_id",
|
|
15
|
+
"transcript_path",
|
|
16
|
+
"cwd",
|
|
17
|
+
"hook_event_name"
|
|
18
|
+
],
|
|
19
|
+
"optional_fields": [
|
|
20
|
+
"prompt_id",
|
|
21
|
+
"permission_mode",
|
|
22
|
+
"effort",
|
|
23
|
+
"agent_id",
|
|
24
|
+
"agent_type"
|
|
25
|
+
],
|
|
26
|
+
"additional_properties": false
|
|
27
|
+
},
|
|
28
|
+
"events": {
|
|
29
|
+
"UserPromptExpansion": {
|
|
30
|
+
"phase": "admission-before-expansion",
|
|
31
|
+
"matcher_field": "command_name",
|
|
32
|
+
"can_block": true,
|
|
33
|
+
"required_fields": [
|
|
34
|
+
"session_id",
|
|
35
|
+
"transcript_path",
|
|
36
|
+
"cwd",
|
|
37
|
+
"hook_event_name",
|
|
38
|
+
"expansion_type",
|
|
39
|
+
"command_name",
|
|
40
|
+
"command_args",
|
|
41
|
+
"command_source",
|
|
42
|
+
"prompt"
|
|
43
|
+
],
|
|
44
|
+
"optional_fields": [
|
|
45
|
+
"prompt_id",
|
|
46
|
+
"permission_mode",
|
|
47
|
+
"effort",
|
|
48
|
+
"agent_id",
|
|
49
|
+
"agent_type"
|
|
50
|
+
],
|
|
51
|
+
"enum_fields": {
|
|
52
|
+
"hook_event_name": ["UserPromptExpansion"],
|
|
53
|
+
"expansion_type": ["slash_command", "mcp_prompt"]
|
|
54
|
+
},
|
|
55
|
+
"sample": {
|
|
56
|
+
"session_id": "session-fixture",
|
|
57
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
58
|
+
"cwd": "/fixture/project",
|
|
59
|
+
"permission_mode": "default",
|
|
60
|
+
"hook_event_name": "UserPromptExpansion",
|
|
61
|
+
"expansion_type": "slash_command",
|
|
62
|
+
"command_name": "wiki-query",
|
|
63
|
+
"command_args": "",
|
|
64
|
+
"command_source": "project",
|
|
65
|
+
"prompt": "/wiki-query"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"UserPromptSubmit": {
|
|
69
|
+
"phase": "admission-before-processing",
|
|
70
|
+
"matcher_field": null,
|
|
71
|
+
"can_block": true,
|
|
72
|
+
"required_fields": [
|
|
73
|
+
"session_id",
|
|
74
|
+
"transcript_path",
|
|
75
|
+
"cwd",
|
|
76
|
+
"hook_event_name",
|
|
77
|
+
"prompt"
|
|
78
|
+
],
|
|
79
|
+
"optional_fields": [
|
|
80
|
+
"prompt_id",
|
|
81
|
+
"permission_mode",
|
|
82
|
+
"effort",
|
|
83
|
+
"agent_id",
|
|
84
|
+
"agent_type"
|
|
85
|
+
],
|
|
86
|
+
"enum_fields": {
|
|
87
|
+
"hook_event_name": ["UserPromptSubmit"]
|
|
88
|
+
},
|
|
89
|
+
"sample": {
|
|
90
|
+
"session_id": "session-fixture",
|
|
91
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
92
|
+
"cwd": "/fixture/project",
|
|
93
|
+
"permission_mode": "default",
|
|
94
|
+
"hook_event_name": "UserPromptSubmit",
|
|
95
|
+
"prompt": "/wiki-query"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"Stop": {
|
|
99
|
+
"phase": "success-terminal",
|
|
100
|
+
"can_block": true,
|
|
101
|
+
"required_fields": [
|
|
102
|
+
"session_id",
|
|
103
|
+
"transcript_path",
|
|
104
|
+
"cwd",
|
|
105
|
+
"hook_event_name",
|
|
106
|
+
"stop_hook_active",
|
|
107
|
+
"last_assistant_message",
|
|
108
|
+
"background_tasks",
|
|
109
|
+
"session_crons"
|
|
110
|
+
],
|
|
111
|
+
"optional_fields": [
|
|
112
|
+
"prompt_id",
|
|
113
|
+
"permission_mode",
|
|
114
|
+
"effort",
|
|
115
|
+
"agent_id",
|
|
116
|
+
"agent_type"
|
|
117
|
+
],
|
|
118
|
+
"enum_fields": {
|
|
119
|
+
"hook_event_name": ["Stop"]
|
|
120
|
+
},
|
|
121
|
+
"sample": {
|
|
122
|
+
"session_id": "session-fixture",
|
|
123
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
124
|
+
"cwd": "/fixture/project",
|
|
125
|
+
"hook_event_name": "Stop",
|
|
126
|
+
"stop_hook_active": false,
|
|
127
|
+
"last_assistant_message": "fixture-complete",
|
|
128
|
+
"background_tasks": [],
|
|
129
|
+
"session_crons": []
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"StopFailure": {
|
|
133
|
+
"phase": "error-terminal",
|
|
134
|
+
"can_block": false,
|
|
135
|
+
"output_and_exit_ignored": true,
|
|
136
|
+
"required_fields": [
|
|
137
|
+
"session_id",
|
|
138
|
+
"transcript_path",
|
|
139
|
+
"cwd",
|
|
140
|
+
"hook_event_name",
|
|
141
|
+
"error"
|
|
142
|
+
],
|
|
143
|
+
"optional_fields": [
|
|
144
|
+
"prompt_id",
|
|
145
|
+
"permission_mode",
|
|
146
|
+
"effort",
|
|
147
|
+
"agent_id",
|
|
148
|
+
"agent_type",
|
|
149
|
+
"error_details",
|
|
150
|
+
"last_assistant_message"
|
|
151
|
+
],
|
|
152
|
+
"enum_fields": {
|
|
153
|
+
"hook_event_name": ["StopFailure"],
|
|
154
|
+
"error": [
|
|
155
|
+
"rate_limit",
|
|
156
|
+
"overloaded",
|
|
157
|
+
"authentication_failed",
|
|
158
|
+
"oauth_org_not_allowed",
|
|
159
|
+
"billing_error",
|
|
160
|
+
"invalid_request",
|
|
161
|
+
"model_not_found",
|
|
162
|
+
"server_error",
|
|
163
|
+
"max_output_tokens",
|
|
164
|
+
"unknown"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"sample": {
|
|
168
|
+
"session_id": "session-fixture",
|
|
169
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
170
|
+
"cwd": "/fixture/project",
|
|
171
|
+
"hook_event_name": "StopFailure",
|
|
172
|
+
"error": "server_error"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"CwdChanged": {
|
|
176
|
+
"phase": "identity-observation",
|
|
177
|
+
"can_block": false,
|
|
178
|
+
"required_fields": [
|
|
179
|
+
"session_id",
|
|
180
|
+
"transcript_path",
|
|
181
|
+
"cwd",
|
|
182
|
+
"hook_event_name",
|
|
183
|
+
"old_cwd",
|
|
184
|
+
"new_cwd"
|
|
185
|
+
],
|
|
186
|
+
"optional_fields": [
|
|
187
|
+
"prompt_id",
|
|
188
|
+
"permission_mode",
|
|
189
|
+
"effort",
|
|
190
|
+
"agent_id",
|
|
191
|
+
"agent_type"
|
|
192
|
+
],
|
|
193
|
+
"enum_fields": {
|
|
194
|
+
"hook_event_name": ["CwdChanged"]
|
|
195
|
+
},
|
|
196
|
+
"sample": {
|
|
197
|
+
"session_id": "session-fixture",
|
|
198
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
199
|
+
"cwd": "/fixture/decoy",
|
|
200
|
+
"hook_event_name": "CwdChanged",
|
|
201
|
+
"old_cwd": "/fixture/project",
|
|
202
|
+
"new_cwd": "/fixture/decoy"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"SessionEnd": {
|
|
206
|
+
"phase": "abandonment-cleanup-only",
|
|
207
|
+
"can_block": false,
|
|
208
|
+
"required_fields": [
|
|
209
|
+
"session_id",
|
|
210
|
+
"transcript_path",
|
|
211
|
+
"cwd",
|
|
212
|
+
"hook_event_name",
|
|
213
|
+
"reason"
|
|
214
|
+
],
|
|
215
|
+
"optional_fields": [
|
|
216
|
+
"prompt_id",
|
|
217
|
+
"permission_mode",
|
|
218
|
+
"effort",
|
|
219
|
+
"agent_id",
|
|
220
|
+
"agent_type"
|
|
221
|
+
],
|
|
222
|
+
"enum_fields": {
|
|
223
|
+
"hook_event_name": ["SessionEnd"],
|
|
224
|
+
"reason": [
|
|
225
|
+
"clear",
|
|
226
|
+
"resume",
|
|
227
|
+
"logout",
|
|
228
|
+
"prompt_input_exit",
|
|
229
|
+
"bypass_permissions_disabled",
|
|
230
|
+
"other"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"sample": {
|
|
234
|
+
"session_id": "session-fixture",
|
|
235
|
+
"transcript_path": "/fixture/transcript.jsonl",
|
|
236
|
+
"cwd": "/fixture/project",
|
|
237
|
+
"hook_event_name": "SessionEnd",
|
|
238
|
+
"reason": "other"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"outputs": {
|
|
243
|
+
"allow": {},
|
|
244
|
+
"block": {
|
|
245
|
+
"decision": "block",
|
|
246
|
+
"reason": "capability disabled"
|
|
247
|
+
},
|
|
248
|
+
"exit_code_block": 2
|
|
249
|
+
},
|
|
250
|
+
"lifecycle": {
|
|
251
|
+
"success_terminal": "Stop",
|
|
252
|
+
"error_terminal": "StopFailure",
|
|
253
|
+
"abandonment_only": "SessionEnd",
|
|
254
|
+
"identity_drift_signal": "CwdChanged"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"opencode": {
|
|
258
|
+
"version": "1.17.20",
|
|
259
|
+
"source": {
|
|
260
|
+
"kind": "official-tagged-source",
|
|
261
|
+
"repository": "https://github.com/anomalyco/opencode",
|
|
262
|
+
"tag": "v1.17.20",
|
|
263
|
+
"commit": "4473fc3c9055046183990a965d68df3db7ea6f62",
|
|
264
|
+
"plugin_types": "packages/plugin/src/index.ts",
|
|
265
|
+
"event_types": "packages/sdk/js/src/gen/types.gen.ts",
|
|
266
|
+
"dispatch": "packages/opencode/src/session/prompt.ts",
|
|
267
|
+
"verified_on": "2026-07-27"
|
|
268
|
+
},
|
|
269
|
+
"installed_analog": {
|
|
270
|
+
"version": "1.17.15",
|
|
271
|
+
"path": "@opencode-ai/plugin/dist/index.d.ts",
|
|
272
|
+
"authority": false,
|
|
273
|
+
"target_delta": "No command.execute.before signature delta was found; 1.17.20 event and dispatch source remains authoritative."
|
|
274
|
+
},
|
|
275
|
+
"hook": {
|
|
276
|
+
"name": "command.execute.before",
|
|
277
|
+
"phase": "admission-before-prompt",
|
|
278
|
+
"input": {
|
|
279
|
+
"required_fields": ["command", "sessionID", "arguments"],
|
|
280
|
+
"optional_fields": [],
|
|
281
|
+
"additional_properties": false,
|
|
282
|
+
"sample": {
|
|
283
|
+
"command": "wiki-query",
|
|
284
|
+
"sessionID": "session-fixture",
|
|
285
|
+
"arguments": ""
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"output": {
|
|
289
|
+
"required_fields": ["parts"],
|
|
290
|
+
"optional_fields": [],
|
|
291
|
+
"additional_properties": false,
|
|
292
|
+
"sample": {
|
|
293
|
+
"parts": []
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"blocking": "A rejected hook promise propagates before prompt() is called."
|
|
297
|
+
},
|
|
298
|
+
"dispose": {
|
|
299
|
+
"name": "dispose",
|
|
300
|
+
"phase": "plugin-shutdown",
|
|
301
|
+
"input_fields": [],
|
|
302
|
+
"additional_properties": false,
|
|
303
|
+
"source_file": "packages/plugin/src/index.ts",
|
|
304
|
+
"source_commit": "4473fc3c9055046183990a965d68df3db7ea6f62",
|
|
305
|
+
"purpose": "Release plugin-owned resources after the host stops using the plugin instance."
|
|
306
|
+
},
|
|
307
|
+
"events": {
|
|
308
|
+
"session.idle": {
|
|
309
|
+
"phase": "success-terminal",
|
|
310
|
+
"required_fields": ["type", "properties"],
|
|
311
|
+
"optional_fields": ["id"],
|
|
312
|
+
"properties_required_fields": ["sessionID"],
|
|
313
|
+
"properties_optional_fields": [],
|
|
314
|
+
"sample": {
|
|
315
|
+
"id": "event-fixture-idle",
|
|
316
|
+
"type": "session.idle",
|
|
317
|
+
"properties": {
|
|
318
|
+
"sessionID": "session-fixture"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"session.error": {
|
|
323
|
+
"phase": "error-terminal",
|
|
324
|
+
"required_fields": ["type", "properties"],
|
|
325
|
+
"optional_fields": ["id"],
|
|
326
|
+
"properties_required_fields": [],
|
|
327
|
+
"properties_optional_fields": ["sessionID", "error"],
|
|
328
|
+
"error_variants": [
|
|
329
|
+
"ProviderAuthError",
|
|
330
|
+
"UnknownError",
|
|
331
|
+
"MessageOutputLengthError",
|
|
332
|
+
"MessageAbortedError",
|
|
333
|
+
"APIError"
|
|
334
|
+
],
|
|
335
|
+
"sample": {
|
|
336
|
+
"id": "event-fixture-error",
|
|
337
|
+
"type": "session.error",
|
|
338
|
+
"properties": {
|
|
339
|
+
"sessionID": "session-fixture"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"session.status": {
|
|
344
|
+
"phase": "status-terminal-when-idle",
|
|
345
|
+
"required_fields": ["type", "properties"],
|
|
346
|
+
"optional_fields": ["id"],
|
|
347
|
+
"properties_required_fields": ["sessionID", "status"],
|
|
348
|
+
"properties_optional_fields": [],
|
|
349
|
+
"status_variants": [
|
|
350
|
+
{ "type": "idle" },
|
|
351
|
+
{ "type": "retry", "attempt": 1, "message": "fixture-retry", "next": 2 },
|
|
352
|
+
{ "type": "busy" }
|
|
353
|
+
],
|
|
354
|
+
"sample": {
|
|
355
|
+
"id": "event-fixture-status",
|
|
356
|
+
"type": "session.status",
|
|
357
|
+
"properties": {
|
|
358
|
+
"sessionID": "session-fixture",
|
|
359
|
+
"status": {
|
|
360
|
+
"type": "idle"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"session.deleted": {
|
|
366
|
+
"phase": "abandonment-cleanup-only",
|
|
367
|
+
"required_fields": ["type", "properties"],
|
|
368
|
+
"optional_fields": ["id"],
|
|
369
|
+
"properties_required_fields": ["info"],
|
|
370
|
+
"properties_optional_fields": [],
|
|
371
|
+
"info_required_fields": [
|
|
372
|
+
"id",
|
|
373
|
+
"projectID",
|
|
374
|
+
"directory",
|
|
375
|
+
"title",
|
|
376
|
+
"version",
|
|
377
|
+
"time"
|
|
378
|
+
],
|
|
379
|
+
"info_optional_fields": ["parentID", "summary", "share", "revert"],
|
|
380
|
+
"time_required_fields": ["created", "updated"],
|
|
381
|
+
"time_optional_fields": ["compacting"],
|
|
382
|
+
"sample": {
|
|
383
|
+
"id": "event-fixture-deleted",
|
|
384
|
+
"type": "session.deleted",
|
|
385
|
+
"properties": {
|
|
386
|
+
"info": {
|
|
387
|
+
"id": "session-fixture",
|
|
388
|
+
"projectID": "project-fixture",
|
|
389
|
+
"directory": "/fixture/project",
|
|
390
|
+
"title": "fixture",
|
|
391
|
+
"version": "1.17.20",
|
|
392
|
+
"time": {
|
|
393
|
+
"created": 1,
|
|
394
|
+
"updated": 2
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"lifecycle": {
|
|
402
|
+
"success_terminals": ["session.idle", "session.status:idle"],
|
|
403
|
+
"error_terminal": "session.error",
|
|
404
|
+
"abandonment_only": "session.deleted",
|
|
405
|
+
"event_callback_is_awaited": false
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Renders a systemd user service + timer from templates/ and enables the timer,
|
|
5
5
|
# so the deterministic memory/wiki invalidation audit runs on a schedule. A cron
|
|
6
|
-
# alternative is printed for hosts without systemd.
|
|
6
|
+
# alternative is printed for hosts without systemd. When the inherited
|
|
7
|
+
# CAIRN_NOTE_DISTILLATION flag is enabled, the same job also launches the
|
|
8
|
+
# packaged one-shot notes command after the deterministic wiki scan.
|
|
7
9
|
#
|
|
8
10
|
# Usage: install-audit-timer.sh [--para-root PATH] [--on-calendar SPEC]
|
|
9
11
|
# [--report PATH] [--render-only DIR]
|