@fenglimg/fabric-shared 2.0.0-rc.10 → 2.0.0-rc.13
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-G4IKTNY4.js → chunk-NNDFOOBO.js} +17 -0
- package/dist/{chunk-YGEE3WMC.js → chunk-WIH5HBKU.js} +237 -218
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +205 -107
- package/dist/index.js +81 -7
- package/dist/schemas/api-contracts.d.ts +116 -104
- package/dist/schemas/api-contracts.js +1 -1
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
enMessages,
|
|
7
7
|
normalizeLocale,
|
|
8
8
|
zhCNMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WIH5HBKU.js";
|
|
10
10
|
import {
|
|
11
11
|
FabExtractKnowledgeInputSchema,
|
|
12
12
|
FabExtractKnowledgeInputShape,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
planContextInputSchema,
|
|
46
46
|
planContextOutputSchema,
|
|
47
47
|
structuredWarningSchema
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-NNDFOOBO.js";
|
|
49
49
|
import "./chunk-LXNCAKJZ.js";
|
|
50
50
|
|
|
51
51
|
// src/schemas/agents-meta.ts
|
|
@@ -306,7 +306,12 @@ var mcpPayloadLimitsSchema = z5.object({
|
|
|
306
306
|
warnBytes: z5.number().int().positive().optional(),
|
|
307
307
|
hardBytes: z5.number().int().positive().optional()
|
|
308
308
|
}).optional();
|
|
309
|
-
var
|
|
309
|
+
var fabricLanguageSchema = z5.enum([
|
|
310
|
+
"match-existing",
|
|
311
|
+
"zh-CN",
|
|
312
|
+
"en",
|
|
313
|
+
"zh-CN-hybrid"
|
|
314
|
+
]);
|
|
310
315
|
var defaultLayerFilterSchema = z5.enum(["team", "personal", "both"]);
|
|
311
316
|
var fabricConfigSchema = z5.object({
|
|
312
317
|
clientPaths: clientPathsSchema.optional(),
|
|
@@ -318,7 +323,7 @@ var fabricConfigSchema = z5.object({
|
|
|
318
323
|
// Backward-compat: both fields are optional with defaults so existing
|
|
319
324
|
// fabric-config.json files (pre-grill-followup) parse unchanged. The default
|
|
320
325
|
// values themselves are load-bearing — see docs/data-schema.md.
|
|
321
|
-
|
|
326
|
+
fabric_language: fabricLanguageSchema.optional().default("match-existing"),
|
|
322
327
|
default_layer_filter: defaultLayerFilterSchema.optional().default("both"),
|
|
323
328
|
// Cooldown for the fabric-hint Stop hook (formerly archive-hint, renamed in
|
|
324
329
|
// rc.5 TASK-010). After ANY of the three signals (archive / review / import)
|
|
@@ -373,7 +378,65 @@ var fabricConfigSchema = z5.object({
|
|
|
373
378
|
// the user doesn't run doctor. Default 7 keeps the reminder weekly at
|
|
374
379
|
// worst — pairing 14d trigger + 7d cooldown means at most ~2 reminders
|
|
375
380
|
// per month for a workspace that ignores them.
|
|
376
|
-
maintenance_hint_cooldown_days: z5.number().int().positive().optional().default(7)
|
|
381
|
+
maintenance_hint_cooldown_days: z5.number().int().positive().optional().default(7),
|
|
382
|
+
// rc.9+ (skill-contract-fix B1): first-run import window in months. The
|
|
383
|
+
// `fabric-import` skill scans this many months of git history on the very
|
|
384
|
+
// first invocation (when no prior `import_run_completed` event exists).
|
|
385
|
+
// Default 60 (~5 years) captures the bulk of a mature repo's signal in
|
|
386
|
+
// one pass; small / fresh repos can lower to 12-24 with no loss.
|
|
387
|
+
import_window_first_run_months: z5.number().int().min(1).optional().default(60),
|
|
388
|
+
// rc.9+ (skill-contract-fix B1): rerun import window in months. After
|
|
389
|
+
// the first successful import, subsequent runs only scan this many
|
|
390
|
+
// recent months — assumed everything older has already been crystallized
|
|
391
|
+
// into pending or canonical knowledge. Default 2 keeps incremental cost
|
|
392
|
+
// low; raise to 6 if the workspace pauses fabric-import for long stretches.
|
|
393
|
+
import_window_rerun_months: z5.number().int().min(1).optional().default(2),
|
|
394
|
+
// rc.9+ (skill-contract-fix B1): hard cap on pending entries produced
|
|
395
|
+
// per fabric-import invocation. Prevents one run from dumping hundreds
|
|
396
|
+
// of proposals when a backfill window is wide open. Default 10 matches
|
|
397
|
+
// the rule-of-thumb "human can triage ~10 pending entries in one
|
|
398
|
+
// review pass." Range 1-50.
|
|
399
|
+
import_max_pending_per_run: z5.number().int().min(1).max(50).optional().default(10),
|
|
400
|
+
// rc.9+ (skill-contract-fix B1): hard cap on commits scanned per
|
|
401
|
+
// fabric-import invocation. Bounds runtime on monorepos with high
|
|
402
|
+
// commit velocity. Default 500 covers ~2 months of typical churn;
|
|
403
|
+
// range 50-2000. Hitting the cap mid-window is logged but non-fatal.
|
|
404
|
+
import_max_commits_scan: z5.number().int().min(50).max(2e3).optional().default(500),
|
|
405
|
+
// rc.9+ (skill-contract-fix B1): canonical-node count above which
|
|
406
|
+
// fabric-import's pre-flight should warn / suggest review instead of
|
|
407
|
+
// proceeding. A workspace with 50+ canonical entries usually benefits
|
|
408
|
+
// more from `fabric-review` to consolidate than from importing more.
|
|
409
|
+
// Default 50; raise to 100+ for large polyglot repos.
|
|
410
|
+
import_skip_canonical_threshold: z5.number().int().positive().optional().default(50),
|
|
411
|
+
// rc.9+ (skill-contract-fix B1): max candidate entries surfaced per
|
|
412
|
+
// fabric-archive batch (one invocation of the skill). Pagination knob
|
|
413
|
+
// for the archive UI flow. Default 8 keeps each batch reviewable in
|
|
414
|
+
// one sitting; raise for large repos with high archive throughput.
|
|
415
|
+
archive_max_candidates_per_batch: z5.number().int().positive().optional().default(8),
|
|
416
|
+
// rc.9+ (skill-contract-fix B1): max recently-touched paths included
|
|
417
|
+
// in fabric-archive's "relevant context" lookup. Limits the size of
|
|
418
|
+
// the path-relevance digest the skill emits when ranking candidates.
|
|
419
|
+
// Default 20; large repos with deep directory fan-out can raise to
|
|
420
|
+
// 50+ if archive candidates feel under-contextualized.
|
|
421
|
+
archive_max_recent_paths: z5.number().int().positive().optional().default(20),
|
|
422
|
+
// rc.9+ (skill-contract-fix B1): max prior fabric-archive sessions
|
|
423
|
+
// summarised in the digest the skill loads on start. Prevents the
|
|
424
|
+
// digest from ballooning past the model context budget on workspaces
|
|
425
|
+
// that have archived repeatedly. Default 10; lower if context pressure
|
|
426
|
+
// bites, raise if you want longer-range archive trend visibility.
|
|
427
|
+
archive_digest_max_sessions: z5.number().int().positive().optional().default(10),
|
|
428
|
+
// rc.9+ (skill-contract-fix B1): max review results returned per
|
|
429
|
+
// topic when `fabric-review` clusters pending entries. Pagination
|
|
430
|
+
// knob analogous to archive_max_candidates_per_batch but scoped to
|
|
431
|
+
// each topic cluster. Default 8; raise to 15-20 for large repos
|
|
432
|
+
// where each topic legitimately groups many pending entries.
|
|
433
|
+
review_topic_result_cap: z5.number().int().positive().optional().default(8),
|
|
434
|
+
// rc.9+ (skill-contract-fix B1): age threshold (in days) above which
|
|
435
|
+
// a pending entry is considered "stale" by fabric-review and surfaced
|
|
436
|
+
// for explicit resolve-or-drop decision. Default 14; tighter than the
|
|
437
|
+
// 7d Signal-B trigger because review specifically targets the long
|
|
438
|
+
// tail. Large repos with slower cadence can raise to 30.
|
|
439
|
+
review_stale_pending_days: z5.number().int().positive().optional().default(14)
|
|
377
440
|
});
|
|
378
441
|
|
|
379
442
|
// src/schemas/forensic-report.ts
|
|
@@ -791,6 +854,13 @@ var knowledgePathDangledEventSchema = z9.object({
|
|
|
791
854
|
stable_id: z9.string(),
|
|
792
855
|
removed_glob: z9.string()
|
|
793
856
|
});
|
|
857
|
+
var relevanceMigrationRunEventSchema = z9.object({
|
|
858
|
+
...eventLedgerEnvelopeSchema,
|
|
859
|
+
event_type: z9.literal("relevance_migration_run"),
|
|
860
|
+
timestamp: z9.string().datetime(),
|
|
861
|
+
scanned_count: z9.number().int().nonnegative(),
|
|
862
|
+
touched_count: z9.number().int().nonnegative()
|
|
863
|
+
});
|
|
794
864
|
var pendingAutoArchivedEventSchema = z9.object({
|
|
795
865
|
...eventLedgerEnvelopeSchema,
|
|
796
866
|
event_type: z9.literal("pending_auto_archived"),
|
|
@@ -837,7 +907,10 @@ var eventLedgerEventSchema = z9.discriminatedUnion("event_type", [
|
|
|
837
907
|
// #24 when a glob in relevance_paths resolves to zero filesystem matches.
|
|
838
908
|
knowledgePathDangledEventSchema,
|
|
839
909
|
// v2.0.0-rc.7 T10: doctor_run — emitted by `fabric doctor` to drive Signal D.
|
|
840
|
-
doctorRunEventSchema
|
|
910
|
+
doctorRunEventSchema,
|
|
911
|
+
// v2.0.0-rc.9 TASK-003 (A3): relevance_migration_run — emitted by
|
|
912
|
+
// `doctor --apply-lint` after the lint #26 frontmatter back-fill pass.
|
|
913
|
+
relevanceMigrationRunEventSchema
|
|
841
914
|
]);
|
|
842
915
|
export {
|
|
843
916
|
AGENTS_META_IDENTITY_SOURCES,
|
|
@@ -894,6 +967,7 @@ export {
|
|
|
894
967
|
fabReviewAnnotations,
|
|
895
968
|
fabricConfigSchema,
|
|
896
969
|
fabricEventSchema,
|
|
970
|
+
fabricLanguageSchema,
|
|
897
971
|
forensicAssertionCoverageSchema,
|
|
898
972
|
forensicAssertionSchema,
|
|
899
973
|
forensicCodeSampleSchema,
|
|
@@ -930,7 +1004,6 @@ export {
|
|
|
930
1004
|
knowledgeDeferredEventSchema,
|
|
931
1005
|
knowledgeDemotedEventSchema,
|
|
932
1006
|
knowledgeDriftDetectedEventSchema,
|
|
933
|
-
knowledgeLanguageSchema,
|
|
934
1007
|
knowledgeLayerChangedEventSchema,
|
|
935
1008
|
knowledgePathDangledEventSchema,
|
|
936
1009
|
knowledgePromoteFailedEventSchema,
|
|
@@ -969,6 +1042,7 @@ export {
|
|
|
969
1042
|
planContextInputSchema,
|
|
970
1043
|
planContextOutputSchema,
|
|
971
1044
|
reapplyCompletedEventSchema,
|
|
1045
|
+
relevanceMigrationRunEventSchema,
|
|
972
1046
|
ruleDescriptionIndexItemSchema,
|
|
973
1047
|
ruleDescriptionSchema,
|
|
974
1048
|
structuredWarningSchema,
|