@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/lane.d.ts
CHANGED
|
@@ -1,55 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { type LaneRecord } from "./lanes.js";
|
|
5
|
-
import type { Todos } from "./todos.js";
|
|
6
|
-
export interface LaneListOptions {
|
|
7
|
-
/** Print the lanes as JSON instead of a table. */
|
|
8
|
-
json?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/** Every lane, with its todos in order, who is on it, and what blocks it. */
|
|
11
|
-
export declare function laneList({ todos, log }: {
|
|
12
|
-
todos: Todos;
|
|
13
|
-
log: Logger;
|
|
14
|
-
}, { json }?: LaneListOptions): Promise<void>;
|
|
15
|
-
export interface LaneShowOptions {
|
|
16
|
-
/** Print the lane as JSON instead of prose. */
|
|
17
|
-
json?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* One lane in full, step by step: what an agent handed `[SPLATES LANE N]`
|
|
21
|
-
* reads to know which todo is next, and whether it is blocked first. For
|
|
22
|
-
* null, the untriaged todos, and how to place them in lanes.
|
|
23
|
-
*/
|
|
24
|
-
export declare function laneShow({ todos, log }: {
|
|
25
|
-
todos: Todos;
|
|
26
|
-
log: Logger;
|
|
27
|
-
}, id: number | null, { json }?: LaneShowOptions): Promise<void>;
|
|
28
|
-
/** Starts an empty lane called `name`, after the others. */
|
|
29
|
-
export declare function laneAdd({ todos, log }: {
|
|
30
|
-
todos: Todos;
|
|
31
|
-
log: Logger;
|
|
32
|
-
}, name: string): Promise<LaneRecord>;
|
|
33
|
-
export interface LaneUpdateOptions {
|
|
34
|
-
/** What it is called from now on. */
|
|
35
|
-
name?: string;
|
|
36
|
-
/** Where it goes among the lanes, 1 the first; the others close up around it. */
|
|
37
|
-
position?: number;
|
|
38
|
-
}
|
|
39
|
-
/** Calls a lane by another name, or moves it among the others. */
|
|
40
|
-
export declare function laneUpdate({ todos, log }: {
|
|
41
|
-
todos: Todos;
|
|
42
|
-
log: Logger;
|
|
43
|
-
}, id: number, { name, position }?: LaneUpdateOptions): Promise<LaneRecord>;
|
|
44
|
-
/** What a lane update changed, for the event: only the parts it was asked to. */
|
|
45
|
-
export declare function laneUpdated(id: number, record: LaneRecord, { name, position }: LaneUpdateOptions): Facts["lane update"];
|
|
46
|
-
/**
|
|
47
|
-
* Runs `drop`, which removes lane `id`, and journals it with the lane's name
|
|
48
|
-
* and the todos it sent back to none, read before it went.
|
|
49
|
-
*/
|
|
50
|
-
export declare function recordLaneRemove(journal: Journal, todos: Todos, id: number, drop: () => Promise<void>): Promise<void>;
|
|
51
|
-
/** Removes a lane, putting its todos back with the untriaged ones. */
|
|
52
|
-
export declare function laneRemove({ todos, log }: {
|
|
53
|
-
todos: Todos;
|
|
54
|
-
log: Logger;
|
|
55
|
-
}, id: number): Promise<void>;
|
|
1
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
2
|
+
/** `splates lane`, which the root cli mounts after `splates todo`. */
|
|
3
|
+
export declare const splatesLane: import("webappwiz/cmd").Cli<SplatesDeps, SplatesDeps>;
|
package/main.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stringsync/splates",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "Runs several AI coding agents on one repository at once, each in its own git worktree",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "stringsync LLC",
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
"directory": "packages/splates"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
|
-
"imports": {
|
|
14
|
-
"#dev/*": "./dev/*"
|
|
15
|
-
},
|
|
16
13
|
"engines": {
|
|
17
14
|
"bun": ">=1.3"
|
|
18
15
|
},
|
|
@@ -20,8 +17,8 @@
|
|
|
20
17
|
"access": "public"
|
|
21
18
|
},
|
|
22
19
|
"dependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"webappwiz": "
|
|
20
|
+
"@stringsync/splates-server": "^0.0.47",
|
|
21
|
+
"webappwiz": "0.0.46",
|
|
25
22
|
"zod": "^4.4.3"
|
|
26
23
|
},
|
|
27
24
|
"main": "./index.js",
|
|
@@ -30,42 +27,6 @@
|
|
|
30
27
|
".": {
|
|
31
28
|
"types": "./index.d.ts",
|
|
32
29
|
"default": "./index.js"
|
|
33
|
-
},
|
|
34
|
-
"./asked": {
|
|
35
|
-
"types": "./asked.d.ts",
|
|
36
|
-
"default": "./asked.js"
|
|
37
|
-
},
|
|
38
|
-
"./probe-runtime": {
|
|
39
|
-
"types": "./probe-runtime.d.ts",
|
|
40
|
-
"default": "./probe-runtime.js"
|
|
41
|
-
},
|
|
42
|
-
"./testing/agent": {
|
|
43
|
-
"types": "./fake-agent.d.ts",
|
|
44
|
-
"default": "./fake-agent.js"
|
|
45
|
-
},
|
|
46
|
-
"./config": {
|
|
47
|
-
"types": "./config.d.ts",
|
|
48
|
-
"default": "./config.js"
|
|
49
|
-
},
|
|
50
|
-
"./heavy": {
|
|
51
|
-
"types": "./heavy.d.ts",
|
|
52
|
-
"default": "./heavy.js"
|
|
53
|
-
},
|
|
54
|
-
"./skill-checks": {
|
|
55
|
-
"types": "./skill-checks.d.ts",
|
|
56
|
-
"default": "./skill-checks.js"
|
|
57
|
-
},
|
|
58
|
-
"./systems": {
|
|
59
|
-
"types": "./systems.d.ts",
|
|
60
|
-
"default": "./systems.js"
|
|
61
|
-
},
|
|
62
|
-
"./tunnel-provider": {
|
|
63
|
-
"types": "./tunnel-provider.d.ts",
|
|
64
|
-
"default": "./tunnel-provider.js"
|
|
65
|
-
},
|
|
66
|
-
"./update": {
|
|
67
|
-
"types": "./update.d.ts",
|
|
68
|
-
"default": "./update.js"
|
|
69
30
|
}
|
|
70
31
|
},
|
|
71
32
|
"bin": {
|
package/projects.d.ts
CHANGED
|
@@ -1,136 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface ProjectRecord {
|
|
5
|
-
/** The main tree's root, never a task's worktree. */
|
|
6
|
-
root: string;
|
|
7
|
-
/** When splates first ran there, as an ISO timestamp. */
|
|
8
|
-
added: string;
|
|
9
|
-
/**
|
|
10
|
-
* What each other project may do here, by its root, those left out
|
|
11
|
-
* `DEFAULT_REACH`.
|
|
12
|
-
*/
|
|
13
|
-
grants?: Record<string, Reach>;
|
|
14
|
-
}
|
|
15
|
-
/** A registered repository, as the registry reads it back. */
|
|
16
|
-
export interface Project extends ProjectRecord {
|
|
17
|
-
/**
|
|
18
|
-
* What a URL names it by: the root's last part, `webappwiz`, with `-2`
|
|
19
|
-
* and on for a second of the same name, in the order they joined.
|
|
20
|
-
*/
|
|
21
|
-
slug: string;
|
|
22
|
-
/** The repository is no longer there: moved or deleted since. */
|
|
23
|
-
gone: boolean;
|
|
24
|
-
}
|
|
25
|
-
/** What `Projects` works with. */
|
|
26
|
-
export interface ProjectsOptions {
|
|
27
|
-
fs: Fs;
|
|
28
|
-
/** Held while the file is rewritten, so two commands never drop each other's. */
|
|
29
|
-
lock: Lock;
|
|
30
|
-
/** The current time; a test passes its own. */
|
|
31
|
-
now?: () => Date;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Every splates project on this machine, kept in one file under the user's
|
|
35
|
-
* home: an explicit roster that `splates init` writes each into, so one
|
|
36
|
-
* `splates server` can find them all without scanning the disk.
|
|
37
|
-
*/
|
|
38
|
-
export declare class Projects {
|
|
39
|
-
/** `~/.splates/projects.json`, or a test's own. */
|
|
40
|
-
readonly path: string;
|
|
41
|
-
private readonly fs;
|
|
42
|
-
private readonly lock;
|
|
43
|
-
private readonly now;
|
|
44
|
-
/**
|
|
45
|
-
* This machine's registry, in `SPLATES_HOME`, `~/.splates` for none, with a
|
|
46
|
-
* lock that counts as stale after `stalenessMs`.
|
|
47
|
-
*/
|
|
48
|
-
static ofMachine({ fs, ps, log }: {
|
|
49
|
-
fs: Fs;
|
|
50
|
-
ps: Ps;
|
|
51
|
-
log: Logger;
|
|
52
|
-
}, stalenessMs?: number): Projects;
|
|
53
|
-
constructor(
|
|
54
|
-
/** `~/.splates/projects.json`, or a test's own. */
|
|
55
|
-
path: string, { fs, lock, now }: ProjectsOptions);
|
|
56
|
-
/**
|
|
57
|
-
* Adds the repository at `root`, once, saying whether it did: registering
|
|
58
|
-
* it again changes nothing.
|
|
59
|
-
*/
|
|
60
|
-
register(root: string): Promise<boolean>;
|
|
61
|
-
/**
|
|
62
|
-
* Makes the registered repository at `root` the one an address naming
|
|
63
|
-
* none shows, as picking it on the page does, saying whether it is
|
|
64
|
-
* registered.
|
|
65
|
-
*/
|
|
66
|
-
focus(root: string): Promise<boolean>;
|
|
67
|
-
/**
|
|
68
|
-
* The project an address naming none shows: the one focused last, else
|
|
69
|
-
* the one focused before it, and so on, else the first registered,
|
|
70
|
-
* skipping those gone; null while there is none.
|
|
71
|
-
*/
|
|
72
|
-
focused(): Promise<Project | null>;
|
|
73
|
-
/**
|
|
74
|
-
* Every registered project, in the order splates first ran in each, those
|
|
75
|
-
* whose repository is gone flagged rather than dropped: one on a drive
|
|
76
|
-
* that is not mounted comes back.
|
|
77
|
-
*/
|
|
78
|
-
list(): Promise<Project[]>;
|
|
79
|
-
/**
|
|
80
|
-
* What the project at `from` may do in the one at `to`: what `to` granted
|
|
81
|
-
* it, else `DEFAULT_REACH`.
|
|
82
|
-
*/
|
|
83
|
-
reach(from: string, to: string): Promise<Reach>;
|
|
84
|
-
/**
|
|
85
|
-
* Lets the project at `from` do as much as `reach` in the registered one
|
|
86
|
-
* at `to`, saying whether `to` is registered.
|
|
87
|
-
*/
|
|
88
|
-
grant(to: string, from: string, reach: Reach): Promise<boolean>;
|
|
89
|
-
/**
|
|
90
|
-
* The registered project a command names as `slug`, refusing one that is
|
|
91
|
-
* not there.
|
|
92
|
-
*/
|
|
93
|
-
named(slug: string): Promise<Project>;
|
|
94
|
-
/**
|
|
95
|
-
* Drops the repository at `root`, saying whether it was there: one gone
|
|
96
|
-
* for good, or one `splates server` should no longer offer.
|
|
97
|
-
*/
|
|
98
|
-
forget(root: string): Promise<boolean>;
|
|
99
|
-
/**
|
|
100
|
-
* Rewrites the file as `edit` says, under the lock, saying whether it
|
|
101
|
-
* did: `edit` returns null to leave it as it is.
|
|
102
|
-
*/
|
|
103
|
-
private change;
|
|
104
|
-
private get dir();
|
|
105
|
-
private read;
|
|
106
|
-
private write;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* What an agent working in one project may do in another through splates,
|
|
110
|
-
* each including those before it: read its tasks, todos, lanes and systems;
|
|
111
|
-
* add todos to its untriaged lane; or hand its tasks to agents and
|
|
112
|
-
* orchestrate them. Grants stop splates commands, not file edits.
|
|
113
|
-
*/
|
|
114
|
-
export declare const REACHES: readonly ["read", "todos", "tasks"];
|
|
115
|
-
export type Reach = (typeof REACHES)[number];
|
|
116
|
-
/** What a project lets another do that it has granted nothing. */
|
|
117
|
-
export declare const DEFAULT_REACH: Reach;
|
|
118
|
-
/** Whether `granted` covers what `needed` asks for. */
|
|
119
|
-
export declare function reaches(granted: Reach, needed: Reach): boolean;
|
|
120
|
-
/**
|
|
121
|
-
* One line telling an agent where a project a prompt names as `#slug` sits,
|
|
122
|
-
* and how to change it:
|
|
123
|
-
*
|
|
124
|
-
* ```
|
|
125
|
-
* #shop is the splates project at /Users/me/shop: read its code there, and land any change to it from a task added there.
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
export declare function projectLine({ slug, root, reach, }: {
|
|
129
|
-
slug: string;
|
|
130
|
-
root: string;
|
|
131
|
-
/**
|
|
132
|
-
* What the project the prompt is in may do there; null when it is that
|
|
133
|
-
* project, or in none.
|
|
134
|
-
*/
|
|
135
|
-
reach: Reach | null;
|
|
136
|
-
}): string;
|
|
1
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
2
|
+
/** `splates projects`, which the root cli mounts after `splates lane`. */
|
|
3
|
+
export declare const splatesProjects: import("webappwiz/cmd").Cli<SplatesDeps, SplatesDeps>;
|
package/queue.d.ts
ADDED
package/setup.d.ts
CHANGED
|
@@ -1,102 +1,20 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
2
|
+
import { Setup } from "@stringsync/splates-server/setup";
|
|
3
|
+
/** What `splates setup` was asked for. */
|
|
4
|
+
export interface SetupOptions {
|
|
5
|
+
/** A step's id, or empty for every area's progress. */
|
|
6
|
+
step: string;
|
|
7
|
+
json: boolean;
|
|
8
|
+
skip: boolean;
|
|
9
|
+
unskip: boolean;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* where each stands.
|
|
12
|
+
* `splates setup [step]`: progress by area and the one next step, or one step's
|
|
13
|
+
* why and instructions, after skipping or unskipping it when asked.
|
|
8
14
|
*/
|
|
9
|
-
export declare
|
|
10
|
-
#private;
|
|
11
|
-
constructor(machine: SetupMachine, areas: readonly SetupArea[]);
|
|
12
|
-
/** The step `id` names, refusing one not on the roster. */
|
|
13
|
-
step(id: string): SetupStep;
|
|
14
|
-
/** Every step checked, by area, and the one to do next. */
|
|
15
|
-
read(): Promise<SetupProgress>;
|
|
16
|
-
/** Stops `id` asking, until `unskip`. */
|
|
17
|
-
skip(id: string): Promise<void>;
|
|
18
|
-
/** Asks for `id` again. */
|
|
19
|
-
unskip(id: string): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Marks setup as seen on this machine, so the page stops nudging a fresh
|
|
22
|
-
* one towards it.
|
|
23
|
-
*/
|
|
24
|
-
see(): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
/** What a step's check reads: this machine's splates home and its device store. */
|
|
27
|
-
export interface SetupMachine {
|
|
28
|
-
/** Explicit checks from the optional native setup panel; never launch on page load. */
|
|
29
|
-
opencode?: OpenCodeSetup;
|
|
30
|
-
fs: Fs;
|
|
31
|
-
/** `~/.splates`, or a test's own. */
|
|
32
|
-
home: string;
|
|
33
|
-
/** The device's secret store, where creds kept for every project live. */
|
|
34
|
-
device: SecretStore;
|
|
35
|
-
/** How a check reaches the network, as for Access; the global one by default. */
|
|
36
|
-
fetch?: typeof globalThis.fetch;
|
|
37
|
-
}
|
|
15
|
+
export declare function setup(deps: SplatesDeps, opts: SetupOptions): Promise<void>;
|
|
38
16
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* stored flag, so a step undone by hand shows as left again.
|
|
17
|
+
* This machine's setup, read through `deps`, for the project `--project`
|
|
18
|
+
* names or the repository the working directory is in, if either.
|
|
42
19
|
*/
|
|
43
|
-
export
|
|
44
|
-
/** How `splates setup <step>` and the page name it, lowercase-with-dashes. */
|
|
45
|
-
readonly id: string;
|
|
46
|
-
readonly title: string;
|
|
47
|
-
/** Why it matters, in a sentence. */
|
|
48
|
-
readonly why: string;
|
|
49
|
-
/** The one thing the user does, in markdown. */
|
|
50
|
-
readonly user: string;
|
|
51
|
-
/** What the agent walking the user through it does, in markdown. */
|
|
52
|
-
readonly agent: string;
|
|
53
|
-
/** An optional step can be left undone for good; a required one cannot. */
|
|
54
|
-
readonly optional: boolean;
|
|
55
|
-
/** The steps that must be done first, on the roster before this one. */
|
|
56
|
-
readonly after: readonly SetupStep[];
|
|
57
|
-
/** The cred the user pastes for it, when that is the one thing they do. */
|
|
58
|
-
readonly cred?: string;
|
|
59
|
-
/** Whether it is done, from real state. */
|
|
60
|
-
check(machine: SetupMachine): Promise<boolean>;
|
|
61
|
-
}
|
|
62
|
-
/** A part of setup, such as remote access, and its steps in order. */
|
|
63
|
-
export interface SetupArea {
|
|
64
|
-
readonly id: string;
|
|
65
|
-
readonly title: string;
|
|
66
|
-
readonly steps: readonly SetupStep[];
|
|
67
|
-
}
|
|
68
|
-
/** A step's state: done and skipped are settled, ready can go now, waiting cannot yet. */
|
|
69
|
-
export type StepStatus = "done" | "skipped" | "ready" | "waiting";
|
|
70
|
-
/** A step as `splates setup --json` and `GET /api/setup` give it. */
|
|
71
|
-
export interface StepProgress {
|
|
72
|
-
id: string;
|
|
73
|
-
title: string;
|
|
74
|
-
why: string;
|
|
75
|
-
user: string;
|
|
76
|
-
agent: string;
|
|
77
|
-
optional: boolean;
|
|
78
|
-
after: string[];
|
|
79
|
-
status: StepStatus;
|
|
80
|
-
/** What went wrong checking it, or null when the check ran. */
|
|
81
|
-
problem: string | null;
|
|
82
|
-
/** The cred the user pastes for it, or null. */
|
|
83
|
-
cred: string | null;
|
|
84
|
-
}
|
|
85
|
-
export interface AreaProgress {
|
|
86
|
-
id: string;
|
|
87
|
-
title: string;
|
|
88
|
-
done: number;
|
|
89
|
-
skipped: number;
|
|
90
|
-
/** Steps neither done nor skipped. */
|
|
91
|
-
left: number;
|
|
92
|
-
steps: StepProgress[];
|
|
93
|
-
}
|
|
94
|
-
export interface SetupProgress {
|
|
95
|
-
areas: AreaProgress[];
|
|
96
|
-
/** The one step to do next, or null when nothing is ready. */
|
|
97
|
-
next: string | null;
|
|
98
|
-
/** Whether no one has opened setup on this machine yet. */
|
|
99
|
-
fresh: boolean;
|
|
100
|
-
/** Whether any required step is neither done nor skipped. */
|
|
101
|
-
required: boolean;
|
|
102
|
-
}
|
|
20
|
+
export declare function setupOf(deps: SplatesDeps): Promise<Setup>;
|
package/slots.d.ts
CHANGED
|
@@ -1,135 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const SERVER_PID = "server.pid";
|
|
5
|
-
/** Set in a slot's server's environment to the word it serves under. */
|
|
6
|
-
export declare const SLOT = "SPLATES_SLOT";
|
|
7
|
-
/**
|
|
8
|
-
* Set in a slot's server's environment to the machine's `SPLATES_HOME`, whose
|
|
9
|
-
* tunnel and slots the page lists to switch between.
|
|
10
|
-
*/
|
|
11
|
-
export declare const MACHINE_HOME = "SPLATES_MACHINE_HOME";
|
|
12
|
-
/**
|
|
13
|
-
* Which tree holds which slot, kept in `~/.splates/slots.json` for every
|
|
14
|
-
* checkout on this machine. A tree holds the same word every time, so its host
|
|
15
|
-
* name is worth writing down, for as long as it owns it: a task's worktree
|
|
16
|
-
* owns its word until the task merges or is removed, which stops its server
|
|
17
|
-
* and gives the word back. The main tree of a splates repository owns none,
|
|
18
|
-
* since every agent of it stands there, so one agent's slot would be every
|
|
19
|
-
* other's to stop. A server left running from a tree that owns its word no
|
|
20
|
-
* more still holds its port and its host, so its word goes to no other tree
|
|
21
|
-
* until `prune` stops it.
|
|
22
|
-
*/
|
|
23
|
-
export declare class Slots {
|
|
24
|
-
/** `~/.splates/slots.json`, or a test's own. */
|
|
25
|
-
readonly path: string;
|
|
26
|
-
private readonly deps;
|
|
27
|
-
constructor(
|
|
28
|
-
/** `~/.splates/slots.json`, or a test's own. */
|
|
29
|
-
path: string, deps: {
|
|
30
|
-
fs: Fs;
|
|
31
|
-
/** Tells whether a slot's last server still runs. */
|
|
32
|
-
ps: Pick<Ps, "pid" | "alive" | "processes" | "spawnCapture">;
|
|
33
|
-
/** Held while claiming, so two trees starting together get a word each. */
|
|
34
|
-
lock: Lock;
|
|
35
|
-
pool?: readonly {
|
|
36
|
-
word: string;
|
|
37
|
-
emoji: string;
|
|
38
|
-
}[];
|
|
39
|
-
});
|
|
40
|
-
/** The machine's slots, read from inside a slot's server too. */
|
|
41
|
-
static ofMachine({ fs, ps, log }: {
|
|
42
|
-
fs: Fs;
|
|
43
|
-
ps: Ps;
|
|
44
|
-
log: Logger;
|
|
45
|
-
}): Slots;
|
|
46
|
-
/**
|
|
47
|
-
* Whether `tree` can own a word: it exists, and is no splates repository's
|
|
48
|
-
* main tree, whose `.git` is a directory holding splates's records rather
|
|
49
|
-
* than a linked worktree's file.
|
|
50
|
-
*/
|
|
51
|
-
owns(tree: string): Promise<boolean>;
|
|
52
|
-
/**
|
|
53
|
-
* The slot `tree` holds, claimed now when it holds none: the first word no
|
|
54
|
-
* tree that owns it holds, and no server still runs on. Throws, naming each
|
|
55
|
-
* holder, when every word is held.
|
|
56
|
-
*/
|
|
57
|
-
claim(tree: string): Promise<Slot>;
|
|
58
|
-
/** The slot's home, its `SPLATES_HOME`: `~/.splates/slots/<word>`. */
|
|
59
|
-
home(slot: Slot): string;
|
|
60
|
-
/**
|
|
61
|
-
* The pid of the slot's last server while it still runs, as one does when
|
|
62
|
-
* its wrapper was killed or its worktree merged; null once it has stopped,
|
|
63
|
-
* or for this process itself.
|
|
64
|
-
*/
|
|
65
|
-
server(slot: Slot): Promise<number | null>;
|
|
66
|
-
/** Each slot a tree that owns it holds, in the pool's order. */
|
|
67
|
-
list(): Promise<{
|
|
68
|
-
slot: Slot;
|
|
69
|
-
tree: string;
|
|
70
|
-
}[]>;
|
|
71
|
-
/** Every claimed word, owned or orphaned, with its server, in the pool's order. */
|
|
72
|
-
status(): Promise<Held[]>;
|
|
73
|
-
/**
|
|
74
|
-
* Stops the slot's server, if one runs, which ends its cloudflared too:
|
|
75
|
-
* a SIGTERM, then a SIGKILL if it outlives `STOP_WAIT`. Answers with the
|
|
76
|
-
* pid it stopped, or null when none ran.
|
|
77
|
-
*/
|
|
78
|
-
stop(slot: Slot): Promise<number | null>;
|
|
79
|
-
/**
|
|
80
|
-
* Gives back the word `tree` holds, stopping its server, as a task's
|
|
81
|
-
* worktree does when it merges or is removed. Answers with what it gave
|
|
82
|
-
* back, or null when the tree held none.
|
|
83
|
-
*/
|
|
84
|
-
release(tree: string): Promise<{
|
|
85
|
-
slot: Slot;
|
|
86
|
-
stopped: number | null;
|
|
87
|
-
} | null>;
|
|
88
|
-
/**
|
|
89
|
-
* Frees every orphaned word, as `status` tells them, stopping its server:
|
|
90
|
-
* the only slots any agent may stop, since each of the rest is a task's.
|
|
91
|
-
* Answers with what it freed.
|
|
92
|
-
*/
|
|
93
|
-
prune(): Promise<Held[]>;
|
|
94
|
-
private read;
|
|
95
|
-
private write;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* The words `splates server --slot` hands out, tried in this order, as
|
|
99
|
-
* sound2score's dev slots are: short animals, spellable into a phone, each
|
|
100
|
-
* with an emoji that is that animal and nothing else.
|
|
101
|
-
* Each one's tunnel is made on its first ever claim and kept, so this is also
|
|
102
|
-
* every host name a slot will ever answer on. When every one is held, add the
|
|
103
|
-
* next: goat 🐐, seal 🦭.
|
|
104
|
-
*/
|
|
105
|
-
export declare const SLOT_POOL: readonly {
|
|
106
|
-
word: string;
|
|
107
|
-
emoji: string;
|
|
108
|
-
}[];
|
|
109
|
-
/** A word of the pool, which names a slot's tunnel, host and home. */
|
|
110
|
-
export interface Slot {
|
|
111
|
-
/** Like "fox". */
|
|
112
|
-
word: string;
|
|
113
|
-
/** Like "🦊": shown beside the project's name while this slot serves it. */
|
|
114
|
-
emoji: string;
|
|
115
|
-
}
|
|
116
|
-
/** What `release` gave back, as `merge` and `remove` report it. */
|
|
117
|
-
export declare function freedLine({ slot, stopped, }: {
|
|
118
|
-
slot: Slot;
|
|
119
|
-
stopped: number | null;
|
|
120
|
-
}): string;
|
|
121
|
-
/** The emoji of `word`, or null for a word not in the pool. */
|
|
122
|
-
export declare function slotOf(word: string): Slot | null;
|
|
123
|
-
/** A claimed word, the tree that holds it, and its server while one runs. */
|
|
124
|
-
export interface Held {
|
|
125
|
-
slot: Slot;
|
|
126
|
-
tree: string;
|
|
127
|
-
/** The pid of its server while one runs, as `server` tells. */
|
|
128
|
-
pid: number | null;
|
|
129
|
-
/**
|
|
130
|
-
* Whether no tree can be said to own it any more: its tree is gone, or is
|
|
131
|
-
* the main tree of a splates repository, which every agent of it shares.
|
|
132
|
-
* Only an orphan's server is any agent's to stop, by `prune`.
|
|
133
|
-
*/
|
|
134
|
-
orphaned: boolean;
|
|
135
|
-
}
|
|
1
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
2
|
+
/** `splates slots`, which the root cli mounts after `splates tunnel`. */
|
|
3
|
+
export declare const splatesSlots: import("webappwiz/cmd").Cli<SplatesDeps, SplatesDeps>;
|
package/splates.d.ts
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Fs } from "webappwiz/system";
|
|
3
|
-
import type { SecretStores } from "./creds.js";
|
|
4
|
-
import type { Assets } from "./dev/assets.js";
|
|
5
|
-
/** Everything `splates` is run with, before the repository middleware adds to it. */
|
|
6
|
-
export interface SplatesDeps extends Deps {
|
|
7
|
-
fs: Fs;
|
|
8
|
-
/**
|
|
9
|
-
* The registered project a leading `--project <slug>` names, which repo
|
|
10
|
-
* commands run on instead of the one the working directory is in.
|
|
11
|
-
*/
|
|
12
|
-
project?: string;
|
|
13
|
-
/** The built page `dev` serves as its preview. */
|
|
14
|
-
assets: Assets;
|
|
15
|
-
/** Where creds are kept; the system's stores by default. */
|
|
16
|
-
secrets?: SecretStores;
|
|
17
|
-
/** How `splates tunnel setup` reaches Cloudflare's API; the global one by default. */
|
|
18
|
-
fetch?: typeof fetch;
|
|
19
|
-
}
|
|
1
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
20
2
|
/**
|
|
21
3
|
* Splits a leading `--project <slug>`, or `--project=<slug>`, off the
|
|
22
4
|
* arguments, for `run` to be handed as `project`.
|