@fenglimg/fabric-cli 2.0.0-rc.13 → 2.0.0-rc.21

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 (29) hide show
  1. package/README.md +4 -2
  2. package/dist/{chunk-X7QPY5KH.js → chunk-4HC5ZK7H.js} +296 -301
  3. package/dist/{chunk-FDRLV5PL.js → chunk-FNO7CQDG.js} +5 -213
  4. package/dist/{chunk-WWNXR34K.js → chunk-G2CIOLD4.js} +16 -1
  5. package/dist/chunk-KZ2YITOS.js +225 -0
  6. package/dist/{chunk-OHWQNSLH.js → chunk-MF3OTILQ.js} +267 -44
  7. package/dist/{chunk-OBQU6NHO.js → chunk-ZSESMG6L.js} +0 -6
  8. package/dist/config-AYP5F72E.js +13 -0
  9. package/dist/doctor-L6TIXXIX.js +425 -0
  10. package/dist/index.js +11 -9
  11. package/dist/{install-SLS5W27W.js → install-DNZXGFHJ.js} +344 -359
  12. package/dist/{plan-context-hint-QMUPAXIB.js → plan-context-hint-CFDGXHCA.js} +10 -5
  13. package/dist/{serve-NGLXHDYC.js → serve-6PPQX7AW.js} +16 -11
  14. package/dist/{uninstall-JHUSFENL.js → uninstall-L2HEEOU3.js} +200 -215
  15. package/package.json +3 -3
  16. package/templates/hooks/configs/README.md +9 -5
  17. package/templates/hooks/configs/cursor-hooks.json +7 -10
  18. package/templates/hooks/fabric-hint.cjs +350 -21
  19. package/templates/hooks/knowledge-hint-broad.cjs +39 -14
  20. package/templates/hooks/knowledge-hint-narrow.cjs +31 -7
  21. package/templates/hooks/lib/banner-i18n.cjs +252 -0
  22. package/dist/chunk-Q72D24BG.js +0 -186
  23. package/dist/doctor-RILCO5OG.js +0 -282
  24. package/dist/hooks-HIWYI3VG.js +0 -13
  25. package/dist/scan-VHKZPT2W.js +0 -24
  26. package/templates/agents-md/AGENTS.md.template +0 -59
  27. package/templates/bootstrap/CLAUDE.md +0 -8
  28. package/templates/bootstrap/codex-AGENTS-header.md +0 -6
  29. package/templates/bootstrap/cursor-fabric-bootstrap.mdc +0 -10
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveDevMode
4
- } from "./chunk-OBQU6NHO.js";
4
+ } from "./chunk-ZSESMG6L.js";
5
5
 
6
6
  // src/commands/plan-context-hint.ts
7
7
  import { defineCommand } from "citty";
@@ -10,7 +10,12 @@ var ALL_PATHS_SENTINEL = "**";
10
10
  var planContextHintCommand = defineCommand({
11
11
  meta: {
12
12
  name: "plan-context-hint",
13
- description: "Emit versioned knowledge hint JSON to stdout. Used by rc.6 hooks and the fabric-import skill."
13
+ description: "Emit versioned knowledge hint JSON to stdout. Used by rc.6 hooks and the fabric-import skill.",
14
+ // rc.15 TASK-004 (C8): hidden from `fab --help` listing. The command stays
15
+ // callable so hook scripts and the fabric-import skill can still invoke
16
+ // it via `fab plan-context-hint ...`; it just no longer appears in the
17
+ // top-level usage banner alongside install/doctor/serve/uninstall/config.
18
+ hidden: true
14
19
  },
15
20
  args: {
16
21
  paths: {
@@ -61,17 +66,17 @@ async function runPlanContextHint(opts) {
61
66
  // scope_glob matches the requested path.
62
67
  dedupeByStableId(result.entries.flatMap((entry) => entry.description_index))
63
68
  );
64
- const narrow = narrowSource.map((item) => ({
69
+ const entries = narrowSource.map((item) => ({
65
70
  id: item.stable_id,
66
71
  type: item.type ?? item.description.knowledge_type ?? "",
67
72
  maturity: item.maturity ?? item.description.maturity ?? "",
68
73
  summary: item.description.summary
69
74
  }));
70
75
  return {
71
- version: 1,
76
+ version: 2,
72
77
  revision_hash: result.revision_hash,
73
78
  target_paths: targetPaths,
74
- narrow,
79
+ entries,
75
80
  broad_count: sharedIndex.length
76
81
  };
77
82
  }
@@ -1,15 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ hasActionHint,
3
4
  paint,
5
+ renderFabricError,
4
6
  symbol
5
- } from "./chunk-WWNXR34K.js";
6
- import {
7
- createDebugLogger,
8
- resolveDevMode
9
- } from "./chunk-OBQU6NHO.js";
7
+ } from "./chunk-G2CIOLD4.js";
10
8
  import {
11
9
  t
12
10
  } from "./chunk-6ICJICVU.js";
11
+ import {
12
+ createDebugLogger,
13
+ resolveDevMode
14
+ } from "./chunk-ZSESMG6L.js";
13
15
 
14
16
  // src/commands/serve.ts
15
17
  import { defineCommand } from "citty";
@@ -39,11 +41,6 @@ var serveCommand = defineCommand({
39
41
  type: "boolean",
40
42
  description: t("cli.serve.args.debug.description"),
41
43
  default: false
42
- },
43
- force: {
44
- type: "boolean",
45
- description: t("cli.serve.args.force.description"),
46
- default: false
47
44
  }
48
45
  },
49
46
  async run({ args }) {
@@ -55,7 +52,15 @@ var serveCommand = defineCommand({
55
52
  const authToken = readAuthTokenFromEnv();
56
53
  const host = validateHost(requestedHost, authToken);
57
54
  const projectRoot = resolution.target;
58
- acquireLock(projectRoot, { force: args.force });
55
+ try {
56
+ acquireLock(projectRoot);
57
+ } catch (err) {
58
+ if (hasActionHint(err)) {
59
+ renderFabricError(err);
60
+ process.exit(1);
61
+ }
62
+ throw err;
63
+ }
59
64
  process.on("exit", () => {
60
65
  releaseLock(projectRoot);
61
66
  });