@ikenga/contract 0.10.0 → 0.11.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.
- package/dist/browser.d.ts +30 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +23 -0
- package/dist/browser.js.map +1 -1
- package/dist/manifest.d.ts +125 -96
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +6 -0
- package/dist/manifest.js.map +1 -1
- package/dist/registry.d.ts +260 -240
- package/dist/registry.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/browser.ts +28 -0
- package/src/manifest.ts +6 -0
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAIlD;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,0DAA0D;;;;;;;;EAE1D,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB;IAC3B,4BAA4B;;IAE5B,iDAAiD;;IAEjD,yEAAyE;;IAEzE,2DAA2D;;IAE3D,mFAAmF;;IAEnF,4DAA4D
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAIlD;;;;G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,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
package/package.json
CHANGED
package/src/browser.ts
CHANGED
|
@@ -43,6 +43,21 @@ export const BrowserRefSchema = z
|
|
|
43
43
|
|
|
44
44
|
export type BrowserRef = z.infer<typeof BrowserRefSchema>;
|
|
45
45
|
|
|
46
|
+
// ---------- Engine ----------
|
|
47
|
+
//
|
|
48
|
+
// Which underlying browser engine backs a pane. `webkit` (default) is the
|
|
49
|
+
// in-shell child-webview (WebKitGTK on Linux / WKWebView / WebView2). `chrome`
|
|
50
|
+
// is "Managed mode": the shell launches the user's installed Google Chrome with
|
|
51
|
+
// a dedicated `--user-data-dir` + `--remote-debugging-port` and drives it over
|
|
52
|
+
// CDP. The engine is chosen at `open()`; subsequent actions address the pane by
|
|
53
|
+
// id and inherit its engine. See plans/chrome-pkg/01-plan.md §Architecture.
|
|
54
|
+
|
|
55
|
+
export const BROWSER_ENGINES = ['webkit', 'chrome'] as const;
|
|
56
|
+
|
|
57
|
+
export const BrowserEngineSchema = z.enum(BROWSER_ENGINES);
|
|
58
|
+
|
|
59
|
+
export type BrowserEngine = z.infer<typeof BrowserEngineSchema>;
|
|
60
|
+
|
|
46
61
|
// ---------- Snapshot ----------
|
|
47
62
|
//
|
|
48
63
|
// Mirrors the shape of Iyke's `DomResult` so models can move between the
|
|
@@ -119,8 +134,17 @@ export const BrowserOpenInputSchema = z
|
|
|
119
134
|
* Optional initial rect in main-window-client coordinates. Omitted when
|
|
120
135
|
* the FE owns layout (the kernel will refuse without a rect; the MCP
|
|
121
136
|
* layer is expected to supply a sane default if the caller didn't).
|
|
137
|
+
*
|
|
138
|
+
* Ignored for `engine: "chrome"` — Managed Chrome renders in its own OS
|
|
139
|
+
* window, not a shell pane.
|
|
122
140
|
*/
|
|
123
141
|
rect: RectSchema.optional(),
|
|
142
|
+
/**
|
|
143
|
+
* Which engine backs this pane. Defaults to `"webkit"` (the in-shell
|
|
144
|
+
* child-webview). `"chrome"` is Managed mode (installed Chrome over CDP).
|
|
145
|
+
* The pkg must declare the engine in `capabilities.webview.engines`.
|
|
146
|
+
*/
|
|
147
|
+
engine: BrowserEngineSchema.default('webkit'),
|
|
124
148
|
})
|
|
125
149
|
.refine((v) => !(v.partition && v.session), {
|
|
126
150
|
message: 'pass at most one of `partition` / `session`',
|
|
@@ -132,6 +156,8 @@ export const BrowserOpenResultSchema = z.object({
|
|
|
132
156
|
id: BrowserPaneIdSchema,
|
|
133
157
|
url: z.string(),
|
|
134
158
|
partition: z.string(),
|
|
159
|
+
/** The resolved engine backing this pane (`"webkit"` if absent, for back-compat). */
|
|
160
|
+
engine: BrowserEngineSchema.default('webkit'),
|
|
135
161
|
});
|
|
136
162
|
|
|
137
163
|
export type BrowserOpenResult = z.infer<typeof BrowserOpenResultSchema>;
|
|
@@ -147,6 +173,8 @@ export const BrowserListEntrySchema = z.object({
|
|
|
147
173
|
url: z.string(),
|
|
148
174
|
partition: z.string(),
|
|
149
175
|
focused: z.boolean(),
|
|
176
|
+
/** Which engine backs this pane (`"webkit"` if absent, for back-compat). */
|
|
177
|
+
engine: BrowserEngineSchema.default('webkit'),
|
|
150
178
|
});
|
|
151
179
|
|
|
152
180
|
export type BrowserListEntry = z.infer<typeof BrowserListEntrySchema>;
|
package/src/manifest.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import { EngineProvidesSchema } from './engine/index.js';
|
|
13
|
+
import { BrowserEngineSchema } from './browser.js';
|
|
13
14
|
|
|
14
15
|
// v2 (WP-05): added capabilities.sqlite + permissions["sqlite.tables"];
|
|
15
16
|
// permissions["supabase.tables"] kept as a compat alias for api=1 manifests.
|
|
@@ -173,6 +174,11 @@ export const WebviewCapabilitySchema = z.object({
|
|
|
173
174
|
child_webviews: z.boolean().default(false),
|
|
174
175
|
/** Named cookie/data partitions; empty = the implicit "default" partition. */
|
|
175
176
|
partitions: z.array(z.string()).default([]),
|
|
177
|
+
/** Browser engines this pkg may open panes with. `"webkit"` is the in-shell
|
|
178
|
+
* child-webview; `"chrome"` is Managed mode (installed Chrome over CDP, its
|
|
179
|
+
* own OS window). Defaults to `["webkit"]` so existing manifests are
|
|
180
|
+
* unchanged. Mirrors `engines` in `WebviewCapability` (manifest.rs). */
|
|
181
|
+
engines: z.array(BrowserEngineSchema).default(['webkit']),
|
|
176
182
|
});
|
|
177
183
|
export type WebviewCapability = z.infer<typeof WebviewCapabilitySchema>;
|
|
178
184
|
|