@superbee/core 0.2.0-pre.39 → 0.2.0-pre.40

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.
@@ -14,7 +14,7 @@ export interface RestJsonCursor {
14
14
  }
15
15
  export declare const restJsonProfile: SourceProfile<ConnectorSource, RestJsonCursor>;
16
16
  /** Contract-1 composition helpers for explicitly trusted standalone source plugins. */
17
- export declare const SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.39";
17
+ export declare const SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.40";
18
18
  export interface SourcePluginHelpers {
19
19
  readonly restJsonProfile: typeof restJsonProfile;
20
20
  readonly nextLinkTarget: typeof nextLinkTarget;
@@ -196,7 +196,7 @@ export const restJsonProfile = Object.freeze({
196
196
  },
197
197
  });
198
198
  /** Contract-1 composition helpers for explicitly trusted standalone source plugins. */
199
- export const SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.39";
199
+ export const SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.40";
200
200
  export { nextLinkTarget };
201
201
  export const SOURCE_PROFILES = Object.freeze([restJsonProfile].map(profile => Object.freeze({ id: profile.id, version: profile.version, kind: profile.kind })));
202
202
  /** Inert lookup. Extensions are explicit caller imports, never discovered or executed here. */
@@ -0,0 +1,14 @@
1
+ /** In-process continuity only: an attempt grants no View, session or execution authority. */
2
+ export interface ViewLaunchAttempt {
3
+ readonly generation: number;
4
+ readonly selectionKey: string;
5
+ }
6
+ export interface ViewLaunchFence {
7
+ begin(selectionKey: string): ViewLaunchAttempt;
8
+ current(): ViewLaunchAttempt | null;
9
+ isCurrent(attempt: ViewLaunchAttempt): boolean;
10
+ retire(attempt: ViewLaunchAttempt): boolean;
11
+ }
12
+ export type ViewLaunchFailureReason = "context-required" | "expired" | "changed" | "denied" | "unavailable" | "delivery-failed";
13
+ export declare function createViewLaunchFence(): ViewLaunchFence;
14
+ //# sourceMappingURL=view-launch-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-launch-contract.d.ts","sourceRoot":"","sources":["../src/view-launch-contract.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAC/C,OAAO,IAAI,iBAAiB,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAC/C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC;CAC7C;AAED,MAAM,MAAM,uBAAuB,GAC/B,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAC1C,QAAQ,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAEjD,wBAAgB,qBAAqB,IAAI,eAAe,CAmBvD"}
@@ -0,0 +1,23 @@
1
+ export function createViewLaunchFence() {
2
+ let generation = 0;
3
+ let current = null;
4
+ return {
5
+ begin(selectionKey) {
6
+ // Exhaustion invalidates the old attempt rather than reusing an imprecise generation.
7
+ current = null;
8
+ if (generation === Number.MAX_SAFE_INTEGER)
9
+ throw new RangeError("View launch generation exhausted");
10
+ current = Object.freeze({ generation: ++generation, selectionKey });
11
+ return current;
12
+ },
13
+ current: () => current,
14
+ isCurrent: attempt => current !== null && current === attempt,
15
+ retire(attempt) {
16
+ if (current === null || current !== attempt)
17
+ return false;
18
+ current = null;
19
+ return true;
20
+ },
21
+ };
22
+ }
23
+ //# sourceMappingURL=view-launch-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-launch-contract.js","sourceRoot":"","sources":["../src/view-launch-contract.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,qBAAqB;IACnC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,OAAO,GAA6B,IAAI,CAAC;IAC7C,OAAO;QACL,KAAK,CAAC,YAAY;YAChB,sFAAsF;YACtF,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,UAAU,KAAK,MAAM,CAAC,gBAAgB;gBAAE,MAAM,IAAI,UAAU,CAAC,kCAAkC,CAAC,CAAC;YACrG,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;YACpE,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO;QACtB,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,OAAO;QAC7D,MAAM,CAAC,OAAO;YACZ,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,OAAO;gBAAE,OAAO,KAAK,CAAC;YAC1D,OAAO,GAAG,IAAI,CAAC;YACf,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superbee/core",
3
- "version": "0.2.0-pre.39",
3
+ "version": "0.2.0-pre.40",
4
4
  "type": "module",
5
5
  "description": "OKF store engine \u2014 bundle I/O, cross-links, derived backlinks, freshness, and versioned writes.",
6
6
  "license": "Apache-2.0",
@@ -211,6 +211,10 @@
211
211
  "types": "./dist/filesystem-push-role.d.ts",
212
212
  "default": "./dist/filesystem-push-role.js"
213
213
  },
214
+ "./view-launch-contract": {
215
+ "types": "./dist/view-launch-contract.d.ts",
216
+ "default": "./dist/view-launch-contract.js"
217
+ },
214
218
  "./artifact-contract": {
215
219
  "types": "./dist/artifact-contract.d.ts",
216
220
  "default": "./dist/artifact-contract.js"