@sanctuary-framework/mcp-server 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -639,6 +639,16 @@ interface SHRLayerL2 {
639
639
  status: LayerStatus;
640
640
  isolation_type: string;
641
641
  attestation_available: boolean;
642
+ /** Model provenance: what inference model(s) power this agent */
643
+ model_provenance?: {
644
+ model_id: string;
645
+ model_name: string;
646
+ provider: string;
647
+ open_weights: boolean;
648
+ open_source: boolean;
649
+ local_inference: boolean;
650
+ weights_hash?: string;
651
+ };
642
652
  }
643
653
  interface SHRLayerL3 {
644
654
  status: LayerStatus;
@@ -1367,6 +1377,110 @@ declare function classifyField(fieldName: string): FieldClassification;
1367
1377
  */
1368
1378
  declare function recommendPolicy(context: Record<string, unknown>, provider?: string): PolicyRecommendation;
1369
1379
 
1380
+ /**
1381
+ * Sanctuary MCP Server — L2 Model Provenance
1382
+ *
1383
+ * Declares and attests to the model(s) powering this agent.
1384
+ *
1385
+ * Vitalik Buterin's "Secure LLM" post (April 2026) identified a critical gap:
1386
+ * open-weights-but-not-open-source models can have trained-in backdoors. Model
1387
+ * provenance declaration lets agents and their operators verify the integrity
1388
+ * of the inference backbone.
1389
+ *
1390
+ * Tracks: model name, version, weights hash, license, open-source status,
1391
+ * training data hash (if available). Included in SHR L2 section.
1392
+ *
1393
+ * This sits in L2 (Operational Isolation) because it's part of the runtime
1394
+ * attestation surface — the agent declares what model(s) it's actually running.
1395
+ */
1396
+ /**
1397
+ * Metadata about a single model powering this agent.
1398
+ */
1399
+ interface ModelProvenance {
1400
+ /** Machine-readable model ID (e.g., "qwen3.5-35b", "claude-opus-4", "llama-3.3-70b-instruct") */
1401
+ model_id: string;
1402
+ /** Human-readable model name (e.g., "Qwen 3.5", "Claude Opus 4", "Llama 3.3 70B Instruct") */
1403
+ model_name: string;
1404
+ /** Semantic version (e.g., "3.5", "4.0", "3.3") */
1405
+ model_version: string;
1406
+ /** Provider/vendor (e.g., "Alibaba Cloud", "Anthropic", "Meta", "local") */
1407
+ provider: string;
1408
+ /** SHA-256 of model weights file, if available and verifiable */
1409
+ weights_hash?: string;
1410
+ /** SHA-256 of training data manifest or metadata, if available */
1411
+ training_data_hash?: string;
1412
+ /** License identifier (e.g., "Apache-2.0", "CC-BY-4.0", "proprietary", "unknown") */
1413
+ license: string;
1414
+ /** True if model weights are publicly available (even if training is proprietary) */
1415
+ open_weights: boolean;
1416
+ /** True if full training code, data, and methodology are publicly available */
1417
+ open_source: boolean;
1418
+ /** True if inference runs on the local agent's hardware (not delegated to cloud API) */
1419
+ local_inference: boolean;
1420
+ /** ISO 8601 timestamp when this provenance was declared */
1421
+ declared_at: string;
1422
+ }
1423
+ /**
1424
+ * In-memory and persistent store for model provenance declarations.
1425
+ * Declarations are encrypted under L1 sovereignty.
1426
+ */
1427
+ interface ModelProvenanceStore {
1428
+ /**
1429
+ * Declare a model's provenance and add it to the store.
1430
+ */
1431
+ declare(provenance: ModelProvenance): void;
1432
+ /**
1433
+ * Retrieve a model's provenance by ID.
1434
+ */
1435
+ get(model_id: string): ModelProvenance | undefined;
1436
+ /**
1437
+ * List all declared models.
1438
+ */
1439
+ list(): ModelProvenance[];
1440
+ /**
1441
+ * Get the primary/main model (the one the agent uses by default for inference).
1442
+ */
1443
+ primary(): ModelProvenance | undefined;
1444
+ /**
1445
+ * Set which model is the primary.
1446
+ */
1447
+ setPrimary(model_id: string): void;
1448
+ }
1449
+ /**
1450
+ * In-memory implementation of ModelProvenanceStore.
1451
+ * Suitable for most use cases. For encrypted persistence, integrate with L1 state store.
1452
+ */
1453
+ declare class InMemoryModelProvenanceStore implements ModelProvenanceStore {
1454
+ private models;
1455
+ private primaryModelId;
1456
+ declare(provenance: ModelProvenance): void;
1457
+ get(model_id: string): ModelProvenance | undefined;
1458
+ list(): ModelProvenance[];
1459
+ primary(): ModelProvenance | undefined;
1460
+ setPrimary(model_id: string): void;
1461
+ }
1462
+ /**
1463
+ * Common model provenance presets for quick initialization.
1464
+ */
1465
+ declare const MODEL_PRESETS: {
1466
+ /**
1467
+ * Claude Opus 4 via Anthropic API (cloud inference, closed weights/source)
1468
+ */
1469
+ claudeOpus4: () => ModelProvenance;
1470
+ /**
1471
+ * Qwen 3.5 via local inference (open weights, proprietary training)
1472
+ */
1473
+ qwen35Local: () => ModelProvenance;
1474
+ /**
1475
+ * Llama 3.3 70B via local inference (open weights and code)
1476
+ */
1477
+ llama33Local: () => ModelProvenance;
1478
+ /**
1479
+ * Mistral 7B (open weights, open code, local inference)
1480
+ */
1481
+ mistral7bLocal: () => ModelProvenance;
1482
+ };
1483
+
1370
1484
  /**
1371
1485
  * Sanctuary MCP Server — Prompt Injection Detection Layer
1372
1486
  *
@@ -2673,4 +2787,4 @@ declare function createSanctuaryServer(options?: {
2673
2787
  storage?: StorageBackend;
2674
2788
  }): Promise<SanctuaryServer>;
2675
2789
 
2676
- export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRGeneratorOptions, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
2790
+ export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InMemoryModelProvenanceStore, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MODEL_PRESETS, MemoryStorage, type ModelProvenance, type ModelProvenanceStore, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRGeneratorOptions, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
package/dist/index.d.ts CHANGED
@@ -639,6 +639,16 @@ interface SHRLayerL2 {
639
639
  status: LayerStatus;
640
640
  isolation_type: string;
641
641
  attestation_available: boolean;
642
+ /** Model provenance: what inference model(s) power this agent */
643
+ model_provenance?: {
644
+ model_id: string;
645
+ model_name: string;
646
+ provider: string;
647
+ open_weights: boolean;
648
+ open_source: boolean;
649
+ local_inference: boolean;
650
+ weights_hash?: string;
651
+ };
642
652
  }
