rovloom 0.5.0 → 0.6.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 (64) hide show
  1. package/README.md +9 -1
  2. package/dist/src/admin/index.js +1 -1
  3. package/dist/src/{chunk-emcefrc1.js → chunk-0e9gg4sg.js} +3 -4
  4. package/dist/src/chunk-1xer1ent.js +102 -0
  5. package/dist/src/{chunk-863tk45b.js → chunk-41fny9qm.js} +5 -5
  6. package/dist/src/{chunk-zjzrcc59.js → chunk-59h200cr.js} +139 -7
  7. package/dist/src/chunk-5w5srj3b.js +93 -0
  8. package/dist/src/{chunk-d4ejrtjq.js → chunk-6n6b1xpy.js} +1 -1
  9. package/dist/src/{chunk-ympzv86c.js → chunk-6w4g9fw8.js} +16 -4
  10. package/dist/src/{chunk-smpevv7n.js → chunk-73aq2qkz.js} +9 -16
  11. package/dist/src/{chunk-0ake7e4r.js → chunk-8c9yc0ge.js} +9 -17
  12. package/dist/src/{chunk-57ayxqnb.js → chunk-8fy8w7ds.js} +2 -23
  13. package/dist/src/{chunk-64ftwe9b.js → chunk-8ykrqhxh.js} +8 -2
  14. package/dist/src/{chunk-2tn0r64b.js → chunk-9h9x79bx.js} +5 -5
  15. package/dist/src/{chunk-nyn75b8v.js → chunk-av31bx1e.js} +31 -2
  16. package/dist/src/{chunk-0xgpxdgc.js → chunk-bbdtsg4b.js} +7 -5
  17. package/dist/src/{chunk-q5pgbwb3.js → chunk-e7jgpxkf.js} +2 -2
  18. package/dist/src/{chunk-zj48jvfe.js → chunk-efty77sb.js} +3 -40
  19. package/dist/src/{chunk-abd4envz.js → chunk-enj7s8cv.js} +71 -78
  20. package/dist/src/{chunk-4etdq0cp.js → chunk-ftpy8xx3.js} +313 -28
  21. package/dist/src/{chunk-zdxww7ms.js → chunk-h3xyq7zk.js} +1 -1
  22. package/dist/src/{chunk-ttsrctxg.js → chunk-hxmq28pg.js} +9 -7
  23. package/dist/src/{chunk-r0nfthsf.js → chunk-j59ac0xs.js} +2 -2
  24. package/dist/src/{chunk-5s2emvww.js → chunk-j6svdqr8.js} +10 -302
  25. package/dist/src/{chunk-9y36gntb.js → chunk-jkzfck98.js} +10 -5
  26. package/dist/src/{chunk-sj24fpz3.js → chunk-m76cmkfy.js} +28 -30
  27. package/dist/src/{chunk-5n8csngz.js → chunk-m96mbzcw.js} +816 -305
  28. package/dist/src/{chunk-xhq21g24.js → chunk-m9c1pnv9.js} +3 -3
  29. package/dist/src/{chunk-fnakrk0a.js → chunk-n3z3jaxy.js} +39 -36
  30. package/dist/src/{chunk-e7x51y0t.js → chunk-ndj0ay2p.js} +19 -18
  31. package/dist/src/chunk-pgs9jp6t.js +320 -0
  32. package/dist/src/chunk-pksaqt9a.js +25 -0
  33. package/dist/src/{chunk-ebm3kvnq.js → chunk-pnep7yhj.js} +31 -100
  34. package/dist/src/chunk-qn5xae7g.js +66 -0
  35. package/dist/src/{chunk-0pewfj89.js → chunk-qp8tgms2.js} +1 -1
  36. package/dist/src/{chunk-7k9g0x5e.js → chunk-rmgw8h27.js} +10 -8
  37. package/dist/src/{chunk-gbsbwssz.js → chunk-sf4ztxba.js} +3 -3
  38. package/dist/src/{chunk-7q96e161.js → chunk-shez7hkc.js} +6 -12
  39. package/dist/src/chunk-sqz614bh.js +30 -0
  40. package/dist/src/{chunk-09f9q26d.js → chunk-vdwzb63d.js} +2 -2
  41. package/dist/src/chunk-xtvgm6kf.js +48 -0
  42. package/dist/src/chunk-y8zm75jt.js +157 -0
  43. package/dist/src/chunk-yasqw2vj.js +756 -0
  44. package/dist/src/{chunk-ybte82d3.js → chunk-z0qmfqvd.js} +4 -3
  45. package/dist/src/chunk-zm705snh.js +53 -0
  46. package/dist/src/cli/index.js +39 -30
  47. package/dist/src/cli/main.js +14 -9
  48. package/dist/src/connector/herdr/installation.js +4 -4
  49. package/dist/src/connector/herdr/provider.js +9 -9
  50. package/dist/src/connector/herdr/runtime.js +7 -7
  51. package/dist/src/connector/luvus/index.js +7 -6
  52. package/dist/src/mcp/index.js +16 -14
  53. package/dist/src/runtime/index.js +16 -15
  54. package/dist/src/service/index.js +3 -4
  55. package/dist/src/store.js +4 -4
  56. package/dist/src/transport/index.js +9 -9
  57. package/dist/src/webui/index.js +975 -834
  58. package/package.json +1 -1
  59. package/dist/src/chunk-5j0gj6w2.js +0 -7
  60. package/dist/src/chunk-9yg6x3gt.js +0 -24
  61. package/dist/src/chunk-erdq0rn8.js +0 -1300
  62. package/dist/src/chunk-n073xnr1.js +0 -1117
  63. package/dist/src/chunk-rwpynx2j.js +0 -51
  64. package/dist/src/chunk-vwcntax3.js +0 -228
