@fenglimg/fabric-cli 2.2.0-rc.4 → 2.2.0-rc.8

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 (73) hide show
  1. package/README.md +8 -5
  2. package/dist/{chunk-5JG4QJLO.js → chunk-27HK6H5Y.js} +10 -5
  3. package/dist/{chunk-F6ITRM7T.js → chunk-2KBCTMID.js} +29 -6
  4. package/dist/{chunk-XC5RUHLK.js → chunk-3IOLS5EK.js} +23 -38
  5. package/dist/{chunk-XHHCRDIR.js → chunk-CMDW3PYK.js} +105 -220
  6. package/dist/chunk-FEOPLBGA.js +150 -0
  7. package/dist/{chunk-XCBVSGCS.js → chunk-FNHDQTPC.js} +1 -10
  8. package/dist/{chunk-2CY4BMTH.js → chunk-HORSMSZL.js} +9 -5
  9. package/dist/{doctor-U5W4CX5I.js → chunk-JTHWLUD3.js} +103 -51
  10. package/dist/{chunk-BO4XIZWZ.js → chunk-NLNH64A3.js} +5 -18
  11. package/dist/{chunk-H3FE6VIK.js → chunk-PTGQAZEW.js} +13 -3
  12. package/dist/chunk-QFIVFZRH.js +13 -0
  13. package/dist/{chunk-5SSNE5GM.js → chunk-QPAW6IYT.js} +125 -39
  14. package/dist/{chunk-COI5VDFU.js → chunk-WA3DYGSY.js} +1 -2
  15. package/dist/{plan-context-hint-CHVZGOZ5.js → chunk-YM4XATJF.js} +29 -4
  16. package/dist/{config-VJMXCLXW.js → config-A3LTECAY.js} +4 -3
  17. package/dist/context-7NUKXDB6.js +117 -0
  18. package/dist/doctor-REZDNH4A.js +24 -0
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.js +131 -21
  21. package/dist/info-7FKBTMVO.js +139 -0
  22. package/dist/install-v2-2COC3DO3.js +3277 -0
  23. package/dist/{metrics-RER6NLFC.js → metrics-HMFH4YHK.js} +1 -1
  24. package/dist/{onboard-coverage-JWQWDZW7.js → onboard-coverage-XSG77LL3.js} +48 -27
  25. package/dist/plan-context-hint-G75R4P4J.js +12 -0
  26. package/dist/{scope-explain-BWRWBCCP.js → scope-explain-HLJZ2M33.js} +3 -2
  27. package/dist/{status-7UFLWRX7.js → status-4R3TM4FJ.js} +8 -5
  28. package/dist/{store-ZEZMQVG7.js → store-HOCORVL3.js} +96 -350
  29. package/dist/{sync-EA5HZMXM.js → sync-DT5UJMMR.js} +36 -13
  30. package/dist/{uninstall-F75MPKQC.js → uninstall-62F4LNKI.js} +62 -140
  31. package/dist/{whoami-3FRWYGML.js → whoami-ITGEFWH4.js} +9 -7
  32. package/package.json +7 -5
  33. package/templates/hooks/cite-policy-evict.cjs +5 -5
  34. package/templates/hooks/configs/README.md +14 -27
  35. package/templates/hooks/configs/claude-code.json +1 -1
  36. package/templates/hooks/configs/codex-hooks.json +3 -3
  37. package/templates/hooks/fabric-hint.cjs +301 -161
  38. package/templates/hooks/knowledge-hint-broad.cjs +426 -207
  39. package/templates/hooks/knowledge-hint-narrow.cjs +56 -56
  40. package/templates/hooks/lib/banner-i18n.cjs +31 -0
  41. package/templates/hooks/lib/bindings-snapshot-reader.cjs +117 -7
  42. package/templates/hooks/lib/cite-line-parser.cjs +12 -20
  43. package/templates/hooks/lib/client-adapter.cjs +66 -7
  44. package/templates/hooks/lib/nudge-policy.cjs +117 -0
  45. package/templates/hooks/lib/state-store.cjs +60 -0
  46. package/templates/hooks/lib/summary-fallback.cjs +82 -19
  47. package/templates/hooks/post-tooluse-mutation.cjs +112 -11
  48. package/templates/skills/fabric/SKILL.md +94 -0
  49. package/templates/skills/fabric-archive/SKILL.md +29 -26
  50. package/templates/skills/fabric-archive/ref/dry-run-scope.md +1 -1
  51. package/templates/skills/fabric-archive/ref/i18n-policy.md +2 -3
  52. package/templates/skills/fabric-archive/ref/phase-1-5-onboard.md +2 -3
  53. package/templates/skills/fabric-archive/ref/phase-1-cross-session.md +1 -1
  54. package/templates/skills/fabric-archive/ref/phase-2-5-viability.md +1 -1
  55. package/templates/skills/fabric-archive/ref/phase-3-6-related-edges.md +18 -0
  56. package/templates/skills/fabric-archive/ref/phase-3-7-semantic-scope.md +47 -0
  57. package/templates/skills/fabric-audit/SKILL.md +13 -3
  58. package/templates/skills/fabric-connect/SKILL.md +3 -3
  59. package/templates/skills/fabric-import/SKILL.md +7 -7
  60. package/templates/skills/fabric-import/ref/i18n-policy.md +2 -3
  61. package/templates/skills/fabric-import/ref/state-recovery.md +1 -2
  62. package/templates/skills/fabric-review/SKILL.md +5 -5
  63. package/templates/skills/fabric-review/ref/cite-contract.md +1 -1
  64. package/templates/skills/fabric-review/ref/i18n-policy.md +2 -3
  65. package/templates/skills/fabric-review/ref/output-contract.md +1 -1
  66. package/templates/skills/fabric-review/ref/per-mode-flows.md +2 -2
  67. package/templates/skills/fabric-review/ref/worked-examples.md +1 -1
  68. package/templates/skills/fabric-store/SKILL.md +1 -1
  69. package/templates/skills/fabric-sync/SKILL.md +1 -1
  70. package/templates/skills/lib/shared-policy.md +2 -2
  71. package/dist/install-7XJ64WSC.js +0 -2743
  72. package/templates/hooks/configs/cursor-hooks.json +0 -30
  73. package/templates/hooks/lib/cite-contract-reminder.cjs +0 -179
