@vinaystwt/xmpp-mcp 0.1.1 → 0.2.0

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.
@@ -1,10 +1,10 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import * as z from 'zod/v4';
4
- import { listAgentPolicySnapshots, listAgentSessions } from '@xmpp/contract-runtime';
5
- import { getXmppMetadata, getXmppOperatorState, listLocalSessions, listEffectiveXmppAgentProfiles, xmppFetch, } from '@xmpp/http-interceptor';
6
- import { createRouter } from '@xmpp/router';
7
- import { getWalletInfo, verifyXmppReceipt } from '@xmpp/wallet';
4
+ import { listAgentPolicySnapshots, listAgentSessions } from '../../../packages/contract-runtime/src/index.js';
5
+ import { getXmppMetadata, getXmppOperatorState, listLocalSessions, listEffectiveXmppAgentProfiles, xmppFetch, } from '../../../packages/http-interceptor/src/index.js';
6
+ import { createRouter } from '../../../packages/router/src/index.js';
7
+ import { getWalletInfo, verifyXmppReceipt } from '../../../packages/wallet/src/index.js';
8
8
  const router = createRouter();
9
9
  const signedReceiptSchema = z.object({
10
10
  receiptId: z.string(),
@@ -1,4 +1,4 @@
1
- import type { RouteKind, XmppAgentPolicySnapshot, XmppContractAgentTreasuryState, XmppContractTreasurySnapshot, XmppSessionRecord } from '@xmpp/types';
1
+ import type { RouteKind, XmppAgentPolicySnapshot, XmppContractAgentTreasuryState, XmppContractTreasurySnapshot, XmppSessionRecord } from '../../types/src/index.js';
2
2
  export type PolicyRuntimeSnapshot = {
3
3
  source: 'local' | 'contract' | 'fallback';
4
4
  pauseFlag: boolean;
@@ -1,7 +1,7 @@
1
1
  import { Keypair } from '@stellar/stellar-sdk';
2
2
  import { Client, basicNodeSigner } from '@stellar/stellar-sdk/contract';
3
- import { config } from '@xmpp/config';
4
- import { logger } from '@xmpp/logger';
3
+ import { config } from '../../config/src/index.js';
4
+ import { logger } from '../../logger/src/index.js';
5
5
  let policyClientPromise;
6
6
  let sessionRegistryClientPromise;
7
7
  let policyClientDisabled = false;
@@ -1,4 +1,4 @@
1
- import type { XmppAgentPolicySnapshot, XmppAgentProfile } from '@xmpp/types';
1
+ import type { XmppAgentPolicySnapshot, XmppAgentProfile } from '../../types/src/index.js';
2
2
  export declare function listXmppAgentProfiles(): XmppAgentProfile[];
3
3
  export declare function getXmppAgentProfile(agentId?: string): XmppAgentProfile;
4
4
  export declare function applyAgentPolicy(profile: XmppAgentProfile, policy: XmppAgentPolicySnapshot | null | undefined): XmppAgentProfile;
@@ -1,4 +1,4 @@
1
- import { config } from '@xmpp/config';
1
+ import { config } from '../../config/src/index.js';
2
2
  const ALL_ROUTES = ['x402', 'mpp-charge', 'mpp-session-open', 'mpp-session-reuse'];
3
3
  const ROUTE_SET = new Set(ALL_ROUTES);
4
4
  function roundUsd(value) {
@@ -1,4 +1,4 @@
1
- import type { XmppFetchMetadata, XmppFetchOptions } from '@xmpp/types';
1
+ import type { XmppFetchMetadata, XmppFetchOptions } from '../../types/src/index.js';
2
2
  type IdempotencySnapshot = {
3
3
  fingerprint: string;
4
4
  storedAt: number;
@@ -56,12 +56,12 @@ export declare function buildIdempotentReplay(snapshot: IdempotencySnapshot['res
56
56
  response: Response;
57
57
  metadata: {
58
58
  idempotentReplay: boolean;
59
- route: import("@xmpp/types").RouteKind;
60
- challenge?: import("@xmpp/types").PaymentChallenge;
59
+ route: import("../../types/src/index.js").RouteKind;
60
+ challenge?: import("../../types/src/index.js").PaymentChallenge;
61
61
  retried: boolean;
62
- execution?: import("@xmpp/types").PaymentExecutionMetadata;
63
- policy?: import("@xmpp/types").PolicyDecision;
64
- budget?: import("@xmpp/types").XmppBudgetSnapshot;
62
+ execution?: import("../../types/src/index.js").PaymentExecutionMetadata;
63
+ policy?: import("../../types/src/index.js").PolicyDecision;
64
+ budget?: import("../../types/src/index.js").XmppBudgetSnapshot;
65
65
  };
66
66
  } | null;
67
67
  export declare function resetIdempotencyCache(): void;
@@ -1,4 +1,4 @@
1
- import type { XmppAgentProfile, XmppFetchMetadata, XmppFetchOptions } from '@xmpp/types';
1
+ import type { XmppAgentProfile, XmppFetchMetadata, XmppFetchOptions } from '../../types/src/index.js';
2
2
  import { getXmppOperatorState, listLocalSessions } from './state.js';
3
3
  import { listXmppAgentProfiles } from './agents.js';
4
4
  export declare function getXmppMetadata(resp: Response): XmppFetchMetadata | undefined;
@@ -1,9 +1,9 @@
1
- import { createRouter, estimateRouteCost } from '@xmpp/router';
2
- import { getAgentTreasuryState, getAgentPolicySnapshot, getTreasurySnapshot, listAgentPolicySnapshots, getPolicyRuntimeSnapshot, recordTreasurySpend, recordSessionRouteEvent, } from '@xmpp/contract-runtime';
3
- import { executePaymentRoute, preparePaymentExecution } from '@xmpp/payment-adapters';
4
- import { config } from '@xmpp/config';
5
- import { evaluatePolicyForRequest } from '@xmpp/policy-engine';
6
- import { signXmppReceipt } from '@xmpp/wallet';
1
+ import { createRouter, estimateRouteCost } from '../../router/src/index.js';
2
+ import { getAgentTreasuryState, getAgentPolicySnapshot, getTreasurySnapshot, listAgentPolicySnapshots, getPolicyRuntimeSnapshot, recordTreasurySpend, recordSessionRouteEvent, } from '../../contract-runtime/src/index.js';
3
+ import { executePaymentRoute, preparePaymentExecution } from '../../payment-adapters/src/index.js';
4
+ import { config } from '../../config/src/index.js';
5
+ import { evaluatePolicyForRequest } from '../../policy-engine/src/index.js';
6
+ import { signXmppReceipt } from '../../wallet/src/index.js';
7
7
  import { buildIdempotentReplay, clearIdempotentReservation, inspectIdempotency, storeIdempotentResponse, } from './idempotency.js';
8
8
  import { buildBudgetSnapshot, getXmppOperatorState, listLocalSessions, recordXmppEvent, resetXmppOperatorState, upsertLocalSession, } from './state.js';
9
9
  import { applyAgentPolicy, getXmppAgentProfile, listXmppAgentProfiles, mergeAgentPolicies, } from './agents.js';
@@ -1,4 +1,4 @@
1
- import type { XmppAgentProfile, RouteKind, XmppAgentStateSummary, XmppBudgetSnapshot, XmppOperatorState, XmppRouteEvent, XmppSessionRecord } from '@xmpp/types';
1
+ import type { XmppAgentProfile, RouteKind, XmppAgentStateSummary, XmppBudgetSnapshot, XmppOperatorState, XmppRouteEvent, XmppSessionRecord } from '../../types/src/index.js';
2
2
  export declare function recordXmppEvent(input: Omit<XmppRouteEvent, 'id' | 'timestamp'>): XmppRouteEvent;
3
3
  export declare function upsertLocalSession(sessionId: string, serviceId: string, callCount: number): void;
4
4
  export declare function listLocalSessions(): Pick<XmppSessionRecord, "serviceId" | "sessionId" | "callCount">[];
@@ -1,5 +1,5 @@
1
- import { config } from '@xmpp/config';
2
- import { createRouter, estimateRouteCost, resolveCatalogEntry } from '@xmpp/router';
1
+ import { config } from '../../config/src/index.js';
2
+ import { createRouter, estimateRouteCost, resolveCatalogEntry } from '../../router/src/index.js';
3
3
  import { getXmppAgentProfile, listXmppAgentProfiles } from './agents.js';
4
4
  const router = createRouter();
5
5
  const recentEvents = [];
@@ -1,5 +1,5 @@
1
1
  import { Keypair, xdr } from '@stellar/stellar-sdk';
2
- import type { PaymentChallenge, PaymentExecutionMetadata, PaymentExecutionResult, RouteKind } from '@xmpp/types';
2
+ import type { PaymentChallenge, PaymentExecutionMetadata, PaymentExecutionResult, RouteKind } from '../../types/src/index.js';
3
3
  import { XLM_SAC_TESTNET } from '@stellar/mpp';
4
4
  declare function createClassicSignatureScVal(keypair: Keypair, payload: Buffer): xdr.ScVal;
5
5
  declare function createDelegatedSignerScVal(publicKey: string): xdr.ScVal;
@@ -1,4 +1,4 @@
1
- import { config } from '@xmpp/config';
1
+ import { config } from '../../config/src/index.js';
2
2
  import * as StellarSdk from '@stellar/stellar-sdk';
3
3
  import { contract, hash, Keypair, nativeToScVal, rpc, TransactionBuilder, xdr } from '@stellar/stellar-sdk';
4
4
  import { basicNodeSigner } from '@stellar/stellar-sdk/contract';
@@ -8,7 +8,7 @@ import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
8
8
  import { createEd25519Signer } from '@x402/stellar';
9
9
  import { ExactStellarScheme } from '@x402/stellar/exact/client';
10
10
  import { XLM_SAC_TESTNET } from '@stellar/mpp';
11
- import { getRouteExecutionPlan } from '@xmpp/wallet';
11
+ import { getRouteExecutionPlan } from '../../wallet/src/index.js';
12
12
  const stellarNetwork = config.network;
13
13
  const liveFetchCache = new Map();
14
14
  const DEFAULT_LEDGER_CLOSE_SECONDS = 5;
@@ -1,4 +1,4 @@
1
- import type { PolicyDecision } from '@xmpp/types';
1
+ import type { PolicyDecision } from '../../types/src/index.js';
2
2
  export declare function isAllowedDomain(url: string): boolean;
3
3
  export declare function evaluatePolicy(url: string): PolicyDecision;
4
4
  export declare function evaluatePolicyForRequest(input: {
@@ -1,4 +1,4 @@
1
- import { getPolicyRuntimeSnapshot } from '@xmpp/contract-runtime';
1
+ import { getPolicyRuntimeSnapshot } from '../../contract-runtime/src/index.js';
2
2
  const allowedHosts = new Set(['localhost', '127.0.0.1']);
3
3
  const blockedPathPrefixes = ['/admin', '/internal', '/unsafe'];
4
4
  export function isAllowedDomain(url) {
@@ -1,4 +1,4 @@
1
- import type { PaymentChallenge, RouteContext, RouteDecision, RouteKind, ServiceCatalogEntry, WorkflowEstimateResult, WorkflowEstimateStep } from '@xmpp/types';
1
+ import type { PaymentChallenge, RouteContext, RouteDecision, RouteKind, ServiceCatalogEntry, WorkflowEstimateResult, WorkflowEstimateStep } from '../../types/src/index.js';
2
2
  export declare function resolveCatalogEntry(input: RouteContext): ServiceCatalogEntry;
3
3
  export declare function estimateRouteCost(input: {
4
4
  route: RouteKind;
@@ -1,4 +1,4 @@
1
- import type { PaymentExecutionMetadata, RouteKind, XmppReceiptVerificationResult, XmppSignedReceipt, XmppSmartAccountExecution, XmppWalletInfo } from '@xmpp/types';
1
+ import type { PaymentExecutionMetadata, RouteKind, XmppReceiptVerificationResult, XmppSignedReceipt, XmppSmartAccountExecution, XmppWalletInfo } from '../../types/src/index.js';
2
2
  export declare const SMART_ACCOUNT_MIN_TRANSACTION_FEE_STROOPS = 2000000;
3
3
  export declare function signXmppReceipt(input: Omit<XmppSignedReceipt, 'signature' | 'agent' | 'issuedAt' | 'network'> & {
4
4
  issuedAt?: string;
@@ -1,4 +1,4 @@
1
- import { config } from '@xmpp/config';
1
+ import { config } from '../../config/src/index.js';
2
2
  import { Keypair } from '@stellar/stellar-sdk';
3
3
  export const SMART_ACCOUNT_MIN_TRANSACTION_FEE_STROOPS = 2_000_000;
4
4
  function stableReceiptPayload(receipt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinaystwt/xmpp-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Public xMPP MCP server for payment-aware agent workflows on Stellar, with fetch, preview, explain, session, and receipt tools.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,12 +57,6 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@modelcontextprotocol/sdk": "^1.27.1",
60
- "@vinaystwt/xmpp-config": "0.1.1",
61
- "@vinaystwt/xmpp-contract-runtime": "0.1.1",
62
- "@vinaystwt/xmpp-http-interceptor": "0.1.1",
63
- "@vinaystwt/xmpp-router": "0.1.1",
64
- "@vinaystwt/xmpp-types": "0.1.1",
65
- "@vinaystwt/xmpp-wallet": "0.1.1",
66
60
  "zod": "^4.3.6"
67
61
  },
68
62
  "devDependencies": {