@fungi.computer/oyster 0.13.0 → 0.14.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/README.md +30 -15
- package/dist/agents.js +2 -1
- package/dist/approval-home.js +4 -2
- package/dist/boot-host-script.js +1 -1
- package/dist/browser/cdp-client.d.ts +1 -1
- package/dist/browser/cdp-client.js +73 -37
- package/dist/browser/errors.d.ts +2 -0
- package/dist/browser/lease-registry.d.ts +5 -1
- package/dist/browser/lease-registry.js +2 -6
- package/dist/build/candidate-cli.mjs +267 -246
- package/dist/build/definition-emission.js +17 -3
- package/dist/build/local-build.d.ts +6 -0
- package/dist/build/local-build.js +104 -91
- package/dist/build/process-group.d.ts +6 -0
- package/dist/build/process-group.js +92 -0
- package/dist/build.d.ts +1 -1
- package/dist/build.js +1 -1
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +1 -1
- package/dist/git-journal.js +12 -9
- package/dist/hello-app-script.js +1 -1
- package/dist/host-page-assets.js +1 -1
- package/dist/host-page.d.ts +6 -1
- package/dist/host-page.js +40 -0
- package/dist/host.js +24 -9
- package/dist/installation-operations.js +1 -1
- package/dist/machine-link/host.js +18 -13
- package/dist/pack.d.ts +3 -1
- package/dist/pack.js +28 -7
- package/dist/page/app-permissions.js +3 -13
- package/dist/page-script.js +2 -2
- package/dist/standalone/agent-mail.d.ts +38 -11
- package/dist/standalone/agent-mail.js +8 -22
- package/dist/standalone/agents.d.ts +1 -0
- package/dist/standalone/agents.js +30 -5
- package/dist/standalone/hello-app.d.ts +4 -1
- package/dist/standalone/hello-app.js +67 -22
- package/dist/standalone/hello-lesson.d.ts +2 -0
- package/dist/standalone/hello-lesson.js +36 -0
- package/dist/standalone/local-desktop.d.ts +6 -4
- package/dist/standalone/local-desktop.js +39 -20
- package/dist/standalone/sign-in-link.d.ts +2 -1
- package/dist/standalone/sign-in-link.js +58 -17
- package/dist/standalone/try-cli.d.ts +12 -9
- package/dist/standalone/try-cli.js +490 -138
- package/docs/api/browser.md +24 -7
- package/docs/api/pack.md +3 -2
- package/docs/api/workers-git.md +2 -2
- package/docs/api/workers.md +2 -2
- package/docs/site/agent-quickstart.mdx +109 -354
- package/examples/standalone/wrangler.jsonc +1 -1
- package/package.json +24 -24
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Cli } from "@fungi.computer/lantern";
|
|
2
|
+
import { type DesktopReadiness } from "./local-desktop.js";
|
|
2
3
|
import { type SignInLink } from "./sign-in-link.js";
|
|
3
4
|
export declare const tryUsage = "Usage: oyster try [directory] [--port 8787] [--no-open] [--verbose] [--package <npm spec>]";
|
|
4
5
|
/**
|
|
5
|
-
* Streaming logs and
|
|
6
|
-
* --verbose prints plain lines
|
|
6
|
+
* Streaming logs and interactive progress cannot share a terminal, so
|
|
7
|
+
* --verbose prints plain lines.
|
|
7
8
|
*/
|
|
8
9
|
export declare function createTryCli(args: readonly string[]): Cli;
|
|
9
10
|
/** Show a failed `oyster try` as an error with its next step. */
|
|
@@ -11,12 +12,13 @@ export declare function reportTryFailure(cause: unknown, ui: Cli): void;
|
|
|
11
12
|
/** The injectable effects of `oyster try`; tests replace them. */
|
|
12
13
|
export type TryEffects = Readonly<{
|
|
13
14
|
/** Install the scaffolded project's dependencies. */
|
|
14
|
-
installDependencies: (directory: string, manager: Manager, verbose: boolean) => Promise<void>;
|
|
15
|
+
installDependencies: (directory: string, manager: Manager, verbose: boolean, signal: AbortSignal) => Promise<void>;
|
|
15
16
|
/** Start Oyster and resolve once it answers; `stop` ends it. */
|
|
16
17
|
startServer: (input: {
|
|
17
18
|
directory: string;
|
|
18
19
|
port: number;
|
|
19
20
|
key: string;
|
|
21
|
+
signal: AbortSignal;
|
|
20
22
|
verbose: boolean;
|
|
21
23
|
}) => Promise<{
|
|
22
24
|
stop: () => Promise<void>;
|
|
@@ -27,26 +29,27 @@ export type TryEffects = Readonly<{
|
|
|
27
29
|
directory: string;
|
|
28
30
|
url: string;
|
|
29
31
|
key: string;
|
|
32
|
+
signal: AbortSignal;
|
|
30
33
|
}) => Promise<number>;
|
|
31
|
-
/**
|
|
34
|
+
/** Prepare Tourtois without changing an existing installation or its approval. */
|
|
32
35
|
installDesktop: (input: {
|
|
33
36
|
directory: string;
|
|
34
37
|
url: string;
|
|
35
38
|
key: string;
|
|
36
|
-
|
|
39
|
+
signal: AbortSignal;
|
|
40
|
+
}) => Promise<DesktopReadiness>;
|
|
37
41
|
/** A one-time page that signs the owner in without the key in a URL. */
|
|
38
42
|
signInLink: (input: {
|
|
39
43
|
oysterUrl: string;
|
|
40
44
|
key: string;
|
|
45
|
+
signal: AbortSignal;
|
|
41
46
|
}) => Promise<SignInLink>;
|
|
42
47
|
/** Open the browser. */
|
|
43
|
-
open: (url: string) => void;
|
|
44
|
-
/** Resolve when the user asks to stop. */
|
|
45
|
-
interrupted: () => Promise<void>;
|
|
48
|
+
open: (url: string, failed: () => void) => void;
|
|
46
49
|
/** Check that the port is free. */
|
|
47
50
|
portFree: (port: number) => Promise<boolean>;
|
|
48
51
|
}>;
|
|
49
52
|
export type Manager = "npm" | "pnpm";
|
|
50
53
|
/** pnpm when it ran this command (`pnpm dlx`), otherwise npm. */
|
|
51
54
|
export declare function detectManager(userAgent: string | undefined): "pnpm" | "npm";
|
|
52
|
-
export declare function tryOyster(args: readonly string[], effects?: TryEffects, ui?: Cli): Promise<void>;
|
|
55
|
+
export declare function tryOyster(args: readonly string[], effects?: TryEffects, ui?: Cli, callerSignal?: AbortSignal): Promise<void>;
|