@@ -3,13 +3,16 @@
3
3
  // src/i18n.ts
4
4
  import {
5
5
  createTranslator,
6
- detectNodeLocale,
7
- resolveFabricLocale
6
+ resolveGlobalLocale
8
7
  } from "@fenglimg/fabric-shared";
9
- var locale = detectNodeLocale();
8
+ var locale = resolveGlobalLocale();
10
9
  var t = createTranslator(locale);
11
- function getProjectTranslator(projectRoot = process.cwd()) {
12
- return createTranslator(resolveFabricLocale(projectRoot));
10
+ function refreshLocale() {
11
+ locale = resolveGlobalLocale();
12
+ t = createTranslator(locale);
13
+ }
14
+ function getProjectTranslator(_projectRoot = process.cwd()) {
15
+ return createTranslator(resolveGlobalLocale());
13
16
  }
14
17
  function getDoctorTranslator(projectRoot) {
15
18
  return getProjectTranslator(projectRoot);
@@ -17,6 +20,7 @@ function getDoctorTranslator(projectRoot) {
17
20
 
18
21
  export {
19
22
  t,
23
+ refreshLocale,
20
24
  getProjectTranslator,
21
25
  getDoctorTranslator
22
26
  };
@@ -1,26 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- paint,
4
- symbol
5
- } from "./chunk-BO4XIZWZ.js";
3
+ ensureStoreProjectBinding,
4
+ migrateRootConfig
5
+ } from "./chunk-FEOPLBGA.js";
6
6
  import {
7
7
  resolveDevMode
8
- } from "./chunk-COI5VDFU.js";
8
+ } from "./chunk-WA3DYGSY.js";
9
9
  import {
10
- getDoctorTranslator,
11
- t
12
- } from "./chunk-2CY4BMTH.js";
10
+ paint,
11
+ symbol
12
+ } from "./chunk-NLNH64A3.js";
13
13
  import {
14
14
  detectAliasLinkDrift,
15
15
  missingRequiredStores,
16
16
  syncStoreAliasLinks,
17
17
  unboundAvailableStores
18
- } from "./chunk-5SSNE5GM.js";
18
+ } from "./chunk-QPAW6IYT.js";
19
+ import {
20
+ loadProjectConfig
21
+ } from "./chunk-QFIVFZRH.js";
19
22
  import {
20
23
  loadGlobalConfig,
21
- loadProjectConfig,
22
24
  resolveGlobalRoot
23
- } from "./chunk-XCBVSGCS.js";
25
+ } from "./chunk-FNHDQTPC.js";
26
+ import {
27
+ getDoctorTranslator,
28
+ t
29
+ } from "./chunk-HORSMSZL.js";
24
30
 
