@fenglimg/fabric-cli 2.2.0-rc.1 → 2.2.0-rc.3
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/chunk-5LQIHYFC.js +64 -0
- package/dist/chunk-5ZUMLCD5.js +248 -0
- package/dist/chunk-EOT63RDH.js +36 -0
- package/dist/{chunk-AOE6AYI7.js → chunk-F6ITRM7T.js} +2 -2
- package/dist/{chunk-WU6GAPKH.js → chunk-H3FE6VIK.js} +3 -5
- package/dist/chunk-XCBVSGCS.js +25 -0
- package/dist/{chunk-2R55HNVD.js → chunk-XHHCRDIR.js} +71 -6
- package/dist/{config-XYRBZJDU.js → config-VJMXCLXW.js} +1 -1
- package/dist/{doctor-YONYXDX6.js → doctor-J4O3X54I.js} +118 -7
- package/dist/index.js +13 -12
- package/dist/{install-74ANPCCP.js → install-BULNDUIM.js} +159 -80
- package/dist/{plan-context-hint-FC6P3WFE.js → plan-context-hint-CHVZGOZ5.js} +21 -8
- package/dist/{scope-explain-CDIZESP5.js → scope-explain-BWRWBCCP.js} +14 -4
- package/dist/{status-GLQWLWH6.js → status-PANEGKU2.js} +17 -6
- package/dist/store-66NK2FTQ.js +443 -0
- package/dist/{sync-UJ4BBCZJ.js → sync-EA5HZMXM.js} +165 -21
- package/dist/{uninstall-C3QXKOO6.js → uninstall-F75MPKQC.js} +27 -1
- package/dist/{whoami-2MLO4Y37.js → whoami-66YKY5DZ.js} +16 -5
- package/package.json +3 -3
- package/templates/hooks/cite-policy-evict.cjs +412 -160
- package/templates/hooks/configs/claude-code.json +17 -2
- package/templates/hooks/configs/codex-hooks.json +14 -2
- package/templates/hooks/configs/cursor-hooks.json +14 -2
- package/templates/hooks/fabric-hint.cjs +151 -15
- package/templates/hooks/knowledge-hint-broad.cjs +12 -1
- package/templates/hooks/knowledge-hint-narrow.cjs +54 -1
- package/templates/hooks/post-tooluse-mutation.cjs +285 -0
- package/templates/hooks/session-end-marker.cjs +140 -0
- package/templates/skills/fabric-archive/SKILL.md +7 -1
- package/dist/chunk-4R2CYEA4.js +0 -116
- package/dist/chunk-L4Q55UC4.js +0 -52
- package/dist/chunk-LFIKMVY7.js +0 -27
- package/dist/chunk-RYAFBNES.js +0 -33
- package/dist/chunk-T5RPGCCM.js +0 -40
- package/dist/store-XB3ADT65.js +0 -144
package/dist/chunk-T5RPGCCM.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
loadProjectConfig
|
|
4
|
-
} from "./chunk-LFIKMVY7.js";
|
|
5
|
-
import {
|
|
6
|
-
loadGlobalConfig,
|
|
7
|
-
resolveGlobalRoot
|
|
8
|
-
} from "./chunk-RYAFBNES.js";
|
|
9
|
-
|
|
10
|
-
// src/store/info-ops.ts
|
|
11
|
-
function whoami(globalRoot = resolveGlobalRoot()) {
|
|
12
|
-
const config = loadGlobalConfig(globalRoot);
|
|
13
|
-
if (config === null) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
uid: config.uid,
|
|
18
|
-
stores: config.stores.map((s) => ({
|
|
19
|
-
alias: s.alias,
|
|
20
|
-
store_uuid: s.store_uuid,
|
|
21
|
-
local_only: s.remote === void 0
|
|
22
|
-
}))
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function projectStatus(projectRoot, globalRoot = resolveGlobalRoot()) {
|
|
26
|
-
const global = loadGlobalConfig(globalRoot);
|
|
27
|
-
const project = loadProjectConfig(projectRoot);
|
|
28
|
-
return {
|
|
29
|
-
uid: global?.uid ?? null,
|
|
30
|
-
mounted: (global?.stores ?? []).map((s) => s.alias),
|
|
31
|
-
project_id: project?.project_id ?? null,
|
|
32
|
-
required: (project?.required_stores ?? []).map((r) => r.id),
|
|
33
|
-
active_write_store: project?.active_write_store ?? null
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
whoami,
|
|
39
|
-
projectStatus
|
|
40
|
-
};
|
package/dist/store-XB3ADT65.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
assertStoreMountable,
|
|
4
|
-
storeAdd,
|
|
5
|
-
storeBind,
|
|
6
|
-
storeCreate,
|
|
7
|
-
storeExplain,
|
|
8
|
-
storeList,
|
|
9
|
-
storeRemove,
|
|
10
|
-
storeSwitchWrite
|
|
11
|
-
} from "./chunk-4R2CYEA4.js";
|
|
12
|
-
import {
|
|
13
|
-
regenerateBindingsSnapshot
|
|
14
|
-
} from "./chunk-WU6GAPKH.js";
|
|
15
|
-
import "./chunk-L4Q55UC4.js";
|
|
16
|
-
import {
|
|
17
|
-
getProjectTranslator
|
|
18
|
-
} from "./chunk-2CY4BMTH.js";
|
|
19
|
-
import "./chunk-LFIKMVY7.js";
|
|
20
|
-
import "./chunk-RYAFBNES.js";
|
|
21
|
-
|
|
22
|
-
// src/commands/store.ts
|
|
23
|
-
import { defineCommand } from "citty";
|
|
24
|
-
var listCommand = defineCommand({
|
|
25
|
-
meta: { name: "list", description: "List mounted knowledge stores" },
|
|
26
|
-
run() {
|
|
27
|
-
const t = getProjectTranslator();
|
|
28
|
-
const stores = storeList();
|
|
29
|
-
if (stores.length === 0) {
|
|
30
|
-
console.log(t("cli.store.none-mounted"));
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const localOnly = t("cli.shared.local-only");
|
|
34
|
-
for (const store of stores) {
|
|
35
|
-
console.log(`${store.alias} ${store.store_uuid} ${store.remote ?? localOnly}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
var addCommand = defineCommand({
|
|
40
|
-
meta: { name: "add", description: "Mount a knowledge store into the global registry" },
|
|
41
|
-
args: {
|
|
42
|
-
uuid: { type: "string", required: true, description: "Intrinsic store UUID" },
|
|
43
|
-
alias: { type: "string", required: true, description: "Local alias for this store" },
|
|
44
|
-
remote: { type: "string", description: "Git remote locator (omit for local-only)" }
|
|
45
|
-
},
|
|
46
|
-
run({ args }) {
|
|
47
|
-
assertStoreMountable(args.uuid);
|
|
48
|
-
const store = args.remote === void 0 ? { store_uuid: args.uuid, alias: args.alias } : { store_uuid: args.uuid, alias: args.alias, remote: args.remote };
|
|
49
|
-
const next = storeAdd(store);
|
|
50
|
-
console.log(
|
|
51
|
-
getProjectTranslator()("cli.store.mounted", {
|
|
52
|
-
alias: args.alias,
|
|
53
|
-
count: String(next.stores.length)
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
var createCommand = defineCommand({
|
|
59
|
-
meta: { name: "create", description: "Create a brand-new local knowledge store and mount it" },
|
|
60
|
-
args: {
|
|
61
|
-
alias: { type: "string", required: true, description: "Local alias for the new store" },
|
|
62
|
-
remote: { type: "string", description: "Git remote to associate (push target; optional)" }
|
|
63
|
-
},
|
|
64
|
-
run({ args }) {
|
|
65
|
-
const result = storeCreate(args.alias, (/* @__PURE__ */ new Date()).toISOString(), {
|
|
66
|
-
...args.remote === void 0 ? {} : { remote: args.remote }
|
|
67
|
-
});
|
|
68
|
-
const t = getProjectTranslator();
|
|
69
|
-
console.log(
|
|
70
|
-
t("cli.store.created", { alias: args.alias, uuid: result.store_uuid, dir: result.storeDir }) + (args.remote === void 0 ? `
|
|
71
|
-
${t("cli.store.created-local-hint")}` : "")
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
var removeCommand = defineCommand({
|
|
76
|
-
meta: { name: "remove", description: "Detach a store from the registry (does NOT delete it)" },
|
|
77
|
-
args: {
|
|
78
|
-
alias: { type: "positional", required: true, description: "Alias to detach" }
|
|
79
|
-
},
|
|
80
|
-
run({ args }) {
|
|
81
|
-
const { detached } = storeRemove(args.alias);
|
|
82
|
-
const t = getProjectTranslator();
|
|
83
|
-
console.log(
|
|
84
|
-
detached === null ? t("cli.store.no-alias", { alias: args.alias }) : t("cli.store.detached", { alias: args.alias })
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
var explainCommand = defineCommand({
|
|
89
|
-
meta: { name: "explain", description: "Explain how a store alias resolves" },
|
|
90
|
-
args: {
|
|
91
|
-
alias: { type: "positional", required: true, description: "Alias to explain" }
|
|
92
|
-
},
|
|
93
|
-
run({ args }) {
|
|
94
|
-
const explanation = storeExplain(args.alias);
|
|
95
|
-
console.log(
|
|
96
|
-
explanation === null ? getProjectTranslator()("cli.store.no-alias", { alias: args.alias }) : JSON.stringify(explanation, null, 2)
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
var bindCommand = defineCommand({
|
|
101
|
-
meta: { name: "bind", description: "Declare a required store on this project's config" },
|
|
102
|
-
args: {
|
|
103
|
-
id: { type: "positional", required: true, description: "Store alias/UUID to require" },
|
|
104
|
-
remote: { type: "string", description: "Suggested remote for clone onboarding" }
|
|
105
|
-
},
|
|
106
|
-
run({ args }) {
|
|
107
|
-
const entry = args.remote === void 0 ? { id: args.id } : { id: args.id, suggested_remote: args.remote };
|
|
108
|
-
const projectRoot = process.cwd();
|
|
109
|
-
const next = storeBind(projectRoot, entry);
|
|
110
|
-
console.log(
|
|
111
|
-
getProjectTranslator(projectRoot)("cli.store.bound", {
|
|
112
|
-
id: args.id,
|
|
113
|
-
count: String(next.required_stores?.length ?? 0)
|
|
114
|
-
})
|
|
115
|
-
);
|
|
116
|
-
regenerateBindingsSnapshot(projectRoot, { now: (/* @__PURE__ */ new Date()).toISOString() });
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
var switchWriteCommand = defineCommand({
|
|
120
|
-
meta: { name: "switch-write", description: "Set the active write store for non-personal scopes" },
|
|
121
|
-
args: {
|
|
122
|
-
alias: { type: "positional", required: true, description: "Alias of the store to write to" }
|
|
123
|
-
},
|
|
124
|
-
run({ args }) {
|
|
125
|
-
const projectRoot = process.cwd();
|
|
126
|
-
storeSwitchWrite(projectRoot, args.alias);
|
|
127
|
-
console.log(getProjectTranslator(projectRoot)("cli.store.switch-write", { alias: args.alias }));
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
var store_default = defineCommand({
|
|
131
|
-
meta: { name: "store", description: "Manage mounted Fabric knowledge stores" },
|
|
132
|
-
subCommands: {
|
|
133
|
-
list: listCommand,
|
|
134
|
-
create: createCommand,
|
|
135
|
-
add: addCommand,
|
|
136
|
-
remove: removeCommand,
|
|
137
|
-
explain: explainCommand,
|
|
138
|
-
bind: bindCommand,
|
|
139
|
-
"switch-write": switchWriteCommand
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
export {
|
|
143
|
-
store_default as default
|
|
144
|
-
};
|