motebit 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/dist/index.js +92 -92
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -11948,7 +11948,7 @@ var init_config2 = __esm({
11948
11948
  "src/config.ts"() {
11949
11949
  "use strict";
11950
11950
  init_esm_shims();
11951
- VERSION = true ? "1.1.0" : "0.0.0-dev";
11951
+ VERSION = true ? "1.1.1" : "0.0.0-dev";
11952
11952
  CONFIG_DIR = process.env["MOTEBIT_CONFIG_DIR"] ?? path2.join(os.homedir(), ".motebit");
11953
11953
  CONFIG_PATH = path2.join(CONFIG_DIR, "config.json");
11954
11954
  RELAY_DIR = path2.join(CONFIG_DIR, "relay");
@@ -23250,7 +23250,7 @@ A motebit is a droplet of intelligence under surface tension \u2014 body passive
23250
23250
  id: "README.md#versioning",
23251
23251
  source: "README.md",
23252
23252
  title: "Versioning",
23253
- content: "12 packages publish to npm \u2014 11 Apache-2.0 (the permissive floor) and 1 BSL-1.1 (the `motebit` reference runtime, with the CLI as its primary surface). All 12 are at `1.0.0`. Breaking changes to any of their public surfaces require a major bump.\n\nThe 51 workspace-private packages \u2014 `@motebit/runtime`, `@motebit/api`, `@motebit/ai-core`, `@motebit/memory-graph`, `@motebit/policy`, `@motebit/sync-engine`, and the rest of the interior machinery \u2014 exist for source organization and do not publish independently. They carry a sentinel version `0.0.0-private` so the absence of a semver claim is explicit at the source: the only stability promises this repo makes live on the 12 published packages above.\n\n**The public promise of `motebit@1.0` is its bundled operator-facing surface \u2014 subcommands, flags, exit codes, `~/.motebit/` layout, relay HTTP routes, MCP server tool list \u2014 not the internal workspace package graph.** The Apache-2.0 protocol packages (`@motebit/protocol`, `@motebit/sdk`, `@motebit/crypto`) promise wire-format and type stability independently, gated by `check-api-surface`.",
23253
+ content: "12 packages publish to npm \u2014 11 Apache-2.0 (the permissive floor) and 1 BSL-1.1 (the `motebit` reference runtime, with the CLI as its primary surface). All 12 are at `1.0.0`. Breaking changes to any of their public surfaces require a major bump.\n\nThe 51 workspace-private packages \u2014 `@motebit/runtime`, `@motebit/relay`, `@motebit/ai-core`, `@motebit/memory-graph`, `@motebit/policy`, `@motebit/sync-engine`, and the rest of the interior machinery \u2014 exist for source organization and do not publish independently. They carry a sentinel version `0.0.0-private` so the absence of a semver claim is explicit at the source: the only stability promises this repo makes live on the 12 published packages above.\n\n**The public promise of `motebit@1.0` is its bundled operator-facing surface \u2014 subcommands, flags, exit codes, `~/.motebit/` layout, relay HTTP routes, MCP server tool list \u2014 not the internal workspace package graph.** The Apache-2.0 protocol packages (`@motebit/protocol`, `@motebit/sdk`, `@motebit/crypto`) promise wire-format and type stability independently, gated by `check-api-surface`.",
23254
23254
  termFrequencies: {
23255
23255
  "0": 8,
23256
23256
  "1": 5,
@@ -57015,7 +57015,7 @@ var init_dist32 = __esm({
57015
57015
  }
57016
57016
  });
57017
57017
 
57018
- // ../../services/api/dist/request-context.js
57018
+ // ../../services/relay/dist/request-context.js
57019
57019
  import { AsyncLocalStorage } from "async_hooks";
57020
57020
  function getRequestContext() {
57021
57021
  return requestContext.getStore();
@@ -57031,14 +57031,14 @@ function enrichRequestContext(fields) {
57031
57031
  }
57032
57032
  var requestContext;
57033
57033
  var init_request_context = __esm({
57034
- "../../services/api/dist/request-context.js"() {
57034
+ "../../services/relay/dist/request-context.js"() {
57035
57035
  "use strict";
57036
57036
  init_esm_shims();
57037
57037
  requestContext = new AsyncLocalStorage();
57038
57038
  }
57039
57039
  });
57040
57040
 
57041
- // ../../services/api/dist/logger.js
57041
+ // ../../services/relay/dist/logger.js
57042
57042
  function emit(entry) {
57043
57043
  if (LOG_LEVELS[entry.level] < LOG_LEVELS[minLevel])
57044
57044
  return;
@@ -57070,7 +57070,7 @@ function createLogger(context = {}) {
57070
57070
  }
57071
57071
  var LOG_LEVELS, minLevel;
57072
57072
  var init_logger = __esm({
57073
- "../../services/api/dist/logger.js"() {
57073
+ "../../services/relay/dist/logger.js"() {
57074
57074
  "use strict";
57075
57075
  init_esm_shims();
57076
57076
  init_request_context();
@@ -57079,10 +57079,10 @@ var init_logger = __esm({
57079
57079
  }
57080
57080
  });
57081
57081
 
57082
- // ../../services/api/dist/errors.js
57082
+ // ../../services/relay/dist/errors.js
57083
57083
  var RelayError, AuthenticationError, AuthorizationError, InsufficientFundsError, SettlementError, AllocationError, RateLimitError, FederationError, TaskError;
57084
57084
  var init_errors2 = __esm({
57085
- "../../services/api/dist/errors.js"() {
57085
+ "../../services/relay/dist/errors.js"() {
57086
57086
  "use strict";
57087
57087
  init_esm_shims();
57088
57088
  RelayError = class extends Error {
@@ -57148,10 +57148,10 @@ var init_errors2 = __esm({
57148
57148
  }
57149
57149
  });
57150
57150
 
57151
- // ../../services/api/dist/rate-limiter.js
57151
+ // ../../services/relay/dist/rate-limiter.js
57152
57152
  var FixedWindowLimiter;
57153
57153
  var init_rate_limiter = __esm({
57154
- "../../services/api/dist/rate-limiter.js"() {
57154
+ "../../services/relay/dist/rate-limiter.js"() {
57155
57155
  "use strict";
57156
57156
  init_esm_shims();
57157
57157
  FixedWindowLimiter = class {
@@ -57212,7 +57212,7 @@ var init_rate_limiter = __esm({
57212
57212
  }
57213
57213
  });
57214
57214
 
57215
- // ../../services/api/dist/anchoring.js
57215
+ // ../../services/relay/dist/anchoring.js
57216
57216
  function createAnchoringTables(db) {
57217
57217
  db.exec(`
57218
57218
  CREATE TABLE IF NOT EXISTS relay_anchor_batches (
@@ -57667,7 +57667,7 @@ async function getAgentSettlementProof(db, settlementId) {
57667
57667
  }
57668
57668
  var AGENT_SETTLEMENT_ANCHOR_SUITE, logger, DEFAULT_BATCH_MAX_SIZE, DEFAULT_BATCH_INTERVAL_MS, EvmContractSubmitter, ANCHOR_SELECTOR;
57669
57669
  var init_anchoring = __esm({
57670
- "../../services/api/dist/anchoring.js"() {
57670
+ "../../services/relay/dist/anchoring.js"() {
57671
57671
  "use strict";
57672
57672
  init_esm_shims();
57673
57673
  init_dist6();
@@ -57724,7 +57724,7 @@ var init_anchoring = __esm({
57724
57724
  }
57725
57725
  });
57726
57726
 
57727
- // ../../services/api/dist/credential-anchoring.js
57727
+ // ../../services/relay/dist/credential-anchoring.js
57728
57728
  function createCredentialAnchoringTables(db) {
57729
57729
  db.exec(`
57730
57730
  CREATE TABLE IF NOT EXISTS relay_credential_anchor_batches (
@@ -58007,7 +58007,7 @@ function getCredentialAnchorBatch(db, batchId) {
58007
58007
  }
58008
58008
  var logger2, DEFAULT_BATCH_MAX_SIZE2, DEFAULT_BATCH_INTERVAL_MS2;
58009
58009
  var init_credential_anchoring = __esm({
58010
- "../../services/api/dist/credential-anchoring.js"() {
58010
+ "../../services/relay/dist/credential-anchoring.js"() {
58011
58011
  "use strict";
58012
58012
  init_esm_shims();
58013
58013
  init_dist6();
@@ -58018,7 +58018,7 @@ var init_credential_anchoring = __esm({
58018
58018
  }
58019
58019
  });
58020
58020
 
58021
- // ../../services/api/dist/retry-policy.js
58021
+ // ../../services/relay/dist/retry-policy.js
58022
58022
  function nextRetryDelay(attempt, policy = DEFAULT_RETRY_POLICY, random = Math.random()) {
58023
58023
  const exponential = Math.min(policy.baseDelayMs * Math.pow(2, attempt), policy.maxDelayMs);
58024
58024
  const jitter = exponential * policy.jitterFraction * (random * 2 - 1);
@@ -58026,7 +58026,7 @@ function nextRetryDelay(attempt, policy = DEFAULT_RETRY_POLICY, random = Math.ra
58026
58026
  }
58027
58027
  var DEFAULT_RETRY_POLICY;
58028
58028
  var init_retry_policy = __esm({
58029
- "../../services/api/dist/retry-policy.js"() {
58029
+ "../../services/relay/dist/retry-policy.js"() {
58030
58030
  "use strict";
58031
58031
  init_esm_shims();
58032
58032
  DEFAULT_RETRY_POLICY = {
@@ -58963,7 +58963,7 @@ var init_dist33 = __esm({
58963
58963
  }
58964
58964
  });
58965
58965
 
58966
- // ../../services/api/dist/federation.js
58966
+ // ../../services/relay/dist/federation.js
58967
58967
  var federation_exports = {};
58968
58968
  __export(federation_exports, {
58969
58969
  PeerRateLimiter: () => FixedWindowLimiter,
@@ -59809,7 +59809,7 @@ function registerFederationRoutes(deps) {
59809
59809
  }
59810
59810
  var FEDERATION_SUITE, logger3, REVOCATION_TTL_MS, revocationAnchorSubmitter, PBKDF2_ITERATIONS, AUTH_TAG_BYTES, FEDERATION_QUERY_TTL_MS, HEARTBEAT_SUSPEND_THRESHOLD, HEARTBEAT_REMOVE_THRESHOLD, FEDERATION_TIMESTAMP_DRIFT_MS;
59811
59811
  var init_federation = __esm({
59812
- "../../services/api/dist/federation.js"() {
59812
+ "../../services/relay/dist/federation.js"() {
59813
59813
  "use strict";
59814
59814
  init_esm_shims();
59815
59815
  init_dist6();
@@ -59994,7 +59994,7 @@ var init_dist34 = __esm({
59994
59994
  }
59995
59995
  });
59996
59996
 
59997
- // ../../services/api/dist/account-store-sqlite.js
59997
+ // ../../services/relay/dist/account-store-sqlite.js
59998
59998
  function createAccountTables(db) {
59999
59999
  db.exec(`
60000
60000
  CREATE TABLE IF NOT EXISTS relay_accounts (
@@ -60077,7 +60077,7 @@ function sqliteAccountStoreFor(db) {
60077
60077
  }
60078
60078
  var SqliteAccountStore, stores;
60079
60079
  var init_account_store_sqlite = __esm({
60080
- "../../services/api/dist/account-store-sqlite.js"() {
60080
+ "../../services/relay/dist/account-store-sqlite.js"() {
60081
60081
  "use strict";
60082
60082
  init_esm_shims();
60083
60083
  init_dist34();
@@ -60257,7 +60257,7 @@ var init_account_store_sqlite = __esm({
60257
60257
  }
60258
60258
  });
60259
60259
 
60260
- // ../../services/api/dist/settlement-proofs.js
60260
+ // ../../services/relay/dist/settlement-proofs.js
60261
60261
  function createProofTable(db) {
60262
60262
  db.exec(`
60263
60263
  CREATE TABLE IF NOT EXISTS relay_settlement_proofs (
@@ -60280,13 +60280,13 @@ function storeSettlementProof(db, settlementId, proof, railName) {
60280
60280
  VALUES (?, ?, ?, ?, ?, ?, ?)`).run(settlementId, proof.reference, proof.railType, railName, proof.network ?? null, proof.confirmedAt, Date.now());
60281
60281
  }
60282
60282
  var init_settlement_proofs = __esm({
60283
- "../../services/api/dist/settlement-proofs.js"() {
60283
+ "../../services/relay/dist/settlement-proofs.js"() {
60284
60284
  "use strict";
60285
60285
  init_esm_shims();
60286
60286
  }
60287
60287
  });
60288
60288
 
60289
- // ../../services/api/dist/reconciliation.js
60289
+ // ../../services/relay/dist/reconciliation.js
60290
60290
  function reconcileLedger(db) {
60291
60291
  const errors = [];
60292
60292
  const txnSum = db.prepare("SELECT COALESCE(SUM(amount), 0) as net FROM relay_transactions").get();
@@ -60326,14 +60326,14 @@ function reconcileLedger(db) {
60326
60326
  return { consistent: errors.length === 0, errors };
60327
60327
  }
60328
60328
  var init_reconciliation = __esm({
60329
- "../../services/api/dist/reconciliation.js"() {
60329
+ "../../services/relay/dist/reconciliation.js"() {
60330
60330
  "use strict";
60331
60331
  init_esm_shims();
60332
60332
  init_dist34();
60333
60333
  }
60334
60334
  });
60335
60335
 
60336
- // ../../services/api/dist/stripe-credit.js
60336
+ // ../../services/relay/dist/stripe-credit.js
60337
60337
  function processStripeCheckout(db, sessionId, motebitId, amount, paymentIntent) {
60338
60338
  if (amount <= 0)
60339
60339
  return false;
@@ -60353,7 +60353,7 @@ function processStripeCheckout(db, sessionId, motebitId, amount, paymentIntent)
60353
60353
  }
60354
60354
  var logger11;
60355
60355
  var init_stripe_credit = __esm({
60356
- "../../services/api/dist/stripe-credit.js"() {
60356
+ "../../services/relay/dist/stripe-credit.js"() {
60357
60357
  "use strict";
60358
60358
  init_esm_shims();
60359
60359
  init_dist34();
@@ -60363,7 +60363,7 @@ var init_stripe_credit = __esm({
60363
60363
  }
60364
60364
  });
60365
60365
 
60366
- // ../../services/api/dist/accounts.js
60366
+ // ../../services/relay/dist/accounts.js
60367
60367
  function getOrCreateAccount(db, motebitId) {
60368
60368
  return sqliteAccountStoreFor(db).getOrCreateAccount(motebitId);
60369
60369
  }
@@ -60442,7 +60442,7 @@ function getPendingWithdrawals(db) {
60442
60442
  }
60443
60443
  var logger12;
60444
60444
  var init_accounts = __esm({
60445
- "../../services/api/dist/accounts.js"() {
60445
+ "../../services/relay/dist/accounts.js"() {
60446
60446
  "use strict";
60447
60447
  init_esm_shims();
60448
60448
  init_dist34();
@@ -60457,14 +60457,14 @@ var init_accounts = __esm({
60457
60457
  }
60458
60458
  });
60459
60459
 
60460
- // ../../services/api/dist/webhooks/stripe-webhook-adapter.js
60460
+ // ../../services/relay/dist/webhooks/stripe-webhook-adapter.js
60461
60461
  var stripe_webhook_adapter_exports = {};
60462
60462
  __export(stripe_webhook_adapter_exports, {
60463
60463
  StripeSubscriptionEventAdapter: () => StripeSubscriptionEventAdapter
60464
60464
  });
60465
60465
  var logger13, StripeSubscriptionEventAdapter;
60466
60466
  var init_stripe_webhook_adapter = __esm({
60467
- "../../services/api/dist/webhooks/stripe-webhook-adapter.js"() {
60467
+ "../../services/relay/dist/webhooks/stripe-webhook-adapter.js"() {
60468
60468
  "use strict";
60469
60469
  init_esm_shims();
60470
60470
  init_logger();
@@ -60549,7 +60549,7 @@ var init_stripe_webhook_adapter = __esm({
60549
60549
  }
60550
60550
  });
60551
60551
 
60552
- // ../../services/api/dist/discovery.js
60552
+ // ../../services/relay/dist/discovery.js
60553
60553
  var discovery_exports = {};
60554
60554
  __export(discovery_exports, {
60555
60555
  registerDiscoveryRoutes: () => registerDiscoveryRoutes
@@ -60702,7 +60702,7 @@ async function resolveAgent(db, relayIdentity, federationConfig, motebitId, hops
60702
60702
  }
60703
60703
  var logger25, DEFAULT_MAX_HOPS, POSITIVE_CACHE_TTL, NEGATIVE_CACHE_TTL, METADATA_CACHE_MAX_AGE, resolutionCache;
60704
60704
  var init_discovery2 = __esm({
60705
- "../../services/api/dist/discovery.js"() {
60705
+ "../../services/relay/dist/discovery.js"() {
60706
60706
  "use strict";
60707
60707
  init_esm_shims();
60708
60708
  init_dist6();
@@ -60716,7 +60716,7 @@ var init_discovery2 = __esm({
60716
60716
  }
60717
60717
  });
60718
60718
 
60719
- // ../../services/api/dist/migration.js
60719
+ // ../../services/relay/dist/migration.js
60720
60720
  var migration_exports = {};
60721
60721
  __export(migration_exports, {
60722
60722
  createMigrationTables: () => createMigrationTables,
@@ -61080,7 +61080,7 @@ function registerMigrationRoutes(deps) {
61080
61080
  }
61081
61081
  var logger26, DEFAULT_TOKEN_EXPIRY_MS;
61082
61082
  var init_migration2 = __esm({
61083
- "../../services/api/dist/migration.js"() {
61083
+ "../../services/relay/dist/migration.js"() {
61084
61084
  "use strict";
61085
61085
  init_esm_shims();
61086
61086
  init_dist6();
@@ -61094,7 +61094,7 @@ var init_migration2 = __esm({
61094
61094
  }
61095
61095
  });
61096
61096
 
61097
- // ../../services/api/dist/disputes.js
61097
+ // ../../services/relay/dist/disputes.js
61098
61098
  var disputes_exports = {};
61099
61099
  __export(disputes_exports, {
61100
61100
  createDisputeTables: () => createDisputeTables,
@@ -61490,7 +61490,7 @@ function executeFundAction(db, dispute, fundAction, splitRatio) {
61490
61490
  }
61491
61491
  var logger27, EVIDENCE_WINDOW_MS, APPEAL_WINDOW_MS, MAX_EVIDENCE_PER_PARTY, MAX_ACTIVE_DISPUTES_PER_AGENT, OPENED_EXPIRE_MS, FILING_FEE_RATE;
61492
61492
  var init_disputes = __esm({
61493
- "../../services/api/dist/disputes.js"() {
61493
+ "../../services/relay/dist/disputes.js"() {
61494
61494
  "use strict";
61495
61495
  init_esm_shims();
61496
61496
  init_dist6();
@@ -61507,7 +61507,7 @@ var init_disputes = __esm({
61507
61507
  }
61508
61508
  });
61509
61509
 
61510
- // ../../services/api/dist/transparency.js
61510
+ // ../../services/relay/dist/transparency.js
61511
61511
  var transparency_exports = {};
61512
61512
  __export(transparency_exports, {
61513
61513
  DECLARATION_CONTENT: () => DECLARATION_CONTENT,
@@ -61541,7 +61541,7 @@ function renderMarkdown() {
61541
61541
  const lines = [];
61542
61542
  lines.push("# Privacy and operator transparency");
61543
61543
  lines.push("");
61544
- lines.push("This document is the human-readable form of relay.motebit.com's transparency declaration. The signed, machine-verifiable JSON form is served at `/.well-known/motebit-transparency.json`. Both are derived from `services/api/src/transparency.ts` \u2014 the file is the single source of truth.");
61544
+ lines.push("This document is the human-readable form of relay.motebit.com's transparency declaration. The signed, machine-verifiable JSON form is served at `/.well-known/motebit-transparency.json`. Both are derived from `services/relay/src/transparency.ts` \u2014 the file is the single source of truth.");
61545
61545
  lines.push("");
61546
61546
  lines.push("Doctrine: [`docs/doctrine/operator-transparency.md`](../../docs/doctrine/operator-transparency.md).");
61547
61547
  lines.push("");
@@ -61656,7 +61656,7 @@ async function registerTransparencyRoutes(deps) {
61656
61656
  }
61657
61657
  var SPEC_DRAFT_ID, SIGNATURE_SUITE, DECLARATION_CONTENT;
61658
61658
  var init_transparency = __esm({
61659
- "../../services/api/dist/transparency.js"() {
61659
+ "../../services/relay/dist/transparency.js"() {
61660
61660
  "use strict";
61661
61661
  init_esm_shims();
61662
61662
  init_dist6();
@@ -61840,7 +61840,7 @@ var init_transparency = __esm({
61840
61840
  }
61841
61841
  });
61842
61842
 
61843
- // ../../services/api/dist/p2p-verifier.js
61843
+ // ../../services/relay/dist/p2p-verifier.js
61844
61844
  var p2p_verifier_exports = {};
61845
61845
  __export(p2p_verifier_exports, {
61846
61846
  getRecentP2pSettlements: () => getRecentP2pSettlements,
@@ -61990,7 +61990,7 @@ function getRecentP2pSettlements(db, limit = 50) {
61990
61990
  }
61991
61991
  var logger28, VERIFY_INTERVAL_MS, MAX_VERIFY_PER_CYCLE, READ_ONLY_SEED;
61992
61992
  var init_p2p_verifier = __esm({
61993
- "../../services/api/dist/p2p-verifier.js"() {
61993
+ "../../services/relay/dist/p2p-verifier.js"() {
61994
61994
  "use strict";
61995
61995
  init_esm_shims();
61996
61996
  init_dist19();
@@ -69312,7 +69312,7 @@ init_esm_shims();
69312
69312
  import * as fs13 from "fs";
69313
69313
  import { serve } from "@hono/node-server";
69314
69314
 
69315
- // ../../services/api/dist/index.js
69315
+ // ../../services/relay/dist/index.js
69316
69316
  init_esm_shims();
69317
69317
  init_dist8();
69318
69318
  init_dist9();
@@ -69321,7 +69321,7 @@ init_logger();
69321
69321
  import { createNodeWebSocket } from "@hono/node-ws";
69322
69322
  import { Hono } from "hono";
69323
69323
 
69324
- // ../../services/api/dist/env.js
69324
+ // ../../services/relay/dist/env.js
69325
69325
  init_esm_shims();
69326
69326
  function parseBoolEnv(name, defaultValue) {
69327
69327
  const raw = process.env[name];
@@ -69344,11 +69344,11 @@ function parseFloatEnv(name, defaultValue) {
69344
69344
  return Number.isFinite(parsed) ? parsed : defaultValue;
69345
69345
  }
69346
69346
 
69347
- // ../../services/api/dist/schema.js
69347
+ // ../../services/relay/dist/schema.js
69348
69348
  init_esm_shims();
69349
69349
  init_federation();
69350
69350
 
69351
- // ../../services/api/dist/migrations.js
69351
+ // ../../services/relay/dist/migrations.js
69352
69352
  init_esm_shims();
69353
69353
  init_logger();
69354
69354
  var logger4 = createLogger({ service: "migrations" });
@@ -69840,7 +69840,7 @@ var relayMigrations = [
69840
69840
  }
69841
69841
  ];
69842
69842
 
69843
- // ../../services/api/dist/schema.js
69843
+ // ../../services/relay/dist/schema.js
69844
69844
  function createRelaySchema(db) {
69845
69845
  runMigrations(db, relayMigrations);
69846
69846
  db.prepare("DELETE FROM relay_token_blacklist WHERE expires_at < ?").run(Date.now());
@@ -69856,7 +69856,7 @@ function createRelaySchema(db) {
69856
69856
  return { isTokenBlacklisted, isAgentRevoked };
69857
69857
  }
69858
69858
 
69859
- // ../../services/api/dist/freeze.js
69859
+ // ../../services/relay/dist/freeze.js
69860
69860
  init_esm_shims();
69861
69861
  init_logger();
69862
69862
  var logger5 = createLogger({ service: "freeze" });
@@ -69898,7 +69898,7 @@ function persistFreeze(db, cache, frozen, reason) {
69898
69898
  cache.reason = reason;
69899
69899
  }
69900
69900
 
69901
- // ../../services/api/dist/auth.js
69901
+ // ../../services/relay/dist/auth.js
69902
69902
  init_esm_shims();
69903
69903
  init_dist6();
69904
69904
  init_logger();
@@ -69987,7 +69987,7 @@ async function verifySignedTokenForDevice(token, motebitId, identityManager, exp
69987
69987
  return true;
69988
69988
  }
69989
69989
 
69990
- // ../../services/api/dist/middleware.js
69990
+ // ../../services/relay/dist/middleware.js
69991
69991
  init_esm_shims();
69992
69992
  init_rate_limiter();
69993
69993
  init_logger();
@@ -70216,7 +70216,7 @@ function registerMiddleware(deps) {
70216
70216
  // request's signature IS the auth (spec/device-self-registration-v1.md).
70217
70217
  // The handler verifies the signature against the public key carried
70218
70218
  // in the request body itself.
70219
- c3.req.path === "/api/v1/devices/register-self" || c3.req.path.startsWith("/api/v1/credentials/verify") || c3.req.path.startsWith("/api/v1/credentials/batch-status") || c3.req.path.match(/\/api\/v1\/credentials\/[^/]+\/status/) || // Anchor proof endpoints are public protocol artifacts (services/api
70219
+ c3.req.path === "/api/v1/devices/register-self" || c3.req.path.startsWith("/api/v1/credentials/verify") || c3.req.path.startsWith("/api/v1/credentials/batch-status") || c3.req.path.match(/\/api\/v1\/credentials\/[^/]+\/status/) || // Anchor proof endpoints are public protocol artifacts (services/relay
70220
70220
  // CLAUDE.md rule 6 — every truth the relay asserts is independently
70221
70221
  // verifiable onchain without relay contact). An external auditor
70222
70222
  // will not hold a relay-issued bearer token.
@@ -70362,11 +70362,11 @@ function registerAuthMiddleware(deps) {
70362
70362
  app.use("/api/v1/admin/pending-withdrawals", bearerAuth({ token: apiToken }));
70363
70363
  }
70364
70364
 
70365
- // ../../services/api/dist/websocket.js
70365
+ // ../../services/relay/dist/websocket.js
70366
70366
  init_esm_shims();
70367
70367
  init_dist2();
70368
70368
 
70369
- // ../../services/api/dist/data-sync.js
70369
+ // ../../services/relay/dist/data-sync.js
70370
70370
  init_esm_shims();
70371
70371
  init_dist2();
70372
70372
  import { HTTPException as HTTPException3 } from "hono/http-exception";
@@ -70634,7 +70634,7 @@ function registerDataSyncRoutes(deps) {
70634
70634
  });
70635
70635
  }
70636
70636
 
70637
- // ../../services/api/dist/websocket.js
70637
+ // ../../services/relay/dist/websocket.js
70638
70638
  function registerWebSocketRoutes(deps) {
70639
70639
  const { app, upgradeWebSocket, connections, taskQueue, eventStore, identityManager, db, apiToken, enableDeviceAuth, wsLimiter, isTokenBlacklisted, isAgentRevoked, verifySignedTokenForDevice: verifySignedTokenForDevice2, logger: logger29 } = deps;
70640
70640
  app.get("/ws/sync/:motebitId", upgradeWebSocket((c3) => {
@@ -70899,7 +70899,7 @@ function registerWebSocketRoutes(deps) {
70899
70899
  }));
70900
70900
  }
70901
70901
 
70902
- // ../../services/api/dist/sync-routes.js
70902
+ // ../../services/relay/dist/sync-routes.js
70903
70903
  init_esm_shims();
70904
70904
  init_dist2();
70905
70905
  init_dist6();
@@ -71159,7 +71159,7 @@ function registerSyncRoutes(deps) {
71159
71159
  });
71160
71160
  }
71161
71161
 
71162
- // ../../services/api/dist/idempotency.js
71162
+ // ../../services/relay/dist/idempotency.js
71163
71163
  init_esm_shims();
71164
71164
  init_logger();
71165
71165
  var logger9 = createLogger({ service: "idempotency" });
@@ -71209,12 +71209,12 @@ function cleanupIdempotencyKeys(db) {
71209
71209
  return info.changes;
71210
71210
  }
71211
71211
 
71212
- // ../../services/api/dist/index.js
71212
+ // ../../services/relay/dist/index.js
71213
71213
  init_federation();
71214
71214
  init_anchoring();
71215
71215
  init_credential_anchoring();
71216
71216
 
71217
- // ../../services/api/dist/deposit-detector.js
71217
+ // ../../services/relay/dist/deposit-detector.js
71218
71218
  init_esm_shims();
71219
71219
 
71220
71220
  // ../../packages/deposit-detector/dist/index.js
@@ -71400,7 +71400,7 @@ var HttpJsonRpcEvmAdapter = class {
71400
71400
  }
71401
71401
  };
71402
71402
 
71403
- // ../../services/api/dist/deposit-detector.js
71403
+ // ../../services/relay/dist/deposit-detector.js
71404
71404
  init_account_store_sqlite();
71405
71405
  init_logger();
71406
71406
  var logger10 = createLogger({ service: "deposit-detector" });
@@ -71535,7 +71535,7 @@ function startDepositDetector(config) {
71535
71535
  return setInterval(() => void tick(), intervalMs);
71536
71536
  }
71537
71537
 
71538
- // ../../services/api/dist/credentials.js
71538
+ // ../../services/relay/dist/credentials.js
71539
71539
  init_esm_shims();
71540
71540
  init_dist6();
71541
71541
  init_dist2();
@@ -72119,7 +72119,7 @@ init_esm_shims();
72119
72119
  // ../../packages/market/dist/index.js
72120
72120
  init_dist13();
72121
72121
 
72122
- // ../../services/api/dist/credentials.js
72122
+ // ../../services/relay/dist/credentials.js
72123
72123
  init_federation();
72124
72124
  function getRelayKeypair(relayIdentity) {
72125
72125
  return {
@@ -72370,7 +72370,7 @@ function registerCredentialRoutes(deps) {
72370
72370
  });
72371
72371
  }
72372
72372
 
72373
- // ../../services/api/dist/subscriptions.js
72373
+ // ../../services/relay/dist/subscriptions.js
72374
72374
  init_esm_shims();
72375
72375
  init_dist6();
72376
72376
  init_logger();
@@ -72736,10 +72736,10 @@ function registerProxyTokenRoutes(app, db, relayIdentity, subscriptionEventAdapt
72736
72736
  });
72737
72737
  }
72738
72738
 
72739
- // ../../services/api/dist/index.js
72739
+ // ../../services/relay/dist/index.js
72740
72740
  init_stripe_webhook_adapter();
72741
72741
 
72742
- // ../../services/api/dist/a2a-bridge.js
72742
+ // ../../services/relay/dist/a2a-bridge.js
72743
72743
  init_esm_shims();
72744
72744
  init_dist6();
72745
72745
  function registerA2ARoutes(app, db, config) {
@@ -73008,7 +73008,7 @@ function registerA2ARoutes(app, db, config) {
73008
73008
  });
73009
73009
  }
73010
73010
 
73011
- // ../../services/api/dist/receipt-exchange.js
73011
+ // ../../services/relay/dist/receipt-exchange.js
73012
73012
  init_esm_shims();
73013
73013
  function registerReceiptExchangeRoutes(app, config = {}) {
73014
73014
  const exchangeTimeoutMs = config.exchangeTimeoutMs ?? 3e4;
@@ -73156,7 +73156,7 @@ function registerReceiptExchangeRoutes(app, config = {}) {
73156
73156
  };
73157
73157
  }
73158
73158
 
73159
- // ../../services/api/dist/receipts-store.js
73159
+ // ../../services/relay/dist/receipts-store.js
73160
73160
  init_esm_shims();
73161
73161
  init_dist6();
73162
73162
  init_logger();
@@ -73195,11 +73195,11 @@ function getStoredReceiptJson(db, motebitId, taskId) {
73195
73195
  return row?.receipt_json ?? null;
73196
73196
  }
73197
73197
 
73198
- // ../../services/api/dist/onramp.js
73198
+ // ../../services/relay/dist/onramp.js
73199
73199
  init_esm_shims();
73200
73200
  import { HTTPException as HTTPException6 } from "hono/http-exception";
73201
73201
 
73202
- // ../../services/api/dist/onramp/stripe-crypto-adapter.js
73202
+ // ../../services/relay/dist/onramp/stripe-crypto-adapter.js
73203
73203
  init_esm_shims();
73204
73204
  var StripeCryptoOnrampAdapter = class {
73205
73205
  provider = "stripe-crypto-onramp";
@@ -73225,7 +73225,7 @@ var StripeCryptoOnrampAdapter = class {
73225
73225
  }
73226
73226
  };
73227
73227
 
73228
- // ../../services/api/dist/onramp/stripe-crypto-client.js
73228
+ // ../../services/relay/dist/onramp/stripe-crypto-client.js
73229
73229
  init_esm_shims();
73230
73230
  var HttpStripeCryptoClient = class {
73231
73231
  secretKey;
@@ -73280,7 +73280,7 @@ var HttpStripeCryptoClient = class {
73280
73280
  }
73281
73281
  };
73282
73282
 
73283
- // ../../services/api/dist/onramp.js
73283
+ // ../../services/relay/dist/onramp.js
73284
73284
  var MIN_GAS_LAMPORTS = 5e6;
73285
73285
  var DEFAULT_RPC = "https://api.mainnet-beta.solana.com";
73286
73286
  async function hasGas(address, rpcUrl = DEFAULT_RPC) {
@@ -73352,7 +73352,7 @@ function registerOnrampRoutes(app, adapter, solanaRpcUrl) {
73352
73352
  });
73353
73353
  }
73354
73354
 
73355
- // ../../services/api/dist/offramp.js
73355
+ // ../../services/relay/dist/offramp.js
73356
73356
  init_esm_shims();
73357
73357
  import { HTTPException as HTTPException7 } from "hono/http-exception";
73358
73358
  var BridgeOfframpAdapter = class {
@@ -73470,7 +73470,7 @@ function registerOfframpRoutes(app, adapter) {
73470
73470
  });
73471
73471
  }
73472
73472
 
73473
- // ../../services/api/dist/task-routing.js
73473
+ // ../../services/relay/dist/task-routing.js
73474
73474
  init_esm_shims();
73475
73475
  init_dist2();
73476
73476
  init_dist6();
@@ -73627,7 +73627,7 @@ var CircuitBreaker = class {
73627
73627
  }
73628
73628
  };
73629
73629
 
73630
- // ../../services/api/dist/task-routing.js
73630
+ // ../../services/relay/dist/task-routing.js
73631
73631
  init_logger();
73632
73632
  var logger16 = createLogger({ service: "relay", module: "task-routing" });
73633
73633
  var circuitBreakerLogger = createLogger({ service: "relay", module: "circuit-breaker" });
@@ -74231,10 +74231,10 @@ function evaluateSettlementEligibility(db, delegatorId, workerId) {
74231
74231
  };
74232
74232
  }
74233
74233
 
74234
- // ../../services/api/dist/index.js
74234
+ // ../../services/relay/dist/index.js
74235
74235
  init_accounts();
74236
74236
 
74237
- // ../../services/api/dist/pairing.js
74237
+ // ../../services/relay/dist/pairing.js
74238
74238
  init_esm_shims();
74239
74239
  import { HTTPException as HTTPException8 } from "hono/http-exception";
74240
74240
  var PAIRING_ALPHABET = "ABCDEFGHJKMNPQRSTUVWXYZ23456789";
@@ -74474,7 +74474,7 @@ function registerPairingRoutes(deps) {
74474
74474
  });
74475
74475
  }
74476
74476
 
74477
- // ../../services/api/dist/state-export.js
74477
+ // ../../services/relay/dist/state-export.js
74478
74478
  init_esm_shims();
74479
74479
  init_dist2();
74480
74480
  init_dist6();
@@ -74782,7 +74782,7 @@ function registerStateExportRoutes(deps) {
74782
74782
  });
74783
74783
  }
74784
74784
 
74785
- // ../../services/api/dist/trust-graph.js
74785
+ // ../../services/relay/dist/trust-graph.js
74786
74786
  init_esm_shims();
74787
74787
  init_dist2();
74788
74788
  import { HTTPException as HTTPException10 } from "hono/http-exception";
@@ -74840,7 +74840,7 @@ function registerTrustGraphRoutes(deps) {
74840
74840
  });
74841
74841
  }
74842
74842
 
74843
- // ../../services/api/dist/listings.js
74843
+ // ../../services/relay/dist/listings.js
74844
74844
  init_esm_shims();
74845
74845
  init_dist2();
74846
74846
  import { HTTPException as HTTPException11 } from "hono/http-exception";
@@ -74950,7 +74950,7 @@ function registerListingsRoutes(deps) {
74950
74950
  });
74951
74951
  }
74952
74952
 
74953
- // ../../services/api/dist/proposals.js
74953
+ // ../../services/relay/dist/proposals.js
74954
74954
  init_esm_shims();
74955
74955
  import { HTTPException as HTTPException12 } from "hono/http-exception";
74956
74956
  function registerProposalRoutes(deps) {
@@ -75162,7 +75162,7 @@ function registerProposalRoutes(deps) {
75162
75162
  });
75163
75163
  }
75164
75164
 
75165
- // ../../services/api/dist/key-rotation.js
75165
+ // ../../services/relay/dist/key-rotation.js
75166
75166
  init_esm_shims();
75167
75167
  init_dist6();
75168
75168
  init_federation();
@@ -75423,7 +75423,7 @@ function registerKeyRotationRoutes(deps) {
75423
75423
  });
75424
75424
  }
75425
75425
 
75426
- // ../../services/api/dist/budget.js
75426
+ // ../../services/relay/dist/budget.js
75427
75427
  init_esm_shims();
75428
75428
  init_dist6();
75429
75429
  init_logger();
@@ -76062,11 +76062,11 @@ function registerBudgetRoutes(deps) {
76062
76062
  });
76063
76063
  }
76064
76064
 
76065
- // ../../services/api/dist/sweep.js
76065
+ // ../../services/relay/dist/sweep.js
76066
76066
  init_esm_shims();
76067
76067
  init_accounts();
76068
76068
 
76069
- // ../../services/api/dist/batch-withdrawals.js
76069
+ // ../../services/relay/dist/batch-withdrawals.js
76070
76070
  init_esm_shims();
76071
76071
  init_dist2();
76072
76072
  init_accounts();
@@ -76316,7 +76316,7 @@ function startBatchWithdrawalLoop(db, rails, config = {}, isFrozen) {
76316
76316
  }, intervalMs);
76317
76317
  }
76318
76318
 
76319
- // ../../services/api/dist/sweep.js
76319
+ // ../../services/relay/dist/sweep.js
76320
76320
  init_logger();
76321
76321
  var logger20 = createLogger({ service: "relay", module: "sweep" });
76322
76322
  var MIN_SWEEP_AMOUNT = 1e6;
@@ -76409,7 +76409,7 @@ function startSweepLoop(db, config = {}, isFrozen) {
76409
76409
  }, intervalMs);
76410
76410
  }
76411
76411
 
76412
- // ../../services/api/dist/agents.js
76412
+ // ../../services/relay/dist/agents.js
76413
76413
  init_esm_shims();
76414
76414
  init_dist2();
76415
76415
  init_federation();
@@ -77091,7 +77091,7 @@ function registerAgentRoutes(deps) {
77091
77091
  });
77092
77092
  }
77093
77093
 
77094
- // ../../services/api/dist/federation-callbacks.js
77094
+ // ../../services/relay/dist/federation-callbacks.js
77095
77095
  init_esm_shims();
77096
77096
  init_dist2();
77097
77097
  import { HTTPException as HTTPException16 } from "hono/http-exception";
@@ -77289,14 +77289,14 @@ function createFederationCallbacks(deps) {
77289
77289
  };
77290
77290
  }
77291
77291
 
77292
- // ../../services/api/dist/tasks.js
77292
+ // ../../services/relay/dist/tasks.js
77293
77293
  init_esm_shims();
77294
77294
  init_dist2();
77295
77295
  import { HTTPException as HTTPException17 } from "hono/http-exception";
77296
77296
  init_dist6();
77297
77297
  init_accounts();
77298
77298
 
77299
- // ../../services/api/dist/push-adapter.js
77299
+ // ../../services/relay/dist/push-adapter.js
77300
77300
  init_esm_shims();
77301
77301
  init_logger();
77302
77302
  var logger23 = createLogger({ service: "push-adapter" });
@@ -77332,7 +77332,7 @@ async function attemptPushWake(motebitId, deps) {
77332
77332
  return results.some((r2) => r2.status === "fulfilled" && r2.value.delivered);
77333
77333
  }
77334
77334
 
77335
- // ../../services/api/dist/tasks.js
77335
+ // ../../services/relay/dist/tasks.js
77336
77336
  init_logger();
77337
77337
  init_dist33();
77338
77338
  init_errors2();
@@ -78555,7 +78555,7 @@ async function registerTaskRoutes(deps) {
78555
78555
  });
78556
78556
  }
78557
78557
 
78558
- // ../../services/api/dist/task-queue.js
78558
+ // ../../services/relay/dist/task-queue.js
78559
78559
  init_esm_shims();
78560
78560
  init_dist2();
78561
78561
  var TaskQueue = class {
@@ -78782,7 +78782,7 @@ var TaskQueue = class {
78782
78782
  }
78783
78783
  };
78784
78784
 
78785
- // ../../services/api/dist/command-route.js
78785
+ // ../../services/relay/dist/command-route.js
78786
78786
  init_esm_shims();
78787
78787
  import { HTTPException as HTTPException18 } from "hono/http-exception";
78788
78788
  var RELAY_SIDE_COMMANDS = /* @__PURE__ */ new Set(["balance", "deposits", "discover", "proposals"]);
@@ -78945,7 +78945,7 @@ function executeRelaySideCommand(db, motebitId, command2) {
78945
78945
  }
78946
78946
  }
78947
78947
 
78948
- // ../../services/api/dist/index.js
78948
+ // ../../services/relay/dist/index.js
78949
78949
  import Stripe2 from "stripe";
78950
78950
 
78951
78951
  // ../../packages/settlement-rails/dist/index.js
@@ -79360,7 +79360,7 @@ var SettlementRailRegistry = class {
79360
79360
  }
79361
79361
  };
79362
79362
 
79363
- // ../../services/api/dist/index.js
79363
+ // ../../services/relay/dist/index.js
79364
79364
  async function createSyncRelay(config) {
79365
79365
  const {
79366
79366
  dbPath = ":memory:",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motebit",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "Reference runtime and operator console for sovereign AI agents — REPL, daemon, delegation, MCP server. Persistent Ed25519 identity, signed execution receipts, governance at the boundary.",
6
6
  "main": "./dist/index.js",
@@ -73,32 +73,32 @@
73
73
  "tsx": "^4.19.0",
74
74
  "typescript": "^5.6.0",
75
75
  "vitest": "^2.1.0",
76
- "@motebit/ai-core": "0.0.0-private",
77
76
  "@motebit/behavior-engine": "0.0.0-private",
78
- "@motebit/api": "0.0.0-private",
79
- "@motebit/crypto": "1.1.0",
77
+ "@motebit/ai-core": "0.0.0-private",
80
78
  "@motebit/core-identity": "0.0.0-private",
79
+ "@motebit/crypto": "1.1.0",
81
80
  "@motebit/encryption": "0.0.0-private",
82
81
  "@motebit/event-log": "0.0.0-private",
82
+ "@motebit/mcp-client": "0.0.0-private",
83
+ "@motebit/identity-file": "0.0.0-private",
83
84
  "@motebit/gradient": "0.0.0-private",
84
85
  "@motebit/mcp-server": "0.0.0-private",
85
86
  "@motebit/memory-graph": "0.0.0-private",
86
- "@motebit/persistence": "0.0.0-private",
87
- "@motebit/mcp-client": "0.0.0-private",
88
- "@motebit/planner": "0.0.0-private",
89
87
  "@motebit/policy": "0.0.0-private",
88
+ "@motebit/persistence": "0.0.0-private",
90
89
  "@motebit/privacy-layer": "0.0.0-private",
90
+ "@motebit/relay": "0.0.0-private",
91
+ "@motebit/planner": "0.0.0-private",
91
92
  "@motebit/runtime": "0.0.0-private",
92
93
  "@motebit/sdk": "1.0.1",
93
- "@motebit/identity-file": "0.0.0-private",
94
- "@motebit/state-vector": "0.0.0-private",
95
94
  "@motebit/self-knowledge": "0.0.0-private",
95
+ "@motebit/state-vector": "0.0.0-private",
96
96
  "@motebit/sync-engine": "0.0.0-private",
97
- "@motebit/tools": "0.0.0-private",
98
97
  "@motebit/verify": "1.1.0",
99
98
  "@motebit/voice": "0.0.0-private",
100
- "@motebit/wallet-solana": "0.0.0-private",
101
- "@motebit/wire-schemas": "0.0.0-private"
99
+ "@motebit/tools": "0.0.0-private",
100
+ "@motebit/wire-schemas": "0.0.0-private",
101
+ "@motebit/wallet-solana": "0.0.0-private"
102
102
  },
103
103
  "scripts": {
104
104
  "start": "tsx src/index.ts",