akm-opencode 0.9.21202610040152 → 0.9.21202610040720
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 +1 -1
- package/dist/index.js +6 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ The plugin subscribes to OpenCode lifecycle events. Hook failures are logged thr
|
|
|
50
50
|
|
|
51
51
|
The session observation buffer that retrospective feedback reads from survives every non-terminal event: it is bounded by `AKM_SESSION_BUFFER_MAX_ENTRIES` and dropped only on `session.deleted`. Discarding it at `session.idle` would empty it between turns, so "thanks, that worked" would credit nothing in exactly the sessions that used the most assets.
|
|
52
52
|
|
|
53
|
-
Automatic feedback skips references that AKM reports as ineligible, and no `akm_*` tool call submits feedback on its own. A *successful* `akm_show` / `akm_search` / `akm_curate` only inspected a concept, which is not evidence that it helped, so on OpenCode the positive signal comes from a retrospective confirmation instead. A *failed* call (an error result, a timeout, an ambiguous ref) is not feedback on the asset either, and is only logged: its ref is not remembered as used, so a later "thanks, that worked" does not credit it and a later correction does not blame it. Same rules as the Claude plugin, which applies them to the `akm` subcommand of a Bash invocation.
|
|
53
|
+
Automatic feedback skips references that AKM reports as ineligible, and no `akm_*` tool call submits feedback on its own. A *successful* `akm_show` / `akm_search` / `akm_curate` only inspected a concept, which is not evidence that it helped, so on OpenCode the positive signal comes from a retrospective confirmation instead. A *failed* call (an error result, a timeout, an ambiguous ref) is not feedback on the asset either, and is only logged, as a warning that names its ref and the error: its ref is not remembered as used, so a later "thanks, that worked" does not credit it and a later correction does not blame it. Same rules as the Claude plugin, which applies them to the `akm` subcommand of a Bash invocation.
|
|
54
54
|
|
|
55
55
|
### Automatic learning proposals
|
|
56
56
|
|
package/dist/index.js
CHANGED
|
@@ -1742,11 +1742,10 @@ async function recordRetrospectiveFeedback(client, sessionID, text) {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
retrospectiveState.set(sessionID, { recentRefs });
|
|
1744
1744
|
}
|
|
1745
|
-
function queueFeedback(client, ref,
|
|
1746
|
-
|
|
1747
|
-
if (dedupe?.has(dedupeKey))
|
|
1745
|
+
function queueFeedback(client, ref, note, meta, dedupe) {
|
|
1746
|
+
if (dedupe?.has(ref))
|
|
1748
1747
|
return true;
|
|
1749
|
-
dedupe?.add(
|
|
1748
|
+
dedupe?.add(ref);
|
|
1750
1749
|
const command = resolveAkmCommand();
|
|
1751
1750
|
if (typeof command === "object" && "ok" in command) {
|
|
1752
1751
|
writePluginLog(client, "warn", "AKM auto-feedback skipped", {
|
|
@@ -1755,7 +1754,6 @@ function queueFeedback(client, ref, sentiment, note, meta, dedupe) {
|
|
|
1755
1754
|
sessionID: meta.sessionID,
|
|
1756
1755
|
directory: meta.directory,
|
|
1757
1756
|
ref,
|
|
1758
|
-
sentiment,
|
|
1759
1757
|
error: command.error
|
|
1760
1758
|
});
|
|
1761
1759
|
return false;
|
|
@@ -1765,7 +1763,7 @@ function queueFeedback(client, ref, sentiment, note, meta, dedupe) {
|
|
|
1765
1763
|
...command.argsPrefix,
|
|
1766
1764
|
"feedback",
|
|
1767
1765
|
ref,
|
|
1768
|
-
|
|
1766
|
+
"--positive",
|
|
1769
1767
|
"--reason",
|
|
1770
1768
|
note,
|
|
1771
1769
|
"--format",
|
|
@@ -1783,7 +1781,6 @@ function queueFeedback(client, ref, sentiment, note, meta, dedupe) {
|
|
|
1783
1781
|
sessionID: meta.sessionID,
|
|
1784
1782
|
directory: meta.directory,
|
|
1785
1783
|
ref,
|
|
1786
|
-
sentiment,
|
|
1787
1784
|
error: signal ? `akm feedback exited via signal ${signal}` : `akm feedback exited with code ${code}`
|
|
1788
1785
|
});
|
|
1789
1786
|
}
|
|
@@ -1795,7 +1792,6 @@ function queueFeedback(client, ref, sentiment, note, meta, dedupe) {
|
|
|
1795
1792
|
sessionID: meta.sessionID,
|
|
1796
1793
|
directory: meta.directory,
|
|
1797
1794
|
ref,
|
|
1798
|
-
sentiment,
|
|
1799
1795
|
error: formatCliError(error)
|
|
1800
1796
|
});
|
|
1801
1797
|
});
|
|
@@ -1808,7 +1804,6 @@ function queueFeedback(client, ref, sentiment, note, meta, dedupe) {
|
|
|
1808
1804
|
sessionID: meta.sessionID,
|
|
1809
1805
|
directory: meta.directory,
|
|
1810
1806
|
ref,
|
|
1811
|
-
sentiment,
|
|
1812
1807
|
error: formatCliError(error)
|
|
1813
1808
|
});
|
|
1814
1809
|
return false;
|
|
@@ -3213,7 +3208,7 @@ ${hint}` : hint;
|
|
|
3213
3208
|
});
|
|
3214
3209
|
if (!shouldSubmitAutomaticFeedback(signal))
|
|
3215
3210
|
continue;
|
|
3216
|
-
queueFeedback(logClient, ref,
|
|
3211
|
+
queueFeedback(logClient, ref, signal.note, {
|
|
3217
3212
|
toolName: "chat.message",
|
|
3218
3213
|
sessionID: input.sessionID,
|
|
3219
3214
|
agent: input.agent
|
|
@@ -3298,6 +3293,7 @@ ${hint}` : hint;
|
|
|
3298
3293
|
sessionID: input.sessionID,
|
|
3299
3294
|
callID: input.callID,
|
|
3300
3295
|
title: output.title,
|
|
3296
|
+
refs: allRefs,
|
|
3301
3297
|
error: typeof parsed.error === "string" ? parsed.error : undefined
|
|
3302
3298
|
});
|
|
3303
3299
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-opencode",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.21202610040720",
|
|
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": [
|