@fenglimg/fabric-shared 2.2.0-rc.8 → 2.2.0-rc.9
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.
|
@@ -515,6 +515,11 @@ var enMessages = {
|
|
|
515
515
|
"doctor.check.skill_md_yaml_invalid.message.singular": "{count} SKILL.md frontmatter value contains an unquoted ': ' that strict YAML parsers reject (Claude Code tolerates it; Codex CLI drops the skill at load). First: {detail}.",
|
|
516
516
|
"doctor.check.skill_md_yaml_invalid.message.plural": "{count} SKILL.md frontmatter values contain an unquoted ': ' that strict YAML parsers reject (Claude Code tolerates it; Codex CLI drops the skill at load). First: {detail}.",
|
|
517
517
|
"doctor.check.skill_md_yaml_invalid.remediation": 'Quote the value with double quotes (`description: "\u2026"`) or rewrite the inner `key: value` token to `key=value`.',
|
|
518
|
+
"doctor.check.router_chain_ref.name": "Router chain refs",
|
|
519
|
+
"doctor.check.router_chain_ref.ok": "Every fabric-* reference in the fabric/ router S_CHAIN points at an installed leaf skill.",
|
|
520
|
+
"doctor.check.router_chain_ref.message.singular": "{count} S_CHAIN reference in the fabric/ router points at a skill not in the install set: {list}. The chain step will dead-end at runtime.",
|
|
521
|
+
"doctor.check.router_chain_ref.message.plural": "{count} S_CHAIN references in the fabric/ router point at skills not in the install set: {list}. Those chain steps will dead-end at runtime.",
|
|
522
|
+
"doctor.check.router_chain_ref.remediation": "Edit the S_CHAIN table in templates/skills/fabric/SKILL.md to reference a real leaf skill (one of the installed fabric-* skills), or remove the stale chain row.",
|
|
518
523
|
"doctor.check.onboard_coverage.name": "Onboard coverage",
|
|
519
524
|
"doctor.check.onboard_coverage.ok.complete": "Onboard coverage: {filledCount}/{total} \u2713 (opted-out: {optedOutCount}).",
|
|
520
525
|
"doctor.check.onboard_coverage.message.incomplete": "Onboard slots not yet covered: [{missingSlots}]. {filledCount}/{total} filled; {optedOutCount} opted-out.",
|
|
@@ -1503,6 +1508,11 @@ var zhCNMessages = {
|
|
|
1503
1508
|
"doctor.check.skill_md_yaml_invalid.message.singular": "{count} \u4E2A SKILL.md frontmatter value \u5305\u542B\u672A\u52A0\u5F15\u53F7\u7684 ': '\uFF0Cstrict YAML parsers \u4F1A\u62D2\u7EDD\uFF08Claude Code tolerates it\uFF1BCodex CLI drops the skill at load\uFF09\u3002\u9996\u4E2A\uFF1A{detail}\u3002",
|
|
1504
1509
|
"doctor.check.skill_md_yaml_invalid.message.plural": "{count} \u4E2A SKILL.md frontmatter values \u5305\u542B\u672A\u52A0\u5F15\u53F7\u7684 ': '\uFF0Cstrict YAML parsers \u4F1A\u62D2\u7EDD\uFF08Claude Code tolerates it\uFF1BCodex CLI drops the skill at load\uFF09\u3002\u9996\u4E2A\uFF1A{detail}\u3002",
|
|
1505
1510
|
"doctor.check.skill_md_yaml_invalid.remediation": '\u4F7F\u7528\u53CC\u5F15\u53F7\u5305\u88F9\u8BE5 value\uFF08`description: "\u2026"`\uFF09\uFF0C\u6216\u5C06\u5185\u90E8\u7684 `key: value` token \u6539\u5199\u4E3A `key=value`\u3002',
|
|
1511
|
+
"doctor.check.router_chain_ref.name": "Router chain refs",
|
|
1512
|
+
"doctor.check.router_chain_ref.ok": "fabric/ \u8DEF\u7531\u5668 S_CHAIN \u91CC\u7684\u6BCF\u4E2A fabric-* \u5F15\u7528\u90FD\u6307\u5411\u5DF2\u5B89\u88C5\u7684 leaf skill\u3002",
|
|
1513
|
+
"doctor.check.router_chain_ref.message.singular": "{count} \u4E2A fabric/ \u8DEF\u7531\u5668 S_CHAIN \u5F15\u7528\u6307\u5411\u4E0D\u5728 install set \u7684 skill\uFF1A{list}\u3002\u8BE5 chain \u6B65\u9AA4\u5728\u8FD0\u884C\u65F6\u4F1A\u65AD\u94FE\u3002",
|
|
1514
|
+
"doctor.check.router_chain_ref.message.plural": "{count} \u4E2A fabric/ \u8DEF\u7531\u5668 S_CHAIN \u5F15\u7528\u6307\u5411\u4E0D\u5728 install set \u7684 skill\uFF1A{list}\u3002\u8FD9\u4E9B chain \u6B65\u9AA4\u5728\u8FD0\u884C\u65F6\u4F1A\u65AD\u94FE\u3002",
|
|
1515
|
+
"doctor.check.router_chain_ref.remediation": "\u7F16\u8F91 templates/skills/fabric/SKILL.md \u7684 S_CHAIN \u8868\uFF0C\u6539\u4E3A\u5F15\u7528\u771F\u5B9E\u7684 leaf skill\uFF08\u5DF2\u5B89\u88C5\u7684 fabric-* \u4E4B\u4E00\uFF09\uFF0C\u6216\u5220\u9664\u8BE5\u9648\u65E7 chain \u884C\u3002",
|
|
1506
1516
|
"doctor.check.onboard_coverage.name": "Onboard coverage",
|
|
1507
1517
|
"doctor.check.onboard_coverage.ok.complete": "Onboard coverage\uFF1A{filledCount}/{total} \u2713\uFF08opted-out\uFF1A{optedOutCount}\uFF09\u3002",
|
|
1508
1518
|
"doctor.check.onboard_coverage.message.incomplete": "\u5C1A\u672A\u8986\u76D6\u7684 onboard slots\uFF1A[{missingSlots}]\u3002{filledCount}/{total} filled\uFF1B{optedOutCount} opted-out\u3002",
|
package/dist/i18n/index.js
CHANGED
|
@@ -229,7 +229,6 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
229
229
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
230
230
|
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
231
231
|
hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
232
|
-
hint_broad_budget_chars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
233
232
|
broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
234
233
|
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
|
|
235
234
|
cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -245,8 +244,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
245
244
|
hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
246
245
|
selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
|
|
247
246
|
plan_context_top_k: z.ZodOptional<z.ZodNumber>;
|
|
248
|
-
|
|
249
|
-
recall_body_budget_bytes: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
recall_relevance_ratio: z.ZodOptional<z.ZodNumber>;
|
|
250
248
|
embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
251
249
|
embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
252
250
|
embed_model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fast-bge-small-zh-v1.5", "fast-multilingual-e5-large", "fast-bge-small-en-v1.5", "fast-bge-small-en", "fast-bge-base-en-v1.5", "fast-bge-base-en", "fast-all-MiniLM-L6-v2"]>>>;
|
|
@@ -279,7 +277,6 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
279
277
|
conflict_lint_similarity_threshold: number;
|
|
280
278
|
onboard_slots_opted_out: string[];
|
|
281
279
|
hint_broad_top_k: number;
|
|
282
|
-
hint_broad_budget_chars: number;
|
|
283
280
|
broad_index_backstop: number;
|
|
284
281
|
cite_policy_enabled: boolean;
|
|
285
282
|
self_archive_policy_enabled: boolean;
|
|
@@ -329,8 +326,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
329
326
|
orphan_demote_draft_days?: number | undefined;
|
|
330
327
|
selection_token_ttl_ms?: number | undefined;
|
|
331
328
|
plan_context_top_k?: number | undefined;
|
|
332
|
-
|
|
333
|
-
recall_body_budget_bytes?: number | undefined;
|
|
329
|
+
recall_relevance_ratio?: number | undefined;
|
|
334
330
|
}, {
|
|
335
331
|
clientPaths?: {
|
|
336
332
|
claudeCodeCLI?: string | undefined;
|
|
@@ -391,7 +387,6 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
391
387
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
392
388
|
onboard_slots_opted_out?: string[] | undefined;
|
|
393
389
|
hint_broad_top_k?: number | undefined;
|
|
394
|
-
hint_broad_budget_chars?: number | undefined;
|
|
395
390
|
broad_index_backstop?: number | undefined;
|
|
396
391
|
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
397
392
|
cite_policy_enabled?: boolean | undefined;
|
|
@@ -407,8 +402,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
407
402
|
hint_reminder_to_context?: boolean | undefined;
|
|
408
403
|
selection_token_ttl_ms?: number | undefined;
|
|
409
404
|
plan_context_top_k?: number | undefined;
|
|
410
|
-
|
|
411
|
-
recall_body_budget_bytes?: number | undefined;
|
|
405
|
+
recall_relevance_ratio?: number | undefined;
|
|
412
406
|
embed_enabled?: boolean | undefined;
|
|
413
407
|
embed_weight?: number | undefined;
|
|
414
408
|
embed_model?: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2" | 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, F as FabricConfig, c as AgentsMeta, L as LedgerEntry } from './index-
|
|
2
|
-
export { d as AgentsMetaCountersEnvelope, e as AgentsMetaKnowledgeTypeCounters, g as AiLedgerEntry, h as AuditMode, C as ClientPaths, D as DefaultLayerFilter, i as FabricLanguage, j as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, k as RuleDescriptionIndexItem, l as auditModeSchema, m as clientPathsSchema, n as defaultLayerFilterSchema, o as fabricLanguageSchema, p as mcpPayloadLimitsSchema, q as nudgeModeSchema, r as observeConfigSchema, s as planContextTopKSchema, t as selectionTokenTtlMsSchema, w as writeRouteSchema } from './index-
|
|
1
|
+
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, F as FabricConfig, c as AgentsMeta, L as LedgerEntry } from './index-D_gT1CEA.js';
|
|
2
|
+
export { d as AgentsMetaCountersEnvelope, e as AgentsMetaKnowledgeTypeCounters, g as AiLedgerEntry, h as AuditMode, C as ClientPaths, D as DefaultLayerFilter, i as FabricLanguage, j as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, k as RuleDescriptionIndexItem, l as auditModeSchema, m as clientPathsSchema, n as defaultLayerFilterSchema, o as fabricLanguageSchema, p as mcpPayloadLimitsSchema, q as nudgeModeSchema, r as observeConfigSchema, s as planContextTopKSchema, t as selectionTokenTtlMsSchema, w as writeRouteSchema } from './index-D_gT1CEA.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';
|
|
@@ -11349,36 +11349,4 @@ declare function parseCiteLine(raw: string): ParseCiteLineResult;
|
|
|
11349
11349
|
*/
|
|
11350
11350
|
declare function tokenize(text: string): string[];
|
|
11351
11351
|
|
|
11352
|
-
type RetrievalBudgetProfile = "conservative" | "balanced" | "generous";
|
|
11353
|
-
interface ResolvedRetrievalBudget {
|
|
11354
|
-
/** MCP layer — max candidates returned by fab_plan_context (count). */
|
|
11355
|
-
topK: number;
|
|
11356
|
-
/** MCP layer — payload soft-warn threshold (bytes). */
|
|
11357
|
-
payloadWarnBytes: number;
|
|
11358
|
-
/** MCP layer — payload hard trim ceiling (bytes). */
|
|
11359
|
-
payloadHardBytes: number;
|
|
11360
|
-
/** Injection layer — SessionStart broad-menu body char budget. */
|
|
11361
|
-
injectionChars: number;
|
|
11362
|
-
bodyBudgetBytes: number;
|
|
11363
|
-
}
|
|
11364
|
-
declare const DEFAULT_RETRIEVAL_BUDGET_PROFILE: RetrievalBudgetProfile;
|
|
11365
|
-
/** The per-field overrides that, when present, take precedence over the profile. */
|
|
11366
|
-
interface RetrievalBudgetOverrides {
|
|
11367
|
-
profile?: RetrievalBudgetProfile;
|
|
11368
|
-
topK?: number;
|
|
11369
|
-
payloadWarnBytes?: number;
|
|
11370
|
-
payloadHardBytes?: number;
|
|
11371
|
-
injectionChars?: number;
|
|
11372
|
-
bodyBudgetBytes?: number;
|
|
11373
|
-
}
|
|
11374
|
-
/**
|
|
11375
|
-
* Resolve the layered retrieval budget: start from the named profile (default
|
|
11376
|
-
* `balanced`), then let any explicitly-supplied per-field override win. Each
|
|
11377
|
-
* field is resolved independently, so an operator can pin a single knob (e.g.
|
|
11378
|
-
* payloadHardBytes) while the rest follow the chosen profile.
|
|
11379
|
-
*/
|
|
11380
|
-
declare function resolveRetrievalBudget(overrides?: RetrievalBudgetOverrides): ResolvedRetrievalBudget;
|
|
11381
|
-
/** Exposed for tests / introspection — the raw profile table. */
|
|
11382
|
-
declare function retrievalBudgetProfile(profile: RetrievalBudgetProfile): ResolvedRetrievalBudget;
|
|
11383
|
-
|
|
11384
|
-
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type CandidateFileEntry, type CandidateFileFamily, type CiteCommitment, type CiteCommitmentOperator, type CiteCommitmentOperatorKind, type CiteContractPolicyActivatedEvent, type CitePolicyActivatedEvent, type CiteTag, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type ClientCapabilitySnapshotEvent, type CodexSkillPathMigratedEvent, type CrossStoreLintInput, type CrossStoreRefViolation, DEFAULT_RETRIEVAL_BUDGET_PROFILE, type DebugBundle, type DebugBundleInput, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EntryLayer, type EntryScopeMetadata, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, FabricConfig, type FabricConfigSchemaShape, type FabricEvent, type FailureStage, type FailureTrace, type FileMutatedEvent, type FindStoreExecutableViolationsOptions, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, GLOBAL_BINDINGS_DIR, GLOBAL_REF_PATTERN, GLOBAL_STATE_DIR, type GlobalConfig, type GlobalRef, type GraphEdgeCandidateRequestedEvent, type HookSignalEmittedEvent, type HookSurfaceEmittedEvent, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, type InitStoreOptions, type InstallDiffAppliedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, KNOWN_SCOPE_PREFIXES, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeBodyReadEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeEnrichedEvent, type KnowledgeIdRedirectEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgeModifiedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeProvenance, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, type KnowledgeUnarchivedEvent, Layer, type LedgerAppendedEvent, LedgerEntry, type LlmJudgeRunEvent, type LocalKnowledgeId, type LockApprovedEvent, type LockDriftEvent, MCP_STORE_AWARE_CONTRACTS, MCP_STORE_AWARE_TOOLS, type McpEventLedgerEvent, type McpStdioTraceEvent, type McpStoreAwareContract, type McpStoreAwareTool, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, type MountedStore, type MountedStoreDir, ONBOARD_SLOT_NAMES, ONBOARD_SLOT_TOTAL, type OnboardSlot, PARITY_CLIENTS, PARITY_SURFACES, PERSONAL_SCOPE, PERSONAL_STORE_SENTINEL, PROJECT_ROOT_SIGNALS, type PanelFieldGroup, type PanelFieldKey, type PanelFieldMeta, type ParityCapability, type ParityClient, type ParityClientExpectation, type ParityMatrix, type ParitySurface, type ParseCiteLineResult, type ParsedGlobalRef, type PayloadGuardObservedEvent, type PendingAutoArchivedEvent, type PrecompactObservedEvent, type ProjectRootGoldenCase, type ProjectRootResolution, type ProjectRootResolver, type ProjectRootSignal, type ProjectRootSignals, type QualifiedCandidate, type QualifiedIdResolution, REDACTION_PLACEHOLDER_PREFIX, type ReadSetEntry, type ReadSetGoldenCase, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, type RequiredStoreEntry, type ResolutionCandidate, type ResolutionResult, type ResolutionWarning, type ResolveOptions, type ResolvedBindingsSnapshot, type ResolvedEntry, type ResolvedRetrievalBudget, type RetrievalBudgetOverrides, type RetrievalBudgetProfile, SCOPE_COORDINATE_PATTERN, STORES_ROOT_DIR, STORE_ALIAS_PATTERN, STORE_GITIGNORE, STORE_KNOWLEDGE_TYPE_DIRS, STORE_LAYOUT, STORE_MOUNT_GROUPS, STORE_MOUNT_NAME_PATTERN, STORE_PENDING_DIR, STORE_PROJECT_ID_PATTERN, STORE_RESOLVER_WARNING_CODES, STORE_UUID_PATTERN, type ScanRecommendationInput, type ScopeCoordinate, type SecretFinding, type ServeLockClearedEvent, type SessionArchiveAttemptedEvent, type SessionEndedEvent, type SkillInvocationCompletedEvent, type SkillInvocationStartedEvent, type SkillPhaseTransitionEvent, type SkillTriggerCandidateEvent, StableId, type StoreAwareEntry, type StoreCounters, type StoreExplain, type StoreIdentity, type StoreKnowledgeRef, type StoreLayout, type StoreMountGroup, type StoreProject, type StoreProjectsFile, type StoreReadSet, type StoreResolveInput, type StoreResolver, type StoreResolverWarning, type StoreResolverWarningCode, type StoreVisibility, Translator, UID_SEGMENT_PATTERN, type Uid, type ValidateResult, type WriteBindingsSnapshotOptions, type WriteTarget, type WrittenToStore, addMountedStore, addStoreProject, agentsIdentitySourceSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aggregatePendingAcrossStores, aiLedgerEntrySchema, allocateKnowledgeId, allocateStoreKnowledgeId, assistantTurnObservedEventSchema, bindRequiredStore, bindingsSnapshotPath, buildDebugBundle, buildFailureTrace, buildScanRecommendations, buildStoreResolveInput, candidateFileEntrySchema, citeContractPolicyActivatedEventSchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, clientCapabilitySnapshotEventSchema, codexSkillPathMigratedEventSchema, createProjectRootResolver, createStoreResolver, defaultAgentsMetaCounters, deriveAgentsMetaIdentitySource, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, deriveMountLabel, detachMountedStore, disambiguateAlias, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, entryScopeMetadataSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, explainStore, fabricConfigSchema, fabricEventSchema, fileMutatedEventSchema, findMountedStore, findStoreExecutableViolations, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, formatGlobalRef, getPanelFieldByKey, getPanelFields, globalConfigPath, globalConfigSchema, globalRefSchema, graphEdgeCandidateRequestedEventSchema, hasSecrets, hookSignalEmittedEventSchema, hookSurfaceEmittedEventSchema, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, initStore, installDiffAppliedEventSchema, isKnowledgeStableId, isPersonalLeakIntoSharedStore, isPersonalScope, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeBodyReadEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeEnrichedEventSchema, knowledgeIdRedirectEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgeModifiedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeProvenanceSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, knowledgeUnarchivedEventSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lintCrossStoreReferences, listStoreKnowledge, llmJudgeRunEventSchema, loadGlobalConfig, loadProjectConfig, localKnowledgeIdSchema, lockApprovedEventSchema, lockDriftEventSchema, mcpEventLedgerEventSchema, mcpStdioTraceEventSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, mountedStoreSchema, normalizeCiteTag, onboardSlotSchema, parityCapabilitySchema, parityClientExpectationSchema, parityClientSchema, parityMatrixSchema, paritySurfaceSchema, parseCiteLine, parseGlobalRef, payloadGuardObservedEventSchema, pendingAutoArchivedEventSchema, precompactObservedEventSchema, projectConfigPath, projectRootGoldenCaseSchema, projectRootGoldenFileSchema, projectRootResolutionSchema, projectRootSignalSchema, projectRootSignalsSchema, readBindingsSnapshot, readKnowledgeAcrossStores, readSetEntrySchema, readSetGoldenCaseSchema, readSetGoldenFileSchema, readStoreCounters, readStoreIdentity, readStoreIdentityAsync, readStoreProjects, reapplyCompletedEventSchema, recognizeStoreDir, reconcileStoreCounters, redactPii, redactSecrets, relevanceMigrationRunEventSchema, requiredStoreEntrySchema, resolveCandidates, resolveGlobalRoot, resolveRetrievalBudget, resolveStoreQualifiedId, resolveWorkspaceBindingId, resolvedBindingsSnapshotSchema, retrievalBudgetProfile, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, saveGlobalConfig, saveProjectConfig, scanForSecrets, scopeCoordinateSchema, scopeRoot, scrubRemoteUrl, serveLockClearedEventSchema, sessionArchiveAttemptedEventSchema, sessionEndedEventSchema, skillInvocationCompletedEventSchema, skillInvocationStartedEventSchema, skillPhaseTransitionEventSchema, skillTriggerCandidateEventSchema, storeAliasSchema, storeAwareEntrySchema, storeCountersPath, storeCountersSchema, storeHasProject, storeIdentitySchema, storeKnowledgeTypeDir, storeMountGroup, storeMountNameSchema, storeMountSubPath, storeProjectSchema, storeProjectsFileSchema, storeReadSetSchema, storeRelativePath, storeRelativePathForMount, storeResolveInputSchema, storeResolverWarningCodeSchema, storeResolverWarningSchema, storeUuidSchema, tokenize, uidSchema, withDerivedAgentsMetaNodeDefaults, writeBindingsSnapshot, writeTargetSchema, writtenToStoreSchema };
|
|
11352
|
+
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type CandidateFileEntry, type CandidateFileFamily, type CiteCommitment, type CiteCommitmentOperator, type CiteCommitmentOperatorKind, type CiteContractPolicyActivatedEvent, type CitePolicyActivatedEvent, type CiteTag, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type ClientCapabilitySnapshotEvent, type CodexSkillPathMigratedEvent, type CrossStoreLintInput, type CrossStoreRefViolation, type DebugBundle, type DebugBundleInput, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EntryLayer, type EntryScopeMetadata, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, FabricConfig, type FabricConfigSchemaShape, type FabricEvent, type FailureStage, type FailureTrace, type FileMutatedEvent, type FindStoreExecutableViolationsOptions, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, GLOBAL_BINDINGS_DIR, GLOBAL_REF_PATTERN, GLOBAL_STATE_DIR, type GlobalConfig, type GlobalRef, type GraphEdgeCandidateRequestedEvent, type HookSignalEmittedEvent, type HookSurfaceEmittedEvent, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, type InitStoreOptions, type InstallDiffAppliedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, KNOWN_SCOPE_PREFIXES, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeBodyReadEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeEnrichedEvent, type KnowledgeIdRedirectEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgeModifiedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeProvenance, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, type KnowledgeUnarchivedEvent, Layer, type LedgerAppendedEvent, LedgerEntry, type LlmJudgeRunEvent, type LocalKnowledgeId, type LockApprovedEvent, type LockDriftEvent, MCP_STORE_AWARE_CONTRACTS, MCP_STORE_AWARE_TOOLS, type McpEventLedgerEvent, type McpStdioTraceEvent, type McpStoreAwareContract, type McpStoreAwareTool, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, type MountedStore, type MountedStoreDir, ONBOARD_SLOT_NAMES, ONBOARD_SLOT_TOTAL, type OnboardSlot, PARITY_CLIENTS, PARITY_SURFACES, PERSONAL_SCOPE, PERSONAL_STORE_SENTINEL, PROJECT_ROOT_SIGNALS, type PanelFieldGroup, type PanelFieldKey, type PanelFieldMeta, type ParityCapability, type ParityClient, type ParityClientExpectation, type ParityMatrix, type ParitySurface, type ParseCiteLineResult, type ParsedGlobalRef, type PayloadGuardObservedEvent, type PendingAutoArchivedEvent, type PrecompactObservedEvent, type ProjectRootGoldenCase, type ProjectRootResolution, type ProjectRootResolver, type ProjectRootSignal, type ProjectRootSignals, type QualifiedCandidate, type QualifiedIdResolution, REDACTION_PLACEHOLDER_PREFIX, type ReadSetEntry, type ReadSetGoldenCase, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, type RequiredStoreEntry, type ResolutionCandidate, type ResolutionResult, type ResolutionWarning, type ResolveOptions, type ResolvedBindingsSnapshot, type ResolvedEntry, SCOPE_COORDINATE_PATTERN, STORES_ROOT_DIR, STORE_ALIAS_PATTERN, STORE_GITIGNORE, STORE_KNOWLEDGE_TYPE_DIRS, STORE_LAYOUT, STORE_MOUNT_GROUPS, STORE_MOUNT_NAME_PATTERN, STORE_PENDING_DIR, STORE_PROJECT_ID_PATTERN, STORE_RESOLVER_WARNING_CODES, STORE_UUID_PATTERN, type ScanRecommendationInput, type ScopeCoordinate, type SecretFinding, type ServeLockClearedEvent, type SessionArchiveAttemptedEvent, type SessionEndedEvent, type SkillInvocationCompletedEvent, type SkillInvocationStartedEvent, type SkillPhaseTransitionEvent, type SkillTriggerCandidateEvent, StableId, type StoreAwareEntry, type StoreCounters, type StoreExplain, type StoreIdentity, type StoreKnowledgeRef, type StoreLayout, type StoreMountGroup, type StoreProject, type StoreProjectsFile, type StoreReadSet, type StoreResolveInput, type StoreResolver, type StoreResolverWarning, type StoreResolverWarningCode, type StoreVisibility, Translator, UID_SEGMENT_PATTERN, type Uid, type ValidateResult, type WriteBindingsSnapshotOptions, type WriteTarget, type WrittenToStore, addMountedStore, addStoreProject, agentsIdentitySourceSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aggregatePendingAcrossStores, aiLedgerEntrySchema, allocateKnowledgeId, allocateStoreKnowledgeId, assistantTurnObservedEventSchema, bindRequiredStore, bindingsSnapshotPath, buildDebugBundle, buildFailureTrace, buildScanRecommendations, buildStoreResolveInput, candidateFileEntrySchema, citeContractPolicyActivatedEventSchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, clientCapabilitySnapshotEventSchema, codexSkillPathMigratedEventSchema, createProjectRootResolver, createStoreResolver, defaultAgentsMetaCounters, deriveAgentsMetaIdentitySource, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, deriveMountLabel, detachMountedStore, disambiguateAlias, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, entryScopeMetadataSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, explainStore, fabricConfigSchema, fabricEventSchema, fileMutatedEventSchema, findMountedStore, findStoreExecutableViolations, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, formatGlobalRef, getPanelFieldByKey, getPanelFields, globalConfigPath, globalConfigSchema, globalRefSchema, graphEdgeCandidateRequestedEventSchema, hasSecrets, hookSignalEmittedEventSchema, hookSurfaceEmittedEventSchema, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, initStore, installDiffAppliedEventSchema, isKnowledgeStableId, isPersonalLeakIntoSharedStore, isPersonalScope, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeBodyReadEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeEnrichedEventSchema, knowledgeIdRedirectEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgeModifiedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeProvenanceSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, knowledgeUnarchivedEventSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lintCrossStoreReferences, listStoreKnowledge, llmJudgeRunEventSchema, loadGlobalConfig, loadProjectConfig, localKnowledgeIdSchema, lockApprovedEventSchema, lockDriftEventSchema, mcpEventLedgerEventSchema, mcpStdioTraceEventSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, mountedStoreSchema, normalizeCiteTag, onboardSlotSchema, parityCapabilitySchema, parityClientExpectationSchema, parityClientSchema, parityMatrixSchema, paritySurfaceSchema, parseCiteLine, parseGlobalRef, payloadGuardObservedEventSchema, pendingAutoArchivedEventSchema, precompactObservedEventSchema, projectConfigPath, projectRootGoldenCaseSchema, projectRootGoldenFileSchema, projectRootResolutionSchema, projectRootSignalSchema, projectRootSignalsSchema, readBindingsSnapshot, readKnowledgeAcrossStores, readSetEntrySchema, readSetGoldenCaseSchema, readSetGoldenFileSchema, readStoreCounters, readStoreIdentity, readStoreIdentityAsync, readStoreProjects, reapplyCompletedEventSchema, recognizeStoreDir, reconcileStoreCounters, redactPii, redactSecrets, relevanceMigrationRunEventSchema, requiredStoreEntrySchema, resolveCandidates, resolveGlobalRoot, resolveStoreQualifiedId, resolveWorkspaceBindingId, resolvedBindingsSnapshotSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, saveGlobalConfig, saveProjectConfig, scanForSecrets, scopeCoordinateSchema, scopeRoot, scrubRemoteUrl, serveLockClearedEventSchema, sessionArchiveAttemptedEventSchema, sessionEndedEventSchema, skillInvocationCompletedEventSchema, skillInvocationStartedEventSchema, skillPhaseTransitionEventSchema, skillTriggerCandidateEventSchema, storeAliasSchema, storeAwareEntrySchema, storeCountersPath, storeCountersSchema, storeHasProject, storeIdentitySchema, storeKnowledgeTypeDir, storeMountGroup, storeMountNameSchema, storeMountSubPath, storeProjectSchema, storeProjectsFileSchema, storeReadSetSchema, storeRelativePath, storeRelativePathForMount, storeResolveInputSchema, storeResolverWarningCodeSchema, storeResolverWarningSchema, storeUuidSchema, tokenize, uidSchema, withDerivedAgentsMetaNodeDefaults, writeBindingsSnapshot, writeTargetSchema, writtenToStoreSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
BOOTSTRAP_CANONICAL_BY_LOCALE,
|
|
3
|
+
BOOTSTRAP_CANONICAL_EN,
|
|
4
|
+
BOOTSTRAP_CANONICAL_ZH,
|
|
5
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
6
|
+
BOOTSTRAP_MARKER_END,
|
|
7
|
+
BOOTSTRAP_REGEX,
|
|
8
|
+
matchBootstrapCanonicalLocale,
|
|
9
|
+
resolveBootstrapCanonical
|
|
10
|
+
} from "./chunk-BDJQIOQO.js";
|
|
2
11
|
import {
|
|
3
12
|
PROTECTED_TOKENS,
|
|
4
13
|
createTranslator,
|
|
@@ -6,7 +15,42 @@ import {
|
|
|
6
15
|
enMessages,
|
|
7
16
|
resolveFabricLocale,
|
|
8
17
|
zhCNMessages
|
|
9
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AQMDXC6J.js";
|
|
19
|
+
import {
|
|
20
|
+
GLOBAL_BINDINGS_DIR,
|
|
21
|
+
GLOBAL_STATE_DIR,
|
|
22
|
+
PERSONAL_STORE_SENTINEL,
|
|
23
|
+
STORES_ROOT_DIR,
|
|
24
|
+
STORE_ALIAS_PATTERN,
|
|
25
|
+
STORE_KNOWLEDGE_TYPE_DIRS,
|
|
26
|
+
STORE_LAYOUT,
|
|
27
|
+
STORE_MOUNT_GROUPS,
|
|
28
|
+
STORE_MOUNT_NAME_PATTERN,
|
|
29
|
+
STORE_PROJECT_ID_PATTERN,
|
|
30
|
+
STORE_UUID_PATTERN,
|
|
31
|
+
deriveMountLabel,
|
|
32
|
+
detectNodeLocale,
|
|
33
|
+
globalConfigPath,
|
|
34
|
+
globalConfigSchema,
|
|
35
|
+
loadGlobalConfig,
|
|
36
|
+
mountedStoreSchema,
|
|
37
|
+
normalizeLocale,
|
|
38
|
+
requiredStoreEntrySchema,
|
|
39
|
+
resolveGlobalLocale,
|
|
40
|
+
resolveGlobalRoot,
|
|
41
|
+
saveGlobalConfig,
|
|
42
|
+
storeAliasSchema,
|
|
43
|
+
storeIdentitySchema,
|
|
44
|
+
storeKnowledgeTypeDir,
|
|
45
|
+
storeMountGroup,
|
|
46
|
+
storeMountNameSchema,
|
|
47
|
+
storeMountSubPath,
|
|
48
|
+
storeProjectSchema,
|
|
49
|
+
storeProjectsFileSchema,
|
|
50
|
+
storeRelativePath,
|
|
51
|
+
storeRelativePathForMount,
|
|
52
|
+
storeUuidSchema
|
|
53
|
+
} from "./chunk-2GLIAZ5M.js";
|
|
10
54
|
import {
|
|
11
55
|
atomicWriteJson,
|
|
12
56
|
withFileLock
|
|
@@ -66,51 +110,7 @@ import {
|
|
|
66
110
|
scopeRoot,
|
|
67
111
|
structuredWarningSchema
|
|
68
112
|
} from "./chunk-5AKCRBKJ.js";
|
|
69
|
-
import
|
|
70
|
-
BOOTSTRAP_CANONICAL_BY_LOCALE,
|
|
71
|
-
BOOTSTRAP_CANONICAL_EN,
|
|
72
|
-
BOOTSTRAP_CANONICAL_ZH,
|
|
73
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
74
|
-
BOOTSTRAP_MARKER_END,
|
|
75
|
-
BOOTSTRAP_REGEX,
|
|
76
|
-
matchBootstrapCanonicalLocale,
|
|
77
|
-
resolveBootstrapCanonical
|
|
78
|
-
} from "./chunk-BDJQIOQO.js";
|
|
79
|
-
import {
|
|
80
|
-
GLOBAL_BINDINGS_DIR,
|
|
81
|
-
GLOBAL_STATE_DIR,
|
|
82
|
-
PERSONAL_STORE_SENTINEL,
|
|
83
|
-
STORES_ROOT_DIR,
|
|
84
|
-
STORE_ALIAS_PATTERN,
|
|
85
|
-
STORE_KNOWLEDGE_TYPE_DIRS,
|
|
86
|
-
STORE_LAYOUT,
|
|
87
|
-
STORE_MOUNT_GROUPS,
|
|
88
|
-
STORE_MOUNT_NAME_PATTERN,
|
|
89
|
-
STORE_PROJECT_ID_PATTERN,
|
|
90
|
-
STORE_UUID_PATTERN,
|
|
91
|
-
deriveMountLabel,
|
|
92
|
-
detectNodeLocale,
|
|
93
|
-
globalConfigPath,
|
|
94
|
-
globalConfigSchema,
|
|
95
|
-
loadGlobalConfig,
|
|
96
|
-
mountedStoreSchema,
|
|
97
|
-
normalizeLocale,
|
|
98
|
-
requiredStoreEntrySchema,
|
|
99
|
-
resolveGlobalLocale,
|
|
100
|
-
resolveGlobalRoot,
|
|
101
|
-
saveGlobalConfig,
|
|
102
|
-
storeAliasSchema,
|
|
103
|
-
storeIdentitySchema,
|
|
104
|
-
storeKnowledgeTypeDir,
|
|
105
|
-
storeMountGroup,
|
|
106
|
-
storeMountNameSchema,
|
|
107
|
-
storeMountSubPath,
|
|
108
|
-
storeProjectSchema,
|
|
109
|
-
storeProjectsFileSchema,
|
|
110
|
-
storeRelativePath,
|
|
111
|
-
storeRelativePathForMount,
|
|
112
|
-
storeUuidSchema
|
|
113
|
-
} from "./chunk-2GLIAZ5M.js";
|
|
113
|
+
import "./chunk-LXNCAKJZ.js";
|
|
114
114
|
|
|
115
115
|
// src/schemas/agents-meta.ts
|
|
116
116
|
import { z } from "zod";
|
|
@@ -637,13 +637,9 @@ var fabricConfigSchema = z5.object({
|
|
|
637
637
|
// TRUNCATION_THRESHOLD=12 grouped-render kicks in. Mirrors the rc.7 T7 +
|
|
638
638
|
// archive_max_* pattern of externalizing previously-hardcoded thresholds.
|
|
639
639
|
hint_broad_top_k: z5.number().int().min(1).max(50).optional().default(8),
|
|
640
|
-
//
|
|
641
|
-
//
|
|
642
|
-
//
|
|
643
|
-
// collapses to a single "N more omitted" marker so a large corpus cannot blow
|
|
644
|
-
// the agent's working memory. Default 2000 (~one screenful); 0 disables the
|
|
645
|
-
// budget. Read by knowledge-hint-broad.cjs via readConfigNumber. Range 0..20000.
|
|
646
|
-
hint_broad_budget_chars: z5.number().int().min(0).max(2e4).optional().default(2e3),
|
|
640
|
+
// KT-DEC-0036: the SessionStart broad-menu is now index-only (title + summary
|
|
641
|
+
// per always-active entry, no eager body), so the former `hint_broad_budget_chars`
|
|
642
|
+
// body char-budget knob was retired — there is no rendered body left to bound.
|
|
647
643
|
// W4-1 (KT-DEC-0028 / KT-MOD-0001): scale backstop for the FULL broad index.
|
|
648
644
|
// After W2-1 retired the hint_broad_top_k hard cap, the broad banner shows
|
|
649
645
|
// every broad entry (completeness); this is the only guard — once a store's
|
|
@@ -755,22 +751,16 @@ var fabricConfigSchema = z5.object({
|
|
|
755
751
|
// applied after BM25 ranking. Absent → library default (24). See
|
|
756
752
|
// planContextTopKSchema for the range/calibration rationale.
|
|
757
753
|
plan_context_top_k: planContextTopKSchema.optional(),
|
|
758
|
-
//
|
|
759
|
-
//
|
|
760
|
-
//
|
|
761
|
-
//
|
|
762
|
-
//
|
|
763
|
-
//
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
//
|
|
767
|
-
//
|
|
768
|
-
// (balanced = 4096). Bump it if the lean default drops too many bodies and the
|
|
769
|
-
// AI is not following up with fab_get_knowledge_sections (R2 observation).
|
|
770
|
-
// Range 256B..1MB — below 256B even one body never fits; above 1MB defeats the
|
|
771
|
-
// whole lean-recall purpose. Overrides the profile when set, like the other
|
|
772
|
-
// per-field knobs.
|
|
773
|
-
recall_body_budget_bytes: z5.number().int().min(256).max(1048576).optional(),
|
|
754
|
+
// KT-DEC-0038: ratio-to-top relevance floor (α) for recall / plan_context.
|
|
755
|
+
// After ranking, keep only candidates whose fused score >= α × the top
|
|
756
|
+
// candidate's score — self-normalizing against the current query's max, so it
|
|
757
|
+
// is immune to BM25's uncalibrated cross-query scale. top_k is a pure safety
|
|
758
|
+
// cap above this. Range 0..1; absent → library default (0.25). 0 disables the
|
|
759
|
+
// floor (keep all up to top_k).
|
|
760
|
+
recall_relevance_ratio: z5.number().min(0).max(1).optional(),
|
|
761
|
+
// KT-DEC-0037: the `retrieval_budget_profile` enum was deleted. top_k is the
|
|
762
|
+
// sole retrieval knob (plan_context_top_k above); payload limits pass through
|
|
763
|
+
// explicit `mcpPayloadLimits`, else the fixed PAYLOAD_LIMIT_DEFAULT_* guardrail.
|
|
774
764
|
// v2.2 C2-vector (W2-T7): OPTIONAL dense-embedding semantic retrieval, layered
|
|
775
765
|
// as a recall supplement after BM25. Default OFF (`--no-embed` is the baseline);
|
|
776
766
|
// requires the operator to install the optional `fastembed` package — absent →
|
|
@@ -3255,47 +3245,6 @@ function tokenize(text) {
|
|
|
3255
3245
|
}
|
|
3256
3246
|
return tokens;
|
|
3257
3247
|
}
|
|
3258
|
-
|
|
3259
|
-
// src/retrieval-budget.ts
|
|
3260
|
-
var PROFILES = {
|
|
3261
|
-
conservative: {
|
|
3262
|
-
topK: 12,
|
|
3263
|
-
payloadWarnBytes: 8192,
|
|
3264
|
-
payloadHardBytes: 32768,
|
|
3265
|
-
injectionChars: 1e3,
|
|
3266
|
-
bodyBudgetBytes: 2048
|
|
3267
|
-
},
|
|
3268
|
-
balanced: {
|
|
3269
|
-
topK: 24,
|
|
3270
|
-
payloadWarnBytes: 16384,
|
|
3271
|
-
payloadHardBytes: 65536,
|
|
3272
|
-
injectionChars: 2e3,
|
|
3273
|
-
// grill-report C-009: ~4KB ≈ 1~3 typical bodies. Independent of the 16KB
|
|
3274
|
-
// payloadWarnBytes (the response cap), small on purpose — see field doc.
|
|
3275
|
-
bodyBudgetBytes: 4096
|
|
3276
|
-
},
|
|
3277
|
-
generous: {
|
|
3278
|
-
topK: 48,
|
|
3279
|
-
payloadWarnBytes: 32768,
|
|
3280
|
-
payloadHardBytes: 131072,
|
|
3281
|
-
injectionChars: 4e3,
|
|
3282
|
-
bodyBudgetBytes: 8192
|
|
3283
|
-
}
|
|
3284
|
-
};
|
|
3285
|
-
var DEFAULT_RETRIEVAL_BUDGET_PROFILE = "balanced";
|
|
3286
|
-
function resolveRetrievalBudget(overrides) {
|
|
3287
|
-
const base = PROFILES[overrides?.profile ?? DEFAULT_RETRIEVAL_BUDGET_PROFILE];
|
|
3288
|
-
return {
|
|
3289
|
-
topK: overrides?.topK ?? base.topK,
|
|
3290
|
-
payloadWarnBytes: overrides?.payloadWarnBytes ?? base.payloadWarnBytes,
|
|
3291
|
-
payloadHardBytes: overrides?.payloadHardBytes ?? base.payloadHardBytes,
|
|
3292
|
-
injectionChars: overrides?.injectionChars ?? base.injectionChars,
|
|
3293
|
-
bodyBudgetBytes: overrides?.bodyBudgetBytes ?? base.bodyBudgetBytes
|
|
3294
|
-
};
|
|
3295
|
-
}
|
|
3296
|
-
function retrievalBudgetProfile(profile) {
|
|
3297
|
-
return PROFILES[profile];
|
|
3298
|
-
}
|
|
3299
3248
|
export {
|
|
3300
3249
|
AGENTS_META_IDENTITY_SOURCES,
|
|
3301
3250
|
AGENTS_META_TOPOLOGY_TYPES,
|
|
@@ -3306,7 +3255,6 @@ export {
|
|
|
3306
3255
|
BOOTSTRAP_MARKER_BEGIN,
|
|
3307
3256
|
BOOTSTRAP_MARKER_END,
|
|
3308
3257
|
BOOTSTRAP_REGEX,
|
|
3309
|
-
DEFAULT_RETRIEVAL_BUDGET_PROFILE,
|
|
3310
3258
|
FabExtractKnowledgeInputSchema,
|
|
3311
3259
|
FabExtractKnowledgeInputShape,
|
|
3312
3260
|
FabExtractKnowledgeOutputSchema,
|
|
@@ -3557,11 +3505,9 @@ export {
|
|
|
3557
3505
|
resolveFabricLocale,
|
|
3558
3506
|
resolveGlobalLocale,
|
|
3559
3507
|
resolveGlobalRoot,
|
|
3560
|
-
resolveRetrievalBudget,
|
|
3561
3508
|
resolveStoreQualifiedId,
|
|
3562
3509
|
resolveWorkspaceBindingId,
|
|
3563
3510
|
resolvedBindingsSnapshotSchema,
|
|
3564
|
-
retrievalBudgetProfile,
|
|
3565
3511
|
ruleDescriptionIndexItemSchema,
|
|
3566
3512
|
ruleDescriptionSchema,
|
|
3567
3513
|
saveGlobalConfig,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as AgentsIdentitySource, c as AgentsMeta, d as AgentsMetaCountersEnvelope, e as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, g as AiLedgerEntry, h as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, i as FabricLanguage, j as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, M as McpPayloadLimits, R as RuleDescription, k as RuleDescriptionIndexItem } from '../index-
|
|
1
|
+
export { a as AgentsIdentitySource, c as AgentsMeta, d as AgentsMetaCountersEnvelope, e as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, g as AiLedgerEntry, h as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, i as FabricLanguage, j as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, M as McpPayloadLimits, R as RuleDescription, k as RuleDescriptionIndexItem } from '../index-D_gT1CEA.js';
|
|
2
2
|
import 'zod';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fenglimg/fabric-shared",
|
|
3
|
-
"version": "2.2.0-rc.
|
|
3
|
+
"version": "2.2.0-rc.9",
|
|
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>",
|