akm-opencode 0.9.11202609031957 → 0.9.11202609032044
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/README.md +3 -4
- package/dist/index.js +2669 -0
- package/package.json +5 -6
- package/index.ts +0 -3713
- package/shared/akm-version.ts +0 -73
- package/shared/curate-render.ts +0 -108
- package/shared/feedback-signals.ts +0 -113
- package/shared/memory-events.ts +0 -95
- package/shared/recall-policy.ts +0 -74
- package/shared/redaction.ts +0 -292
- package/shared/ref-extraction.ts +0 -120
- package/shared/state-files.ts +0 -98
- package/shared/vendor-semver.ts +0 -130
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ The plugin subscribes to OpenCode lifecycle events. Hook failures are logged thr
|
|
|
32
32
|
|
|
33
33
|
| Event | Behavior |
|
|
34
34
|
| --- | --- |
|
|
35
|
-
| `session.created` |
|
|
35
|
+
| `session.created` | Warms local data in the background, and prepares hints, an active-workflow summary, and curated context for the session. |
|
|
36
36
|
| `session.updated` | Backfills hints and the workflow summary for a session the plugin has not prepared yet. It does not re-run session-created work. |
|
|
37
37
|
| `chat.message` | Records feedback or memory intent and can schedule non-blocking curation for a substantive prompt. The curate is fire-and-forget: its result is injected on a later turn rather than delaying this one. |
|
|
38
38
|
| `experimental.chat.system.transform` | Injects the AKM guidance and cached curated context into the system prompt. The host rebuilds the system prompt on every request, so these blocks are re-injected each turn — including after a compaction — rather than once per session. |
|
|
@@ -64,14 +64,13 @@ Every kill switch below is opt-out and reads the same way: only the literal `0`
|
|
|
64
64
|
| Variable | Default | Purpose |
|
|
65
65
|
| --- | --- | --- |
|
|
66
66
|
| `AKM_BUNDLE_DIR` | unset | Absolute path to the AKM bundle root. When unset the plugin discovers it once per process by running `akm info`. The resolved value is re-exported to shell tools through the `shell.env` hook. |
|
|
67
|
-
| `
|
|
68
|
-
| `AKM_OPENCODE_IGNORE_BUNDLED_CLI` | unset (off) | Set to `1` to drop the bundled AKM CLI from resolution so only an `akm` on `PATH` is considered. Used by the eval harness; also an escape hatch when the bundled dependency is broken. |
|
|
67
|
+
| `AKM_OPENCODE_CLI` | unset | Absolute path to an `akm` executable to run instead of the `akm-cli` dependency, exec'd as-is. Used by the eval harness to substitute a deterministic shim. |
|
|
69
68
|
| `AKM_AUTO_CURATE` | `1` | Set to `0` to disable automatic prompt curation. |
|
|
70
69
|
| `AKM_AUTO_FEEDBACK` | `1` | Set to `0` to disable automatic outcome feedback. |
|
|
71
70
|
| `AKM_AUTO_HINTS` | `1` | Set to `0` to skip the per-session `akm hints` call. The missing-bundle warning is deliberately not gated on this: it explains why the bundle is empty in the first place. |
|
|
72
71
|
| `AKM_AUTO_MEMORY` | `1` | Set to `0` to disable automatic memory harvesting — the interval-gated `akm proposal extract` on `session.idle`, which is the whole of that harvest here. The Claude plugin honours the same variable for its `SessionEnd` extract, so one setting covers both harnesses. |
|
|
73
72
|
| `AKM_INDEX_ON_SESSION_END` | `1` | Set to `0` to skip the `akm index` refresh. It runs only on `session.deleted` — never on `session.idle`, which fires after every turn. |
|
|
74
|
-
| `AKM_WRITE_GATE` | `observe` | The format-declaration write gate (#99). When a file the session **read** declares a format your bundle documents — an `apiVersion:` namespace, a `yaml-language-server` pragma, a `$schema` key, an XML root namespace — and that asset has not been opened this session, the FIRST `edit`/`write` to that file is blocked once and the model is told which ref to read. It ships in `observe`: everything runs and the would-fire count lands in the ledger, but nothing is blocked. Set `enforce` to block, or `off`/`0` to disable it entirely. An unrecognized value is a configuration error — it logs one error per process and the gate refuses to run rather than guessing a default. It never fires on a file this session created: the create is recorded when it happens — a `write` to a path this session has not read, or an `edit` with an empty `oldString` — and that path stays insulated for the rest of the session, so reading back the model's own output does not re-arm it (ledger reason `session-created`). It
|
|
73
|
+
| `AKM_WRITE_GATE` | `observe` | The format-declaration write gate (#99). When a file the session **read** declares a format your bundle documents — an `apiVersion:` namespace, a `yaml-language-server` pragma, a `$schema` key, an XML root namespace — and that asset has not been opened this session, the FIRST `edit`/`write` to that file is blocked once and the model is told which ref to read. It ships in `observe`: everything runs and the would-fire count lands in the ledger, but nothing is blocked. Set `enforce` to block, or `off`/`0` to disable it entirely. An unrecognized value is a configuration error — it logs one error per process and the gate refuses to run rather than guessing a default. It never fires on a file this session created: the create is recorded when it happens — a `write` to a path this session has not read, or an `edit` with an empty `oldString` — and that path stays insulated for the rest of the session, so reading back the model's own output does not re-arm it (ledger reason `session-created`). It is inert on `apply_patch` (which carries no file path) — that case logs one warning per process rather than failing quietly. |
|
|
75
74
|
|
|
76
75
|
### Scope
|
|
77
76
|
|