@fenglimg/fabric-shared 2.0.0-rc.35 → 2.0.0-rc.37
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/{chunk-Z26SD627.js → chunk-DRQTQEEV.js} +190 -8
- package/dist/chunk-VWJQVRSE.js +100 -0
- package/dist/{chunk-S2OX6ZUS.js → chunk-ZSRVKMYT.js} +143 -24
- package/dist/i18n/index.js +1 -1
- package/dist/{index-BjssYQb3.d.ts → index-BkXfeNyz.d.ts} +3 -0
- package/dist/index.d.ts +93 -13
- package/dist/index.js +48 -13
- package/dist/schemas/api-contracts.d.ts +921 -16
- package/dist/schemas/api-contracts.js +13 -1
- package/dist/templates/bootstrap-canonical.d.ts +1 -1
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +26 -2
- package/dist/chunk-COWUGYWC.js +0 -76
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-BkXfeNyz.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-BkXfeNyz.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';
|
|
6
|
-
export { CiteContractMetrics, CiteCoverageReport, CiteLayerTypeBreakdown, FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, FabReviewInput, FabReviewInputSchema, FabReviewInputShape, FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, KnowledgeTypeCode, KnowledgeTypeSchema, LayerSchema, Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, ProposedReason, ProposedReasonSchema, StableIdSchema, annotateIntentRequestSchema, citeContractMetricsSchema, citeCoverageReportSchema, citeLayerTypeBreakdownSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, structuredWarningSchema } from './schemas/api-contracts.js';
|
|
6
|
+
export { ArchiveScanInput, ArchiveScanOutput, CiteContractMetrics, CiteCoverageReport, CiteLayerTypeBreakdown, FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, FabReviewInput, FabReviewInputSchema, FabReviewInputShape, FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, KnowledgeTypeCode, KnowledgeTypeSchema, LayerSchema, Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, ProposedReason, ProposedReasonSchema, StableIdSchema, annotateIntentRequestSchema, archiveScanAnnotations, archiveScanInputSchema, archiveScanOutputSchema, citeContractMetricsSchema, citeCoverageReportSchema, citeLayerTypeBreakdownSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, recallAnnotations, recallInputSchema, recallOutputSchema, structuredWarningSchema } from './schemas/api-contracts.js';
|
|
7
7
|
export { BOOTSTRAP_CANONICAL, BOOTSTRAP_MARKER_BEGIN, BOOTSTRAP_MARKER_END, BOOTSTRAP_REGEX, LEGACY_KB_MARKER_BEGIN, LEGACY_KB_MARKER_END, LEGACY_KB_REGEX } from './templates/bootstrap-canonical.js';
|
|
8
8
|
|
|
9
9
|
declare const ONBOARD_SLOT_NAMES: readonly ["tech-stack-decision", "architecture-pattern", "code-style-tone", "build-system-idiom", "domain-vocabulary"];
|
|
@@ -5668,6 +5668,7 @@ declare const knowledgeLayerChangedEventSchema: z.ZodObject<{
|
|
|
5668
5668
|
reason: z.ZodOptional<z.ZodString>;
|
|
5669
5669
|
from_layer: z.ZodEnum<["team", "personal"]>;
|
|
5670
5670
|
to_layer: z.ZodEnum<["team", "personal"]>;
|
|
5671
|
+
previous_stable_id: z.ZodOptional<z.ZodString>;
|
|
5671
5672
|
kind: z.ZodLiteral<"fabric-event">;
|
|
5672
5673
|
id: z.ZodString;
|
|
5673
5674
|
ts: z.ZodNumber;
|
|
@@ -5687,6 +5688,7 @@ declare const knowledgeLayerChangedEventSchema: z.ZodObject<{
|
|
|
5687
5688
|
correlation_id?: string | undefined;
|
|
5688
5689
|
session_id?: string | undefined;
|
|
5689
5690
|
reason?: string | undefined;
|
|
5691
|
+
previous_stable_id?: string | undefined;
|
|
5690
5692
|
}, {
|
|
5691
5693
|
id: string;
|
|
5692
5694
|
ts: number;
|
|
@@ -5700,6 +5702,44 @@ declare const knowledgeLayerChangedEventSchema: z.ZodObject<{
|
|
|
5700
5702
|
correlation_id?: string | undefined;
|
|
5701
5703
|
session_id?: string | undefined;
|
|
5702
5704
|
reason?: string | undefined;
|
|
5705
|
+
previous_stable_id?: string | undefined;
|
|
5706
|
+
}>;
|
|
5707
|
+
declare const knowledgeIdRedirectEventSchema: z.ZodObject<{
|
|
5708
|
+
event_type: z.ZodLiteral<"knowledge_id_redirect">;
|
|
5709
|
+
timestamp: z.ZodString;
|
|
5710
|
+
previous_stable_id: z.ZodString;
|
|
5711
|
+
new_stable_id: z.ZodString;
|
|
5712
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
5713
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
5714
|
+
id: z.ZodString;
|
|
5715
|
+
ts: z.ZodNumber;
|
|
5716
|
+
schema_version: z.ZodLiteral<1>;
|
|
5717
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
5718
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
5719
|
+
}, "strip", z.ZodTypeAny, {
|
|
5720
|
+
id: string;
|
|
5721
|
+
new_stable_id: string;
|
|
5722
|
+
ts: number;
|
|
5723
|
+
schema_version: 1;
|
|
5724
|
+
kind: "fabric-event";
|
|
5725
|
+
event_type: "knowledge_id_redirect";
|
|
5726
|
+
timestamp: string;
|
|
5727
|
+
previous_stable_id: string;
|
|
5728
|
+
correlation_id?: string | undefined;
|
|
5729
|
+
session_id?: string | undefined;
|
|
5730
|
+
reason?: string | undefined;
|
|
5731
|
+
}, {
|
|
5732
|
+
id: string;
|
|
5733
|
+
new_stable_id: string;
|
|
5734
|
+
ts: number;
|
|
5735
|
+
schema_version: 1;
|
|
5736
|
+
kind: "fabric-event";
|
|
5737
|
+
event_type: "knowledge_id_redirect";
|
|
5738
|
+
timestamp: string;
|
|
5739
|
+
previous_stable_id: string;
|
|
5740
|
+
correlation_id?: string | undefined;
|
|
5741
|
+
session_id?: string | undefined;
|
|
5742
|
+
reason?: string | undefined;
|
|
5703
5743
|
}>;
|
|
5704
5744
|
declare const knowledgeSlugRenamedEventSchema: z.ZodObject<{
|
|
5705
5745
|
event_type: z.ZodLiteral<"knowledge_slug_renamed">;
|
|
@@ -6464,24 +6504,24 @@ declare const sessionArchiveAttemptedEventSchema: z.ZodObject<{
|
|
|
6464
6504
|
session_id: z.ZodOptional<z.ZodString>;
|
|
6465
6505
|
}, "strip", z.ZodTypeAny, {
|
|
6466
6506
|
id: string;
|
|
6507
|
+
covered_through_ts: number;
|
|
6467
6508
|
ts: number;
|
|
6468
6509
|
schema_version: 1;
|
|
6469
6510
|
kind: "fabric-event";
|
|
6470
6511
|
event_type: "session_archive_attempted";
|
|
6471
|
-
outcome: "
|
|
6472
|
-
covered_through_ts: number;
|
|
6512
|
+
outcome: "user_dismissed" | "proposed" | "viability_failed" | "skipped_no_signal";
|
|
6473
6513
|
candidates_proposed: number;
|
|
6474
6514
|
knowledge_proposed_ids: string[];
|
|
6475
6515
|
correlation_id?: string | undefined;
|
|
6476
6516
|
session_id?: string | undefined;
|
|
6477
6517
|
}, {
|
|
6478
6518
|
id: string;
|
|
6519
|
+
covered_through_ts: number;
|
|
6479
6520
|
ts: number;
|
|
6480
6521
|
schema_version: 1;
|
|
6481
6522
|
kind: "fabric-event";
|
|
6482
6523
|
event_type: "session_archive_attempted";
|
|
6483
|
-
outcome: "
|
|
6484
|
-
covered_through_ts: number;
|
|
6524
|
+
outcome: "user_dismissed" | "proposed" | "viability_failed" | "skipped_no_signal";
|
|
6485
6525
|
correlation_id?: string | undefined;
|
|
6486
6526
|
session_id?: string | undefined;
|
|
6487
6527
|
candidates_proposed?: number | undefined;
|
|
@@ -7290,6 +7330,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7290
7330
|
reason: z.ZodOptional<z.ZodString>;
|
|
7291
7331
|
from_layer: z.ZodEnum<["team", "personal"]>;
|
|
7292
7332
|
to_layer: z.ZodEnum<["team", "personal"]>;
|
|
7333
|
+
previous_stable_id: z.ZodOptional<z.ZodString>;
|
|
7293
7334
|
kind: z.ZodLiteral<"fabric-event">;
|
|
7294
7335
|
id: z.ZodString;
|
|
7295
7336
|
ts: z.ZodNumber;
|
|
@@ -7309,6 +7350,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7309
7350
|
correlation_id?: string | undefined;
|
|
7310
7351
|
session_id?: string | undefined;
|
|
7311
7352
|
reason?: string | undefined;
|
|
7353
|
+
previous_stable_id?: string | undefined;
|
|
7312
7354
|
}, {
|
|
7313
7355
|
id: string;
|
|
7314
7356
|
ts: number;
|
|
@@ -7322,6 +7364,43 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
7322
7364
|
correlation_id?: string | undefined;
|
|
7323
7365
|
session_id?: string | undefined;
|
|
7324
7366
|
reason?: string | undefined;
|
|
7367
|
+
previous_stable_id?: string | undefined;
|
|
7368
|
+
}>, z.ZodObject<{
|
|
7369
|
+
event_type: z.ZodLiteral<"knowledge_id_redirect">;
|
|
7370
|
+
timestamp: z.ZodString;
|
|
7371
|
+
previous_stable_id: z.ZodString;
|
|
7372
|
+
new_stable_id: z.ZodString;
|
|
7373
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
7374
|
+
kind: z.ZodLiteral<"fabric-event">;
|
|
7375
|
+
id: z.ZodString;
|
|
7376
|
+
ts: z.ZodNumber;
|
|
7377
|
+
schema_version: z.ZodLiteral<1>;
|
|
7378
|
+
correlation_id: z.ZodOptional<z.ZodString>;
|
|
7379
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
7380
|
+
}, "strip", z.ZodTypeAny, {
|
|
7381
|
+
id: string;
|
|
7382
|
+
new_stable_id: string;
|
|
7383
|
+
ts: number;
|
|
7384
|
+
schema_version: 1;
|
|
7385
|
+
kind: "fabric-event";
|
|
7386
|
+
event_type: "knowledge_id_redirect";
|
|
7387
|
+
timestamp: string;
|
|
7388
|
+
previous_stable_id: string;
|
|
7389
|
+
correlation_id?: string | undefined;
|
|
7390
|
+
session_id?: string | undefined;
|
|
7391
|
+
reason?: string | undefined;
|
|
7392
|
+
}, {
|
|
7393
|
+
id: string;
|
|
7394
|
+
new_stable_id: string;
|
|
7395
|
+
ts: number;
|
|
7396
|
+
schema_version: 1;
|
|
7397
|
+
kind: "fabric-event";
|
|
7398
|
+
event_type: "knowledge_id_redirect";
|
|
7399
|
+
timestamp: string;
|
|
7400
|
+
previous_stable_id: string;
|
|
7401
|
+
correlation_id?: string | undefined;
|
|
7402
|
+
session_id?: string | undefined;
|
|
7403
|
+
reason?: string | undefined;
|
|
7325
7404
|
}>, z.ZodObject<{
|
|
7326
7405
|
event_type: z.ZodLiteral<"knowledge_slug_renamed">;
|
|
7327
7406
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
@@ -8065,24 +8144,24 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
8065
8144
|
session_id: z.ZodOptional<z.ZodString>;
|
|
8066
8145
|
}, "strip", z.ZodTypeAny, {
|
|
8067
8146
|
id: string;
|
|
8147
|
+
covered_through_ts: number;
|
|
8068
8148
|
ts: number;
|
|
8069
8149
|
schema_version: 1;
|
|
8070
8150
|
kind: "fabric-event";
|
|
8071
8151
|
event_type: "session_archive_attempted";
|
|
8072
|
-
outcome: "
|
|
8073
|
-
covered_through_ts: number;
|
|
8152
|
+
outcome: "user_dismissed" | "proposed" | "viability_failed" | "skipped_no_signal";
|
|
8074
8153
|
candidates_proposed: number;
|
|
8075
8154
|
knowledge_proposed_ids: string[];
|
|
8076
8155
|
correlation_id?: string | undefined;
|
|
8077
8156
|
session_id?: string | undefined;
|
|
8078
8157
|
}, {
|
|
8079
8158
|
id: string;
|
|
8159
|
+
covered_through_ts: number;
|
|
8080
8160
|
ts: number;
|
|
8081
8161
|
schema_version: 1;
|
|
8082
8162
|
kind: "fabric-event";
|
|
8083
8163
|
event_type: "session_archive_attempted";
|
|
8084
|
-
outcome: "
|
|
8085
|
-
covered_through_ts: number;
|
|
8164
|
+
outcome: "user_dismissed" | "proposed" | "viability_failed" | "skipped_no_signal";
|
|
8086
8165
|
correlation_id?: string | undefined;
|
|
8087
8166
|
session_id?: string | undefined;
|
|
8088
8167
|
candidates_proposed?: number | undefined;
|
|
@@ -8110,6 +8189,7 @@ type KnowledgePromoteStartedEvent = z.infer<typeof knowledgePromoteStartedEventS
|
|
|
8110
8189
|
type KnowledgePromotedEvent = z.infer<typeof knowledgePromotedEventSchema>;
|
|
8111
8190
|
type KnowledgePromoteFailedEvent = z.infer<typeof knowledgePromoteFailedEventSchema>;
|
|
8112
8191
|
type KnowledgeLayerChangedEvent = z.infer<typeof knowledgeLayerChangedEventSchema>;
|
|
8192
|
+
type KnowledgeIdRedirectEvent = z.infer<typeof knowledgeIdRedirectEventSchema>;
|
|
8113
8193
|
type KnowledgeSlugRenamedEvent = z.infer<typeof knowledgeSlugRenamedEventSchema>;
|
|
8114
8194
|
type KnowledgeDemotedEvent = z.infer<typeof knowledgeDemotedEventSchema>;
|
|
8115
8195
|
type KnowledgeArchivedEvent = z.infer<typeof knowledgeArchivedEventSchema>;
|
|
@@ -8131,7 +8211,7 @@ type EventsRotatedEvent = z.infer<typeof eventsRotatedEventSchema>;
|
|
|
8131
8211
|
type ServeLockClearedEvent = z.infer<typeof serveLockClearedEventSchema>;
|
|
8132
8212
|
type KnowledgeEnrichedEvent = z.infer<typeof knowledgeEnrichedEventSchema>;
|
|
8133
8213
|
type SessionArchiveAttemptedEvent = z.infer<typeof sessionArchiveAttemptedEventSchema>;
|
|
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;
|
|
8214
|
+
type EventLedgerEvent = KnowledgeContextPlannedEvent | KnowledgeSelectionEvent | KnowledgeSectionsFetchedEvent | EditIntentCheckedEvent | KnowledgeDriftDetectedEvent | McpEventLedgerEvent | ReapplyCompletedEvent | InstallDiffAppliedEvent | EventLedgerTruncatedEvent | McpConfigMigratedEvent | BootstrapMarkerMigratedEvent | MetaReconciledOnStartupEvent | MetaReconciledEvent | ClaudeSkillPathMigratedEvent | ClaudeHookPathMigratedEvent | CodexSkillPathMigratedEvent | InitScanCompletedEvent | KnowledgeProposedEvent | KnowledgePromoteStartedEvent | KnowledgePromotedEvent | KnowledgePromoteFailedEvent | KnowledgeLayerChangedEvent | KnowledgeIdRedirectEvent | KnowledgeSlugRenamedEvent | KnowledgeDemotedEvent | KnowledgeArchivedEvent | KnowledgeArchiveAttemptedEvent | KnowledgeUnarchivedEvent | KnowledgeDeferredEvent | KnowledgeRejectedEvent | KnowledgeConsumedEvent | KnowledgeScopeDegradedEvent | PendingAutoArchivedEvent | KnowledgePathDangledEvent | DoctorRunEvent | RelevanceMigrationRunEvent | AssistantTurnObservedEvent | CitePolicyActivatedEvent | CiteContractPolicyActivatedEvent | KnowledgeMetaAutoHealedEvent | EventsRotatedEvent | ServeLockClearedEvent | KnowledgeEnrichedEvent | SessionArchiveAttemptedEvent;
|
|
8135
8215
|
type EventLedgerEventType = EventLedgerEvent["event_type"];
|
|
8136
8216
|
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;
|
|
8137
8217
|
type EventLedgerEventInput = EventLedgerEventInputFor<EventLedgerEvent>;
|
|
@@ -8166,4 +8246,4 @@ interface ParseCiteLineResult {
|
|
|
8166
8246
|
*/
|
|
8167
8247
|
declare function parseCiteLine(raw: string): ParseCiteLineResult;
|
|
8168
8248
|
|
|
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 };
|
|
8249
|
+
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 KnowledgeIdRedirectEvent, 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, knowledgeIdRedirectEventSchema, 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-COWUGYWC.js";
|
|
1
|
+
import "./chunk-LXNCAKJZ.js";
|
|
10
2
|
import {
|
|
11
3
|
PROTECTED_TOKENS,
|
|
12
4
|
createTranslator,
|
|
@@ -16,7 +8,7 @@ import {
|
|
|
16
8
|
normalizeLocale,
|
|
17
9
|
resolveFabricLocale,
|
|
18
10
|
zhCNMessages
|
|
19
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZSRVKMYT.js";
|
|
20
12
|
import {
|
|
21
13
|
FabExtractKnowledgeInputSchema,
|
|
22
14
|
FabExtractKnowledgeInputShape,
|
|
@@ -36,6 +28,9 @@ import {
|
|
|
36
28
|
ProposedReasonSchema,
|
|
37
29
|
StableIdSchema,
|
|
38
30
|
annotateIntentRequestSchema,
|
|
31
|
+
archiveScanAnnotations,
|
|
32
|
+
archiveScanInputSchema,
|
|
33
|
+
archiveScanOutputSchema,
|
|
39
34
|
citeContractMetricsSchema,
|
|
40
35
|
citeCoverageReportSchema,
|
|
41
36
|
citeLayerTypeBreakdownSchema,
|
|
@@ -57,9 +52,20 @@ import {
|
|
|
57
52
|
planContextHintOutputSchema,
|
|
58
53
|
planContextInputSchema,
|
|
59
54
|
planContextOutputSchema,
|
|
55
|
+
recallAnnotations,
|
|
56
|
+
recallInputSchema,
|
|
57
|
+
recallOutputSchema,
|
|
60
58
|
structuredWarningSchema
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import
|
|
59
|
+
} from "./chunk-DRQTQEEV.js";
|
|
60
|
+
import {
|
|
61
|
+
BOOTSTRAP_CANONICAL,
|
|
62
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
63
|
+
BOOTSTRAP_MARKER_END,
|
|
64
|
+
BOOTSTRAP_REGEX,
|
|
65
|
+
LEGACY_KB_MARKER_BEGIN,
|
|
66
|
+
LEGACY_KB_MARKER_END,
|
|
67
|
+
LEGACY_KB_REGEX
|
|
68
|
+
} from "./chunk-VWJQVRSE.js";
|
|
63
69
|
|
|
64
70
|
// src/schemas/agents-meta.ts
|
|
65
71
|
import { z } from "zod";
|
|
@@ -531,6 +537,12 @@ var fabricConfigSchema = z5.object({
|
|
|
531
537
|
// TRUNCATION_THRESHOLD=12 grouped-render kicks in. Mirrors the rc.7 T7 +
|
|
532
538
|
// archive_max_* pattern of externalizing previously-hardcoded thresholds.
|
|
533
539
|
hint_broad_top_k: z5.number().int().min(1).max(50).optional().default(8),
|
|
540
|
+
// v2.0.0-rc.37 NEW-16: durable per-signal dismiss for the fabric-hint Stop
|
|
541
|
+
// hook nudges. Any signal type listed here is suppressed at emit time across
|
|
542
|
+
// all sessions (the session-scoped sibling lives in a .fabric/.cache sidecar
|
|
543
|
+
// written on request). Mirrors the cite_evict_interval=0 opt-out convention —
|
|
544
|
+
// a knob for an existing surface, not a new feature. Unknown types ignored.
|
|
545
|
+
hint_dismiss_signals: z5.array(z5.enum(["archive", "review", "import", "maintenance"])).optional(),
|
|
534
546
|
// v2.0.0-rc.33 W2-1 (P0-9): TopK upper bound for the narrow PreToolUse hint
|
|
535
547
|
// emitted by knowledge-hint-narrow.cjs. After filtering to entries whose
|
|
536
548
|
// `relevance_scope === "narrow"` (rc.27 TASK-005 audit §2.5 fix), the hook
|
|
@@ -1128,7 +1140,21 @@ var knowledgeLayerChangedEventSchema = z10.object({
|
|
|
1128
1140
|
timestamp: z10.string().datetime(),
|
|
1129
1141
|
reason: z10.string().optional(),
|
|
1130
1142
|
from_layer: z10.enum(["team", "personal"]),
|
|
1131
|
-
to_layer: z10.enum(["team", "personal"])
|
|
1143
|
+
to_layer: z10.enum(["team", "personal"]),
|
|
1144
|
+
// v2.0.0-rc.37 NEW-24: record the pre-flip stable_id so downstream consumers
|
|
1145
|
+
// (fab_plan_context redirect surface, fab_get_knowledge_sections.redirect_to)
|
|
1146
|
+
// can map a stale caller-held id back to the post-flip canonical id without
|
|
1147
|
+
// requiring the caller to re-issue plan-context. Optional for forward-
|
|
1148
|
+
// compatibility with rc ≤36 events that never carried this field.
|
|
1149
|
+
previous_stable_id: z10.string().optional()
|
|
1150
|
+
});
|
|
1151
|
+
var knowledgeIdRedirectEventSchema = z10.object({
|
|
1152
|
+
...eventLedgerEnvelopeSchema,
|
|
1153
|
+
event_type: z10.literal("knowledge_id_redirect"),
|
|
1154
|
+
timestamp: z10.string().datetime(),
|
|
1155
|
+
previous_stable_id: z10.string(),
|
|
1156
|
+
new_stable_id: z10.string(),
|
|
1157
|
+
reason: z10.string().optional()
|
|
1132
1158
|
});
|
|
1133
1159
|
var knowledgeSlugRenamedEventSchema = z10.object({
|
|
1134
1160
|
...eventLedgerEnvelopeSchema,
|
|
@@ -1334,6 +1360,8 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1334
1360
|
knowledgePromotedEventSchema,
|
|
1335
1361
|
knowledgePromoteFailedEventSchema,
|
|
1336
1362
|
knowledgeLayerChangedEventSchema,
|
|
1363
|
+
// v2.0.0-rc.37 NEW-24: dedicated old→new stable_id mapping event
|
|
1364
|
+
knowledgeIdRedirectEventSchema,
|
|
1337
1365
|
knowledgeSlugRenamedEventSchema,
|
|
1338
1366
|
knowledgeDemotedEventSchema,
|
|
1339
1367
|
knowledgeArchivedEventSchema,
|
|
@@ -1520,6 +1548,9 @@ export {
|
|
|
1520
1548
|
aiLedgerEntrySchema,
|
|
1521
1549
|
allocateKnowledgeId,
|
|
1522
1550
|
annotateIntentRequestSchema,
|
|
1551
|
+
archiveScanAnnotations,
|
|
1552
|
+
archiveScanInputSchema,
|
|
1553
|
+
archiveScanOutputSchema,
|
|
1523
1554
|
assistantTurnObservedEventSchema,
|
|
1524
1555
|
auditModeSchema,
|
|
1525
1556
|
bootstrapMarkerMigratedEventSchema,
|
|
@@ -1591,6 +1622,7 @@ export {
|
|
|
1591
1622
|
knowledgeDemotedEventSchema,
|
|
1592
1623
|
knowledgeDriftDetectedEventSchema,
|
|
1593
1624
|
knowledgeEnrichedEventSchema,
|
|
1625
|
+
knowledgeIdRedirectEventSchema,
|
|
1594
1626
|
knowledgeLayerChangedEventSchema,
|
|
1595
1627
|
knowledgeMetaAutoHealedEventSchema,
|
|
1596
1628
|
knowledgePathDangledEventSchema,
|
|
@@ -1633,6 +1665,9 @@ export {
|
|
|
1633
1665
|
planContextInputSchema,
|
|
1634
1666
|
planContextOutputSchema,
|
|
1635
1667
|
reapplyCompletedEventSchema,
|
|
1668
|
+
recallAnnotations,
|
|
1669
|
+
recallInputSchema,
|
|
1670
|
+
recallOutputSchema,
|
|
1636
1671
|
relevanceMigrationRunEventSchema,
|
|
1637
1672
|
resolveFabricLocale,
|
|
1638
1673
|
ruleDescriptionIndexItemSchema,
|