@fenglimg/fabric-shared 2.0.0-rc.33 → 2.0.0-rc.34
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.
|
@@ -176,6 +176,9 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
176
176
|
archive_digest_max_sessions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
177
177
|
review_topic_result_cap: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
178
178
|
review_stale_pending_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
179
|
+
reverse_unarchive_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
180
|
+
reverse_unarchive_dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
181
|
+
cite_evict_interval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
179
182
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
180
183
|
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
181
184
|
hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -210,6 +213,9 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
210
213
|
archive_digest_max_sessions: number;
|
|
211
214
|
review_topic_result_cap: number;
|
|
212
215
|
review_stale_pending_days: number;
|
|
216
|
+
reverse_unarchive_enabled: boolean;
|
|
217
|
+
reverse_unarchive_dry_run: boolean;
|
|
218
|
+
cite_evict_interval: number;
|
|
213
219
|
onboard_slots_opted_out: string[];
|
|
214
220
|
hint_broad_top_k: number;
|
|
215
221
|
hint_narrow_top_k: number;
|
|
@@ -268,6 +274,9 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
268
274
|
archive_digest_max_sessions?: number | undefined;
|
|
269
275
|
review_topic_result_cap?: number | undefined;
|
|
270
276
|
review_stale_pending_days?: number | undefined;
|
|
277
|
+
reverse_unarchive_enabled?: boolean | undefined;
|
|
278
|
+
reverse_unarchive_dry_run?: boolean | undefined;
|
|
279
|
+
cite_evict_interval?: number | undefined;
|
|
271
280
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
272
281
|
onboard_slots_opted_out?: string[] | undefined;
|
|
273
282
|
hint_broad_top_k?: number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsLayer, c as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, d as AgentsMeta, L as LedgerEntry } from './index-
|
|
2
|
-
export { e as AgentsActivationTier, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, i as AgentsMetaNodeActivation, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem, o as auditModeSchema, p as clientPathsSchema, q as defaultLayerFilterSchema, r as fabricLanguageSchema, s as mcpPayloadLimitsSchema, t as selectionTokenTtlMsSchema } from './index-
|
|
1
|
+
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsLayer, c as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, d as AgentsMeta, L as LedgerEntry } from './index-BjssYQb3.js';
|
|
2
|
+
export { e as AgentsActivationTier, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, i as AgentsMetaNodeActivation, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem, o as auditModeSchema, p as clientPathsSchema, q as defaultLayerFilterSchema, r as fabricLanguageSchema, s as mcpPayloadLimitsSchema, t as selectionTokenTtlMsSchema } from './index-BjssYQb3.js';
|
|
3
3
|
export { Locale, Messages, PROTECTED_TOKENS, ProtectedToken, TranslationKey, Translator, createTranslator, defaultMessages, detectNodeLocale, enMessages, normalizeLocale, resolveFabricLocale, zhCNMessages } from './i18n/index.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { Layer, KnowledgeType, StableId } from './schemas/api-contracts.js';
|
|
@@ -5843,6 +5843,46 @@ declare const knowledgeArchiveAttemptedEventSchema: z.ZodObject<{
|
|
|
5843
5843
|
session_id?: string | undefined;
|
|
5844
5844
|
reason?: string | undefined;
|
|
5845
5845
|
}>;
|
|
5846
|
+
declare const knowledgeUnarchivedEventSchema: z.ZodObject<{
|
|
5847
|
+
event_type: z.ZodLiteral<"knowledge_unarchived">;
|
|
5848
|
+
stable_id: z.ZodOptional<z.ZodString>;
|
|
5849
|
+
timestamp: z.ZodString;
|
|
5850
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
5851
|
+
archive_path: z.ZodOptional<z.ZodString>;
|
|
5852
|
+
restored_to: z.ZodOptional<z.ZodString>;
|
|
5853
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
5854
|
+
id: z.ZodString;
|
|
5855
|
+
ts: z.ZodNumber;
|
|
5856
|
+
schema_version: z.ZodLiteral<1>;
|
|
5857
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
5858
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
5859
|
+
}, "strip", z.ZodTypeAny, {
|
|
5860
|
+
id: string;
|
|
5861
|
+
ts: number;
|
|
5862
|
+
schema_version: 1;
|
|
5863
|
+
kind: "fabric-event";
|
|
5864
|
+
event_type: "knowledge_unarchived";
|
|
5865
|
+
timestamp: string;
|
|
5866
|
+
stable_id?: string | undefined;
|
|
5867
|
+
correlation_id?: string | undefined;
|
|
5868
|
+
session_id?: string | undefined;
|
|
5869
|
+
reason?: string | undefined;
|
|
5870
|
+
archive_path?: string | undefined;
|
|
5871
|
+
restored_to?: string | undefined;
|
|
5872
|
+
}, {
|
|
5873
|
+
id: string;
|
|
5874
|
+
ts: number;
|
|
5875
|
+
schema_version: 1;
|
|
5876
|
+
kind: "fabric-event";
|
|
5877
|
+
event_type: "knowledge_unarchived";
|
|
5878
|
+
timestamp: string;
|
|
5879
|
+
stable_id?: string | undefined;
|
|
5880
|
+
correlation_id?: string | undefined;
|
|
5881
|
+
session_id?: string | undefined;
|
|
5882
|
+
reason?: string | undefined;
|
|
5883
|
+
archive_path?: string | undefined;
|
|
5884
|
+
restored_to?: string | undefined;
|
|
5885
|
+
}>;
|
|
5846
5886
|
declare const knowledgeDeferredEventSchema: z.ZodObject<{
|
|
5847
5887
|
event_type: z.ZodLiteral<"knowledge_deferred">;
|
|
5848
5888
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
@@ -6283,10 +6323,10 @@ declare const eventsRotatedEventSchema: z.ZodObject<{
|
|
|
6283
6323
|
schema_version: 1;
|
|
6284
6324
|
kind: "fabric-event";
|
|
6285
6325
|
event_type: "events_rotated";
|
|
6326
|
+
archive_path: string;
|
|
6286
6327
|
cutoff_ts: string;
|
|
6287
6328
|
archived_count: number;
|
|
6288
6329
|
kept_count: number;
|
|
6289
|
-
archive_path: string;
|
|
6290
6330
|
correlation_id?: string | undefined;
|
|
6291
6331
|
session_id?: string | undefined;
|
|
6292
6332
|
}, {
|
|
@@ -6295,10 +6335,10 @@ declare const eventsRotatedEventSchema: z.ZodObject<{
|
|
|
6295
6335
|
schema_version: 1;
|
|
6296
6336
|
kind: "fabric-event";
|
|
6297
6337
|
event_type: "events_rotated";
|
|
6338
|
+
archive_path: string;
|
|
6298
6339
|
cutoff_ts: string;
|
|
6299
6340
|
archived_count: number;
|
|
6300
6341
|
kept_count: number;
|
|
6301
|
-
archive_path: string;
|
|
6302
6342
|
correlation_id?: string | undefined;
|
|
6303
6343
|
session_id?: string | undefined;
|
|
6304
6344
|
}>;
|
|
@@ -7420,6 +7460,45 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7420
7460
|
correlation_id?: string | undefined;
|
|
7421
7461
|
session_id?: string | undefined;
|
|
7422
7462
|
reason?: string | undefined;
|
|
7463
|
+
}>, z.ZodObject<{
|
|
7464
|
+
event_type: z.ZodLiteral<"knowledge_unarchived">;
|
|
7465
|
+
stable_id: z.ZodOptional<z.ZodString>;
|
|
7466
|
+
timestamp: z.ZodString;
|
|
7467
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
7468
|
+
archive_path: z.ZodOptional<z.ZodString>;
|
|
7469
|
+
restored_to: z.ZodOptional<z.ZodString>;
|
|
7470
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
7471
|
+
id: z.ZodString;
|
|
7472
|
+
ts: z.ZodNumber;
|
|
7473
|
+
schema_version: z.ZodLiteral<1>;
|
|
7474
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
7475
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
7476
|
+
}, "strip", z.ZodTypeAny, {
|
|
7477
|
+
id: string;
|
|
7478
|
+
ts: number;
|
|
7479
|
+
schema_version: 1;
|
|
7480
|
+
kind: "fabric-event";
|
|
7481
|
+
event_type: "knowledge_unarchived";
|
|
7482
|
+
timestamp: string;
|
|
7483
|
+
stable_id?: string | undefined;
|
|
7484
|
+
correlation_id?: string | undefined;
|
|
7485
|
+
session_id?: string | undefined;
|
|
7486
|
+
reason?: string | undefined;
|
|
7487
|
+
archive_path?: string | undefined;
|
|
7488
|
+
restored_to?: string | undefined;
|
|
7489
|
+
}, {
|
|
7490
|
+
id: string;
|
|
7491
|
+
ts: number;
|
|
7492
|
+
schema_version: 1;
|
|
7493
|
+
kind: "fabric-event";
|
|
7494
|
+
event_type: "knowledge_unarchived";
|
|
7495
|
+
timestamp: string;
|
|
7496
|
+
stable_id?: string | undefined;
|
|
7497
|
+
correlation_id?: string | undefined;
|
|
7498
|
+
session_id?: string | undefined;
|
|
7499
|
+
reason?: string | undefined;
|
|
7500
|
+
archive_path?: string | undefined;
|
|
7501
|
+
restored_to?: string | undefined;
|
|
7423
7502
|
}>, z.ZodObject<{
|
|
7424
7503
|
event_type: z.ZodLiteral<"knowledge_deferred">;
|
|
7425
7504
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
@@ -7885,10 +7964,10 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7885
7964
|
schema_version: 1;
|
|
7886
7965
|
kind: "fabric-event";
|
|
7887
7966
|
event_type: "events_rotated";
|
|
7967
|
+
archive_path: string;
|
|
7888
7968
|
cutoff_ts: string;
|
|
7889
7969
|
archived_count: number;
|
|
7890
7970
|
kept_count: number;
|
|
7891
|
-
archive_path: string;
|
|
7892
7971
|
correlation_id?: string | undefined;
|
|
7893
7972
|
session_id?: string | undefined;
|
|
7894
7973
|
}, {
|
|
@@ -7897,10 +7976,10 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7897
7976
|
schema_version: 1;
|
|
7898
7977
|
kind: "fabric-event";
|
|
7899
7978
|
event_type: "events_rotated";
|
|
7979
|
+
archive_path: string;
|
|
7900
7980
|
cutoff_ts: string;
|
|
7901
7981
|
archived_count: number;
|
|
7902
7982
|
kept_count: number;
|
|
7903
|
-
archive_path: string;
|
|
7904
7983
|
correlation_id?: string | undefined;
|
|
7905
7984
|
session_id?: string | undefined;
|
|
7906
7985
|
}>, z.ZodObject<{
|
|
@@ -8035,6 +8114,7 @@ type KnowledgeSlugRenamedEvent = z.infer<typeof knowledgeSlugRenamedEventSchema>
|
|
|
8035
8114
|
type KnowledgeDemotedEvent = z.infer<typeof knowledgeDemotedEventSchema>;
|
|
8036
8115
|
type KnowledgeArchivedEvent = z.infer<typeof knowledgeArchivedEventSchema>;
|
|
8037
8116
|
type KnowledgeArchiveAttemptedEvent = z.infer<typeof knowledgeArchiveAttemptedEventSchema>;
|
|
8117
|
+
type KnowledgeUnarchivedEvent = z.infer<typeof knowledgeUnarchivedEventSchema>;
|
|
8038
8118
|
type KnowledgeDeferredEvent = z.infer<typeof knowledgeDeferredEventSchema>;
|
|
8039
8119
|
type KnowledgeRejectedEvent = z.infer<typeof knowledgeRejectedEventSchema>;
|
|
8040
8120
|
type KnowledgeConsumedEvent = z.infer<typeof knowledgeConsumedEventSchema>;
|
|
@@ -8051,7 +8131,7 @@ type EventsRotatedEvent = z.infer<typeof eventsRotatedEventSchema>;
|
|
|
8051
8131
|
type ServeLockClearedEvent = z.infer<typeof serveLockClearedEventSchema>;
|
|
8052
8132
|
type KnowledgeEnrichedEvent = z.infer<typeof knowledgeEnrichedEventSchema>;
|
|
8053
8133
|
type SessionArchiveAttemptedEvent = z.infer<typeof sessionArchiveAttemptedEventSchema>;
|
|
8054
|
-
type EventLedgerEvent = KnowledgeContextPlannedEvent | KnowledgeSelectionEvent | KnowledgeSectionsFetchedEvent | EditIntentCheckedEvent | KnowledgeDriftDetectedEvent | McpEventLedgerEvent | ReapplyCompletedEvent | InstallDiffAppliedEvent | EventLedgerTruncatedEvent | McpConfigMigratedEvent | BootstrapMarkerMigratedEvent | MetaReconciledOnStartupEvent | MetaReconciledEvent | ClaudeSkillPathMigratedEvent | ClaudeHookPathMigratedEvent | CodexSkillPathMigratedEvent | InitScanCompletedEvent | KnowledgeProposedEvent | KnowledgePromoteStartedEvent | KnowledgePromotedEvent | KnowledgePromoteFailedEvent | KnowledgeLayerChangedEvent | KnowledgeSlugRenamedEvent | KnowledgeDemotedEvent | KnowledgeArchivedEvent | KnowledgeArchiveAttemptedEvent | KnowledgeDeferredEvent | KnowledgeRejectedEvent | KnowledgeConsumedEvent | KnowledgeScopeDegradedEvent | PendingAutoArchivedEvent | KnowledgePathDangledEvent | DoctorRunEvent | RelevanceMigrationRunEvent | AssistantTurnObservedEvent | CitePolicyActivatedEvent | CiteContractPolicyActivatedEvent | KnowledgeMetaAutoHealedEvent | EventsRotatedEvent | ServeLockClearedEvent | KnowledgeEnrichedEvent | SessionArchiveAttemptedEvent;
|
|
8134
|
+
type EventLedgerEvent = KnowledgeContextPlannedEvent | KnowledgeSelectionEvent | KnowledgeSectionsFetchedEvent | EditIntentCheckedEvent | KnowledgeDriftDetectedEvent | McpEventLedgerEvent | ReapplyCompletedEvent | InstallDiffAppliedEvent | EventLedgerTruncatedEvent | McpConfigMigratedEvent | BootstrapMarkerMigratedEvent | MetaReconciledOnStartupEvent | MetaReconciledEvent | ClaudeSkillPathMigratedEvent | ClaudeHookPathMigratedEvent | CodexSkillPathMigratedEvent | InitScanCompletedEvent | KnowledgeProposedEvent | KnowledgePromoteStartedEvent | KnowledgePromotedEvent | KnowledgePromoteFailedEvent | KnowledgeLayerChangedEvent | KnowledgeSlugRenamedEvent | KnowledgeDemotedEvent | KnowledgeArchivedEvent | KnowledgeArchiveAttemptedEvent | KnowledgeUnarchivedEvent | KnowledgeDeferredEvent | KnowledgeRejectedEvent | KnowledgeConsumedEvent | KnowledgeScopeDegradedEvent | PendingAutoArchivedEvent | KnowledgePathDangledEvent | DoctorRunEvent | RelevanceMigrationRunEvent | AssistantTurnObservedEvent | CitePolicyActivatedEvent | CiteContractPolicyActivatedEvent | KnowledgeMetaAutoHealedEvent | EventsRotatedEvent | ServeLockClearedEvent | KnowledgeEnrichedEvent | SessionArchiveAttemptedEvent;
|
|
8055
8135
|
type EventLedgerEventType = EventLedgerEvent["event_type"];
|
|
8056
8136
|
type EventLedgerEventInputFor<T extends EventLedgerEvent> = T extends EventLedgerEvent ? Omit<T, "kind" | "id" | "ts" | "schema_version" | "correlation_id" | "session_id"> & Partial<Pick<T, "id" | "ts" | "correlation_id" | "session_id">> : never;
|
|
8057
8137
|
type EventLedgerEventInput = EventLedgerEventInputFor<EventLedgerEvent>;
|
|
@@ -8086,4 +8166,4 @@ interface ParseCiteLineResult {
|
|
|
8086
8166
|
*/
|
|
8087
8167
|
declare function parseCiteLine(raw: string): ParseCiteLineResult;
|
|
8088
8168
|
|
|
8089
|
-
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type BootstrapMarkerMigratedEvent, type CandidateFileEntry, type CandidateFileFamily, type CiteCommitment, type CiteCommitmentOperator, type CiteCommitmentOperatorKind, type CiteContractPolicyActivatedEvent, type CitePolicyActivatedEvent, type CiteTag, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type CodexSkillPathMigratedEvent, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, type FabricConfigSchemaShape, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, type InstallDiffAppliedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeEnrichedEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, Layer, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type McpConfigMigratedEvent, type McpEventLedgerEvent, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, ONBOARD_SLOT_NAMES, ONBOARD_SLOT_TOTAL, type OnboardSlot, type PanelFieldGroup, type PanelFieldMeta, type ParseCiteLineResult, type PendingAutoArchivedEvent, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, type ServeLockClearedEvent, type SessionArchiveAttemptedEvent, StableId, type ValidateResult, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, allocateKnowledgeId, assistantTurnObservedEventSchema, bootstrapMarkerMigratedEventSchema, candidateFileEntrySchema, citeContractPolicyActivatedEventSchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, codexSkillPathMigratedEventSchema, defaultAgentsMetaCounters, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, fabricConfigSchema, fabricEventSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, getPanelFieldByKey, getPanelFields, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, installDiffAppliedEventSchema, isKnowledgeStableId, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeEnrichedEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lockApprovedEventSchema, lockDriftEventSchema, mcpConfigMigratedEventSchema, mcpEventLedgerEventSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, onboardSlotSchema, parseCiteLine, pendingAutoArchivedEventSchema, reapplyCompletedEventSchema, relevanceMigrationRunEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, serveLockClearedEventSchema, sessionArchiveAttemptedEventSchema, withDerivedAgentsMetaNodeDefaults };
|
|
8169
|
+
export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, type AgentsMetaCounters, AgentsMetaCountersSchema, AgentsMetaNode, AgentsTopologyType, type AssistantTurnObservedEvent, type BootstrapMarkerMigratedEvent, type CandidateFileEntry, type CandidateFileFamily, type CiteCommitment, type CiteCommitmentOperator, type CiteCommitmentOperatorKind, type CiteContractPolicyActivatedEvent, type CitePolicyActivatedEvent, type CiteTag, type ClaudeHookPathMigratedEvent, type ClaudeSkillPathMigratedEvent, type CodexSkillPathMigratedEvent, type DoctorRunEvent, type DriftDetectedEvent, type EditIntentCheckedEvent, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type EventLedgerTruncatedEvent, type EventsRotatedEvent, type FabricConfigSchemaShape, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type InitScanCompletedEvent, type InstallDiffAppliedEvent, KNOWLEDGE_TEST_INDEX_SCHEMA_VERSION, type KnowledgeArchiveAttemptedEvent, type KnowledgeArchivedEvent, type KnowledgeConsumedEvent, type KnowledgeContextPlannedEvent, type KnowledgeDeferredEvent, type KnowledgeDemotedEvent, type KnowledgeDriftDetectedEvent, type KnowledgeEnrichedEvent, type KnowledgeLayerChangedEvent, type KnowledgeMetaAutoHealedEvent, type KnowledgePathDangledEvent, type KnowledgePromoteFailedEvent, type KnowledgePromoteStartedEvent, type KnowledgePromotedEvent, type KnowledgeProposedEvent, type KnowledgeRejectedEvent, type KnowledgeScopeDegradedEvent, type KnowledgeSectionsFetchedEvent, type KnowledgeSelectionEvent, type KnowledgeSlugRenamedEvent, type KnowledgeTestIndex, type KnowledgeTestLink, type KnowledgeTestOrphanAnnotation, KnowledgeType, type KnowledgeUnarchivedEvent, Layer, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type McpConfigMigratedEvent, type McpEventLedgerEvent, type MetaReconciledEvent, type MetaReconciledOnStartupEvent, type MetaUpdatedEvent, ONBOARD_SLOT_NAMES, ONBOARD_SLOT_TOTAL, type OnboardSlot, type PanelFieldGroup, type PanelFieldMeta, type ParseCiteLineResult, type PendingAutoArchivedEvent, type ReapplyCompletedEvent, type RelevanceMigrationRunEvent, type ServeLockClearedEvent, type SessionArchiveAttemptedEvent, StableId, type ValidateResult, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, allocateKnowledgeId, assistantTurnObservedEventSchema, bootstrapMarkerMigratedEventSchema, candidateFileEntrySchema, citeContractPolicyActivatedEventSchema, citePolicyActivatedEventSchema, claudeHookPathMigratedEventSchema, claudeSkillPathMigratedEventSchema, codexSkillPathMigratedEventSchema, defaultAgentsMetaCounters, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, doctorRunEventSchema, driftDetectedEventSchema, editIntentCheckedEventSchema, eventLedgerEventSchema, eventLedgerTruncatedEventSchema, eventsRotatedEventSchema, fabricConfigSchema, fabricEventSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, getPanelFieldByKey, getPanelFields, humanLedgerEntrySchema, humanLockEntrySchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, initScanCompletedEventSchema, installDiffAppliedEventSchema, isKnowledgeStableId, knowledgeArchiveAttemptedEventSchema, knowledgeArchivedEventSchema, knowledgeConsumedEventSchema, knowledgeContextPlannedEventSchema, knowledgeDeferredEventSchema, knowledgeDemotedEventSchema, knowledgeDriftDetectedEventSchema, knowledgeEnrichedEventSchema, knowledgeLayerChangedEventSchema, knowledgeMetaAutoHealedEventSchema, knowledgePathDangledEventSchema, knowledgePromoteFailedEventSchema, knowledgePromoteStartedEventSchema, knowledgePromotedEventSchema, knowledgeProposedEventSchema, knowledgeRejectedEventSchema, knowledgeScopeDegradedEventSchema, knowledgeSectionsFetchedEventSchema, knowledgeSelectionEventSchema, knowledgeSlugRenamedEventSchema, knowledgeTestIndexSchema, knowledgeTestLinkSchema, knowledgeTestOrphanAnnotationSchema, knowledgeUnarchivedEventSchema, ledgerAppendedEventSchema, ledgerEntrySchema, lockApprovedEventSchema, lockDriftEventSchema, mcpConfigMigratedEventSchema, mcpEventLedgerEventSchema, metaReconciledEventSchema, metaReconciledOnStartupEventSchema, metaUpdatedEventSchema, onboardSlotSchema, parseCiteLine, pendingAutoArchivedEventSchema, reapplyCompletedEventSchema, relevanceMigrationRunEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, serveLockClearedEventSchema, sessionArchiveAttemptedEventSchema, withDerivedAgentsMetaNodeDefaults };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
BOOTSTRAP_CANONICAL,
|
|
3
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
4
|
-
BOOTSTRAP_MARKER_END,
|
|
5
|
-
BOOTSTRAP_REGEX,
|
|
6
|
-
LEGACY_KB_MARKER_BEGIN,
|
|
7
|
-
LEGACY_KB_MARKER_END,
|
|
8
|
-
LEGACY_KB_REGEX
|
|
9
|
-
} from "./chunk-4OQXR6JW.js";
|
|
1
|
+
import "./chunk-LXNCAKJZ.js";
|
|
10
2
|
import {
|
|
11
3
|
PROTECTED_TOKENS,
|
|
12
4
|
createTranslator,
|
|
@@ -59,7 +51,15 @@ import {
|
|
|
59
51
|
planContextOutputSchema,
|
|
60
52
|
structuredWarningSchema
|
|
61
53
|
} from "./chunk-Y2YBFL2G.js";
|
|
62
|
-
import
|
|
54
|
+
import {
|
|
55
|
+
BOOTSTRAP_CANONICAL,
|
|
56
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
57
|
+
BOOTSTRAP_MARKER_END,
|
|
58
|
+
BOOTSTRAP_REGEX,
|
|
59
|
+
LEGACY_KB_MARKER_BEGIN,
|
|
60
|
+
LEGACY_KB_MARKER_END,
|
|
61
|
+
LEGACY_KB_REGEX
|
|
62
|
+
} from "./chunk-4OQXR6JW.js";
|
|
63
63
|
|
|
64
64
|
// src/schemas/agents-meta.ts
|
|
65
65
|
import { z } from "zod";
|
|
@@ -470,6 +470,25 @@ var fabricConfigSchema = z5.object({
|
|
|
470
470
|
// 7d Signal-B trigger because review specifically targets the long
|
|
471
471
|
// tail. Large repos with slower cadence can raise to 30.
|
|
472
472
|
review_stale_pending_days: z5.number().int().positive().optional().default(14),
|
|
473
|
+
// v2.0.0-rc.34 TASK-05: reverse-unarchive opt-in. When true, callers of the
|
|
474
|
+
// `unarchiveKnowledge` primitive (and any future doctor auto-detect lint built
|
|
475
|
+
// on top) will execute the file move + ledger emit. When false (default),
|
|
476
|
+
// the same callers MUST short-circuit before any mutation — the primitive is
|
|
477
|
+
// shipped but inert until explicitly enabled. Opt-in posture mirrors the
|
|
478
|
+
// archive-flow precedent: destructive-ish file moves stay behind a flag.
|
|
479
|
+
reverse_unarchive_enabled: z5.boolean().optional().default(false),
|
|
480
|
+
// v2.0.0-rc.34 TASK-05: forces `unarchiveKnowledge` into dry-run mode even
|
|
481
|
+
// when called with `options.dryRun=false`. Lets operators preview a
|
|
482
|
+
// restoration pass before flipping `reverse_unarchive_enabled` to true.
|
|
483
|
+
reverse_unarchive_dry_run: z5.boolean().optional().default(false),
|
|
484
|
+
// v2.0.0-rc.34 TASK-06: long-session cite-policy evict window in user-prompt
|
|
485
|
+
// turns. UserPromptSubmit hook (Claude Code only) maintains a per-session
|
|
486
|
+
// counter and re-injects the cite contract reminder via
|
|
487
|
+
// hookSpecificOutput.additionalContext when `turn_count % interval === 0`.
|
|
488
|
+
// Default 0 = OFF (opt-in). Recommend 10-20 for active sessions; 5 for
|
|
489
|
+
// high-contract-criticality projects. Other strategies (time-based,
|
|
490
|
+
// token-budget) deferred to rc.35 per plan locked-decisions 2026-05-26.
|
|
491
|
+
cite_evict_interval: z5.number().int().min(0).optional().default(0),
|
|
473
492
|
// v2.0.0-rc.22 Scope A T3: sliding-window retention (in days) for the
|
|
474
493
|
// event ledger rotation primitive (`rotateEventLedgerIfNeeded`). Lines
|
|
475
494
|
// whose `ts` is older than `now - fabric_event_retention_days * 86_400_000`
|
|
@@ -1137,6 +1156,17 @@ var knowledgeArchiveAttemptedEventSchema = z10.object({
|
|
|
1137
1156
|
timestamp: z10.string().datetime(),
|
|
1138
1157
|
reason: z10.string().optional()
|
|
1139
1158
|
});
|
|
1159
|
+
var knowledgeUnarchivedEventSchema = z10.object({
|
|
1160
|
+
...eventLedgerEnvelopeSchema,
|
|
1161
|
+
event_type: z10.literal("knowledge_unarchived"),
|
|
1162
|
+
stable_id: z10.string().optional(),
|
|
1163
|
+
timestamp: z10.string().datetime(),
|
|
1164
|
+
reason: z10.string().optional(),
|
|
1165
|
+
// Pre-move archive path (e.g. ".fabric/.archive/decisions/KT-D-0007--single-cjs-hook.md").
|
|
1166
|
+
archive_path: z10.string().optional(),
|
|
1167
|
+
// Post-move canonical path (e.g. ".fabric/knowledge/team/decisions/KT-D-0007--single-cjs-hook.md").
|
|
1168
|
+
restored_to: z10.string().optional()
|
|
1169
|
+
});
|
|
1140
1170
|
var knowledgeDeferredEventSchema = z10.object({
|
|
1141
1171
|
...eventLedgerEnvelopeSchema,
|
|
1142
1172
|
event_type: z10.literal("knowledge_deferred"),
|
|
@@ -1304,6 +1334,8 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1304
1334
|
knowledgeDemotedEventSchema,
|
|
1305
1335
|
knowledgeArchivedEventSchema,
|
|
1306
1336
|
knowledgeArchiveAttemptedEventSchema,
|
|
1337
|
+
// v2.0.0-rc.34 TASK-05: reverse of knowledge_archived
|
|
1338
|
+
knowledgeUnarchivedEventSchema,
|
|
1307
1339
|
knowledgeDeferredEventSchema,
|
|
1308
1340
|
knowledgeRejectedEventSchema,
|
|
1309
1341
|
// v2.0 rc.5 TASK-014: knowledge_consumed (consumption tracking)
|
|
@@ -1573,6 +1605,7 @@ export {
|
|
|
1573
1605
|
knowledgeTestIndexSchema,
|
|
1574
1606
|
knowledgeTestLinkSchema,
|
|
1575
1607
|
knowledgeTestOrphanAnnotationSchema,
|
|
1608
|
+
knowledgeUnarchivedEventSchema,
|
|
1576
1609
|
ledgerAppendedEventSchema,
|
|
1577
1610
|
ledgerEntrySchema,
|
|
1578
1611
|
ledgerQuerySchema,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { e as AgentsActivationTier, a as AgentsIdentitySource, b as AgentsLayer, d as AgentsMeta, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, i as AgentsMetaNodeActivation, c as AgentsTopologyType, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem } from '../index-
|
|
1
|
+
export { e as AgentsActivationTier, a as AgentsIdentitySource, b as AgentsLayer, d as AgentsMeta, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, i as AgentsMetaNodeActivation, c as AgentsTopologyType, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem } from '../index-BjssYQb3.js';
|
|
2
2
|
import 'zod';
|