@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/show.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import { type Fs } from "webappwiz/system";
|
|
3
|
-
import { type NamedSystem } from "./systems.js";
|
|
4
|
-
import type { Worktree } from "./worktree.js";
|
|
5
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
6
|
-
/**
|
|
7
|
-
* One task in full: what `list` shows for it, plus the `SPLATES.md` its agent
|
|
8
|
-
* left at the worktree root. Reading a tree this way takes no lease, so it
|
|
9
|
-
* cannot knock the agent driving it off its own work.
|
|
10
|
-
*/
|
|
11
|
-
export declare function show({ service, fs, log }: {
|
|
12
|
-
service: WorktreeService;
|
|
13
|
-
fs: Fs;
|
|
14
|
-
log: Logger;
|
|
15
|
-
}, task: string, opts?: ShowOptions): Promise<void>;
|
|
16
|
-
export interface Details {
|
|
17
|
-
task: string;
|
|
18
|
-
status: string;
|
|
19
|
-
branch: string;
|
|
20
|
-
base: string;
|
|
21
|
-
/** The `splates server` conversation whose agent added it, or null. */
|
|
22
|
-
caller: string | null;
|
|
23
|
-
/**
|
|
24
|
-
* The `splates server` conversation whose agent last took it, or its caller's
|
|
25
|
-
* for a subagent; null for an agent outside the page.
|
|
26
|
-
*/
|
|
27
|
-
takenBy: string | null;
|
|
28
|
-
worktree: string;
|
|
29
|
-
lease: "held" | "stale" | "none";
|
|
30
|
-
ahead: number | null;
|
|
31
|
-
added: number | null;
|
|
32
|
-
removed: number | null;
|
|
33
|
-
age: string | null;
|
|
34
|
-
/** When it was added, which `age` counts from. */
|
|
35
|
-
createdAt: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* The last sign of an agent at work on it: a splates command writing its
|
|
38
|
-
* record, a commit on its branch, or an edit to its SPLATES.md or to a file
|
|
39
|
-
* not yet committed. Null when nothing says.
|
|
40
|
-
*/
|
|
41
|
-
activeAt: string | null;
|
|
42
|
-
escalation: string | null;
|
|
43
|
-
/** The merges it has tried; at `mergeAttemptLimit`, only `splates retry` lets it try again. */
|
|
44
|
-
mergeAttempts: number;
|
|
45
|
-
mergeAttemptLimit: number;
|
|
46
|
-
/** While escalated, when it was; null otherwise. */
|
|
47
|
-
escalatedAt: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* While escalated to be approved, what to look at before approving; null
|
|
50
|
-
* otherwise.
|
|
51
|
-
*/
|
|
52
|
-
review: string | null;
|
|
53
|
-
/**
|
|
54
|
-
* Whether the plan leaves nothing unchecked under `## Blocked` or
|
|
55
|
-
* `## Next`, which `splates merge` and `splates escalate --review` require.
|
|
56
|
-
*/
|
|
57
|
-
ready: boolean;
|
|
58
|
-
plan: string | null;
|
|
59
|
-
/** How the `SPLATES.md` departs from the shape the skill prescribes. */
|
|
60
|
-
planProblems: string[];
|
|
61
|
-
/**
|
|
62
|
-
* Whether `splates add --agent` handed it to an agent that `splates server` has
|
|
63
|
-
* yet to start a conversation with.
|
|
64
|
-
*/
|
|
65
|
-
dispatched: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* The conversation `splates server` started for the agent another conversation
|
|
68
|
-
* handed it to, which answers to that one, its caller, rather than to the
|
|
69
|
-
* user; null for any other task.
|
|
70
|
-
*/
|
|
71
|
-
handedTo: string | null;
|
|
72
|
-
/**
|
|
73
|
-
* The systems its changed files fall in, committed or not, in the order
|
|
74
|
-
* its worktree's `splates.systems.ts` names them.
|
|
75
|
-
*/
|
|
76
|
-
systems: NamedSystem[];
|
|
77
|
-
}
|
|
78
|
-
export interface ShowOptions {
|
|
79
|
-
/** Print the details as JSON instead of prose. */
|
|
80
|
-
json?: boolean;
|
|
81
|
-
}
|
|
82
|
-
/** Configures how {@link TaskDetails} gathers a task's info. */
|
|
83
|
-
export interface TaskDetailsOptions {
|
|
84
|
-
/** What the worktree is read through; the real filesystem by default. */
|
|
85
|
-
fs?: Fs;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Everything there is to say about one task. Split out so `dev` can render the
|
|
89
|
-
* same fields this prints, rather than assembling its own and drifting.
|
|
90
|
-
*/
|
|
91
|
-
export declare class TaskDetails {
|
|
92
|
-
private readonly fs;
|
|
93
|
-
constructor(opts?: TaskDetailsOptions);
|
|
94
|
-
get(worktree: Worktree): Promise<Details>;
|
|
95
|
-
/**
|
|
96
|
-
* The latest of its record's last write, its own latest commit, and the
|
|
97
|
-
* edits to its SPLATES.md and uncommitted files, as `Details.activeAt`.
|
|
98
|
-
*/
|
|
99
|
-
private activeAt;
|
|
100
|
-
/**
|
|
101
|
-
* Read from its own worktree, so a system named during the task counts at
|
|
102
|
-
* once. Its changed files cost three git calls, spent only once there is a
|
|
103
|
-
* system to match them against.
|
|
104
|
-
*/
|
|
105
|
-
private systems;
|
|
106
|
-
}
|
package/skill-checks.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The rules of the splates skill a program can decide, checked over one
|
|
3
|
-
* conversation: what it said and ran, condensed, and what it left behind.
|
|
4
|
-
* `splates server` runs them on its conversations, for the Stats page's pass rate
|
|
5
|
-
* per skill version; the hand-run evals run them on theirs. Rules that take
|
|
6
|
-
* judgment, such as whether a call should have been a question, are left to
|
|
7
|
-
* a model grading the evals.
|
|
8
|
-
*/
|
|
9
|
-
/** Each check's verdicts on one conversation, by its id. */
|
|
10
|
-
export declare function judge(transcript: Transcript, end: EndState): Record<string, Verdict[]>;
|
|
11
|
-
/** A conversation as the checks read it: its own words and acts, in order. */
|
|
12
|
-
export interface Transcript {
|
|
13
|
-
beats: Beat[];
|
|
14
|
-
/**
|
|
15
|
-
* Whether another conversation handed it its task, a lane's orchestrator
|
|
16
|
-
* or an agent relaying for it, so it reports to that conversation, which
|
|
17
|
-
* proposes the next todo in its place.
|
|
18
|
-
*/
|
|
19
|
-
handed: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* One thing said or done. A `user` beat starts a turn. What the agent's
|
|
23
|
-
* subagents did is left out: the rules are the agent's own.
|
|
24
|
-
*/
|
|
25
|
-
export type Beat = {
|
|
26
|
-
kind: "user";
|
|
27
|
-
text: string;
|
|
28
|
-
}
|
|
29
|
-
/** Words the agent said, one stretch of text between its tool calls. */
|
|
30
|
-
| {
|
|
31
|
-
kind: "say";
|
|
32
|
-
text: string;
|
|
33
|
-
}
|
|
34
|
-
/** A shell command, with the end of what it printed and whether it succeeded. */
|
|
35
|
-
| {
|
|
36
|
-
kind: "run";
|
|
37
|
-
command: string;
|
|
38
|
-
output: string;
|
|
39
|
-
ok: boolean;
|
|
40
|
-
}
|
|
41
|
-
/** Files a tool call wrote or edited. */
|
|
42
|
-
| {
|
|
43
|
-
kind: "edit";
|
|
44
|
-
paths: string[];
|
|
45
|
-
};
|
|
46
|
-
/** What the conversation left behind, which its transcript does not say. */
|
|
47
|
-
export interface EndState {
|
|
48
|
-
/** Each task it merged, with the message of each commit that landed. */
|
|
49
|
-
landed: {
|
|
50
|
-
task: string;
|
|
51
|
-
commits: string[];
|
|
52
|
-
}[];
|
|
53
|
-
}
|
|
54
|
-
/** How one place a rule applied went. */
|
|
55
|
-
export interface Verdict {
|
|
56
|
-
ok: boolean;
|
|
57
|
-
/** What was checked, and what was found when it failed. */
|
|
58
|
-
why: string;
|
|
59
|
-
}
|
|
60
|
-
/** A rule a program can decide; `judge` returns no verdicts where it does not apply. */
|
|
61
|
-
export interface Check {
|
|
62
|
-
id: string;
|
|
63
|
-
/** The rule, as the Stats page names it. */
|
|
64
|
-
rule: string;
|
|
65
|
-
judge(transcript: Transcript, end: EndState): Verdict[];
|
|
66
|
-
}
|
|
67
|
-
/** Every check, in the order the Stats page lists them. */
|
|
68
|
-
export declare const CHECKS: readonly Check[];
|
|
69
|
-
/** Each `splates` command `command` runs, by its verb and its words after. */
|
|
70
|
-
export declare function splatesCalls(command: string): {
|
|
71
|
-
verb: string;
|
|
72
|
-
args: string[];
|
|
73
|
-
}[];
|
package/skill-checks.js
DELETED
package/skills.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "webappwiz/log";
|
|
2
|
-
import { ProjectSkills } from "webappwiz/skills";
|
|
3
|
-
import type { Fs, Ps } from "webappwiz/system";
|
|
4
|
-
/**
|
|
5
|
-
* The repository splates's skill comes from: each release is a tag in it, and
|
|
6
|
-
* the skill its `skills/splates/SKILL.md`, which `bunx skills add` finds.
|
|
7
|
-
*/
|
|
8
|
-
export declare const SOURCE = "stringsync/splates";
|
|
9
|
-
/** The skills a project at `root` has, installing splates's from `SOURCE`. */
|
|
10
|
-
export declare function projectSkills(root: string, deps: {
|
|
11
|
-
fs: Fs;
|
|
12
|
-
ps: Ps;
|
|
13
|
-
log: Logger;
|
|
14
|
-
}): ProjectSkills;
|
|
15
|
-
/** The installed splates skill's version, or null when absent or unreadable. */
|
|
16
|
-
export declare function installedVersion(fs: Fs, root: string): Promise<string | null>;
|
package/slot-tunnel.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "webappwiz/log";
|
|
2
|
-
import type { Creds } from "./creds.js";
|
|
3
|
-
import type { SavedTunnel, TunnelRecord } from "./saved-tunnel.js";
|
|
4
|
-
import type { Slot } from "./slots.js";
|
|
5
|
-
/** What the Access application in front of every slot is called. */
|
|
6
|
-
export declare const SLOTS_APP = "splates-slots";
|
|
7
|
-
/** The cred a slot's tunnel token is kept as, on the device. */
|
|
8
|
-
export declare function slotToken({ word }: Slot): string;
|
|
9
|
-
/**
|
|
10
|
-
* Makes what carries `<word>.<zone>` to a slot's `splates server`, beside the
|
|
11
|
-
* tunnel `splates tunnel setup` made, through the API with the same token: the
|
|
12
|
-
* slot's tunnel, `splates-<word>`, the DNS record routing its host to it, and,
|
|
13
|
-
* once for every slot, an Access application in front of `*.<zone>` letting
|
|
14
|
-
* in whom the machine's own lets in. Saves them in the slot's home, so its
|
|
15
|
-
* `splates server` runs them as a bare one runs the machine's. What already exists
|
|
16
|
-
* by name is reused, so running it again is safe.
|
|
17
|
-
*/
|
|
18
|
-
export declare function slotTunnelSetup({ slot, machine, creds, saved, log, fetch, }: {
|
|
19
|
-
slot: Slot;
|
|
20
|
-
/** What `splates tunnel setup` saved, whose zone, team and policy slots share. */
|
|
21
|
-
machine: TunnelRecord;
|
|
22
|
-
creds: Creds;
|
|
23
|
-
/** The slot home's tunnel, saved here. */
|
|
24
|
-
saved: SavedTunnel;
|
|
25
|
-
log: Logger;
|
|
26
|
-
fetch?: typeof globalThis.fetch;
|
|
27
|
-
}): Promise<TunnelRecord>;
|
package/snapshot.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { Fs } from "webappwiz/system";
|
|
2
|
-
import type { CredRequest, Creds } from "./creds.js";
|
|
3
|
-
import type { LaneRecord } from "./lanes.js";
|
|
4
|
-
import type { Behind, Release } from "./release.js";
|
|
5
|
-
import { type Details } from "./show.js";
|
|
6
|
-
import type { Slot } from "./slots.js";
|
|
7
|
-
import type { TodoState } from "./todo.js";
|
|
8
|
-
import type { Todos } from "./todos.js";
|
|
9
|
-
import type { WorktreeService } from "./worktree-service.js";
|
|
10
|
-
/**
|
|
11
|
-
* Everything one page shows: `todo list`, and `list` and `show` for each
|
|
12
|
-
* task.
|
|
13
|
-
*/
|
|
14
|
-
export interface Snapshot {
|
|
15
|
-
/** The repository's directory name, so a page among many says whose it is. */
|
|
16
|
-
repo: string;
|
|
17
|
-
/** Where the repository sits, with the home directory as `~`. */
|
|
18
|
-
path: string;
|
|
19
|
-
/** The main tree, absolute, which agents' file paths start from. */
|
|
20
|
-
root: string;
|
|
21
|
-
/** The directory that holds each task's worktree, absolute. */
|
|
22
|
-
worktreeRoot: string;
|
|
23
|
-
/** Past this age a todo is offered for removal rather than recommended. */
|
|
24
|
-
todoStalenessMs: number;
|
|
25
|
-
todos: TodoState[];
|
|
26
|
-
/** Every lane, in board order, empty ones too. */
|
|
27
|
-
lanes: LaneRecord[];
|
|
28
|
-
/**
|
|
29
|
-
* The name of every lane there has been, those on the board first, to
|
|
30
|
-
* name a lane's orchestrator after it once the lane is done.
|
|
31
|
-
*/
|
|
32
|
-
laneNames: LaneRecord[];
|
|
33
|
-
tasks: Details[];
|
|
34
|
-
/** Every cred agents requested, open or not, the latest first; never a value. */
|
|
35
|
-
creds: CredRequest[];
|
|
36
|
-
/** The branch tasks land on, which the main tree has checked out. */
|
|
37
|
-
trunk: string;
|
|
38
|
-
/** A newer splates than the one serving, once `splates server` has seen one on npm. */
|
|
39
|
-
release: Release | null;
|
|
40
|
-
/** Commits to splates's own source since `splates server` started from it. */
|
|
41
|
-
behind: Behind | null;
|
|
42
|
-
/**
|
|
43
|
-
* Whether building the page failed as `splates server` started, so the page
|
|
44
|
-
* serving is the one built before, and may be out of date.
|
|
45
|
-
*/
|
|
46
|
-
unbuilt: boolean;
|
|
47
|
-
/** The slot `splates server --slot` serves under, shown beside the project's name. */
|
|
48
|
-
slot: Slot | null;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Reads the whole repo the way the CLI's read commands do. Takes no lease, so
|
|
52
|
-
* the page can sit open on a live tree without disturbing the agent in it.
|
|
53
|
-
*/
|
|
54
|
-
export declare function snapshot({ service, todos, creds, fs, home, release, behind, unbuilt, slot, }: {
|
|
55
|
-
service: WorktreeService;
|
|
56
|
-
todos: Todos;
|
|
57
|
-
creds: Creds;
|
|
58
|
-
fs: Fs;
|
|
59
|
-
/** The home directory to show as `~`, when there is one. */
|
|
60
|
-
home?: string;
|
|
61
|
-
release?: Release | null;
|
|
62
|
-
behind?: Behind | null;
|
|
63
|
-
unbuilt?: boolean;
|
|
64
|
-
slot?: Slot | null;
|
|
65
|
-
}): Promise<Snapshot>;
|
|
66
|
-
/** `list` and `show` for each task, as {@link snapshot} reads them. */
|
|
67
|
-
export declare function tasksOf({ service, fs, }: {
|
|
68
|
-
service: WorktreeService;
|
|
69
|
-
fs: Fs;
|
|
70
|
-
}): Promise<Details[]>;
|
|
71
|
-
/**
|
|
72
|
-
* A key that changes only when what the page shows does, to push a snapshot
|
|
73
|
-
* to open pages only when it differs from the last one pushed.
|
|
74
|
-
*/
|
|
75
|
-
export declare function fingerprint({ todos, lanes, laneNames, tasks, creds, release, behind, }: Snapshot): string;
|
package/splates-artifact.d.ts
DELETED
package/splates-creds.d.ts
DELETED
package/splates-dev.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type DevServer } from "./dev.js";
|
|
2
|
-
import type { SplatesDeps } from "./splates.js";
|
|
3
|
-
/**
|
|
4
|
-
* What `splates server` does with its flags: run itself as a supervised child, so
|
|
5
|
-
* the page can restart it, which then serves the page, reached through the
|
|
6
|
-
* tunnel and Access the flags name, or else the ones saved for this machine.
|
|
7
|
-
* It serves every registered project wherever it is started; the page picks
|
|
8
|
-
* which one it shows. The server, from the child; nothing from the
|
|
9
|
-
* supervisor, which exits.
|
|
10
|
-
*/
|
|
11
|
-
export declare function serveDev(ctx: SplatesDeps, opts: DevFlags): Promise<DevServer | undefined>;
|
|
12
|
-
/** The flags `splates server` takes, as `serveDev` reads them. */
|
|
13
|
-
export interface DevFlags {
|
|
14
|
-
port: number;
|
|
15
|
-
"allow-hosts": string;
|
|
16
|
-
"access-team": string;
|
|
17
|
-
"access-aud": string;
|
|
18
|
-
tunnel: string;
|
|
19
|
-
"tunnel-name": string;
|
|
20
|
-
"ports-host": string;
|
|
21
|
-
slot: boolean;
|
|
22
|
-
}
|
package/splates-flags.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { Repository } from "./repository.js";
|
|
3
|
-
import { type AgentPick, Roster, type RosterAgent } from "./roster.js";
|
|
4
|
-
import { SavedPortsHost } from "./saved-ports-host.js";
|
|
5
|
-
import { SavedTunnel } from "./saved-tunnel.js";
|
|
6
|
-
import type { SplatesDeps } from "./splates.js";
|
|
7
|
-
/** A place in the todo list, 1 at the top; absent leaves it to the command. */
|
|
8
|
-
export declare const position: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
9
|
-
/**
|
|
10
|
-
* The agent `--agent` and `--model` name off the roster: undefined when
|
|
11
|
-
* neither is given, null for `--agent none`.
|
|
12
|
-
*/
|
|
13
|
-
export declare function assigneeIn(deps: SplatesDeps, agent: string, model: string): Promise<AgentPick | null | undefined>;
|
|
14
|
-
/** The user's roster, beside the project registry. */
|
|
15
|
-
export declare function rosterOf({ ps, fs }: SplatesDeps): Roster;
|
|
16
|
-
/** The tunnel `splates tunnel setup` saved for this machine. */
|
|
17
|
-
/** The base host `splates server --ports-host` saved for this machine. */
|
|
18
|
-
export declare function savedPortsHostOf({ ps, fs }: SplatesDeps): SavedPortsHost;
|
|
19
|
-
export declare function savedTunnelOf({ ps, fs, secrets, }: SplatesDeps): SavedTunnel;
|
|
20
|
-
/** The tunnel each slot's home may have saved, for every word of the pool. */
|
|
21
|
-
export declare function slotTunnelsOf({ ps, fs, secrets, }: SplatesDeps): SavedTunnel[];
|
|
22
|
-
/** The roster's agents, written out as the defaults first when there is none. */
|
|
23
|
-
export declare function seeded(roster: Roster): Promise<RosterAgent[]>;
|
|
24
|
-
/** `--lane 3`, `new` or `none` as a lane; absent leaves it to the command. */
|
|
25
|
-
export declare function laneIn(raw: string): number | "new" | null | undefined;
|
|
26
|
-
/** `--todo 3,5` as ids, refusing anything that is not one. */
|
|
27
|
-
export declare function todoIds(raw: string): number[];
|
|
28
|
-
/** A comma-separated flag's values, with no empty ones. */
|
|
29
|
-
export declare function commaList(raw: string): string[];
|
|
30
|
-
/**
|
|
31
|
-
* Which task a command that takes no task name is about, so the journal can
|
|
32
|
-
* name it. `merge` and `escalate` read it off the current branch.
|
|
33
|
-
*/
|
|
34
|
-
export declare function here({ service, git, ps, project, }: SplatesDeps & Repository): Promise<string | null>;
|
package/splates-lane.d.ts
DELETED
package/splates-projects.d.ts
DELETED
package/splates-setup.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Setup } from "./setup.js";
|
|
2
|
-
import type { SplatesDeps } from "./splates.js";
|
|
3
|
-
/** This machine's setup, read through `deps`. */
|
|
4
|
-
export declare function setupOf({ fs, ps, secrets, fetch, }: SplatesDeps): Setup;
|
|
5
|
-
/** What `splates setup` was asked for. */
|
|
6
|
-
export interface SetupOptions {
|
|
7
|
-
/** A step's id, or empty for every area's progress. */
|
|
8
|
-
step: string;
|
|
9
|
-
json: boolean;
|
|
10
|
-
skip: boolean;
|
|
11
|
-
unskip: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* `splates setup [step]`: progress by area and the one next step, or one step's
|
|
15
|
-
* why and instructions, after skipping or unskipping it when asked.
|
|
16
|
-
*/
|
|
17
|
-
export declare function setup(deps: SplatesDeps, opts: SetupOptions): Promise<void>;
|
package/splates-slots.d.ts
DELETED
package/splates-todo.d.ts
DELETED
package/stats.d.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import type { Judged } from "./adherence.js";
|
|
2
|
-
import { type Baseline } from "./baselines.js";
|
|
3
|
-
import type { Outcome } from "./outcomes.js";
|
|
4
|
-
import { type MergeFailure, type RemoveReason } from "./worktree.js";
|
|
5
|
-
/** What the Stats page shows: how tasks ended, bar by bar and by who did them. */
|
|
6
|
-
export interface Stats {
|
|
7
|
-
/**
|
|
8
|
-
* Each bar of the period, oldest first, those with nothing ended among
|
|
9
|
-
* them: `start` is when it starts, as an ISO time.
|
|
10
|
-
*/
|
|
11
|
-
buckets: ({
|
|
12
|
-
start: string;
|
|
13
|
-
} & Tally)[];
|
|
14
|
-
/**
|
|
15
|
-
* The as long a span before the period, summed, to compare it with; null
|
|
16
|
-
* for all time, which has nothing before it.
|
|
17
|
-
*/
|
|
18
|
-
previous: Tally | null;
|
|
19
|
-
/** By the model that ended each task in the period, the most first; null for unknown. */
|
|
20
|
-
models: ({
|
|
21
|
-
model: string | null;
|
|
22
|
-
} & Tally)[];
|
|
23
|
-
/**
|
|
24
|
-
* By where the person worked each task in the period from, the most
|
|
25
|
-
* first: null for none, as for an external agent, or one that ended
|
|
26
|
-
* before it was kept.
|
|
27
|
-
*/
|
|
28
|
-
devices: ({
|
|
29
|
-
device: WorkedFrom | null;
|
|
30
|
-
} & Tally)[];
|
|
31
|
-
/** By the main tree each task in the period was in, the most first. */
|
|
32
|
-
projects: ({
|
|
33
|
-
project: string;
|
|
34
|
-
} & Tally)[];
|
|
35
|
-
/**
|
|
36
|
-
* By each system a task in the period touched, the most first: a task
|
|
37
|
-
* counts in each of its systems, and in `null` when it touched none or
|
|
38
|
-
* ended before systems were kept.
|
|
39
|
-
*/
|
|
40
|
-
systems: ({
|
|
41
|
-
system: string | null;
|
|
42
|
-
} & Tally)[];
|
|
43
|
-
/**
|
|
44
|
-
* Who made the calls tasks in the period made, by size: `SIZES` in order, then any
|
|
45
|
-
* other word an older scheme used, then null for those with none, which
|
|
46
|
-
* holds every call from before sizes were kept.
|
|
47
|
-
*/
|
|
48
|
-
sizes: SizeTally[];
|
|
49
|
-
/** When the first outcome was written, the start of what there is to show. */
|
|
50
|
-
since: string | null;
|
|
51
|
-
/**
|
|
52
|
-
* How conversations followed the splates skill, by the version each started
|
|
53
|
-
* on, newest first: over all time, since a version is its own span.
|
|
54
|
-
*/
|
|
55
|
-
skill: SkillVersion[];
|
|
56
|
-
/** Each project's recent merged tasks, to hold one against: over the week before now, whatever the period. */
|
|
57
|
-
baselines: Baseline[];
|
|
58
|
-
}
|
|
59
|
-
/** How a group of ended tasks went, summed. */
|
|
60
|
-
export interface Tally {
|
|
61
|
-
merged: number;
|
|
62
|
-
removed: number;
|
|
63
|
-
/** Of `merged`, those that landed without a person answering a question. */
|
|
64
|
-
clean: number;
|
|
65
|
-
/** Over every task in the group, merged and removed alike. */
|
|
66
|
-
questionRounds: number;
|
|
67
|
-
reviewRounds: number;
|
|
68
|
-
failedMerges: number;
|
|
69
|
-
/** Questions that offered the agent's pick and were answered with a choice. */
|
|
70
|
-
picksAsked: number;
|
|
71
|
-
/** Of `picksAsked`, those answered with another choice. */
|
|
72
|
-
picksOverturned: number;
|
|
73
|
-
/** Of `picksAsked`, those answered with the agent's choice and words added. */
|
|
74
|
-
picksAmended: number;
|
|
75
|
-
/** Calls made without asking. */
|
|
76
|
-
assumptionsMade: number;
|
|
77
|
-
/** Of `assumptionsMade`, those challenged. */
|
|
78
|
-
assumptionsChallenged: number;
|
|
79
|
-
/** Calls the person made: questions put to them, assumptions challenged. */
|
|
80
|
-
decidedByYou: number;
|
|
81
|
-
/** Calls agents made that stood without the person: assumptions left alone. */
|
|
82
|
-
decidedByAgents: number;
|
|
83
|
-
/** Tasks whose time waiting on a person was kept; older ones were not. */
|
|
84
|
-
timed: number;
|
|
85
|
-
/** Of the `timed` tasks, how long they waited on a person, in milliseconds. */
|
|
86
|
-
waitedMs: number;
|
|
87
|
-
/** Of the `timed` tasks, how long they took from add to end, in milliseconds. */
|
|
88
|
-
spentMs: number;
|
|
89
|
-
/** Tasks whose own usage was kept; older ones and external agents' were not. */
|
|
90
|
-
used: number;
|
|
91
|
-
/** Of the `used` tasks, tokens read, those from cache among them, and written. */
|
|
92
|
-
inputTokens: number;
|
|
93
|
-
outputTokens: number;
|
|
94
|
-
/** Of the `used` tasks, those whose agent said what they cost; Codex does not. */
|
|
95
|
-
costed: number;
|
|
96
|
-
/** Of the `costed` tasks, what they cost, summed. */
|
|
97
|
-
cost: number;
|
|
98
|
-
/** Of the `used` tasks, how long their agents worked, in milliseconds. */
|
|
99
|
-
workedMs: number;
|
|
100
|
-
/** Tasks whose diff size was kept. */
|
|
101
|
-
sized: number;
|
|
102
|
-
/** Of the `sized` tasks, the files and lines they changed. */
|
|
103
|
-
filesChanged: number;
|
|
104
|
-
linesAdded: number;
|
|
105
|
-
linesRemoved: number;
|
|
106
|
-
/** Failed merges by why, where it was kept. */
|
|
107
|
-
failedBy: Record<MergeFailure, number>;
|
|
108
|
-
/** Removed tasks by why; `unsaid` for one removed without `--reason`, or before it was kept. */
|
|
109
|
-
removedFor: Record<RemoveReason | "unsaid", number>;
|
|
110
|
-
}
|
|
111
|
-
/** Who made the calls of one size: the person, or agents without asking. */
|
|
112
|
-
export interface SizeTally extends Decided {
|
|
113
|
-
size: string | null;
|
|
114
|
-
/** The same, bar by bar, in the order of `Stats.buckets`. */
|
|
115
|
-
buckets: Decided[];
|
|
116
|
-
/** The same over the as long a span before, as `Stats.previous`; null for all time. */
|
|
117
|
-
previous: Decided | null;
|
|
118
|
-
}
|
|
119
|
-
/** How many calls the person made, and how many agents made without them. */
|
|
120
|
-
export interface Decided {
|
|
121
|
-
decidedByYou: number;
|
|
122
|
-
decidedByAgents: number;
|
|
123
|
-
}
|
|
124
|
-
/** Where the person spoke to a task's conversation from: a phone, a desktop, or both. */
|
|
125
|
-
export type WorkedFrom = "phone" | "desktop" | "both";
|
|
126
|
-
/** Where `outcome`'s prompts came from, or null when none was said from the page. */
|
|
127
|
-
export declare function workedFrom(outcome: Outcome): WorkedFrom | null;
|
|
128
|
-
/**
|
|
129
|
-
* The spans the page can look at, as `?period=` names them: how long each
|
|
130
|
-
* runs back from now, and how long each of its bars is.
|
|
131
|
-
*/
|
|
132
|
-
export declare const PERIODS: {
|
|
133
|
-
readonly "6h": {
|
|
134
|
-
readonly span: number;
|
|
135
|
-
readonly bucket: number;
|
|
136
|
-
};
|
|
137
|
-
readonly "1d": {
|
|
138
|
-
readonly span: number;
|
|
139
|
-
readonly bucket: number;
|
|
140
|
-
};
|
|
141
|
-
readonly "3d": {
|
|
142
|
-
readonly span: number;
|
|
143
|
-
readonly bucket: number;
|
|
144
|
-
};
|
|
145
|
-
readonly "7d": {
|
|
146
|
-
readonly span: number;
|
|
147
|
-
readonly bucket: number;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
/** A span in `PERIODS`, or `all` for all time, a bar a week. */
|
|
151
|
-
export type PeriodId = keyof typeof PERIODS | "all";
|
|
152
|
-
export declare function isPeriodId(value: string): value is PeriodId;
|
|
153
|
-
/** How long each bar of `period` is, in milliseconds: a week for all time. */
|
|
154
|
-
export declare function bucketOf(period: PeriodId): number;
|
|
155
|
-
export interface SummarizeOptions {
|
|
156
|
-
period?: PeriodId;
|
|
157
|
-
now?: Date;
|
|
158
|
-
/** Each conversation's skill checks as last judged. */
|
|
159
|
-
judged?: Judged[];
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Sums the outcomes written so far for the page, over `period`. A part,
|
|
163
|
-
* which lands on its caller's branch rather than trunk, is left out: it is a
|
|
164
|
-
* piece of a task that is counted when its caller ends.
|
|
165
|
-
*/
|
|
166
|
-
export declare function summarize(outcomes: Outcome[], { period, now, judged }?: SummarizeOptions): Stats;
|
|
167
|
-
/** Tallies added up, as for the bars of a period. */
|
|
168
|
-
export declare function combine(tallies: Tally[]): Tally;
|
|
169
|
-
/** How one check went over the conversations on one skill version. */
|
|
170
|
-
export interface CheckRate {
|
|
171
|
-
id: string;
|
|
172
|
-
rule: string;
|
|
173
|
-
/** The conversations it applied in. */
|
|
174
|
-
applied: number;
|
|
175
|
-
/** Of `applied`, those where it passed every time. */
|
|
176
|
-
passed: number;
|
|
177
|
-
}
|
|
178
|
-
/** How the conversations on one splates skill version followed it. */
|
|
179
|
-
export interface SkillVersion {
|
|
180
|
-
/** Null for conversations whose version is unknown. */
|
|
181
|
-
skill: string | null;
|
|
182
|
-
conversations: number;
|
|
183
|
-
checks: CheckRate[];
|
|
184
|
-
}
|
|
185
|
-
/** Each skill version's pass rates, the newest version first and unknown last. */
|
|
186
|
-
export declare function rates(judged: Judged[]): SkillVersion[];
|
package/supervise.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Ps } from "webappwiz/system";
|
|
2
|
-
import { type Timer } from "webappwiz/time";
|
|
3
|
-
/** What a server exits with to be started again as it was. */
|
|
4
|
-
export declare const RESTART = 75;
|
|
5
|
-
/** What a server exits with to be started again on the newest splates. */
|
|
6
|
-
export declare const UPDATE = 76;
|
|
7
|
-
/**
|
|
8
|
-
* Set in the server's environment, so the `splates server` it runs serves rather
|
|
9
|
-
* than supervising another.
|
|
10
|
-
*/
|
|
11
|
-
export declare const SERVING = "SPLATES_DEV_SERVING";
|
|
12
|
-
/**
|
|
13
|
-
* Set in the server's environment to tell it its page failed to build, so
|
|
14
|
-
* the page says it may be out of date.
|
|
15
|
-
*/
|
|
16
|
-
export declare const UNBUILT = "SPLATES_DEV_UNBUILT";
|
|
17
|
-
/** What `supervise` starts the server with, beyond the process it runs in. */
|
|
18
|
-
export interface SuperviseOptions {
|
|
19
|
-
/**
|
|
20
|
-
* Builds the page, run before each start of the same splates, as from a
|
|
21
|
-
* checkout, whose page `bun install` built last and the commits since may
|
|
22
|
-
* have changed, packages they added included; null for one installed from
|
|
23
|
-
* npm, whose page shipped built.
|
|
24
|
-
*/
|
|
25
|
-
build?: {
|
|
26
|
-
argv: string[];
|
|
27
|
-
cwd: string;
|
|
28
|
-
} | null;
|
|
29
|
-
/** Added to the server's environment, as a slot's home is. */
|
|
30
|
-
env?: Record<string, string>;
|
|
31
|
-
/** Where the server runs, the working directory by default. */
|
|
32
|
-
cwd?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The arguments of a worker to run beside the server, as `["worker",
|
|
35
|
-
* "run"]`: started again whenever it ends, on the newest splates once the
|
|
36
|
-
* server updates, and stopped with this. Null for none.
|
|
37
|
-
*/
|
|
38
|
-
worker?: string[] | null;
|
|
39
|
-
timer?: Timer;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Runs `splates server` as a child of this process, sharing its terminal, and
|
|
43
|
-
* starts another each time the child exits to restart: as this one was
|
|
44
|
-
* started, or on the newest splates when it asks to update. Ctrl-C reaches the
|
|
45
|
-
* child too, and its exit ends this. A SIGTERM or SIGHUP to this one stops the
|
|
46
|
-
* child with a SIGTERM and ends this, since the child would otherwise outlive
|
|
47
|
-
* it, listening on its port. A `worker` runs beside it as a second child.
|
|
48
|
-
* Answers with the exit code to end on.
|
|
49
|
-
*/
|
|
50
|
-
export declare function supervise(ps: Ps, { build, env, cwd, worker, timer, }?: SuperviseOptions): Promise<number>;
|