@iwsdk/vite-plugin-dev 0.5.3 → 1.0.0-rc.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.
@@ -14,8 +14,18 @@ interface RegisterRuntimeSessionInput {
14
14
  networkUrls?: string[];
15
15
  aiMode?: string;
16
16
  browser?: RuntimeBrowserState;
17
+ browserAutomation?: RuntimeSession['browserAutomation'];
18
+ ownerSessionId?: string;
19
+ }
20
+ export declare class RuntimeSessionOwnershipError extends Error {
21
+ readonly owner: Pick<RuntimeSession, 'pid' | 'sessionId'>;
22
+ readonly code = "runtime_session_owned";
23
+ constructor(owner: Pick<RuntimeSession, 'pid' | 'sessionId'>);
17
24
  }
18
25
  export declare function registerRuntimeSession(input: RegisterRuntimeSessionInput): Promise<RuntimeSession>;
19
- export declare function setRuntimeSessionBrowserState(workspaceRoot: string, browser: RuntimeBrowserState): Promise<RuntimeSession | null>;
20
- export declare function unregisterRuntimeSession(workspaceRoot: string): Promise<void>;
26
+ export declare function setRuntimeSessionBrowserAutomation(workspaceRoot: string, sessionId: string, browserAutomation: NonNullable<RuntimeSession['browserAutomation']>): Promise<RuntimeSession | null>;
27
+ export declare function setRuntimeSessionBrowserState(workspaceRoot: string, sessionId: string, browser: RuntimeBrowserState): Promise<RuntimeSession | null>;
28
+ export declare function unregisterRuntimeSession(workspaceRoot: string, sessionId: string): Promise<void>;
29
+ /** Best-effort owned cleanup for process.exit, where async work is forbidden. */
30
+ export declare function unregisterRuntimeSessionSync(workspaceRoot: string, sessionId: string): void;
21
31
  export {};
package/dist/types.d.ts CHANGED
@@ -69,6 +69,12 @@ export interface WorkspaceOptions {
69
69
  width?: number;
70
70
  height?: number;
71
71
  };
72
+ /**
73
+ * Expose an opt-in loopback CDP connection for `iwsdk browser run`.
74
+ * This is an operator-session capability and is disabled by default.
75
+ * @default false
76
+ */
77
+ browserAutomation?: boolean;
72
78
  }
73
79
  /**
74
80
  * XR emulator configuration
@@ -138,6 +144,15 @@ export interface DevelopmentHttpsOptions {
138
144
  /** Certificate lifetime in days. */
139
145
  ttlDays?: number;
140
146
  }
147
+ export type UIKitMLBundledFontName = 'crimson-text' | 'fira-code' | 'inconsolata' | 'inter' | 'lato' | 'libre-baskerville' | 'merriweather' | 'montserrat' | 'nunito' | 'open-sans' | 'playfair-display' | 'poppins' | 'raleway' | 'roboto' | 'source-code-pro' | 'space-mono' | 'work-sans';
148
+ export interface ProductionBundleOptions {
149
+ /**
150
+ * Additional bundled UIKitML fonts to retain for UI loaded outside the
151
+ * static public directory. Use `'all'` for fully dynamic font selection.
152
+ * Static public UIKitML font usage is detected automatically.
153
+ */
154
+ fonts?: 'all' | UIKitMLBundledFontName[];
155
+ }
141
156
  /**
142
157
  * Main plugin options interface
143
158
  */
