@fiodos/web-core 0.1.1 → 0.1.2

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_WEB_API_URL = void 0;
4
4
  exports.fetchClientManifest = fetchClientManifest;
5
5
  exports.sendOrbSeen = sendOrbSeen;
6
+ const version_1 = require("../version");
6
7
  /**
7
8
  * Default public Fiodos backend, mirrored from @fiodos/react's DEFAULT_API_URL.
8
9
  * A drop-in that only receives an apiKey talks to this unless apiUrl is given.
@@ -59,7 +60,13 @@ async function sendOrbSeen(opts) {
59
60
  await fetch(`${baseUrl}/v1/client/orb-seen`, {
60
61
  method: 'POST',
61
62
  headers: { 'Content-Type': 'application/json', 'x-api-key': opts.apiKey },
62
- body: JSON.stringify({ platform: opts.platform ?? detectPlatform() }),
63
+ // sdkVersion/sdkPackage let the dashboard surface an "update available"
64
+ // notice when the running orb is older than the latest published SDK.
65
+ body: JSON.stringify({
66
+ platform: opts.platform ?? detectPlatform(),
67
+ sdkVersion: version_1.SDK_VERSION,
68
+ sdkPackage: version_1.SDK_PACKAGE,
69
+ }),
63
70
  });
64
71
  }
65
72
  catch {
@@ -7,6 +7,7 @@
7
7
  * reactive wrappers around THIS package, so they share identical agent
8
8
  * behaviour and security. No framework imports live here.
9
9
  */
10
+ export { SDK_VERSION, SDK_PACKAGE } from './version';
10
11
  export { AgentController } from './controller/AgentController';
11
12
  export type { AgentState, AgentExchange } from './controller/AgentController';
12
13
  export { createFiodosAgent } from './dropin/createFiodosAgent';
package/dist/cjs/index.js CHANGED
@@ -9,7 +9,11 @@
9
9
  * behaviour and security. No framework imports live here.
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.classifyPendingReply = exports.decideAction = exports.resolveUiMessages = exports.DEFAULT_AGENT_TIMINGS = exports.createSpeechSession = exports.createScreenContextStore = exports.createBridge = exports.isAgentApiError = exports.AgentApiError = exports.createFiodosTelemetry = exports.buildManifestPayload = exports.createFiodosBackendClient = exports.createWebVoiceAdapter = exports.BACK_ROUTE = exports.createWebNavigationAdapter = exports.createWebStorageAdapter = exports.watchPublishedConfig = exports.DEFAULT_ORB_APPEARANCE = exports.buildKeyboardChip = exports.createOrbVisual = exports.mountOrb = exports.sendOrbSeen = exports.fetchClientManifest = exports.DEFAULT_WEB_API_URL = exports.createFiodosAgent = exports.AgentController = void 0;
12
+ exports.classifyPendingReply = exports.decideAction = exports.resolveUiMessages = exports.DEFAULT_AGENT_TIMINGS = exports.createSpeechSession = exports.createScreenContextStore = exports.createBridge = exports.isAgentApiError = exports.AgentApiError = exports.createFiodosTelemetry = exports.buildManifestPayload = exports.createFiodosBackendClient = exports.createWebVoiceAdapter = exports.BACK_ROUTE = exports.createWebNavigationAdapter = exports.createWebStorageAdapter = exports.watchPublishedConfig = exports.DEFAULT_ORB_APPEARANCE = exports.buildKeyboardChip = exports.createOrbVisual = exports.mountOrb = exports.sendOrbSeen = exports.fetchClientManifest = exports.DEFAULT_WEB_API_URL = exports.createFiodosAgent = exports.AgentController = exports.SDK_PACKAGE = exports.SDK_VERSION = void 0;
13
+ // ── Version (reported by the orb heartbeat) ───────────────────────────────────
14
+ var version_1 = require("./version");
15
+ Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return version_1.SDK_VERSION; } });
16
+ Object.defineProperty(exports, "SDK_PACKAGE", { enumerable: true, get: function () { return version_1.SDK_PACKAGE; } });
13
17
  // ── Orchestrator ──────────────────────────────────────────────────────────────
14
18
  var AgentController_1 = require("./controller/AgentController");
15
19
  Object.defineProperty(exports, "AgentController", { enumerable: true, get: function () { return AgentController_1.AgentController; } });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SDK version reported by the orb heartbeat (POST /v1/client/orb-seen) so the