@@ -12,11 +12,13 @@ import {
12
12
  fields2,
13
13
  id2,
14
14
  uint2,
15
+ sha2,
15
16
  boundedJson2,
16
17
  parseJson2,
17
18
  hash2,
18
19
  validateTarget2,
19
20
  validateProvider2,
21
+ validateContractSource2,
20
22
  contractRef2,
21
23
  validatePolicies2,
22
24
  assertBinding2,
@@ -27,10 +29,10 @@ import {
27
29
  Router2
28
30
  } from "./chunk-y4hksha9.js";
29
31
  import {
30
- LuvusAdapterError2,
31
32
  pinTerminalExecution
32
- } from "./chunk-57ayxqnb.js";
33
+ } from "./chunk-8fy8w7ds.js";
33
34
  import {
35
+ compileBundle2,
34
36
  createNativeValidator2
35
37
  } from "./chunk-mqyq5jh6.js";
36
38
  import {
@@ -47,15 +49,17 @@ import {
47
49
  createConnector2,
48
50
  createDeviceLifecycle2,
49
51
  createDeviceLifecycleAdapter2
50
- } from "./chunk-zjzrcc59.js";
52
+ } from "./chunk-59h200cr.js";
51
53
  import {
52
- createLuvusRequestPreflight,
53
- luvusValidation
54
- } from "./chunk-zj48jvfe.js";
54
+ LUVUS_OPERATION_METHODS2,
55
+ luvusOperationDescriptor2,
56
+ luvusOperationValidation2,
57
+ validateLuvusOperationParams2
58
+ } from "./chunk-efty77sb.js";
55
59
  import {
56
60
  configuredSnapshotDirectory,
57
61
  Store2
58
- } from "./chunk-nyn75b8v.js";
62
+ } from "./chunk-av31bx1e.js";
59
63
  import {
60
64
  createProviderResultAccess2,
61
65
  LUVUS_ENDPOINT_TRANSPORT,
@@ -72,13 +76,13 @@ import {
72
76
  parseRpcFrame,
73
77
  LuvusRpcAdapter2,
74
78
  readLuvusPeer2
75
- } from "./chunk-0xgpxdgc.js";
79
+ } from "./chunk-bbdtsg4b.js";
76
80
  import {
77
81
  CONNECTOR_MAX_DEADLINE_MS2,
78
82
  ConnectorAttemptBook2,
79
83
  createConnectorAdmissionBackend2,
80
84
  connectorAdmissionAdapter
81
- } from "./chunk-d4ejrtjq.js";
85
+ } from "./chunk-6n6b1xpy.js";
82
86
  import {
83
87
  OwnedProcessShutdownError,
84
88
  observeLuvusProcess,
@@ -90,18 +94,22 @@ import {
90
94
  NativeInstanceContext,
91
95
  discoverLuvusInstallation,
92
96
  MANAGED_LUVUS_REVISION2,
97
+ MANAGED_LUVUS_CLASSIFICATION2,
93
98
  registerLocalOwnerLuvus,
94
99
  assertLocalOwnerLuvus,
95
100
  observedLuvusContract,
96
- startManagedLuvus2,
97
- assertLuvusOperationsContract,
98
- createLuvusOperationsAuthority,
99
- checkedRemoteLuvusConfig,
100
- createPinnedRemoteLuvus
101
- } from "./chunk-5s2emvww.js";
101
+ startManagedLuvus2
102
+ } from "./chunk-j6svdqr8.js";
103
+ import {
104
+ createLuvusRequestPreflight,
105
+ luvusValidation
106
+ } from "./chunk-xtvgm6kf.js";
102
107
  import {
103
108
  LuvusDispatchClaims2
104
- } from "./chunk-gbsbwssz.js";
109
+ } from "./chunk-sf4ztxba.js";
110
+ import {
111
+ LuvusAdapterError2
112
+ } from "./chunk-pksaqt9a.js";
105
113
  import {
106
114
  agentSearchPath
107
115
  } from "./chunk-3nnahj0j.js";
