@magic-markdown/cli 0.3.17 → 0.3.18

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 +11 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11263,7 +11263,7 @@ var RemoteDocumentIO = class {
11263
11263
  };
11264
11264
 
11265
11265
  // src/agent.ts
11266
- var CLI_VERSION = "0.3.17";
11266
+ var CLI_VERSION = "0.3.18";
11267
11267
  var CLI_PACKAGE_NAME = "@magic-markdown/cli";
11268
11268
  var AGENT_COMMANDS = [
11269
11269
  {
@@ -14090,6 +14090,16 @@ async function runBridge(options) {
14090
14090
  return localSignature === baseSignature ? "applied" : "conflict";
14091
14091
  }
14092
14092
  async function handleIncoming(message) {
14093
+ if (message.type === "agent-unbound") {
14094
+ const payload = message.payload;
14095
+ const targetsUs = !payload.agentIds || payload.agentIds.length === 0 || payload.agentIds.includes(options.actorId);
14096
+ if (!targetsUs) return;
14097
+ process.stdout.write(`mdocs bridge unbound by workspace; stopping ${root}
14098
+ `);
14099
+ await writeCurrentBridgeStatus("stopped").catch(() => void 0);
14100
+ socket?.close();
14101
+ process.exit(0);
14102
+ }
14093
14103
  if (message.type === "file-changed") {
14094
14104
  await applyCanonicalDocument(readDocumentPayload(message.payload));
14095
14105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-markdown/cli",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "description": "Magic Markdown agent CLI (mdocs): read, review, comment on, suggest edits to, and sync clean Markdown workspaces.",
5
5
  "type": "module",
6
6
  "license": "MIT",