@floegence/floe-webapp-boot 0.49.0 → 0.50.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.
@@ -108,5 +108,9 @@ export type MaterializeIsolatedOneShotOptions = Readonly<{
108
108
  commitSpend: CommitSpend;
109
109
  }>;
110
110
  export declare function materializeIsolatedOneShot(options: MaterializeIsolatedOneShotOptions): Promise<IsolatedOneShotAcquisition>;
111
+ export type NativeIsolatedAcquisitionContext = Omit<IsolatedHandoffValidationContext, 'runtimeOrigin' | 'appOrigin'>;
112
+ export declare function materializeNativeIsolatedAcquisitionForSource(source: ArtifactSource, value: unknown, options: MaterializeOptions & Readonly<{
113
+ context: NativeIsolatedAcquisitionContext;
114
+ }>): Promise<ArtifactLease>;
111
115
  export declare function connectIsolatedOneShot(acquisition: IsolatedOneShotAcquisition, options?: SessionOptions): Promise<ConnectedAcquisition>;
112
116
  export {};
@@ -1,68 +1,68 @@
1
- import { createArtifactLease as I, parseArtifact as T } from "@floegence/flowersec-core";
2
- import { assertProxyRuntimeScope as F } from "@floegence/flowersec-core/proxy";
3
- const j = 32, C = 16384, P = "#redeven=";
4
- class r extends Error {
5
- constructor(t) {
6
- super(`Floe acquisition failed (code=${t})`), this.code = t, this.name = "AcquisitionError";
1
+ import { createArtifactLease as A, parseArtifact as T } from "@floegence/flowersec-core";
2
+ import { assertProxyRuntimeScope as U } from "@floegence/flowersec-core/proxy";
3
+ const O = 32, E = 16384, C = "#redeven=";
4
+ class o extends Error {
5
+ constructor(i) {
6
+ super(`Floe acquisition failed (code=${i})`), this.code = i, this.name = "AcquisitionError";
7
7
  }
8
8
  }
9
- class h {
9
+ class w {
10
10
  #e = void 0;
11
11
  constructor() {
12
12
  Object.freeze(this);
13
13
  }
14
14
  static create() {
15
- return new h();
15
+ return new w();
16
16
  }
17
- static assertAuthentic(t) {
18
- t.#e;
17
+ static assertAuthentic(i) {
18
+ i.#e;
19
19
  }
20
20
  }
21
- class m {
21
+ class v {
22
22
  #e = void 0;
23
23
  constructor() {
24
24
  Object.freeze(this);
25
25
  }
26
26
  static create() {
27
- return new m();
27
+ return new v();
28
28
  }
29
- static assertAuthentic(t) {
30
- t.#e;
29
+ static assertAuthentic(i) {
30
+ i.#e;
31
31
  }
32
32
  }
33
- const g = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new Set();
34
- function Y(e) {
35
- if (g.has(e)) throw new r("duplicate_acquisition_source");
33
+ const g = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new Set();
34
+ function K(e) {
35
+ if (g.has(e)) throw new o("duplicate_acquisition_source");
36
36
  g.set(e, { pending: [] });
37
37
  }
38
- async function K(e, t, i) {
38
+ async function Q(e, i, t) {
39
39
  const n = g.get(e);
40
- if (n === void 0) throw new r("invalid_acquisition_source");
41
- const o = await S(t, i, T);
42
- return O(
43
- o,
44
- I,
45
- i.commitSpend,
46
- (c) => {
47
- n.pending.push(c);
40
+ if (n === void 0) throw new o("invalid_acquisition_source");
41
+ const c = await B(i, t, T);
42
+ return b(
43
+ c,
44
+ A,
45
+ t.commitSpend,
46
+ (r) => {
47
+ n.pending.push(r);
48
48
  },
49
- (c) => {
50
- n.pending = n.pending.filter((a) => a !== c);
49
+ (r) => {
50
+ n.pending = n.pending.filter((a) => a !== r);
51
51
  }
52
52
  );
53
53
  }
54
- async function Q(e, t, i) {
54
+ async function ee(e, i, t) {
55
55
  const n = g.get(e);
56
- if (n === void 0) throw new r("invalid_acquisition_source");
57
- const o = await import("@floegence/flowersec-core/browser"), c = await S(
58
- t,
56
+ if (n === void 0) throw new o("invalid_acquisition_source");
57
+ const c = await import("@floegence/flowersec-core/browser"), r = await B(
59
58
  i,
60
- o.parsePrivateLoopbackArtifactV1
59
+ t,
60
+ c.parsePrivateLoopbackArtifactV1
61
61
  );
62
- return O(
63
- c,
64
- o.createPrivateLoopbackArtifactLeaseV1,
65
- i.commitSpend,
62
+ return b(
63
+ r,
64
+ c.createPrivateLoopbackArtifactLeaseV1,
65
+ t.commitSpend,
66
66
  (a) => {
67
67
  n.pending.push(a);
68
68
  },
@@ -71,41 +71,41 @@ async function Q(e, t, i) {
71
71
  }
72
72
  );
73
73
  }
74
- function ee(e, t) {
75
- const i = g.get(e);
76
- if (i === void 0) return null;
77
- if (t.state !== "connected" || t.currentSession === void 0)
78
- return (t.state === "idle" || t.state === "waiting" || t.state === "failed" || t.state === "closed") && (i.pending = [], i.connected = void 0, i.connectedSession = void 0), null;
79
- if (i.connected !== void 0 && i.connectedSession === t.currentSession)
80
- return i.connected;
81
- const n = i.pending.filter((a) => a.committed);
82
- if (n.length !== 1 || i.pending.length !== 1)
83
- throw i.pending = [], new r("connected_acquisition_mismatch");
84
- const o = n[0];
85
- if (o === void 0) throw new r("connected_acquisition_mismatch");
86
- const c = h.create();
87
- return A.set(
88
- c,
74
+ function te(e, i) {
75
+ const t = g.get(e);
76
+ if (t === void 0) return null;
77
+ if (i.state !== "connected" || i.currentSession === void 0)
78
+ return (i.state === "idle" || i.state === "waiting" || i.state === "failed" || i.state === "closed") && (t.pending = [], t.connected = void 0, t.connectedSession = void 0), null;
79
+ if (t.connected !== void 0 && t.connectedSession === i.currentSession)
80
+ return t.connected;
81
+ const n = t.pending.filter((a) => a.committed);
82
+ if (n.length !== 1 || t.pending.length !== 1)
83
+ throw t.pending = [], new o("connected_acquisition_mismatch");
84
+ const c = n[0];
85
+ if (c === void 0) throw new o("connected_acquisition_mismatch");
86
+ const r = w.create();
87
+ return q.set(
88
+ r,
89
89
  Object.freeze({
90
- session: t.currentSession,
91
- scope: o.scope,
92
- bindingIdentity: o.bindingIdentity,
93
- attempt: t.attempt
90
+ session: i.currentSession,
91
+ scope: c.scope,
92
+ bindingIdentity: c.bindingIdentity,
93
+ attempt: i.attempt
94
94
  })
95
- ), i.pending = [], i.connected = c, i.connectedSession = t.currentSession, c;
96
- }
97
- function te(e) {
98
- const t = g.get(e);
99
- t !== void 0 && (t.pending = [], t.connected = void 0, t.connectedSession = void 0);
95
+ ), t.pending = [], t.connected = r, t.connectedSession = i.currentSession, r;
100
96
  }
101
97
  function ie(e) {
102
- h.assertAuthentic(e);
103
- const t = A.get(e);
104
- if (t === void 0) throw new r("invalid_connected_acquisition");
105
- return t;
98
+ const i = g.get(e);
99
+ i !== void 0 && (i.pending = [], i.connected = void 0, i.connectedSession = void 0);
106
100
  }
107
- async function ne(e) {
108
- const t = e.rawHandoff, i = typeof t != "string" || W(`${P}${t}`) > C;
101
+ function ne(e) {
102
+ w.assertAuthentic(e);
103
+ const i = q.get(e);
104
+ if (i === void 0) throw new o("invalid_connected_acquisition");
105
+ return i;
106
+ }
107
+ async function oe(e) {
108
+ const i = e.rawHandoff, t = typeof i != "string" || P(`${C}${i}`) > E;
109
109
  let n = !1;
110
110
  try {
111
111
  n = e.clearSensitiveLocation() === !0;
@@ -113,146 +113,199 @@ async function ne(e) {
113
113
  n = !1;
114
114
  }
115
115
  if (!n)
116
- throw e.navigateToLauncher(), new r("isolated_location_clear_failed");
117
- if (i) throw new r("isolated_handoff_too_large");
118
- const o = y(t, "invalid_isolated_handoff"), c = await J(o);
119
- if (z.has(c))
120
- throw new r("isolated_handoff_consumed");
121
- z.add(c);
116
+ throw e.navigateToLauncher(), new o("isolated_location_clear_failed");
117
+ if (t) throw new o("isolated_handoff_too_large");
118
+ const c = m(i, "invalid_isolated_handoff"), r = await W(c);
119
+ if (I.has(r))
120
+ throw new o("isolated_handoff_consumed");
121
+ I.add(r);
122
122
  let a;
123
123
  try {
124
- a = JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(o));
124
+ a = JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(c));
125
125
  } catch {
126
- throw new r("invalid_isolated_handoff");
126
+ throw new o("invalid_isolated_handoff");
127
127
  }
128
- const d = V(a, e.validationContext), p = await S(
129
- d.acquisition,
128
+ const d = await F(
129
+ a,
130
+ e.validationContext,
131
+ e.commitSpend
132
+ );
133
+ let s;
134
+ const l = b(
135
+ d,
136
+ A,
137
+ e.commitSpend,
138
+ (u) => {
139
+ s = u;
140
+ },
141
+ () => {
142
+ }
143
+ );
144
+ if (s === void 0 || s.lease !== l)
145
+ throw new o("isolated_materialization_failed");
146
+ const p = v.create();
147
+ return L.set(p, { pending: s, state: "ready" }), p;
148
+ }
149
+ async function F(e, i, t) {
150
+ const n = H(e, i), c = await B(
151
+ n.acquisition,
130
152
  {
131
- commitSpend: e.commitSpend,
153
+ commitSpend: t,
132
154
  expectedConsumer: "isolated",
133
- validateSpendBinding: (s) => (N(d, s, e.validationContext), e.validationContext.validateTargetBinding(s.targetBinding), `${s.artifactDigestB64u}.${s.projectionDigestB64u}`)
155
+ validateSpendBinding: (r) => {
156
+ J(n, r, i);
157
+ try {
158
+ i.validateTargetBinding(r.targetBinding);
159
+ } catch {
160
+ throw new o("invalid_spend_binding");
161
+ }
162
+ return `${r.artifactDigestB64u}.${r.projectionDigestB64u}`;
163
+ }
134
164
  },
135
165
  T
136
166
  );
137
- if (p.scope.appBasePath !== d.app_path)
138
- throw new r("isolated_app_path_mismatch");
139
- if (p.scope.mode === "controller_bridge") {
140
- const s = p.scope.controllerBridge.allowedOrigins;
141
- if (s.length !== 1 || s[0] !== d.app_origin)
142
- throw new r("isolated_allowed_origins_mismatch");
167
+ if (c.scope.appBasePath !== n.app_path)
168
+ throw new o("isolated_app_path_mismatch");
169
+ if (c.scope.mode === "controller_bridge") {
170
+ const r = c.scope.controllerBridge.allowedOrigins;
171
+ if (r.length !== 1 || r[0] !== n.app_origin)
172
+ throw new o("isolated_allowed_origins_mismatch");
173
+ }
174
+ return c;
175
+ }
176
+ async function re(e, i, t) {
177
+ const n = g.get(e);
178
+ if (n === void 0) throw new o("invalid_acquisition_source");
179
+ const c = h(
180
+ i,
181
+ ["v", "runtime_origin", "runtime_handoff_b64u"],
182
+ "invalid_isolated_handoff"
183
+ ), r = c.runtime_handoff_b64u;
184
+ if (c.v !== 6 || typeof r != "string" || P(r) > E)
185
+ throw new o("invalid_isolated_handoff");
186
+ const a = m(r, "invalid_isolated_handoff");
187
+ let d;
188
+ try {
189
+ d = JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(a));
190
+ } catch {
191
+ throw new o("invalid_isolated_handoff");
143
192
  }
144
- let u;
145
- const l = O(
193
+ const s = d, l = {
194
+ ...t.context,
195
+ runtimeOrigin: f(c.runtime_origin),
196
+ appOrigin: f(s?.app_origin)
197
+ }, p = await F(
198
+ d,
199
+ l,
200
+ t.commitSpend
201
+ ), u = s?.acquisition;
202
+ if (!u) throw new o("invalid_isolated_handoff");
203
+ return t.validateSpendBinding(R(u.spend_scope)), b(
146
204
  p,
147
- I,
148
- e.commitSpend,
149
- (s) => {
150
- u = s;
151
- },
152
- () => {
205
+ A,
206
+ t.commitSpend,
207
+ (_) => n.pending.push(_),
208
+ (_) => {
209
+ n.pending = n.pending.filter((y) => y !== _);
153
210
  }
154
211
  );
155
- if (u === void 0 || u.lease !== l)
156
- throw new r("isolated_materialization_failed");
157
- const _ = m.create();
158
- return E.set(_, { pending: u, state: "ready" }), _;
159
- }
160
- async function re(e, t = {}) {
161
- m.assertAuthentic(e);
162
- const i = E.get(e);
163
- if (i === void 0 || i.state !== "ready")
164
- throw new r("isolated_acquisition_consumed");
165
- i.state = "connecting";
212
+ }
213
+ async function ce(e, i = {}) {
214
+ v.assertAuthentic(e);
215
+ const t = L.get(e);
216
+ if (t === void 0 || t.state !== "ready")
217
+ throw new o("isolated_acquisition_consumed");
218
+ t.state = "connecting";
166
219
  try {
167
- const { connect: n } = await import("@floegence/flowersec-core/browser"), o = await n(i.pending.lease, t);
168
- if (!i.pending.committed)
169
- throw await o.close().catch(() => {
170
- }), new r("isolated_spend_not_committed");
171
- const c = h.create();
172
- return A.set(
173
- c,
220
+ const { connect: n } = await import("@floegence/flowersec-core/browser"), c = await n(t.pending.lease, i);
221
+ if (!t.pending.committed)
222
+ throw await c.close().catch(() => {
223
+ }), new o("isolated_spend_not_committed");
224
+ const r = w.create();
225
+ return q.set(
226
+ r,
174
227
  Object.freeze({
175
- session: o,
176
- scope: i.pending.scope,
177
- bindingIdentity: i.pending.bindingIdentity,
228
+ session: c,
229
+ scope: t.pending.scope,
230
+ bindingIdentity: t.pending.bindingIdentity,
178
231
  attempt: 1
179
232
  })
180
- ), i.state = "consumed", c;
233
+ ), t.state = "consumed", r;
181
234
  } catch (n) {
182
- throw i.state = "consumed", n;
235
+ throw t.state = "consumed", n;
183
236
  }
184
237
  }
185
- async function S(e, t, i) {
186
- const n = w(
238
+ async function B(e, i, t) {
239
+ const n = h(
187
240
  e,
188
241
  ["v", "connect_artifact", "critical_scope_projection_json", "spend_scope"],
189
242
  "invalid_acquisition_envelope"
190
243
  );
191
244
  if (n.v !== 1 || typeof n.connect_artifact != "string" || n.connect_artifact.length === 0 || typeof n.critical_scope_projection_json != "string" || n.critical_scope_projection_json.length === 0)
192
- throw new r("invalid_acquisition_envelope");
193
- const o = k(n.spend_scope, t.expectedConsumer), c = new TextEncoder().encode(n.connect_artifact), a = new TextEncoder().encode(n.critical_scope_projection_json);
194
- await D(c, o.artifact_digest_b64u, "artifact_digest_mismatch"), await D(
245
+ throw new o("invalid_acquisition_envelope");
246
+ const c = V(n.spend_scope, i.expectedConsumer), r = new TextEncoder().encode(n.connect_artifact), a = new TextEncoder().encode(n.critical_scope_projection_json);
247
+ await D(r, c.artifact_digest_b64u, "artifact_digest_mismatch"), await D(
195
248
  a,
196
- o.projection_digest_b64u,
249
+ c.projection_digest_b64u,
197
250
  "projection_digest_mismatch"
198
251
  );
199
252
  let d;
200
253
  try {
201
254
  d = JSON.parse(n.critical_scope_projection_json);
202
255
  } catch {
203
- throw new r("invalid_critical_scope_projection");
256
+ throw new o("invalid_critical_scope_projection");
204
257
  }
205
- const p = w(
258
+ const s = h(
206
259
  d,
207
260
  ["scope", "scope_version", "critical", "payload"],
208
261
  "invalid_critical_scope_projection"
209
262
  );
210
- if (p.scope !== "proxy.runtime" || p.scope_version !== 2 || p.critical !== !0)
211
- throw new r("invalid_critical_scope_projection");
212
- let u;
263
+ if (s.scope !== "proxy.runtime" || s.scope_version !== 2 || s.critical !== !0)
264
+ throw new o("invalid_critical_scope_projection");
265
+ let l;
213
266
  try {
214
- u = F(p.payload);
267
+ l = U(s.payload);
215
268
  } catch {
216
- throw new r("invalid_proxy_runtime_scope");
269
+ throw new o("invalid_proxy_runtime_scope");
217
270
  }
218
- let l;
271
+ let p;
219
272
  try {
220
- l = i(n.connect_artifact);
273
+ p = t(n.connect_artifact);
221
274
  } catch {
222
- throw new r("invalid_connect_artifact");
275
+ throw new o("invalid_connect_artifact");
223
276
  }
224
- const _ = U(o), s = t.validateSpendBinding(_);
225
- if (s !== void 0 && (typeof s != "string" || s.trim() === "" || s !== s.trim()))
226
- throw new r("invalid_spend_binding_identity");
277
+ const u = R(c), _ = i.validateSpendBinding(u);
278
+ if (_ !== void 0 && (typeof _ != "string" || _.trim() === "" || _ !== _.trim()))
279
+ throw new o("invalid_spend_binding_identity");
227
280
  return Object.freeze({
228
- artifact: l,
229
- scope: u,
230
- binding: _,
231
- bindingIdentity: s ?? `${_.artifactDigestB64u}.${_.projectionDigestB64u}`,
232
- receipt: o.receipt
281
+ artifact: p,
282
+ scope: l,
283
+ binding: u,
284
+ bindingIdentity: _ ?? `${u.artifactDigestB64u}.${u.projectionDigestB64u}`,
285
+ receipt: c.receipt
233
286
  });
234
287
  }
235
- function O(e, t, i, n, o) {
236
- const c = e.artifact, a = e.scope, d = e.binding, p = e.bindingIdentity;
237
- let u = e.receipt, l;
238
- const _ = t(c, async (s) => {
239
- const q = u;
240
- if (u = void 0, q === void 0) throw new r("spend_binding_consumed");
241
- const R = Object.freeze({
288
+ function b(e, i, t, n, c) {
289
+ const r = e.artifact, a = e.scope, d = e.binding, s = e.bindingIdentity;
290
+ let l = e.receipt, p;
291
+ const u = i(r, async (_) => {
292
+ const y = l;
293
+ if (l = void 0, y === void 0) throw new o("spend_binding_consumed");
294
+ const k = Object.freeze({
242
295
  ...d,
243
- attemptId: Z(),
244
- receipt: q
296
+ attemptId: G(),
297
+ receipt: y
245
298
  });
246
299
  try {
247
- await i(R, s), l.committed = !0;
248
- } catch ($) {
249
- throw o(l), $;
300
+ await t(k, _), p.committed = !0;
301
+ } catch (N) {
302
+ throw c(p), N;
250
303
  }
251
304
  });
252
- return l = { lease: _, scope: a, bindingIdentity: p, committed: !1 }, n(l), _;
305
+ return p = { lease: u, scope: a, bindingIdentity: s, committed: !1 }, n(p), u;
253
306
  }
254
- function k(e, t) {
255
- const i = w(
307
+ function V(e, i) {
308
+ const t = h(
256
309
  e,
257
310
  [
258
311
  "v",
@@ -268,24 +321,24 @@ function k(e, t) {
268
321
  ],
269
322
  "invalid_spend_scope"
270
323
  );
271
- if (i.v !== 1 || typeof i.receipt != "string" || !H(i.receipt) || typeof i.artifact_digest_b64u != "string" || !x(i.artifact_digest_b64u) || typeof i.projection_digest_b64u != "string" || !x(i.projection_digest_b64u) || i.consumer !== t || typeof i.expires_at != "string" || !M(i.expires_at) || !b(i.target_binding))
272
- throw new r("invalid_spend_scope");
273
- const n = f(i.launcher_origin), o = f(i.runtime_origin), c = f(i.app_origin);
274
- if (Date.parse(i.expires_at) <= Date.now()) throw new r("expired_spend_scope");
324
+ if (t.v !== 1 || typeof t.receipt != "string" || !M(t.receipt) || typeof t.artifact_digest_b64u != "string" || !x(t.artifact_digest_b64u) || typeof t.projection_digest_b64u != "string" || !x(t.projection_digest_b64u) || t.consumer !== i || typeof t.expires_at != "string" || !Z(t.expires_at) || !S(t.target_binding))
325
+ throw new o("invalid_spend_scope");
326
+ const n = f(t.launcher_origin), c = f(t.runtime_origin), r = f(t.app_origin);
327
+ if (Date.parse(t.expires_at) <= Date.now()) throw new o("expired_spend_scope");
275
328
  return Object.freeze({
276
329
  v: 1,
277
- receipt: i.receipt,
278
- artifact_digest_b64u: i.artifact_digest_b64u,
279
- projection_digest_b64u: i.projection_digest_b64u,
330
+ receipt: t.receipt,
331
+ artifact_digest_b64u: t.artifact_digest_b64u,
332
+ projection_digest_b64u: t.projection_digest_b64u,
280
333
  launcher_origin: n,
281
- runtime_origin: o,
282
- app_origin: c,
283
- consumer: t,
284
- target_binding: v(i.target_binding),
285
- expires_at: i.expires_at
334
+ runtime_origin: c,
335
+ app_origin: r,
336
+ consumer: i,
337
+ target_binding: j(t.target_binding),
338
+ expires_at: t.expires_at
286
339
  });
287
340
  }
288
- function U(e) {
341
+ function R(e) {
289
342
  return Object.freeze({
290
343
  artifactDigestB64u: e.artifact_digest_b64u,
291
344
  projectionDigestB64u: e.projection_digest_b64u,
@@ -297,8 +350,8 @@ function U(e) {
297
350
  expiresAt: e.expires_at
298
351
  });
299
352
  }
300
- function V(e, t) {
301
- const i = w(
353
+ function H(e, i) {
354
+ const t = h(
302
355
  e,
303
356
  [
304
357
  "v",
@@ -315,125 +368,126 @@ function V(e, t) {
315
368
  ],
316
369
  "invalid_isolated_handoff"
317
370
  );
318
- if (i.v !== 6 || i.env_public_id !== t.envPublicId || i.floe_app !== t.floeApp || i.code_space_id !== t.codeSpaceId || i.app_path !== t.appPath || i.launcher_kind !== t.launcherKind || i.launcher_id !== t.launcherId || i.launcher_origin !== t.launcherOrigin || i.runtime_origin !== t.runtimeOrigin || i.app_origin !== t.appOrigin)
319
- throw new r("isolated_context_mismatch");
320
- return f(i.launcher_origin), f(i.runtime_origin), f(i.app_origin), i;
371
+ if (t.v !== 6 || t.env_public_id !== i.envPublicId || t.floe_app !== i.floeApp || t.code_space_id !== i.codeSpaceId || t.app_path !== i.appPath || t.launcher_kind !== i.launcherKind || t.launcher_id !== i.launcherId || t.launcher_origin !== i.launcherOrigin || t.runtime_origin !== i.runtimeOrigin || t.app_origin !== i.appOrigin)
372
+ throw new o("isolated_context_mismatch");
373
+ return f(t.launcher_origin), f(t.runtime_origin), f(t.app_origin), t;
321
374
  }
322
- function N(e, t, i) {
323
- if (t.consumer !== "isolated" || t.launcherOrigin !== e.launcher_origin || t.runtimeOrigin !== e.runtime_origin || t.appOrigin !== e.app_origin || e.runtime_origin !== i.runtimeOrigin || e.app_origin !== i.appOrigin)
324
- throw new r("isolated_spend_binding_mismatch");
375
+ function J(e, i, t) {
376
+ if (i.consumer !== "isolated" || i.launcherOrigin !== e.launcher_origin || i.runtimeOrigin !== e.runtime_origin || i.appOrigin !== e.app_origin || e.runtime_origin !== t.runtimeOrigin || e.app_origin !== t.appOrigin)
377
+ throw new o("isolated_spend_binding_mismatch");
325
378
  }
326
- function w(e, t, i) {
379
+ function h(e, i, t) {
327
380
  if (e === null || typeof e != "object" || Array.isArray(e))
328
- throw new r(i);
329
- const n = e, o = new Set(t), c = Object.keys(n);
330
- if (c.length !== t.length || c.some((a) => !o.has(a)))
331
- throw new r(i);
381
+ throw new o(t);
382
+ const n = e, c = new Set(i), r = Object.keys(n);
383
+ if (r.length !== i.length || r.some((a) => !c.has(a)))
384
+ throw new o(t);
332
385
  return n;
333
386
  }
334
387
  function f(e) {
335
- if (typeof e != "string") throw new r("invalid_spend_scope");
336
- let t;
388
+ if (typeof e != "string") throw new o("invalid_spend_scope");
389
+ let i;
337
390
  try {
338
- t = new URL(e);
391
+ i = new URL(e);
339
392
  } catch {
340
- throw new r("invalid_spend_scope");
393
+ throw new o("invalid_spend_scope");
341
394
  }
342
- if (t.protocol !== "https:" && t.protocol !== "http:" || t.origin !== e || t.username !== "" || t.password !== "")
343
- throw new r("invalid_spend_scope");
395
+ if (i.protocol !== "https:" && i.protocol !== "http:" || i.origin !== e || i.username !== "" || i.password !== "")
396
+ throw new o("invalid_spend_scope");
344
397
  return e;
345
398
  }
346
- function H(e) {
347
- const t = /^r1\.([A-Za-z0-9_-]{1,64})\.([A-Za-z0-9_-]+)$/u.exec(e);
348
- if (t === null || t[2] === void 0) return !1;
399
+ function M(e) {
400
+ const i = /^r1\.([A-Za-z0-9_-]{1,64})\.([A-Za-z0-9_-]+)$/u.exec(e);
401
+ if (i === null || i[2] === void 0) return !1;
349
402
  try {
350
- return y(t[2], "invalid_spend_scope").length === j;
403
+ return m(i[2], "invalid_spend_scope").length === O;
351
404
  } catch {
352
405
  return !1;
353
406
  }
354
407
  }
355
408
  function x(e) {
356
409
  try {
357
- return y(e, "invalid_spend_scope").length === j;
410
+ return m(e, "invalid_spend_scope").length === O;
358
411
  } catch {
359
412
  return !1;
360
413
  }
361
414
  }
362
- function M(e) {
415
+ function Z(e) {
363
416
  return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/u.test(e) ? Number.isFinite(Date.parse(e)) : !1;
364
417
  }
365
- function b(e, t = 0) {
366
- return t > 32 ? !1 : e === null || typeof e == "string" || typeof e == "boolean" ? !0 : typeof e == "number" ? Number.isFinite(e) : Array.isArray(e) ? e.every((i) => b(i, t + 1)) : typeof e != "object" ? !1 : Object.values(e).every(
367
- (i) => b(i, t + 1)
418
+ function S(e, i = 0) {
419
+ return i > 32 ? !1 : e === null || typeof e == "string" || typeof e == "boolean" ? !0 : typeof e == "number" ? Number.isFinite(e) : Array.isArray(e) ? e.every((t) => S(t, i + 1)) : typeof e != "object" ? !1 : Object.values(e).every(
420
+ (t) => S(t, i + 1)
368
421
  );
369
422
  }
370
- function v(e) {
423
+ function j(e) {
371
424
  if (Array.isArray(e)) {
372
- for (const t of e) v(t);
425
+ for (const i of e) j(i);
373
426
  return Object.freeze(e);
374
427
  }
375
428
  if (e !== null && typeof e == "object") {
376
- for (const t of Object.values(e)) v(t);
429
+ for (const i of Object.values(e)) j(i);
377
430
  return Object.freeze(e);
378
431
  }
379
432
  return e;
380
433
  }
381
- async function D(e, t, i) {
382
- const n = await L(e), o = y(t, i);
383
- if (n.length !== o.length) throw new r(i);
384
- let c = 0;
434
+ async function D(e, i, t) {
435
+ const n = await $(e), c = m(i, t);
436
+ if (n.length !== c.length) throw new o(t);
437
+ let r = 0;
385
438
  for (let a = 0; a < n.length; a += 1)
386
- c |= n[a] ^ o[a];
387
- if (c !== 0) throw new r(i);
439
+ r |= n[a] ^ c[a];
440
+ if (r !== 0) throw new o(t);
388
441
  }
389
- async function J(e) {
390
- return B(await L(e));
442
+ async function W(e) {
443
+ return z(await $(e));
391
444
  }
392
- async function L(e) {
445
+ async function $(e) {
393
446
  if (globalThis.crypto?.subtle === void 0)
394
- throw new r("acquisition_crypto_unavailable");
395
- const t = e.buffer.slice(
447
+ throw new o("acquisition_crypto_unavailable");
448
+ const i = e.buffer.slice(
396
449
  e.byteOffset,
397
450
  e.byteOffset + e.byteLength
398
- ), i = await globalThis.crypto.subtle.digest("SHA-256", t);
399
- return new Uint8Array(i);
451
+ ), t = await globalThis.crypto.subtle.digest("SHA-256", i);
452
+ return new Uint8Array(t);
400
453
  }
401
- function Z() {
454
+ function G() {
402
455
  if (globalThis.crypto?.getRandomValues === void 0)
403
- throw new r("acquisition_entropy_unavailable");
404
- return B(globalThis.crypto.getRandomValues(new Uint8Array(j)));
456
+ throw new o("acquisition_entropy_unavailable");
457
+ return z(globalThis.crypto.getRandomValues(new Uint8Array(O)));
405
458
  }
406
- function y(e, t) {
407
- if (!/^[A-Za-z0-9_-]*$/u.test(e) || e.length % 4 === 1) throw new r(t);
408
- const i = e.replace(/-/gu, "+").replace(/_/gu, "/") + "=".repeat((4 - e.length % 4) % 4);
459
+ function m(e, i) {
460
+ if (!/^[A-Za-z0-9_-]*$/u.test(e) || e.length % 4 === 1) throw new o(i);
461
+ const t = e.replace(/-/gu, "+").replace(/_/gu, "/") + "=".repeat((4 - e.length % 4) % 4);
409
462
  let n;
410
463
  try {
411
- n = atob(i);
464
+ n = atob(t);
412
465
  } catch {
413
- throw new r(t);
466
+ throw new o(i);
414
467
  }
415
- const o = Uint8Array.from(n, (c) => c.charCodeAt(0));
416
- if (B(o) !== e) throw new r(t);
417
- return o;
468
+ const c = Uint8Array.from(n, (r) => r.charCodeAt(0));
469
+ if (z(c) !== e) throw new o(i);
470
+ return c;
418
471
  }
419
- function B(e) {
420
- let t = "";
421
- for (const i of e) t += String.fromCharCode(i);
422
- return btoa(t).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
472
+ function z(e) {
473
+ let i = "";
474
+ for (const t of e) i += String.fromCharCode(t);
475
+ return btoa(i).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
423
476
  }
424
- function W(e) {
477
+ function P(e) {
425
478
  return new TextEncoder().encode(e).length;
426
479
  }
427
480
  export {
428
- r as AcquisitionError,
429
- h as ConnectedAcquisition,
430
- m as IsolatedOneShotAcquisition,
431
- te as clearAcquisitionSource,
432
- re as connectIsolatedOneShot,
433
- ie as connectedAcquisitionDetails,
434
- K as materializeAcquisitionForSource,
435
- ne as materializeIsolatedOneShot,
436
- Q as materializePrivateLoopbackAcquisitionForSource,
437
- Y as registerAcquisitionSource,
438
- ee as synchronizeAcquisitionSourceSnapshot
481
+ o as AcquisitionError,
482
+ w as ConnectedAcquisition,
483
+ v as IsolatedOneShotAcquisition,
484
+ ie as clearAcquisitionSource,
485
+ ce as connectIsolatedOneShot,
486
+ ne as connectedAcquisitionDetails,
487
+ Q as materializeAcquisitionForSource,
488
+ oe as materializeIsolatedOneShot,
489
+ re as materializeNativeIsolatedAcquisitionForSource,
490
+ ee as materializePrivateLoopbackAcquisitionForSource,
491
+ K as registerAcquisitionSource,
492
+ te as synchronizeAcquisitionSourceSnapshot
439
493
  };
@@ -1,6 +1,6 @@
1
1
  import type { ArtifactSource, JsonObject, RetryDisposition } from '@floegence/flowersec-core';
2
2
  import type { PrivateLoopbackArtifactSourceV1 } from '@floegence/flowersec-core/browser';
3
- import { type CommitSpend, type ValidateSpendBinding } from './acquisition';
3
+ import { type NativeIsolatedAcquisitionContext, type CommitSpend, type ValidateSpendBinding } from './acquisition';
4
4
  export type ControlplaneArtifactSourceOptions = Readonly<{
5
5
  baseUrl: string;
6
6
  endpointId: string;
@@ -34,4 +34,11 @@ export type ClassifiedControlplaneFailure = Readonly<{
34
34
  }>;
35
35
  export declare function classifyControlplaneFailure(input: ControlplaneFailureInput): ClassifiedControlplaneFailure;
36
36
  export declare function createControlplaneArtifactSource(options: ControlplaneArtifactSourceOptions): ArtifactSource;
37
+ /** Acquires an isolated application lease for a native controller without a browser handoff.
38
+ * The caller validates the exact launcher, runtime, app, and resource binding and
39
+ * supplies the existing spend callback. No consumer or origin is rewritten.
40
+ */
41
+ export declare function createIsolatedControlplaneArtifactSource(options: ControlplaneArtifactSourceOptions & Readonly<{
42
+ isolatedContext: NativeIsolatedAcquisitionContext;
43
+ }>): ArtifactSource;
37
44
  export declare function createPrivateLoopbackControlplaneArtifactSource(options: PrivateLoopbackControlplaneArtifactSourceOptions): PrivateLoopbackArtifactSourceV1;
@@ -1,31 +1,31 @@
1
- import { registerAcquisitionSource as b, AcquisitionError as p, materializeAcquisitionForSource as w, materializePrivateLoopbackAcquisitionForSource as k } from "./acquisition.js";
2
- const y = /^[a-z][a-z0-9_]{0,63}$/u;
3
- class a extends Error {
1
+ import { registerAcquisitionSource as u, materializeNativeIsolatedAcquisitionForSource as S, AcquisitionError as m, materializeAcquisitionForSource as k, materializePrivateLoopbackAcquisitionForSource as _ } from "./acquisition.js";
2
+ const h = /^[a-z][a-z0-9_]{0,63}$/u;
3
+ class s extends Error {
4
4
  constructor(r, t) {
5
5
  super(`Floe controlplane request failed (code=${t})`), this.status = r, this.code = t, this.name = "ControlplaneRequestError";
6
6
  }
7
7
  }
8
- function S(e) {
8
+ function v(e) {
9
9
  const r = e.toLowerCase();
10
10
  return r === "localhost" || r === "::1" || r === "127.0.0.1" || r.startsWith("127.");
11
11
  }
12
- function _(e, r) {
12
+ function z(e, r) {
13
13
  let t;
14
14
  try {
15
15
  t = new URL(e);
16
16
  } catch {
17
- throw new a(0, "transport_policy_denied");
17
+ throw new s(0, "transport_policy_denied");
18
18
  }
19
- if (t.protocol !== "https:" && !(r && t.protocol === "http:" && S(t.hostname)))
20
- throw new a(0, "transport_policy_denied");
19
+ if (t.protocol !== "https:" && !(r && t.protocol === "http:" && v(t.hostname)))
20
+ throw new s(0, "transport_policy_denied");
21
21
  return t.pathname = t.pathname.replace(/\/+$/u, ""), t;
22
22
  }
23
23
  function j(e, r) {
24
24
  const t = r === void 0 ? "/v1/connect/artifact" : "/v1/connect/artifact/entry", o = e.pathname === "/" ? "" : e.pathname;
25
25
  return new URL(`${o}${t}`, e).toString();
26
26
  }
27
- function v(e) {
28
- if (!y.test(e.code))
27
+ function O(e) {
28
+ if (!h.test(e.code))
29
29
  return Object.freeze({
30
30
  code: "invalid_error_code",
31
31
  disposition: Object.freeze({ kind: "terminal" })
@@ -33,7 +33,7 @@ function v(e) {
33
33
  if (new Set(e.retryableBusinessCodes ?? []).has(e.code))
34
34
  return Object.freeze({ code: e.code, disposition: Object.freeze({ kind: "retryable" }) });
35
35
  if (e.status === 429) {
36
- const t = g(e.retryAfter, e.nowUnixMilliseconds ?? Date.now());
36
+ const t = T(e.retryAfter, e.nowUnixMilliseconds ?? Date.now());
37
37
  return Object.freeze({
38
38
  code: e.code,
39
39
  disposition: Object.freeze(t === void 0 ? { kind: "retryable" } : { kind: "retry_after", notBeforeUnixMilliseconds: t })
@@ -41,31 +41,42 @@ function v(e) {
41
41
  }
42
42
  return e.status === 408 || e.status === 425 || e.status >= 500 ? Object.freeze({ code: e.code, disposition: Object.freeze({ kind: "retryable" }) }) : Object.freeze({ code: e.code, disposition: Object.freeze({ kind: "terminal" }) });
43
43
  }
44
- function B(e) {
45
- const r = m(e, w);
46
- return b(r), r;
47
- }
48
44
  function L(e) {
49
- const r = z(e.baseUrl), t = m(
45
+ const r = p(e, k);
46
+ return u(r), r;
47
+ }
48
+ function I(e) {
49
+ const r = p(
50
+ e,
51
+ (t, o, i) => S(t, o, {
52
+ ...i,
53
+ context: e.isolatedContext
54
+ }),
55
+ "isolated"
56
+ );
57
+ return u(r), r;
58
+ }
59
+ function N(e) {
60
+ const r = A(e.baseUrl), t = p(
50
61
  { ...e, baseUrl: r.origin, allowLoopbackHTTP: !0 },
51
- k
62
+ _
52
63
  );
53
- return b(t), t;
64
+ return u(t), t;
54
65
  }
55
- function m(e, r) {
66
+ function p(e, r, t = "trusted") {
56
67
  if (typeof e.commitSpend != "function") throw new TypeError("commitSpend is required");
57
68
  if (typeof e.validateSpendBinding != "function")
58
69
  throw new TypeError("validateSpendBinding is required");
59
- const t = e.fetch ?? globalThis.fetch;
60
- if (typeof t != "function") throw new TypeError("fetch is required");
61
- const o = _(e.baseUrl, e.allowLoopbackHTTP === !0), s = j(o, e.entryTicket), i = {
70
+ const o = e.fetch ?? globalThis.fetch;
71
+ if (typeof o != "function") throw new TypeError("fetch is required");
72
+ const i = z(e.baseUrl, e.allowLoopbackHTTP === !0), c = j(i, e.entryTicket), b = {
62
73
  acquire: async ({ signal: d }) => {
63
74
  try {
64
75
  const n = {
65
76
  endpoint_id: e.endpointId,
66
77
  ...e.payload === void 0 ? {} : { payload: e.payload },
67
78
  ...e.entryTicket === void 0 && e.correlation !== void 0 ? { correlation: { trace_id: e.correlation.traceId } } : {}
68
- }, c = await t(s, {
79
+ }, a = await o(c, {
69
80
  method: "POST",
70
81
  headers: {
71
82
  accept: "application/json",
@@ -77,37 +88,37 @@ function m(e, r) {
77
88
  redirect: "error",
78
89
  signal: d
79
90
  });
80
- if (!c.ok) {
81
- const f = await E(c);
82
- return { kind: "failure", ...v({
83
- status: c.status,
84
- code: f,
85
- retryAfter: c.headers.get("retry-after"),
91
+ if (!a.ok) {
92
+ const l = await g(a);
93
+ return { kind: "failure", ...O({
94
+ status: a.status,
95
+ code: l,
96
+ retryAfter: a.headers.get("retry-after"),
86
97
  retryableBusinessCodes: e.retryableBusinessCodes
87
98
  }) };
88
99
  }
89
- let u;
100
+ let y;
90
101
  try {
91
- u = await c.json();
102
+ y = await a.json();
92
103
  } catch {
93
- return l("invalid_controlplane_response");
104
+ return f("invalid_controlplane_response");
94
105
  }
95
- const h = await r(i, u, {
106
+ const w = await r(b, y, {
96
107
  commitSpend: e.commitSpend,
97
- validateSpendBinding: (f) => {
108
+ validateSpendBinding: (l) => {
98
109
  try {
99
- return e.validateSpendBinding(f);
110
+ return e.validateSpendBinding(l);
100
111
  } catch {
101
- throw new p("invalid_spend_binding");
112
+ throw new m("invalid_spend_binding");
102
113
  }
103
114
  },
104
- expectedConsumer: "trusted"
115
+ expectedConsumer: t
105
116
  });
106
- return Object.freeze({ kind: "lease", lease: h });
117
+ return Object.freeze({ kind: "lease", lease: w });
107
118
  } catch (n) {
108
119
  if (d.aborted) throw d.reason ?? new DOMException("Aborted", "AbortError");
109
120
  if (n instanceof DOMException && n.name === "AbortError") throw n;
110
- return n instanceof p || n instanceof a ? l(n.code) : Object.freeze({
121
+ return n instanceof m || n instanceof s ? f(n.code) : Object.freeze({
111
122
  kind: "failure",
112
123
  code: "network_error",
113
124
  disposition: Object.freeze({ kind: "retryable" })
@@ -115,28 +126,28 @@ function m(e, r) {
115
126
  }
116
127
  }
117
128
  };
118
- return i;
129
+ return b;
119
130
  }
120
- function z(e) {
131
+ function A(e) {
121
132
  let r;
122
133
  try {
123
134
  r = new URL(e);
124
135
  } catch {
125
- throw new a(0, "transport_policy_denied");
136
+ throw new s(0, "transport_policy_denied");
126
137
  }
127
- if (e !== r.origin || r.protocol !== "http:" || r.username !== "" || r.password !== "" || !O(r.port) || !A(r.hostname))
128
- throw new a(0, "transport_policy_denied");
138
+ if (e !== r.origin || r.protocol !== "http:" || r.username !== "" || r.password !== "" || !C(r.port) || !E(r.hostname))
139
+ throw new s(0, "transport_policy_denied");
129
140
  return r;
130
141
  }
131
- function O(e) {
142
+ function C(e) {
132
143
  if (!/^[1-9][0-9]*$/u.test(e)) return !1;
133
144
  const r = Number(e);
134
145
  return Number.isSafeInteger(r) && r >= 1024 && r <= 65535;
135
146
  }
136
- function A(e) {
147
+ function E(e) {
137
148
  return e === "127.0.0.1" || e === "[::1]";
138
149
  }
139
- async function E(e) {
150
+ async function g(e) {
140
151
  try {
141
152
  const r = await e.json();
142
153
  if (r !== null && typeof r == "object" && !Array.isArray(r)) {
@@ -150,28 +161,29 @@ async function E(e) {
150
161
  }
151
162
  return "request_failed";
152
163
  }
153
- function g(e, r) {
164
+ function T(e, r) {
154
165
  if (e == null) return;
155
166
  const t = e.trim();
156
167
  if (/^\d+$/u.test(t)) {
157
- const s = Number(t);
158
- if (!Number.isSafeInteger(s)) return;
159
- const i = r + s * 1e3;
160
- return Number.isSafeInteger(i) && i > r ? i : void 0;
168
+ const i = Number(t);
169
+ if (!Number.isSafeInteger(i)) return;
170
+ const c = r + i * 1e3;
171
+ return Number.isSafeInteger(c) && c > r ? c : void 0;
161
172
  }
162
173
  const o = Date.parse(t);
163
174
  return Number.isSafeInteger(o) && o > r ? o : void 0;
164
175
  }
165
- function l(e) {
176
+ function f(e) {
166
177
  return Object.freeze({
167
178
  kind: "failure",
168
- code: y.test(e) ? e : "invalid_error_code",
179
+ code: h.test(e) ? e : "invalid_error_code",
169
180
  disposition: Object.freeze({ kind: "terminal" })
170
181
  });
171
182
  }
172
183
  export {
173
- a as ControlplaneRequestError,
174
- v as classifyControlplaneFailure,
175
- B as createControlplaneArtifactSource,
176
- L as createPrivateLoopbackControlplaneArtifactSource
184
+ s as ControlplaneRequestError,
185
+ O as classifyControlplaneFailure,
186
+ L as createControlplaneArtifactSource,
187
+ I as createIsolatedControlplaneArtifactSource,
188
+ N as createPrivateLoopbackControlplaneArtifactSource
177
189
  };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { WaitForMessageOptions } from './messaging';
3
3
  export { postMessageToOrigins, waitForMessage } from './messaging';
4
4
  export { getSessionStorage, removeSessionStorage, setSessionStorage } from './storage';
5
5
  export type { ArtifactSource, ArtifactSourceResult } from '@floegence/flowersec-core';
6
- export { createControlplaneArtifactSource, createPrivateLoopbackControlplaneArtifactSource, ControlplaneRequestError, } from './artifact-source';
6
+ export { createControlplaneArtifactSource, createIsolatedControlplaneArtifactSource, createPrivateLoopbackControlplaneArtifactSource, ControlplaneRequestError, } from './artifact-source';
7
7
  export { classifyControlplaneFailure } from './artifact-source';
8
8
  export type { ClassifiedControlplaneFailure, ControlplaneArtifactSourceOptions, ControlplaneFailureInput, PrivateLoopbackControlplaneArtifactSourceOptions, } from './artifact-source';
9
9
  export { AcquisitionError, clearAcquisitionSource, connectIsolatedOneShot, ConnectedAcquisition, IsolatedOneShotAcquisition, materializePrivateLoopbackAcquisitionForSource, materializeIsolatedOneShot, synchronizeAcquisitionSourceSnapshot, } from './acquisition';
package/dist/index.js CHANGED
@@ -1,41 +1,42 @@
1
1
  import { clearLocationHash as r, parseHashParam as t } from "./hash.js";
2
2
  import { postMessageToOrigins as i, waitForMessage as a } from "./messaging.js";
3
- import { getSessionStorage as s, removeSessionStorage as p, setSessionStorage as l } from "./storage.js";
4
- import { ControlplaneRequestError as S, classifyControlplaneFailure as u, createControlplaneArtifactSource as m, createPrivateLoopbackControlplaneArtifactSource as x } from "./artifact-source.js";
5
- import { AcquisitionError as g, ConnectedAcquisition as A, IsolatedOneShotAcquisition as h, clearAcquisitionSource as y, connectIsolatedOneShot as P, materializeIsolatedOneShot as q, materializePrivateLoopbackAcquisitionForSource as v, synchronizeAcquisitionSourceSnapshot as O } from "./acquisition.js";
3
+ import { getSessionStorage as s, removeSessionStorage as l, setSessionStorage as p } from "./storage.js";
4
+ import { ControlplaneRequestError as S, classifyControlplaneFailure as u, createControlplaneArtifactSource as m, createIsolatedControlplaneArtifactSource as C, createPrivateLoopbackControlplaneArtifactSource as x } from "./artifact-source.js";
5
+ import { AcquisitionError as g, ConnectedAcquisition as h, IsolatedOneShotAcquisition as y, clearAcquisitionSource as P, connectIsolatedOneShot as q, materializeIsolatedOneShot as v, materializePrivateLoopbackAcquisitionForSource as O, synchronizeAcquisitionSourceSnapshot as d } from "./acquisition.js";
6
6
  import { createAcquisitionConnectionLifecycle as L } from "./acquisition-lifecycle.js";
7
- import { createArtifactDirectConnectionConfig as z, createArtifactTunnelConnectionConfig as B, createPrivateLoopbackDirectConnectionConfig as b, createProxyRuntimeTunnelConnectionConfig as k } from "./connection.js";
8
- import { ServerSentEventStreamError as F, fetchServerSentEvents as I } from "./server-sent-events.js";
9
- import { ProxyBootstrapOwner as D, closeProxyBootstrap as H, createProxyBootstrapOwner as M, synchronizeProxyBootstrap as R } from "./proxy-bootstrap.js";
7
+ import { createArtifactDirectConnectionConfig as B, createArtifactTunnelConnectionConfig as I, createPrivateLoopbackDirectConnectionConfig as b, createProxyRuntimeTunnelConnectionConfig as k } from "./connection.js";
8
+ import { ServerSentEventStreamError as F, fetchServerSentEvents as T } from "./server-sent-events.js";
9
+ import { ProxyBootstrapOwner as H, closeProxyBootstrap as M, createProxyBootstrapOwner as R, synchronizeProxyBootstrap as j } from "./proxy-bootstrap.js";
10
10
  export {
11
11
  g as AcquisitionError,
12
- A as ConnectedAcquisition,
12
+ h as ConnectedAcquisition,
13
13
  S as ControlplaneRequestError,
14
- h as IsolatedOneShotAcquisition,
15
- D as ProxyBootstrapOwner,
14
+ y as IsolatedOneShotAcquisition,
15
+ H as ProxyBootstrapOwner,
16
16
  F as ServerSentEventStreamError,
17
17
  u as classifyControlplaneFailure,
18
- y as clearAcquisitionSource,
18
+ P as clearAcquisitionSource,
19
19
  r as clearLocationHash,
20
- H as closeProxyBootstrap,
21
- P as connectIsolatedOneShot,
20
+ M as closeProxyBootstrap,
21
+ q as connectIsolatedOneShot,
22
22
  L as createAcquisitionConnectionLifecycle,
23
- z as createArtifactDirectConnectionConfig,
24
- B as createArtifactTunnelConnectionConfig,
23
+ B as createArtifactDirectConnectionConfig,
24
+ I as createArtifactTunnelConnectionConfig,
25
25
  m as createControlplaneArtifactSource,
26
+ C as createIsolatedControlplaneArtifactSource,
26
27
  x as createPrivateLoopbackControlplaneArtifactSource,
27
28
  b as createPrivateLoopbackDirectConnectionConfig,
28
- M as createProxyBootstrapOwner,
29
+ R as createProxyBootstrapOwner,
29
30
  k as createProxyRuntimeTunnelConnectionConfig,
30
- I as fetchServerSentEvents,
31
+ T as fetchServerSentEvents,
31
32
  s as getSessionStorage,
32
- q as materializeIsolatedOneShot,
33
- v as materializePrivateLoopbackAcquisitionForSource,
33
+ v as materializeIsolatedOneShot,
34
+ O as materializePrivateLoopbackAcquisitionForSource,
34
35
  t as parseHashParam,
35
36
  i as postMessageToOrigins,
36
- p as removeSessionStorage,
37
- l as setSessionStorage,
38
- O as synchronizeAcquisitionSourceSnapshot,
39
- R as synchronizeProxyBootstrap,
37
+ l as removeSessionStorage,
38
+ p as setSessionStorage,
39
+ d as synchronizeAcquisitionSourceSnapshot,
40
+ j as synchronizeProxyBootstrap,
40
41
  a as waitForMessage
41
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-boot",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",