@remixhq/claude-plugin 0.1.24 → 0.1.26

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/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@remixhq/claude-plugin",
6
- version: "0.1.24",
6
+ version: "0.1.26",
7
7
  description: "Claude Code plugin for Remix collaboration workflows",
8
8
  homepage: "https://github.com/RemixDotOne/remix-claude-plugin",
9
9
  license: "MIT",
@@ -41,8 +41,8 @@ var package_default = {
41
41
  prepack: "npm run build"
42
42
  },
43
43
  dependencies: {
44
- "@remixhq/core": "^0.1.19",
45
- "@remixhq/mcp": "^0.1.19"
44
+ "@remixhq/core": "^0.1.21",
45
+ "@remixhq/mcp": "^0.1.21"
46
46
  },
47
47
  devDependencies: {
48
48
  "@types/node": "^25.4.0",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/metadata.ts"],"sourcesContent":["{\n \"name\": \"@remixhq/claude-plugin\",\n \"version\": \"0.1.24\",\n \"description\": \"Claude Code plugin for Remix collaboration workflows\",\n \"homepage\": \"https://github.com/RemixDotOne/remix-claude-plugin\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/RemixDotOne/remix-claude-plugin.git\"\n },\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"dist\",\n \".claude-plugin/plugin.json\",\n \".mcp.json\",\n \"skills\",\n \"hooks\",\n \"agents\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"postbuild\": \"node -e \\\"const fs=require('node:fs'); for (const p of ['dist/mcp-server.cjs','dist/hook-pre-git.cjs','dist/hook-user-prompt.cjs','dist/hook-post-collab.cjs','dist/hook-stop-collab.cjs']) fs.chmodSync(p, 0o755);\\\"\",\n \"dev\": \"tsx src/mcp-server.ts\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit\",\n \"test\": \"node --import tsx --test 'src/**/*.test.ts'\",\n \"prepack\": \"npm run build\"\n },\n \"dependencies\": {\n \"@remixhq/core\": \"^0.1.19\",\n \"@remixhq/mcp\": \"^0.1.19\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^25.4.0\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.21.0\",\n \"typescript\": \"^5.9.3\"\n }\n}\n","import pkg from \"../package.json\";\n\nexport const pluginMetadata = {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n pluginId: \"remix\",\n agentName: \"remix-collab\",\n};\n"],"mappings":";;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,EACZ,SAAW;AAAA,EACX,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,EACZ;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,WAAa;AAAA,IACb,KAAO;AAAA,IACP,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,SAAW;AAAA,EACb;AAAA,EACA,cAAgB;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,YAAc;AAAA,EAChB;AACF;;;AC/CO,IAAM,iBAAiB;AAAA,EAC5B,MAAM,gBAAI;AAAA,EACV,SAAS,gBAAI;AAAA,EACb,aAAa,gBAAI;AAAA,EACjB,UAAU;AAAA,EACV,WAAW;AACb;","names":[]}