643
653
  interface SHRLayerL3 {
644
654
  status: LayerStatus;
@@ -1367,6 +1377,110 @@ declare function classifyField(fieldName: string): FieldClassification;
1367
1377
  */
1368
1378
  declare function recommendPolicy(context: Record<string, unknown>, provider?: string): PolicyRecommendation;
1369
1379
 
1380
+ /**
1381
+ * Sanctuary MCP Server — L2 Model Provenance
1382
+ *
1383
+ * Declares and attests to the model(s) powering this agent.
1384
+ *
1385
+ * Vitalik Buterin's "Secure LLM" post (April 2026) identified a critical gap:
1386
+ * open-weights-but-not-open-source models can have trained-in backdoors. Model
1387
+ * provenance declaration lets agents and their operators verify the integrity
1388
+ * of the inference backbone.
1389
+ *
1390
+ * Tracks: model name, version, weights hash, license, open-source status,
1391
+ * training data hash (if available). Included in SHR L2 section.
1392
+ *
1393
+ * This sits in L2 (Operational Isolation) because it's part of the runtime
1394
+ * attestation surface — the agent declares what model(s) it's actually running.
1395
+ */
1396
+ /**
1397
+ * Metadata about a single model powering this agent.
1398
+ */
1399
+ interface ModelProvenance {
1400
+ /** Machine-readable model ID (e.g., "qwen3.5-35b", "claude-opus-4", "llama-3.3-70b-instruct") */
1401
+ model_id: string;
1402
+ /** Human-readable model name (e.g., "Qwen 3.5", "Claude Opus 4", "Llama 3.3 70B Instruct") */
1403
+ model_name: string;
1404
+ /** Semantic version (e.g., "3.5", "4.0", "3.3") */
1405
+ model_version: string;
1406
+ /** Provider/vendor (e.g., "Alibaba Cloud", "Anthropic", "Meta", "local") */
1407
+ provider: string;
1408
+ /** SHA-256 of model weights file, if available and verifiable */
1409
+ weights_hash?: string;
1410
+ /** SHA-256 of training data manifest or metadata, if available */
1411
+ training_data_hash?: string;
1412
+ /** License identifier (e.g., "Apache-2.0", "CC-BY-4.0", "proprietary", "unknown") */
1413
+ license: string;
1414
+ /** True if model weights are publicly available (even if training is proprietary) */
1415
+ open_weights: boolean;
1416
+ /** True if full training code, data, and methodology are publicly available */
1417
+ open_source: boolean;
1418
+ /** True if inference runs on the local agent's hardware (not delegated to cloud API) */
1419
+ local_inference: boolean;
1420
+ /** ISO 8601 timestamp when this provenance was declared */
1421
+ declared_at: string;
1422
+ }
1423
+ /**
1424
+ * In-memory and persistent store for model provenance declarations.
1425
+ * Declarations are encrypted under L1 sovereignty.
1426
+ */
1427
+ interface ModelProvenanceStore {
1428
+ /**
1429
+ * Declare a model's provenance and add it to the store.
1430
+ */
1431
+ declare(provenance: ModelProvenance): void;
1432
+ /**
1433
+ * Retrieve a model's provenance by ID.
1434
+ */
1435
+ get(model_id: string): ModelProvenance | undefined;
1436
+ /**
1437
+ * List all declared models.
1438
+ */
1439
+ list(): ModelProvenance[];
1440
+ /**
1441
+ * Get the primary/main model (the one the agent uses by default for inference).
1442
+ */
1443
+ primary(): ModelProvenance | undefined;
1444
+ /**
1445
+ * Set which model is the primary.
1446
+ */
1447
+ setPrimary(model_id: string): void;
1448
+ }
1449
+ /**
1450
+ * In-memory implementation of ModelProvenanceStore.
1451
+ * Suitable for most use cases. For encrypted persistence, integrate with L1 state store.
1452
+ */
1453
+ declare class InMemoryModelProvenanceStore implements ModelProvenanceStore {
1454
+ private models;
1455
+ private primaryModelId;
1456
+ declare(provenance: ModelProvenance): void;
1457
+ get(model_id: string): ModelProvenance | undefined;
1458
+ list(): ModelProvenance[];
1459
+ primary(): ModelProvenance | undefined;
1460
+ setPrimary(model_id: string): void;
1461
+ }
1462
+ /**
1463
+ * Common model provenance presets for quick initialization.
1464
+ */
1465
+ declare const MODEL_PRESETS: {
1466
+ /**
1467
+ * Claude Opus 4 via Anthropic API (cloud inference, closed weights/source)
1468
+ */
1469
+ claudeOpus4: () => ModelProvenance;
1470
+ /**
1471
+ * Qwen 3.5 via local inference (open weights, proprietary training)
1472
+ */
1473
+ qwen35Local: () => ModelProvenance;
1474
+ /**
1475
+ * Llama 3.3 70B via local inference (open weights and code)
1476
+ */
1477
+ llama33Local: () => ModelProvenance;
1478
+ /**
1479
+ * Mistral 7B (open weights, open code, local inference)
1480
+ */
1481
+ mistral7bLocal: () => ModelProvenance;
1482
+ };
1483
+
1370
1484
  /**
1371
1485
  * Sanctuary MCP Server — Prompt Injection Detection Layer
1372
1486
  *
@@ -2673,4 +2787,4 @@ declare function createSanctuaryServer(options?: {
2673
2787
  storage?: StorageBackend;
2674
2788
  }): Promise<SanctuaryServer>;
2675
2789
 
2676
- export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRGeneratorOptions, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
2790
+ export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InMemoryModelProvenanceStore, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MODEL_PRESETS, MemoryStorage, type ModelProvenance, type ModelProvenanceStore, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRGeneratorOptions, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
package/dist/index.js CHANGED
@@ -11081,11 +11081,57 @@ var TOOL_API_SCOPED = {
11081
11081
  ],
11082
11082
  default_action: "redact"
11083
11083
  };
11084
+ var REMOTE_INFERENCE_SANITIZE = {
11085
+ id: "remote-inference-sanitize",
11086
+ name: "Remote Inference Sanitization",
11087
+ description: "Maximum privacy for remote/cloud LLM calls. Strips all identity, financial, location, and personal data before passing queries to external models. Inspired by Vitalik Buterin's 2-of-2 sovereignty model.",
11088
+ use_when: "Your local agent needs to call a remote LLM for tasks beyond local model capability (complex coding, deep research) and you want to minimize data leakage to the remote provider. The remote model gets only the task, query, format requirements, and stripped code context.",
11089
+ rules: [
11090
+ {
11091
+ provider: "inference",
11092
+ allow: [
11093
+ "task",
11094
+ "task_description",
11095
+ "current_query",
11096
+ "query",
11097
+ "prompt",
11098
+ "question",
11099
+ "instruction",
11100
+ "output_format",
11101
+ "format",
11102
+ "language",
11103
+ "code_context",
11104
+ // Stripped code snippets for coding tasks
11105
+ "error_message"
11106
+ // For debugging help
11107
+ ],
11108
+ redact: [
11109
+ ...ALWAYS_REDACT_SECRETS,
11110
+ ...PII_PATTERNS,
11111
+ ...INTERNAL_STATE_PATTERNS,
11112
+ ...HISTORY_PATTERNS,
11113
+ "tool_results",
11114
+ "previous_results",
11115
+ // Additional redactions for remote inference
11116
+ "model_data",
11117
+ "agent_state",
11118
+ "runtime_config",
11119
+ "capabilities",
11120
+ "tool_list"
11121
+ ],
11122
+ // Deny patterns — these must NEVER reach the remote model, not even redacted
11123
+ hash: [],
11124
+ summarize: []
11125
+ }
11126
+ ],
11127
+ default_action: "deny"
11128
+ };
11084
11129
  var TEMPLATES = {
11085
11130
  "inference-minimal": INFERENCE_MINIMAL,
11086
11131
  "inference-standard": INFERENCE_STANDARD,
11087
11132
  "logging-strict": LOGGING_STRICT,
11088
- "tool-api-scoped": TOOL_API_SCOPED
11133
+ "tool-api-scoped": TOOL_API_SCOPED,
11134
+ "remote-inference-sanitize": REMOTE_INFERENCE_SANITIZE
11089
11135
  };
11090
11136
  function listTemplateIds() {
11091
11137
  return Object.keys(TEMPLATES);
@@ -12573,6 +12619,101 @@ function createL2HardeningTools(storagePath, auditLog) {
12573
12619
  // src/index.ts
12574
12620
  init_encoding();
12575
12621
 
12622
+ // src/l2-operational/model-provenance.ts
12623
+ var InMemoryModelProvenanceStore = class {
12624
+ models = /* @__PURE__ */ new Map();
12625
+ primaryModelId = null;
12626
+ declare(provenance) {
12627
+ if (!provenance.model_id) {
12628
+ throw new Error("ModelProvenance requires a model_id");
12629
+ }
12630
+ if (!provenance.model_name) {
12631
+ throw new Error("ModelProvenance requires a model_name");
12632
+ }
12633
+ if (!provenance.provider) {
12634
+ throw new Error("ModelProvenance requires a provider");
12635
+ }
12636
+ this.models.set(provenance.model_id, provenance);
12637
+ if (this.primaryModelId === null) {
12638
+ this.primaryModelId = provenance.model_id;
12639
+ }
12640
+ }
12641
+ get(model_id) {
12642
+ return this.models.get(model_id);
12643
+ }
12644
+ list() {
12645
+ return Array.from(this.models.values());
12646
+ }
12647
+ primary() {
12648
+ if (!this.primaryModelId) return void 0;
12649
+ return this.models.get(this.primaryModelId);
12650
+ }
12651
+ setPrimary(model_id) {
12652
+ if (!this.models.has(model_id)) {
12653
+ throw new Error(`Model ${model_id} not found in store`);
12654
+ }
12655
+ this.primaryModelId = model_id;
12656
+ }
12657
+ };
12658
+ var MODEL_PRESETS = {
12659
+ /**
12660
+ * Claude Opus 4 via Anthropic API (cloud inference, closed weights/source)
12661
+ */
12662
+ claudeOpus4: () => ({
12663
+ model_id: "claude-opus-4",
12664
+ model_name: "Claude Opus 4",
12665
+ model_version: "4.0",
12666
+ provider: "Anthropic",
12667
+ license: "proprietary",
12668
+ open_weights: false,
12669
+ open_source: false,
12670
+ local_inference: false,
12671
+ declared_at: (/* @__PURE__ */ new Date()).toISOString()
12672
+ }),
12673
+ /**
12674
+ * Qwen 3.5 via local inference (open weights, proprietary training)
12675
+ */
12676
+ qwen35Local: () => ({
12677
+ model_id: "qwen-3.5-35b",
12678
+ model_name: "Qwen 3.5 35B",
12679
+ model_version: "3.5",
12680
+ provider: "Alibaba Cloud",
12681
+ license: "Apache-2.0",
12682
+ open_weights: true,
12683
+ open_source: false,
12684
+ local_inference: true,
12685
+ declared_at: (/* @__PURE__ */ new Date()).toISOString()
12686
+ }),
12687
+ /**
12688
+ * Llama 3.3 70B via local inference (open weights and code)
12689
+ */
12690
+ llama33Local: () => ({
12691
+ model_id: "llama-3.3-70b-instruct",
12692
+ model_name: "Llama 3.3 70B Instruct",
12693
+ model_version: "3.3",
12694
+ provider: "Meta",
12695
+ license: "Apache-2.0",
12696
+ open_weights: true,
12697
+ open_source: true,
12698
+ local_inference: true,
12699
+ declared_at: (/* @__PURE__ */ new Date()).toISOString()
12700
+ }),
12701
+ /**
12702
+ * Mistral 7B (open weights, open code, local inference)
12703
+ */
12704
+ mistral7bLocal: () => ({
12705
+ model_id: "mistral-7b-instruct",
12706
+ model_name: "Mistral 7B Instruct",
12707
+ model_version: "7",
12708
+ provider: "Mistral AI",
12709
+ license: "Apache-2.0",
12710
+ open_weights: true,
12711
+ open_source: true,
12712
+ local_inference: true,
12713
+ declared_at: (/* @__PURE__ */ new Date()).toISOString()
12714
+ })
12715
+ };
12716
+
12576
12717
  // src/storage/memory.ts
