@stringsync/splates 0.0.45 → 0.0.46
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 +729 -26375
- 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/dev-workers.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { AsyncResource } from "webappwiz/disposable";
|
|
2
|
-
import type { Logger } from "webappwiz/log";
|
|
3
|
-
import type { Fs } from "webappwiz/system";
|
|
4
|
-
import type { Connection } from "./dev-sockets.js";
|
|
5
|
-
import type { RemoteWorker } from "./remote-worker.js";
|
|
6
|
-
import { WorkerRegistry } from "./worker-registry.js";
|
|
7
|
-
/** What the worker the supervisor starts beside the server is known by. */
|
|
8
|
-
export declare const LOCAL_WORKER = "local";
|
|
9
|
-
/** What `DevWorkers` answers workers as. */
|
|
10
|
-
export interface DevWorkersOptions {
|
|
11
|
-
/**
|
|
12
|
-
* The session id every worker hears in its welcome: the same across
|
|
13
|
-
* restarts, so a worker keeps what it runs for the next run to take
|
|
14
|
-
* back; new by default, which ends what the worker held.
|
|
15
|
-
*/
|
|
16
|
-
session?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Where `splates server` takes its workers in, as their coordinator: the local
|
|
20
|
-
* worker through a Unix socket only this user may open, and others through
|
|
21
|
-
* `/api/workers`. Nothing places work on them yet; the registry keeps them
|
|
22
|
-
* for what comes next.
|
|
23
|
-
*/
|
|
24
|
-
export declare class DevWorkers implements AsyncResource {
|
|
25
|
-
private readonly log;
|
|
26
|
-
readonly registry: WorkerRegistry;
|
|
27
|
-
/** This machine's worker, which agents run on; work waits for it to join. */
|
|
28
|
-
readonly local: RemoteWorker;
|
|
29
|
-
private listener;
|
|
30
|
-
/** Whether a worker may join: not while what the last run let go of is being taken back. */
|
|
31
|
-
private ready;
|
|
32
|
-
constructor(log: Logger, { session }?: DevWorkersOptions);
|
|
33
|
-
/**
|
|
34
|
-
* Turns workers away until `serving`, while the conversations the last
|
|
35
|
-
* run let go of take their processes back, since a worker's hello
|
|
36
|
-
* settles which channels live on.
|
|
37
|
-
*/
|
|
38
|
-
takingBack(): void;
|
|
39
|
-
/** Lets workers join again. */
|
|
40
|
-
serving(): void;
|
|
41
|
-
/** Hangs up on every worker for a restart, keeping what each runs (see `WorkerRegistry.detach`). */
|
|
42
|
-
detach(): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Listens at `path`, logging rather than failing when it cannot, as when
|
|
45
|
-
* another `splates server` with the same home already does: the page works
|
|
46
|
-
* without workers.
|
|
47
|
-
*/
|
|
48
|
-
listen(path: string, fs: Fs): Promise<void>;
|
|
49
|
-
readonly open: (request: Request, server: Bun.Server<Connection>) => Response | undefined;
|
|
50
|
-
/** `GET /api/workers`: each worker and each refusal, as `splates worker list` shows them. */
|
|
51
|
-
readonly list: () => Promise<Response>;
|
|
52
|
-
/** A worker upgrades; anyone else is asking who has joined, and `guard` decides who may. */
|
|
53
|
-
readonly route: (request: Request, server: Bun.Server<Connection>, guard: (handle: (request: Request) => Promise<Response>) => (request: Request) => Promise<Response>) => Response | undefined | Promise<Response>;
|
|
54
|
-
disposeAsync(): Promise<void>;
|
|
55
|
-
}
|
package/dev.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type AsyncResource } from "webappwiz/disposable";
|
|
2
|
-
import type { DevOptions } from "./dev-options.js";
|
|
3
|
-
import { type DevMachine } from "./dev-project.js";
|
|
4
|
-
export type { DevOptions } from "./dev-options.js";
|
|
5
|
-
export { DEFAULT_PORT, devPorts, PORT_SPAN } from "./dev-ports.js";
|
|
6
|
-
/**
|
|
7
|
-
* Serves what `todo list`, `list` and `show` print as one page that refetches
|
|
8
|
-
* when the repo changes, where a person adds, edits, reorders and removes
|
|
9
|
-
* todos. Anything that moves a task (merge, claim) stays in the CLI, and
|
|
10
|
-
* removing one answers only to this machine's own names, so a page that
|
|
11
|
-
* should not have been reachable can at worst change a todo.
|
|
12
|
-
*
|
|
13
|
-
* Given `conversations`, the page also talks to agents, which run commands on
|
|
14
|
-
* this machine. Those routes answer only to this machine's own names, or,
|
|
15
|
-
* given `access`, to a host `hosts` lets in once Cloudflare Access verified
|
|
16
|
-
* who is asking; without it, a tunnel still reaches no further than the todos.
|
|
17
|
-
*/
|
|
18
|
-
export declare function dev(deps: DevMachine, { ports, hosts, access, tunnel, conversations: converse, shell, transcriber, newest, running, checkEvery, // how often to ask npm for a newer splates
|
|
19
|
-
source, sourceEvery, // how often to read a checkout's last commit
|
|
20
|
-
unbuilt, slot, servers, exit, sensors, heavy, workerSocket, workers: givenWorkers, worker, coordinator, portsHost, pusher, open, }?: DevOptions): Promise<DevServer>;
|
|
21
|
-
/** A running server, and the one thing a caller ever wants to do with it. */
|
|
22
|
-
export interface DevServer extends AsyncResource {
|
|
23
|
-
port: number;
|
|
24
|
-
}
|
package/diff.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** A line of a diff, as assistant-ui's `CodeDiff` draws one. */
|
|
2
|
-
export interface DiffLine {
|
|
3
|
-
kind: "context" | "added" | "removed";
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
/** A run of changed lines and the context around them. */
|
|
7
|
-
export interface Hunk {
|
|
8
|
-
/** Where it is, as git heads it: `@@ -10,6 +10,8 @@`. */
|
|
9
|
-
range: string;
|
|
10
|
-
lines: DiffLine[];
|
|
11
|
-
}
|
|
12
|
-
/** One file's changes. */
|
|
13
|
-
export interface FileDiff {
|
|
14
|
-
path: string;
|
|
15
|
-
/** Where it was, for a file that moved; null otherwise. */
|
|
16
|
-
from: string | null;
|
|
17
|
-
status: "added" | "deleted" | "renamed" | "modified";
|
|
18
|
-
added: number;
|
|
19
|
-
removed: number;
|
|
20
|
-
/** Git says only that it differs, with no lines to show. */
|
|
21
|
-
binary: boolean;
|
|
22
|
-
/** Some of it is not committed yet. */
|
|
23
|
-
uncommitted: boolean;
|
|
24
|
-
hunks: Hunk[];
|
|
25
|
-
}
|
|
26
|
-
/** `git diff` output as files, hunks and lines. */
|
|
27
|
-
export declare function parseDiff(text: string): FileDiff[];
|
|
28
|
-
/** An edit as lines: what it took out, then what it put in. */
|
|
29
|
-
export declare function editLines(old: string | null, now: string): DiffLine[];
|
package/dispatched.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "webappwiz/log";
|
|
2
|
-
import type { Conversations } from "./conversations.js";
|
|
3
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
4
|
-
/**
|
|
5
|
-
* Starts the agent of each task `splates add --agent` or `splates handoff` handed
|
|
6
|
-
* to one and that has none yet, in the task's tree, on the model asked for,
|
|
7
|
-
* told to claim it, or to take it over for a handoff. The
|
|
8
|
-
* conversation it starts goes on the record before the agent is told
|
|
9
|
-
* anything, so a task is started once however often this runs, as long as
|
|
10
|
-
* no two runs overlap. Answers once each is started, not told.
|
|
11
|
-
*/
|
|
12
|
-
export declare function startDispatched({ service, conversations, log, }: {
|
|
13
|
-
service: WorktreeService;
|
|
14
|
-
conversations: Conversations;
|
|
15
|
-
log: Logger;
|
|
16
|
-
}): Promise<void>;
|
package/editors.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The editors a file the page names opens in: the link the browser hands it,
|
|
3
|
-
* and the command `dev` runs on this machine to open the file inside the
|
|
4
|
-
* tree it belongs to, which a link cannot say.
|
|
5
|
-
*/
|
|
6
|
-
export interface Editor {
|
|
7
|
-
id: string;
|
|
8
|
-
/** What the Settings dialog calls it. */
|
|
9
|
-
label: string;
|
|
10
|
-
/** The scheme of its `<scheme>://file/<path>:<line>` links. */
|
|
11
|
-
scheme: string;
|
|
12
|
-
/**
|
|
13
|
-
* The command that opens `tree` as its window and `file` in it, at `line`
|
|
14
|
-
* when there is one; the window alone when `file` is the tree.
|
|
15
|
-
*/
|
|
16
|
-
argv(tree: string, file: string, line: number | null): string[];
|
|
17
|
-
}
|
|
18
|
-
export declare const ZED: Editor;
|
|
19
|
-
/** Every editor, in the order the Settings dialog offers them. */
|
|
20
|
-
export declare const EDITORS: readonly [Editor, Editor, Editor];
|
|
21
|
-
/** The editor `id` names, or null for one this splates does not know. */
|
|
22
|
-
export declare function editorOf(id: string): Editor | null;
|
package/escalate.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import type { Fs, Lock } from "webappwiz/system";
|
|
3
|
-
import type { Facts } from "./events.js";
|
|
4
|
-
import type { Git } from "./git.js";
|
|
5
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
6
|
-
export interface EscalateOptions {
|
|
7
|
-
/** Task to escalate. Defaults to the one `cwd` is a worktree for. */
|
|
8
|
-
task?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Ask a person to approve merging, rather than to answer questions, with
|
|
11
|
-
* the reason as what to look at. Refused until the task is ready to merge:
|
|
12
|
-
* every question under `## Blocked` and step under `## Next` checked.
|
|
13
|
-
*/
|
|
14
|
-
review?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The way out that is not "resolve the conflict badly to finish the task".
|
|
18
|
-
* When both sides restructured the same logic there is no correct merge, only
|
|
19
|
-
* a decision, and that belongs to a human.
|
|
20
|
-
*/
|
|
21
|
-
export declare function escalate({ service, git, lock, log, fs, }: {
|
|
22
|
-
service: WorktreeService;
|
|
23
|
-
git: Git;
|
|
24
|
-
lock: Lock;
|
|
25
|
-
log: Logger;
|
|
26
|
-
fs: Fs;
|
|
27
|
-
}, reason: string, cwd: string, { task, review }?: EscalateOptions): Promise<Facts["escalate"]>;
|
package/events.d.ts
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import type { Question } from "./plan.js";
|
|
2
|
-
import type { FailedTest, RemoveReason } from "./worktree.js";
|
|
3
|
-
/** An escalation that went through, which asks the person to act. */
|
|
4
|
-
export type Escalated = Extract<Event, {
|
|
5
|
-
action: "escalate";
|
|
6
|
-
reason: null;
|
|
7
|
-
}>;
|
|
8
|
-
/** Whether `event` is an escalation that went through. */
|
|
9
|
-
export declare function isEscalation(event: Event): event is Escalated;
|
|
10
|
-
/**
|
|
11
|
-
* What each action's event says beyond what every event does, keyed by the
|
|
12
|
-
* action as `splates log` names it. An action with nothing of its own yet maps
|
|
13
|
-
* to `None`: each slice of the Splates events lane fills in its command's.
|
|
14
|
-
*/
|
|
15
|
-
export interface Facts {
|
|
16
|
-
add: {
|
|
17
|
-
/** The branch the task starts from and merges onto. */
|
|
18
|
-
base: string;
|
|
19
|
-
/** The todos it took, by id. */
|
|
20
|
-
todos: number[];
|
|
21
|
-
/** What `--goal` said done means, or null when the todos seed the Goal. */
|
|
22
|
-
goal: string | null;
|
|
23
|
-
/** The subjects of the todos it took, in order, which seed its Goal. */
|
|
24
|
-
subjects: string[];
|
|
25
|
-
/** The agent it was handed to, or null when this conversation keeps it. */
|
|
26
|
-
agent: string | null;
|
|
27
|
-
/** That agent's model, or null for its own default or no agent. */
|
|
28
|
-
model: string | null;
|
|
29
|
-
};
|
|
30
|
-
claim: {
|
|
31
|
-
/** Whether the task was escalated, so the claim ends a wait on the user. */
|
|
32
|
-
escalated: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Whether the agent claiming is the one the task was handed to with
|
|
35
|
-
* `splates handoff`, taking it over.
|
|
36
|
-
*/
|
|
37
|
-
tookOver: boolean;
|
|
38
|
-
/** What its `SPLATES.md` says done means, as markdown, or "" for nothing yet. */
|
|
39
|
-
goal: string;
|
|
40
|
-
};
|
|
41
|
-
tell: {
|
|
42
|
-
/**
|
|
43
|
-
* The conversation it was said in, the agent the task was handed to. The
|
|
44
|
-
* sender is the event's own `conversation`. The page shows it as no line
|
|
45
|
-
* of its own: the receiving message says where it came from.
|
|
46
|
-
*/
|
|
47
|
-
to: string;
|
|
48
|
-
};
|
|
49
|
-
/** A wait on a task, the event's own: see `Waiting`. */
|
|
50
|
-
wait: Waiting;
|
|
51
|
-
merge: {
|
|
52
|
-
/** The branch it landed on, or was refused landing on. */
|
|
53
|
-
base: string;
|
|
54
|
-
/** The commit the base reached, short. */
|
|
55
|
-
commit: string;
|
|
56
|
-
/**
|
|
57
|
-
* What it touched when it landed, or the files the rebase conflicted in
|
|
58
|
-
* when refused for a conflict. Empty when a refusal names none.
|
|
59
|
-
*/
|
|
60
|
-
files: string[];
|
|
61
|
-
/** The merge attempts it has left. */
|
|
62
|
-
attemptsLeft: number;
|
|
63
|
-
/**
|
|
64
|
-
* The tests the gate named as failing when refused for `tests_failed`,
|
|
65
|
-
* with what each said, so the log shows which ones fail most and why.
|
|
66
|
-
* Empty when the runner named none.
|
|
67
|
-
*/
|
|
68
|
-
failedTests: FailedTest[];
|
|
69
|
-
};
|
|
70
|
-
remove: {
|
|
71
|
-
/** The `--reason` it gave, or null when it gave none. */
|
|
72
|
-
why: RemoveReason | null;
|
|
73
|
-
/** The todos it put back on the list, by id and subject. */
|
|
74
|
-
released: {
|
|
75
|
-
id: number;
|
|
76
|
-
subject: string;
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
escalate: {
|
|
80
|
-
/** Why it needs the person, or for a review, what to look at. */
|
|
81
|
-
about: string;
|
|
82
|
-
/** Whether it asks the person to approve merging, not to answer. */
|
|
83
|
-
review: boolean;
|
|
84
|
-
/** Where it merges once done. */
|
|
85
|
-
base: string;
|
|
86
|
-
/**
|
|
87
|
-
* Its open questions under `## Blocked` as they stood, which the card
|
|
88
|
-
* asks: a report never follows the task afterwards.
|
|
89
|
-
*/
|
|
90
|
-
questions: Question[];
|
|
91
|
-
};
|
|
92
|
-
handoff: {
|
|
93
|
-
/** The roster agent it went to, by its id. */
|
|
94
|
-
agent: string;
|
|
95
|
-
/** Its model, by the id the roster gives it, or null for the agent's own. */
|
|
96
|
-
model: string | null;
|
|
97
|
-
/** Whether the agent answers to the conversation that handed it on. */
|
|
98
|
-
relay: boolean;
|
|
99
|
-
};
|
|
100
|
-
attach: {
|
|
101
|
-
/** The paths it stored, in the order given. */
|
|
102
|
-
stored: string[];
|
|
103
|
-
/** What `--remove` named to drop, each by path or stored name. */
|
|
104
|
-
removed: string[];
|
|
105
|
-
};
|
|
106
|
-
"artifact add": {
|
|
107
|
-
/** The artifact, by name. */
|
|
108
|
-
name: string;
|
|
109
|
-
/** The version it made. */
|
|
110
|
-
version: number;
|
|
111
|
-
/** That version's size. */
|
|
112
|
-
bytes: number;
|
|
113
|
-
};
|
|
114
|
-
"artifact remove": {
|
|
115
|
-
/** The artifact, by name. */
|
|
116
|
-
name: string;
|
|
117
|
-
/** The version that was current. */
|
|
118
|
-
version: number;
|
|
119
|
-
};
|
|
120
|
-
retry: {
|
|
121
|
-
/** The merge attempts the task had spent, which the grant gives it more of. */
|
|
122
|
-
attempts: number;
|
|
123
|
-
};
|
|
124
|
-
"todo add": {
|
|
125
|
-
/** The todo it added, by id. */
|
|
126
|
-
todo: number;
|
|
127
|
-
/** Its line, as the page names it. */
|
|
128
|
-
subject: string;
|
|
129
|
-
/** The lane it went in, or null when it went in none. */
|
|
130
|
-
lane: number | null;
|
|
131
|
-
/** Where it went in the list, 1 at the top. */
|
|
132
|
-
position: number;
|
|
133
|
-
};
|
|
134
|
-
"todo update": {
|
|
135
|
-
/** The todo, by id. */
|
|
136
|
-
todo: number;
|
|
137
|
-
/** Its subject once updated, so a line names it though it was reworded. */
|
|
138
|
-
subject: string;
|
|
139
|
-
/** Only what moved: a key is absent when its part stayed as it was. */
|
|
140
|
-
changed: {
|
|
141
|
-
/** The new subject. */
|
|
142
|
-
subject?: string;
|
|
143
|
-
/** Whether its detail was rewritten. */
|
|
144
|
-
text?: true;
|
|
145
|
-
/** Where it moved to in the list, 1 at the top. */
|
|
146
|
-
position?: number;
|
|
147
|
-
/** The lane it moved to, null for none. */
|
|
148
|
-
lane?: number | null;
|
|
149
|
-
/** Todos it is now blocked by. */
|
|
150
|
-
blocked?: number[];
|
|
151
|
-
/** Todos that no longer block it. */
|
|
152
|
-
unblocked?: number[];
|
|
153
|
-
/** Names of the files attached. */
|
|
154
|
-
attached?: string[];
|
|
155
|
-
/** Names of the files dropped. */
|
|
156
|
-
detached?: string[];
|
|
157
|
-
/** The agent and model it now names, null once it names none. */
|
|
158
|
-
assignee?: {
|
|
159
|
-
agent: string;
|
|
160
|
-
model?: string;
|
|
161
|
-
} | null;
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
"todo take": TodosFacts;
|
|
165
|
-
"todo wait": Waiting & {
|
|
166
|
-
/** The todo, by id. */
|
|
167
|
-
todo: number;
|
|
168
|
-
/** Its subject as the wait began, or null for a todo there is no such thing as. */
|
|
169
|
-
subject: string | null;
|
|
170
|
-
};
|
|
171
|
-
"todo release": TodosFacts;
|
|
172
|
-
"todo remove": TodosFacts;
|
|
173
|
-
"lane add": {
|
|
174
|
-
/** The lane it started, by number. */
|
|
175
|
-
lane: number;
|
|
176
|
-
/** Its name. */
|
|
177
|
-
name: string;
|
|
178
|
-
};
|
|
179
|
-
"lane update": {
|
|
180
|
-
/** The lane, by number. */
|
|
181
|
-
lane: number;
|
|
182
|
-
/** Its name once updated, so a line names it though it was renamed. */
|
|
183
|
-
name: string;
|
|
184
|
-
/** Only what changed: a key is absent when it stayed as it was. */
|
|
185
|
-
changed: {
|
|
186
|
-
/** The new name. */
|
|
187
|
-
name?: string;
|
|
188
|
-
/** Where it moved to among the lanes, 1 the first column. */
|
|
189
|
-
position?: number;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
"lane remove": {
|
|
193
|
-
/** The lane, by the number it had. */
|
|
194
|
-
lane: number;
|
|
195
|
-
/** Its name. */
|
|
196
|
-
name: string;
|
|
197
|
-
/** The todos it held, now in no lane. */
|
|
198
|
-
todos: number[];
|
|
199
|
-
};
|
|
200
|
-
"lane join": None;
|
|
201
|
-
"creds request": {
|
|
202
|
-
/** The cred asked for, as its environment variable. */
|
|
203
|
-
name: string;
|
|
204
|
-
/** Whether it asked, rather than finding the cred already kept. */
|
|
205
|
-
asked: boolean;
|
|
206
|
-
};
|
|
207
|
-
"creds save": None;
|
|
208
|
-
"creds remove": None;
|
|
209
|
-
"creds dismiss": None;
|
|
210
|
-
"creds wait": Waiting & {
|
|
211
|
-
/** The cred waited for, by name. */
|
|
212
|
-
name: string;
|
|
213
|
-
};
|
|
214
|
-
"tunnel setup": None;
|
|
215
|
-
"tunnel remove": None;
|
|
216
|
-
}
|
|
217
|
-
type None = Record<never, never>;
|
|
218
|
-
/**
|
|
219
|
-
* A wait the page counts down: its start shows a line that runs until `until`,
|
|
220
|
-
* and its end says how the wait went, pointing back at its start with `began`.
|
|
221
|
-
*/
|
|
222
|
-
export interface Waiting {
|
|
223
|
-
/** When it gives up, as an ISO time. */
|
|
224
|
-
until: string;
|
|
225
|
-
/** The id of the event it began with, on the one it ends with; null on that first. */
|
|
226
|
-
began: string | null;
|
|
227
|
-
}
|
|
228
|
-
/** The todos a command took, released or removed, as they were named then. */
|
|
229
|
-
interface TodosFacts {
|
|
230
|
-
todos: {
|
|
231
|
-
id: number;
|
|
232
|
-
subject: string;
|
|
233
|
-
}[];
|
|
234
|
-
}
|
|
235
|
-
export type Action = keyof Facts;
|
|
236
|
-
/**
|
|
237
|
-
* Each action's facts by name, as its event records them now: the journal
|
|
238
|
-
* reads an event only when it carries all of them, and none of an action
|
|
239
|
-
* missing here.
|
|
240
|
-
*/
|
|
241
|
-
export declare const FACTS: {
|
|
242
|
-
readonly add: readonly ["base", "todos", "goal", "subjects", "agent", "model"];
|
|
243
|
-
readonly claim: readonly ["escalated", "tookOver", "goal"];
|
|
244
|
-
readonly tell: readonly ["to"];
|
|
245
|
-
readonly wait: readonly ["until", "began"];
|
|
246
|
-
readonly merge: readonly ["base", "commit", "files", "attemptsLeft", "failedTests"];
|
|
247
|
-
readonly remove: readonly ["why", "released"];
|
|
248
|
-
readonly escalate: readonly ["about", "review", "base", "questions"];
|
|
249
|
-
readonly handoff: readonly ["agent", "model", "relay"];
|
|
250
|
-
readonly attach: readonly ["stored", "removed"];
|
|
251
|
-
readonly "artifact add": readonly ["name", "version", "bytes"];
|
|
252
|
-
readonly "artifact remove": readonly ["name", "version"];
|
|
253
|
-
readonly retry: readonly ["attempts"];
|
|
254
|
-
readonly "todo add": readonly ["todo", "subject", "lane", "position"];
|
|
255
|
-
readonly "todo update": readonly ["todo", "subject", "changed"];
|
|
256
|
-
readonly "todo take": readonly ["todos"];
|
|
257
|
-
readonly "todo wait": readonly ["until", "began", "todo", "subject"];
|
|
258
|
-
readonly "todo release": readonly ["todos"];
|
|
259
|
-
readonly "todo remove": readonly ["todos"];
|
|
260
|
-
readonly "lane add": readonly ["lane", "name"];
|
|
261
|
-
readonly "lane update": readonly ["lane", "name", "changed"];
|
|
262
|
-
readonly "lane remove": readonly ["lane", "name", "todos"];
|
|
263
|
-
readonly "lane join": readonly [];
|
|
264
|
-
readonly "creds request": readonly ["name", "asked"];
|
|
265
|
-
readonly "creds save": readonly [];
|
|
266
|
-
readonly "creds remove": readonly [];
|
|
267
|
-
readonly "creds dismiss": readonly [];
|
|
268
|
-
readonly "creds wait": readonly ["until", "began", "name"];
|
|
269
|
-
readonly "tunnel setup": readonly [];
|
|
270
|
-
readonly "tunnel remove": readonly [];
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Whether `event` carries every fact its action records now. One that went
|
|
274
|
-
* through before its action recorded them all does not, and nor does one
|
|
275
|
-
* logged by a newer splates for an action this one does not know.
|
|
276
|
-
*/
|
|
277
|
-
export declare function isCurrent(event: Event): boolean;
|
|
278
|
-
/** What every event carries, whatever its action. */
|
|
279
|
-
interface Common<A extends Action> {
|
|
280
|
-
/** Its own, so a reader following the log takes each event once. */
|
|
281
|
-
id: string;
|
|
282
|
-
at: string;
|
|
283
|
-
action: A;
|
|
284
|
-
/** The task it was about, or null when the command names none. */
|
|
285
|
-
task: string | null;
|
|
286
|
-
/** The refusal reason, or null when the command succeeded. */
|
|
287
|
-
reason: string | null;
|
|
288
|
-
/**
|
|
289
|
-
* The `splates server` conversation that ran it, so the page can show it there,
|
|
290
|
-
* or null for an external agent or the page itself.
|
|
291
|
-
*/
|
|
292
|
-
conversation: string | null;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* One thing that was done, and how it went. A refused command carries only
|
|
296
|
-
* the facts it was asked with, since it never got to learn the rest.
|
|
297
|
-
*/
|
|
298
|
-
export type Event = {
|
|
299
|
-
[A in Action]: (Common<A> & {
|
|
300
|
-
reason: null;
|
|
301
|
-
} & Facts[A]) | (Common<A> & {
|
|
302
|
-
reason: string;
|
|
303
|
-
} & Partial<Facts[A]>);
|
|
304
|
-
}[Action];
|
|
305
|
-
/**
|
|
306
|
-
* What `ctx.journal.record` takes for an action's facts: a value, for what the
|
|
307
|
-
* command was asked with, kept even when it is refused, or a function of what
|
|
308
|
-
* it returned, kept only on success. An action with no facts takes none.
|
|
309
|
-
*/
|
|
310
|
-
export type FactsOf<A extends Action, T> = keyof Facts[A] extends never ? [] : [facts: Facts[A] | ((out: T) => Facts[A])];
|
|
311
|
-
export {};
|
package/everywhere.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Conversation, Conversations } from "./conversations.js";
|
|
2
|
-
import type { Served } from "./dev-project.js";
|
|
3
|
-
import type { Projects } from "./projects.js";
|
|
4
|
-
/**
|
|
5
|
-
* The conversations of every project `splates server` serves, so a conversation
|
|
6
|
-
* that handed out a task in another project than its own hears of, and
|
|
7
|
-
* answers for, the agent it handed it to, as it would one in its own.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Everywhere {
|
|
10
|
-
private readonly placing;
|
|
11
|
-
/** Only the conversations of the project at `root`, as a server of one has them. */
|
|
12
|
-
static onlyHere(root: string, conversations: Conversations): Everywhere;
|
|
13
|
-
/**
|
|
14
|
-
* The conversations of each project in `served`, by its root, those that
|
|
15
|
-
* failed to open left out, each named as `projects` names it.
|
|
16
|
-
*/
|
|
17
|
-
static served(served: Map<string, Promise<Served>>, projects: Projects): Everywhere;
|
|
18
|
-
constructor(placing: Placing);
|
|
19
|
-
/** Every conversation of every project served so far, with its project's main tree. */
|
|
20
|
-
list(): Promise<Placed[]>;
|
|
21
|
-
/** The conversation `id`, of whichever project holds it, or undefined for none. */
|
|
22
|
-
find(id: string): Promise<Placed | undefined>;
|
|
23
|
-
/**
|
|
24
|
-
* How a directive names `task`, of the project at `root`, to a
|
|
25
|
-
* conversation of the project at `to`: bare in its own, else
|
|
26
|
-
* `<slug>/<task>`, which `splates --project <slug>` reaches.
|
|
27
|
-
*/
|
|
28
|
-
taskNamed(task: string, root: string, to: string): Promise<string>;
|
|
29
|
-
}
|
|
30
|
-
/** A conversation, and the main tree of the project it is in. */
|
|
31
|
-
export interface Placed {
|
|
32
|
-
conversation: Conversation;
|
|
33
|
-
root: string;
|
|
34
|
-
}
|
|
35
|
-
/** Where `Everywhere` finds the conversations, and the projects' names. */
|
|
36
|
-
export interface Placing {
|
|
37
|
-
/** Every conversation of every project served so far. */
|
|
38
|
-
list(): Promise<Placed[]>;
|
|
39
|
-
/** What the registry names the project at `root` by. */
|
|
40
|
-
slug(root: string): Promise<string>;
|
|
41
|
-
}
|
package/exhibit.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Something to look at that the skill captions with the one or two calls it
|
|
3
|
-
* shows, as a reply writes it under `### 🖼️ <title>`: a screenshot, a
|
|
4
|
-
* diagram or a snippet.
|
|
5
|
-
*/
|
|
6
|
-
export interface Exhibit {
|
|
7
|
-
/** What it shows, from its heading. */
|
|
8
|
-
title: string;
|
|
9
|
-
/** The screenshot, diagram or snippet, as markdown. */
|
|
10
|
-
body: string;
|
|
11
|
-
}
|
|
12
|
-
/** What the exhibit titled by `line` shows; null for any other line. */
|
|
13
|
-
export declare function exhibitTitle(line: string): string | null;
|
|
14
|
-
/**
|
|
15
|
-
* An assumption's `body` parted into what is to look at, its images and code
|
|
16
|
-
* blocks, as markdown, null when it holds neither, and the words around them.
|
|
17
|
-
*/
|
|
18
|
-
export declare function shownIn(body: string): {
|
|
19
|
-
shown: string | null;
|
|
20
|
-
said: string;
|
|
21
|
-
};
|
package/exit.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { Deps, Middleware } from "webappwiz/cmd";
|
|
2
|
-
/** Exit codes are the API: an agent branches on these, not on prose. */
|
|
3
|
-
export declare const EXIT: {
|
|
4
|
-
readonly usage: 1;
|
|
5
|
-
readonly conflict: 2;
|
|
6
|
-
readonly tests_failed: 3;
|
|
7
|
-
readonly lease_lost: 4;
|
|
8
|
-
readonly budget_exhausted: 5;
|
|
9
|
-
readonly lease_held: 6;
|
|
10
|
-
readonly dirty: 7;
|
|
11
|
-
readonly not_found: 8;
|
|
12
|
-
readonly hook_failed: 9;
|
|
13
|
-
readonly exists: 10;
|
|
14
|
-
readonly orphaned: 11;
|
|
15
|
-
readonly merge_failed: 12;
|
|
16
|
-
readonly already_removed: 13;
|
|
17
|
-
readonly timeout: 14;
|
|
18
|
-
readonly blocked: 16;
|
|
19
|
-
readonly cycle: 18;
|
|
20
|
-
readonly outdated: 19;
|
|
21
|
-
readonly uninitialized: 20;
|
|
22
|
-
readonly too_large: 21;
|
|
23
|
-
readonly dismissed: 22;
|
|
24
|
-
readonly no_secret_store: 23;
|
|
25
|
-
readonly cloudflare: 24;
|
|
26
|
-
readonly requested: 25;
|
|
27
|
-
readonly slots_full: 26;
|
|
28
|
-
readonly slot_running: 27;
|
|
29
|
-
readonly not_granted: 28;
|
|
30
|
-
readonly agents_full: 29;
|
|
31
|
-
};
|
|
32
|
-
export type Reason = keyof typeof EXIT;
|
|
33
|
-
/**
|
|
34
|
-
* A refusal, carrying the reason to branch on, a message to show, and any
|
|
35
|
-
* data worth reporting with it. `exits` turns one into output and a status
|
|
36
|
-
* code.
|
|
37
|
-
*/
|
|
38
|
-
export declare class Exit extends Error {
|
|
39
|
-
readonly reason: Reason;
|
|
40
|
-
readonly data: Record<string, unknown>;
|
|
41
|
-
constructor(reason: Reason, message: string, data?: Record<string, unknown>);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* How a command refuses. Every call site means "and go no further", which is
|
|
45
|
-
* what the `never` return buys: the code below a `fail` is unreachable, and
|
|
46
|
-
* TypeScript narrows accordingly.
|
|
47
|
-
*/
|
|
48
|
-
export declare function fail(reason: Reason, message: string, data?: Record<string, unknown>): never;
|
|
49
|
-
/**
|
|
50
|
-
* Decides what a refusal looks like (a machine-readable reason on stdout, a
|
|
51
|
-
* human explanation on stderr) and is the only place that ends the process.
|
|
52
|
-
* An agent branches on the first and reads the second.
|
|
53
|
-
*/
|
|
54
|
-
export declare function exits<C extends Deps>(): Middleware<C>;
|
package/fact-todos.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import type { Git } from "./git.js";
|
|
3
|
-
import type { Journal } from "./journal.js";
|
|
4
|
-
import type { Outcomes } from "./outcomes.js";
|
|
5
|
-
import type { Todos } from "./todos.js";
|
|
6
|
-
/**
|
|
7
|
-
* Adds a todo, untriaged, for each thing that went worse in `task`'s merge,
|
|
8
|
-
* as its merged card lists them, journaled so the conversation that merged
|
|
9
|
-
* it shows each as an "Added" line the person can remove it from. One whose
|
|
10
|
-
* line is on the list already is not added again.
|
|
11
|
-
*/
|
|
12
|
-
export declare function addFactTodos({ git, outcomes, todos, journal, log, }: {
|
|
13
|
-
git: Git;
|
|
14
|
-
outcomes: Outcomes;
|
|
15
|
-
todos: Todos;
|
|
16
|
-
journal: Journal;
|
|
17
|
-
log: Logger;
|
|
18
|
-
}, task: string): Promise<void>;
|