"use strict";
/**
 * @junction41/sovagent-sdk — Junction41 SDK
 *
 * Everything an AI agent needs to register, transact, and work
 * on the Junction41 — no Verus daemon required.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.PARENT_KEYS = exports.VDXF_KEYS = exports.finalizeOnboarding = exports.calculateListedPrice = exports.budgetToTokens = exports.privacyPremium = exports.recommendPrice = exports.estimateJobCost = exports.PLATFORM_FEE = exports.CATEGORY_MARKUPS = exports.SELF_HOSTED_COSTS = exports.API_COSTS = exports.IMAGE_COSTS = exports.LLM_COSTS = exports.verifyAttestationSignature = exports.verifyAttestationFormat = exports.signAttestationWith = exports.signAttestation = exports.generateAttestationPayload = exports.PRIVACY_TIERS = exports.WorkspaceClient = exports.ChatClient = exports.scanContext = exports.getDefaultPolicy = exports.POLICY_LABELS = exports.protectSystemPrompt = exports.checkForCanaryLeak = exports.generateCanary = exports.isIAddress = exports.buildP2IDScript = exports.wifToPubkey = exports.wifToAddress = exports.selectUtxos = exports.buildMultiPayment = exports.buildPayment = exports.buildIdentityUpdateTx = exports.loginWithConsent = exports.createLocalSigner = exports.verifyMessage = exports.signChallenge = exports.signMessage = exports.keypairFromWIF = exports.generateKeypair = exports.generateWebhookSecret = exports.verifyWebhookSignatureWithTimestamp = exports.verifyWebhookSignature = exports.J41Error = exports.J41Client = exports.RegistrationTimeoutError = exports.J41Agent = void 0;
exports.canonicalBytes = exports.signCanonical = exports.verifyAccessRequest = exports.verifyAccessEnvelope = exports.openAccessEnvelope = exports.mintAccessEnvelope = exports.buildAccessRequest = exports.generateEphemeralKeypair = exports.BuyerWorkspace = exports.BuyerSession = exports.validateSessionInput = exports.validateCapability = exports.validateEndpoint = exports.validateProtocols = exports.validateUrl = exports.validateTags = exports.validateDescription = exports.validateAgentType = exports.validateAgentName = exports.VALID_TYPES = exports.VALID_PROTOCOLS = exports.RESERVED_NAMES = exports.AGENT_NAME_REGEX = exports.assertNotProtocolMessage = exports.buildDepositReportMessage = exports.buildSelectClaimantsMessage = exports.buildApplyBountyMessage = exports.buildPostBountyMessage = exports.buildDisputeMessage = exports.buildCompleteMessage = exports.buildReworkAcceptMessage = exports.buildDisputeRespondMessage = exports.buildDeliverMessage = exports.buildAcceptMessage = exports.removeAndRewriteVdxfFields = exports.buildContentMultimapRemove = exports.MULTIMAPREMOVE_KEY = exports.mergeContentMultimap = exports.buildJobCompletionAdditions = exports.buildUpdateIdentityCommand = exports.buildUpdateIdentityPayload = exports.verifyPublishedIdentity = exports.buildCanonicalAgentUpdate = exports.decodeContentMultimap = exports.buildAgentContentMultimap = exports.decodeVdxfValue = exports.encodeVdxfValue = exports.getCanonicalVdxfDefinitionCount = exports.makeSubDD = exports.DATA_DESCRIPTOR_KEY = void 0;
exports.clearBackendFeatureCache = exports.checkRequiredFeatures = exports.hasFeature = exports.fetchBackendVersion = exports.SUPPORTED_VERSIONS = exports.SUPPORTED_SUITES = exports.ACTIONS = exports.ACTION_MAX_WINDOW_MS = exports.CANONICAL_MAX_BYTES = exports.recordV1FormatEmission = exports.setMetricEmitter = exports.CanonicalError = exports.buildRequestAccessEnvelope = exports.verifyCanonicalSignatures = exports.validateEnvelope = void 0;
// Core agent class
var agent_js_1 = require("./agent.js");
Object.defineProperty(exports, "J41Agent", { enumerable: true, get: function () { return agent_js_1.J41Agent; } });
Object.defineProperty(exports, "RegistrationTimeoutError", { enumerable: true, get: function () { return agent_js_1.RegistrationTimeoutError; } });
// Client — REST API wrapper
var index_js_1 = require("./client/index.js");
Object.defineProperty(exports, "J41Client", { enumerable: true, get: function () { return index_js_1.J41Client; } });
Object.defineProperty(exports, "J41Error", { enumerable: true, get: function () { return index_js_1.J41Error; } });
// Webhook verification
var verify_js_1 = require("./webhook/verify.js");
Object.defineProperty(exports, "verifyWebhookSignature", { enumerable: true, get: function () { return verify_js_1.verifyWebhookSignature; } });
Object.defineProperty(exports, "verifyWebhookSignatureWithTimestamp", { enumerable: true, get: function () { return verify_js_1.verifyWebhookSignatureWithTimestamp; } });
Object.defineProperty(exports, "generateWebhookSecret", { enumerable: true, get: function () { return verify_js_1.generateWebhookSecret; } });
// Identity — keypair generation + management
var keypair_js_1 = require("./identity/keypair.js");
Object.defineProperty(exports, "generateKeypair", { enumerable: true, get: function () { return keypair_js_1.generateKeypair; } });
Object.defineProperty(exports, "keypairFromWIF", { enumerable: true, get: function () { return keypair_js_1.keypairFromWIF; } });
// Message signing
var signer_js_1 = require("./identity/signer.js");
Object.defineProperty(exports, "signMessage", { enumerable: true, get: function () { return signer_js_1.signMessage; } });
Object.defineProperty(exports, "signChallenge", { enumerable: true, get: function () { return signer_js_1.signChallenge; } });
Object.defineProperty(exports, "verifyMessage", { enumerable: true, get: function () { return signer_js_1.verifyMessage; } });
// Remote signer (host-side broker integration — let agents run without a WIF)
var remote_signer_js_1 = require("./identity/remote-signer.js");
Object.defineProperty(exports, "createLocalSigner", { enumerable: true, get: function () { return remote_signer_js_1.createLocalSigner; } });
// LoginConsent authentication
var login_consent_js_1 = require("./auth/login-consent.js");
Object.defineProperty(exports, "loginWithConsent", { enumerable: true, get: function () { return login_consent_js_1.loginWithConsent; } });
// Identity update (offline tx building)
var update_js_1 = require("./identity/update.js");
Object.defineProperty(exports, "buildIdentityUpdateTx", { enumerable: true, get: function () { return update_js_1.buildIdentityUpdateTx; } });
// Transaction builder
var payment_js_1 = require("./tx/payment.js");
Object.defineProperty(exports, "buildPayment", { enumerable: true, get: function () { return payment_js_1.buildPayment; } });
Object.defineProperty(exports, "buildMultiPayment", { enumerable: true, get: function () { return payment_js_1.buildMultiPayment; } });
Object.defineProperty(exports, "selectUtxos", { enumerable: true, get: function () { return payment_js_1.selectUtxos; } });
Object.defineProperty(exports, "wifToAddress", { enumerable: true, get: function () { return payment_js_1.wifToAddress; } });
Object.defineProperty(exports, "wifToPubkey", { enumerable: true, get: function () { return payment_js_1.wifToPubkey; } });
Object.defineProperty(exports, "buildP2IDScript", { enumerable: true, get: function () { return payment_js_1.buildP2IDScript; } });
Object.defineProperty(exports, "isIAddress", { enumerable: true, get: function () { return payment_js_1.isIAddress; } });
// Safety — canary tokens + communication policy
var canary_js_1 = require("./safety/canary.js");
Object.defineProperty(exports, "generateCanary", { enumerable: true, get: function () { return canary_js_1.generateCanary; } });
Object.defineProperty(exports, "checkForCanaryLeak", { enumerable: true, get: function () { return canary_js_1.checkForCanaryLeak; } });
Object.defineProperty(exports, "protectSystemPrompt", { enumerable: true, get: function () { return canary_js_1.protectSystemPrompt; } });
var policy_js_1 = require("./safety/policy.js");
Object.defineProperty(exports, "POLICY_LABELS", { enumerable: true, get: function () { return policy_js_1.POLICY_LABELS; } });
Object.defineProperty(exports, "getDefaultPolicy", { enumerable: true, get: function () { return policy_js_1.getDefaultPolicy; } });
// Safety — source-trust-aware context scanning (vendored model-less scanner)
var context_js_1 = require("./safety/context.js");
Object.defineProperty(exports, "scanContext", { enumerable: true, get: function () { return context_js_1.scanContext; } });
// Chat — SovGuard WebSocket client
var index_js_2 = require("./chat/index.js");
Object.defineProperty(exports, "ChatClient", { enumerable: true, get: function () { return index_js_2.ChatClient; } });
// Workspace — agent-side relay connection
var index_js_3 = require("./workspace/index.js");
Object.defineProperty(exports, "WorkspaceClient", { enumerable: true, get: function () { return index_js_3.WorkspaceClient; } });
// Privacy tiers
var tiers_js_1 = require("./privacy/tiers.js");
Object.defineProperty(exports, "PRIVACY_TIERS", { enumerable: true, get: function () { return tiers_js_1.PRIVACY_TIERS; } });
// Deletion attestation
var attestation_js_1 = require("./privacy/attestation.js");
Object.defineProperty(exports, "generateAttestationPayload", { enumerable: true, get: function () { return attestation_js_1.generateAttestationPayload; } });
Object.defineProperty(exports, "signAttestation", { enumerable: true, get: function () { return attestation_js_1.signAttestation; } });
Object.defineProperty(exports, "signAttestationWith", { enumerable: true, get: function () { return attestation_js_1.signAttestationWith; } });
Object.defineProperty(exports, "verifyAttestationFormat", { enumerable: true, get: function () { return attestation_js_1.verifyAttestationFormat; } });
Object.defineProperty(exports, "verifyAttestationSignature", { enumerable: true, get: function () { return attestation_js_1.verifyAttestationSignature; } });
// Pricing tables
var tables_js_1 = require("./pricing/tables.js");
Object.defineProperty(exports, "LLM_COSTS", { enumerable: true, get: function () { return tables_js_1.LLM_COSTS; } });
Object.defineProperty(exports, "IMAGE_COSTS", { enumerable: true, get: function () { return tables_js_1.IMAGE_COSTS; } });
Object.defineProperty(exports, "API_COSTS", { enumerable: true, get: function () { return tables_js_1.API_COSTS; } });
Object.defineProperty(exports, "SELF_HOSTED_COSTS", { enumerable: true, get: function () { return tables_js_1.SELF_HOSTED_COSTS; } });
Object.defineProperty(exports, "CATEGORY_MARKUPS", { enumerable: true, get: function () { return tables_js_1.CATEGORY_MARKUPS; } });
Object.defineProperty(exports, "PLATFORM_FEE", { enumerable: true, get: function () { return tables_js_1.PLATFORM_FEE; } });
// Pricing calculator
var calculator_js_1 = require("./pricing/calculator.js");
Object.defineProperty(exports, "estimateJobCost", { enumerable: true, get: function () { return calculator_js_1.estimateJobCost; } });
Object.defineProperty(exports, "recommendPrice", { enumerable: true, get: function () { return calculator_js_1.recommendPrice; } });
Object.defineProperty(exports, "privacyPremium", { enumerable: true, get: function () { return calculator_js_1.privacyPremium; } });
Object.defineProperty(exports, "budgetToTokens", { enumerable: true, get: function () { return calculator_js_1.budgetToTokens; } });
Object.defineProperty(exports, "calculateListedPrice", { enumerable: true, get: function () { return calculator_js_1.calculateListedPrice; } });
// Onboarding finalization (idempotent, resumable)
var finalize_js_1 = require("./onboarding/finalize.js");
Object.defineProperty(exports, "finalizeOnboarding", { enumerable: true, get: function () { return finalize_js_1.finalizeOnboarding; } });
var vdxf_js_1 = require("./onboarding/vdxf.js");
Object.defineProperty(exports, "VDXF_KEYS", { enumerable: true, get: function () { return vdxf_js_1.VDXF_KEYS; } });
Object.defineProperty(exports, "PARENT_KEYS", { enumerable: true, get: function () { return vdxf_js_1.PARENT_KEYS; } });
Object.defineProperty(exports, "DATA_DESCRIPTOR_KEY", { enumerable: true, get: function () { return vdxf_js_1.DATA_DESCRIPTOR_KEY; } });
Object.defineProperty(exports, "makeSubDD", { enumerable: true, get: function () { return vdxf_js_1.makeSubDD; } });
Object.defineProperty(exports, "getCanonicalVdxfDefinitionCount", { enumerable: true, get: function () { return vdxf_js_1.getCanonicalVdxfDefinitionCount; } });
Object.defineProperty(exports, "encodeVdxfValue", { enumerable: true, get: function () { return vdxf_js_1.encodeVdxfValue; } });
Object.defineProperty(exports, "decodeVdxfValue", { enumerable: true, get: function () { return vdxf_js_1.decodeVdxfValue; } });
Object.defineProperty(exports, "buildAgentContentMultimap", { enumerable: true, get: function () { return vdxf_js_1.buildAgentContentMultimap; } });
Object.defineProperty(exports, "decodeContentMultimap", { enumerable: true, get: function () { return vdxf_js_1.decodeContentMultimap; } });
Object.defineProperty(exports, "buildCanonicalAgentUpdate", { enumerable: true, get: function () { return vdxf_js_1.buildCanonicalAgentUpdate; } });
Object.defineProperty(exports, "verifyPublishedIdentity", { enumerable: true, get: function () { return vdxf_js_1.verifyPublishedIdentity; } });
Object.defineProperty(exports, "buildUpdateIdentityPayload", { enumerable: true, get: function () { return vdxf_js_1.buildUpdateIdentityPayload; } });
Object.defineProperty(exports, "buildUpdateIdentityCommand", { enumerable: true, get: function () { return vdxf_js_1.buildUpdateIdentityCommand; } });
Object.defineProperty(exports, "buildJobCompletionAdditions", { enumerable: true, get: function () { return vdxf_js_1.buildJobCompletionAdditions; } });
Object.defineProperty(exports, "mergeContentMultimap", { enumerable: true, get: function () { return vdxf_js_1.mergeContentMultimap; } });
Object.defineProperty(exports, "MULTIMAPREMOVE_KEY", { enumerable: true, get: function () { return vdxf_js_1.MULTIMAPREMOVE_KEY; } });
Object.defineProperty(exports, "buildContentMultimapRemove", { enumerable: true, get: function () { return vdxf_js_1.buildContentMultimapRemove; } });
Object.defineProperty(exports, "removeAndRewriteVdxfFields", { enumerable: true, get: function () { return vdxf_js_1.removeAndRewriteVdxfFields; } });
// Signing message builders (M2)
var messages_js_1 = require("./signing/messages.js");
Object.defineProperty(exports, "buildAcceptMessage", { enumerable: true, get: function () { return messages_js_1.buildAcceptMessage; } });
Object.defineProperty(exports, "buildDeliverMessage", { enumerable: true, get: function () { return messages_js_1.buildDeliverMessage; } });
Object.defineProperty(exports, "buildDisputeRespondMessage", { enumerable: true, get: function () { return messages_js_1.buildDisputeRespondMessage; } });
Object.defineProperty(exports, "buildReworkAcceptMessage", { enumerable: true, get: function () { return messages_js_1.buildReworkAcceptMessage; } });
Object.defineProperty(exports, "buildCompleteMessage", { enumerable: true, get: function () { return messages_js_1.buildCompleteMessage; } });
Object.defineProperty(exports, "buildDisputeMessage", { enumerable: true, get: function () { return messages_js_1.buildDisputeMessage; } });
Object.defineProperty(exports, "buildPostBountyMessage", { enumerable: true, get: function () { return messages_js_1.buildPostBountyMessage; } });
Object.defineProperty(exports, "buildApplyBountyMessage", { enumerable: true, get: function () { return messages_js_1.buildApplyBountyMessage; } });
Object.defineProperty(exports, "buildSelectClaimantsMessage", { enumerable: true, get: function () { return messages_js_1.buildSelectClaimantsMessage; } });
Object.defineProperty(exports, "buildDepositReportMessage", { enumerable: true, get: function () { return messages_js_1.buildDepositReportMessage; } });
Object.defineProperty(exports, "assertNotProtocolMessage", { enumerable: true, get: function () { return messages_js_1.assertNotProtocolMessage; } });
var validation_js_1 = require("./onboarding/validation.js");
Object.defineProperty(exports, "AGENT_NAME_REGEX", { enumerable: true, get: function () { return validation_js_1.AGENT_NAME_REGEX; } });
Object.defineProperty(exports, "RESERVED_NAMES", { enumerable: true, get: function () { return validation_js_1.RESERVED_NAMES; } });
Object.defineProperty(exports, "VALID_PROTOCOLS", { enumerable: true, get: function () { return validation_js_1.VALID_PROTOCOLS; } });
Object.defineProperty(exports, "VALID_TYPES", { enumerable: true, get: function () { return validation_js_1.VALID_TYPES; } });
Object.defineProperty(exports, "validateAgentName", { enumerable: true, get: function () { return validation_js_1.validateAgentName; } });
Object.defineProperty(exports, "validateAgentType", { enumerable: true, get: function () { return validation_js_1.validateAgentType; } });
Object.defineProperty(exports, "validateDescription", { enumerable: true, get: function () { return validation_js_1.validateDescription; } });
Object.defineProperty(exports, "validateTags", { enumerable: true, get: function () { return validation_js_1.validateTags; } });
Object.defineProperty(exports, "validateUrl", { enumerable: true, get: function () { return validation_js_1.validateUrl; } });
Object.defineProperty(exports, "validateProtocols", { enumerable: true, get: function () { return validation_js_1.validateProtocols; } });
Object.defineProperty(exports, "validateEndpoint", { enumerable: true, get: function () { return validation_js_1.validateEndpoint; } });
Object.defineProperty(exports, "validateCapability", { enumerable: true, get: function () { return validation_js_1.validateCapability; } });
Object.defineProperty(exports, "validateSessionInput", { enumerable: true, get: function () { return validation_js_1.validateSessionInput; } });
// Buyer session (agent-to-agent)
var session_js_1 = require("./buyer/session.js");
Object.defineProperty(exports, "BuyerSession", { enumerable: true, get: function () { return session_js_1.BuyerSession; } });
var workspace_js_1 = require("./buyer/workspace.js");
Object.defineProperty(exports, "BuyerWorkspace", { enumerable: true, get: function () { return workspace_js_1.BuyerWorkspace; } });
// Crypto — ECDH key envelope for API proxy
var envelope_js_1 = require("./crypto/envelope.js");
Object.defineProperty(exports, "generateEphemeralKeypair", { enumerable: true, get: function () { return envelope_js_1.generateEphemeralKeypair; } });
Object.defineProperty(exports, "buildAccessRequest", { enumerable: true, get: function () { return envelope_js_1.buildAccessRequest; } });
Object.defineProperty(exports, "mintAccessEnvelope", { enumerable: true, get: function () { return envelope_js_1.mintAccessEnvelope; } });
Object.defineProperty(exports, "openAccessEnvelope", { enumerable: true, get: function () { return envelope_js_1.openAccessEnvelope; } });
Object.defineProperty(exports, "verifyAccessEnvelope", { enumerable: true, get: function () { return envelope_js_1.verifyAccessEnvelope; } });
Object.defineProperty(exports, "verifyAccessRequest", { enumerable: true, get: function () { return envelope_js_1.verifyAccessRequest; } });
// Canonical-v1 signing envelope (RFC 8785 JCS + Verus signmessage)
// Matches backend spec docs/spec/api-session-signing-v2.md (rev 2.1, autobb888/junction41@d696135)
var canonical_js_1 = require("./crypto/canonical.js");
Object.defineProperty(exports, "signCanonical", { enumerable: true, get: function () { return canonical_js_1.signCanonical; } });
Object.defineProperty(exports, "canonicalBytes", { enumerable: true, get: function () { return canonical_js_1.canonicalBytes; } });
Object.defineProperty(exports, "validateEnvelope", { enumerable: true, get: function () { return canonical_js_1.validateEnvelope; } });
Object.defineProperty(exports, "verifyCanonicalSignatures", { enumerable: true, get: function () { return canonical_js_1.verifyCanonicalSignatures; } });
Object.defineProperty(exports, "buildRequestAccessEnvelope", { enumerable: true, get: function () { return canonical_js_1.buildRequestAccessEnvelope; } });
Object.defineProperty(exports, "CanonicalError", { enumerable: true, get: function () { return canonical_js_1.CanonicalError; } });
Object.defineProperty(exports, "setMetricEmitter", { enumerable: true, get: function () { return canonical_js_1.setMetricEmitter; } });
Object.defineProperty(exports, "recordV1FormatEmission", { enumerable: true, get: function () { return canonical_js_1.recordV1FormatEmission; } });
Object.defineProperty(exports, "CANONICAL_MAX_BYTES", { enumerable: true, get: function () { return canonical_js_1.CANONICAL_MAX_BYTES; } });
Object.defineProperty(exports, "ACTION_MAX_WINDOW_MS", { enumerable: true, get: function () { return canonical_js_1.ACTION_MAX_WINDOW_MS; } });
Object.defineProperty(exports, "ACTIONS", { enumerable: true, get: function () { return canonical_js_1.ACTIONS; } });
Object.defineProperty(exports, "SUPPORTED_SUITES", { enumerable: true, get: function () { return canonical_js_1.SUPPORTED_SUITES; } });
Object.defineProperty(exports, "SUPPORTED_VERSIONS", { enumerable: true, get: function () { return canonical_js_1.SUPPORTED_VERSIONS; } });
// Backend feature-flag checks (for /v1/version rollout coordination)
var backend_features_js_1 = require("./backend-features.js");
Object.defineProperty(exports, "fetchBackendVersion", { enumerable: true, get: function () { return backend_features_js_1.fetchBackendVersion; } });
Object.defineProperty(exports, "hasFeature", { enumerable: true, get: function () { return backend_features_js_1.hasFeature; } });
Object.defineProperty(exports, "checkRequiredFeatures", { enumerable: true, get: function () { return backend_features_js_1.checkRequiredFeatures; } });
Object.defineProperty(exports, "clearBackendFeatureCache", { enumerable: true, get: function () { return backend_features_js_1.clearBackendFeatureCache; } });
//# sourceMappingURL=index.js.map