@remembrance-ai/opencode-plugin 0.1.50 → 0.1.52

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/opencode.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "command": [
7
7
  "npx",
8
8
  "-y",
9
- "@remembrance-ai/mcp-server@0.1.50"
9
+ "@remembrance-ai/mcp-server@0.1.52"
10
10
  ],
11
11
  "enabled": true,
12
12
  "environment": {
@@ -15,6 +15,6 @@
15
15
  }
16
16
  },
17
17
  "plugin": [
18
- "@remembrance-ai/opencode-plugin@0.1.50"
18
+ "@remembrance-ai/opencode-plugin@0.1.52"
19
19
  ]
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remembrance-ai/opencode-plugin",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "license": "Apache-2.0",
5
5
  "description": "opencode plugin for Remembrance session hooks, tool observation, and contribution nudges.",
6
6
  "type": "module",
@@ -4486,6 +4486,10 @@ function isUnsafeDestinationHostname(hostname) {
4486
4486
  }
4487
4487
 
4488
4488
  // ../core/src/connection-doctor.ts
4489
+ var CODEX_HOOK_REVIEW_COMMAND = `CODEX_CLI="\${CODEX_CLI:-$(command -v codex || true)}"; [ -x "$CODEX_CLI" ] || CODEX_CLI="/Applications/ChatGPT.app/Contents/Resources/codex"; [ -x "$CODEX_CLI" ] || CODEX_CLI="/Applications/Codex.app/Contents/Resources/codex"; [ -x "$CODEX_CLI" ] || { printf '%s\\n' "Codex CLI not found. Install the Codex CLI, or install or update the ChatGPT desktop app on macOS, then try again." >&2; exit 1; }; "$CODEX_CLI"`;
4490
+ function codexHookReviewAction(followupTool) {
4491
+ return `Open Terminal and launch Codex with the command below. On the automatic Hooks need review screen, choose Review hooks and trust only the Remembrance SessionStart, UserPromptSubmit, PostToolUse, and Stop hooks. If the review screen does not appear, exit Codex, update or reinstall Remembrance, and launch the command again. Then fully restart Codex, submit one prompt, and call ${followupTool} again.`;
4492
+ }
4489
4493
  function buildConnectionDoctorReport(input) {
4490
4494
  const status = record(input.connection_status);
4491
4495
  const transport = record(status.transport);
@@ -4501,9 +4505,7 @@ function buildConnectionDoctorReport(input) {
4501
4505
  const registryReady = status.status !== "error" && registry.status === "ready";
4502
4506
  const queryAuthorized = capabilities.query === true;
4503
4507
  const submitAuthorized = capabilities.submit === true;
4504
- const configuredCredential = ["environment", "shared_config"].includes(
4505
- credentialSource
4506
- ) || [
4508
+ const configuredCredential = ["environment", "shared_config"].includes(credentialSource) || [
4507
4509
  "authorization_bearer",
4508
4510
  "x_remembrance_api_key",
4509
4511
  "request_header"
@@ -4603,9 +4605,7 @@ function buildConnectionDoctorReport(input) {
4603
4605
  )
4604
4606
  );
4605
4607
  const pluginIssues = issueCodes(pluginHealth.issues);
4606
- const destinationMismatch = pluginIssues.includes(
4607
- "api_destination_mismatch"
4608
- );
4608
+ const destinationMismatch = pluginIssues.includes("api_destination_mismatch");
4609
4609
  checks.push(pluginLifecycleCheck(pluginHealth, pluginIssues));
4610
4610
  checks.push(
4611
4611
  pluginHealth.expected !== true ? notApplicable(
@@ -4688,12 +4688,26 @@ function pluginLifecycleCheck(pluginHealth, issues) {
4688
4688
  );
4689
4689
  }
4690
4690
  if (pluginHealth.status === "partial") {
4691
+ const codex = stringValue(pluginHealth.surface) === "codex";
4691
4692
  return warning(
4692
4693
  "plugin_lifecycle",
4693
4694
  "The core native lifecycle is active; tool or completion events have not occurred yet.",
4694
4695
  "exercise_plugin_lifecycle",
4695
- "Use one Remembrance tool, complete one turn, and rerun the doctor.",
4696
- issues
4696
+ codex ? `Use one Remembrance tool, complete one turn, and rerun the doctor. If this warning remains, ${codexHookReviewAction("run_connection_doctor")}` : "Use one Remembrance tool, complete one turn, and rerun the doctor.",
4697
+ issues,
4698
+ false,
4699
+ codex ? CODEX_HOOK_REVIEW_COMMAND : void 0
4700
+ );
4701
+ }
4702
+ if (stringValue(pluginHealth.surface) === "codex") {
4703
+ return warning(
4704
+ "plugin_lifecycle",
4705
+ "The Codex plugin lifecycle is not active.",
4706
+ "review_codex_hook_trust",
4707
+ codexHookReviewAction("run_connection_doctor"),
4708
+ issues,
4709
+ false,
4710
+ CODEX_HOOK_REVIEW_COMMAND
4697
4711
  );
4698
4712
  }
4699
4713
  return warning(
@@ -4749,9 +4763,11 @@ function scopeValue(value) {
4749
4763
  }
4750
4764
  function issueCodes(value) {
4751
4765
  if (!Array.isArray(value)) return [];
4752
- return [...new Set(
4753
- value.map((issue) => stringValue(record(issue).code)).filter((code) => Boolean(code))
4754
- )].sort();
4766
+ return [
4767
+ ...new Set(
4768
+ value.map((issue) => stringValue(record(issue).code)).filter((code) => Boolean(code))
4769
+ )
4770
+ ].sort();
4755
4771
  }
4756
4772
  function pass(id, summary) {
4757
4773
  return { id, status: "pass", summary, remediation: null };
@@ -5930,7 +5946,7 @@ var seedSkills = [
5930
5946
  summary: "Operational setup and troubleshooting workflow for Remembrance across Claude Code, Codex, OpenClaw, Cursor, Gemini, MCP, REST, skill-only installs, enterprise keys, and local agent identity.",
5931
5947
  status: "active",
5932
5948
  visibility: "public",
5933
- version: "0.1.10",
5949
+ version: "0.1.13",
5934
5950
  domains: ["agent-skills", "mcp", "resource-discovery"],
5935
5951
  tags: [
5936
5952
  "remembrance",
@@ -5981,7 +5997,7 @@ var seedSkills = [
5981
5997
  "gemini",
5982
5998
  "rest"
5983
5999
  ],
5984
- version: "0.1.10",
6000
+ version: "0.1.13",
5985
6001
  status: "active",
5986
6002
  visibility: "public",
5987
6003
  providers: ["codex", "claude", "cursor", "openclaw", "generic"],
@@ -6166,12 +6182,22 @@ CODEX_CLI="\${CODEX_CLI:-$(command -v codex || true)}"
6166
6182
  [ -x "$CODEX_CLI" ] || { printf '%s\\n' "Codex CLI not found. Install the Codex CLI, or install or update the ChatGPT desktop app on macOS, then try again." >&2; exit 1; }
6167
6183
  "$CODEX_CLI" plugin marketplace add dreamarkinc/remembrance-skills &&
6168
6184
  "$CODEX_CLI" plugin marketplace upgrade remembrance &&
6169
- "$CODEX_CLI" plugin add remembrance@remembrance
6185
+ "$CODEX_CLI" plugin add remembrance@remembrance &&
6186
+ "$CODEX_CLI"
6170
6187
  ~~~
6171
6188
 
6172
6189
  This command handles both first install and update. If zsh says
6173
6190
  "codex: command not found", it discovers the current ChatGPT desktop bundle or
6174
- the legacy Codex app bundle without requiring a shell alias.
6191
+ the legacy Codex app bundle without requiring a shell alias. The final command
6192
+ opens Codex CLI so its secure hook review can be completed immediately.
6193
+
6194
+ Codex will not execute plugin hooks until their exact definitions are trusted.
6195
+ In the Codex window opened by the installer, choose **Review hooks** on the
6196
+ automatic **Hooks need review** screen and trust only the Remembrance
6197
+ \`SessionStart\`, \`UserPromptSubmit\`, \`PostToolUse\`, and \`Stop\` hooks.
6198
+ Changed hook definitions show the same review screen again; never use the
6199
+ automation-only trust bypass for normal installation. Exit that window, then
6200
+ fully restart Codex.
6175
6201
 
6176
6202
  OpenClaw:
6177
6203
 
@@ -6229,8 +6255,10 @@ Integrations & MCP**, and verify query, invocation, feedback, and contribution
6229
6255
  receipts in both local and cloud runs.
6230
6256
 
6231
6257
  After installing any native plugin, restart the agent app/session and approve
6232
- the one-time trust prompt if the runtime asks for it. A currently running Codex
6233
- or Claude thread usually cannot hot-load newly installed plugin tools.
6258
+ the runtime's trust request. For Codex, complete the automatic hook review
6259
+ above; changed hook definitions show the same review screen again. A currently
6260
+ running Codex or Claude thread usually cannot hot-load newly installed plugin
6261
+ tools.
6234
6262
 
6235
6263
  ## Enterprise/org key setup
6236
6264
 
@@ -6817,8 +6845,11 @@ be copied to ".agents/skills/remembrancer/SKILL.md" for compatible providers.
6817
6845
  ## Troubleshooting matrix
6818
6846
 
6819
6847
  - "Plugin installed, but no tools": restart the agent app/session; confirm the
6820
- plugin is enabled; confirm the runtime accepted the trust prompt; confirm the
6821
- installed package contains the runtime-specific manifest.
6848
+ plugin is enabled and contains the runtime-specific manifest. For Codex,
6849
+ launch the installer-provided command, choose **Review hooks** on the
6850
+ automatic review screen, and trust only the listed Remembrance hooks. Exit
6851
+ that window and fully restart Codex; updates that change hooks show the same
6852
+ review screen again.
6822
6853
  - "Agent has tools but does not use them": first verify a concrete query receipt,
6823
6854
  then test a short contextual follow-up such as "fix these issues". Native
6824
6855
  prompt hooks should inject a full-conversation query reminder, and completion
@@ -9731,7 +9762,7 @@ function localPluginLifecycleHealth(options) {
9731
9762
  issues: [
9732
9763
  {
9733
9764
  code: "invalid_lifecycle_marker",
9734
- action: "Update or reinstall the Remembrance plugin, fully restart the host, and call get_connection_status again."
9765
+ action: nativeLifecycleRepairAction(surface, "get_connection_status")
9735
9766
  }
9736
9767
  ]
9737
9768
  };
@@ -9757,26 +9788,26 @@ function localPluginLifecycleHealth(options) {
9757
9788
  if (!components.session_start.observed) {
9758
9789
  issues.push({
9759
9790
  code: "session_start_not_observed",
9760
- action: "Update or reinstall the Remembrance plugin, fully restart the host, and verify its native hooks are enabled."
9791
+ action: nativeLifecycleRepairAction(surface, "get_connection_status")
9761
9792
  });
9762
9793
  }
9763
9794
  if (!components.prompt_hook.observed) {
9764
9795
  issues.push({
9765
9796
  code: "prompt_hook_not_observed",
9766
- action: "The native prompt hook did not run before this health check. Update or reinstall the plugin, fully restart the host, and verify prompt hooks are enabled."
9797
+ action: surface === "codex" ? nativeLifecycleRepairAction(surface, "get_connection_status") : "The native prompt hook did not run before this health check. Update or reinstall the plugin, fully restart the host, and verify prompt hooks are enabled."
9767
9798
  });
9768
9799
  }
9769
9800
  const coreLifecycleObserved = components.session_start.observed && components.prompt_hook.observed;
9770
9801
  if (coreLifecycleObserved && !components.tool_observer.observed) {
9771
9802
  issues.push({
9772
9803
  code: "tool_observer_not_observed",
9773
- action: "No native tool observer has run in this session yet. Use a Remembrance MCP tool, then call get_connection_status again."
9804
+ action: surface === "codex" ? `Use a Remembrance MCP tool, then call get_connection_status again. If this remains missing, ${codexHookReviewAction("get_connection_status")}` : "No native tool observer has run in this session yet. Use a Remembrance MCP tool, then call get_connection_status again."
9774
9805
  });
9775
9806
  }
9776
9807
  if (coreLifecycleObserved && !components.completion_hook.observed) {
9777
9808
  issues.push({
9778
9809
  code: "completion_hook_not_observed",
9779
- action: "No native completion hook has run in this session yet. Complete one turn, then call get_connection_status again."
9810
+ action: surface === "codex" ? `Complete one turn, then call get_connection_status again. If this remains missing, ${codexHookReviewAction("get_connection_status")}` : "No native completion hook has run in this session yet. Complete one turn, then call get_connection_status again."
9780
9811
  });
9781
9812
  }
9782
9813
  const lastSeenMs = validLifecycleTimestamp(marker.last_seen_at, nowMs);
@@ -9854,11 +9885,17 @@ function missingPluginLifecycleHealth(surface) {
9854
9885
  issues: [
9855
9886
  {
9856
9887
  code: "native_hooks_not_observed",
9857
- action: "Update or reinstall the Remembrance plugin, fully restart the host, and confirm native hooks are enabled. MCP-only access remains available."
9888
+ action: nativeLifecycleRepairAction(surface, "get_connection_status")
9858
9889
  }
9859
9890
  ]
9860
9891
  };
9861
9892
  }
9893
+ function nativeLifecycleRepairAction(surface, followupTool) {
9894
+ if (surface === "codex") {
9895
+ return codexHookReviewAction(followupTool);
9896
+ }
9897
+ return `Update or reinstall the Remembrance plugin, fully restart the host, and confirm native hooks are enabled. Then call ${followupTool} again. MCP-only access remains available.`;
9898
+ }
9862
9899
  function emptyPluginComponents() {
9863
9900
  return Object.fromEntries(
9864
9901
  PLUGIN_HEALTH_COMPONENTS.map((component) => [
@@ -9983,7 +10020,7 @@ var apiConfiguration = resolveApiConfiguration();
9983
10020
  var apiBase = apiConfiguration.baseUrl;
9984
10021
  var MAX_REMOTE_RESPONSE_BYTES = 4 * 1024 * 1024;
9985
10022
  var DOCTOR_PROBE_TIMEOUT_MS = 7500;
9986
- var SERVER_VERSION = true ? "0.1.50" : "0.0.0-dev";
10023
+ var SERVER_VERSION = true ? "0.1.52" : "0.0.0-dev";
9987
10024
  var tools = toolDefinitions;
9988
10025
  var doctorCliRequested = process.argv[2] === "doctor";
9989
10026
  var inputBuffer = Buffer.alloc(0);
@@ -114,12 +114,22 @@ CODEX_CLI="${CODEX_CLI:-$(command -v codex || true)}"
114
114
  [ -x "$CODEX_CLI" ] || { printf '%s\n' "Codex CLI not found. Install the Codex CLI, or install or update the ChatGPT desktop app on macOS, then try again." >&2; exit 1; }
115
115
  "$CODEX_CLI" plugin marketplace add dreamarkinc/remembrance-skills &&
116
116
  "$CODEX_CLI" plugin marketplace upgrade remembrance &&
117
- "$CODEX_CLI" plugin add remembrance@remembrance
117
+ "$CODEX_CLI" plugin add remembrance@remembrance &&
118
+ "$CODEX_CLI"
118
119
  ~~~
119
120
 
120
121
  This command handles both first install and update. If zsh says
121
122
  "codex: command not found", it discovers the current ChatGPT desktop bundle or
122
- the legacy Codex app bundle without requiring a shell alias.
123
+ the legacy Codex app bundle without requiring a shell alias. The final command
124
+ opens Codex CLI so its secure hook review can be completed immediately.
125
+
126
+ Codex will not execute plugin hooks until their exact definitions are trusted.
127
+ In the Codex window opened by the installer, choose **Review hooks** on the
128
+ automatic **Hooks need review** screen and trust only the Remembrance
129
+ `SessionStart`, `UserPromptSubmit`, `PostToolUse`, and `Stop` hooks.
130
+ Changed hook definitions show the same review screen again; never use the
131
+ automation-only trust bypass for normal installation. Exit that window, then
132
+ fully restart Codex.
123
133
 
124
134
  OpenClaw:
125
135
 
@@ -177,8 +187,10 @@ Integrations & MCP**, and verify query, invocation, feedback, and contribution
177
187
  receipts in both local and cloud runs.
178
188
 
179
189
  After installing any native plugin, restart the agent app/session and approve
180
- the one-time trust prompt if the runtime asks for it. A currently running Codex
181
- or Claude thread usually cannot hot-load newly installed plugin tools.
190
+ the runtime's trust request. For Codex, complete the automatic hook review
191
+ above; changed hook definitions show the same review screen again. A currently
192
+ running Codex or Claude thread usually cannot hot-load newly installed plugin
193
+ tools.
182
194
 
183
195
  ## Enterprise/org key setup
184
196
 
@@ -830,8 +842,11 @@ be copied to ".agents/skills/remembrancer/SKILL.md" for compatible providers.
830
842
  ## Troubleshooting matrix
831
843
 
832
844
  - "Plugin installed, but no tools": restart the agent app/session; confirm the
833
- plugin is enabled; confirm the runtime accepted the trust prompt; confirm the
834
- installed package contains the runtime-specific manifest.
845
+ plugin is enabled and contains the runtime-specific manifest. For Codex,
846
+ launch the installer-provided command, choose **Review hooks** on the
847
+ automatic review screen, and trust only the listed Remembrance hooks. Exit
848
+ that window and fully restart Codex; updates that change hooks show the same
849
+ review screen again.
835
850
  - "Agent has tools but does not use them": first verify a concrete query receipt,
836
851
  then test a short contextual follow-up such as "fix these issues". Native
837
852
  prompt hooks should inject a full-conversation query reminder, and completion