akm-opencode 0.9.16202609261629 → 0.9.16202609272058

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 (2) hide show
  1. package/dist/index.js +27 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1041,6 +1041,31 @@ function validateRefCandidates(candidates, bundleRoots) {
1041
1041
  }
1042
1042
 
1043
1043
  // ../claude/shared/recall-policy.ts
1044
+ var NONTASK_ENVELOPE_TAGS = [
1045
+ "<task-notification>",
1046
+ "<agent-message",
1047
+ "<bash-input>",
1048
+ "<bash-stdout>",
1049
+ "<bash-stderr>",
1050
+ "<system-reminder>",
1051
+ "<local-command",
1052
+ "<command-name>",
1053
+ "<command-message>"
1054
+ ];
1055
+ var STASH_BOILERPLATE = "This is an **AKM stash** \u2014 a structured knowledge repository that stores reusable";
1056
+ var NONTASK_PASTE_CHAR_LIMIT = 2000;
1057
+ function isNonTaskPrompt(text) {
1058
+ if (text.length > NONTASK_PASTE_CHAR_LIMIT)
1059
+ return true;
1060
+ if (text === STASH_BOILERPLATE)
1061
+ return true;
1062
+ if (NONTASK_ENVELOPE_TAGS.some((tag) => text.includes(tag)))
1063
+ return true;
1064
+ const stripped = text.replace(/^\s+/, "");
1065
+ if (stripped.startsWith("<") && text.includes("</"))
1066
+ return true;
1067
+ return false;
1068
+ }
1044
1069
  function shouldRecall(prompt, options) {
1045
1070
  const text = prompt.trim();
1046
1071
  const lower = text.toLowerCase();
@@ -1051,6 +1076,8 @@ function shouldRecall(prompt, options) {
1051
1076
  return { shouldRecall: true, reason: "active-workflow", query: text, scopeHints: ["workflow"] };
1052
1077
  if (options?.recentAssetFailure)
1053
1078
  return { shouldRecall: true, reason: "recent-asset-failure", query: text, scopeHints };
1079
+ if (isNonTaskPrompt(text))
1080
+ return { shouldRecall: false, reason: "skip-nontask", query: text, scopeHints };
1054
1081
  if (text.length < 4 || /^(ok|thanks|thank you|yes|no|continue|go ahead|sure|cool)$/i.test(lower)) {
1055
1082
  return { shouldRecall: false, reason: "skip-short", query: text, scopeHints };
1056
1083
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-opencode",
3
- "version": "0.9.16202609261629",
3
+ "version": "0.9.16202609272058",
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": [