1
+ {"version":3,"sources":["../package.json","../src/metadata.ts"],"sourcesContent":["{\n \"name\": \"@remixhq/claude-plugin\",\n \"version\": \"0.1.26\",\n \"description\": \"Claude Code plugin for Remix collaboration workflows\",\n \"homepage\": \"https://github.com/RemixDotOne/remix-claude-plugin\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/RemixDotOne/remix-claude-plugin.git\"\n },\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"dist\",\n \".claude-plugin/plugin.json\",\n \".mcp.json\",\n \"skills\",\n \"hooks\",\n \"agents\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"postbuild\": \"node -e \\\"const fs=require('node:fs'); for (const p of ['dist/mcp-server.cjs','dist/hook-pre-git.cjs','dist/hook-user-prompt.cjs','dist/hook-post-collab.cjs','dist/hook-stop-collab.cjs']) fs.chmodSync(p, 0o755);\\\"\",\n \"dev\": \"tsx src/mcp-server.ts\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit\",\n \"test\": \"node --import tsx --test 'src/**/*.test.ts'\",\n \"prepack\": \"npm run build\"\n },\n \"dependencies\": {\n \"@remixhq/core\": \"^0.1.21\",\n \"@remixhq/mcp\": \"^0.1.21\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^25.4.0\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.21.0\",\n \"typescript\": \"^5.9.3\"\n }\n}\n","import pkg from \"../package.json\";\n\nexport const pluginMetadata = {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n pluginId: \"remix\",\n agentName: \"remix-collab\",\n};\n"],"mappings":";;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,EACZ,SAAW;AAAA,EACX,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,EACZ;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,WAAa;AAAA,IACb,KAAO;AAAA,IACP,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,SAAW;AAAA,EACb;AAAA,EACA,cAAgB;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,YAAc;AAAA,EAChB;AACF;;;AC/CO,IAAM,iBAAiB;AAAA,EAC5B,MAAM,gBAAI;AAAA,EACV,SAAS,gBAAI;AAAA,EACb,aAAa,gBAAI;AAAA,EACjB,UAAU;AAAA,EACV,WAAW;AACb;","names":[]}
@@ -25003,6 +25003,7 @@ async function collabInit(params) {
25003
25003
  upstreamAppId: existingBinding.upstreamAppId ?? existingBinding.currentAppId,
25004
25004
  dashboardUrl: buildDashboardAppUrl(existingBinding.currentAppId),
25005
25005
  bindingPath: getCollabBindingPath(repoRoot),
25006
+ repoFingerprint: existingBinding.repoFingerprint ?? repoFingerprint,
25006
25007
  bindingMode: existingBinding.bindingMode,
25007
25008
  createdCanonicalFamily: false,
25008
25009
  remoteUrl: existingBinding.remoteUrl ?? remoteUrl,
@@ -25019,6 +25020,7 @@ async function collabInit(params) {
25019
25020
  upstreamAppId: "",
25020
25021
  dashboardUrl: "",
25021
25022
  bindingPath: getCollabBindingPath(repoRoot),
25023
+ repoFingerprint,
25022
25024
  bindingMode: "lane",
25023
25025
  createdCanonicalFamily: false,
25024
25026
  remoteUrl,
@@ -25119,6 +25121,7 @@ async function collabInit(params) {
25119
25121
  upstreamAppId: boundUpstreamAppId2,
25120
25122
  bindingPath: import_path11.default.join(repoRoot, ".remix", "config.json"),
25121
25123
  repoRoot,
25124
+ repoFingerprint,
25122
25125
  bindingMode: defaultBranch && branchName !== defaultBranch ? "lane" : "explicit_root",
25123
25126
  createdCanonicalFamily: false,
25124
25127
  baselineStatus: await resolveInitBaselineStatus({
@@ -25231,6 +25234,7 @@ async function collabInit(params) {
25231
25234
  upstreamAppId: boundUpstreamAppId2,
25232
25235
  bindingPath: bindingPath2,
25233
25236
  repoRoot,
25237
+ repoFingerprint,
25234
25238
  bindingMode: "lane",
25235
25239
  createdCanonicalFamily: false,
25236
25240
  baselineStatus: await resolveInitBaselineStatus({
@@ -25361,6 +25365,7 @@ async function collabInit(params) {
25361
25365
  upstreamAppId: boundUpstreamAppId2,
25362
25366
  bindingPath: bindingPath2,
25363
25367
  repoRoot,
25368
+ repoFingerprint,
25364
25369
  bindingMode: "lane",
25365
25370
  createdCanonicalFamily: false,
25366
25371
  baselineStatus: await resolveInitBaselineStatus({
@@ -25581,6 +25586,7 @@ async function collabInit(params) {
25581
25586
  upstreamAppId: boundUpstreamAppId2,
25582
25587
  dashboardUrl: buildDashboardAppUrl(boundCurrentAppId2),
25583
25588
  bindingPath: bindingPath2,
25589
+ repoFingerprint,
25584
25590
  bindingMode: bindingMode2,
25585
25591
  createdCanonicalFamily: Boolean(params.forceNew),
25586
25592
  remoteUrl,
@@ -25763,6 +25769,7 @@ async function collabInit(params) {
25763
25769
  upstreamAppId: boundUpstreamAppId,
25764
25770
  bindingPath,
25765
25771
  repoRoot,
25772
+ repoFingerprint,
25766
25773
  bindingMode,
25767
25774
  createdCanonicalFamily: Boolean(params.forceNew),
25768
25775
  baselineStatus,
@@ -35194,7 +35201,7 @@ var EMPTY_COMPLETION_RESULT = {
35194
35201
  }
35195
35202
  };
35196
35203
 
35197
- // node_modules/@remixhq/core/dist/chunk-C2FOZ3O7.js
35204
+ // node_modules/@remixhq/core/dist/chunk-YENZA6QR.js
35198
35205
  async function readJsonSafe(res) {
35199
35206
  const ct = res.headers.get("content-type") ?? "";
35200
35207
  if (!ct.toLowerCase().includes("application/json")) return null;
@@ -35475,6 +35482,21 @@ function createApiClient(config2, opts) {
35475
35482
  const suffix = qs.toString() ? `?${qs.toString()}` : "";
35476
35483
  return request(`/v1/merge-requests${suffix}`, { method: "GET" });
35477
35484
  },
35485
+ listMergeRequestInbox: (params) => {
35486
+ const qs = new URLSearchParams();
35487
+ if (Array.isArray(params?.status)) {
35488
+ for (const status of params.status) qs.append("status", status);
35489
+ } else if (typeof params?.status === "string") {
35490
+ qs.set("status", params.status);
35491
+ }
35492
+ if (params?.kind) qs.set("kind", params.kind);
35493
+ if (typeof params?.limit === "number") qs.set("limit", String(params.limit));
35494
+ if (typeof params?.offset === "number") qs.set("offset", String(params.offset));
35495
+ if (typeof params?.includeReview === "boolean") qs.set("includeReview", String(params.includeReview));
35496
+ if (typeof params?.includeDiffs === "boolean") qs.set("includeDiffs", String(params.includeDiffs));
35497
+ const suffix = qs.toString() ? `?${qs.toString()}` : "";
35498
+ return request(`/v1/merge-requests/inbox${suffix}`, { method: "GET" });
35499
+ },
35478
35500
  openMergeRequest: (sourceAppId) => request("/v1/merge-requests", { method: "POST", body: JSON.stringify({ sourceAppId }) }),
35479
35501
  getMergeRequestReview: (mrId) => request(`/v1/merge-requests/${encodeURIComponent(mrId)}/review`, { method: "GET" }),
35480
35502
  updateMergeRequest: (mrId, payload) => request(`/v1/merge-requests/${encodeURIComponent(mrId)}`, { method: "PATCH", body: JSON.stringify(payload) }),
@@ -55842,7 +55864,9 @@ async function resolveConfig(_opts) {
55842
55864
  // node_modules/@remixhq/mcp/dist/index.js
55843
55865
  var import_path15 = __toESM(require("path"), 1);
55844
55866
  var import_child_process = require("child_process");
55867
+ var import_crypto9 = require("crypto");
55845
55868
  var import_fs3 = require("fs");
55869
+ var import_os8 = __toESM(require("os"), 1);
55846
55870
  var import_path16 = __toESM(require("path"), 1);
55847
55871
  async function createRemixTokenProvider(config2) {
55848
55872
  const resolvedConfig = config2 ?? await resolveConfig();
@@ -57494,11 +57518,30 @@ async function accessDebug(params) {
57494
57518
  }
57495
57519
  };
57496
57520
  }
57497
- var MARKER_REL_PATH = import_path16.default.join(".remix", ".history-imported");
57498
- var LOG_REL_PATH = import_path16.default.join(".remix", "history-import.log");
57499
- function shouldAutoSpawnHistoryImport(repoRoot) {
57521
+ var LEGACY_MARKER_REL_PATH = import_path16.default.join(".remix", ".history-imported");
57522
+ function collabStateRoot() {
57523
+ const configured = process.env.REMIX_COLLAB_STATE_ROOT?.trim();
57524
+ return configured || import_path16.default.join(import_os8.default.homedir(), ".remix", "collab-state");
57525
+ }
57526
+ function sha256Hex3(value) {
57527
+ return (0, import_crypto9.createHash)("sha256").update(value).digest("hex");
57528
+ }
57529
+ function autoSpawnMarkerPath(repoRoot, repoFingerprint) {
57530
+ const identityKey = typeof repoFingerprint === "string" && repoFingerprint.trim() ? `repoFingerprint:${repoFingerprint.trim()}` : `repoRoot:${repoRoot}`;
57531
+ return import_path16.default.join(collabStateRoot(), "history-import", sha256Hex3(identityKey), "history-imported.json");
57532
+ }
57533
+ function fallbackRepoRootMarkerPath(repoRoot) {
57534
+ return autoSpawnMarkerPath(repoRoot, null);
57535
+ }
57536
+ function legacyLocalRepoRootMarkerPath(repoRoot) {
57537
+ return import_path16.default.join(collabStateRoot(), "history-import", sha256Hex3(repoRoot), "history-imported.json");
57538
+ }
57539
+ function legacyAutoSpawnMarkerPath(repoRoot) {
57540
+ return import_path16.default.join(repoRoot, LEGACY_MARKER_REL_PATH);
57541
+ }
57542
+ function shouldAutoSpawnHistoryImport(repoRoot, repoFingerprint) {
57500
57543
  try {
57501
- return !(0, import_fs3.existsSync)(import_path16.default.join(repoRoot, MARKER_REL_PATH));
57544
+ return !(0, import_fs3.existsSync)(autoSpawnMarkerPath(repoRoot, repoFingerprint)) && !(0, import_fs3.existsSync)(fallbackRepoRootMarkerPath(repoRoot)) && !(0, import_fs3.existsSync)(legacyLocalRepoRootMarkerPath(repoRoot)) && !(0, import_fs3.existsSync)(legacyAutoSpawnMarkerPath(repoRoot));
57502
57545
  } catch {
57503
57546
  return false;
57504
57547
  }
@@ -57507,14 +57550,6 @@ function isAutoSpawnEligibleBindingMode(bindingMode) {
57507
57550
  return bindingMode === "explicit_root";
57508
57551
  }
57509
57552
  function spawnHistoryImportDetached(repoRoot, options) {
57510
- const remixDir = import_path16.default.join(repoRoot, ".remix");
57511
- try {
57512
- (0, import_fs3.mkdirSync)(remixDir, { recursive: true });
57513
- } catch {
57514
- }
57515
- const logPath = import_path16.default.join(repoRoot, LOG_REL_PATH);
57516
- const out = (0, import_fs3.openSync)(logPath, "a");
57517
- const err = (0, import_fs3.openSync)(logPath, "a");
57518
57553
  const child = (0, import_child_process.spawn)(
57519
57554
  "remix",
57520
57555
  [
@@ -57531,12 +57566,12 @@ function spawnHistoryImportDetached(repoRoot, options) {
57531
57566
  ],
57532
57567
  {
57533
57568
  detached: true,
57534
- stdio: ["ignore", out, err],
57569
+ stdio: "ignore",
57535
57570
  env: { ...process.env, REMIX_HISTORY_AUTO_SPAWN: "1" }
57536
57571
  }
57537
57572
  );
57538
57573
  child.unref();
57539
- return { pid: child.pid, logPath };
57574
+ return { pid: child.pid };
57540
57575
  }
57541
57576
  function getAnnotations(access, options) {
57542
57577
  if (access === "read") {
@@ -57704,12 +57739,14 @@ function registerCollabTools(server, context) {
57704
57739
  try {
57705
57740
  const repoRoot = result && typeof result === "object" && "data" in result && result.data && typeof result.data.repoRoot === "string" ? result.data.repoRoot : null;
57706
57741
  const bindingMode = result && typeof result === "object" && "data" in result && result.data && typeof result.data.bindingMode === "string" ? result.data.bindingMode : null;
57707
- if (repoRoot && isAutoSpawnEligibleBindingMode(bindingMode) && shouldAutoSpawnHistoryImport(repoRoot)) {
57742
+ const resultData = result && typeof result === "object" && "data" in result && result.data && typeof result.data === "object" ? result.data : null;
57743
+ const repoFingerprint = typeof resultData?.repoFingerprint === "string" ? resultData.repoFingerprint : null;
57744
+ if (repoRoot && isAutoSpawnEligibleBindingMode(bindingMode) && shouldAutoSpawnHistoryImport(repoRoot, repoFingerprint)) {
57708
57745
  const cutoffAt = (/* @__PURE__ */ new Date()).toISOString();
57709
57746
  const spawned = spawnHistoryImportDetached(repoRoot, { cutoffAt });
57710
57747
  context.logger.log({
57711
57748
  level: "info",
57712
- message: `history_import_auto_spawned pid=${spawned.pid ?? "?"} log=${spawned.logPath} cutoffAt=${cutoffAt}`,
57749
+ message: `history_import_auto_spawned pid=${spawned.pid ?? "?"} cutoffAt=${cutoffAt}`,
57713
57750
  tool: "remix_collab_init",
57714
57751
  repoRoot
57715
57752
  });
@@ -59743,7 +59780,7 @@ async function listPendingTurnStateSummaries() {
59743
59780
  // package.json
59744
59781
  var package_default = {
59745
59782
  name: "@remixhq/claude-plugin",
59746
- version: "0.1.24",
59783
+ version: "0.1.26",
59747
59784
  description: "Claude Code plugin for Remix collaboration workflows",
59748
59785
  homepage: "https://github.com/RemixDotOne/remix-claude-plugin",
59749
59786
  license: "MIT",
@@ -59781,8 +59818,8 @@ var package_default = {
59781
59818
  prepack: "npm run build"
59782
59819
  },
59783
59820
  dependencies: {
59784
- "@remixhq/core": "^0.1.19",
59785
- "@remixhq/mcp": "^0.1.19"
59821
+ "@remixhq/core": "^0.1.21",
59822
+ "@remixhq/mcp": "^0.1.21"
59786
59823
  },
59787
59824
  devDependencies: {
59788
59825
  "@types/node": "^25.4.0",