@@ -2030,10 +2038,7 @@ function createManagementSessionAuthority2(source, options = {}) {
2030
2038
  if (lease.revoked && !lease.expiry_only || at < lease.session.expires_at || input.issued_at !== lease.upstream.issued_at || input.expires_at !== lease.upstream.expires_at) {
2031
2039
  throw new GatewayError2("unauthenticated");
2032
2040
  }
2033
- const session = Object.freeze({
2034
- ...lease.upstream,
2035
- expires_at: Math.min(lease.upstream.expires_at, at + 300000)
2036
- });
2041
+ const session = lease.upstream;
2037
2042
  try {
2038
2043
  base(session, lease.policy);
2039
2044
  } catch {
@@ -2054,7 +2059,7 @@ function createManagementSessionAuthority2(source, options = {}) {
2054
2059
  caller,
2055
2060
  management_session_ref: sessionRef,
2056
2061
  issued_at: input.issued_at,
2057
- expires_at: Math.min(input.expires_at, at + 300000)
2062
+ expires_at: input.expires_at
2058
2063
  });
2059
2064
  const current = base(session);
2060
2065
  if (leases.has(name) || leases.size >= capacity) {
@@ -2129,6 +2134,53 @@ function createManagementSessionAuthority2(source, options = {}) {
2129
2134
  close
2130
2135
  });
2131
2136
  }