25
31
  // src/commands/doctor.ts
26
32
  import { confirm, isCancel } from "@clack/prompts";
@@ -37,9 +43,24 @@ import {
37
43
  runDoctorConflictLint
38
44
  } from "@fenglimg/fabric-server";
39
45
 
46
+ // src/install/backfill-unbound-project.ts
47
+ import { detectUnboundProject } from "@fenglimg/fabric-server";
48
+ async function backfillUnboundProject(projectRoot, globalRoot = resolveGlobalRoot()) {
49
+ const violation = detectUnboundProject(projectRoot);
50
+ if (violation === null) {
51
+ return null;
52
+ }
53
+ const result = await ensureStoreProjectBinding(projectRoot, violation.alias, { globalRoot });
54
+ return {
55
+ alias: violation.alias,
56
+ project_id: result.project_id,
57
+ active_project: result.active_project
58
+ };
59
+ }
60
+
40
61
  // src/store/doctor-checks.ts
41
62
  import { join } from "path";
42
- import { findStoreExecutableViolations, storeRelativePath } from "@fenglimg/fabric-shared";
63
+ import { findStoreExecutableViolations, storeRelativePathForMount } from "@fenglimg/fabric-shared";
43
64
  function storeDoctorChecks(projectRoot, globalRoot = resolveGlobalRoot()) {
44
65
  const diagnostics = [];
45
66
  const global = loadGlobalConfig(globalRoot);
@@ -85,7 +106,7 @@ function storeDoctorChecks(projectRoot, globalRoot = resolveGlobalRoot()) {
85
106
  message: `store '${store.alias}' is local-only; add a git remote to back it up`
86
107
  });
87
108
  }
