camou 0.1.1 → 0.2.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/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is loosely based on Keep a Changelog and uses semantic versioning.
6
6
 
7
+ ## [0.2.0] - 2026-03-15
8
+
9
+ ### Added
10
+
11
+ - Added a public Node API so `camou` can be used from scripts, not just the CLI.
12
+ - Added `launchCamoufox()`, `launchCamoufoxContext()`, and `withCamoufox()` for Playwright-based programmatic control.
13
+ - Exported browser management helpers from the package root for script usage.
14
+
15
+ ### Changed
16
+
17
+ - Documented the new Node script workflow in `README.md`.
18
+ - Updated the `camou` skill to explain when to use the CLI vs the Node API and how to drive Camou from scripts.
19
+
7
20
  ## [0.1.1] - 2026-03-15
8
21
 
9
22
  ### Added
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Camoucli
2
2
 
3
- Camoucli is a local-first CLI and background daemon for driving Camoufox through Playwright, without depending on the Camoufox Python SDK.
3
+ Camoucli is a local-first CLI and background daemon for driving [Camoufox](https://github.com/daijro/camoufox) through Playwright, without depending on the Camoufox Python SDK.
4
4
 
5
5
  - npm package: `camou`
6
6
  - installed command: `camou`
@@ -14,6 +14,8 @@ Camou is built for agent-style browser workflows:
14
14
  - interact through stable `@eN` refs from text snapshots
15
15
  - install, switch, and diagnose Camoufox browser versions from the CLI
16
16
 
17
+ Camou takes strong inspiration from [vercel-labs/agent-browser](https://github.com/vercel-labs/agent-browser) and [BUNotesAI/agent-browser-session](https://github.com/BUNotesAI/agent-browser-session), but is built for the Camoufox + Playwright Firefox path and persistent local daemon workflows.
18
+
17
19
  ## Why Camou
18
20
 
19
21
  | Feature | Why it matters |
@@ -60,6 +62,28 @@ Notes:
60
62
  - `camou install` runs a quick headless launch probe after download.
61
63
  - `camou use <version>` runs the same compatibility check when you switch versions.
62
64
 
65
+ ## Install The Skill
66
+
67
+ Camou also ships an agent skill that can be installed through the open skills ecosystem at [skills.sh](https://skills.sh).
68
+
69
+ Install it from this repo:
70
+
71
+ ```bash
72
+ npx skills add txchen/camoucli --skill camou
73
+ ```
74
+
75
+ Useful variants:
76
+
77
+ ```bash
78
+ # Preview available skills in the repo
79
+ npx skills add txchen/camoucli --list
80
+
81
+ # Install globally for a specific agent
82
+ npx skills add txchen/camoucli --skill camou -g -a opencode
83
+ ```
84
+
85
+ The skill teaches agents the recommended Camou workflow: `open -> snapshot -i -> interact with @refs -> re-snapshot`, plus session/tab/version troubleshooting guidance.
86
+
63
87
  ## Quick Start
64
88
 
65
89
  ```bash
@@ -82,6 +106,55 @@ Important ref rule:
82
106
 
83
107
  - Re-run `snapshot` after navigation or major page changes. Refs are per tab and are invalidated on navigation or a new snapshot.
84
108
 
109
+ ## Use From Node Scripts
110
+
111
+ Camou can also be used as a Node library, not just a CLI.
112
+
113
+ The programmatic API is Playwright-based: it launches Camoufox for you and gives you a real Playwright `BrowserContext`, similar in spirit to the Camoufox Python wrapper.
114
+
115
+ ```ts
116
+ import { launchCamoufox } from 'camou';
117
+
118
+ const camou = await launchCamoufox({
119
+ session: 'script',
120
+ headless: false,
121
+ });
122
+
123
+ const page = await camou.context.newPage();
124
+ await page.goto('https://example.com');
125
+ console.log(await page.title());
126
+
127
+ await camou.close();
128
+ ```
129
+
130
+ If you prefer a scoped helper:
131
+
132
+ ```ts
133
+ import { withCamoufox } from 'camou';
134
+
135
+ await withCamoufox({ session: 'script' }, async ({ context }) => {
136
+ const page = await context.newPage();
137
+ await page.goto('https://example.com');
138
+ console.log(await page.title());
139
+ });
140
+ ```
141
+
142
+ Useful exported helpers include:
143
+
144
+ - `launchCamoufox()`
145
+ - `launchCamoufoxContext()`
146
+ - `withCamoufox()`
147
+ - `installCamoufox()`
148
+ - `listInstalledBrowsers()`
149
+ - `setCurrentBrowser()`
150
+ - `doctorCamoufox()`
151
+
152
+ Notes:
153
+
154
+ - install a browser first with `camou install` or `installCamoufox()`
155
+ - use a dedicated `session` name in scripts if you do not want to share the default CLI profile
156
+ - the returned context is a normal Playwright context, so you can use standard Playwright APIs from there
157
+
85
158
  ## Recommended Agent Workflow
86
159
 
87
160
  For agents and automation loops, this is the happy path:
@@ -356,3 +429,10 @@ Local development commands:
356
429
  npm run dev -- --help
357
430
  npm run dev:daemon
358
431
  ```
432
+
433
+ ## Acknowledgements
434
+
435
+ Camoucli learned a lot from these projects:
436
+
437
+ - [vercel-labs/agent-browser](https://github.com/vercel-labs/agent-browser) for the agent-oriented command workflow and skill ecosystem patterns
438
+ - [BUNotesAI/agent-browser-session](https://github.com/BUNotesAI/agent-browser-session) for persistent-session and named-tab ergonomics
package/dist/api.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import type { BrowserContext, Page } from 'playwright-core';
2
+ import type { LaunchInput, ResolvedLaunchConfig } from './camoufox/config.js';
3
+ import { type CamoucliPaths } from './state/paths.js';
4
+ export interface LaunchCamoufoxOptions extends LaunchInput {
5
+ session?: string | undefined;
6
+ paths?: CamoucliPaths | undefined;
7
+ verbose?: boolean | undefined;
8
+ }
9
+ export declare class CamoufoxSession {
10
+ readonly context: BrowserContext;
11
+ readonly sessionName: string;
12
+ readonly browserVersion: string;
13
+ readonly executablePath: string;
14
+ readonly profileDir: string;
15
+ readonly downloadsDir: string;
16
+ readonly artifactsDir: string;
17
+ readonly resolvedConfig: ResolvedLaunchConfig;
18
+ constructor(input: {
19
+ context: BrowserContext;
20
+ sessionName: string;
21
+ browserVersion: string;
22
+ executablePath: string;
23
+ profileDir: string;
24
+ downloadsDir: string;
25
+ artifactsDir: string;
26
+ resolvedConfig: ResolvedLaunchConfig;
27
+ });
28
+ newPage(): Promise<Page>;
29
+ pages(): Page[];
30
+ close(): Promise<void>;
31
+ }
32
+ export declare function launchCamoufox(options?: LaunchCamoufoxOptions): Promise<CamoufoxSession>;
33
+ export declare function launchCamoufoxContext(options?: LaunchCamoufoxOptions): Promise<BrowserContext>;
34
+ export declare function withCamoufox<T>(options: LaunchCamoufoxOptions, callback: (session: CamoufoxSession) => Promise<T> | T): Promise<T>;
package/dist/api.js ADDED
@@ -0,0 +1,73 @@
1
+ import { launchPersistentCamoufox } from './camoufox/launcher.js';
2
+ import { ensureBasePaths, getCamoucliPaths } from './state/paths.js';
3
+ import { Logger } from './util/log.js';
4
+ export class CamoufoxSession {
5
+ context;
6
+ sessionName;
7
+ browserVersion;
8
+ executablePath;
9
+ profileDir;
10
+ downloadsDir;
11
+ artifactsDir;
12
+ resolvedConfig;
13
+ constructor(input) {
14
+ this.context = input.context;
15
+ this.sessionName = input.sessionName;
16
+ this.browserVersion = input.browserVersion;
17
+ this.executablePath = input.executablePath;
18
+ this.profileDir = input.profileDir;
19
+ this.downloadsDir = input.downloadsDir;
20
+ this.artifactsDir = input.artifactsDir;
21
+ this.resolvedConfig = input.resolvedConfig;
22
+ }
23
+ async newPage() {
24
+ return this.context.newPage();
25
+ }
26
+ pages() {
27
+ return this.context.pages();
28
+ }
29
+ async close() {
30
+ await this.context.close();
31
+ }
32
+ }
33
+ function createApiLogger(verbose = false) {
34
+ if (!verbose) {
35
+ return undefined;
36
+ }
37
+ return new Logger({
38
+ name: 'api',
39
+ verbose: true,
40
+ mirrorToStderr: true,
41
+ });
42
+ }
43
+ export async function launchCamoufox(options = {}) {
44
+ const sessionName = options.session ?? 'default';
45
+ const paths = options.paths ?? getCamoucliPaths();
46
+ await ensureBasePaths(paths);
47
+ const logger = createApiLogger(options.verbose);
48
+ const launched = await launchPersistentCamoufox(paths, sessionName, options, logger);
49
+ return new CamoufoxSession({
50
+ context: launched.context,
51
+ sessionName,
52
+ browserVersion: launched.browserVersion,
53
+ executablePath: launched.installPath,
54
+ profileDir: launched.sessionPaths.profileDir,
55
+ downloadsDir: launched.sessionPaths.downloadsDir,
56
+ artifactsDir: launched.sessionPaths.artifactsDir,
57
+ resolvedConfig: launched.resolvedConfig,
58
+ });
59
+ }
60
+ export async function launchCamoufoxContext(options = {}) {
61
+ const session = await launchCamoufox(options);
62
+ return session.context;
63
+ }
64
+ export async function withCamoufox(options, callback) {
65
+ const session = await launchCamoufox(options);
66
+ try {
67
+ return await callback(session);
68
+ }
69
+ finally {
70
+ await session.close();
71
+ }
72
+ }
73
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ export { CamoufoxSession, launchCamoufox, launchCamoufoxContext, withCamoufox, type LaunchCamoufoxOptions } from './api.js';
2
+ export { doctorCamoufox, inspectCamoufoxInstall, installCamoufox, removeCamoufox, resolveRelease, type CamoufoxInstallInspection, type ResolvedRelease, } from './camoufox/installer.js';
3
+ export { listInstalledBrowsers, loadBrowserRegistry, requireInstalledBrowser, resolveInstalledBrowser, setCurrentBrowser, setInstalledBrowser, type BrowserInstallListing, type BrowserInstallRecord, type BrowserRegistry, } from './camoufox/registry.js';
4
+ export { listCamoufoxPresets, resolveCamoufoxPresets, type CamoufoxPresetDefinition, type ResolvedPresetBundle } from './camoufox/presets.js';
5
+ export { getCamoucliPaths, ensureBasePaths, ensureSessionPaths, getSessionPaths, type CamoucliPaths, type SessionPaths } from './state/paths.js';
6
+ export { BrowserNotInstalledError, CamoucliError, DaemonStartError, InstallError, IpcError, RefNotFoundError, SessionError, UnsupportedPlatformError, ValidationError, getExitCode, isCamoucliError, toErrorPayload, type ErrorPayload, } from './util/errors.js';
7
+ export type { LaunchInput, ResolvedLaunchConfig } from './camoufox/config.js';
8
+ export type { BrowserLaunchProbe, LaunchedSession } from './camoufox/launcher.js';
9
+ export type { BrowserContext, Page } from 'playwright-core';
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export { CamoufoxSession, launchCamoufox, launchCamoufoxContext, withCamoufox } from './api.js';
2
+ export { doctorCamoufox, inspectCamoufoxInstall, installCamoufox, removeCamoufox, resolveRelease, } from './camoufox/installer.js';
3
+ export { listInstalledBrowsers, loadBrowserRegistry, requireInstalledBrowser, resolveInstalledBrowser, setCurrentBrowser, setInstalledBrowser, } from './camoufox/registry.js';
4
+ export { listCamoufoxPresets, resolveCamoufoxPresets } from './camoufox/presets.js';
5
+ export { getCamoucliPaths, ensureBasePaths, ensureSessionPaths, getSessionPaths } from './state/paths.js';
6
+ export { BrowserNotInstalledError, CamoucliError, DaemonStartError, InstallError, IpcError, RefNotFoundError, SessionError, UnsupportedPlatformError, ValidationError, getExitCode, isCamoucliError, toErrorPayload, } from './util/errors.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,qBAAqB,EAAE,YAAY,EAA8B,MAAM,UAAU,CAAC;AAC5H,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,cAAc,GAGf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GAIpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAA4D,MAAM,uBAAuB,CAAC;AAC9I,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAyC,MAAM,kBAAkB,CAAC;AACjJ,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,GAEf,MAAM,kBAAkB,CAAC"}
@@ -30,10 +30,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
30
30
  action: z.ZodLiteral<"open">;
31
31
  url: z.ZodString;
32
32
  }, "strip", z.ZodTypeAny, {
33
+ session: string;
33
34
  tabName: string;
34
35
  url: string;
35
36
  id: string;
36
- session: string;
37
37
  action: "open";
38
38
  headless?: boolean | undefined;
39
39
  configPath?: string | undefined;
@@ -48,10 +48,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
48
48
  height?: number | undefined;
49
49
  browser?: string | undefined;
50
50
  }, {
51
+ session: string;
51
52
  tabName: string;
52
53
  url: string;
53
54
  id: string;
54
- session: string;
55
55
  action: "open";
56
56
  headless?: boolean | undefined;
57
57
  configPath?: string | undefined;
@@ -86,10 +86,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
86
86
  action: z.ZodLiteral<"snapshot">;
87
87
  interactive: z.ZodDefault<z.ZodBoolean>;
88
88
  }, "strip", z.ZodTypeAny, {
89
+ session: string;
89
90
  interactive: boolean;
90
91
  tabName: string;
91
92
  id: string;
92
- session: string;
93
93
  action: "snapshot";
94
94
  headless?: boolean | undefined;
95
95
  configPath?: string | undefined;
@@ -104,9 +104,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
104
104
  height?: number | undefined;
105
105
  browser?: string | undefined;
106
106
  }, {
107
+ session: string;
107
108
  tabName: string;
108
109
  id: string;
109
- session: string;
110
110
  action: "snapshot";
111
111
  headless?: boolean | undefined;
112
112
  configPath?: string | undefined;
@@ -142,10 +142,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
142
142
  action: z.ZodLiteral<"click">;
143
143
  target: z.ZodString;
144
144
  }, "strip", z.ZodTypeAny, {
145
+ session: string;
145
146
  tabName: string;
146
147
  target: string;
147
148
  id: string;
148
- session: string;
149
149
  action: "click";
150
150
  headless?: boolean | undefined;
151
151
  configPath?: string | undefined;
@@ -160,10 +160,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
160
160
  height?: number | undefined;
161
161
  browser?: string | undefined;
162
162
  }, {
163
+ session: string;
163
164
  tabName: string;
164
165
  target: string;
165
166
  id: string;
166
- session: string;
167
167
  action: "click";
168
168
  headless?: boolean | undefined;
169
169
  configPath?: string | undefined;
@@ -199,11 +199,11 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
199
199
  target: z.ZodString;
200
200
  text: z.ZodString;
201
201
  }, "strip", z.ZodTypeAny, {
202
+ session: string;
202
203
  text: string;
203
204
  tabName: string;
204
205
  target: string;
205
206
  id: string;
206
- session: string;
207
207
  action: "fill";
208
208
  headless?: boolean | undefined;
209
209
  configPath?: string | undefined;
@@ -218,11 +218,11 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
218
218
  height?: number | undefined;
219
219
  browser?: string | undefined;
220
220
  }, {
221
+ session: string;
221
222
  text: string;
222
223
  tabName: string;
223
224
  target: string;
224
225
  id: string;
225
- session: string;
226
226
  action: "fill";
227
227
  headless?: boolean | undefined;
228
228
  configPath?: string | undefined;
@@ -258,9 +258,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
258
258
  key: z.ZodString;
259
259
  }, "strip", z.ZodTypeAny, {
260
260
  key: string;
261
+ session: string;
261
262
  tabName: string;
262
263
  id: string;
263
- session: string;
264
264
  action: "press";
265
265
  headless?: boolean | undefined;
266
266
  configPath?: string | undefined;
@@ -276,9 +276,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
276
276
  browser?: string | undefined;
277
277
  }, {
278
278
  key: string;
279
+ session: string;
279
280
  tabName: string;
280
281
  id: string;
281
- session: string;
282
282
  action: "press";
283
283
  headless?: boolean | undefined;
284
284
  configPath?: string | undefined;
@@ -313,9 +313,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
313
313
  action: z.ZodLiteral<"screenshot">;
314
314
  path: z.ZodOptional<z.ZodString>;
315
315
  }, "strip", z.ZodTypeAny, {
316
+ session: string;
316
317
  tabName: string;
317
318
  id: string;
318
- session: string;
319
319
  action: "screenshot";
320
320
  path?: string | undefined;
321
321
  headless?: boolean | undefined;
@@ -331,9 +331,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
331
331
  height?: number | undefined;
332
332
  browser?: string | undefined;
333
333
  }, {
334
+ session: string;
334
335
  tabName: string;
335
336
  id: string;
336
- session: string;
337
337
  action: "screenshot";
338
338
  path?: string | undefined;
339
339
  headless?: boolean | undefined;
@@ -368,9 +368,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
368
368
  } & {
369
369
  action: z.ZodLiteral<"get.url">;
370
370
  }, "strip", z.ZodTypeAny, {
371
+ session: string;
371
372
  tabName: string;
372
373
  id: string;
373
- session: string;
374
374
  action: "get.url";
375
375
  headless?: boolean | undefined;
376
376
  configPath?: string | undefined;
@@ -385,9 +385,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
385
385
  height?: number | undefined;
386
386
  browser?: string | undefined;
387
387
  }, {
388
+ session: string;
388
389
  tabName: string;
389
390
  id: string;
390
- session: string;
391
391
  action: "get.url";
392
392
  headless?: boolean | undefined;
393
393
  configPath?: string | undefined;
@@ -421,9 +421,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
421
421
  } & {
422
422
  action: z.ZodLiteral<"get.title">;
423
423
  }, "strip", z.ZodTypeAny, {
424
+ session: string;
424
425
  tabName: string;
425
426
  id: string;
426
- session: string;
427
427
  action: "get.title";
428
428
  headless?: boolean | undefined;
429
429
  configPath?: string | undefined;
@@ -438,9 +438,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
438
438
  height?: number | undefined;
439
439
  browser?: string | undefined;
440
440
  }, {
441
+ session: string;
441
442
  tabName: string;
442
443
  id: string;
443
- session: string;
444
444
  action: "get.title";
445
445
  headless?: boolean | undefined;
446
446
  configPath?: string | undefined;
@@ -475,10 +475,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
475
475
  action: z.ZodLiteral<"get.text">;
476
476
  target: z.ZodString;
477
477
  }, "strip", z.ZodTypeAny, {
478
+ session: string;
478
479
  tabName: string;
479
480
  target: string;
480
481
  id: string;
481
- session: string;
482
482
  action: "get.text";
483
483
  headless?: boolean | undefined;
484
484
  configPath?: string | undefined;
@@ -493,10 +493,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
493
493
  height?: number | undefined;
494
494
  browser?: string | undefined;
495
495
  }, {
496
+ session: string;
496
497
  tabName: string;
497
498
  target: string;
498
499
  id: string;
499
- session: string;
500
500
  action: "get.text";
501
501
  headless?: boolean | undefined;
502
502
  configPath?: string | undefined;
@@ -532,10 +532,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
532
532
  target: z.ZodString;
533
533
  timeoutMs: z.ZodOptional<z.ZodNumber>;
534
534
  }, "strip", z.ZodTypeAny, {
535
+ session: string;
535
536
  tabName: string;
536
537
  target: string;
537
538
  id: string;
538
- session: string;
539
539
  action: "wait";
540
540
  headless?: boolean | undefined;
541
541
  configPath?: string | undefined;
@@ -551,10 +551,10 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
551
551
  browser?: string | undefined;
552
552
  timeoutMs?: number | undefined;
553
553
  }, {
554
+ session: string;
554
555
  tabName: string;
555
556
  target: string;
556
557
  id: string;
557
- session: string;
558
558
  action: "wait";
559
559
  headless?: boolean | undefined;
560
560
  configPath?: string | undefined;
@@ -583,24 +583,24 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
583
583
  action: z.ZodLiteral<"session.stop">;
584
584
  session: z.ZodString;
585
585
  }, "strip", z.ZodTypeAny, {
586
- id: string;
587
586
  session: string;
587
+ id: string;
588
588
  action: "session.stop";
589
589
  }, {
590
- id: string;
591
590
  session: string;
591
+ id: string;
592
592
  action: "session.stop";
593
593
  }>, z.ZodObject<{
594
594
  id: z.ZodString;
595
595
  action: z.ZodLiteral<"tab.list">;
596
596
  session: z.ZodString;
597
597
  }, "strip", z.ZodTypeAny, {
598
- id: string;
599
598
  session: string;
599
+ id: string;
600
600
  action: "tab.list";
601
601
  }, {
602
- id: string;
603
602
  session: string;
603
+ id: string;
604
604
  action: "tab.list";
605
605
  }>, z.ZodObject<{
606
606
  headless: z.ZodOptional<z.ZodBoolean>;
@@ -623,9 +623,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
623
623
  action: z.ZodLiteral<"tab.new">;
624
624
  url: z.ZodOptional<z.ZodString>;
625
625
  }, "strip", z.ZodTypeAny, {
626
+ session: string;
626
627
  tabName: string;
627
628
  id: string;
628
- session: string;
629
629
  action: "tab.new";
630
630
  headless?: boolean | undefined;
631
631
  configPath?: string | undefined;
@@ -641,9 +641,9 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
641
641
  browser?: string | undefined;
642
642
  url?: string | undefined;
643
643
  }, {
644
+ session: string;
644
645
  tabName: string;
645
646
  id: string;
646
- session: string;
647
647
  action: "tab.new";
648
648
  headless?: boolean | undefined;
649
649
  configPath?: string | undefined;
@@ -664,14 +664,14 @@ export declare const daemonRequestSchema: z.ZodDiscriminatedUnion<"action", [z.Z
664
664
  session: z.ZodString;
665
665
  target: z.ZodString;
666
666
  }, "strip", z.ZodTypeAny, {
667
+ session: string;
667
668
  target: string;
668
669
  id: string;
669
- session: string;
670
670
  action: "tab.close";
671
671
  }, {
672
+ session: string;
672
673
  target: string;
673
674
  id: string;
674
- session: string;
675
675
  action: "tab.close";
676
676
  }>]>;
677
677
  declare const successResponseSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camou",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "CLI and local daemon for driving Camoufox through Playwright",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,15 @@
11
11
  "url": "https://github.com/txchen/camoucli/issues"
12
12
  },
13
13
  "type": "module",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
14
23
  "bin": {
15
24
  "camou": "dist/cli/main.js",
16
25
  "camou-daemon": "dist/daemon/main.js"