12577
12718
  var MemoryStorage = class {
12578
12719
  store = /* @__PURE__ */ new Map();
@@ -13094,6 +13235,6 @@ async function createSanctuaryServer(options) {
13094
13235
  return { server, config };
13095
13236
  }
13096
13237
 
13097
- export { ATTESTATION_VERSION, ApprovalGate, AuditLog, AutoApproveChannel, BaselineTracker, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, ContextGateEnforcer, ContextGatePolicyStore, DashboardApprovalChannel, FederationRegistry, FilesystemStorage, InjectionDetector, MemoryStorage, PolicyStore, ReputationStore, StateStore, StderrApprovalChannel, TIER_WEIGHTS, WebhookApprovalChannel, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
13238
+ export { ATTESTATION_VERSION, ApprovalGate, AuditLog, AutoApproveChannel, BaselineTracker, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, ContextGateEnforcer, ContextGatePolicyStore, DashboardApprovalChannel, FederationRegistry, FilesystemStorage, InMemoryModelProvenanceStore, InjectionDetector, MODEL_PRESETS, MemoryStorage, PolicyStore, ReputationStore, StateStore, StderrApprovalChannel, TIER_WEIGHTS, WebhookApprovalChannel, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
13098
13239
  //# sourceMappingURL=index.js.map
13099
13240
  //# sourceMappingURL=index.js.map