akm-opencode 0.9.21202610012143 → 0.9.21202610030351
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 +0 -1
- package/dist/index.js +4 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,7 +85,6 @@ Every kill switch below is opt-out and reads the same way: only the literal `0`
|
|
|
85
85
|
| `AKM_AUTO_CURATE` | `1` | Set to `0` to disable automatic prompt curation. |
|
|
86
86
|
| `AKM_AUTO_FEEDBACK` | `1` | Set to `0` to disable automatic feedback: the retrospective ("that worked") confirmation. |
|
|
87
87
|
| `AKM_AUTO_LEARNING` | `1` | Set to `0` to disable prompt-signal capture and automatic learning/skill proposal submission. Native session extraction is controlled separately by `AKM_AUTO_MEMORY`. |
|
|
88
|
-
| `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. |
|
|
89
88
|
| `AKM_AUTO_MEMORY` | `1` | Set to `0` to disable interval-gated native-session extraction through `akm proposal extract`. The Claude plugin honours the same variable for its `SessionEnd` extraction. |
|
|
90
89
|
| `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. |
|
|
91
90
|
| `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. |
|
package/dist/index.js
CHANGED
|
@@ -1217,7 +1217,6 @@ var AKM_AUTO_FEEDBACK = (process.env.AKM_AUTO_FEEDBACK ?? "1") !== "0";
|
|
|
1217
1217
|
var AKM_AUTO_LEARNING = (process.env.AKM_AUTO_LEARNING ?? "1") !== "0";
|
|
1218
1218
|
var AKM_AUTO_SKILL_PROPOSALS = (process.env.AKM_AUTO_SKILL_PROPOSALS ?? "1") !== "0";
|
|
1219
1219
|
var AKM_AUTO_CURATE = (process.env.AKM_AUTO_CURATE ?? "1") !== "0";
|
|
1220
|
-
var AKM_AUTO_HINTS = (process.env.AKM_AUTO_HINTS ?? "1") !== "0";
|
|
1221
1220
|
var AKM_PENDING_PROPOSAL_TIMEOUT_MS = Math.max(500, (Number(process.env.AKM_PENDING_PROPOSAL_TIMEOUT ?? "2") || 2) * 1000);
|
|
1222
1221
|
var AKM_CURATE_LIMIT = Math.max(1, Number(process.env.AKM_CURATE_LIMIT ?? "5") || 5);
|
|
1223
1222
|
var AKM_CURATE_MIN_CHARS = Math.max(1, Number(process.env.AKM_CURATE_MIN_CHARS ?? "16") || 16);
|
|
@@ -1275,19 +1274,6 @@ var pendingProposalSummaryCache = new Map;
|
|
|
1275
1274
|
var retrospectiveState = new Map;
|
|
1276
1275
|
var cachedAkmBundleDir;
|
|
1277
1276
|
var PROPOSED_QUALITY_WARNING = "Do not treat proposed assets as curated until accepted.";
|
|
1278
|
-
var AKM_WORKFLOW_INSTRUCTION = [
|
|
1279
|
-
"# AKM workflow (v0.9.21)",
|
|
1280
|
-
"",
|
|
1281
|
-
"Use AKM as a reusable knowledge and workflow bundle.",
|
|
1282
|
-
"",
|
|
1283
|
-
"Before writing or editing anything whose exact syntax or keys you are not certain of (a file already in the workspace included):",
|
|
1284
|
-
"1. Use `akm_curate` with a query that includes the current project name/domain (primary discovery). Fall back to `akm_search` only when you already know an asset exists and need its exact ref.",
|
|
1285
|
-
"2. Use `akm_show <ref>` before relying on an asset.",
|
|
1286
|
-
"3. Record `akm_feedback` after the result is known.",
|
|
1287
|
-
"4. Use `akm_remember` to preserve durable project knowledge.",
|
|
1288
|
-
`5. ${PROPOSED_QUALITY_WARNING}`
|
|
1289
|
-
].join(`
|
|
1290
|
-
`);
|
|
1291
1277
|
function readPackageVersion() {
|
|
1292
1278
|
try {
|
|
1293
1279
|
const raw = readFileSync3(path4.join(moduleDir, "package.json"), "utf8");
|
|
@@ -2420,19 +2406,9 @@ function warnIfWriteGateInert(client) {
|
|
|
2420
2406
|
var AKM_HINTS_PREFIX = [
|
|
2421
2407
|
"# AKM is available in this session",
|
|
2422
2408
|
"",
|
|
2423
|
-
"
|
|
2424
|
-
"",
|
|
2425
|
-
"
|
|
2426
|
-
"",
|
|
2427
|
-
"- **`akm_curate`** \u2014 use this when starting any new task, looking for patterns, docs, skills, or workflows. This is the PRIMARY lookup command. akm automatically boosts assets that match the current project (cwd-anchored project-context ranking), so an explicit project name in the query is not required for ranking \u2014 but it still helps the reranker frame intent.",
|
|
2428
|
-
' - Good: `akm_curate("akm CLI improve command performance analysis")` (explicit framing, still ideal)',
|
|
2429
|
-
' - Bad: `akm_curate("improve performance analysis")` (too generic \u2014 the reranker has less to work with even with auto-boost)',
|
|
2430
|
-
'- **`akm_search` (known name)** \u2014 use ONLY when you already know an asset exists (e.g. after `akm_show` returned "not found") and need to locate its exact ref. Do not use as a discovery tool.',
|
|
2431
|
-
"- **`akm_show <bundle>//meta`** \u2014 when working in or with an unfamiliar bundle, read its optional `.meta/` orientation (purpose, key assets, conventions, maintainer) before diving in. `akm_show meta` reads your working bundle's `.meta/index.md`; `akm_show meta:<name>` reads other `.meta/` docs (e.g. `meta:about`). These docs are direct-read and never appear in `akm_search`.",
|
|
2432
|
-
"",
|
|
2433
|
-
"When an asset's content is wrong, stale or incomplete, call `akm_feedback <ref> negative` with a note saying <what is wrong and what should change>: negative feedback is what triggers a review and fix of the asset, so make the note specific. Call it with `positive` when an asset materially helped (it only improves ranking). A failed akm call is not feedback on the asset. Use `akm_remember` to persist durable learnings so future sessions inherit them.",
|
|
2434
|
-
"",
|
|
2435
|
-
AKM_WORKFLOW_INSTRUCTION
|
|
2409
|
+
"- Assets for this project (skills, knowledge, memories, workflows) live in the AKM bundle. Before writing or editing a file whose format or keys you are not sure of, find them with `akm_curate` (by task) or `akm_search` (by name), and read one with `akm_show` before relying on it.",
|
|
2410
|
+
"- Record `akm_feedback` on an asset once you know whether it helped; keep durable project knowledge with `akm_remember`.",
|
|
2411
|
+
"- `akm hints` has this bundle's conventions; `akm help` has the CLI."
|
|
2436
2412
|
].join(`
|
|
2437
2413
|
`);
|
|
2438
2414
|
var AKM_CURATED_TAIL = "\n\nTip: call `akm_show <ref>` to fetch full content. If an asset is wrong, stale or incomplete, call `akm_feedback <ref> negative` with a note saying <what is wrong and what should change>: that queues it for review and a fix. Use `positive` when it helped.";
|
|
@@ -3110,7 +3086,7 @@ var akmPlugin = async ({ client, worktree, directory }) => {
|
|
|
3110
3086
|
}
|
|
3111
3087
|
if (!sessionHints.has(sid)) {
|
|
3112
3088
|
const bundleWarning = await getAkmBundleWarning(logClient);
|
|
3113
|
-
const hints =
|
|
3089
|
+
const hints = await runHintsForSession(logClient, sid);
|
|
3114
3090
|
const body = [bundleWarning, hints].filter(Boolean).join(`
|
|
3115
3091
|
|
|
3116
3092
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-opencode",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.21202610030351",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for AKM with discovery tools, feedback, memory, and automatic learning proposals from corrections and recurring workflows.",
|
|
6
6
|
"keywords": [
|