2137
+ // src/runtime/luvus-operations-authority.ts
2138
+ import { isDeepStrictEqual } from "util";
2139
+ function assertLuvusOperationsContract(contract) {
2140
+ const source = contract.wire.source;
2141
+ const capabilities = object2(object2(contract.capabilities).result);
2142
+ if (contract.wire.support_status !== "validated" || source.provider_kind !== "luvus" || source.protocol_family !== "uhp" || source.schema_origin !== "installed_cli" || source.schema_command !== "luvus uhp schema" || !/^1\.\d+$/u.test(source.native_protocol_version ?? "") || source.support_basis !== "live_catalog" || source.adapter_revision !== MANAGED_LUVUS_REVISION2 || source.classification_revision !== MANAGED_LUVUS_CLASSIFICATION2 || typeof source.runtime_generation !== "string" || !source.runtime_generation.length || source.runtime_generation !== capabilities.server_generation || contract.compiled.identity.binary_sha256 !== source.binary_sha256 || contract.compiled.identity.schema_sha256 !== source.schema_sha256 || contract.compiled.identity.revision !== source.adapter_revision || !Array.isArray(capabilities.method_contracts)) {
2143
+ throw new LuvusAdapterError2("luvus_operations_source_mismatch");
2144
+ }
2145
+ }
2146
+ function createLuvusOperationsAuthority(contract, current, rawAllowed) {
2147
+ assertLuvusOperationsContract(contract);
2148
+ const methods = object2(object2(contract.capabilities).result).method_contracts;
2149
+ return (attempt, native) => {
2150
+ const proven = current(attempt.binding);
2151
+ const descriptor = luvusOperationDescriptor2(attempt.method);
2152
+ if (proven.authenticated !== true || proven.source_verified !== true || !descriptor || attempt.native_request.method !== attempt.method || attempt.mode !== luvusOperationValidation2(attempt.method) || !isDeepStrictEqual(proven.binding, native)) {
2153
+ throw new LuvusAdapterError2("luvus_operation_unreviewed");
2154
+ }
2155
+ const live = methods.filter((row) => row.method === attempt.method);
2156
+ if (live.length !== 1 || !isDeepStrictEqual({
2157
+ method: live[0].method,
2158
+ access: live[0].access,
2159
+ scope: live[0].scope,
2160
+ idempotent: live[0].idempotent
2161
+ }, descriptor.native)) {
2162
+ throw new LuvusAdapterError2("luvus_operations_contract_mismatch");
2163
+ }
2164
+ validateLuvusOperationParams2(attempt.method, attempt.native_request.params);
2165
+ const raw = attempt.mode === "raw-contract";
2166
+ const allowed = raw && rawAllowed(attempt) === true;
2167
+ return {
2168
+ owner: allowed,
2169
+ raw_requested: raw,
2170
+ ...allowed ? {
2171
+ raw_grant: {
2172
+ id: attempt.binding.call_id,
2173
+ source_verified: true,
2174
+ principal_id: attempt.principal_id,
2175
+ binding: native,
2176
+ methods: [attempt.method],
2177
+ expires_at: attempt.binding.registration.deadline
2178
+ }
2179
+ } : {}
2180
+ };
2181
+ };
2182
+ }
2183
+
2132
2184
  // src/runtime/luvus-operations-provider.ts
