@remembrance-ai/opencode-plugin 0.1.55 → 0.1.62
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 +37 -2
- package/opencode.json +4 -3
- package/package.json +1 -1
- package/scripts/hook-core.mjs +1477 -175
- package/servers/remembrance-mcp.mjs +984 -231
- package/skills/remembrancer/SKILL.md +64 -39
- package/skills/remembrancer/references/attestation-rest.md +43 -5
- package/skills/remembrancer/references/identity-preferences-topology.md +233 -0
- package/skills/remembrancer/references/remembrance-payloads.md +13 -8
- package/skills/remembrancer/references/remembrance-setup.md +20 -0
- package/src/index.mjs +29 -9
package/src/index.mjs
CHANGED
|
@@ -65,6 +65,7 @@ import {
|
|
|
65
65
|
toolResponseIndicatesFailure,
|
|
66
66
|
valueEpisodeFromResponse,
|
|
67
67
|
writePromptedCount,
|
|
68
|
+
warmPrincipalSession,
|
|
68
69
|
} from "../scripts/hook-core.mjs";
|
|
69
70
|
|
|
70
71
|
const SURFACE = "opencode";
|
|
@@ -79,6 +80,9 @@ const CONTRIBUTION_TOOLS = [
|
|
|
79
80
|
"submit_resource",
|
|
80
81
|
"submit_resource_review",
|
|
81
82
|
];
|
|
83
|
+
const PREFERENCE_EVIDENCE_TOOLS = [
|
|
84
|
+
"submit_preference_compatibility_feedback",
|
|
85
|
+
];
|
|
82
86
|
|
|
83
87
|
export function pluginVersion(readFile = readFileSync) {
|
|
84
88
|
try {
|
|
@@ -300,15 +304,24 @@ export const Remembrance = async (context = {}) => {
|
|
|
300
304
|
try {
|
|
301
305
|
const sessionId = sessionIdFromEvent(event, event);
|
|
302
306
|
recordLifecycle("session_start", sessionId);
|
|
303
|
-
const clientUpdate = await (
|
|
304
|
-
context.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
307
|
+
const [, clientUpdate] = await Promise.all([
|
|
308
|
+
(context.warmSession ?? warmPrincipalSession)(
|
|
309
|
+
{
|
|
310
|
+
runtime: SURFACE,
|
|
311
|
+
hostSurface: "cli",
|
|
312
|
+
clientVersion: version,
|
|
313
|
+
hostVersion: "",
|
|
314
|
+
},
|
|
315
|
+
env,
|
|
316
|
+
).catch(() => null),
|
|
317
|
+
(context.clientUpdateCheck ?? checkForClientUpdate)(
|
|
318
|
+
{
|
|
319
|
+
surface: SURFACE,
|
|
320
|
+
currentVersion: version,
|
|
321
|
+
},
|
|
322
|
+
env,
|
|
323
|
+
).catch(() => null),
|
|
324
|
+
]);
|
|
312
325
|
if (clientUpdate?.notice) {
|
|
313
326
|
pendingClientUpdates.set(sessionId, clientUpdate.notice);
|
|
314
327
|
}
|
|
@@ -588,6 +601,13 @@ export const Remembrance = async (context = {}) => {
|
|
|
588
601
|
);
|
|
589
602
|
return;
|
|
590
603
|
}
|
|
604
|
+
if (
|
|
605
|
+
PREFERENCE_EVIDENCE_TOOLS.some((candidate) =>
|
|
606
|
+
normalizedTool.endsWith(candidate),
|
|
607
|
+
)
|
|
608
|
+
) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
591
611
|
if (
|
|
592
612
|
CONTRIBUTION_TOOLS.some((candidate) =>
|
|
593
613
|
normalizedTool.endsWith(candidate),
|