@fenglimg/fabric-shared 2.3.0-rc.6 → 2.3.0-rc.7
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-PPV5IQGX.js → chunk-CVNJCAC7.js} +22 -4
- package/dist/{chunk-P6INRP3A.js → chunk-CYOOZQBP.js} +2 -0
- package/dist/i18n/index.js +1 -1
- package/dist/{index-Ba3sXdL4.d.ts → index-B2e0wKJi.d.ts} +51 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -2
- package/dist/schemas/api-contracts.d.ts +56 -28
- package/dist/schemas/api-contracts.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -50,8 +50,14 @@ var _maturityEnum = z3.enum(["draft", "verified", "proven"]);
|
|
|
50
50
|
var _ruleDescriptionSchema = z3.object({
|
|
51
51
|
summary: z3.string(),
|
|
52
52
|
intent_clues: z3.array(z3.string()),
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
// wire-slim (payload): fab_recall projects a LEAN description (summary +
|
|
54
|
+
// must_read_if + intent_clues + knowledge_type — the selection signal), leaving
|
|
55
|
+
// tech_stack/impact to be Read on demand via read_path (KT-DEC-0026 lean
|
|
56
|
+
// contract at the field level). So they are optional on the wire. plan-context
|
|
57
|
+
// still returns them in full — zod keeps optional-present values, only ABSENT is
|
|
58
|
+
// now allowed, so no plan-context consumer regresses.
|
|
59
|
+
tech_stack: z3.array(z3.string()).optional(),
|
|
60
|
+
impact: z3.array(z3.string()).optional(),
|
|
55
61
|
must_read_if: z3.string(),
|
|
56
62
|
// v2.0: optional knowledge-entry fields. Absent for v1.x rules; present for
|
|
57
63
|
// entries that declare frontmatter `id/type/maturity`. W4/Track1: the redundant
|
|
@@ -73,7 +79,12 @@ var _ruleDescriptionSchema = z3.object({
|
|
|
73
79
|
// schema must also carry `related`, else zod strips the graph edges on output
|
|
74
80
|
// validation and they never reach the client (MC1 include_related / fabric-
|
|
75
81
|
// connect would see nothing). Mirrors the agents-meta ruleDescriptionSchema.
|
|
76
|
-
related: z3.array(z3.string()).optional()
|
|
82
|
+
related: z3.array(z3.string()).optional(),
|
|
83
|
+
// v2.2 glossary aliases FIELD (C-001): mirrors agents.ts RuleDescription.
|
|
84
|
+
// MUST be declared here or zod .strip() drops aliases on output validation
|
|
85
|
+
// before plan-context feeds them into the BM25 body — long-tail alias terms
|
|
86
|
+
// would never reach the lexical/vector index (KT-PIT-0018 zod-strip lesson).
|
|
87
|
+
aliases: z3.array(z3.string()).optional()
|
|
77
88
|
});
|
|
78
89
|
var _descriptionIndexItemSchema = z3.object({
|
|
79
90
|
stable_id: z3.string(),
|
|
@@ -333,7 +344,14 @@ var _recallEntrySchema = z3.object({
|
|
|
333
344
|
vector_rank: z3.number().optional(),
|
|
334
345
|
salience: z3.number(),
|
|
335
346
|
recency: z3.number(),
|
|
336
|
-
locality: z3.number()
|
|
347
|
+
locality: z3.number(),
|
|
348
|
+
// BORROW-008 proximity boost — MUST be declared or zod .strip() drops it at
|
|
349
|
+
// the MCP boundary (KT-PIT-0005), desyncing wire `final` from its components.
|
|
350
|
+
proximity: z3.number(),
|
|
351
|
+
// PLN-004 F1 credibility content-age decay MULTIPLIER factor — optional
|
|
352
|
+
// (only present once the multiplier is wired). MUST be declared or zod
|
|
353
|
+
// .strip() drops it at the MCP boundary (KT-PIT-0005).
|
|
354
|
+
credibility: z3.number().optional()
|
|
337
355
|
}).optional()
|
|
338
356
|
});
|
|
339
357
|
var recallOutputSchema = z3.object({
|
|
@@ -190,6 +190,7 @@ var enMessages = {
|
|
|
190
190
|
"doctor.store.active-personal-unset": "{count} personal stores are mounted but none is active; run `fabric store switch-personal <alias>` to pick one (or `fabric doctor --fix` to default to the first)",
|
|
191
191
|
"doctor.store.related-broken": "{count} broken `related` link(s) point at ids absent from the corpus: {samples}{overflow} \u2014 fix the related edges via `fab_review` (modify) or edit the entry frontmatter",
|
|
192
192
|
"doctor.store.related-hub": "related graph hubs (top {shown} of {total} referenced): {top}",
|
|
193
|
+
"doctor.store.related-suggested": "{count} high-confidence `related` edge(s) missing between similar entries: {samples}{overflow} \u2014 add the apt ones via `fab_review` (modify) (suggestions only, never auto-applied)",
|
|
193
194
|
"doctor.store.unreachable": "store '{alias}' is in the read-set but unreachable on disk ({reason}); run `fabric store mount` / re-clone it, then `fabric doctor`",
|
|
194
195
|
"doctor.store.consumption-heatmap": "top consumed (last {days}d, {consumed}/{total} entries read across {windows} window(s)): {top}",
|
|
195
196
|
"doctor.store.consumption-zero": "{count} entries never consumed in the last {days}d: {sample}{overflow} \u2014 review for retirement via `fab_review` (consumption is one signal, not proof of rot)",
|
|
@@ -1502,6 +1503,7 @@ var zhCNMessages = {
|
|
|
1502
1503
|
"doctor.store.active-personal-unset": "\u5DF2\u6302\u8F7D {count} \u4E2A personal store \u4F46\u65E0\u6D3B\u52A8\u6307\u9488;\u8FD0\u884C `fabric store switch-personal <alias>` \u9009\u4E00\u4E2A(\u6216 `fabric doctor --fix` \u9ED8\u8BA4\u53D6\u7B2C\u4E00\u4E2A)",
|
|
1503
1504
|
"doctor.store.related-broken": "{count} \u6761 `related` \u94FE\u63A5\u6307\u5411\u8BED\u6599\u4E2D\u4E0D\u5B58\u5728\u7684 id:{samples}{overflow} \u2014\u2014 \u901A\u8FC7 `fab_review` (modify) \u4FEE\u590D related \u8FB9,\u6216\u7F16\u8F91\u6761\u76EE frontmatter",
|
|
1504
1505
|
"doctor.store.related-hub": "related \u56FE\u8C31\u67A2\u7EBD(\u524D {shown} / \u5171 {total} \u4E2A\u88AB\u5F15\u7528):{top}",
|
|
1506
|
+
"doctor.store.related-suggested": "{count} \u6761\u9AD8\u7F6E\u4FE1\u5EA6 `related` \u8FB9\u5728\u76F8\u4F3C\u6761\u76EE\u95F4\u7F3A\u5931:{samples}{overflow} \u2014\u2014 \u5408\u9002\u7684\u901A\u8FC7 `fab_review` (modify) \u8865\u4E0A(\u4EC5\u5EFA\u8BAE,\u4E0D\u81EA\u52A8\u5E94\u7528)",
|
|
1505
1507
|
"doctor.store.unreachable": "store '{alias}' \u5728 read-set \u4E2D\u4F46\u78C1\u76D8\u4E0A\u4E0D\u53EF\u8FBE({reason});\u8FD0\u884C `fabric store mount` / \u91CD\u65B0 clone,\u518D\u8DD1 `fabric doctor`",
|
|
1506
1508
|
"doctor.store.consumption-heatmap": "\u6D88\u8D39\u70ED\u533A(\u8FD1 {days}d,{consumed}/{total} \u6761\u88AB\u8BFB,\u8DE8 {windows} \u4E2A\u7A97\u53E3):{top}",
|
|
1507
1509
|
"doctor.store.consumption-zero": "{count} \u6761\u5728\u8FD1 {days}d \u5185\u4ECE\u672A\u88AB\u6D88\u8D39:{sample}{overflow} \u2014\u2014 \u901A\u8FC7 `fab_review` \u8003\u8651\u6DD8\u6C70(\u6D88\u8D39\u91CF\u53EA\u662F\u4FE1\u53F7\u4E4B\u4E00,\u975E\u9648\u65E7\u7684\u8BC1\u636E)",
|
package/dist/i18n/index.js
CHANGED
|
@@ -17,6 +17,7 @@ interface RuleDescription {
|
|
|
17
17
|
relevance_scope?: "narrow" | "broad";
|
|
18
18
|
relevance_paths?: string[];
|
|
19
19
|
related?: string[];
|
|
20
|
+
aliases?: string[];
|
|
20
21
|
}
|
|
21
22
|
interface RuleDescriptionIndexItem {
|
|
22
23
|
stable_id: string;
|
|
@@ -36,6 +37,8 @@ interface RecallScoreBreakdown {
|
|
|
36
37
|
salience: number;
|
|
37
38
|
recency: number;
|
|
38
39
|
locality: number;
|
|
40
|
+
proximity: number;
|
|
41
|
+
credibility?: number;
|
|
39
42
|
}
|
|
40
43
|
interface AgentsMetaNode {
|
|
41
44
|
file: string;
|
|
@@ -484,6 +487,14 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
484
487
|
orphan_demote_proven_days: z.ZodOptional<z.ZodNumber>;
|
|
485
488
|
orphan_demote_verified_days: z.ZodOptional<z.ZodNumber>;
|
|
486
489
|
orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
|
|
490
|
+
credibility_half_life_decisions_days: z.ZodOptional<z.ZodNumber>;
|
|
491
|
+
credibility_half_life_guidelines_days: z.ZodOptional<z.ZodNumber>;
|
|
492
|
+
credibility_half_life_models_days: z.ZodOptional<z.ZodNumber>;
|
|
493
|
+
credibility_half_life_pitfalls_days: z.ZodOptional<z.ZodNumber>;
|
|
494
|
+
credibility_half_life_processes_days: z.ZodOptional<z.ZodNumber>;
|
|
495
|
+
credibility_floor_draft: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
credibility_floor_verified: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
credibility_floor_proven: z.ZodOptional<z.ZodNumber>;
|
|
487
498
|
broad_review_recheck_days: z.ZodOptional<z.ZodNumber>;
|
|
488
499
|
hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
489
500
|
hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -558,6 +569,14 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
558
569
|
orphan_demote_proven_days?: number | undefined;
|
|
559
570
|
orphan_demote_verified_days?: number | undefined;
|
|
560
571
|
orphan_demote_draft_days?: number | undefined;
|
|
572
|
+
credibility_half_life_decisions_days?: number | undefined;
|
|
573
|
+
credibility_half_life_guidelines_days?: number | undefined;
|
|
574
|
+
credibility_half_life_models_days?: number | undefined;
|
|
575
|
+
credibility_half_life_pitfalls_days?: number | undefined;
|
|
576
|
+
credibility_half_life_processes_days?: number | undefined;
|
|
577
|
+
credibility_floor_draft?: number | undefined;
|
|
578
|
+
credibility_floor_verified?: number | undefined;
|
|
579
|
+
credibility_floor_proven?: number | undefined;
|
|
561
580
|
broad_review_recheck_days?: number | undefined;
|
|
562
581
|
selection_token_ttl_ms?: number | undefined;
|
|
563
582
|
plan_context_top_k?: number | undefined;
|
|
@@ -620,6 +639,14 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
620
639
|
orphan_demote_proven_days?: number | undefined;
|
|
621
640
|
orphan_demote_verified_days?: number | undefined;
|
|
622
641
|
orphan_demote_draft_days?: number | undefined;
|
|
642
|
+
credibility_half_life_decisions_days?: number | undefined;
|
|
643
|
+
credibility_half_life_guidelines_days?: number | undefined;
|
|
644
|
+
credibility_half_life_models_days?: number | undefined;
|
|
645
|
+
credibility_half_life_pitfalls_days?: number | undefined;
|
|
646
|
+
credibility_half_life_processes_days?: number | undefined;
|
|
647
|
+
credibility_floor_draft?: number | undefined;
|
|
648
|
+
credibility_floor_verified?: number | undefined;
|
|
649
|
+
credibility_floor_proven?: number | undefined;
|
|
623
650
|
broad_review_recheck_days?: number | undefined;
|
|
624
651
|
hint_summary_max_len?: number | undefined;
|
|
625
652
|
hint_reminder_to_context?: boolean | undefined;
|
|
@@ -713,6 +740,14 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
713
740
|
orphan_demote_proven_days: z.ZodOptional<z.ZodNumber>;
|
|
714
741
|
orphan_demote_verified_days: z.ZodOptional<z.ZodNumber>;
|
|
715
742
|
orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
|
|
743
|
+
credibility_half_life_decisions_days: z.ZodOptional<z.ZodNumber>;
|
|
744
|
+
credibility_half_life_guidelines_days: z.ZodOptional<z.ZodNumber>;
|
|
745
|
+
credibility_half_life_models_days: z.ZodOptional<z.ZodNumber>;
|
|
746
|
+
credibility_half_life_pitfalls_days: z.ZodOptional<z.ZodNumber>;
|
|
747
|
+
credibility_half_life_processes_days: z.ZodOptional<z.ZodNumber>;
|
|
748
|
+
credibility_floor_draft: z.ZodOptional<z.ZodNumber>;
|
|
749
|
+
credibility_floor_verified: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
credibility_floor_proven: z.ZodOptional<z.ZodNumber>;
|
|
716
751
|
broad_review_recheck_days: z.ZodOptional<z.ZodNumber>;
|
|
717
752
|
hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
718
753
|
hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -798,6 +833,14 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
798
833
|
orphan_demote_proven_days?: number | undefined;
|
|
799
834
|
orphan_demote_verified_days?: number | undefined;
|
|
800
835
|
orphan_demote_draft_days?: number | undefined;
|
|
836
|
+
credibility_half_life_decisions_days?: number | undefined;
|
|
837
|
+
credibility_half_life_guidelines_days?: number | undefined;
|
|
838
|
+
credibility_half_life_models_days?: number | undefined;
|
|
839
|
+
credibility_half_life_pitfalls_days?: number | undefined;
|
|
840
|
+
credibility_half_life_processes_days?: number | undefined;
|
|
841
|
+
credibility_floor_draft?: number | undefined;
|
|
842
|
+
credibility_floor_verified?: number | undefined;
|
|
843
|
+
credibility_floor_proven?: number | undefined;
|
|
801
844
|
broad_review_recheck_days?: number | undefined;
|
|
802
845
|
selection_token_ttl_ms?: number | undefined;
|
|
803
846
|
plan_context_top_k?: number | undefined;
|
|
@@ -860,6 +903,14 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
860
903
|
orphan_demote_proven_days?: number | undefined;
|
|
861
904
|
orphan_demote_verified_days?: number | undefined;
|
|
862
905
|
orphan_demote_draft_days?: number | undefined;
|
|
906
|
+
credibility_half_life_decisions_days?: number | undefined;
|
|
907
|
+
credibility_half_life_guidelines_days?: number | undefined;
|
|
908
|
+
credibility_half_life_models_days?: number | undefined;
|
|
909
|
+
credibility_half_life_pitfalls_days?: number | undefined;
|
|
910
|
+
credibility_half_life_processes_days?: number | undefined;
|
|
911
|
+
credibility_floor_draft?: number | undefined;
|
|
912
|
+
credibility_floor_verified?: number | undefined;
|
|
913
|
+
credibility_floor_proven?: number | undefined;
|
|
863
914
|
broad_review_recheck_days?: number | undefined;
|
|
864
915
|
hint_summary_max_len?: number | undefined;
|
|
865
916
|
hint_reminder_to_context?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, S as StoreIdentity, c as StoreProject, G as GlobalConfig, F as FabricConfig, M as MountedStore, R as RequiredStoreEntry, d as AgentsMeta, L as LedgerEntry } from './index-
|
|
2
|
-
export { e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, j as FabricLanguage, k as GLOBAL_BINDINGS_DIR, l as GLOBAL_STATE_DIR, m as HumanLedgerEntry, n as McpPayloadLimits, P as PERSONAL_STORE_SENTINEL, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem, s as STORES_ROOT_DIR, t as STORE_ALIAS_PATTERN, u as STORE_KNOWLEDGE_TYPE_DIRS, v as STORE_LAYOUT, w as STORE_MOUNT_GROUPS, x as STORE_MOUNT_NAME_PATTERN, y as STORE_PROJECT_ID_PATTERN, z as STORE_UUID_PATTERN, B as StoreLayout, E as StoreMountGroup, I as StoreProjectsFile, J as auditModeSchema, K as clientPathsSchema, N as defaultLayerFilterSchema, O as deriveMountLabel, Q as fabricConfigLoadSchema, T as fabricLanguageSchema, U as globalConfigSchema, V as isNonPersonalRequiredStore, W as mcpPayloadLimitsSchema, X as migrateRequiredStores, Y as mountedStoreSchema, Z as nudgeModeSchema, _ as observeConfigSchema, $ as planContextTopKSchema, a0 as requiredStoreEntrySchema, a1 as selectionTokenTtlMsSchema, a2 as storeAliasSchema, a3 as storeIdentitySchema, a4 as storeKnowledgeTypeDir, a5 as storeMountGroup, a6 as storeMountNameSchema, a7 as storeMountSubPath, a8 as storeProjectSchema, a9 as storeProjectsFileSchema, aa as storeRelativePath, ab as storeRelativePathForMount, ac as storeUuidSchema, ad as writeRouteSchema } from './index-
|
|
1
|
+
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, S as StoreIdentity, c as StoreProject, G as GlobalConfig, F as FabricConfig, M as MountedStore, R as RequiredStoreEntry, d as AgentsMeta, L as LedgerEntry } from './index-B2e0wKJi.js';
|
|
2
|
+
export { e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, j as FabricLanguage, k as GLOBAL_BINDINGS_DIR, l as GLOBAL_STATE_DIR, m as HumanLedgerEntry, n as McpPayloadLimits, P as PERSONAL_STORE_SENTINEL, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem, s as STORES_ROOT_DIR, t as STORE_ALIAS_PATTERN, u as STORE_KNOWLEDGE_TYPE_DIRS, v as STORE_LAYOUT, w as STORE_MOUNT_GROUPS, x as STORE_MOUNT_NAME_PATTERN, y as STORE_PROJECT_ID_PATTERN, z as STORE_UUID_PATTERN, B as StoreLayout, E as StoreMountGroup, I as StoreProjectsFile, J as auditModeSchema, K as clientPathsSchema, N as defaultLayerFilterSchema, O as deriveMountLabel, Q as fabricConfigLoadSchema, T as fabricLanguageSchema, U as globalConfigSchema, V as isNonPersonalRequiredStore, W as mcpPayloadLimitsSchema, X as migrateRequiredStores, Y as mountedStoreSchema, Z as nudgeModeSchema, _ as observeConfigSchema, $ as planContextTopKSchema, a0 as requiredStoreEntrySchema, a1 as selectionTokenTtlMsSchema, a2 as storeAliasSchema, a3 as storeIdentitySchema, a4 as storeKnowledgeTypeDir, a5 as storeMountGroup, a6 as storeMountNameSchema, a7 as storeMountSubPath, a8 as storeProjectSchema, a9 as storeProjectsFileSchema, aa as storeRelativePath, ab as storeRelativePathForMount, ac as storeUuidSchema, ad as writeRouteSchema } from './index-B2e0wKJi.js';
|
|
3
3
|
import { T as Translator } from './types-qg4xXVuT.js';
|
|
4
4
|
export { L as Locale, M as Messages, a as TranslationKey } from './types-qg4xXVuT.js';
|
|
5
5
|
export { PROTECTED_TOKENS, ProtectedToken, createTranslator, defaultMessages, detectNodeLocale, enMessages, normalizeLocale, resolveFabricLocale, resolveGlobalLocale, zhCNMessages } from './i18n/index.js';
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
enMessages,
|
|
17
17
|
resolveFabricLocale,
|
|
18
18
|
zhCNMessages
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CYOOZQBP.js";
|
|
20
20
|
import {
|
|
21
21
|
GLOBAL_BINDINGS_DIR,
|
|
22
22
|
GLOBAL_STATE_DIR,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
scopeCoordinateSchema,
|
|
117
117
|
scopeRoot,
|
|
118
118
|
structuredWarningSchema
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-CVNJCAC7.js";
|
|
120
120
|
|
|
121
121
|
// src/schemas/agents-meta.ts
|
|
122
122
|
import { z } from "zod";
|
|
@@ -701,6 +701,27 @@ var fabricConfigSchema = z5.object({
|
|
|
701
701
|
orphan_demote_proven_days: z5.number().int().min(1).max(3650).optional(),
|
|
702
702
|
orphan_demote_verified_days: z5.number().int().min(1).max(3650).optional(),
|
|
703
703
|
orphan_demote_draft_days: z5.number().int().min(1).max(3650).optional(),
|
|
704
|
+
// PLN-004 F1 (credibility content-age decay): per-knowledge-type half-lives
|
|
705
|
+
// (days) for the recall-scoring credibility MULTIPLIER. Orthogonal to the
|
|
706
|
+
// orphan_demote usage-inactivity ladder above (that is last-activity age; this
|
|
707
|
+
// is content age off created_at) and to recencyBoost (a 7-day additive
|
|
708
|
+
// freshness bump). Team-curated knowledge decays slower than transient work, so
|
|
709
|
+
// defaults run longer than upstream: decisions 180 / guidelines 150 / models
|
|
710
|
+
// 150 / pitfalls 120 / processes 120 (applied in config-loader). Each optional;
|
|
711
|
+
// absent → the loader default. Range 1..3650 mirrors orphan_demote.
|
|
712
|
+
credibility_half_life_decisions_days: z5.number().int().min(1).max(3650).optional(),
|
|
713
|
+
credibility_half_life_guidelines_days: z5.number().int().min(1).max(3650).optional(),
|
|
714
|
+
credibility_half_life_models_days: z5.number().int().min(1).max(3650).optional(),
|
|
715
|
+
credibility_half_life_pitfalls_days: z5.number().int().min(1).max(3650).optional(),
|
|
716
|
+
credibility_half_life_processes_days: z5.number().int().min(1).max(3650).optional(),
|
|
717
|
+
// PLN-004 F1: per-maturity floor the credibility multiplier never decays below
|
|
718
|
+
// (a stale-but-endorsed entry keeps a minimum weight). Higher maturity → higher
|
|
719
|
+
// floor: draft 0.4 / verified 0.55 / proven 0.7 (config-loader defaults). Range
|
|
720
|
+
// [0,1]. This is the softened form of the "content leads structural" invariant —
|
|
721
|
+
// credibility may sink a stale match but never zero it.
|
|
722
|
+
credibility_floor_draft: z5.number().min(0).max(1).optional(),
|
|
723
|
+
credibility_floor_verified: z5.number().min(0).max(1).optional(),
|
|
724
|
+
credibility_floor_proven: z5.number().min(0).max(1).optional(),
|
|
704
725
|
// v2.2 C1 (processes/maturity-promotion-rubric-v1): days a `broad` entry may
|
|
705
726
|
// go without a fab-review re-confirmation before doctor surfaces a RECHECK
|
|
706
727
|
// nudge. `broad` is EXEMPT from usage-age decay (it is SessionStart-pushed,
|
|
@@ -91,8 +91,8 @@ declare const planContextOutputSchema: z.ZodObject<{
|
|
|
91
91
|
description: z.ZodObject<{
|
|
92
92
|
summary: z.ZodString;
|
|
93
93
|
intent_clues: z.ZodArray<z.ZodString, "many">;
|
|
94
|
-
tech_stack: z.ZodArray<z.ZodString, "many"
|
|
95
|
-
impact: z.ZodArray<z.ZodString, "many"
|
|
94
|
+
tech_stack: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
impact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
96
96
|
must_read_if: z.ZodString;
|
|
97
97
|
id: z.ZodOptional<z.ZodString>;
|
|
98
98
|
knowledge_type: z.ZodOptional<z.ZodEnum<["models", "decisions", "guidelines", "pitfalls", "processes"]>>;
|
|
@@ -102,51 +102,55 @@ declare const planContextOutputSchema: z.ZodObject<{
|
|
|
102
102
|
relevance_scope: z.ZodOptional<z.ZodEnum<["narrow", "broad"]>>;
|
|
103
103
|
relevance_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
104
104
|
related: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
105
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
105
106
|
}, "strip", z.ZodTypeAny, {
|
|
106
107
|
summary: string;
|
|
107
108
|
intent_clues: string[];
|
|
108
|
-
tech_stack: string[];
|
|
109
|
-
impact: string[];
|
|
110
109
|
must_read_if: string;
|
|
111
110
|
created_at?: string | undefined;
|
|
112
111
|
id?: string | undefined;
|
|
113
112
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
114
113
|
relevance_paths?: string[] | undefined;
|
|
114
|
+
tech_stack?: string[] | undefined;
|
|
115
|
+
impact?: string[] | undefined;
|
|
115
116
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
116
117
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
117
118
|
tags?: string[] | undefined;
|
|
118
119
|
related?: string[] | undefined;
|
|
120
|
+
aliases?: string[] | undefined;
|
|
119
121
|
}, {
|
|
120
122
|
summary: string;
|
|
121
123
|
intent_clues: string[];
|
|
122
|
-
tech_stack: string[];
|
|
123
|
-
impact: string[];
|
|
124
124
|
must_read_if: string;
|
|
125
125
|
created_at?: string | undefined;
|
|
126
126
|
id?: string | undefined;
|
|
127
127
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
128
128
|
relevance_paths?: string[] | undefined;
|
|
129
|
+
tech_stack?: string[] | undefined;
|
|
130
|
+
impact?: string[] | undefined;
|
|
129
131
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
130
132
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
131
133
|
tags?: string[] | undefined;
|
|
132
134
|
related?: string[] | undefined;
|
|
135
|
+
aliases?: string[] | undefined;
|
|
133
136
|
}>;
|
|
134
137
|
always_active: z.ZodOptional<z.ZodBoolean>;
|
|
135
138
|
}, "strip", z.ZodTypeAny, {
|
|
136
139
|
description: {
|
|
137
140
|
summary: string;
|
|
138
141
|
intent_clues: string[];
|
|
139
|
-
tech_stack: string[];
|
|
140
|
-
impact: string[];
|
|
141
142
|
must_read_if: string;
|
|
142
143
|
created_at?: string | undefined;
|
|
143
144
|
id?: string | undefined;
|
|
144
145
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
145
146
|
relevance_paths?: string[] | undefined;
|
|
147
|
+
tech_stack?: string[] | undefined;
|
|
148
|
+
impact?: string[] | undefined;
|
|
146
149
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
147
150
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
148
151
|
tags?: string[] | undefined;
|
|
149
152
|
related?: string[] | undefined;
|
|
153
|
+
aliases?: string[] | undefined;
|
|
150
154
|
};
|
|
151
155
|
stable_id: string;
|
|
152
156
|
always_active?: boolean | undefined;
|
|
@@ -154,17 +158,18 @@ declare const planContextOutputSchema: z.ZodObject<{
|
|
|
154
158
|
description: {
|
|
155
159
|
summary: string;
|
|
156
160
|
intent_clues: string[];
|
|
157
|
-
tech_stack: string[];
|
|
158
|
-
impact: string[];
|
|
159
161
|
must_read_if: string;
|
|
160
162
|
created_at?: string | undefined;
|
|
161
163
|
id?: string | undefined;
|
|
162
164
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
163
165
|
relevance_paths?: string[] | undefined;
|
|
166
|
+
tech_stack?: string[] | undefined;
|
|
167
|
+
impact?: string[] | undefined;
|
|
164
168
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
165
169
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
166
170
|
tags?: string[] | undefined;
|
|
167
171
|
related?: string[] | undefined;
|
|
172
|
+
aliases?: string[] | undefined;
|
|
168
173
|
};
|
|
169
174
|
stable_id: string;
|
|
170
175
|
always_active?: boolean | undefined;
|
|
@@ -237,17 +242,18 @@ declare const planContextOutputSchema: z.ZodObject<{
|
|
|
237
242
|
description: {
|
|
238
243
|
summary: string;
|
|
239
244
|
intent_clues: string[];
|
|
240
|
-
tech_stack: string[];
|
|
241
|
-
impact: string[];
|
|
242
245
|
must_read_if: string;
|
|
243
246
|
created_at?: string | undefined;
|
|
244
247
|
id?: string | undefined;
|
|
245
248
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
246
249
|
relevance_paths?: string[] | undefined;
|
|
250
|
+
tech_stack?: string[] | undefined;
|
|
251
|
+
impact?: string[] | undefined;
|
|
247
252
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
248
253
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
249
254
|
tags?: string[] | undefined;
|
|
250
255
|
related?: string[] | undefined;
|
|
256
|
+
aliases?: string[] | undefined;
|
|
251
257
|
};
|
|
252
258
|
stable_id: string;
|
|
253
259
|
always_active?: boolean | undefined;
|
|
@@ -291,17 +297,18 @@ declare const planContextOutputSchema: z.ZodObject<{
|
|
|
291
297
|
description: {
|
|
292
298
|
summary: string;
|
|
293
299
|
intent_clues: string[];
|
|
294
|
-
tech_stack: string[];
|
|
295
|
-
impact: string[];
|
|
296
300
|
must_read_if: string;
|
|
297
301
|
created_at?: string | undefined;
|
|
298
302
|
id?: string | undefined;
|
|
299
303
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
300
304
|
relevance_paths?: string[] | undefined;
|
|
305
|
+
tech_stack?: string[] | undefined;
|
|
306
|
+
impact?: string[] | undefined;
|
|
301
307
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
302
308
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
303
309
|
tags?: string[] | undefined;
|
|
304
310
|
related?: string[] | undefined;
|
|
311
|
+
aliases?: string[] | undefined;
|
|
305
312
|
};
|
|
306
313
|
stable_id: string;
|
|
307
314
|
always_active?: boolean | undefined;
|
|
@@ -595,8 +602,8 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
595
602
|
description: z.ZodObject<{
|
|
596
603
|
summary: z.ZodString;
|
|
597
604
|
intent_clues: z.ZodArray<z.ZodString, "many">;
|
|
598
|
-
tech_stack: z.ZodArray<z.ZodString, "many"
|
|
599
|
-
impact: z.ZodArray<z.ZodString, "many"
|
|
605
|
+
tech_stack: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
606
|
+
impact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
600
607
|
must_read_if: z.ZodString;
|
|
601
608
|
id: z.ZodOptional<z.ZodString>;
|
|
602
609
|
knowledge_type: z.ZodOptional<z.ZodEnum<["models", "decisions", "guidelines", "pitfalls", "processes"]>>;
|
|
@@ -606,34 +613,37 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
606
613
|
relevance_scope: z.ZodOptional<z.ZodEnum<["narrow", "broad"]>>;
|
|
607
614
|
relevance_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
608
615
|
related: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
616
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
609
617
|
}, "strip", z.ZodTypeAny, {
|
|
610
618
|
summary: string;
|
|
611
619
|
intent_clues: string[];
|
|
612
|
-
tech_stack: string[];
|
|
613
|
-
impact: string[];
|
|
614
620
|
must_read_if: string;
|
|
615
621
|
created_at?: string | undefined;
|
|
616
622
|
id?: string | undefined;
|
|
617
623
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
618
624
|
relevance_paths?: string[] | undefined;
|
|
625
|
+
tech_stack?: string[] | undefined;
|
|
626
|
+
impact?: string[] | undefined;
|
|
619
627
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
620
628
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
621
629
|
tags?: string[] | undefined;
|
|
622
630
|
related?: string[] | undefined;
|
|
631
|
+
aliases?: string[] | undefined;
|
|
623
632
|
}, {
|
|
624
633
|
summary: string;
|
|
625
634
|
intent_clues: string[];
|
|
626
|
-
tech_stack: string[];
|
|
627
|
-
impact: string[];
|
|
628
635
|
must_read_if: string;
|
|
629
636
|
created_at?: string | undefined;
|
|
630
637
|
id?: string | undefined;
|
|
631
638
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
632
639
|
relevance_paths?: string[] | undefined;
|
|
640
|
+
tech_stack?: string[] | undefined;
|
|
641
|
+
impact?: string[] | undefined;
|
|
633
642
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
634
643
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
635
644
|
tags?: string[] | undefined;
|
|
636
645
|
related?: string[] | undefined;
|
|
646
|
+
aliases?: string[] | undefined;
|
|
637
647
|
}>;
|
|
638
648
|
read_path: z.ZodOptional<z.ZodString>;
|
|
639
649
|
store: z.ZodOptional<z.ZodObject<{
|
|
@@ -654,40 +664,47 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
654
664
|
salience: z.ZodNumber;
|
|
655
665
|
recency: z.ZodNumber;
|
|
656
666
|
locality: z.ZodNumber;
|
|
667
|
+
proximity: z.ZodNumber;
|
|
668
|
+
credibility: z.ZodOptional<z.ZodNumber>;
|
|
657
669
|
}, "strip", z.ZodTypeAny, {
|
|
658
670
|
final: number;
|
|
659
671
|
salience: number;
|
|
660
672
|
recency: number;
|
|
661
673
|
locality: number;
|
|
674
|
+
proximity: number;
|
|
662
675
|
bm25?: number | undefined;
|
|
663
676
|
bm25_rank?: number | undefined;
|
|
664
677
|
vector?: number | undefined;
|
|
665
678
|
vector_rank?: number | undefined;
|
|
679
|
+
credibility?: number | undefined;
|
|
666
680
|
}, {
|
|
667
681
|
final: number;
|
|
668
682
|
salience: number;
|
|
669
683
|
recency: number;
|
|
670
684
|
locality: number;
|
|
685
|
+
proximity: number;
|
|
671
686
|
bm25?: number | undefined;
|
|
672
687
|
bm25_rank?: number | undefined;
|
|
673
688
|
vector?: number | undefined;
|
|
674
689
|
vector_rank?: number | undefined;
|
|
690
|
+
credibility?: number | undefined;
|
|
675
691
|
}>>;
|
|
676
692
|
}, "strip", z.ZodTypeAny, {
|
|
677
693
|
description: {
|
|
678
694
|
summary: string;
|
|
679
695
|
intent_clues: string[];
|
|
680
|
-
tech_stack: string[];
|
|
681
|
-
impact: string[];
|
|
682
696
|
must_read_if: string;
|
|
683
697
|
created_at?: string | undefined;
|
|
684
698
|
id?: string | undefined;
|
|
685
699
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
686
700
|
relevance_paths?: string[] | undefined;
|
|
701
|
+
tech_stack?: string[] | undefined;
|
|
702
|
+
impact?: string[] | undefined;
|
|
687
703
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
688
704
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
689
705
|
tags?: string[] | undefined;
|
|
690
706
|
related?: string[] | undefined;
|
|
707
|
+
aliases?: string[] | undefined;
|
|
691
708
|
};
|
|
692
709
|
stable_id: string;
|
|
693
710
|
rank: number;
|
|
@@ -702,26 +719,29 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
702
719
|
salience: number;
|
|
703
720
|
recency: number;
|
|
704
721
|
locality: number;
|
|
722
|
+
proximity: number;
|
|
705
723
|
bm25?: number | undefined;
|
|
706
724
|
bm25_rank?: number | undefined;
|
|
707
725
|
vector?: number | undefined;
|
|
708
726
|
vector_rank?: number | undefined;
|
|
727
|
+
credibility?: number | undefined;
|
|
709
728
|
} | undefined;
|
|
710
729
|
}, {
|
|
711
730
|
description: {
|
|
712
731
|
summary: string;
|
|
713
732
|
intent_clues: string[];
|
|
714
|
-
tech_stack: string[];
|
|
715
|
-
impact: string[];
|
|
716
733
|
must_read_if: string;
|
|
717
734
|
created_at?: string | undefined;
|
|
718
735
|
id?: string | undefined;
|
|
719
736
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
720
737
|
relevance_paths?: string[] | undefined;
|
|
738
|
+
tech_stack?: string[] | undefined;
|
|
739
|
+
impact?: string[] | undefined;
|
|
721
740
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
722
741
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
723
742
|
tags?: string[] | undefined;
|
|
724
743
|
related?: string[] | undefined;
|
|
744
|
+
aliases?: string[] | undefined;
|
|
725
745
|
};
|
|
726
746
|
stable_id: string;
|
|
727
747
|
rank: number;
|
|
@@ -736,10 +756,12 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
736
756
|
salience: number;
|
|
737
757
|
recency: number;
|
|
738
758
|
locality: number;
|
|
759
|
+
proximity: number;
|
|
739
760
|
bm25?: number | undefined;
|
|
740
761
|
bm25_rank?: number | undefined;
|
|
741
762
|
vector?: number | undefined;
|
|
742
763
|
vector_rank?: number | undefined;
|
|
764
|
+
credibility?: number | undefined;
|
|
743
765
|
} | undefined;
|
|
744
766
|
}>, "many">;
|
|
745
767
|
intent: z.ZodOptional<z.ZodString>;
|
|
@@ -802,17 +824,18 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
802
824
|
description: {
|
|
803
825
|
summary: string;
|
|
804
826
|
intent_clues: string[];
|
|
805
|
-
tech_stack: string[];
|
|
806
|
-
impact: string[];
|
|
807
827
|
must_read_if: string;
|
|
808
828
|
created_at?: string | undefined;
|
|
809
829
|
id?: string | undefined;
|
|
810
830
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
811
831
|
relevance_paths?: string[] | undefined;
|
|
832
|
+
tech_stack?: string[] | undefined;
|
|
833
|
+
impact?: string[] | undefined;
|
|
812
834
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
813
835
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
814
836
|
tags?: string[] | undefined;
|
|
815
837
|
related?: string[] | undefined;
|
|
838
|
+
aliases?: string[] | undefined;
|
|
816
839
|
};
|
|
817
840
|
stable_id: string;
|
|
818
841
|
rank: number;
|
|
@@ -827,10 +850,12 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
827
850
|
salience: number;
|
|
828
851
|
recency: number;
|
|
829
852
|
locality: number;
|
|
853
|
+
proximity: number;
|
|
830
854
|
bm25?: number | undefined;
|
|
831
855
|
bm25_rank?: number | undefined;
|
|
832
856
|
vector?: number | undefined;
|
|
833
857
|
vector_rank?: number | undefined;
|
|
858
|
+
credibility?: number | undefined;
|
|
834
859
|
} | undefined;
|
|
835
860
|
}[];
|
|
836
861
|
stale: boolean;
|
|
@@ -865,17 +890,18 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
865
890
|
description: {
|
|
866
891
|
summary: string;
|
|
867
892
|
intent_clues: string[];
|
|
868
|
-
tech_stack: string[];
|
|
869
|
-
impact: string[];
|
|
870
893
|
must_read_if: string;
|
|
871
894
|
created_at?: string | undefined;
|
|
872
895
|
id?: string | undefined;
|
|
873
896
|
relevance_scope?: "narrow" | "broad" | undefined;
|
|
874
897
|
relevance_paths?: string[] | undefined;
|
|
898
|
+
tech_stack?: string[] | undefined;
|
|
899
|
+
impact?: string[] | undefined;
|
|
875
900
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes" | undefined;
|
|
876
901
|
maturity?: "draft" | "verified" | "proven" | undefined;
|
|
877
902
|
tags?: string[] | undefined;
|
|
878
903
|
related?: string[] | undefined;
|
|
904
|
+
aliases?: string[] | undefined;
|
|
879
905
|
};
|
|
880
906
|
stable_id: string;
|
|
881
907
|
rank: number;
|
|
@@ -890,10 +916,12 @@ declare const recallOutputSchema: z.ZodObject<{
|
|
|
890
916
|
salience: number;
|
|
891
917
|
recency: number;
|
|
892
918
|
locality: number;
|
|
919
|
+
proximity: number;
|
|
893
920
|
bm25?: number | undefined;
|
|
894
921
|
bm25_rank?: number | undefined;
|
|
895
922
|
vector?: number | undefined;
|
|
896
923
|
vector_rank?: number | undefined;
|
|
924
|
+
credibility?: number | undefined;
|
|
897
925
|
} | undefined;
|
|
898
926
|
}[];
|
|
899
927
|
stale: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as AgentsIdentitySource, d as AgentsMeta, e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, j as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, n as McpPayloadLimits, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem } from '../index-
|
|
1
|
+
export { a as AgentsIdentitySource, d as AgentsMeta, e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, j as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, n as McpPayloadLimits, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem } from '../index-B2e0wKJi.js';
|
|
2
2
|
import 'zod';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fenglimg/fabric-shared",
|
|
3
|
-
"version": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.7",
|
|
4
4
|
"description": "Fabric shared types — Zod schemas, i18n, atomic-write helpers, MCP payload guard, error classes. Consumed by @fenglimg/fabric-server + @fenglimg/fabric-cli.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "wangzhichao <fenglimg90@gmail.com>",
|