@pagelines/sdk 1.0.482 → 1.0.484

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.
@@ -89,6 +89,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
89
89
  createdAt?: string | undefined;
90
90
  updatedAt?: string | undefined;
91
91
  isPrimary?: boolean | undefined;
92
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
93
+ errorReason?: string | undefined;
94
+ uptimeSeconds?: number | undefined;
92
95
  }) => any;
93
96
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
94
97
  onCreated?: ((agent: {
@@ -177,6 +180,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
177
180
  createdAt?: string | undefined;
178
181
  updatedAt?: string | undefined;
179
182
  isPrimary?: boolean | undefined;
183
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
184
+ errorReason?: string | undefined;
185
+ uptimeSeconds?: number | undefined;
180
186
  }) => any) | undefined;
181
187
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
182
188
  export default _default;
@@ -0,0 +1,33 @@
1
+ type JsonSchema = Record<string, unknown>;
2
+ /**
3
+ * Wire contract version. Bump when the shape of the document changes
4
+ * (new top-level field, semantic change to existing one). Consumers
5
+ * SHOULD reject contracts whose `version` they don't understand.
6
+ *
7
+ * v1: initial — schemas keyed by name.
8
+ */
9
+ export declare const CONTRACT_VERSION = "1.0.0";
10
+ export interface WireContract {
11
+ version: string;
12
+ generatedAt: string;
13
+ /**
14
+ * Each entry is a self-contained JSON Schema (Draft 2020-12 by default
15
+ * via Zod 4's native generator). Resolvable in isolation so a consumer
16
+ * can pluck one schema without dragging the rest.
17
+ */
18
+ schemas: Record<string, JsonSchema>;
19
+ }
20
+ /**
21
+ * Build the wire contract from the canonical Zod source. Pure: no I/O,
22
+ * no clock except the `now` arg (defaults to `new Date()` for callers
23
+ * that don't care about reproducible output).
24
+ */
25
+ export declare function buildContract(args?: {
26
+ now?: Date;
27
+ }): WireContract;
28
+ /**
29
+ * Stable serialization for snapshot diffing. Keys sorted at every level so
30
+ * Zod's internal map ordering doesn't produce spurious diffs in CI.
31
+ */
32
+ export declare function serializeContract(contract: WireContract): string;
33
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Public entry point for the wire contract pipeline.
3
+ *
4
+ * Server uses `buildContract()` to serve `GET /api/_contract.json` and to
5
+ * regenerate the snapshot at `packages/sdk/contract.json` for CI diffing.
6
+ *
7
+ * Consumers can also import the live document directly via the npm SDK
8
+ * once it's published — `import { buildContract } from '@pagelines/sdk/contract'`.
9
+ */
10
+ export { buildContract, CONTRACT_VERSION, serializeContract } from './build';
11
+ export type { WireContract } from './build';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -98,5 +98,8 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
98
98
  createdAt?: string | undefined;
99
99
  updatedAt?: string | undefined;
100
100
  isPrimary?: boolean | undefined;
101
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
102
+ errorReason?: string | undefined;
103
+ uptimeSeconds?: number | undefined;
101
104
  }> | undefined;
102
105
  export { staticAgents } from '@/modules/agent/static/data';
@@ -93,6 +93,9 @@ export declare function useWidgetState(props: {
93
93
  createdAt?: string | undefined;
94
94
  updatedAt?: string | undefined;
95
95
  isPrimary?: boolean | undefined;
96
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
97
+ errorReason?: string | undefined;
98
+ uptimeSeconds?: number | undefined;
96
99
  } | undefined, {
97
100
  agentId?: string | undefined;
98
101
  handle?: string | undefined;
@@ -179,6 +182,9 @@ export declare function useWidgetState(props: {
179
182
  createdAt?: string | undefined;
180
183
  updatedAt?: string | undefined;
181
184
  isPrimary?: boolean | undefined;
185
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
186
+ errorReason?: string | undefined;
187
+ uptimeSeconds?: number | undefined;
182
188
  } | {
183
189
  agentId?: string | undefined;
184
190
  handle?: string | undefined;
@@ -265,6 +271,9 @@ export declare function useWidgetState(props: {
265
271
  createdAt?: string | undefined;
266
272
  updatedAt?: string | undefined;
267
273
  isPrimary?: boolean | undefined;
274
+ liveStatus?: "error" | "stopped" | "unknown" | "running" | "starting" | "stopping" | "warming" | "never_started" | "unreachable" | "not-deployed" | undefined;
275
+ errorReason?: string | undefined;
276
+ uptimeSeconds?: number | undefined;
268
277
  } | undefined>;
269
278
  currentContext: import('vue').Ref<string | undefined, string | undefined>;
270
279
  currentFirstMessage: import('vue').Ref<string | undefined, string | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagelines/sdk",
3
- "version": "1.0.482",
3
+ "version": "1.0.484",
4
4
  "description": "PageLines SDK for agent management, auth, and billing",
5
5
  "type": "module",
6
6
  "main": "./dist/sdk.js",
@@ -27,6 +27,10 @@
27
27
  "types": "./constants/socialPlatforms.ts",
28
28
  "import": "./dist/constants/socialPlatforms.js"
29
29
  },
30
+ "./contract": {
31
+ "types": "./contract/index.ts",
32
+ "import": "./contract/index.ts"
33
+ },
30
34
  "./sdk.css": {
31
35
  "import": "./dist/sdk.css",
32
36
  "types": "./sdk.css.d.ts"
@@ -87,6 +91,8 @@
87
91
  "typecheck": "vue-tsc --noEmit",
88
92
  "test": "vitest run",
89
93
  "test:unit": "vitest run test/api.test.ts",
94
+ "contract:regen": "tsx contract/regenerate.ts",
95
+ "contract:check": "vitest run contract/test/snapshot.unit.test.ts",
90
96
  "test:build": "pnpm build && vitest run test/build.test.ts",
91
97
  "test:watch": "vitest",
92
98
  "lint": "eslint . --ext .ts,.vue"