@stringsync/splates 0.0.45 → 0.0.47
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 +121 -9
- package/artifact.d.ts +3 -30
- package/budget.d.ts +3 -0
- package/coordinator.d.ts +3 -0
- package/creds.d.ts +3 -123
- package/flags.d.ts +37 -0
- package/index.js +826 -26419
- package/lane.d.ts +3 -55
- package/main.d.ts +6 -0
- package/package.json +3 -42
- package/projects.d.ts +3 -136
- package/queue.d.ts +3 -0
- package/setup.d.ts +16 -98
- package/slots.d.ts +3 -135
- package/splates.d.ts +1 -19
- package/todo.d.ts +3 -146
- package/{splates-tunnel.d.ts → tunnel.d.ts} +1 -1
- package/{splates-worker.d.ts → worker.d.ts} +1 -1
- package/acp-extensions.d.ts +0 -82
- package/add.d.ts +0 -53
- package/adherence.d.ts +0 -49
- package/age.d.ts +0 -2
- package/agent-connection.d.ts +0 -171
- package/agent-errors.d.ts +0 -2
- package/agent-process.d.ts +0 -65
- package/agent-stream.d.ts +0 -91
- package/agents.d.ts +0 -15
- package/artifact-room.d.ts +0 -47
- package/artifact-viewers.d.ts +0 -6
- package/artifacts.d.ts +0 -161
- package/asked.d.ts +0 -146
- package/asked.js +0 -7
- package/assumed.d.ts +0 -34
- package/attach.d.ts +0 -30
- package/attachments.d.ts +0 -43
- package/baselines.d.ts +0 -55
- package/claim.d.ts +0 -17
- package/cloudflare-api.d.ts +0 -25
- package/cloudflare-error.d.ts +0 -5
- package/cloudflared-tunnel-provider.d.ts +0 -27
- package/codex-limits.d.ts +0 -19
- package/compaction.d.ts +0 -17
- package/config-source.d.ts +0 -13
- package/config.d.ts +0 -98
- package/config.js +0 -7
- package/conversation-archive.d.ts +0 -6
- package/conversation-background.d.ts +0 -21
- package/conversation-choice.d.ts +0 -4
- package/conversation-files.d.ts +0 -51
- package/conversation-given.d.ts +0 -8
- package/conversation-host.d.ts +0 -102
- package/conversation-listing.d.ts +0 -15
- package/conversation-log.d.ts +0 -301
- package/conversation-messages.d.ts +0 -18
- package/conversation-name.d.ts +0 -28
- package/conversation-options.d.ts +0 -73
- package/conversation-reference.d.ts +0 -2
- package/conversation-state.d.ts +0 -472
- package/conversation-turns.d.ts +0 -115
- package/conversation.d.ts +0 -209
- package/conversations.d.ts +0 -140
- package/coordinator-state.d.ts +0 -28
- package/darwin-temperature.d.ts +0 -7
- package/decided.d.ts +0 -18
- package/demo.d.ts +0 -29
- package/dev/api.d.ts +0 -209
- package/dev/assets.d.ts +0 -24
- package/dev/conversation-address.d.ts +0 -47
- package/dev/conversation-feed.d.ts +0 -166
- package/dev/live-stream.d.ts +0 -29
- package/dev/worker.d.ts +0 -33
- package/dev-access.d.ts +0 -61
- package/dev-artifacts.d.ts +0 -22
- package/dev-budgets.d.ts +0 -18
- package/dev-conversation-events.d.ts +0 -39
- package/dev-conversation-routes.d.ts +0 -90
- package/dev-creds.d.ts +0 -17
- package/dev-dictation-connection.d.ts +0 -18
- package/dev-dictation.d.ts +0 -17
- package/dev-http.d.ts +0 -76
- package/dev-open.d.ts +0 -15
- package/dev-options.d.ts +0 -133
- package/dev-outcomes.d.ts +0 -21
- package/dev-pages.d.ts +0 -16
- package/dev-picker.d.ts +0 -57
- package/dev-port-socket.d.ts +0 -26
- package/dev-ports.d.ts +0 -11
- package/dev-project-watch.d.ts +0 -44
- package/dev-project.d.ts +0 -168
- package/dev-push.d.ts +0 -59
- package/dev-restart.d.ts +0 -141
- package/dev-servers.d.ts +0 -30
- package/dev-setup-native.d.ts +0 -23
- package/dev-setup-opencode.d.ts +0 -29
- package/dev-setup.d.ts +0 -16
- package/dev-shell.d.ts +0 -70
- package/dev-slot.d.ts +0 -28
- package/dev-sockets.d.ts +0 -13
- package/dev-task-ports.d.ts +0 -73
- package/dev-tasks.d.ts +0 -20
- package/dev-terminal-connection.d.ts +0 -19
- package/dev-terminal.d.ts +0 -42
- package/dev-todos.d.ts +0 -35
- package/dev-transcriber.d.ts +0 -15
- package/dev-tunnel.d.ts +0 -38
- package/dev-versions.d.ts +0 -53
- package/dev-workers.d.ts +0 -55
- package/dev.d.ts +0 -24
- package/diff.d.ts +0 -29
- package/dispatched.d.ts +0 -16
- package/editors.d.ts +0 -22
- package/escalate.d.ts +0 -27
- package/events.d.ts +0 -311
- package/everywhere.d.ts +0 -41
- package/exhibit.d.ts +0 -21
- package/exit.d.ts +0 -54
- package/fact-todos.d.ts +0 -18
- package/fake-agent.d.ts +0 -107
- package/fake-agent.js +0 -284
- package/finding-facts.d.ts +0 -38
- package/findings.d.ts +0 -84
- package/fold.d.ts +0 -43
- package/follow.d.ts +0 -41
- package/format.d.ts +0 -68
- package/git.d.ts +0 -112
- package/handed-out.d.ts +0 -79
- package/handoff.d.ts +0 -23
- package/heavy-run.d.ts +0 -12
- package/heavy.d.ts +0 -28
- package/heavy.js +0 -16
- package/held.d.ts +0 -22
- package/index-0tfvy823.js +0 -272
- package/index-43pq33n4.js +0 -157
- package/index-4776671w.js +0 -698
- package/index-d4hjrzaq.js +0 -464
- package/index-gcfq7awr.js +0 -740
- package/index-k73tsw5g.js +0 -101
- package/index-kaa44k7q.js +0 -59
- package/index-vcv9m93e.js +0 -1265
- package/index-xmfmy729.js +0 -249
- package/init.d.ts +0 -28
- package/journal.d.ts +0 -57
- package/landed.d.ts +0 -14
- package/lane-todos.d.ts +0 -44
- package/lanes-from-tags.d.ts +0 -17
- package/lanes.d.ts +0 -96
- package/legacy-names.d.ts +0 -70
- package/legacy-ps.d.ts +0 -31
- package/limits.d.ts +0 -32
- package/list.d.ts +0 -18
- package/load-config.d.ts +0 -44
- package/log.d.ts +0 -14
- package/machine.d.ts +0 -42
- package/merge.d.ts +0 -35
- package/migrate-config.d.ts +0 -31
- package/models.d.ts +0 -24
- package/needs.d.ts +0 -115
- package/notices.d.ts +0 -39
- package/offered.d.ts +0 -39
- package/opencode-usage.d.ts +0 -37
- package/outcomes.d.ts +0 -114
- package/path.d.ts +0 -13
- package/plan.d.ts +0 -236
- package/port-forward.d.ts +0 -22
- package/port-pipe.d.ts +0 -36
- package/ports-list.d.ts +0 -19
- package/probe-runtime.d.ts +0 -5
- package/probe-runtime.js +0 -13
- package/project-reaches.d.ts +0 -23
- package/prompts.d.ts +0 -128
- package/pty.d.ts +0 -39
- package/pulse.d.ts +0 -8
- package/recommend.d.ts +0 -31
- package/release.d.ts +0 -41
- package/remote-process.d.ts +0 -26
- package/remote-pty.d.ts +0 -29
- package/remote-worker.d.ts +0 -77
- package/remove.d.ts +0 -31
- package/repository.d.ts +0 -91
- package/retry.d.ts +0 -34
- package/roster.d.ts +0 -63
- package/saved-ports-host.d.ts +0 -25
- package/saved-tunnel.d.ts +0 -44
- package/server-worker-socket.d.ts +0 -21
- package/setup-areas.d.ts +0 -7
- package/setup-opencode-model-error.d.ts +0 -3
- package/setup-opencode-models.d.ts +0 -54
- package/setup-opencode-recipe.d.ts +0 -26
- package/setup-opencode.d.ts +0 -46
- package/shared-browser.d.ts +0 -50
- package/shell.d.ts +0 -17
- package/show.d.ts +0 -106
- package/skill-checks.d.ts +0 -73
- package/skill-checks.js +0 -10
- package/skills.d.ts +0 -16
- package/slot-tunnel.d.ts +0 -27
- package/snapshot.d.ts +0 -75
- package/splates-artifact.d.ts +0 -3
- package/splates-creds.d.ts +0 -3
- package/splates-dev.d.ts +0 -22
- package/splates-flags.d.ts +0 -34
- package/splates-lane.d.ts +0 -3
- package/splates-projects.d.ts +0 -3
- package/splates-setup.d.ts +0 -17
- package/splates-slots.d.ts +0 -3
- package/splates-todo.d.ts +0 -3
- package/stats.d.ts +0 -186
- package/supervise.d.ts +0 -50
- package/system-changes.d.ts +0 -67
- package/system.d.ts +0 -28
- package/systems.d.ts +0 -119
- package/systems.js +0 -21
- package/table.d.ts +0 -5
- package/task-log.d.ts +0 -35
- package/task-ports.d.ts +0 -25
- package/tell.d.ts +0 -47
- package/todo-edit.d.ts +0 -60
- package/todo-file.d.ts +0 -6
- package/todo-lanes.d.ts +0 -82
- package/todo-list.d.ts +0 -26
- package/todo-take.d.ts +0 -27
- package/todos.d.ts +0 -157
- package/tool-calls.d.ts +0 -18
- package/tunnel-provider.d.ts +0 -37
- package/tunnel-provider.js +0 -0
- package/tunnel-remove.d.ts +0 -28
- package/tunnel-setup.d.ts +0 -104
- package/unix-worker-listener.d.ts +0 -23
- package/unix-worker-socket.d.ts +0 -30
- package/update.d.ts +0 -29
- package/update.js +0 -10
- package/vocabulary.d.ts +0 -9
- package/wait.d.ts +0 -36
- package/watch.d.ts +0 -46
- package/watched.d.ts +0 -43
- package/websocket-worker-socket.d.ts +0 -18
- package/worker-call-host.d.ts +0 -51
- package/worker-channel.d.ts +0 -83
- package/worker-connection.d.ts +0 -24
- package/worker-daemon.d.ts +0 -64
- package/worker-git.d.ts +0 -18
- package/worker-list.d.ts +0 -49
- package/worker-machine.d.ts +0 -34
- package/worker-port-host.d.ts +0 -21
- package/worker-process-host.d.ts +0 -29
- package/worker-protocol.d.ts +0 -104
- package/worker-pty-host.d.ts +0 -34
- package/worker-registry.d.ts +0 -68
- package/worker-replay.d.ts +0 -25
- package/worker-run.d.ts +0 -20
- package/worker-session.d.ts +0 -189
- package/worker-socket.d.ts +0 -15
- package/worktree-service.d.ts +0 -113
- package/worktree.d.ts +0 -232
package/remote-worker.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { ListeningEntry, ProcessEntry } from "webappwiz/system";
|
|
2
|
-
import type { Launch, ProcessHandle } from "./agent-process.js";
|
|
3
|
-
import type { GitResult } from "./git.js";
|
|
4
|
-
import { RemoteProcess } from "./remote-process.js";
|
|
5
|
-
import { RemotePty } from "./remote-pty.js";
|
|
6
|
-
import type { WorkerChannel } from "./worker-channel.js";
|
|
7
|
-
import type { WorkerMachine, WorkerRead } from "./worker-machine.js";
|
|
8
|
-
import type { Json } from "./worker-protocol.js";
|
|
9
|
-
import type { WorkerSession } from "./worker-session.js";
|
|
10
|
-
/** Where and how big a shell on a worker starts, as `Pty` takes it. */
|
|
11
|
-
export interface RemotePtyOptions {
|
|
12
|
-
argv: string[];
|
|
13
|
-
cwd: string;
|
|
14
|
-
cols: number;
|
|
15
|
-
rows: number;
|
|
16
|
-
env?: Record<string, string>;
|
|
17
|
-
}
|
|
18
|
-
/** How a worker joined: over this machine's socket, or by its own say-so. */
|
|
19
|
-
export type WorkerKind = "local" | "registered";
|
|
20
|
-
/**
|
|
21
|
-
* The coordinator's handle on one worker: what it said of itself in its
|
|
22
|
-
* hello, and the work it can be given. Its session outlives any one
|
|
23
|
-
* connection, so a call or process started before a drop finishes after it.
|
|
24
|
-
*/
|
|
25
|
-
export declare class RemoteWorker implements WorkerMachine {
|
|
26
|
-
readonly id: string;
|
|
27
|
-
/** Slots, platform and build, as its last hello said. */
|
|
28
|
-
info: {
|
|
29
|
-
[key: string]: Json;
|
|
30
|
-
};
|
|
31
|
-
readonly session: WorkerSession;
|
|
32
|
-
/** How its last connection arrived. */
|
|
33
|
-
kind: WorkerKind;
|
|
34
|
-
private calls;
|
|
35
|
-
private nextCall;
|
|
36
|
-
private readonly pending;
|
|
37
|
-
constructor(id: string,
|
|
38
|
-
/** Slots, platform and build, as its last hello said. */
|
|
39
|
-
info: {
|
|
40
|
-
[key: string]: Json;
|
|
41
|
-
}, session: WorkerSession,
|
|
42
|
-
/** How its last connection arrived. */
|
|
43
|
-
kind?: WorkerKind);
|
|
44
|
-
get connected(): boolean;
|
|
45
|
-
/** `start`, as the `Launch` that conversations start their agents with. */
|
|
46
|
-
readonly launch: Launch;
|
|
47
|
-
/** Starts `argv` in `cwd` on the worker, its stdio piped back here. */
|
|
48
|
-
start(argv: string[], cwd: string, env?: Record<string, string>): RemoteProcess;
|
|
49
|
-
/**
|
|
50
|
-
* Takes back the process `handle` names, which this worker kept running
|
|
51
|
-
* while its coordinator restarted: its output replays from past `held`,
|
|
52
|
-
* the last frame the coordinator wrote down, or from wherever the worker's
|
|
53
|
-
* replay starts for null.
|
|
54
|
-
*/
|
|
55
|
-
resume(handle: ProcessHandle, held: number | null): RemoteProcess;
|
|
56
|
-
/** Starts a shell on a pseudo-terminal of the worker's. */
|
|
57
|
-
pty({ argv, cwd, cols, rows, env }: RemotePtyOptions): RemotePty;
|
|
58
|
-
/**
|
|
59
|
-
* Takes back a shell the worker kept through a coordinator restart, by
|
|
60
|
-
* the `handle` the last run's `pty` had; it says its pid and screen again
|
|
61
|
-
* once asked to describe itself. One the worker no longer runs exits.
|
|
62
|
-
*/
|
|
63
|
-
resumePty(handle: ProcessHandle): RemotePty;
|
|
64
|
-
/**
|
|
65
|
-
* Opens a connection to `port` on the worker's loopback, such as a task's
|
|
66
|
-
* dev server, as a `port` channel for a `PortPipe` to carry.
|
|
67
|
-
*/
|
|
68
|
-
port(port: number): WorkerChannel;
|
|
69
|
-
git(cwd: string, args: string[]): Promise<GitResult>;
|
|
70
|
-
processes(): Promise<ProcessEntry[]>;
|
|
71
|
-
listening(): Promise<ListeningEntry[]>;
|
|
72
|
-
exists(path: string): Promise<boolean>;
|
|
73
|
-
read(path: string, from: number): Promise<WorkerRead>;
|
|
74
|
-
private call;
|
|
75
|
-
/** One `calls` channel for every call, opened on the first. */
|
|
76
|
-
private channel;
|
|
77
|
-
}
|
package/remove.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import { type Slots } from "./slots.js";
|
|
3
|
-
import type { Todos } from "./todos.js";
|
|
4
|
-
import type { RemoveReason } from "./worktree.js";
|
|
5
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
6
|
-
export interface RemoveOptions {
|
|
7
|
-
/** Discard the tree even when another agent holds its lease. */
|
|
8
|
-
force?: boolean;
|
|
9
|
-
/** The `splates server` conversation working on it, when removed from the page. */
|
|
10
|
-
conversation?: string;
|
|
11
|
-
/** Why, kept in its outcome for the Stats page. */
|
|
12
|
-
reason?: RemoveReason;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Discards a whole task: `git worktree remove` plus the branch and the
|
|
16
|
-
* record.
|
|
17
|
-
*
|
|
18
|
-
* Throwing a task away and redoing it against current trunk is usually cheaper
|
|
19
|
-
* than a hard rebase, so this is meant to be used freely.
|
|
20
|
-
*/
|
|
21
|
-
export declare function remove({ service, log, todos, slots, }: {
|
|
22
|
-
service: WorktreeService;
|
|
23
|
-
log: Logger;
|
|
24
|
-
todos: Todos;
|
|
25
|
-
slots: Slots;
|
|
26
|
-
}, task: string, { force, conversation, reason }?: RemoveOptions): Promise<{
|
|
27
|
-
released: {
|
|
28
|
-
id: number;
|
|
29
|
-
subject: string;
|
|
30
|
-
}[];
|
|
31
|
-
}>;
|
package/repository.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { Deps, Middleware } from "webappwiz/cmd";
|
|
2
|
-
import type { HeavyCap } from "webappwiz/system";
|
|
3
|
-
import { type Fs, type Lock } from "webappwiz/system";
|
|
4
|
-
import type { Config } from "./config.js";
|
|
5
|
-
import { Creds, type SecretStores } from "./creds.js";
|
|
6
|
-
import { Format } from "./format.js";
|
|
7
|
-
import { Git } from "./git.js";
|
|
8
|
-
import { Journal } from "./journal.js";
|
|
9
|
-
import { Outcomes } from "./outcomes.js";
|
|
10
|
-
import { Projects, type Reach } from "./projects.js";
|
|
11
|
-
import { Shell } from "./shell.js";
|
|
12
|
-
import { Slots } from "./slots.js";
|
|
13
|
-
import { Todos } from "./todos.js";
|
|
14
|
-
import { WorktreeService } from "./worktree-service.js";
|
|
15
|
-
/** What a command gets to work with, once there is a repository to work in. */
|
|
16
|
-
export interface Repository {
|
|
17
|
-
/** Where splates keeps its records: `.git/splates`, shared by every worktree. */
|
|
18
|
-
splatesDir: string;
|
|
19
|
-
config: Config;
|
|
20
|
-
/** Checked before the command runs, so its records are in this splates's format. */
|
|
21
|
-
format: Format;
|
|
22
|
-
git: Git;
|
|
23
|
-
service: WorktreeService;
|
|
24
|
-
lock: Lock;
|
|
25
|
-
shell: Shell;
|
|
26
|
-
journal: Journal;
|
|
27
|
-
todos: Todos;
|
|
28
|
-
/** How each task on this machine ended, which a merge reads its findings from. */
|
|
29
|
-
outcomes: Outcomes;
|
|
30
|
-
/** Every splates project on this machine, which `splates init` joins this one to. */
|
|
31
|
-
projects: Projects;
|
|
32
|
-
/** The creds agents ask for, and the stores they are kept in. */
|
|
33
|
-
creds: Creds;
|
|
34
|
-
/** The machine's dev slots, which a task gives back as it ends. */
|
|
35
|
-
slots: Slots;
|
|
36
|
-
/** The machine's slots for test runs and installs, which hooks wait for. */
|
|
37
|
-
heavy: HeavyCap;
|
|
38
|
-
}
|
|
39
|
-
/** How `repository` treats records in an older format than this splates's. */
|
|
40
|
-
export interface RepositoryOptions {
|
|
41
|
-
/**
|
|
42
|
-
* Brings them forward before the action runs. Only `splates server` does: a
|
|
43
|
-
* migration is the server's to run, with its sessions settled, so every
|
|
44
|
-
* other command refuses them until it has.
|
|
45
|
-
*/
|
|
46
|
-
migrates?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Sets up the records of a repository that has none first, as only
|
|
49
|
-
* `splates init` does: every other command refuses one.
|
|
50
|
-
*/
|
|
51
|
-
creates?: boolean;
|
|
52
|
-
/** Where to look for the repository; the working directory by default. */
|
|
53
|
-
at?: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Runs the action against the repository `cwd` sits in, or the registered
|
|
57
|
-
* project `--project` names, and refuses to run it at all when that is not
|
|
58
|
-
* a repository, its records are in a format this splates does not read, or
|
|
59
|
-
* the command is run from another project that has not been granted what
|
|
60
|
-
* it `needs` there.
|
|
61
|
-
*/
|
|
62
|
-
export declare function repository<C extends Deps & {
|
|
63
|
-
fs: Fs;
|
|
64
|
-
secrets?: SecretStores;
|
|
65
|
-
project?: string;
|
|
66
|
-
}>(opts: Omit<RepositoryOptions, "at"> & {
|
|
67
|
-
needs: Needs;
|
|
68
|
-
}): Middleware<C, C & Repository & Reached>;
|
|
69
|
-
/**
|
|
70
|
-
* What a command needs of the project it runs on, when an agent of another
|
|
71
|
-
* project runs it: a reach that project must have granted, or `own` for a
|
|
72
|
-
* command no other project may run there at all.
|
|
73
|
-
*/
|
|
74
|
-
export type Needs = Reach | "own";
|
|
75
|
-
/** What `repository` adds beyond the repository itself. */
|
|
76
|
-
export interface Reached {
|
|
77
|
-
/**
|
|
78
|
-
* The main tree of the other project the command is run from, as checked
|
|
79
|
-
* against what it `needs`; null when run from this one, or from none.
|
|
80
|
-
*/
|
|
81
|
-
elsewhere: string | null;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* What a command works with in the repository `at` sits in, the working
|
|
85
|
-
* directory by default: what `repository` hands an action, and what `splates
|
|
86
|
-
* dev` opens each project it serves with. Refuses what `repository` does.
|
|
87
|
-
*/
|
|
88
|
-
export declare function openRepository({ fs, ps, log, secrets, }: Deps & {
|
|
89
|
-
fs: Fs;
|
|
90
|
-
secrets?: SecretStores;
|
|
91
|
-
}, { migrates, creates, at }?: RepositoryOptions): Promise<Repository>;
|
package/retry.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import type { Config } from "./config.js";
|
|
3
|
-
import type { Journal } from "./journal.js";
|
|
4
|
-
import type { Worktree } from "./worktree.js";
|
|
5
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
6
|
-
/**
|
|
7
|
-
* The way back from `budget_exhausted`. A task that has spent its merge
|
|
8
|
-
* attempts gets another `mergeRetryCount` of them, instead of `remove` and redo.
|
|
9
|
-
*
|
|
10
|
-
* Only from `escalated`, and deliberately: the budget's whole job is to make an
|
|
11
|
-
* agent stop and hand the task over. An agent that could grant itself more
|
|
12
|
-
* would be back to grinding against a moving trunk forever, so the price of a
|
|
13
|
-
* fresh budget is that a human has looked at the tree first.
|
|
14
|
-
*/
|
|
15
|
-
export declare function retry({ service, config, log, }: {
|
|
16
|
-
service: WorktreeService;
|
|
17
|
-
config: Config;
|
|
18
|
-
log: Logger;
|
|
19
|
-
}, task: string): Promise<Granted>;
|
|
20
|
-
/** `retry`, recorded in the journal with the attempts the task had spent. */
|
|
21
|
-
export declare function recordRetry(ctx: {
|
|
22
|
-
journal: Journal;
|
|
23
|
-
service: WorktreeService;
|
|
24
|
-
config: Config;
|
|
25
|
-
log: Logger;
|
|
26
|
-
}, task: string): Promise<Granted>;
|
|
27
|
-
/** A retry that was granted: the task back to working, and the attempts it had spent. */
|
|
28
|
-
export interface Granted {
|
|
29
|
-
worktree: Worktree;
|
|
30
|
-
/** The merge attempts it had spent before the grant. */
|
|
31
|
-
attempts: number;
|
|
32
|
-
}
|
|
33
|
-
/** What `retry` does, without the printing, for `splates server`'s page too. */
|
|
34
|
-
export declare function grantRetry(service: WorktreeService, task: string): Promise<Granted>;
|
package/roster.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { Fs, Ps } from "webappwiz/system";
|
|
2
|
-
import type { Agent } from "./conversations.js";
|
|
3
|
-
/**
|
|
4
|
-
* The agents splates can start, and the models each runs, kept in one file
|
|
5
|
-
* under the user's home rather than per project: an orchestrator in any
|
|
6
|
-
* project, of any model family, can read it to delegate to any other.
|
|
7
|
-
*/
|
|
8
|
-
export declare class Roster {
|
|
9
|
-
/** `~/.splates/agents.json`, or a test's own. */
|
|
10
|
-
readonly path: string;
|
|
11
|
-
private readonly deps;
|
|
12
|
-
constructor(
|
|
13
|
-
/** `~/.splates/agents.json`, or a test's own. */
|
|
14
|
-
path: string, deps: {
|
|
15
|
-
fs: Fs;
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Writes the defaults when there is no roster yet, saying whether it did,
|
|
19
|
-
* so the user has a file to edit rather than a list they cannot see.
|
|
20
|
-
*/
|
|
21
|
-
seed(): Promise<boolean>;
|
|
22
|
-
/** Every agent on the roster, in its order; the defaults when there is none. */
|
|
23
|
-
agents(): Promise<RosterAgent[]>;
|
|
24
|
-
}
|
|
25
|
-
/** A model an agent can run, and what picking it buys. */
|
|
26
|
-
export interface RosterModel {
|
|
27
|
-
/** What the agent's Model setting takes: `opus`, `gpt-6-luna`. */
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
/** What it is good at, so an orchestrator can choose it for a job. */
|
|
31
|
-
strengths: string;
|
|
32
|
-
/** What it costs, relative to the others or as a price. */
|
|
33
|
-
cost: string;
|
|
34
|
-
}
|
|
35
|
-
/** An agent on the roster: how to start it, and the models it runs. */
|
|
36
|
-
export interface RosterAgent extends Agent {
|
|
37
|
-
models: RosterModel[];
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* The roster a machine starts with: each agent is the ACP adapter its maker
|
|
41
|
-
* publishes, fetched by `bunx` on first use, and its models are those the
|
|
42
|
-
* adapter offers, by the ids its Model setting takes.
|
|
43
|
-
*/
|
|
44
|
-
export declare const DEFAULT_AGENTS: RosterAgent[];
|
|
45
|
-
/** An agent off the roster, on one of its models, or on its own without one. */
|
|
46
|
-
export interface AgentPick {
|
|
47
|
-
agent: string;
|
|
48
|
-
/** The roster's id for the model, which the agent's Model setting takes. */
|
|
49
|
-
model?: string;
|
|
50
|
-
}
|
|
51
|
-
/** The models `agent` runs, as the roster lists them; none for an agent off it. */
|
|
52
|
-
export declare function modelsOf(agent: Agent): RosterModel[];
|
|
53
|
-
/** `pick` in a word: `claude`, or `claude (opus)` on a model. */
|
|
54
|
-
export declare function pickLabel(pick: AgentPick): string;
|
|
55
|
-
/**
|
|
56
|
-
* `agent` on `model`, named by its id or name in any case, as the roster's
|
|
57
|
-
* ids; OpenCode and provider-qualified models require an exact ID. Refuses an agent or a model the roster does not list, saying so with
|
|
58
|
-
* `data`. An agent whose models the roster leaves out takes the model as
|
|
59
|
-
* given.
|
|
60
|
-
*/
|
|
61
|
-
export declare function pickAgent(agents: RosterAgent[], agent: string, model: string | undefined, data?: Record<string, unknown>): AgentPick;
|
|
62
|
-
/** Where the user's splates files live: `~/.splates`, or `SPLATES_HOME`, as the tests set. */
|
|
63
|
-
export declare function splatesHome(ps: Ps): string;
|
package/saved-ports-host.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Fs } from "webappwiz/system";
|
|
2
|
-
/** What `--ports-host` takes to forget the saved base host. */
|
|
3
|
-
export declare const NO_PORTS_HOST = "none";
|
|
4
|
-
/**
|
|
5
|
-
* The wildcard base host this machine serves task ports under, as
|
|
6
|
-
* `<task>-<port>.<base>`: saved by `splates server --ports-host`, per machine as
|
|
7
|
-
* the tunnel is, in `~/.splates/ports.json`, so a bare `splates server` serves it.
|
|
8
|
-
*/
|
|
9
|
-
export declare class SavedPortsHost {
|
|
10
|
-
/** `~/.splates/ports.json`, or a test's own. */
|
|
11
|
-
readonly path: string;
|
|
12
|
-
private readonly fs;
|
|
13
|
-
constructor(
|
|
14
|
-
/** `~/.splates/ports.json`, or a test's own. */
|
|
15
|
-
path: string, fs: Fs);
|
|
16
|
-
/** The saved base, or null when none is, or its format is newer. */
|
|
17
|
-
read(): Promise<string | null>;
|
|
18
|
-
/** Keeps `base`, over what was there, or forgets it for null. */
|
|
19
|
-
save(base: string | null): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* What `--ports-host` asks for: a base host to save, null to forget the
|
|
23
|
-
* saved one, or undefined to serve whatever was saved.
|
|
24
|
-
*/
|
|
25
|
-
export declare function portsHostFlag(flag: string): string | null | undefined;
|
package/saved-tunnel.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { SecretStore } from "webappwiz/creds";
|
|
2
|
-
import type { Fs } from "webappwiz/system";
|
|
3
|
-
/** The name the tunnel's token is kept under in the system's secret store. */
|
|
4
|
-
export declare const TUNNEL_TOKEN = "SPLATES_TUNNEL_TOKEN";
|
|
5
|
-
/** What `splates tunnel setup` made, which a bare `splates server` runs. */
|
|
6
|
-
export interface TunnelRecord {
|
|
7
|
-
/** The public host name the tunnel carries to the page. */
|
|
8
|
-
host: string;
|
|
9
|
-
/** The Zero Trust team, as in `<team>.cloudflareaccess.com`. */
|
|
10
|
-
team: string;
|
|
11
|
-
/** The AUD tag of the Access application in front of `host`. */
|
|
12
|
-
aud: string;
|
|
13
|
-
/** The Cloudflare tunnel's id. */
|
|
14
|
-
tunnel: string;
|
|
15
|
-
/**
|
|
16
|
-
* The cred its token is kept as, when not `TUNNEL_TOKEN`: a slot's own,
|
|
17
|
-
* since every slot runs a tunnel of its own.
|
|
18
|
-
*/
|
|
19
|
-
token?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The tunnel this machine set up, kept per machine rather than per project,
|
|
23
|
-
* since one `splates server` serves every project: what it is in
|
|
24
|
-
* `~/.splates/tunnel.json`, and the token that runs it, a secret of this
|
|
25
|
-
* machine, in the device's secret store, as the cred `TUNNEL_TOKEN`.
|
|
26
|
-
*/
|
|
27
|
-
export declare class SavedTunnel {
|
|
28
|
-
/** `~/.splates/tunnel.json`, or a test's own. */
|
|
29
|
-
readonly path: string;
|
|
30
|
-
private readonly deps;
|
|
31
|
-
constructor(
|
|
32
|
-
/** `~/.splates/tunnel.json`, or a test's own. */
|
|
33
|
-
path: string, deps: {
|
|
34
|
-
fs: Fs;
|
|
35
|
-
/** The device's store, which `splates tunnel setup` saves the token in. */
|
|
36
|
-
store: SecretStore;
|
|
37
|
-
});
|
|
38
|
-
/** What was saved, or null when nothing was, or its format is newer. */
|
|
39
|
-
read(): Promise<TunnelRecord | null>;
|
|
40
|
-
/** The token that runs the saved tunnel, or undefined when the store lost it. */
|
|
41
|
-
token(): Promise<string | undefined>;
|
|
42
|
-
/** Keeps `record` in the file, over what was there; its token is a cred. */
|
|
43
|
-
save(record: TunnelRecord): Promise<void>;
|
|
44
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Connection } from "./dev-sockets.js";
|
|
2
|
-
import type { WorkerRegistry } from "./worker-registry.js";
|
|
3
|
-
import type { WorkerSocket, WorkerSocketEvents } from "./worker-socket.js";
|
|
4
|
-
/**
|
|
5
|
-
* A worker's WebSocket as `splates server` upgraded it on `/api/workers`, seen as
|
|
6
|
-
* a `WorkerSocket`: the server hands it each socket event, and it hands
|
|
7
|
-
* itself to the registry once open.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ServerWorkerSocket implements WorkerSocket, Connection {
|
|
10
|
-
private readonly registry;
|
|
11
|
-
private readonly dispatcher;
|
|
12
|
-
readonly events: import("webappwiz/events").Events<WorkerSocketEvents>;
|
|
13
|
-
private socket;
|
|
14
|
-
private live;
|
|
15
|
-
constructor(registry: WorkerRegistry);
|
|
16
|
-
send(frame: string | Uint8Array): void;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
open(socket: Bun.ServerWebSocket<Connection>): void;
|
|
19
|
-
message(_socket: Bun.ServerWebSocket<Connection>, message: string | Buffer<ArrayBuffer>): void;
|
|
20
|
-
closed(): void;
|
|
21
|
-
}
|
package/setup-areas.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SetupArea } from "./setup.js";
|
|
2
|
-
/**
|
|
3
|
-
* Everything that makes up setting splates up on a machine, in the order it is
|
|
4
|
-
* best done. Each area is a short list of steps the page and an agent walk
|
|
5
|
-
* the user through one at a time.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SETUP_AREAS: readonly SetupArea[];
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type Fs, type Ps } from "webappwiz/system";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { type OpenCodeRecipe, OpenCodeRecipes } from "./setup-opencode-recipe.js";
|
|
4
|
-
/** Only metadata commands. The configuration is embedded in the roster argv so
|
|
5
|
-
* a single atomic rename activates both the models and their experiment policy. */
|
|
6
|
-
export declare class OpenCodeModels {
|
|
7
|
-
private readonly deps;
|
|
8
|
-
private readonly metadata;
|
|
9
|
-
private catalog;
|
|
10
|
-
private previewed;
|
|
11
|
-
private saved;
|
|
12
|
-
readonly recipes: OpenCodeRecipes;
|
|
13
|
-
constructor(deps: {
|
|
14
|
-
fs: Fs;
|
|
15
|
-
ps: Ps;
|
|
16
|
-
home: string;
|
|
17
|
-
}, metadata: OpenCodeMetadata);
|
|
18
|
-
read(): OpenCodeModelState;
|
|
19
|
-
invalidate(): void;
|
|
20
|
-
cancel(): void;
|
|
21
|
-
refresh(signal: AbortSignal): Promise<OpenCodeModelState>;
|
|
22
|
-
preview(selection: OpenCodeSelection, signal: AbortSignal): Promise<OpenCodeModelState>;
|
|
23
|
-
apply(token: string, balanceOff: boolean, signal: AbortSignal): Promise<OpenCodeModelState>;
|
|
24
|
-
verifyStored(recipe: OpenCodeRecipe, cwd: string, signal: AbortSignal): Promise<void>;
|
|
25
|
-
private requireModels;
|
|
26
|
-
private discover;
|
|
27
|
-
private agents;
|
|
28
|
-
private verify;
|
|
29
|
-
private roster;
|
|
30
|
-
}
|
|
31
|
-
export declare const openCodeSelection: z.ZodObject<{
|
|
32
|
-
model: z.ZodString;
|
|
33
|
-
auxiliary: z.ZodString;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
export type OpenCodeSelection = z.infer<typeof openCodeSelection>;
|
|
36
|
-
export interface OpenCodeCatalog {
|
|
37
|
-
models: string[];
|
|
38
|
-
checkedAt: string | null;
|
|
39
|
-
problem: string | null;
|
|
40
|
-
}
|
|
41
|
-
export interface OpenCodePreview extends OpenCodeSelection {
|
|
42
|
-
token: string;
|
|
43
|
-
path: string;
|
|
44
|
-
config: Record<string, unknown>;
|
|
45
|
-
agents: string[];
|
|
46
|
-
}
|
|
47
|
-
export interface OpenCodeModelState {
|
|
48
|
-
catalog: OpenCodeCatalog;
|
|
49
|
-
preview: OpenCodePreview | null;
|
|
50
|
-
saved: OpenCodeSelection | null;
|
|
51
|
-
}
|
|
52
|
-
export interface OpenCodeMetadata {
|
|
53
|
-
run(args: string[], signal: AbortSignal, env?: Record<string, string>, cwd?: string): Promise<string>;
|
|
54
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Fs, type Ps } from "webappwiz/system";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import type { OpenCodeSelection } from "./setup-opencode-models.js";
|
|
4
|
-
export declare class OpenCodeRecipes {
|
|
5
|
-
private readonly deps;
|
|
6
|
-
constructor(deps: {
|
|
7
|
-
fs: Fs;
|
|
8
|
-
ps: Ps;
|
|
9
|
-
home: string;
|
|
10
|
-
});
|
|
11
|
-
/** Read disk on every revisit; this never asserts readiness or runs a process. */
|
|
12
|
-
stored(): Promise<OpenCodeRecipe | null>;
|
|
13
|
-
unchanged(recipe: OpenCodeRecipe, signal: AbortSignal): Promise<void>;
|
|
14
|
-
/** Only removes the wizard-owned entry; native authentication is untouched. */
|
|
15
|
-
disable(signal: AbortSignal): Promise<void>;
|
|
16
|
-
rawRoster(): Promise<string | null>;
|
|
17
|
-
}
|
|
18
|
-
export declare function managedArgv(value: unknown): boolean;
|
|
19
|
-
export declare const projectOff = "OPENCODE_CONFIG_PROJECT_DISABLE=1";
|
|
20
|
-
export declare const contentPrefix = "OPENCODE_CONFIG_CONTENT=";
|
|
21
|
-
export interface OpenCodeRecipe extends OpenCodeSelection {
|
|
22
|
-
config: Record<string, unknown>;
|
|
23
|
-
env: Record<string, string>;
|
|
24
|
-
raw: string;
|
|
25
|
-
}
|
|
26
|
-
export declare const id: z.ZodString;
|
package/setup-opencode.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Fs, Ps } from "webappwiz/system";
|
|
2
|
-
import { OpenCodeModels, type OpenCodeSelection } from "./setup-opencode-models.js";
|
|
3
|
-
/** Observations only: a stored credential is not proof of entitlement or inference. */
|
|
4
|
-
export interface OpenCodeStatus {
|
|
5
|
-
version: string | null;
|
|
6
|
-
auth: "unchecked" | "missing" | "stored" | "unsupported";
|
|
7
|
-
protocol: "unchecked" | "compatible" | "failed";
|
|
8
|
-
checking: boolean;
|
|
9
|
-
problem: string | null;
|
|
10
|
-
checkedAt: string | null;
|
|
11
|
-
}
|
|
12
|
-
/** Fixed native actions; no arguments, credentials or commands come from the page. */
|
|
13
|
-
export declare const OPENCODE_INSTALL: string[];
|
|
14
|
-
export declare const OPENCODE_LOGIN: string[];
|
|
15
|
-
/** Non-billed installation, native-auth metadata and initialize-only ACP checks. */
|
|
16
|
-
export declare class OpenCodeSetup {
|
|
17
|
-
private readonly deps;
|
|
18
|
-
private status;
|
|
19
|
-
private pending;
|
|
20
|
-
private controller;
|
|
21
|
-
readonly models: OpenCodeModels;
|
|
22
|
-
constructor(deps: {
|
|
23
|
-
fs: Fs;
|
|
24
|
-
ps: Ps;
|
|
25
|
-
home: string;
|
|
26
|
-
});
|
|
27
|
-
configure<T>(operation: (signal: AbortSignal) => Promise<T>, requireConnection?: boolean): Promise<T>;
|
|
28
|
-
readiness(cwd: string, verify?: boolean): Promise<OpenCodeReadiness>;
|
|
29
|
-
get cwd(): string;
|
|
30
|
-
read(): OpenCodeStatus;
|
|
31
|
-
prepare(): Promise<void>;
|
|
32
|
-
check(): Promise<OpenCodeStatus>;
|
|
33
|
-
/** Native actions can change credentials; require new observations afterwards. */
|
|
34
|
-
invalidate(): void;
|
|
35
|
-
cancel(): void;
|
|
36
|
-
private command;
|
|
37
|
-
private probe;
|
|
38
|
-
private handshake;
|
|
39
|
-
}
|
|
40
|
-
export interface OpenCodeReadiness {
|
|
41
|
-
cwd: string;
|
|
42
|
-
selection: OpenCodeSelection | null;
|
|
43
|
-
ready: boolean;
|
|
44
|
-
checkedAt: string | null;
|
|
45
|
-
problem: string | null;
|
|
46
|
-
}
|
package/shared-browser.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type * as acp from "@agentclientprotocol/sdk";
|
|
2
|
-
import type { AsyncResource } from "webappwiz/disposable";
|
|
3
|
-
import type { Logger } from "webappwiz/log";
|
|
4
|
-
import type { Fs, HeavyCap, Ps } from "webappwiz/system";
|
|
5
|
-
import { Duration, type Timer } from "webappwiz/time";
|
|
6
|
-
/** Pinned, so the browser it installs is the one it launches. */
|
|
7
|
-
export declare const PLAYWRIGHT_MCP = "@playwright/mcp@0.0.83";
|
|
8
|
-
/**
|
|
9
|
-
* The name sessions are offered it by, which an agent's own server of that
|
|
10
|
-
* name gives way to, so its tools keep the names they had.
|
|
11
|
-
*/
|
|
12
|
-
export declare const BROWSER_SERVER = "playwright";
|
|
13
|
-
/** How long the browser stays up with no tool call from any session. */
|
|
14
|
-
export declare const IDLE: Duration;
|
|
15
|
-
/**
|
|
16
|
-
* The MCP servers each agent session is offered, beyond its own.
|
|
17
|
-
*/
|
|
18
|
-
export interface SessionServers {
|
|
19
|
-
servers(): Promise<acp.McpServer[]>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* One headless browser for every agent session on the machine: a Playwright
|
|
23
|
-
* MCP over HTTP, started on the first session that asks, giving each session
|
|
24
|
-
* a browser context of its own in one chrome-headless-shell, in place of a
|
|
25
|
-
* full Chrome and an MCP per session. One that cannot start, or dies, is
|
|
26
|
-
* logged and offered to no session, which then runs its agent's own.
|
|
27
|
-
*/
|
|
28
|
-
export declare class SharedBrowser implements SessionServers, AsyncResource {
|
|
29
|
-
private readonly deps;
|
|
30
|
-
/** Where its config is written. */
|
|
31
|
-
private readonly dir;
|
|
32
|
-
/** The MCP while it starts or runs; null before the first ask, or once it died. */
|
|
33
|
-
private running;
|
|
34
|
-
constructor(deps: {
|
|
35
|
-
ps: Ps;
|
|
36
|
-
fs: Fs;
|
|
37
|
-
timer: Timer;
|
|
38
|
-
log: Logger;
|
|
39
|
-
/** Held while the browser installs and its MCP starts. */
|
|
40
|
-
heavy: HeavyCap;
|
|
41
|
-
},
|
|
42
|
-
/** Where its config is written. */
|
|
43
|
-
dir: string);
|
|
44
|
-
servers(): Promise<acp.McpServer[]>;
|
|
45
|
-
disposeAsync(): Promise<void>;
|
|
46
|
-
private start;
|
|
47
|
-
private started;
|
|
48
|
-
/** Where `child` listens, once it says, or null once it dies or `START_WAIT` passes. */
|
|
49
|
-
private listening;
|
|
50
|
-
}
|
package/shell.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Ps, type SpawnCaptureResult, type SpawnOptions, type SpawnResult } from "webappwiz/system";
|
|
2
|
-
/** What a `Shell` spawns through; the real process by default. */
|
|
3
|
-
export interface ShellOptions {
|
|
4
|
-
ps?: Ps;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Runs the commands a repo configures (the lifecycle hooks) as shell strings
|
|
8
|
-
* rather than argv, since that is how a repo writes them.
|
|
9
|
-
*/
|
|
10
|
-
export declare class Shell {
|
|
11
|
-
private readonly ps;
|
|
12
|
-
constructor(opts?: ShellOptions);
|
|
13
|
-
/** Captures output, for commands whose failure has to be reported back. */
|
|
14
|
-
run(command: string, cwd: string, opts?: SpawnOptions): Promise<SpawnCaptureResult>;
|
|
15
|
-
/** Inherits stdio, for commands the agent should watch as they run. */
|
|
16
|
-
stream(command: string, cwd: string, opts?: SpawnOptions): Promise<SpawnResult>;
|
|
17
|
-
}
|