@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/index-43pq33n4.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LEGACY_DIR,
|
|
3
|
-
unmigrated
|
|
4
|
-
} from "./index-k73tsw5g.js";
|
|
5
|
-
import {
|
|
6
|
-
fail
|
|
7
|
-
} from "./index-kaa44k7q.js";
|
|
8
|
-
|
|
9
|
-
// roster.ts
|
|
10
|
-
import { homedir } from "node:os";
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
class Roster2 {
|
|
13
|
-
path;
|
|
14
|
-
deps;
|
|
15
|
-
constructor(path, deps) {
|
|
16
|
-
this.path = path;
|
|
17
|
-
this.deps = deps;
|
|
18
|
-
}
|
|
19
|
-
async seed() {
|
|
20
|
-
if (await this.deps.fs.exists(this.path)) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
await this.deps.fs.mkdir(this.path.slice(0, this.path.lastIndexOf("/")));
|
|
24
|
-
const tmp = `${this.path}.${crypto.randomUUID()}.tmp`;
|
|
25
|
-
await this.deps.fs.write(tmp, `${JSON.stringify({ format: FORMAT, agents: DEFAULT_AGENTS }, null, "\t")}
|
|
26
|
-
`);
|
|
27
|
-
await this.deps.fs.rename(tmp, this.path);
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
async agents() {
|
|
31
|
-
const raw = await this.deps.fs.read(this.path).catch(() => null);
|
|
32
|
-
if (raw === null) {
|
|
33
|
-
return DEFAULT_AGENTS;
|
|
34
|
-
}
|
|
35
|
-
let json;
|
|
36
|
-
try {
|
|
37
|
-
json = JSON.parse(raw);
|
|
38
|
-
} catch {
|
|
39
|
-
fail("usage", `${this.path} is not JSON: fix or delete it`, {
|
|
40
|
-
path: this.path
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
const format = json?.format;
|
|
44
|
-
if (typeof format === "number" && format > FORMAT) {
|
|
45
|
-
fail("outdated", [
|
|
46
|
-
`${this.path} is in format ${format}, written by a newer splates; this one understands up to ${FORMAT}, so it leaves it alone.`,
|
|
47
|
-
"Run `bunx @stringsync/splates@latest` instead."
|
|
48
|
-
].join(`
|
|
49
|
-
`), { path: this.path, format, understood: FORMAT });
|
|
50
|
-
}
|
|
51
|
-
const parsed = schema.safeParse(json);
|
|
52
|
-
if (!parsed.success) {
|
|
53
|
-
const issue = parsed.error.issues[0];
|
|
54
|
-
fail("usage", `${this.path} is not a roster: ${issue?.path.join(".") || "the file"}: ${issue?.message}. Fix it, or delete it for the defaults`, { path: this.path });
|
|
55
|
-
}
|
|
56
|
-
const agents = parsed.data.agents;
|
|
57
|
-
const twice = agents.find((agent, i) => agents.findIndex((each) => each.id === agent.id) !== i);
|
|
58
|
-
if (twice !== undefined) {
|
|
59
|
-
fail("usage", `${this.path} lists agent '${twice.id}' twice: give each its own id`, { path: this.path, agent: twice.id });
|
|
60
|
-
}
|
|
61
|
-
return agents;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
var FORMAT = 1;
|
|
65
|
-
var schema = z.object({
|
|
66
|
-
format: z.number().int().positive().optional(),
|
|
67
|
-
agents: z.array(z.object({
|
|
68
|
-
id: z.string().min(1),
|
|
69
|
-
name: z.string().min(1),
|
|
70
|
-
argv: z.array(z.string()).min(1),
|
|
71
|
-
models: z.array(z.object({
|
|
72
|
-
id: z.string().min(1),
|
|
73
|
-
name: z.string().min(1),
|
|
74
|
-
strengths: z.string(),
|
|
75
|
-
cost: z.string()
|
|
76
|
-
}))
|
|
77
|
-
}))
|
|
78
|
-
});
|
|
79
|
-
var DEFAULT_AGENTS = [
|
|
80
|
-
{
|
|
81
|
-
id: "claude",
|
|
82
|
-
name: "Claude",
|
|
83
|
-
argv: ["bunx", "@agentclientprotocol/claude-agent-acp"],
|
|
84
|
-
models: [
|
|
85
|
-
{
|
|
86
|
-
id: "fable",
|
|
87
|
-
name: "Fable 5.1",
|
|
88
|
-
strengths: "the toughest and longest-running work",
|
|
89
|
-
cost: "highest"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
id: "opus",
|
|
93
|
-
name: "Opus 5.5",
|
|
94
|
-
strengths: "complex work and everyday tasks; Claude's default",
|
|
95
|
-
cost: "high"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "sonnet",
|
|
99
|
-
name: "Sonnet 5.5",
|
|
100
|
-
strengths: "simpler, well-specified tasks",
|
|
101
|
-
cost: "medium"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
id: "haiku",
|
|
105
|
-
name: "Haiku 5.5",
|
|
106
|
-
strengths: "quick answers and mechanical edits",
|
|
107
|
-
cost: "low"
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: "codex",
|
|
113
|
-
name: "Codex",
|
|
114
|
-
argv: ["bunx", "@agentclientprotocol/codex-acp"],
|
|
115
|
-
models: [
|
|
116
|
-
{
|
|
117
|
-
id: "gpt-6-astra",
|
|
118
|
-
name: "6 Astra",
|
|
119
|
-
strengths: "Codex's default, for complex work",
|
|
120
|
-
cost: "high"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: "gpt-6-luna",
|
|
124
|
-
name: "6 Luna",
|
|
125
|
-
strengths: "easier tasks, fast",
|
|
126
|
-
cost: "low"
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
];
|
|
131
|
-
function modelsOf(agent) {
|
|
132
|
-
return "models" in agent ? agent.models : [];
|
|
133
|
-
}
|
|
134
|
-
function pickLabel(pick) {
|
|
135
|
-
return pick.model === undefined ? pick.agent : `${pick.agent} (${pick.model})`;
|
|
136
|
-
}
|
|
137
|
-
function pickAgent(agents, agent, model, data = {}) {
|
|
138
|
-
const found = agents.find((each) => each.id === agent);
|
|
139
|
-
if (found === undefined) {
|
|
140
|
-
fail("usage", `no agent '${agent}' on the roster: use one of ${agents.map((each) => each.id).join(", ")} (\`splates agents\` lists them; ~/.splates/agents.json keeps them)`, { ...data, agent });
|
|
141
|
-
}
|
|
142
|
-
if (model === undefined || found.models.length === 0) {
|
|
143
|
-
return model === undefined ? { agent } : { agent, model };
|
|
144
|
-
}
|
|
145
|
-
const wanted = model.toLowerCase();
|
|
146
|
-
const picked = found.models.find((each) => each.id === model || agent !== "opencode" && !model.includes("/") && !each.id.includes("/") && (each.id.toLowerCase() === wanted || each.name.toLowerCase() === wanted));
|
|
147
|
-
if (picked === undefined) {
|
|
148
|
-
fail("usage", `${found.name} has no model '${model}' on the roster: use one of ${found.models.map((each) => each.id).join(", ")}`, { ...data, agent, model });
|
|
149
|
-
}
|
|
150
|
-
return { agent, model: picked.id };
|
|
151
|
-
}
|
|
152
|
-
function splatesHome(ps) {
|
|
153
|
-
const home = ps.env("HOME") ?? homedir();
|
|
154
|
-
return ps.env("SPLATES_HOME") ?? unmigrated(`${home}/.splates`, `${home}/.${LEGACY_DIR}`);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export { Roster2, DEFAULT_AGENTS, modelsOf, pickLabel, pickAgent, splatesHome };
|