@fenglimg/fabric-shared 2.0.0-rc.22 → 2.0.0-rc.23
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-GDYPVGWT.js +671 -0
- package/dist/{chunk-VKCXD6CI.js → chunk-GYIALPMW.js} +21 -2
- package/dist/{chunk-BEABJYVL.js → chunk-IP6VWOVE.js} +6 -5
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +159 -9
- package/dist/index.js +70 -21
- package/dist/schemas/api-contracts.d.ts +270 -238
- package/dist/schemas/api-contracts.js +1 -7
- package/dist/templates/bootstrap-canonical.d.ts +1 -1
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WK4WINAZ.js +0 -633
|
@@ -114,13 +114,16 @@ var enMessages = {
|
|
|
114
114
|
"doctor.cite.dismissed.not-applicable": "Not applicable",
|
|
115
115
|
"doctor.cite.dismissed.other": "Other",
|
|
116
116
|
"doctor.cite.dismissed.unspecified": "Unspecified",
|
|
117
|
+
"doctor.cite.section.noneReasons": "KB: none reasons",
|
|
118
|
+
"doctor.cite.none.no-relevant": "No relevant entry",
|
|
119
|
+
"doctor.cite.none.not-applicable": "Not applicable",
|
|
120
|
+
"doctor.cite.none.unspecified": "Unspecified",
|
|
117
121
|
"doctor.cite.status.skipped": "Cite policy not yet activated for this workspace.",
|
|
118
122
|
"cli.doctor.args.target.description": "Target project path. Defaults to --target, then EXTERNAL_FIXTURE_PATH, then cwd.",
|
|
119
123
|
"cli.doctor.args.fix.description": "Repair derived Fabric state (meta + indexes).",
|
|
120
124
|
"cli.doctor.args.json.description": "Print the doctor report as JSON.",
|
|
121
125
|
"cli.doctor.args.strict.description": "Treat warnings as failures.",
|
|
122
126
|
"cli.doctor.args.fix-knowledge.description": "Apply knowledge lint mutations: demote orphaned canonical entries, archive stale drafts, and bump drifted index counters. Default doctor run remains report-only.",
|
|
123
|
-
"cli.doctor.args.rescan.description": "Re-run the init scan to rebuild .fabric/agents.meta.json forensic state before doctor checks.",
|
|
124
127
|
"cli.doctor.args.yes.description": "Skip the --fix-knowledge safety confirm. Required for non-tty invocations unless FABRIC_NONINTERACTIVE=1 is set in the environment.",
|
|
125
128
|
"cli.doctor.errors.fix-knowledge-fix-mutually-exclusive": "--fix-knowledge and --fix cannot be combined. --fix-knowledge mutates user knowledge state (demote/archive); --fix repairs derived state (meta/index). Run them separately.",
|
|
126
129
|
// rc.20 TASK-05: --cite-coverage report flags. Read-only; mutually exclusive with --fix/--fix-knowledge.
|
|
@@ -130,6 +133,13 @@ var enMessages = {
|
|
|
130
133
|
"cli.doctor.errors.cite-coverage-mutex": "--cite-coverage cannot be combined with --fix or --fix-knowledge",
|
|
131
134
|
"cli.doctor.errors.invalid-since": "Invalid --since value: {input}. Expected duration like 7d, 24h, 30m or epoch ms.",
|
|
132
135
|
"cli.doctor.errors.invalid-client": "Invalid --client value: {input}. Expected cc, codex, cursor, or all.",
|
|
136
|
+
// rc.23 TASK-007 (a-C2): --enrich-descriptions flag set. Back-fills the
|
|
137
|
+
// four description-grade frontmatter fields on canonical knowledge entries.
|
|
138
|
+
"cli.doctor.args.enrich-descriptions.description": "Back-fill missing intent_clues / tech_stack / impact / must_read_if on canonical knowledge entries (read-only by default; pair with --auto to write stubs).",
|
|
139
|
+
"cli.doctor.args.auto.description": "With --enrich-descriptions: write deterministic stub values for missing fields. Without --auto, the run is read-only.",
|
|
140
|
+
"cli.doctor.args.dry-run.description": "With --enrich-descriptions --auto: preview the would-be changes without writing to disk.",
|
|
141
|
+
"cli.doctor.errors.enrich-descriptions-mutex": "--enrich-descriptions cannot be combined with --fix, --fix-knowledge, or --cite-coverage. Run them separately.",
|
|
142
|
+
"doctor.enrich.allComplete": "All canonical knowledge entries already declare intent_clues / tech_stack / impact / must_read_if.",
|
|
133
143
|
"cli.hooks.description": "Manage Fabric Git hook templates.",
|
|
134
144
|
"cli.hooks.install.description": "Install the Fabric Husky pre-commit hook template.",
|
|
135
145
|
"cli.hooks.install.args.target.description": "Target project path, default is the current working directory.",
|
|
@@ -654,13 +664,16 @@ var zhCNMessages = {
|
|
|
654
664
|
"doctor.cite.dismissed.not-applicable": "\u4E0D\u9002\u7528",
|
|
655
665
|
"doctor.cite.dismissed.other": "\u5176\u4ED6",
|
|
656
666
|
"doctor.cite.dismissed.unspecified": "\u672A\u6CE8\u660E",
|
|
667
|
+
"doctor.cite.section.noneReasons": "KB: none \u539F\u56E0\u5206\u5E03",
|
|
668
|
+
"doctor.cite.none.no-relevant": "\u5DF2\u67E5\u65E0\u53EF\u7528",
|
|
669
|
+
"doctor.cite.none.not-applicable": "\u4E0D\u5728\u8303\u56F4",
|
|
670
|
+
"doctor.cite.none.unspecified": "\u672A\u6CE8\u660E",
|
|
657
671
|
"doctor.cite.status.skipped": "\u672C\u5DE5\u4F5C\u533A Cite policy \u5C1A\u672A\u6FC0\u6D3B\u3002",
|
|
658
672
|
"cli.doctor.args.target.description": "\u76EE\u6807\u9879\u76EE\u8DEF\u5F84\u3002\u9ED8\u8BA4\u4F9D\u6B21\u4F7F\u7528 --target\u3001EXTERNAL_FIXTURE_PATH\u3001\u5F53\u524D\u76EE\u5F55\u3002",
|
|
659
673
|
"cli.doctor.args.fix.description": "\u4FEE\u590D Fabric \u6D3E\u751F\u72B6\u6001\uFF08meta + \u7D22\u5F15\uFF09\u3002",
|
|
660
674
|
"cli.doctor.args.json.description": "\u4EE5 JSON \u8F93\u51FA doctor \u62A5\u544A\u3002",
|
|
661
675
|
"cli.doctor.args.strict.description": "\u5C06 warning \u4E5F\u89C6\u4E3A\u5931\u8D25\u3002",
|
|
662
676
|
"cli.doctor.args.fix-knowledge.description": "\u5E94\u7528\u77E5\u8BC6\u5E93 lint \u53D8\u66F4\uFF1A\u964D\u7EA7\u5B64\u7ACB\u7684\u89C4\u8303\u6761\u76EE\u3001\u5F52\u6863\u9648\u65E7 draft\u3001\u4FEE\u6B63\u6F02\u79FB\u7684\u7D22\u5F15\u8BA1\u6570\u5668\u3002\u9ED8\u8BA4 doctor \u8FD0\u884C\u4ECD\u7136\u53EA\u8BFB\u3002",
|
|
663
|
-
"cli.doctor.args.rescan.description": "\u5728 doctor \u68C0\u67E5\u4E4B\u524D\u91CD\u65B0\u8FD0\u884C init scan\uFF0C\u4EE5\u91CD\u5EFA .fabric/agents.meta.json \u7684\u53D6\u8BC1\u72B6\u6001\u3002",
|
|
664
677
|
"cli.doctor.args.yes.description": "\u8DF3\u8FC7 --fix-knowledge \u7684\u5B89\u5168\u786E\u8BA4\uFF1B\u975E tty \u8C03\u7528\u5FC5\u987B\u663E\u5F0F\u8BBE\u7F6E\u8BE5\u6807\u8BB0\uFF0C\u6216\u5728\u73AF\u5883\u53D8\u91CF\u4E2D\u8BBE\u7F6E FABRIC_NONINTERACTIVE=1\u3002",
|
|
665
678
|
"cli.doctor.errors.fix-knowledge-fix-mutually-exclusive": "--fix-knowledge \u4E0E --fix \u4E0D\u53EF\u540C\u65F6\u4F7F\u7528\u3002--fix-knowledge \u4FEE\u6539\u7528\u6237\u77E5\u8BC6\u72B6\u6001\uFF08\u964D\u7EA7/\u5F52\u6863\uFF09\uFF1B--fix \u4FEE\u590D\u6D3E\u751F\u72B6\u6001\uFF08meta/\u7D22\u5F15\uFF09\u3002\u8BF7\u5206\u522B\u8FD0\u884C\u3002",
|
|
666
679
|
// rc.20 TASK-05: --cite-coverage 报告参数;只读,与 --fix/--fix-knowledge 互斥。
|
|
@@ -670,6 +683,12 @@ var zhCNMessages = {
|
|
|
670
683
|
"cli.doctor.errors.cite-coverage-mutex": "--cite-coverage \u4E0D\u80FD\u4E0E --fix \u6216 --fix-knowledge \u540C\u65F6\u4F7F\u7528",
|
|
671
684
|
"cli.doctor.errors.invalid-since": "--since \u53D6\u503C\u65E0\u6548: {input}\u3002\u9884\u671F\u683C\u5F0F 7d / 24h / 30m \u6216 epoch ms\u3002",
|
|
672
685
|
"cli.doctor.errors.invalid-client": "--client \u53D6\u503C\u65E0\u6548: {input}\u3002\u9884\u671F cc / codex / cursor / all\u3002",
|
|
686
|
+
// rc.23 TASK-007 (a-C2): --enrich-descriptions 回填四个 description 字段。
|
|
687
|
+
"cli.doctor.args.enrich-descriptions.description": "\u56DE\u586B\u6B63\u5F0F\u77E5\u8BC6\u6761\u76EE\u7F3A\u5931\u7684 intent_clues / tech_stack / impact / must_read_if \u5B57\u6BB5\uFF08\u9ED8\u8BA4\u53EA\u8BFB;\u642D\u914D --auto \u5199\u5165 stub\uFF09\u3002",
|
|
688
|
+
"cli.doctor.args.auto.description": "\u4E0E --enrich-descriptions \u642D\u914D\uFF1A\u4E3A\u7F3A\u5931\u5B57\u6BB5\u5199\u5165\u786E\u5B9A\u6027 stub \u503C\u3002\u4E0D\u52A0 --auto \u4EC5\u505A\u53EA\u8BFB\u626B\u63CF\u3002",
|
|
689
|
+
"cli.doctor.args.dry-run.description": "\u4E0E --enrich-descriptions --auto \u642D\u914D\uFF1A\u4EC5\u9884\u89C8\u6539\u52A8\u8BA1\u5212,\u4E0D\u5199\u5165\u78C1\u76D8\u3002",
|
|
690
|
+
"cli.doctor.errors.enrich-descriptions-mutex": "--enrich-descriptions \u4E0D\u80FD\u4E0E --fix / --fix-knowledge / --cite-coverage \u540C\u65F6\u4F7F\u7528,\u8BF7\u5206\u522B\u8FD0\u884C\u3002",
|
|
691
|
+
"doctor.enrich.allComplete": "\u6240\u6709\u6B63\u5F0F\u77E5\u8BC6\u6761\u76EE\u5747\u5DF2\u5305\u542B intent_clues / tech_stack / impact / must_read_if\u3002",
|
|
673
692
|
"cli.hooks.description": "\u7BA1\u7406 Fabric Git \u94A9\u5B50\u6A21\u677F\u3002",
|
|
674
693
|
"cli.hooks.install.description": "\u5B89\u88C5 Fabric Husky pre-commit \u94A9\u5B50\u6A21\u677F\u3002",
|
|
675
694
|
"cli.hooks.install.args.target.description": "\u76EE\u6807\u9879\u76EE\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u3002",
|
|
@@ -10,22 +10,23 @@ var BOOTSTRAP_CANONICAL = `# Fabric Bootstrap
|
|
|
10
10
|
\u672C\u9879\u76EE\u4F7F\u7528 Fabric \u7BA1\u7406\u8DE8\u5BA2\u6237\u7AEF AI \u77E5\u8BC6\u4E0E\u884C\u4E3A\u89C4\u5219\u3002\u672C\u6587\u4EF6\u7531 \`fab install\` \u540C\u6B65\u5230\u4E09\u7AEF managed block,**\u4E0D\u8981\u624B\u52A8\u7F16\u8F91\u4E09\u7AEF\u7684 block**,\u53EA\u6539\u8FD9\u91CC + \u91CD\u8DD1 \`fab install\`\u3002
|
|
11
11
|
|
|
12
12
|
## \u884C\u4E3A\u89C4\u5219
|
|
13
|
-
- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\
|
|
13
|
+
- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\u4E24\u6B65\u8C03\u7528\u2014\u2014\u5148 \`fab_plan_context(paths=[<\u88AB\u6539\u6587\u4EF6>])\` \u62FF\u5230 \`selection_token\` \u4E0E\u5019\u9009 \`entries\`(\u6311 \`selectable===true\` \u7684 \`stable_id\`),\u518D \`fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>...] })\` \u53D6\u89C4\u5219\u6B63\u6587\u3002
|
|
14
14
|
- **\`.fabric/agents.meta.json\` \u4E25\u7981\u624B\u52A8\u7F16\u8F91**;engine \u4F1A\u81EA\u52A8\u540C\u6B65\u6D3E\u751F\u72B6\u6001,\u663E\u5F0F reconcile \u8DD1 \`fab doctor --fix\`\u3002
|
|
15
15
|
|
|
16
16
|
## \u77E5\u8BC6\u5E93(KB)
|
|
17
17
|
- **Discovery**:SessionStart hook \u5217 broad-scoped \u6761\u76EE;edit \u6587\u4EF6\u65F6 PreToolUse hook \u53EF\u80FD\u89E6\u53D1 narrow hint\u3002
|
|
18
|
-
- **Usage**:\
|
|
18
|
+
- **Usage**:\u4E24\u6B65\u5F0F\u2014\u2014\`fab_plan_context(paths=[...])\` \u8FD4\u56DE \`selection_token\` + \u5019\u9009 entries,\u518D \`fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>...] })\` \u62C9\u5168\u6587;\`selection_token\` \u5FC5\u987B\u6765\u81EA\u6700\u8FD1\u4E00\u6B21 \`fab_plan_context\`,\u4E0D\u53EF\u51ED\u7A7A\u7F16\u9020\u3002
|
|
19
19
|
- **Write flows**:\`fabric-archive\` / \`fabric-review\` / \`fabric-import\` \u4E09\u4E2A Skills\u3002
|
|
20
20
|
- **Language**:\u6E32\u67D3\u6309 \`.fabric/fabric-config.json\` \u7684 \`fabric_language\` \u5B57\u6BB5\u3002
|
|
21
21
|
|
|
22
22
|
## Cite policy
|
|
23
23
|
|
|
24
|
-
- **\u89E6\u53D1**: \u505A edit / decide / propose plan \u4E4B\u524D,**\u56DE\u590D\u9996\u884C**\u5FC5\u987B\u5199 \`KB: <id> (<\u22648\u5B57 \u7528\u6CD5>) [planned|recalled|chained-from <id>|dismissed:<reason>]\` \u6216 \`KB: none\`\u3002
|
|
25
|
-
- **\`[recalled]\` \u9A8C\u8BC1**: \u5FC5\u987B\u7D27\u8DDF\
|
|
24
|
+
- **\u89E6\u53D1**: \u505A edit / decide / propose plan \u4E4B\u524D,**\u56DE\u590D\u9996\u884C**\u5FC5\u987B\u5199 \`KB: <id> (<\u22648\u5B57 \u7528\u6CD5>) [planned|recalled|chained-from <id>|dismissed:<reason>]\` \u6216 \`KB: none [<reason>]\`\u3002
|
|
25
|
+
- **\`[recalled]\` \u9A8C\u8BC1**: \u5FC5\u987B\u7D27\u8DDF\u4E24\u6B65\u8C03\u7528\u2014\u2014\u5148 \`fab_plan_context(paths=[...])\` \u62FF \`selection_token\`,\u518D \`fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>] })\`,\u9632\u6B62\u7F16\u9020 id\u3002
|
|
26
26
|
- **\u7528\u6237\u53E3\u5934\u63D0\u89C4\u5219\u6CA1\u7ED9 id**: \u5148\u8C03 \`fab_extract_knowledge\` \u6216 \`search_context\` \u53CD\u67E5\u3002
|
|
27
27
|
- **dismissed reason**: \u679A\u4E3E \`scope-mismatch | outdated | not-applicable | other:<text>\`\u3002
|
|
28
|
-
-
|
|
28
|
+
- **\`KB: none\` sentinel**: \u679A\u4E3E\u4E24\u79CD\u5408\u89C4\u7406\u7531\u2014\u2014\`[no-relevant]\` \u5DF2\u8C03 \`fab_plan_context\`(\u6216 hook \u8F93\u51FA\u53EF\u89C1)\u4F46\u65E0\u53EF\u7528\u6761\u76EE;\`[not-applicable]\` \u5F53\u524D\u52A8\u4F5C\u4E0D\u5728 cite \u8303\u56F4(\u7EAF\u63A2\u7D22 / Bash \u53EA\u8BFB / \u7528\u6237\u95EE\u7B54)\u3002\u88F8 \`KB: none\`(\u65E0\u540E\u7F00)\u4ECD\u7136 valid,\u5F52\u7C7B\u4E3A \`[unspecified]\`(legacy \u517C\u5BB9,\u9F13\u52B1\u540E\u7EED\u8865\u6CE8)\u3002
|
|
29
|
+
- **\u7A3D\u6838**: \`fab doctor --cite-coverage [--since=7d] [--client=cc|codex|all]\` \u8F93\u51FA cite \u8986\u76D6\u7387,\u542B \`KB: none\` sentinel \u62C6\u5206\u3002\u672C\u89C4\u5219\u4E0D\u963B\u65AD\u4F60\u5DE5\u4F5C,\u53EA\u8BB0\u5F55\u3002
|
|
29
30
|
`;
|
|
30
31
|
|
|
31
32
|
export {
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,14 @@ export { AgentsActivationTier, AgentsMetaCountersEnvelope, AgentsMetaKnowledgeTy
|
|
|
3
3
|
export { Locale, Messages, PROTECTED_TOKENS, ProtectedToken, TranslationKey, Translator, createTranslator, defaultMessages, detectNodeLocale, enMessages, normalizeLocale, zhCNMessages } from './i18n/index.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { Layer, KnowledgeType, StableId } from './schemas/api-contracts.js';
|
|
6
|
-
export { FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, FabReviewInput, FabReviewInputSchema, FabReviewInputShape, FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, KnowledgeTypeCode, KnowledgeTypeSchema, LayerSchema, Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, ProposedReason, ProposedReasonSchema, StableIdSchema, annotateIntentRequestSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId,
|
|
6
|
+
export { FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, FabReviewInput, FabReviewInputSchema, FabReviewInputShape, FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, KnowledgeTypeCode, KnowledgeTypeSchema, LayerSchema, Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, ProposedReason, ProposedReasonSchema, StableIdSchema, annotateIntentRequestSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, structuredWarningSchema } from './schemas/api-contracts.js';
|
|
7
7
|
export { BOOTSTRAP_CANONICAL, BOOTSTRAP_MARKER_BEGIN, BOOTSTRAP_MARKER_END, BOOTSTRAP_REGEX, LEGACY_KB_MARKER_BEGIN, LEGACY_KB_MARKER_END, LEGACY_KB_REGEX } from './templates/bootstrap-canonical.js';
|
|
8
8
|
|
|
9
|
+
declare const ONBOARD_SLOT_NAMES: readonly ["tech-stack-decision", "architecture-pattern", "code-style-tone", "build-system-idiom", "domain-vocabulary"];
|
|
10
|
+
type OnboardSlot = (typeof ONBOARD_SLOT_NAMES)[number];
|
|
11
|
+
declare const onboardSlotSchema: z.ZodEnum<["tech-stack-decision", "architecture-pattern", "code-style-tone", "build-system-idiom", "domain-vocabulary"]>;
|
|
12
|
+
declare const ONBOARD_SLOT_TOTAL: 5;
|
|
13
|
+
|
|
9
14
|
declare const AGENTS_META_LAYERS: readonly ["L0", "L1", "L2"];
|
|
10
15
|
declare const AGENTS_META_TOPOLOGY_TYPES: readonly ["mirror", "cross-cutting", "domain", "local", "global"];
|
|
11
16
|
declare const AGENTS_META_IDENTITY_SOURCES: readonly ["declared", "derived"];
|
|
@@ -1388,6 +1393,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
1388
1393
|
review_topic_result_cap: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1389
1394
|
review_stale_pending_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1390
1395
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
1396
|
+
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1391
1397
|
}, "strip", z.ZodTypeAny, {
|
|
1392
1398
|
fabric_language: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
|
|
1393
1399
|
default_layer_filter: "personal" | "team" | "both";
|
|
@@ -1409,6 +1415,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
1409
1415
|
archive_digest_max_sessions: number;
|
|
1410
1416
|
review_topic_result_cap: number;
|
|
1411
1417
|
review_stale_pending_days: number;
|
|
1418
|
+
onboard_slots_opted_out: string[];
|
|
1412
1419
|
clientPaths?: {
|
|
1413
1420
|
claudeCodeCLI?: string | undefined;
|
|
1414
1421
|
claudeCodeDesktop?: string | undefined;
|
|
@@ -1456,6 +1463,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
1456
1463
|
review_topic_result_cap?: number | undefined;
|
|
1457
1464
|
review_stale_pending_days?: number | undefined;
|
|
1458
1465
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
1466
|
+
onboard_slots_opted_out?: string[] | undefined;
|
|
1459
1467
|
}>;
|
|
1460
1468
|
|
|
1461
1469
|
type FabricConfigSchemaShape = z.infer<typeof fabricConfigSchema>;
|
|
@@ -5472,7 +5480,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
|
|
|
5472
5480
|
event_type: z.ZodLiteral<"meta_reconciled">;
|
|
5473
5481
|
reconciled_files: z.ZodArray<z.ZodString, "many">;
|
|
5474
5482
|
duration_ms: z.ZodNumber;
|
|
5475
|
-
trigger: z.ZodEnum<["doctor", "manual"]>;
|
|
5483
|
+
trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description"]>;
|
|
5476
5484
|
source: z.ZodLiteral<"reconcileKnowledge">;
|
|
5477
5485
|
force_write_reason: z.ZodOptional<z.ZodEnum<["revision_drift"]>>;
|
|
5478
5486
|
kind: z.ZodLiteral<"fabric-event">;
|
|
@@ -5490,7 +5498,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
|
|
|
5490
5498
|
event_type: "meta_reconciled";
|
|
5491
5499
|
reconciled_files: string[];
|
|
5492
5500
|
duration_ms: number;
|
|
5493
|
-
trigger: "manual" | "doctor";
|
|
5501
|
+
trigger: "manual" | "doctor" | "auto-heal-description";
|
|
5494
5502
|
correlation_id?: string | undefined;
|
|
5495
5503
|
session_id?: string | undefined;
|
|
5496
5504
|
force_write_reason?: "revision_drift" | undefined;
|
|
@@ -5503,7 +5511,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
|
|
|
5503
5511
|
event_type: "meta_reconciled";
|
|
5504
5512
|
reconciled_files: string[];
|
|
5505
5513
|
duration_ms: number;
|
|
5506
|
-
trigger: "manual" | "doctor";
|
|
5514
|
+
trigger: "manual" | "doctor" | "auto-heal-description";
|
|
5507
5515
|
correlation_id?: string | undefined;
|
|
5508
5516
|
session_id?: string | undefined;
|
|
5509
5517
|
force_write_reason?: "revision_drift" | undefined;
|
|
@@ -6385,6 +6393,77 @@ declare const knowledgeMetaAutoHealedEventSchema: z.ZodObject<{
|
|
|
6385
6393
|
session_id?: string | undefined;
|
|
6386
6394
|
caller?: "planContext" | "getKnowledgeSections" | "getKnowledge" | "extractKnowledge" | undefined;
|
|
6387
6395
|
}>;
|
|
6396
|
+
declare const serveLockClearedEventSchema: z.ZodObject<{
|
|
6397
|
+
event_type: z.ZodLiteral<"serve_lock_cleared">;
|
|
6398
|
+
pid: z.ZodNumber;
|
|
6399
|
+
age_ms: z.ZodNumber;
|
|
6400
|
+
timestamp: z.ZodString;
|
|
6401
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
6402
|
+
id: z.ZodString;
|
|
6403
|
+
ts: z.ZodNumber;
|
|
6404
|
+
schema_version: z.ZodLiteral<1>;
|
|
6405
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
6406
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
6407
|
+
}, "strip", z.ZodTypeAny, {
|
|
6408
|
+
id: string;
|
|
6409
|
+
ts: number;
|
|
6410
|
+
schema_version: 1;
|
|
6411
|
+
kind: "fabric-event";
|
|
6412
|
+
event_type: "serve_lock_cleared";
|
|
6413
|
+
timestamp: string;
|
|
6414
|
+
pid: number;
|
|
6415
|
+
age_ms: number;
|
|
6416
|
+
correlation_id?: string | undefined;
|
|
6417
|
+
session_id?: string | undefined;
|
|
6418
|
+
}, {
|
|
6419
|
+
id: string;
|
|
6420
|
+
ts: number;
|
|
6421
|
+
schema_version: 1;
|
|
6422
|
+
kind: "fabric-event";
|
|
6423
|
+
event_type: "serve_lock_cleared";
|
|
6424
|
+
timestamp: string;
|
|
6425
|
+
pid: number;
|
|
6426
|
+
age_ms: number;
|
|
6427
|
+
correlation_id?: string | undefined;
|
|
6428
|
+
session_id?: string | undefined;
|
|
6429
|
+
}>;
|
|
6430
|
+
declare const knowledgeEnrichedEventSchema: z.ZodObject<{
|
|
6431
|
+
event_type: z.ZodLiteral<"knowledge_enriched">;
|
|
6432
|
+
path: z.ZodString;
|
|
6433
|
+
added_fields: z.ZodArray<z.ZodEnum<["intent_clues", "tech_stack", "impact", "must_read_if"]>, "many">;
|
|
6434
|
+
mode: z.ZodEnum<["auto", "interactive"]>;
|
|
6435
|
+
timestamp: z.ZodString;
|
|
6436
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
6437
|
+
id: z.ZodString;
|
|
6438
|
+
ts: z.ZodNumber;
|
|
6439
|
+
schema_version: z.ZodLiteral<1>;
|
|
6440
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
6441
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
6442
|
+
}, "strip", z.ZodTypeAny, {
|
|
6443
|
+
path: string;
|
|
6444
|
+
id: string;
|
|
6445
|
+
ts: number;
|
|
6446
|
+
schema_version: 1;
|
|
6447
|
+
kind: "fabric-event";
|
|
6448
|
+
event_type: "knowledge_enriched";
|
|
6449
|
+
timestamp: string;
|
|
6450
|
+
mode: "auto" | "interactive";
|
|
6451
|
+
added_fields: ("intent_clues" | "tech_stack" | "impact" | "must_read_if")[];
|
|
6452
|
+
correlation_id?: string | undefined;
|
|
6453
|
+
session_id?: string | undefined;
|
|
6454
|
+
}, {
|
|
6455
|
+
path: string;
|
|
6456
|
+
id: string;
|
|
6457
|
+
ts: number;
|
|
6458
|
+
schema_version: 1;
|
|
6459
|
+
kind: "fabric-event";
|
|
6460
|
+
event_type: "knowledge_enriched";
|
|
6461
|
+
timestamp: string;
|
|
6462
|
+
mode: "auto" | "interactive";
|
|
6463
|
+
added_fields: ("intent_clues" | "tech_stack" | "impact" | "must_read_if")[];
|
|
6464
|
+
correlation_id?: string | undefined;
|
|
6465
|
+
session_id?: string | undefined;
|
|
6466
|
+
}>;
|
|
6388
6467
|
declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.ZodObject<{
|
|
6389
6468
|
event_type: z.ZodLiteral<"knowledge_context_planned">;
|
|
6390
6469
|
target_paths: z.ZodArray<z.ZodString, "many">;
|
|
@@ -6858,7 +6937,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6858
6937
|
event_type: z.ZodLiteral<"meta_reconciled">;
|
|
6859
6938
|
reconciled_files: z.ZodArray<z.ZodString, "many">;
|
|
6860
6939
|
duration_ms: z.ZodNumber;
|
|
6861
|
-
trigger: z.ZodEnum<["doctor", "manual"]>;
|
|
6940
|
+
trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description"]>;
|
|
6862
6941
|
source: z.ZodLiteral<"reconcileKnowledge">;
|
|
6863
6942
|
force_write_reason: z.ZodOptional<z.ZodEnum<["revision_drift"]>>;
|
|
6864
6943
|
kind: z.ZodLiteral<"fabric-event">;
|
|
@@ -6876,7 +6955,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6876
6955
|
event_type: "meta_reconciled";
|
|
6877
6956
|
reconciled_files: string[];
|
|
6878
6957
|
duration_ms: number;
|
|
6879
|
-
trigger: "manual" | "doctor";
|
|
6958
|
+
trigger: "manual" | "doctor" | "auto-heal-description";
|
|
6880
6959
|
correlation_id?: string | undefined;
|
|
6881
6960
|
session_id?: string | undefined;
|
|
6882
6961
|
force_write_reason?: "revision_drift" | undefined;
|
|
@@ -6889,7 +6968,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6889
6968
|
event_type: "meta_reconciled";
|
|
6890
6969
|
reconciled_files: string[];
|
|
6891
6970
|
duration_ms: number;
|
|
6892
|
-
trigger: "manual" | "doctor";
|
|
6971
|
+
trigger: "manual" | "doctor" | "auto-heal-description";
|
|
6893
6972
|
correlation_id?: string | undefined;
|
|
6894
6973
|
session_id?: string | undefined;
|
|
6895
6974
|
force_write_reason?: "revision_drift" | undefined;
|
|
@@ -7745,6 +7824,75 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7745
7824
|
archive_path: string;
|
|
7746
7825
|
correlation_id?: string | undefined;
|
|
7747
7826
|
session_id?: string | undefined;
|
|
7827
|
+
}>, z.ZodObject<{
|
|
7828
|
+
event_type: z.ZodLiteral<"serve_lock_cleared">;
|
|
7829
|
+
pid: z.ZodNumber;
|
|
7830
|
+
age_ms: z.ZodNumber;
|
|
7831
|
+
timestamp: z.ZodString;
|
|
7832
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
7833
|
+
id: z.ZodString;
|
|
7834
|
+
ts: z.ZodNumber;
|
|
7835
|
+
schema_version: z.ZodLiteral<1>;
|
|
7836
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
7837
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
7838
|
+
}, "strip", z.ZodTypeAny, {
|
|
7839
|
+
id: string;
|
|
7840
|
+
ts: number;
|
|
7841
|
+
schema_version: 1;
|
|
7842
|
+
kind: "fabric-event";
|
|
7843
|
+
event_type: "serve_lock_cleared";
|
|
7844
|
+
timestamp: string;
|
|
7845
|
+
pid: number;
|
|
7846
|
+
age_ms: number;
|
|
7847
|
+
correlation_id?: string | undefined;
|
|
7848
|
+
session_id?: string | undefined;
|
|
7849
|
+
}, {
|
|
7850
|
+
id: string;
|
|
7851
|
+
ts: number;
|
|
7852
|
+
schema_version: 1;
|
|
7853
|
+
kind: "fabric-event";
|
|
7854
|
+
event_type: "serve_lock_cleared";
|
|
7855
|
+
timestamp: string;
|
|
7856
|
+
pid: number;
|
|
7857
|
+
age_ms: number;
|
|
7858
|
+
correlation_id?: string | undefined;
|
|
7859
|
+
session_id?: string | undefined;
|
|
7860
|
+
}>, z.ZodObject<{
|
|
7861
|
+
event_type: z.ZodLiteral<"knowledge_enriched">;
|
|
7862
|
+
path: z.ZodString;
|
|
7863
|
+
added_fields: z.ZodArray<z.ZodEnum<["intent_clues", "tech_stack", "impact", "must_read_if"]>, "many">;
|
|
7864
|
+
mode: z.ZodEnum<["auto", "interactive"]>;
|
|
7865
|
+
timestamp: z.ZodString;
|
|
7866
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
7867
|
+
id: z.ZodString;
|
|
7868
|
+
ts: z.ZodNumber;
|
|
7869
|
+
schema_version: z.ZodLiteral<1>;
|
|
7870
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
7871
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
7872
|
+
}, "strip", z.ZodTypeAny, {
|
|
7873
|
+
path: string;
|
|
7874
|
+
id: string;
|
|
7875
|
+
ts: number;
|
|
7876
|
+
schema_version: 1;
|
|
7877
|
+
kind: "fabric-event";
|
|
7878
|
+
event_type: "knowledge_enriched";
|
|
7879
|
+
timestamp: string;
|
|
7880
|
+
mode: "auto" | "interactive";
|
|
7881
|
+
added_fields: ("intent_clues" | "tech_stack" | "impact" | "must_read_if")[];
|
|
7882
|
+
correlation_id?: string | undefined;
|
|
7883
|
+
session_id?: string | undefined;
|
|
7884
|
+
}, {
|
|
7885
|
+
path: string;
|
|
7886
|
+
id: string;
|
|
7887
|
+
ts: number;
|
|
7888
|
+
schema_version: 1;
|
|
7889
|
+
kind: "fabric-event";
|
|
7890
|
+
event_type: "knowledge_enriched";
|
|
7891
|
+
timestamp: string;
|
|
7892
|
+
mode: "auto" | "interactive";
|
|
7893
|
+
added_fields: ("intent_clues" | "tech_stack" | "impact" | "must_read_if")[];
|
|
7894
|
+
correlation_id?: string | undefined;
|
|
7895
|
+
session_id?: string | undefined;
|
|
7748
7896
|
}>]>;
|
|
7749
7897
|
type KnowledgeContextPlannedEvent = z.infer<typeof knowledgeContextPlannedEventSchema>;
|
|
7750
7898
|
type KnowledgeSelectionEvent = z.infer<typeof knowledgeSelectionEventSchema>;
|
|
@@ -7783,9 +7931,11 @@ type AssistantTurnObservedEvent = z.infer<typeof assistantTurnObservedEventSchem
|
|
|
7783
7931
|
type CitePolicyActivatedEvent = z.infer<typeof citePolicyActivatedEventSchema>;
|
|
7784
7932
|
type KnowledgeMetaAutoHealedEvent = z.infer<typeof knowledgeMetaAutoHealedEventSchema>;
|
|
7785
7933
|
type EventsRotatedEvent = z.infer<typeof eventsRotatedEventSchema>;
|
|
7786
|
-
type
|
|
7934
|
+
type ServeLockClearedEvent = z.infer<typeof serveLockClearedEventSchema>;
|
|
7935
|
+
type KnowledgeEnrichedEvent = z.infer<typeof knowledgeEnrichedEventSchema>;
|
|
7936
|
+
type EventLedgerEvent = KnowledgeContextPlannedEvent | KnowledgeSelectionEvent | KnowledgeSectionsFetchedEvent | EditIntentCheckedEvent | KnowledgeDriftDetectedEvent | McpEventLedgerEvent | ReapplyCompletedEvent | EventLedgerTruncatedEvent | McpConfigMigratedEvent | BootstrapMarkerMigratedEvent | MetaReconciledOnStartupEvent | MetaReconciledEvent | ClaudeSkillPathMigratedEvent | ClaudeHookPathMigratedEvent | CodexSkillPathMigratedEvent | InitScanCompletedEvent | KnowledgeProposedEvent | KnowledgePromoteStartedEvent | KnowledgePromotedEvent | KnowledgePromoteFailedEvent | KnowledgeLayerChangedEvent | KnowledgeSlugRenamedEvent | KnowledgeDemotedEvent | KnowledgeArchivedEvent | KnowledgeArchiveAttemptedEvent | KnowledgeDeferredEvent | KnowledgeRejectedEvent | KnowledgeConsumedEvent | KnowledgeScopeDegradedEvent | PendingAutoArchivedEvent | KnowledgePathDangledEvent | DoctorRunEvent | RelevanceMigrationRunEvent | AssistantTurnObservedEvent | CitePolicyActivatedEvent | KnowledgeMetaAutoHealedEvent | EventsRotatedEvent | ServeLockClearedEvent | KnowledgeEnrichedEvent;
|
|
7787
7937
|
type EventLedgerEventType = EventLedgerEvent["event_type"];
|
|
7788
7938
|
type EventLedgerEventInputFor<T extends EventLedgerEvent> = T extends EventLedgerEvent ? Omit<T, "kind" | "id" | "ts" | "schema_version" | "correlation_id" | "session_id"> & Partial<Pick<T, "id" | "ts" | "correlation_id" | "session_id">> : never;
|
|
7789
7939
|
type EventLedgerEventInput = EventLedgerEventInputFor<EventLedgerEvent>;
|
|
7790
7940
|
|
|
7791
|
-
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type BootstrapMarkerMigratedEvent, type CandidateFileEntry, type CandidateFileFamily, type CitePolicyActivatedEvent, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type CodexSkillPathMigratedEvent, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, type FabricConfigSchemaShape, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, Layer, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type McpConfigMigratedEvent, type McpEventLedgerEvent, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, type PanelFieldGroup, type PanelFieldMeta, type PendingAutoArchivedEvent, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, StableId, type ValidateResult, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, allocateKnowledgeId, assistantTurnObservedEventSchema, auditModeSchema, bootstrapMarkerMigratedEventSchema, candidateFileEntrySchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, clientPathsSchema, codexSkillPathMigratedEventSchema, defaultAgentsMetaCounters, defaultLayerFilterSchema, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, fabricConfigSchema, fabricEventSchema, fabricLanguageSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, getPanelFieldByKey, getPanelFields, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, isKnowledgeStableId, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lockApprovedEventSchema, lockDriftEventSchema, mcpConfigMigratedEventSchema, mcpEventLedgerEventSchema, mcpPayloadLimitsSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, pendingAutoArchivedEventSchema, reapplyCompletedEventSchema, relevanceMigrationRunEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, withDerivedAgentsMetaNodeDefaults };
|
|
7941
|
+
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type BootstrapMarkerMigratedEvent, type CandidateFileEntry, type CandidateFileFamily, type CitePolicyActivatedEvent, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type CodexSkillPathMigratedEvent, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, type FabricConfigSchemaShape, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeEnrichedEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, Layer, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type McpConfigMigratedEvent, type McpEventLedgerEvent, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, ONBOARD_SLOT_NAMES, ONBOARD_SLOT_TOTAL, type OnboardSlot, type PanelFieldGroup, type PanelFieldMeta, type PendingAutoArchivedEvent, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, type ServeLockClearedEvent, StableId, type ValidateResult, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, allocateKnowledgeId, assistantTurnObservedEventSchema, auditModeSchema, bootstrapMarkerMigratedEventSchema, candidateFileEntrySchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, clientPathsSchema, codexSkillPathMigratedEventSchema, defaultAgentsMetaCounters, defaultLayerFilterSchema, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, fabricConfigSchema, fabricEventSchema, fabricLanguageSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, getPanelFieldByKey, getPanelFields, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, isKnowledgeStableId, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeEnrichedEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lockApprovedEventSchema, lockDriftEventSchema, mcpConfigMigratedEventSchema, mcpEventLedgerEventSchema, mcpPayloadLimitsSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, onboardSlotSchema, pendingAutoArchivedEventSchema, reapplyCompletedEventSchema, relevanceMigrationRunEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, serveLockClearedEventSchema, withDerivedAgentsMetaNodeDefaults };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
BOOTSTRAP_CANONICAL,
|
|
3
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
4
|
-
BOOTSTRAP_MARKER_END,
|
|
5
|
-
BOOTSTRAP_REGEX,
|
|
6
|
-
LEGACY_KB_MARKER_BEGIN,
|
|
7
|
-
LEGACY_KB_MARKER_END,
|
|
8
|
-
LEGACY_KB_REGEX
|
|
9
|
-
} from "./chunk-BEABJYVL.js";
|
|
1
|
+
import "./chunk-LXNCAKJZ.js";
|
|
10
2
|
import {
|
|
11
3
|
PROTECTED_TOKENS,
|
|
12
4
|
createTranslator,
|
|
@@ -15,7 +7,7 @@ import {
|
|
|
15
7
|
enMessages,
|
|
16
8
|
normalizeLocale,
|
|
17
9
|
zhCNMessages
|
|
18
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GYIALPMW.js";
|
|
19
11
|
import {
|
|
20
12
|
FabExtractKnowledgeInputSchema,
|
|
21
13
|
FabExtractKnowledgeInputShape,
|
|
@@ -29,6 +21,8 @@ import {
|
|
|
29
21
|
KnowledgeTypeSchema,
|
|
30
22
|
LayerSchema,
|
|
31
23
|
MaturitySchema,
|
|
24
|
+
ONBOARD_SLOT_NAMES,
|
|
25
|
+
ONBOARD_SLOT_TOTAL,
|
|
32
26
|
PROPOSED_REASON_DESCRIPTIONS,
|
|
33
27
|
ProposedReasonSchema,
|
|
34
28
|
StableIdSchema,
|
|
@@ -36,9 +30,6 @@ import {
|
|
|
36
30
|
fabExtractKnowledgeAnnotations,
|
|
37
31
|
fabReviewAnnotations,
|
|
38
32
|
formatKnowledgeId,
|
|
39
|
-
getKnowledgeAnnotations,
|
|
40
|
-
getKnowledgeInputSchema,
|
|
41
|
-
getKnowledgeOutputSchema,
|
|
42
33
|
historyStateQuerySchema,
|
|
43
34
|
humanLockApproveRequestSchema,
|
|
44
35
|
humanLockFileParamsSchema,
|
|
@@ -47,6 +38,7 @@ import {
|
|
|
47
38
|
knowledgeSectionsOutputSchema,
|
|
48
39
|
ledgerQuerySchema,
|
|
49
40
|
ledgerSourceSchema,
|
|
41
|
+
onboardSlotSchema,
|
|
50
42
|
parseKnowledgeId,
|
|
51
43
|
planContextAnnotations,
|
|
52
44
|
planContextHintNarrowEntrySchema,
|
|
@@ -54,8 +46,16 @@ import {
|
|
|
54
46
|
planContextInputSchema,
|
|
55
47
|
planContextOutputSchema,
|
|
56
48
|
structuredWarningSchema
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import
|
|
49
|
+
} from "./chunk-GDYPVGWT.js";
|
|
50
|
+
import {
|
|
51
|
+
BOOTSTRAP_CANONICAL,
|
|
52
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
53
|
+
BOOTSTRAP_MARKER_END,
|
|
54
|
+
BOOTSTRAP_REGEX,
|
|
55
|
+
LEGACY_KB_MARKER_BEGIN,
|
|
56
|
+
LEGACY_KB_MARKER_END,
|
|
57
|
+
LEGACY_KB_REGEX
|
|
58
|
+
} from "./chunk-IP6VWOVE.js";
|
|
59
59
|
|
|
60
60
|
// src/schemas/agents-meta.ts
|
|
61
61
|
import { z } from "zod";
|
|
@@ -463,7 +463,24 @@ var fabricConfigSchema = z5.object({
|
|
|
463
463
|
// Mirrors cite-policy precedent of locking enum-style numeric tunables
|
|
464
464
|
// to a small literal set (vs free `.positive()`) to prevent fat-finger
|
|
465
465
|
// misconfig.
|
|
466
|
-
fabric_event_retention_days: z5.union([z5.literal(7), z5.literal(30), z5.literal(90)]).optional()
|
|
466
|
+
fabric_event_retention_days: z5.union([z5.literal(7), z5.literal(30), z5.literal(90)]).optional(),
|
|
467
|
+
// v2.0.0-rc.23 TASK-014 (F8c): onboard slot opt-out list. Tracks slot
|
|
468
|
+
// names the user explicitly dismissed during fabric-archive's first-run
|
|
469
|
+
// onboard phase (or via `fab config dismiss-slot <slot>`). Dismissed
|
|
470
|
+
// slots are excluded from `fab onboard-coverage`'s `missing` set and the
|
|
471
|
+
// doctor `Onboard coverage` advisory's recompute, so the user is never
|
|
472
|
+
// re-prompted for slots they consciously declined.
|
|
473
|
+
//
|
|
474
|
+
// Re-opening a dismissed slot requires `fab config onboard-reset <slot>`
|
|
475
|
+
// — a deliberate two-command UX to keep the dismiss intent reversible
|
|
476
|
+
// but never silently undone. Schema is intentionally `z.array(z.string())`
|
|
477
|
+
// rather than `z.array(onboardSlotSchema)` so historical configs survive
|
|
478
|
+
// a slot rename without a Zod parse error; downstream consumers
|
|
479
|
+
// intersect against ONBOARD_SLOT_NAMES at read time.
|
|
480
|
+
//
|
|
481
|
+
// Default `[]` keeps the field optional on existing configs — fresh
|
|
482
|
+
// installs land with no opt-outs.
|
|
483
|
+
onboard_slots_opted_out: z5.array(z5.string()).optional().default([])
|
|
467
484
|
});
|
|
468
485
|
|
|
469
486
|
// src/schemas/fabric-config-introspect.ts
|
|
@@ -888,7 +905,13 @@ var metaReconciledEventSchema = z10.object({
|
|
|
888
905
|
event_type: z10.literal("meta_reconciled"),
|
|
889
906
|
reconciled_files: z10.array(z10.string()),
|
|
890
907
|
duration_ms: z10.number().int().nonnegative(),
|
|
891
|
-
|
|
908
|
+
// v2.0.0-rc.23 TASK-005 (a-B): added `auto-heal-description` trigger so the
|
|
909
|
+
// read-path plan_context handler can drive a full reconcile when it detects
|
|
910
|
+
// any node carrying `description === undefined` (legacy meta drift that the
|
|
911
|
+
// revision-hash gate cannot catch — a missing description doesn't move the
|
|
912
|
+
// revision). Symmetric to rc.22 D2 read-side auto-heal but covers the
|
|
913
|
+
// description-undefined case which the revision drift gate misses.
|
|
914
|
+
trigger: z10.enum(["doctor", "manual", "auto-heal-description"]),
|
|
892
915
|
source: z10.literal("reconcileKnowledge"),
|
|
893
916
|
// v2.0.0-rc.22 TASK-014 (Scope E): set when reconcileKnowledge forced a
|
|
894
917
|
// writeKnowledgeMeta on revision drift alone (no per-file content drift).
|
|
@@ -1080,6 +1103,21 @@ var knowledgeMetaAutoHealedEventSchema = z10.object({
|
|
|
1080
1103
|
trigger: z10.literal("read"),
|
|
1081
1104
|
caller: z10.enum(["planContext", "getKnowledgeSections", "getKnowledge", "extractKnowledge"]).optional()
|
|
1082
1105
|
});
|
|
1106
|
+
var serveLockClearedEventSchema = z10.object({
|
|
1107
|
+
...eventLedgerEnvelopeSchema,
|
|
1108
|
+
event_type: z10.literal("serve_lock_cleared"),
|
|
1109
|
+
pid: z10.number().int().nonnegative(),
|
|
1110
|
+
age_ms: z10.number().int().nonnegative(),
|
|
1111
|
+
timestamp: z10.string().datetime()
|
|
1112
|
+
});
|
|
1113
|
+
var knowledgeEnrichedEventSchema = z10.object({
|
|
1114
|
+
...eventLedgerEnvelopeSchema,
|
|
1115
|
+
event_type: z10.literal("knowledge_enriched"),
|
|
1116
|
+
path: z10.string(),
|
|
1117
|
+
added_fields: z10.array(z10.enum(["intent_clues", "tech_stack", "impact", "must_read_if"])),
|
|
1118
|
+
mode: z10.enum(["auto", "interactive"]),
|
|
1119
|
+
timestamp: z10.string().datetime()
|
|
1120
|
+
});
|
|
1083
1121
|
var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
1084
1122
|
knowledgeContextPlannedEventSchema,
|
|
1085
1123
|
knowledgeSelectionEventSchema,
|
|
@@ -1138,7 +1176,16 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1138
1176
|
// v2.0.0-rc.22 Scope A T3: events_rotated — emitted as the first line of
|
|
1139
1177
|
// the post-rotation events.jsonl when sliding-window-by-age rotation moves
|
|
1140
1178
|
// stale entries to events.archive/events-rotated-YYYY-MM-DD.jsonl.
|
|
1141
|
-
eventsRotatedEventSchema
|
|
1179
|
+
eventsRotatedEventSchema,
|
|
1180
|
+
// v2.0.0-rc.23 TASK-010 (e): serve_lock_cleared — emitted by
|
|
1181
|
+
// `fab doctor --fix` when a stale `.fabric/.serve.lock` with a dead PID is
|
|
1182
|
+
// unlinked.
|
|
1183
|
+
serveLockClearedEventSchema,
|
|
1184
|
+
// v2.0.0-rc.23 TASK-007 (a-C2): knowledge_enriched — emitted by
|
|
1185
|
+
// `fab doctor --enrich-descriptions` once per modified canonical knowledge
|
|
1186
|
+
// file when one or more of the four rc.23 description-grade frontmatter
|
|
1187
|
+
// fields is back-filled.
|
|
1188
|
+
knowledgeEnrichedEventSchema
|
|
1142
1189
|
]);
|
|
1143
1190
|
export {
|
|
1144
1191
|
AGENTS_META_IDENTITY_SOURCES,
|
|
@@ -1165,6 +1212,8 @@ export {
|
|
|
1165
1212
|
LEGACY_KB_REGEX,
|
|
1166
1213
|
LayerSchema,
|
|
1167
1214
|
MaturitySchema,
|
|
1215
|
+
ONBOARD_SLOT_NAMES,
|
|
1216
|
+
ONBOARD_SLOT_TOTAL,
|
|
1168
1217
|
PROPOSED_REASON_DESCRIPTIONS,
|
|
1169
1218
|
PROTECTED_TOKENS,
|
|
1170
1219
|
ProposedReasonSchema,
|
|
@@ -1218,9 +1267,6 @@ export {
|
|
|
1218
1267
|
forensicSamplingBudgetSchema,
|
|
1219
1268
|
forensicTopologySchema,
|
|
1220
1269
|
formatKnowledgeId,
|
|
1221
|
-
getKnowledgeAnnotations,
|
|
1222
|
-
getKnowledgeInputSchema,
|
|
1223
|
-
getKnowledgeOutputSchema,
|
|
1224
1270
|
getPanelFieldByKey,
|
|
1225
1271
|
getPanelFields,
|
|
1226
1272
|
historyStateQuerySchema,
|
|
@@ -1245,6 +1291,7 @@ export {
|
|
|
1245
1291
|
knowledgeDeferredEventSchema,
|
|
1246
1292
|
knowledgeDemotedEventSchema,
|
|
1247
1293
|
knowledgeDriftDetectedEventSchema,
|
|
1294
|
+
knowledgeEnrichedEventSchema,
|
|
1248
1295
|
knowledgeLayerChangedEventSchema,
|
|
1249
1296
|
knowledgeMetaAutoHealedEventSchema,
|
|
1250
1297
|
knowledgePathDangledEventSchema,
|
|
@@ -1276,6 +1323,7 @@ export {
|
|
|
1276
1323
|
metaReconciledOnStartupEventSchema,
|
|
1277
1324
|
metaUpdatedEventSchema,
|
|
1278
1325
|
normalizeLocale,
|
|
1326
|
+
onboardSlotSchema,
|
|
1279
1327
|
parseKnowledgeId,
|
|
1280
1328
|
pendingAutoArchivedEventSchema,
|
|
1281
1329
|
planContextAnnotations,
|
|
@@ -1287,6 +1335,7 @@ export {
|
|
|
1287
1335
|
relevanceMigrationRunEventSchema,
|
|
1288
1336
|
ruleDescriptionIndexItemSchema,
|
|
1289
1337
|
ruleDescriptionSchema,
|
|
1338
|
+
serveLockClearedEventSchema,
|
|
1290
1339
|
structuredWarningSchema,
|
|
1291
1340
|
withDerivedAgentsMetaNodeDefaults,
|
|
1292
1341
|
zhCNMessages
|