88
- const violations = findStoreExecutableViolations(join(globalRoot, storeRelativePath(store.store_uuid)));
109
+ const violations = findStoreExecutableViolations(join(globalRoot, storeRelativePathForMount(store)));
89
110
  if (violations.length > 0) {
90
111
  diagnostics.push({
91
112
  code: "executable_in_store",
@@ -101,8 +122,6 @@ function storeDoctorChecks(projectRoot, globalRoot = resolveGlobalRoot()) {
101
122
  // src/commands/doctor.ts
102
123
  import { buildDebugBundle } from "@fenglimg/fabric-shared";
103
124
  var FIX_KNOWLEDGE_CODE_LABELS = {
104
- knowledge_orphan_demote_required: "demote (maturity)",
105
- knowledge_stale_archive_required: "archive (git mv)",
106
125
  knowledge_pending_auto_archive: "archive (git mv, pending)",
107
126
  knowledge_index_drift: "counter bump (agents.meta)",
108
127
  knowledge_session_hints_stale: "cache delete"
@@ -133,40 +152,28 @@ var doctorCommand = defineCommand({
133
152
  description: t("cli.doctor.args.json.description"),
134
153
  default: false
135
154
  },
136
- strict: {
137
- type: "boolean",
138
- description: t("cli.doctor.args.strict.description"),
139
- default: false
140
- },
141
155
  // v2.1.0-rc.1 P6 (S40): emit a redacted diagnostic bundle (config + store
142
156
  // diagnostics; events excluded by default). Every string is secret-redacted
143
157
  // so the bundle is safe to paste into a bug report. Read-only.
158
+ // EPIC-009: hidden flag (internal debug tool).
144
159
  "debug-bundle": {
145
160
  type: "boolean",
146
161
  description: "Emit a redacted diagnostic bundle (config + store health) for bug reports",
147
162
  default: false
148
163
  },
149
- // rc.7 T11: skip the safety confirm before mutations. Required for any
150
- // non-tty invocation that wants to run --fix-knowledge without setting
151
- // FABRIC_NONINTERACTIVE=1 in the environment.
164
+ // EPIC-009: hidden flag (CI automation).
152
165
  yes: {
153
166
  type: "boolean",
154
167
  description: t("cli.doctor.args.yes.description"),
155
168
  default: false
156
169
  },
157
- // rc.35 TASK-12 (P0-11): expose maintainer-audience actionHints. By
158
- // default the renderer folds remediation strings that target Fabric
159
- // contributors (edit `packages/cli/templates/...`, interpret G1-G5
160
- // cite-goodhart codes, etc.) since npm end users have no actionable
161
- // lever for them. --verbose shows them.
170
+ // EPIC-009: hidden flag (advanced output).
162
171
  verbose: {
163
172
  type: "boolean",
164
173
  description: t("cli.doctor.args.verbose.description"),
165
174
  default: false
166
175
  },
167
- // rc.20 TASK-05: cite policy adherence report (read-only). Skips standard
168
- // inspections entirely — different output surface. Mutually exclusive
169
- // with --fix / --fix-knowledge (enforced in run()).
176
+ // EPIC-009: hidden flags (report surfaces).
170
177
  "cite-coverage": {
171
178
  type: "boolean",
172
179
  description: t("cli.doctor.args.cite-coverage.description"),
@@ -181,20 +188,14 @@ var doctorCommand = defineCommand({
181
188
  type: "string",
182
189
  description: t("cli.doctor.args.client.description"),
183
190
  default: "all",
184
- valueHint: "cc|codex|cursor|all"
191
+ valueHint: "cc|codex|all"
185
192
  },
186
- // v2.0.0-rc.24 TASK-10: --layer filter for the cite contract audit. Pairs
187
- // with --cite-coverage. Validated against {'team','personal','all'} at
188
- // command entry; rejects 'both' (rc.20 plan-context vocabulary) explicitly.
189
193
  layer: {
190
194
  type: "string",
191
195
  description: t("cli.doctor.args.layer.description"),
192
196
  default: "all",
193
197
  valueHint: "team|personal|all"
194
198
  },
195
- // rc.23 TASK-007 (a-C2): description-grade back-fill flag set. Read-side
196
- // by default; `--auto` flips the writer arm on. Mutually exclusive with
197
- // --fix / --fix-knowledge / --cite-coverage (different mutation surfaces).
198
199
  "enrich-descriptions": {
199
200
  type: "boolean",
200
201
  description: t("cli.doctor.args.enrich-descriptions.description"),
@@ -210,25 +211,16 @@ var doctorCommand = defineCommand({
210
211
  description: t("cli.doctor.args.dry-run.description"),
211
212
  default: false
212
213
  },
213
- // v2.0.0-rc.25 TASK-10: --archive-history flag (parallel to rc.20
214
- // --cite-coverage). Read-only; reads session_archive_attempted events
215
- // and renders a per-session table. Pairs with the shared `--since` flag.
216
214
  "archive-history": {
217
215
  type: "boolean",
218
216
  description: t("cli.doctor.args.archive-history.description"),
219
217
  default: false
220
218
  },
221
- // rc.37 NEW-33: unified history view across archive / fix / all surfaces.
222
- // Mode = `archive | fix | all` (the `archive` mode delegates to the
223
- // existing runDoctorArchiveHistory; `fix` aggregates doctor_run events;
224
- // `all` rolls up both into a per-day count table). Read-only; mutex
225
- // with the mutation arms.
226
219
  history: {
227
220
  type: "string",
228
221
  description: t("cli.doctor.args.history.description"),
229
222
  valueHint: "archive|fix|all"
230
223
  },
231
- // v2.1 ④ conflict-detection (P4): knowledge-conflict lint surface.
232
224
  "lint-conflicts": {
233
225
  type: "boolean",
234
226
  description: t("cli.doctor.args.lint-conflicts.description"),
@@ -238,6 +230,12 @@ var doctorCommand = defineCommand({
238
230
  type: "boolean",
239
231
  description: t("cli.doctor.args.deep.description"),
240
232
  default: false
233
+ },
234
+ // EPIC-009: hidden flag (strict mode for CI).
235
+ strict: {
236
+ type: "boolean",
237
+ description: t("cli.doctor.args.strict.description"),
238
+ default: false
241
239
  }
242
240
  },
243
241
  async run({ args }) {
@@ -415,6 +413,8 @@ var doctorCommand = defineCommand({
415
413
  }
416
414
  let fixKnowledgeReport = null;
417
415
  let fixReport = null;
416
+ let unboundProjectFix = null;
417
+ let rootConfigMigration = null;
418
418
  let report;
419
419
  if (fixKnowledge) {
420
420
  const preReport = await runDoctorReport(resolution.target);
@@ -447,6 +447,8 @@ var doctorCommand = defineCommand({
447
447
  if (args["dry-run"] === true) {
448
448
  report = await runDoctorReport(resolution.target);
449
449
  } else {
450
+ rootConfigMigration = migrateRootConfig(resolution.target);
451
+ unboundProjectFix = await backfillUnboundProject(resolution.target);
450
452
  fixReport = await runDoctorFix(resolution.target);
451
453
  report = fixReport.report;
452
454
  syncStoreAliasLinks();
@@ -458,7 +460,12 @@ var doctorCommand = defineCommand({
458
460
  if (args.json === true) {
459
461
  writeStdout(
460
462
  JSON.stringify(
461
- { ...fixKnowledgeReport ?? fixReport ?? report, store_diagnostics: storeDiagnostics },
463
+ {
464
+ ...fixKnowledgeReport ?? fixReport ?? report,
465
+ store_diagnostics: storeDiagnostics,
466
+ ...unboundProjectFix === null ? {} : { unbound_project_fix: unboundProjectFix },
467
+ ...rootConfigMigration?.migrated === true ? { root_config_migration: rootConfigMigration } : {}
468
+ },
462
469
  null,
463
470
  2
464
471
  )
@@ -472,6 +479,19 @@ var doctorCommand = defineCommand({
472
479
  renderFixKnowledgeMutations(fixKnowledgeReport, dt);
473
480
  } else if (fixReport !== null) {
474
481
  writeStdout(fixReport.message);
482
+ if (unboundProjectFix !== null) {
483
+ writeStdout(
484
+ dt("cli.doctor.unbound-project-backfilled", {
485
+ alias: unboundProjectFix.alias,
486
+ project: unboundProjectFix.active_project
487
+ })
488
+ );
489
+ }
490
+ if (rootConfigMigration?.migrated === true) {
491
+ writeStdout(
492
+ `config: migrated legacy root fabric.config.json \u2192 .fabric/fabric-config.json${rootConfigMigration.mergedKeys.length > 0 ? ` (merged: ${rootConfigMigration.mergedKeys.join(", ")})` : ""}`
493
+ );
494
+ }
475
495
  } else if ((fix || fixKnowledge) && args["dry-run"] === true) {
476
496
  writeStdout(dt("cli.doctor.fix-dry-run-banner"));
477
497
  }
@@ -503,6 +523,9 @@ function renderHumanReport(report, dt, verbose) {
503
523
  writeStdout(`${renderStatus(report.status)} ${paint.ai("fabric doctor")} ${paint.human(report.summary.target)}`);
504
524
  renderTldrHeader(report, dt, verbose);
505
525
  for (const check of report.checks) {
526
+ if (!verbose && check.status === "ok") {
527
+ continue;
528
+ }
506
529
  writeStdout(`${renderStatus(check.status)} ${check.name}: ${check.message}`);
507
530
  }
508
531
  const opts = { verbose, dt };
@@ -525,7 +548,7 @@ function renderStoreDiagnostics(diagnostics) {
525
548
  writeStdout("");
526
549
  writeStdout(paint.ai("store health"));
527
550
  for (const diagnostic of diagnostics) {
528
- const mark = diagnostic.severity === "warn" ? symbol.warn : "[info]";
551
+ const mark = diagnostic.severity === "error" ? symbol.error : diagnostic.severity === "warn" ? symbol.warn : "[info]";
529
552
  const ref = diagnostic.ref === void 0 ? "" : ` [${diagnostic.ref}]`;
530
553
  writeStdout(`${mark}${ref} ${diagnostic.message}`);
531
554
  }
@@ -705,7 +728,6 @@ async function resolveFixKnowledgeConsent(options) {
705
728
  var CITE_COVERAGE_CLIENT_FILTERS = /* @__PURE__ */ new Set([
706
729
  "cc",
707
730
  "codex",
708
- "cursor",
709
731
  "all"
710
732
  ]);
711
733
  function isValidClientFilter(input) {
@@ -1036,9 +1058,39 @@ function formatTimestampForTable(iso) {
1036
1058
  d.getUTCHours()
1037
1059
  )}:${pad(d.getUTCMinutes())}`;
1038
1060
  }
1061
+ function renderDoctorFilteredHelp() {
1062
+ const lines = [];
1063
+ lines.push(paint.ai("fabric doctor") + " \u2014 Diagnose and fix Fabric workspace issues");
1064
+ lines.push("");
1065
+ lines.push(`${paint.human("USAGE")}`);
1066
+ lines.push(` fabric doctor [OPTIONS]`);
1067
+ lines.push("");
1068
+ lines.push(`${paint.human("OPTIONS")}`);
1069
+ lines.push("");
1070
+ const exposedOptions = [
1071
+ ["--target <path>", "Override project root (defaults to cwd)"],
1072
+ ["--fix", "Auto-fix derived-state issues (agents.meta.json)"],
1073
+ ["--fix-knowledge", "Auto-fix knowledge entry issues (frontmatter + git mv)"],
1074
+ ["--json", "Output as JSON for programmatic consumption"],
1075
+ ["--verbose", "Show maintainer-audience action hints"]
1076
+ ];
1077
+ for (const [flag, desc] of exposedOptions) {
1078
+ lines.push(` ${paint.ai(flag)} ${desc}`);
1079
+ }
1080
+ lines.push("");
1081
+ lines.push(`${paint.human("EXAMPLES")}`);
1082
+ lines.push(` ${paint.ai("fabric doctor")} # Run diagnostics`);
1083
+ lines.push(` ${paint.ai("fabric doctor --fix")} # Fix derived-state issues`);
1084
+ lines.push(` ${paint.ai("fabric doctor --fix-knowledge")} # Fix knowledge entry issues`);
1085
+ lines.push("");
1086
+ lines.push(paint.human("Run `fabric doctor` to see a full diagnostic report with 48 checks."));
1087
+ writeStdout(lines.join("\n"));
1088
+ }
1089
+
1039
1090
  export {
1040
- doctor_default as default,
1041
1091
  doctorCommand,
1092
+ doctor_default,
1093
+ renderTldrHeader,
1042
1094
  parseSinceDuration,
1043
- renderTldrHeader
1095
+ renderDoctorFilteredHelp
1044
1096
  };
@@ -11,7 +11,7 @@ function isColorEnabled() {
11
11
  if (force !== void 0) {
12
12
  return force !== "0" && force.toLowerCase() !== "false";
13
13
  }
14
- return Boolean(process.stdout.isTTY) && Boolean(process.stderr.isTTY);
14
+ return Boolean(process.stdout.isTTY);
15
15
  }
16
16
  function colorize(painter) {
17
17
  return (value) => isColorEnabled() ? painter(value) : value;
@@ -27,30 +27,17 @@ var paint = {
27
27
  };
28
28
  var symbol = {
29
29
  get ok() {
30
- return isColorEnabled() ? paint.success("\u2713") : "[ok]";
30
+ return isColorEnabled() ? paint.success("[ok] \u2713") : "[ok]";
31
31
  },
32
32
  get warn() {
33
- return isColorEnabled() ? paint.warn("!") : "[warn]";
33
+ return isColorEnabled() ? paint.warn("[warn] !") : "[warn]";
34
34
  },
35
35
  get error() {
36
- return isColorEnabled() ? paint.error("x") : "[error]";
36
+ return isColorEnabled() ? paint.error("[error] x") : "[error]";
37
37
  }
38
38
  };
39
- function displayWidth(value) {
40
- return stringWidth(value);
41
- }
42
- function padEnd(value, width, char = " ") {
43
- const fill = char.length > 0 ? char : " ";
44
- let result = value;
45
- while (displayWidth(result) < width) {
46
- result += fill;
47
- }
48
- return result;
49
- }
50
39
 
51
40
  export {
52
41
  paint,
53
- symbol,
54
- displayWidth,
55
- padEnd
42
+ symbol
56
43
  };
@@ -3,12 +3,17 @@ import {
3
3
  buildResolveInput
4
4
  } from "./chunk-EOT63RDH.js";
5
5
  import {
6
- loadProjectConfig,
6
+ loadProjectConfig
7
+ } from "./chunk-QFIVFZRH.js";
8
+ import {
7
9
  resolveGlobalRoot
8
- } from "./chunk-XCBVSGCS.js";
10
+ } from "./chunk-FNHDQTPC.js";
9
11
 
10
12
  // src/store/bindings-io.ts
11
- import { writeBindingsSnapshot } from "@fenglimg/fabric-shared";
13
+ import {
14
+ resolveWorkspaceBindingId,
15
+ writeBindingsSnapshot
16
+ } from "@fenglimg/fabric-shared";
12
17
  var DEFAULT_WRITE_SCOPE = "team";
13
18
  function regenerateBindingsSnapshot(projectRoot, options) {
14
19
  const globalRoot = options.globalRoot ?? resolveGlobalRoot();
@@ -20,9 +25,14 @@ function regenerateBindingsSnapshot(projectRoot, options) {
20
25
  if (project?.project_id === void 0) {
21
26
  return null;
22
27
  }
28
+ const workspaceBindingId = resolveWorkspaceBindingId(project);
29
+ if (workspaceBindingId === void 0) {
30
+ return null;
31
+ }
23
32
  return writeBindingsSnapshot({
24
33
  globalRoot,
25
34
  projectId: project.project_id,
35
+ workspaceBindingId,
26
36
  resolveInput,
27
37
  writeScope: options.writeScope ?? DEFAULT_WRITE_SCOPE,
28
38
  now: options.now
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/store/project-config-io.ts
4
+ import {
5
+ projectConfigPath,
6
+ loadProjectConfig,
7
+ saveProjectConfig
8
+ } from "@fenglimg/fabric-shared";
9
+
10
+ export {
11
+ loadProjectConfig,
12
+ saveProjectConfig
13
+ };