2133
2185
  function createLuvusOperationsProvider2(owner, peerPolicyRevision) {
2134
2186
  assertLocalOwnerLuvus(owner);
@@ -2178,7 +2230,7 @@ function createLuvusOperationsProvider2(owner, peerPolicyRevision) {
2178
2230
  }
2179
2231
  // src/runtime/native-attach.ts
2180
2232
  import { randomUUID } from "crypto";
2181
- import { isDeepStrictEqual } from "util";
2233
+ import { isDeepStrictEqual as isDeepStrictEqual2 } from "util";
2182
2234
  class AttachedLuvus extends NativeInstanceContext {
2183
2235
  #observation;
2184
2236
  #closed = false;
@@ -2257,7 +2309,7 @@ async function attachExistingLuvus2(config, options = {}) {
2257
2309
  bytes,
2258
2310
  beforeWrite() {
2259
2311
  observation.assertLive();
2260
- if (!isDeepStrictEqual(readLuvusPeer2(socket, endpoint), observation.identity())) {
2312
+ if (!isDeepStrictEqual2(readLuvusPeer2(socket, endpoint), observation.identity())) {
2261
2313
  throw new LuvusAdapterError2("attached_peer_mismatch");
2262
2314
  }
2263
2315
  }
@@ -2282,7 +2334,7 @@ async function attachExistingLuvus2(config, options = {}) {
2282
2334
  }
2283
2335
  // src/runtime/production-luvus.ts
2284
2336
  import { join as join2 } from "path";
2285
- import { isDeepStrictEqual as isDeepStrictEqual2 } from "util";
2337
+ import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
2286
2338
 
2287
2339
  // src/runtime/luvus-user-source.ts
2288
2340
  import { spawn } from "child_process";
@@ -2461,6 +2513,239 @@ async function startUserLuvus(input) {
2461
2513
  });
2462
2514
  }
2463
2515
 
2516
+ // src/runtime/remote-luvus.ts
2517
+ function checkedRemoteLuvusConfig(reference, input) {
2518
+ const config = object2(JSON.parse(boundedJson2(input)));
2519
+ fields2(config, ["kind", "authentication", "binding", "target", "contract", "peer_policy_revision"], ["raw_grant"]);
2520
+ validateProvider2(config.binding);
2521
+ validateTarget2(config.target);
2522
+ id2(config.peer_policy_revision);
2523
+ const pin = object2(config.contract);
2524
+ fields2(pin, [
2525
+ "binary_version",
2526
+ "binary_sha256",
2527
+ "schema_sha256",
2528
+ "adapter_revision",
2529
+ "classification_revision",
2530
+ "schema_bundle"
2531
+ ]);
2532
+ sha2(pin.binary_sha256);
2533
+ sha2(pin.schema_sha256);
2534
+ if (config.kind !== "luvus" || config.authentication !== "remote_connector" || config.binding.kind !== "luvus" || config.target.profile !== "session" || config.binding.machine_id !== config.target.machine_id || config.binding.provider_id !== config.target.provider_id || config.binding.config_ref !== reference || typeof pin.binary_version !== "string" || !pin.binary_version.length || pin.binary_version.length > 128 || pin.adapter_revision !== MANAGED_LUVUS_REVISION2 || pin.classification_revision !== MANAGED_LUVUS_CLASSIFICATION2 || typeof pin.schema_bundle !== "string" || hash2(pin.schema_bundle) !== pin.schema_sha256) {
2535
+ throw new LuvusAdapterError2("remote_luvus_pin_invalid");
2536
+ }
2537
+ if (config.raw_grant !== undefined) {
2538
+ const grant = object2(config.raw_grant);
2539
+ fields2(grant, ["principal_id", "methods"]);
2540
+ id2(grant.principal_id);
2541
+ if (!Array.isArray(grant.methods) || grant.methods.length > LUVUS_OPERATION_METHODS2.length || new Set(grant.methods).size !== grant.methods.length || grant.methods.some((method) => !LUVUS_OPERATION_METHODS2.includes(method))) {
2542
+ throw new LuvusAdapterError2("remote_luvus_raw_grant_invalid");
2543
+ }
2544
+ Object.freeze(grant.methods);
2545
+ Object.freeze(grant);
2546
+ }
2547
+ Object.freeze(config.binding);
2548
+ Object.freeze(config.target);
2549
+ Object.freeze(pin);
2550
+ return Object.freeze(config);
2551
+ }
2552
+ async function createPinnedRemoteLuvus(config) {
2553
+ const pin = config.contract;
2554
+ const compiled = await compileBundle2(Buffer.from(pin.schema_bundle), {
2555
+ identity: { binary_sha256: pin.binary_sha256, schema_sha256: pin.schema_sha256, revision: pin.adapter_revision }
2556
+ });
2557
+ if (!compiled.ok) {
2558
+ throw new LuvusAdapterError2(compiled.error.code);
2559
+ }
2560
+ const contractHandle = compiled.value;
2561
+ const target = config.target;
2562
+ if (target.profile !== "session") {
2563
+ throw new LuvusAdapterError2("remote_luvus_pin_invalid");
2564
+ }
2565
+ const validator = createNativeValidator2(contractHandle);
2566
+ let closed = false;
2567
+ let active;
2568
+ function assertEpoch(epoch) {
2569
+ if (closed || epoch.closed || active !== epoch) {
2570
+ throw new LuvusAdapterError2("remote_luvus_epoch_unavailable");
2571
+ }
2572
+ const checked = epoch.assertCurrent();
2573
+ if (checked !== undefined) {
2574
+ Promise.resolve(checked).catch(() => {});
2575
+ throw new LuvusAdapterError2("synchronous_remote_source_required");
2576
+ }
2577
+ if (closed || epoch.closed || active !== epoch) {
2578
+ throw new LuvusAdapterError2("remote_luvus_epoch_unavailable");
2579
+ }
2580
+ }
2581
+ function closeEpoch(epoch) {
2582
+ epoch.closed = true;
2583
+ epoch.record = undefined;
2584
+ epoch.provider = undefined;
2585
+ if (active === epoch) {
2586
+ active = undefined;
2587
+ }
2588
+ }
2589
+ function nativeBinding(epoch, policies) {
2590
+ assertEpoch(epoch);
2591
+ const record = epoch.record;
2592
+ if (!record) {
2593
+ throw new LuvusAdapterError2("remote_luvus_snapshot_required");
2594
+ }
2595
+ id2(policies.caller_policy_revision);
2596
+ id2(policies.local_policy_revision);
2597
+ const target = config.target;
2598
+ if (target.profile !== "session") {
2599
+ throw new LuvusAdapterError2("remote_luvus_pin_invalid");
2600
+ }
2601
+ const binding = Object.freeze({
2602
+ kind: "luvus",
2603
+ provider_id: target.provider_id,
2604
+ binding_revision: config.binding.binding_revision,
2605
+ contract_source_ref: contractRef2(record.wire.source),
2606
+ target: Object.freeze({ machine_id: target.machine_id, profile: "session", session: target.session }),
2607
+ server_generation: record.wire.source.runtime_generation,
2608
+ connection_epoch: epoch.connection.connection_epoch,
2609
+ recovery_generation: epoch.connection.recovery_generation,
2610
+ capability_revision: record.capability_revision,
2611
+ caller_policy_revision: policies.caller_policy_revision,
2612
+ local_policy_revision: policies.local_policy_revision,
2613
+ classification_revision: pin.classification_revision,
2614
+ contract: contractHandle.identity
2615
+ });
2616
+ assertEpoch(epoch);
2617
+ return Object.freeze({ binding, authenticated: true, source_verified: true });
2618
+ }
2619
+ function ready() {
2620
+ try {
2621
+ if (!active?.record) {
2622
+ return false;
2623
+ }
2624
+ assertEpoch(active);
2625
+ return true;
2626
+ } catch {
2627
+ return false;
2628
+ }
2629
+ }
2630
+ const provider = Object.freeze({
2631
+ remote_luvus: true,
2632
+ binding: config.binding,
2633
+ target: config.target,
2634
+ peer_policy_revision: config.peer_policy_revision,
2635
+ preflightRequest: createLuvusRequestPreflight(contractHandle),
2636
+ ready,
2637
+ open(connection, assertCurrent) {
2638
+ if (closed || active || !connection.authenticated || !connection.active || connection.machine_id !== config.target.machine_id || !connection.negotiated.capabilities.includes("provider_snapshot")) {
2639
+ throw new LuvusAdapterError2("remote_luvus_epoch_unavailable");
2640
+ }
2641
+ const epoch = { connection: structuredClone(connection), assertCurrent, closed: false };
2642
+ active = epoch;
2643
+ try {
2644
+ assertEpoch(epoch);
2645
+ } catch (error) {
2646
+ closeEpoch(epoch);
2647
+ throw error;
2648
+ }
2649
+ return Object.freeze({
2650
+ accept(input) {
2651
+ assertEpoch(epoch);
2652
+ const copied = parseNativeJson2(boundedJson2(input));
2653
+ if (!copied.ok) {
2654
+ throw new LuvusAdapterError2(copied.error.code);
2655
+ }
2656
+ const snapshot = copied.value;
2657
+ fields2(object2(snapshot), ["binding", "target", "source", "capabilities", "capability_revision"]);
2658
+ validateProvider2(snapshot.binding);
2659
+ validateTarget2(snapshot.target);
2660
+ validateContractSource2(snapshot.source);
2661
+ sha2(snapshot.capability_revision);
2662
+ if (boundedJson2(snapshot.binding) !== boundedJson2(config.binding) || boundedJson2(snapshot.target) !== boundedJson2(config.target)) {
2663
+ throw new LuvusAdapterError2("remote_luvus_binding_mismatch");
2664
+ }
2665
+ const source = snapshot.source;
2666
+ if (source.binary_sha256 !== pin.binary_sha256 || source.schema_sha256 !== pin.schema_sha256 || source.adapter_revision !== pin.adapter_revision || source.classification_revision !== pin.classification_revision || typeof source.runtime_generation !== "string" || !source.runtime_generation.length) {
2667
+ throw new LuvusAdapterError2("remote_luvus_contract_mismatch");
2668
+ }
2669
+ const capabilities = object2(snapshot.capabilities);
2670
+ const value = object2(capabilities.result);
2671
+ if (hash2(boundedJson2(value)) !== snapshot.capability_revision) {
2672
+ throw new LuvusAdapterError2("remote_luvus_capability_mismatch");
2673
+ }
2674
+ const shape = validator.checkCapabilitiesShape(capabilities, {
2675
+ target: { machine_id: target.machine_id, profile: "session", session: target.session },
2676
+ server_generation: source.runtime_generation
2677
+ });
2678
+ if (!shape.ok) {
2679
+ throw new LuvusAdapterError2(shape.error.code);
2680
+ }
2681
+ const record = Object.freeze({
2682
+ wire: Object.freeze({ source: Object.freeze(source), support_status: "validated" }),
2683
+ compiled: contractHandle,
2684
+ capabilities,
2685
+ capability_revision: snapshot.capability_revision
2686
+ });
2687
+ assertLuvusOperationsContract(record);
2688
+ const fingerprint = hash2(boundedJson2(snapshot));
2689
+ if (epoch.fingerprint !== undefined) {
2690
+ if (epoch.fingerprint !== fingerprint) {
2691
+ throw new LuvusAdapterError2("remote_luvus_snapshot_changed");
2692
+ }
2693
+ assertEpoch(epoch);
2694
+ return epoch.provider;
2695
+ }
2696
+ function sourceFor(binding) {
2697
+ assertEpoch(epoch);
2698
+ assertBinding2(binding, binding);
2699
+ if (binding.machine_id !== epoch.connection.machine_id || binding.recovery_generation !== epoch.connection.recovery_generation || binding.connection_epoch !== epoch.connection.connection_epoch || binding.provider_kind !== "luvus" || binding.binding_revision !== config.binding.binding_revision || boundedJson2(binding.target) !== boundedJson2(config.target) || binding.contract_ref !== contractRef2(record.wire.source)) {
2700
+ throw new LuvusAdapterError2("remote_luvus_binding_mismatch");
2701
+ }
2702
+ return nativeBinding(epoch, binding.registration);
2703
+ }
2704
+ const live = Object.freeze({
2705
+ binding: config.binding,
2706
+ target: config.target,
2707
+ peer_policy_revision: config.peer_policy_revision,
2708
+ contract: record,
2709
+ source: sourceFor,
2710
+ catalogSource(current, policies) {
2711
+ if (boundedJson2(current) !== boundedJson2(epoch.connection)) {
2712
+ throw new LuvusAdapterError2("remote_luvus_epoch_unavailable");
2713
+ }
2714
+ return nativeBinding(epoch, policies);
2715
+ },
2716
+ authority: createLuvusOperationsAuthority(record, sourceFor, (attempt) => config.raw_grant?.principal_id === attempt.principal_id && config.raw_grant.methods.includes(attempt.method)),
2717
+ ready() {
2718
+ try {
2719
+ assertEpoch(epoch);
2720
+ return !!epoch.record;
2721
+ } catch {
2722
+ return false;
2723
+ }
2724
+ }
2725
+ });
2726
+ assertEpoch(epoch);
2727
+ epoch.record = record;
2728
+ epoch.fingerprint = fingerprint;
2729
+ epoch.provider = live;
2730
+ return live;
2731
+ },
2732
+ close() {
2733
+ closeEpoch(epoch);
2734
+ }
2735
+ });
2736
+ }
2737
+ });
2738
+ return Object.freeze({
2739
+ provider,
2740
+ close() {
2741
+ closed = true;
2742
+ if (active) {
2743
+ closeEpoch(active);
2744
+ }
2745
+ }
2746
+ });
2747
+ }
2748
+
2464
2749
  // src/runtime/production-luvus.ts
2465
2750
  function references(input, mode) {
2466
2751
  try {
@@ -2807,8 +3092,8 @@ function createLuvusProductionSources2() {
2807
3092
  routes,
2808
3093
  book,
2809
3094
  source: {
2810
- provider: (target) => isDeepStrictEqual2(target, fixed.target) ? provider.binding : undefined,
2811
- localProvider: (target) => isDeepStrictEqual2(target, fixed.target) ? provider.binding : undefined,
3095
+ provider: (target) => isDeepStrictEqual3(target, fixed.target) ? provider.binding : undefined,
3096
+ localProvider: (target) => isDeepStrictEqual3(target, fixed.target) ? provider.binding : undefined,
2812
3097
  contract: (ref) => ref === reference ? provider.contract : undefined,
2813
3098
  nativeSource: (call, attempt) => {
2814
3099
  const row = admitted.backend?.attempt(call, attempt);
@@ -2870,6 +3155,6 @@ function createLuvusProductionSources2() {
2870
3155
  }
2871
3156
  });
2872
3157
  }
2873
- export { createTrustedRequestScope2, composeGatewaySessions2, composeConnectorSessions2, createGatewayRuntime2, createProviderGatewayRuntime2, openGatewayState2, createLuvusConnectorSessions2, createConnectorRuntime2, ConnectorHostStartupError2, createProviderConnectorRuntime2, createManagementSessionAuthority2, createLuvusOperationsProvider2, attachExistingLuvus2, LuvusProductionStartupError2, createLuvusProductionSources2 };
3158
+ export { createTrustedRequestScope2, composeGatewaySessions2, composeConnectorSessions2, createGatewayRuntime2, createProviderGatewayRuntime2, openGatewayState2, createLuvusConnectorSessions2, createConnectorRuntime2, ConnectorHostStartupError2, createProviderConnectorRuntime2, createManagementSessionAuthority2, createLuvusOperationsProvider2, attachExistingLuvus2, checkedRemoteLuvusConfig, createPinnedRemoteLuvus, LuvusProductionStartupError2, createLuvusProductionSources2 };
2874
3159
 
2875
- //# debugId=785921E4C40CA8AB64756E2164756E21
3160
+ //# debugId=A165CD691DA8923B64756E2164756E21
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  currentProcessIdentity,
4
4
  ownerIsDead
5
- } from "./chunk-0pewfj89.js";
5
+ } from "./chunk-qp8tgms2.js";
6
6
  import {
7
7
  syncParentDirectory
8
8
  } from "./chunk-0y5542k8.js";
@@ -11,27 +11,29 @@ import {
11
11
  MessageWindow2
12
12
  } from "./chunk-g7pnjzkk.js";
13
13
  import {
14
- LuvusAdapterError2,
15
- ConnectorCapacityError,
16
14
  assertTerminalExecutionAllowed
17
- } from "./chunk-57ayxqnb.js";
15
+ } from "./chunk-8fy8w7ds.js";
18
16
  import {
19
17
  HerdrLocalError,
20
18
  readHerdrPeer
21
- } from "./chunk-q5pgbwb3.js";
19
+ } from "./chunk-e7jgpxkf.js";
22
20
  import {
23
21
  checkHerdrSignal,
24
22
  herdrDeadline,
25
23
  withHerdrSocket,
26
24
  exchangeHerdr,
27
25
  HerdrInstallation2
28
- } from "./chunk-863tk45b.js";
26
+ } from "./chunk-41fny9qm.js";
29
27
  import {
30
28
  createHerdrReadonlyAdapter2
31
29
  } from "./chunk-zb641qa3.js";
