@stringsync/splates 0.0.53 → 0.0.55
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 +7 -24
- package/artifact.d.ts +3 -0
- package/budget.d.ts +3 -0
- package/creds.d.ts +3 -0
- package/flags.d.ts +37 -0
- package/handoff.d.ts +13 -0
- package/hook.d.ts +3 -0
- package/index.d.ts +2 -0
- package/index.js +1844 -0
- package/lane.d.ts +3 -0
- package/notes.d.ts +4 -0
- package/package.json +12 -14
- package/projects.d.ts +3 -0
- package/queue.d.ts +3 -0
- package/replica.d.ts +3 -0
- package/runners.d.ts +3 -0
- package/server.d.ts +6 -0
- package/setup.d.ts +22 -0
- package/slots.d.ts +3 -0
- package/splates.d.ts +10 -0
- package/task.d.ts +3 -0
- package/tunnel.d.ts +3 -0
- package/waiting.d.ts +3 -0
- package/worker.d.ts +3 -0
- package/artifact.ts +0 -120
- package/budget.ts +0 -117
- package/checkout.ts +0 -8
- package/creds.test.ts +0 -336
- package/creds.ts +0 -144
- package/dev/dev.ts +0 -86
- package/dev/eval.ts +0 -21
- package/dev/fix.ts +0 -63
- package/dev/index.ts +0 -1
- package/dev/prove.ts +0 -38
- package/dev/root.ts +0 -7
- package/dev/ship.ts +0 -46
- package/dev/test.ts +0 -154
- package/e2e.test.ts +0 -472
- package/flags.ts +0 -157
- package/hook.ts +0 -328
- package/index.ts +0 -18
- package/infra.ts +0 -107
- package/lane.test.ts +0 -29
- package/lane.ts +0 -172
- package/notes.ts +0 -19
- package/projects.test.ts +0 -191
- package/projects.ts +0 -37
- package/queue.ts +0 -82
- package/screenshots/annotate.png +0 -0
- package/screenshots/demo.png +0 -0
- package/screenshots/parallel.png +0 -0
- package/screenshots/questions.png +0 -0
- package/server.ts +0 -287
- package/setup.ts +0 -233
- package/slots.ts +0 -65
- package/splates.test.ts +0 -338
- package/splates.ts +0 -567
- package/task.ts +0 -354
- package/tunnel.ts +0 -106
- package/wait-journal.test.ts +0 -96
- package/waiting.ts +0 -59
- package/worker-relay.test.ts +0 -233
- package/worker.ts +0 -300
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Keep sensitive information out of them.
|
|
|
62
62
|
**Heavy jobs.** Hooks (`postCheckout`, `postRewrite`, `preMerge`) run in one
|
|
63
63
|
of the machine's heavy-job slots, two by default (`SPLATES_HEAVY_JOBS` sets
|
|
64
64
|
how many), so several agents testing at once queue rather than run the
|
|
65
|
-
machine out of memory. `splates
|
|
65
|
+
machine out of memory. `splates run -- <command>` runs anything else as
|
|
66
66
|
heavy, such as a test suite an agent runs mid-task, in a slot too.
|
|
67
67
|
|
|
68
68
|
**Pushing.** With `remote: "origin"` in `splates.config.ts`, each task's
|
|
@@ -253,26 +253,9 @@ serving on this machine.
|
|
|
253
253
|
|
|
254
254
|
### Worker providers
|
|
255
255
|
|
|
256
|
-
To have splates make workers when agents queue for want of a slot,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
```ts
|
|
261
|
-
import { AwsCloud } from "@stringsync/splates-server/cloud";
|
|
262
|
-
import type { ConfigFile } from "@stringsync/splates-server/config";
|
|
263
|
-
|
|
264
|
-
export default { cloud: new AwsCloud() } satisfies ConfigFile;
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
`AwsCloud` comes with splates, signed with the AWS CLI's sign-in or the
|
|
268
|
-
instance role. Another is a class that implements
|
|
269
|
-
`CloudProvider` from `@stringsync/splates-server/cloud`: making, listing and
|
|
270
|
-
deleting tagged machines, snapshots, SSH keys and firewalls through the
|
|
271
|
-
cloud's API, with its machine types and prices. splates makes both the
|
|
272
|
-
workers and the coordinator's box (`splates server deploy`) over it.
|
|
273
|
-
|
|
274
|
-
For machines that are not a cloud's, give it a `workerProvider` instead, any
|
|
275
|
-
object that implements `WorkerProvider`:
|
|
256
|
+
To have splates make workers when agents queue for want of a slot, give
|
|
257
|
+
`splates.config.ts` a `workerProvider`, in the repo `splates server` starts in,
|
|
258
|
+
any object that implements `WorkerProvider`:
|
|
276
259
|
|
|
277
260
|
```ts
|
|
278
261
|
import type { ConfigFile } from "@stringsync/splates-server/config";
|
|
@@ -306,9 +289,9 @@ rate cap, and `splates worker remove` destroys its machine.
|
|
|
306
289
|
|
|
307
290
|
The worker budget is in dollars, at each type's list price, so every figure is
|
|
308
291
|
an estimate: a rate cap on what the made workers running at once cost an hour
|
|
309
|
-
($
|
|
310
|
-
($
|
|
311
|
-
made, and the queue says which limit holds it, as `rate cap $
|
|
292
|
+
($1/h by default), and limits on what they cost in a day ($15) and a month
|
|
293
|
+
($200), from the start of each in local time. Past the rate cap no worker is
|
|
294
|
+
made, and the queue says which limit holds it, as `rate cap $1.00/h reached`.
|
|
312
295
|
Once a day's or month's limit is spent, made workers take nothing new, their
|
|
313
296
|
agents are asked to stop at a checkpoint, and each is destroyed once its last
|
|
314
297
|
agent ends. Each limit warns at 80%, 90% and 100%, once in its window, by Web
|
package/artifact.d.ts
ADDED
package/budget.d.ts
ADDED
package/creds.d.ts
ADDED
package/flags.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type AgentPick, Offered, type RosterAgent } from "@stringsync/splates-server/models";
|
|
2
|
+
import type { Repository } from "@stringsync/splates-server/records";
|
|
3
|
+
import type { SplatesDeps } from "@stringsync/splates-server/server";
|
|
4
|
+
import { SavedTunnel } from "@stringsync/splates-server/tunnel";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
/** A place in the queue, 1 at the top; absent leaves it to the command. */
|
|
7
|
+
export declare const position: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
8
|
+
/**
|
|
9
|
+
* The agent `--agent`, `--model` and `--effort` name off the roster:
|
|
10
|
+
* undefined when none is given, null for `--agent none`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function assigneeIn(deps: SplatesDeps, agent: string, model: string, effort: string): Promise<AgentPick | null | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* `agent` on `model` off `agents`, at the thinking level `effort` names
|
|
15
|
+
* among those it offers, each left out when empty.
|
|
16
|
+
*/
|
|
17
|
+
export declare function pickIn(deps: SplatesDeps, agents: RosterAgent[], agent: string, model: string, effort: string, data?: Record<string, unknown>): Promise<AgentPick>;
|
|
18
|
+
/**
|
|
19
|
+
* `{ effort }` for the thinking level `effort` names among those `agent`
|
|
20
|
+
* offered when last started, or nothing when it is empty.
|
|
21
|
+
*/
|
|
22
|
+
export declare function effortIn(deps: SplatesDeps, agent: string, effort: string, data?: Record<string, unknown>): Promise<{
|
|
23
|
+
effort?: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** The settings each agent offered when last started, from any project. */
|
|
26
|
+
export declare function offeredOf({ ps, fs }: SplatesDeps): Offered;
|
|
27
|
+
/** The tunnel each slot's home may have saved, for every word of the pool. */
|
|
28
|
+
export declare function slotTunnelsOf({ ps, fs, secrets, }: SplatesDeps): SavedTunnel[];
|
|
29
|
+
/** `--lane 3`, `new` or `none` as a lane; absent leaves it to the command. */
|
|
30
|
+
export declare function laneIn(raw: string): number | "new" | null | undefined;
|
|
31
|
+
/** `--task 3,5` as task numbers, refusing anything that is not one. */
|
|
32
|
+
export declare function taskIds(raw: string): number[];
|
|
33
|
+
/**
|
|
34
|
+
* Which task a command that takes no task name is about, so the journal can
|
|
35
|
+
* name it. `merge` reads it off the current branch.
|
|
36
|
+
*/
|
|
37
|
+
export declare function here({ service, git, ps, project, }: SplatesDeps & Repository): Promise<string | null>;
|
package/handoff.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Set by `checkout.ts` once `splates dev` is mounted on this process. */
|
|
2
|
+
export declare const devMounted: {
|
|
3
|
+
value: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** The nearest directory at or above `cwd` that is a splates checkout. */
|
|
6
|
+
export declare function checkoutAbove(cwd: string): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* The release has no `splates dev`, and would print help and exit 0, which
|
|
9
|
+
* reads as a passing `splates dev test`. Standing in a checkout, run the
|
|
10
|
+
* checkout's own `bin/splates` instead; anywhere else, fail saying so.
|
|
11
|
+
* Returns the exit code, or null when `argv` is no `dev` command.
|
|
12
|
+
*/
|
|
13
|
+
export declare function handOffDev(argv: string[], cwd: string): Promise<number | null>;
|
package/hook.d.ts
ADDED
package/index.d.ts
ADDED