3
+ * dashboard can tell the developer when a newer SDK is available.
4
+ *
5
+ * Auto-generated by scripts/sync-sdk-version.mjs from package.json. Do not edit
6
+ * by hand — change package.json `version` and re-run the sync/release script.
7
+ */
8
+ export declare const SDK_VERSION = "0.1.2";
9
+ export declare const SDK_PACKAGE = "@fiodos/web-core";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDK_PACKAGE = exports.SDK_VERSION = void 0;
4
+ /**
5
+ * SDK version reported by the orb heartbeat (POST /v1/client/orb-seen) so the
6
+ * dashboard can tell the developer when a newer SDK is available.
7
+ *
8
+ * Auto-generated by scripts/sync-sdk-version.mjs from package.json. Do not edit
9
+ * by hand — change package.json `version` and re-run the sync/release script.
10
+ */
11
+ exports.SDK_VERSION = '0.1.2';
12
+ exports.SDK_PACKAGE = '@fiodos/web-core';
@@ -1,3 +1,4 @@
1
+ import { SDK_VERSION, SDK_PACKAGE } from '../version.js';
1
2
  /**
2
3
  * Default public Fiodos backend, mirrored from @fiodos/react's DEFAULT_API_URL.
3
4
  * A drop-in that only receives an apiKey talks to this unless apiUrl is given.
@@ -54,7 +55,13 @@ export async function sendOrbSeen(opts) {
54
55
  await fetch(`${baseUrl}/v1/client/orb-seen`, {
55
56
  method: 'POST',
56
57
  headers: { 'Content-Type': 'application/json', 'x-api-key': opts.apiKey },
57
- body: JSON.stringify({ platform: opts.platform ?? detectPlatform() }),
58
+ // sdkVersion/sdkPackage let the dashboard surface an "update available"
59
+ // notice when the running orb is older than the latest published SDK.
60
+ body: JSON.stringify({
61
+ platform: opts.platform ?? detectPlatform(),
62
+ sdkVersion: SDK_VERSION,
63
+ sdkPackage: SDK_PACKAGE,
64
+ }),
58
65
  });
59
66
  }
60
67
  catch {
@@ -7,6 +7,7 @@
7
7
  * reactive wrappers around THIS package, so they share identical agent
8
8
  * behaviour and security. No framework imports live here.
9
9
  */
10
+ export { SDK_VERSION, SDK_PACKAGE } from './version.js';
10
11
  export { AgentController } from './controller/AgentController.js';
11
12
  export type { AgentState, AgentExchange } from './controller/AgentController.js';
12
13
  export { createFiodosAgent } from './dropin/createFiodosAgent.js';
package/dist/esm/index.js CHANGED
@@ -7,6 +7,8 @@
7
7
  * reactive wrappers around THIS package, so they share identical agent
8
8
  * behaviour and security. No framework imports live here.
9
9
  */
10
+ // ── Version (reported by the orb heartbeat) ───────────────────────────────────
11
+ export { SDK_VERSION, SDK_PACKAGE } from './version.js';
10
12
  // ── Orchestrator ──────────────────────────────────────────────────────────────
11
13
  export { AgentController } from './controller/AgentController.js';
12
14
  // ── Drop-in (zero-wiring) ─────────────────────────────────────────────────────
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SDK version reported by the orb heartbeat (POST /v1/client/orb-seen) so the
3
+ * dashboard can tell the developer when a newer SDK is available.
4
+ *
5
+ * Auto-generated by scripts/sync-sdk-version.mjs from package.json. Do not edit
6
+ * by hand — change package.json `version` and re-run the sync/release script.
7
+ */
8
+ export declare const SDK_VERSION = "0.1.2";
9
+ export declare const SDK_PACKAGE = "@fiodos/web-core";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SDK version reported by the orb heartbeat (POST /v1/client/orb-seen) so the
3
+ * dashboard can tell the developer when a newer SDK is available.
4
+ *
5
+ * Auto-generated by scripts/sync-sdk-version.mjs from package.json. Do not edit
6
+ * by hand — change package.json `version` and re-run the sync/release script.
7
+ */
8
+ export const SDK_VERSION = '0.1.2';
9
+ export const SDK_PACKAGE = '@fiodos/web-core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiodos/web-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Framework-agnostic browser layer for the Fiodos agent: a vanilla AgentController (orchestrator), DOM adapters (navigation/voice/storage), HTTP client and decision engine over @fiodos/core. Shared base for @fiodos/vue, @fiodos/svelte and @fiodos/angular (no framework imports).",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -28,7 +28,7 @@
28
28
  "test": "node --import tsx --test test/*.test.ts"
29
29
  },
30
30
  "dependencies": {
31
- "@fiodos/core": "0.1.0"
31
+ "@fiodos/core": "^0.1.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^22.0.0",