32
30
  import {
33
31
  LuvusDispatchClaims2
34
- } from "./chunk-gbsbwssz.js";
32
+ } from "./chunk-sf4ztxba.js";
33
+ import {
34
+ LuvusAdapterError2,
35
+ ConnectorCapacityError
36
+ } from "./chunk-pksaqt9a.js";
35
37
 
36
38
  // src/connector/herdr/wire.ts
37
39
  function identityOf(binding) {
@@ -273,4 +275,4 @@ function createHerdrRuntime2(installation, backend, claims, terminalExecution) {
273
275
 
274
276
  export { createHerdrWireAdapter, createHerdrRuntime2 };
275
277
 
276
- //# debugId=828EF1FDC5E8AF4B64756E2164756E21
278
+ //# debugId=0A9E0EF4232D9B8364756E2164756E21
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  // src/mcp/version.ts
3
3
  var MCP_REVISION2 = "2025-11-25";
4
- var PRODUCT_VERSION2 = "0.5.0";
4
+ var PRODUCT_VERSION2 = "0.6.1";
5
5
 
6
6
  export { MCP_REVISION2, PRODUCT_VERSION2 };
7
7
 
8
- //# debugId=1479A7639E360A6A64756E2164756E21
8
+ //# debugId=D4F5A83CF09C923064756E2164756E21