@@ -159,6 +174,8 @@ export interface DevPluginOptions {
159
174
  * mode.
160
175
  */
161
176
  workspace?: WorkspaceOptions;
177
+ /** Production feature-gating and dynamic-asset escape hatches. */
178
+ bundle?: ProductionBundleOptions;
162
179
  /**
163
180
  * Time to wait for the managed browser command bridge after launch or
164
181
  * recovery before returning a not-ready status.
@@ -213,6 +230,7 @@ export interface ProcessedDevOptions {
213
230
  open: boolean;
214
231
  headless: boolean;
215
232
  devUI: boolean;
233
+ browserAutomation: boolean;
216
234
  viewport: {
217
235
  width: number;
218
236
  height: number;
@@ -228,6 +246,7 @@ export interface ProcessedDevOptions {
228
246
  verbose: boolean;
229
247
  userAgentException?: RegExp | string;
230
248
  iwer: boolean;
249
+ nativeXRControl?: boolean;
231
250
  }
232
251
  /** @deprecated Use `ProcessedDevOptions` instead */
233
252
  export type ProcessedIWEROptions = ProcessedDevOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iwsdk/vite-plugin-dev",
3
- "version": "0.5.3",
3
+ "version": "1.0.0-rc.1",
4
4
  "type": "module",
5
5
  "description": "Vite plugin for IWSDK development — XR emulation, AI agent tooling, and Playwright browser",
6
6
  "main": "dist/index.js",
@@ -44,25 +44,25 @@
44
44
  "dependencies": {
45
45
  "@drawcall/uikitml": "0.1.8",
46
46
  "@iwer/devui": "^2.3.0",
47
- "@iwer/sem": "^2.3.0",
48
47
  "@preact/signals-core": "^1.12.1",
49
48
  "@vitejs/plugin-basic-ssl": "^2.3.0",
50
- "iwer": "^2.3.0",
51
49
  "lucide": "^0.468.0",
52
50
  "open": "^10.2.0",
53
51
  "playwright": "^1.58.2",
54
52
  "preact": "^10.29.7",
55
- "sharp": "^0.35.3",
53
+ "sharp": "^0.35.4",
56
54
  "three": "npm:super-three@0.181.0",
57
55
  "three-viewport-gizmo": "^2.2.0",
58
56
  "ws": "^8.21.1",
59
- "@iwsdk/core": "0.5.3",
60
- "@iwsdk/scene-composition": "0.5.3"
57
+ "@iwsdk/core": "1.0.0-rc.1",
58
+ "@iwsdk/scene-composition": "1.0.0-rc.1"
61
59
  },
62
60
  "devDependencies": {
61
+ "@iwer/sem": "^2.3.0",
63
62
  "@types/ws": "^8.5.13",
63
+ "iwer": "^2.4.0",
64
64
  "vitest": "^4.1.10",
65
- "@iwsdk/cli": "0.5.3"
65
+ "@iwsdk/cli": "1.0.0-rc.1"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "vite": "^7.0.0"
@@ -71,12 +71,12 @@
71
71
  "node": ">=20.19.0 <21.0.0-0 || >=22.12.0 <23.0.0-0 || >=24.0.0"
72
72
  },
73
73
  "scripts": {
74
- "prebuild": "corepack pnpm@10.18.3 --filter @iwsdk/cli build",
75
- "prebuild:plugin": "corepack pnpm@10.18.3 --filter @iwsdk/cli build",
74
+ "prebuild": "npm --prefix ../cli run build",
75
+ "prebuild:plugin": "npm --prefix ../cli run build",
76
76
  "build": "rollup -c rollup.injection.config.js && rollup -c rollup.config.js",
77
77
  "build:plugin": "rollup -c rollup.config.js",
78
78
  "build:injection": "rollup -c rollup.injection.config.js",
79
- "test": "corepack pnpm@10.18.3 --filter @iwsdk/scene-composition build && corepack pnpm@10.18.3 --filter @iwsdk/core build && corepack pnpm@10.18.3 --filter @iwsdk/cli build && corepack pnpm@10.18.3 run build:injection && rollup -c rollup.config.js && vitest run",
79
+ "test": "npm --prefix ../scene-composition run build && npm --prefix ../core run build && npm --prefix ../cli run build && npm run build:injection && rollup -c rollup.config.js && vitest run",
80
80
  "test:watch": "vitest",
81
81
  "dev": "rollup -c --watch",
82
82
  "clean": "rm -rf dist"