@stringsync/splates 0.0.45 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -9
- package/artifact.d.ts +3 -30
- package/budget.d.ts +3 -0
- package/coordinator.d.ts +3 -0
- package/creds.d.ts +3 -123
- package/flags.d.ts +37 -0
- package/index.js +729 -26375
- package/lane.d.ts +3 -55
- package/main.d.ts +6 -0
- package/package.json +3 -42
- package/projects.d.ts +3 -136
- package/queue.d.ts +3 -0
- package/setup.d.ts +16 -98
- package/slots.d.ts +3 -135
- package/splates.d.ts +1 -19
- package/todo.d.ts +3 -146
- package/{splates-tunnel.d.ts → tunnel.d.ts} +1 -1
- package/{splates-worker.d.ts → worker.d.ts} +1 -1
- package/acp-extensions.d.ts +0 -82
- package/add.d.ts +0 -53
- package/adherence.d.ts +0 -49
- package/age.d.ts +0 -2
- package/agent-connection.d.ts +0 -171
- package/agent-errors.d.ts +0 -2
- package/agent-process.d.ts +0 -65
- package/agent-stream.d.ts +0 -91
- package/agents.d.ts +0 -15
- package/artifact-room.d.ts +0 -47
- package/artifact-viewers.d.ts +0 -6
- package/artifacts.d.ts +0 -161
- package/asked.d.ts +0 -146
- package/asked.js +0 -7
- package/assumed.d.ts +0 -34
- package/attach.d.ts +0 -30
- package/attachments.d.ts +0 -43
- package/baselines.d.ts +0 -55
- package/claim.d.ts +0 -17
- package/cloudflare-api.d.ts +0 -25
- package/cloudflare-error.d.ts +0 -5
- package/cloudflared-tunnel-provider.d.ts +0 -27
- package/codex-limits.d.ts +0 -19
- package/compaction.d.ts +0 -17
- package/config-source.d.ts +0 -13
- package/config.d.ts +0 -98
- package/config.js +0 -7
- package/conversation-archive.d.ts +0 -6
- package/conversation-background.d.ts +0 -21
- package/conversation-choice.d.ts +0 -4
- package/conversation-files.d.ts +0 -51
- package/conversation-given.d.ts +0 -8
- package/conversation-host.d.ts +0 -102
- package/conversation-listing.d.ts +0 -15
- package/conversation-log.d.ts +0 -301
- package/conversation-messages.d.ts +0 -18
- package/conversation-name.d.ts +0 -28
- package/conversation-options.d.ts +0 -73
- package/conversation-reference.d.ts +0 -2
- package/conversation-state.d.ts +0 -472
- package/conversation-turns.d.ts +0 -115
- package/conversation.d.ts +0 -209
- package/conversations.d.ts +0 -140
- package/coordinator-state.d.ts +0 -28
- package/darwin-temperature.d.ts +0 -7
- package/decided.d.ts +0 -18
- package/demo.d.ts +0 -29
- package/dev/api.d.ts +0 -209
- package/dev/assets.d.ts +0 -24
- package/dev/conversation-address.d.ts +0 -47
- package/dev/conversation-feed.d.ts +0 -166
- package/dev/live-stream.d.ts +0 -29
- package/dev/worker.d.ts +0 -33
- package/dev-access.d.ts +0 -61
- package/dev-artifacts.d.ts +0 -22
- package/dev-budgets.d.ts +0 -18
- package/dev-conversation-events.d.ts +0 -39
- package/dev-conversation-routes.d.ts +0 -90
- package/dev-creds.d.ts +0 -17
- package/dev-dictation-connection.d.ts +0 -18
- package/dev-dictation.d.ts +0 -17
- package/dev-http.d.ts +0 -76
- package/dev-open.d.ts +0 -15
- package/dev-options.d.ts +0 -133
- package/dev-outcomes.d.ts +0 -21
- package/dev-pages.d.ts +0 -16
- package/dev-picker.d.ts +0 -57
- package/dev-port-socket.d.ts +0 -26
- package/dev-ports.d.ts +0 -11
- package/dev-project-watch.d.ts +0 -44
- package/dev-project.d.ts +0 -168
- package/dev-push.d.ts +0 -59
- package/dev-restart.d.ts +0 -141
- package/dev-servers.d.ts +0 -30
- package/dev-setup-native.d.ts +0 -23
- package/dev-setup-opencode.d.ts +0 -29
- package/dev-setup.d.ts +0 -16
- package/dev-shell.d.ts +0 -70
- package/dev-slot.d.ts +0 -28
- package/dev-sockets.d.ts +0 -13
- package/dev-task-ports.d.ts +0 -73
- package/dev-tasks.d.ts +0 -20
- package/dev-terminal-connection.d.ts +0 -19
- package/dev-terminal.d.ts +0 -42
- package/dev-todos.d.ts +0 -35
- package/dev-transcriber.d.ts +0 -15
- package/dev-tunnel.d.ts +0 -38
- package/dev-versions.d.ts +0 -53
- package/dev-workers.d.ts +0 -55
- package/dev.d.ts +0 -24
- package/diff.d.ts +0 -29
- package/dispatched.d.ts +0 -16
- package/editors.d.ts +0 -22
- package/escalate.d.ts +0 -27
- package/events.d.ts +0 -311
- package/everywhere.d.ts +0 -41
- package/exhibit.d.ts +0 -21
- package/exit.d.ts +0 -54
- package/fact-todos.d.ts +0 -18
- package/fake-agent.d.ts +0 -107
- package/fake-agent.js +0 -284
- package/finding-facts.d.ts +0 -38
- package/findings.d.ts +0 -84
- package/fold.d.ts +0 -43
- package/follow.d.ts +0 -41
- package/format.d.ts +0 -68
- package/git.d.ts +0 -112
- package/handed-out.d.ts +0 -79
- package/handoff.d.ts +0 -23
- package/heavy-run.d.ts +0 -12
- package/heavy.d.ts +0 -28
- package/heavy.js +0 -16
- package/held.d.ts +0 -22
- package/index-0tfvy823.js +0 -272
- package/index-43pq33n4.js +0 -157
- package/index-4776671w.js +0 -698
- package/index-d4hjrzaq.js +0 -464
- package/index-gcfq7awr.js +0 -740
- package/index-k73tsw5g.js +0 -101
- package/index-kaa44k7q.js +0 -59
- package/index-vcv9m93e.js +0 -1265
- package/index-xmfmy729.js +0 -249
- package/init.d.ts +0 -28
- package/journal.d.ts +0 -57
- package/landed.d.ts +0 -14
- package/lane-todos.d.ts +0 -44
- package/lanes-from-tags.d.ts +0 -17
- package/lanes.d.ts +0 -96
- package/legacy-names.d.ts +0 -70
- package/legacy-ps.d.ts +0 -31
- package/limits.d.ts +0 -32
- package/list.d.ts +0 -18
- package/load-config.d.ts +0 -44
- package/log.d.ts +0 -14
- package/machine.d.ts +0 -42
- package/merge.d.ts +0 -35
- package/migrate-config.d.ts +0 -31
- package/models.d.ts +0 -24
- package/needs.d.ts +0 -115
- package/notices.d.ts +0 -39
- package/offered.d.ts +0 -39
- package/opencode-usage.d.ts +0 -37
- package/outcomes.d.ts +0 -114
- package/path.d.ts +0 -13
- package/plan.d.ts +0 -236
- package/port-forward.d.ts +0 -22
- package/port-pipe.d.ts +0 -36
- package/ports-list.d.ts +0 -19
- package/probe-runtime.d.ts +0 -5
- package/probe-runtime.js +0 -13
- package/project-reaches.d.ts +0 -23
- package/prompts.d.ts +0 -128
- package/pty.d.ts +0 -39
- package/pulse.d.ts +0 -8
- package/recommend.d.ts +0 -31
- package/release.d.ts +0 -41
- package/remote-process.d.ts +0 -26
- package/remote-pty.d.ts +0 -29
- package/remote-worker.d.ts +0 -77
- package/remove.d.ts +0 -31
- package/repository.d.ts +0 -91
- package/retry.d.ts +0 -34
- package/roster.d.ts +0 -63
- package/saved-ports-host.d.ts +0 -25
- package/saved-tunnel.d.ts +0 -44
- package/server-worker-socket.d.ts +0 -21
- package/setup-areas.d.ts +0 -7
- package/setup-opencode-model-error.d.ts +0 -3
- package/setup-opencode-models.d.ts +0 -54
- package/setup-opencode-recipe.d.ts +0 -26
- package/setup-opencode.d.ts +0 -46
- package/shared-browser.d.ts +0 -50
- package/shell.d.ts +0 -17
- package/show.d.ts +0 -106
- package/skill-checks.d.ts +0 -73
- package/skill-checks.js +0 -10
- package/skills.d.ts +0 -16
- package/slot-tunnel.d.ts +0 -27
- package/snapshot.d.ts +0 -75
- package/splates-artifact.d.ts +0 -3
- package/splates-creds.d.ts +0 -3
- package/splates-dev.d.ts +0 -22
- package/splates-flags.d.ts +0 -34
- package/splates-lane.d.ts +0 -3
- package/splates-projects.d.ts +0 -3
- package/splates-setup.d.ts +0 -17
- package/splates-slots.d.ts +0 -3
- package/splates-todo.d.ts +0 -3
- package/stats.d.ts +0 -186
- package/supervise.d.ts +0 -50
- package/system-changes.d.ts +0 -67
- package/system.d.ts +0 -28
- package/systems.d.ts +0 -119
- package/systems.js +0 -21
- package/table.d.ts +0 -5
- package/task-log.d.ts +0 -35
- package/task-ports.d.ts +0 -25
- package/tell.d.ts +0 -47
- package/todo-edit.d.ts +0 -60
- package/todo-file.d.ts +0 -6
- package/todo-lanes.d.ts +0 -82
- package/todo-list.d.ts +0 -26
- package/todo-take.d.ts +0 -27
- package/todos.d.ts +0 -157
- package/tool-calls.d.ts +0 -18
- package/tunnel-provider.d.ts +0 -37
- package/tunnel-provider.js +0 -0
- package/tunnel-remove.d.ts +0 -28
- package/tunnel-setup.d.ts +0 -104
- package/unix-worker-listener.d.ts +0 -23
- package/unix-worker-socket.d.ts +0 -30
- package/update.d.ts +0 -29
- package/update.js +0 -10
- package/vocabulary.d.ts +0 -9
- package/wait.d.ts +0 -36
- package/watch.d.ts +0 -46
- package/watched.d.ts +0 -43
- package/websocket-worker-socket.d.ts +0 -18
- package/worker-call-host.d.ts +0 -51
- package/worker-channel.d.ts +0 -83
- package/worker-connection.d.ts +0 -24
- package/worker-daemon.d.ts +0 -64
- package/worker-git.d.ts +0 -18
- package/worker-list.d.ts +0 -49
- package/worker-machine.d.ts +0 -34
- package/worker-port-host.d.ts +0 -21
- package/worker-process-host.d.ts +0 -29
- package/worker-protocol.d.ts +0 -104
- package/worker-pty-host.d.ts +0 -34
- package/worker-registry.d.ts +0 -68
- package/worker-replay.d.ts +0 -25
- package/worker-run.d.ts +0 -20
- package/worker-session.d.ts +0 -189
- package/worker-socket.d.ts +0 -15
- package/worktree-service.d.ts +0 -113
- package/worktree.d.ts +0 -232
package/dev-restart.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import type { AsyncResource } from "webappwiz/disposable";
|
|
2
|
-
import type { Logger } from "webappwiz/log";
|
|
3
|
-
import type { Fs, Ps } from "webappwiz/system";
|
|
4
|
-
import { type Project, type Served } from "./dev-project.js";
|
|
5
|
-
import type { ServerChoice } from "./dev-servers.js";
|
|
6
|
-
import type { Terminals } from "./dev-terminal.js";
|
|
7
|
-
import type { Versions } from "./dev-versions.js";
|
|
8
|
-
import type { Projects } from "./projects.js";
|
|
9
|
-
import type { WorkerMachine } from "./worker-machine.js";
|
|
10
|
-
/** The projects `splates server` serves, as its restarts reach them. */
|
|
11
|
-
export interface ServedProjects {
|
|
12
|
-
/** Each project opened so far, by root. */
|
|
13
|
-
readonly served: Map<string, Promise<Served>>;
|
|
14
|
-
/** The project at `root`, opened on first asking. */
|
|
15
|
-
servedAt(root: string): Promise<Served>;
|
|
16
|
-
/** The project `slug` names, or the focused one for none. */
|
|
17
|
-
projectNamed(slug: string): Promise<Served>;
|
|
18
|
-
}
|
|
19
|
-
/** What `Restarts` works with: the machine, and what `splates server` holds. */
|
|
20
|
-
export interface RestartsHome {
|
|
21
|
-
fs: Fs;
|
|
22
|
-
ps: Ps;
|
|
23
|
-
log: Logger;
|
|
24
|
-
/** The registry of splates projects. */
|
|
25
|
-
projects: Projects;
|
|
26
|
-
served: ServedProjects;
|
|
27
|
-
terminals: Terminals;
|
|
28
|
-
/** Where agents and shells run, whose process table says what a restart would kill. */
|
|
29
|
-
machine: Pick<WorkerMachine, "processes">;
|
|
30
|
-
/** Stops the whole server, before a restart ends the process. */
|
|
31
|
-
server: AsyncResource;
|
|
32
|
-
/** Hands every agent and shell on a worker to the next run, which takes them back; called before the server stops. */
|
|
33
|
-
handOver(): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
/** What `Restarts` takes from `dev`'s options. */
|
|
36
|
-
export interface RestartsOptions {
|
|
37
|
-
exit: ((code: number) => void) | null;
|
|
38
|
-
open: (root: string) => Promise<Project>;
|
|
39
|
-
/** Every `splates server` on this machine the page can switch to. */
|
|
40
|
-
servers: () => Promise<ServerChoice[]>;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* How `splates server` restarts: the checkpoint a restart waits on, the restart
|
|
44
|
-
* itself, and how this run began. Its handlers are properties, so `dev` hands them to its routes
|
|
45
|
-
* as they are.
|
|
46
|
-
*/
|
|
47
|
-
export declare class Restarts {
|
|
48
|
-
private readonly home;
|
|
49
|
-
private readonly versions;
|
|
50
|
-
private readonly opts;
|
|
51
|
-
/**
|
|
52
|
-
* The restart to follow the checkpoint under way, once every agent has
|
|
53
|
-
* answered, and whether the next run resumes them, or whether it shuts
|
|
54
|
-
* down instead, for the next start to resume them; null for none.
|
|
55
|
-
*/
|
|
56
|
-
private restarting;
|
|
57
|
-
/**
|
|
58
|
-
* How this run began, when a checkpoint's restart started it: its agents
|
|
59
|
-
* `resuming`, told to carry on, until each has.
|
|
60
|
-
*/
|
|
61
|
-
private restarted;
|
|
62
|
-
/**
|
|
63
|
-
* Whether `reopenStopped` has read how this run began, before which a
|
|
64
|
-
* checkpoint left in the logs may yet be one to resume.
|
|
65
|
-
*/
|
|
66
|
-
private began;
|
|
67
|
-
/** This run of `splates server`, so a page can tell it has restarted. */
|
|
68
|
-
private readonly run;
|
|
69
|
-
/**
|
|
70
|
-
* Written by a checkpoint's restart, beside the registry, with the other
|
|
71
|
-
* projects whose agents it stopped, so the next run opens them at once
|
|
72
|
-
* and resumes them.
|
|
73
|
-
*/
|
|
74
|
-
private readonly reopen;
|
|
75
|
-
private readonly peeked;
|
|
76
|
-
constructor(home: RestartsHome, versions: Versions, opts: RestartsOptions);
|
|
77
|
-
/**
|
|
78
|
-
* Opens the projects a restart stopped agents in, and once they are
|
|
79
|
-
* served, tells each agent done with the checkpoint to carry on.
|
|
80
|
-
*/
|
|
81
|
-
reopenStopped(): Promise<void>;
|
|
82
|
-
readonly listProjects: () => Promise<Response>;
|
|
83
|
-
/**
|
|
84
|
-
* Asks every live conversation in each project `projects` names, by slug,
|
|
85
|
-
* for a checkpoint, then restarts, or shuts down when `after` says to,
|
|
86
|
-
* once all of them have answered, stopping other projects' agents as they
|
|
87
|
-
* are; the next run tells each to carry on.
|
|
88
|
-
*/
|
|
89
|
-
readonly checkpointProjects: (request: Request) => Promise<Response>;
|
|
90
|
-
/**
|
|
91
|
-
* Restarts `splates server` now, or with `shutdown` exits for good, without a
|
|
92
|
-
* checkpoint: an agent at work stops mid-turn, and a command it would
|
|
93
|
-
* kill dies with it. The next run starts as if started afresh.
|
|
94
|
-
*/
|
|
95
|
-
readonly powerNow: (request: Request) => Promise<Response>;
|
|
96
|
-
/**
|
|
97
|
-
* Restarts `splates server` now, refused while an agent is at work that a
|
|
98
|
-
* restart would stop (one on a worker carries on through it), or a
|
|
99
|
-
* command it would kill runs: a job in front in a shell, or one an idle
|
|
100
|
-
* agent left running.
|
|
101
|
-
*/
|
|
102
|
-
readonly restartIdle: () => Promise<Response>;
|
|
103
|
-
readonly forgetProject: (request: Request) => Promise<Response>;
|
|
104
|
-
/** Each project opened so far, but those that failed to open. */
|
|
105
|
-
private opened;
|
|
106
|
-
/**
|
|
107
|
-
* What a restart would kill: each command an idle agent left running,
|
|
108
|
-
* unless the agent runs on a worker, which keeps its commands as it keeps
|
|
109
|
-
* it; the page's shells run there too, and stay. An agent at work that a
|
|
110
|
-
* restart would stop holds one off on its own.
|
|
111
|
-
*/
|
|
112
|
-
private holding;
|
|
113
|
-
private checkpointable;
|
|
114
|
-
private live;
|
|
115
|
-
private conversationsIn;
|
|
116
|
-
private waitingIn;
|
|
117
|
-
/**
|
|
118
|
-
* Restarts `splates server` once each checkpoint `asked` has been answered,
|
|
119
|
-
* unless dismissed meanwhile, or with `shutdown`, exits for good, the
|
|
120
|
-
* next start reopening and resuming as a restart would. Without
|
|
121
|
-
* `reopens`, the next run starts as if started afresh, as for a restart
|
|
122
|
-
* with every agent idle.
|
|
123
|
-
*/
|
|
124
|
-
private restartAfter;
|
|
125
|
-
/**
|
|
126
|
-
* Forgets each checkpoint ended with no run under way to restart or
|
|
127
|
-
* resume it: left by a run that stopped without saying to resume, as when
|
|
128
|
-
* killed mid-checkpoint, or in a project opened after the resume. Kept,
|
|
129
|
-
* it would hold Power on a checkpoint nothing ever ends.
|
|
130
|
-
*/
|
|
131
|
-
private forgetStale;
|
|
132
|
-
/** Each conversation a checkpoint has asked, in every project. */
|
|
133
|
-
private checkpointed;
|
|
134
|
-
/**
|
|
135
|
-
* Tells each agent done with the checkpoint to carry on, which ends its
|
|
136
|
-
* checkpoint once said, and forgets the checkpoint of those it missed.
|
|
137
|
-
* One whose agent fails to come back has its checkpoint forgotten too,
|
|
138
|
-
* left failed for the person to open.
|
|
139
|
-
*/
|
|
140
|
-
private carryOn;
|
|
141
|
-
}
|
package/dev-servers.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "webappwiz/log";
|
|
2
|
-
import type { Fs, Ps } from "webappwiz/system";
|
|
3
|
-
import { type SecretStores } from "./creds.js";
|
|
4
|
-
import { type Slot } from "./slots.js";
|
|
5
|
-
/**
|
|
6
|
-
* A `splates server` on this machine the page can switch to: the machine's own,
|
|
7
|
-
* reached at the host `splates tunnel setup` made, or a slot's.
|
|
8
|
-
*/
|
|
9
|
-
export interface ServerChoice {
|
|
10
|
-
/** The slot it serves under; null for the machine's own. */
|
|
11
|
-
slot: Slot | null;
|
|
12
|
-
/** Its page, as in https://fox.example.com. */
|
|
13
|
-
url: string;
|
|
14
|
-
/** The checkout that holds the slot; null for the machine's own. */
|
|
15
|
-
tree: string | null;
|
|
16
|
-
/** Whether it is the one serving this page. */
|
|
17
|
-
here: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Every `splates server` this machine has a host for: its own, then each slot a
|
|
21
|
-
* checkout that still exists holds, in the pool's order, whether or not it
|
|
22
|
-
* runs. Read from the machine's home, which a slot's server is told of, since
|
|
23
|
-
* its own `SPLATES_HOME` is the slot's.
|
|
24
|
-
*/
|
|
25
|
-
export declare function devServers({ fs, ps, log, secrets, }: {
|
|
26
|
-
fs: Fs;
|
|
27
|
-
ps: Ps;
|
|
28
|
-
log: Logger;
|
|
29
|
-
secrets?: SecretStores;
|
|
30
|
-
}): Promise<ServerChoice[]>;
|
package/dev-setup-native.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Ps } from "webappwiz/system";
|
|
2
|
-
import type { Connection } from "./dev-sockets.js";
|
|
3
|
-
/** Releases the single native setup slot when its command ends. */
|
|
4
|
-
export interface NativeSetupOwner {
|
|
5
|
-
finished(): void;
|
|
6
|
-
}
|
|
7
|
-
/** A single ephemeral native command. Input/output are never persisted or logged. */
|
|
8
|
-
export declare class NativeSetupConnection implements Connection {
|
|
9
|
-
private readonly ps;
|
|
10
|
-
private readonly argv;
|
|
11
|
-
private readonly cwd;
|
|
12
|
-
private readonly owner;
|
|
13
|
-
private child;
|
|
14
|
-
private socket;
|
|
15
|
-
private timer;
|
|
16
|
-
private disposed;
|
|
17
|
-
constructor(ps: Ps, argv: string[], cwd: string, owner: NativeSetupOwner);
|
|
18
|
-
open(socket: Bun.ServerWebSocket<Connection>): void;
|
|
19
|
-
message(_socket: Bun.ServerWebSocket<Connection>, message: string | Buffer<ArrayBuffer>): void;
|
|
20
|
-
closed(): void;
|
|
21
|
-
private finish;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
}
|
package/dev-setup-opencode.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Ps } from "webappwiz/system";
|
|
2
|
-
import { type HostGate } from "./dev-http.js";
|
|
3
|
-
import type { Connection } from "./dev-sockets.js";
|
|
4
|
-
import { type OpenCodeSetup } from "./setup-opencode.js";
|
|
5
|
-
/** Local/Access-protected setup operations, with no conversation or worker log. */
|
|
6
|
-
export declare class OpenCodeSetupRoutes {
|
|
7
|
-
readonly setup: OpenCodeSetup;
|
|
8
|
-
private readonly ps;
|
|
9
|
-
private readonly gate;
|
|
10
|
-
private readonly roster;
|
|
11
|
-
private terminal;
|
|
12
|
-
constructor(setup: OpenCodeSetup, ps: Ps, gate: HostGate, roster?: SetupRoster);
|
|
13
|
-
readonly read: () => Promise<Response>;
|
|
14
|
-
readonly check: () => Promise<Response>;
|
|
15
|
-
readonly cancel: () => Promise<Response>;
|
|
16
|
-
readonly models: () => Promise<Response>;
|
|
17
|
-
readonly refreshModels: () => Promise<Response>;
|
|
18
|
-
readonly previewModels: (request: Request) => Promise<Response>;
|
|
19
|
-
readonly applyModels: (request: Request) => Promise<Response>;
|
|
20
|
-
readiness(cwd: string, verify: boolean): Promise<Response>;
|
|
21
|
-
readonly disable: () => Promise<Response>;
|
|
22
|
-
private modelOperation;
|
|
23
|
-
readonly open: (request: Request, server: Bun.Server<Connection>) => Promise<Response | undefined>;
|
|
24
|
-
finished(): void;
|
|
25
|
-
disposeAsync(): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export interface SetupRoster {
|
|
28
|
-
refresh(): Promise<void>;
|
|
29
|
-
}
|
package/dev-setup.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Setup } from "./setup.js";
|
|
2
|
-
/**
|
|
3
|
-
* How the page reads this machine's setup and skips its steps. Not any
|
|
4
|
-
* project's: every page on the server shares one machine. Each handler is a
|
|
5
|
-
* property, so `dev` hands them straight to its routes.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SetupRoutes {
|
|
8
|
-
#private;
|
|
9
|
-
constructor(setup: Setup);
|
|
10
|
-
/** Every step checked, by area, and the one to do next. */
|
|
11
|
-
readonly read: () => Promise<Response>;
|
|
12
|
-
/** Marks setup seen, so the page stops nudging towards it. */
|
|
13
|
-
readonly see: () => Promise<Response>;
|
|
14
|
-
/** Skips the step `/api/setup/:step/skipped` names, or asks for it again. */
|
|
15
|
-
readonly skip: (request: Request) => Promise<Response>;
|
|
16
|
-
}
|
package/dev-shell.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { AsyncResource } from "webappwiz/disposable";
|
|
2
|
-
import type { ProcessEntry } from "webappwiz/system";
|
|
3
|
-
import { Duration, type Timer } from "webappwiz/time";
|
|
4
|
-
import type { ProcessHandle } from "./agent-process.js";
|
|
5
|
-
import type { Connection } from "./dev-sockets.js";
|
|
6
|
-
import type { RemotePty } from "./remote-pty.js";
|
|
7
|
-
import type { RemotePtyOptions } from "./remote-worker.js";
|
|
8
|
-
/** Bigger than any screen, and small enough that a typo cannot hurt. */
|
|
9
|
-
export declare const MAX_SIZE = 1000;
|
|
10
|
-
/**
|
|
11
|
-
* How long a keyed shell stays once its page's socket goes, for the page to
|
|
12
|
-
* come back to it: through a reload, or a restart of `splates server`.
|
|
13
|
-
*/
|
|
14
|
-
export declare const TERMINAL_GRACE: Duration;
|
|
15
|
-
/** The shells a terminal opens, as a worker runs them. */
|
|
16
|
-
export type TerminalShell = RemotePty;
|
|
17
|
-
/** What a terminal needs of the worker it runs on. */
|
|
18
|
-
export interface ShellHost {
|
|
19
|
-
pty(options: RemotePtyOptions): TerminalShell;
|
|
20
|
-
/** Takes back a shell the worker kept through a restart; see `RemoteWorker.resumePty`. */
|
|
21
|
-
resumePty(handle: ProcessHandle): TerminalShell;
|
|
22
|
-
processes(): Promise<ProcessEntry[]>;
|
|
23
|
-
}
|
|
24
|
-
/** A shell handed to the next run of `splates server`, as `coordinator.json` keeps it. */
|
|
25
|
-
export interface KeptShell {
|
|
26
|
-
key: string;
|
|
27
|
-
handle: ProcessHandle;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* One shell the server runs for a page's terminal, by its key: the page's
|
|
31
|
-
* socket shows it, and may go and come back, through a reload or a restart
|
|
32
|
-
* of `splates server`, the worker redrawing the screen for the one that comes
|
|
33
|
-
* back. One with no key ends with its socket; one with a key stays
|
|
34
|
-
* `TERMINAL_GRACE` after it, or until the page says it is closing it.
|
|
35
|
-
*/
|
|
36
|
-
export declare class Shell implements AsyncResource {
|
|
37
|
-
readonly key: string | null;
|
|
38
|
-
readonly pty: TerminalShell;
|
|
39
|
-
/** The worker the shell runs on, where its job in front is read from. */
|
|
40
|
-
private readonly worker;
|
|
41
|
-
private readonly timer;
|
|
42
|
-
/** Hears that the shell is gone: exited, closed, or let go. */
|
|
43
|
-
private readonly gone;
|
|
44
|
-
private socket;
|
|
45
|
-
private grace;
|
|
46
|
-
private ended;
|
|
47
|
-
constructor(key: string | null, pty: TerminalShell,
|
|
48
|
-
/** The worker the shell runs on, where its job in front is read from. */
|
|
49
|
-
worker: ShellHost, timer: Timer,
|
|
50
|
-
/** Hears that the shell is gone: exited, closed, or let go. */
|
|
51
|
-
gone: (shell: Shell) => void);
|
|
52
|
-
/** What the next run takes the shell back by, once it has a key. */
|
|
53
|
-
get kept(): KeptShell | null;
|
|
54
|
-
/**
|
|
55
|
-
* Shows the shell on `socket`, in place of any before it: one come back
|
|
56
|
-
* to a shell has the worker redraw its screen first.
|
|
57
|
-
*/
|
|
58
|
-
attach(socket: Bun.ServerWebSocket<Connection>, back: boolean): void;
|
|
59
|
-
/** Keeps the shell `TERMINAL_GRACE` for a page to come back to it. */
|
|
60
|
-
wait(): void;
|
|
61
|
-
/** The page's `socket` went: keyed, the shell waits for it to come back. */
|
|
62
|
-
detach(socket: Bun.ServerWebSocket<Connection>): void;
|
|
63
|
-
message(socket: Bun.ServerWebSocket<Connection>, message: string | Buffer<ArrayBuffer>): void;
|
|
64
|
-
/** Tells the page what the shell runs in front, or null at its prompt. */
|
|
65
|
-
private front;
|
|
66
|
-
/** Lets go of the shell for the next run to take back, without ending it. */
|
|
67
|
-
release(): void;
|
|
68
|
-
/** Hangs up, as closing a terminal window does. */
|
|
69
|
-
disposeAsync(): Promise<void>;
|
|
70
|
-
}
|
package/dev-slot.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type Logger } from "webappwiz/log";
|
|
2
|
-
import { type Slot, Slots } from "./slots.js";
|
|
3
|
-
import type { SplatesDeps } from "./splates.js";
|
|
4
|
-
/** How `splates server --slot` starts its server: with what added. */
|
|
5
|
-
export interface SlotStart {
|
|
6
|
-
slot: Slot;
|
|
7
|
-
/** The public host it answers on, as in fox.example.com. */
|
|
8
|
-
host: string;
|
|
9
|
-
/** The slot's home, its `SPLATES_HOME`, and the word it serves under. */
|
|
10
|
-
env: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Readies the slot this checkout holds, claimed now when it holds none: its
|
|
14
|
-
* tunnel, made on the slot's first claim, and its home, `~/.splates/slots/<word>`,
|
|
15
|
-
* which keeps its own projects, roster and tunnel apart from the machine's, so
|
|
16
|
-
* it never drives the agents of the `splates server` serving your projects. Its
|
|
17
|
-
* home starts out with a throwaway project of its own, made on the first
|
|
18
|
-
* start, so its page has one to show.
|
|
19
|
-
*/
|
|
20
|
-
export declare function devSlot(ctx: SplatesDeps): Promise<SlotStart>;
|
|
21
|
-
/**
|
|
22
|
-
* Stops the server this tree's slot last ran, if it still runs, as one does
|
|
23
|
-
* when its wrapper was killed or it was started again: it holds a port, and
|
|
24
|
-
* its cloudflared still serves the slot's host from it, so the new server
|
|
25
|
-
* would answer beside old code. Only this tree ever holds the word, so the
|
|
26
|
-
* server is this task's own to stop.
|
|
27
|
-
*/
|
|
28
|
-
export declare function stopLeftover(slots: Slots, slot: Slot, log: Pick<Logger, "info">): Promise<void>;
|
package/dev-sockets.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What one WebSocket the server upgraded does, handed over as the socket's
|
|
3
|
-
* data on the upgrade, since Bun takes one handler for every socket: a
|
|
4
|
-
* terminal's shell, a dictation's transcription.
|
|
5
|
-
*/
|
|
6
|
-
export interface Connection {
|
|
7
|
-
open(socket: Bun.ServerWebSocket<Connection>): void;
|
|
8
|
-
message(socket: Bun.ServerWebSocket<Connection>, message: string | Buffer<ArrayBuffer>): void;
|
|
9
|
-
/** The socket closed, from either end. */
|
|
10
|
-
closed(socket: Bun.ServerWebSocket<Connection>): void;
|
|
11
|
-
}
|
|
12
|
-
/** The server's one handler, which leaves each socket to its own connection. */
|
|
13
|
-
export declare const CONNECTIONS: Bun.WebSocketHandler<Connection>;
|
package/dev-task-ports.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { Resource } from "webappwiz/disposable";
|
|
2
|
-
import type { Logger } from "webappwiz/log";
|
|
3
|
-
import { type Clock } from "webappwiz/time";
|
|
4
|
-
import { type Access } from "./dev-access.js";
|
|
5
|
-
import type { Served } from "./dev-project.js";
|
|
6
|
-
import type { Connection } from "./dev-sockets.js";
|
|
7
|
-
import type { RemoteWorker } from "./remote-worker.js";
|
|
8
|
-
import { type PortOwners, type TaskPort } from "./task-ports.js";
|
|
9
|
-
/** One task port, with where to open it. */
|
|
10
|
-
export interface PortLink extends TaskPort {
|
|
11
|
-
/** On the coordinator's machine. */
|
|
12
|
-
local: string;
|
|
13
|
-
/** Through the saved base host, behind Access; null with none saved. */
|
|
14
|
-
remote: string | null;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The ports each task's processes listen on, found on the worker that runs
|
|
18
|
-
* them, as VS Code finds the ports to forward: each one forwarded to a
|
|
19
|
-
* loopback port here, down the worker's socket, and, under a saved base
|
|
20
|
-
* host, served at `<task>-<port>.<base>` to whoever Cloudflare Access lets
|
|
21
|
-
* in, and never without it. DNS and TLS for the base are the operator's.
|
|
22
|
-
*/
|
|
23
|
-
export declare class DevTaskPorts implements Resource, Claimer {
|
|
24
|
-
private readonly deps;
|
|
25
|
-
private readonly forwards;
|
|
26
|
-
private looked;
|
|
27
|
-
private readonly clock;
|
|
28
|
-
constructor(deps: {
|
|
29
|
-
/** The worker the tasks' agents run on. */
|
|
30
|
-
worker: RemoteWorker;
|
|
31
|
-
/** Each served project's worktrees and agents. */
|
|
32
|
-
owners: () => Promise<PortOwners>;
|
|
33
|
-
/** `<task>-<port>.<base>` is a task port's; null for none. */
|
|
34
|
-
base: string | null;
|
|
35
|
-
/** What lets a request reach a task port, which none does without. */
|
|
36
|
-
access: Access | null;
|
|
37
|
-
log: Logger;
|
|
38
|
-
clock?: Clock;
|
|
39
|
-
});
|
|
40
|
-
/** Each port a task serves now, forwarded, with its links. */
|
|
41
|
-
links(): Promise<PortLink[]>;
|
|
42
|
-
/** `GET /api/ports`: `links`, as JSON. */
|
|
43
|
-
readonly list: () => Promise<Response>;
|
|
44
|
-
/**
|
|
45
|
-
* Answers `request` when its host is a task port's, proxying it to the
|
|
46
|
-
* task's server; null for any other host, which the page's routes answer.
|
|
47
|
-
*/
|
|
48
|
-
claim(request: Request, server: Bun.Server<Connection>): Promise<Response | undefined> | null;
|
|
49
|
-
dispose(): void;
|
|
50
|
-
private proxy;
|
|
51
|
-
/** The ports tasks serve: as last seen while fresh, unless `again`. */
|
|
52
|
-
private look;
|
|
53
|
-
private read;
|
|
54
|
-
/**
|
|
55
|
-
* The forward to `port` on the worker, made on first use. A local
|
|
56
|
-
* worker's port is open here already, so its forward takes any port; a
|
|
57
|
-
* remote one's keeps its number when it is free.
|
|
58
|
-
*/
|
|
59
|
-
private forward;
|
|
60
|
-
private link;
|
|
61
|
-
}
|
|
62
|
-
/** Every served project's worktrees and agents, those that failed to open left out. */
|
|
63
|
-
export declare function portOwnersOf(served: Map<string, Promise<Served>>): Promise<PortOwners>;
|
|
64
|
-
/** What answers a task port's request before the page's routes do. */
|
|
65
|
-
export interface Claimer {
|
|
66
|
-
/** Its answer to `request`, or null to leave it to the route. */
|
|
67
|
-
claim(request: Request, server: Bun.Server<Connection>): Promise<Response | undefined> | null;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* `routes`, each handler asking `claimer` first: Bun matches a route by its
|
|
71
|
-
* path alone, so a task port's `/` would otherwise reach the page's.
|
|
72
|
-
*/
|
|
73
|
-
export declare function claimedFirst<Routes extends Record<string, unknown>>(routes: Routes, claimer: Claimer): Routes;
|
package/dev-tasks.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Conversations } from "./conversations.js";
|
|
2
|
-
import type { Project } from "./dev-project.js";
|
|
3
|
-
import type { ProjectWatch } from "./dev-project-watch.js";
|
|
4
|
-
/**
|
|
5
|
-
* What a project's page reads of its tasks, and what it does to them. Each
|
|
6
|
-
* handler is a property, so `serveProject` spreads them into the project's
|
|
7
|
-
* routes; what they work on stays private, out of the spread.
|
|
8
|
-
*/
|
|
9
|
-
export declare class TaskRoutes {
|
|
10
|
-
#private;
|
|
11
|
-
constructor(project: Project, conversations: Conversations | null, watch: ProjectWatch);
|
|
12
|
-
readonly file: (request: Request) => Promise<Response>;
|
|
13
|
-
readonly open: (request: Request) => Promise<Response>;
|
|
14
|
-
readonly paths: (request: Request) => Promise<Response>;
|
|
15
|
-
readonly systems: (request: Request) => Promise<Response>;
|
|
16
|
-
readonly systemChanges: () => Promise<Response>;
|
|
17
|
-
readonly diff: (request: Request) => Promise<Response>;
|
|
18
|
-
readonly retryTask: (request: Request) => Promise<Response>;
|
|
19
|
-
readonly removeTask: (request: Request) => Promise<Response>;
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Shell } from "./dev-shell.js";
|
|
2
|
-
import type { Connection } from "./dev-sockets.js";
|
|
3
|
-
/**
|
|
4
|
-
* One terminal's socket, which shows a `Shell`: bytes both ways are the
|
|
5
|
-
* shell's own; text is for what is not, as JSON: a resize or a question
|
|
6
|
-
* from the page, the shell's exit code and the job in front, null at a
|
|
7
|
-
* prompt, from here.
|
|
8
|
-
*/
|
|
9
|
-
export declare class TerminalConnection implements Connection {
|
|
10
|
-
private readonly shell;
|
|
11
|
-
/** Whether the page comes back to a shell it had, which redraws for it. */
|
|
12
|
-
private readonly back;
|
|
13
|
-
constructor(shell: Shell,
|
|
14
|
-
/** Whether the page comes back to a shell it had, which redraws for it. */
|
|
15
|
-
back: boolean);
|
|
16
|
-
open(socket: Bun.ServerWebSocket<Connection>): void;
|
|
17
|
-
message(socket: Bun.ServerWebSocket<Connection>, message: string | Buffer<ArrayBuffer>): void;
|
|
18
|
-
closed(socket: Bun.ServerWebSocket<Connection>): void;
|
|
19
|
-
}
|
package/dev-terminal.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Timer } from "webappwiz/time";
|
|
2
|
-
import { type HostGate } from "./dev-http.js";
|
|
3
|
-
import type { Served } from "./dev-project.js";
|
|
4
|
-
import { type KeptShell, type ShellHost } from "./dev-shell.js";
|
|
5
|
-
import type { Connection } from "./dev-sockets.js";
|
|
6
|
-
/** How a terminal finds the project its request names. */
|
|
7
|
-
export interface TerminalProjects {
|
|
8
|
-
projectFor(request: Request): Promise<Served>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The shells a page opens over `/api/terminal`, each in the main tree or a
|
|
12
|
-
* task's worktree. Open one with `?terminal=<key>` to come back to it by
|
|
13
|
-
* that key after a reload or a restart of `splates server`; `handOver` and
|
|
14
|
-
* `takeBack` carry keyed shells across the restart, and `disposeAsync`
|
|
15
|
-
* hangs up on them all.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Terminals {
|
|
18
|
-
private readonly gate;
|
|
19
|
-
private readonly shell;
|
|
20
|
-
private readonly projects;
|
|
21
|
-
/** The worker the shells run on, whose process table says their jobs in front. */
|
|
22
|
-
private readonly worker;
|
|
23
|
-
private readonly shells;
|
|
24
|
-
private readonly timer;
|
|
25
|
-
constructor(gate: HostGate, shell: string[] | null, projects: TerminalProjects,
|
|
26
|
-
/** The worker the shells run on, whose process table says their jobs in front. */
|
|
27
|
-
worker: ShellHost, { timer }?: {
|
|
28
|
-
timer?: Timer;
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* Takes back the shells the last run let go of, each waiting for its page
|
|
32
|
-
* to come back; before the worker joins, whose hello says which it kept.
|
|
33
|
-
*/
|
|
34
|
-
takeBack(kept: KeptShell[]): void;
|
|
35
|
-
/**
|
|
36
|
-
* Lets go of every keyed shell for the next run to take back, and says
|
|
37
|
-
* which; the rest end with the server.
|
|
38
|
-
*/
|
|
39
|
-
handOver(): KeptShell[];
|
|
40
|
-
readonly open: (request: Request, server: Bun.Server<Connection>) => Promise<Response | undefined>;
|
|
41
|
-
disposeAsync(): Promise<void>;
|
|
42
|
-
}
|
package/dev-todos.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ConversationRoutes } from "./dev-conversation-routes.js";
|
|
2
|
-
import type { Project } from "./dev-project.js";
|
|
3
|
-
import type { ProjectWatch } from "./dev-project-watch.js";
|
|
4
|
-
/**
|
|
5
|
-
* How a project's page writes its todos and lanes, each write journaled and
|
|
6
|
-
* read back for the pages listening. Each handler is a property, so
|
|
7
|
-
* `serveProject` spreads them into the project's routes; what they work on
|
|
8
|
-
* stays private, out of the spread.
|
|
9
|
-
*/
|
|
10
|
-
export declare class TodoRoutes {
|
|
11
|
-
#private;
|
|
12
|
-
constructor(project: Project, conversations: ConversationRoutes, watch: ProjectWatch);
|
|
13
|
-
readonly addTodo: (request: Request) => Promise<Response>;
|
|
14
|
-
readonly updateTodo: (request: Request) => Promise<Response>;
|
|
15
|
-
readonly moveTodo: (request: Request) => Promise<Response>;
|
|
16
|
-
readonly linkTodo: (request: Request) => Promise<Response>;
|
|
17
|
-
readonly arrangeTodo: (request: Request) => Promise<Response>;
|
|
18
|
-
readonly joinLane: (request: Request) => Promise<Response>;
|
|
19
|
-
readonly addLane: (request: Request) => Promise<Response>;
|
|
20
|
-
readonly updateLane: (request: Request) => Promise<Response>;
|
|
21
|
-
readonly assignTodo: (request: Request) => Promise<Response>;
|
|
22
|
-
readonly dropLane: (request: Request) => Promise<Response>;
|
|
23
|
-
readonly removeTodo: (request: Request) => Promise<Response>;
|
|
24
|
-
/** Puts back a todo the page removed, under its id, where it stood. */
|
|
25
|
-
readonly restoreTodo: (request: Request) => Promise<Response>;
|
|
26
|
-
/** The todo a `/api/todos/<id>` path names, or `/api/todos/<id>/position`. */
|
|
27
|
-
private todoAt;
|
|
28
|
-
/** The id a `/api/todos/<id>` path names, or `/api/todos/<id>/restore`. */
|
|
29
|
-
private idAt;
|
|
30
|
-
/**
|
|
31
|
-
* The agent a body names, `{ agent, model }`, off the roster the page's
|
|
32
|
-
* conversations start from; null for `{ agent: null }`, for none.
|
|
33
|
-
*/
|
|
34
|
-
private assigneeIn;
|
|
35
|
-
}
|
package/dev-transcriber.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Transcriber } from "webappwiz/dictate";
|
|
2
|
-
import type { Project } from "./dev-project.js";
|
|
3
|
-
/** The cred a dictation transcribes with. */
|
|
4
|
-
export declare const OPENAI_KEY = "OPENAI_API_KEY";
|
|
5
|
-
/** What a dictation in a project transcribes with, null once it asked for a key. */
|
|
6
|
-
export type TranscriberFor = (project: Project,
|
|
7
|
-
/** Tells the project's pages that its records moved, as a new request does. */
|
|
8
|
-
tick: () => Promise<void>) => Promise<Transcriber | null>;
|
|
9
|
-
/**
|
|
10
|
-
* What a dictation in `project` transcribes with: OpenAI on the key the
|
|
11
|
-
* project's or the device's store keeps, told the project's own words so it
|
|
12
|
-
* spells them its way, read afresh for each take. Null, after asking for the
|
|
13
|
-
* key on the Creds page, when neither store keeps one.
|
|
14
|
-
*/
|
|
15
|
-
export declare const transcriberFor: TranscriberFor;
|
package/dev-tunnel.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { AsyncResource } from "webappwiz/disposable";
|
|
2
|
-
import type { Logger } from "webappwiz/log";
|
|
3
|
-
import type { Ps } from "webappwiz/system";
|
|
4
|
-
import { type AccessConfig } from "./dev-access.js";
|
|
5
|
-
import type { SavedTunnel } from "./saved-tunnel.js";
|
|
6
|
-
import type { TunnelProvider } from "./tunnel-provider.js";
|
|
7
|
-
/** The tunnel `splates server` runs to reach the page from elsewhere. */
|
|
8
|
-
export interface TunnelConfig {
|
|
9
|
-
/** The public hostname the tunnel carries to the page. */
|
|
10
|
-
host: string;
|
|
11
|
-
provider: TunnelProvider;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The tunnel `--tunnel` and `--tunnel-name` ask for, or null when no host is
|
|
15
|
-
* given, run by `custom`, the provider `splates.config.ts` names, or else by
|
|
16
|
-
* `cloudflared`. Refused without `access`, so a tunnel never exposes the page
|
|
17
|
-
* to anyone Cloudflare Access has not let in.
|
|
18
|
-
*/
|
|
19
|
-
export declare function tunnelConfig(host: string, name: string, access: AccessConfig | null, custom: TunnelProvider | null, ps: Ps): TunnelConfig | null;
|
|
20
|
-
/** `host`, lowercased, refused unless it is a host name. */
|
|
21
|
-
export declare function hostName(host: string): string;
|
|
22
|
-
/**
|
|
23
|
-
* The tunnel `splates tunnel setup` saved, and the Access application in front
|
|
24
|
-
* of it, which a bare `splates server` runs; null when none was saved. One whose
|
|
25
|
-
* token the secret store cannot give is logged and left off, never fatal: the
|
|
26
|
-
* page still answers on this machine.
|
|
27
|
-
*/
|
|
28
|
-
export declare function savedTunnelConfig(saved: SavedTunnel, ps: Ps, log: Logger): Promise<{
|
|
29
|
-
access: AccessConfig;
|
|
30
|
-
tunnel: TunnelConfig;
|
|
31
|
-
} | null>;
|
|
32
|
-
/**
|
|
33
|
-
* Starts `tunnel` carrying its host to `url`, once the page listens. A provider
|
|
34
|
-
* that is not ready, or that cannot start, is logged and skipped, never fatal:
|
|
35
|
-
* the page still answers on this machine. The run is what to dispose of with
|
|
36
|
-
* the server, or null when there is none.
|
|
37
|
-
*/
|
|
38
|
-
export declare function startTunnel(tunnel: TunnelConfig, url: string, log: Logger): Promise<AsyncResource | null>;
|
package/dev-versions.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Resource } from "webappwiz/disposable";
|
|
2
|
-
import type { Logger } from "webappwiz/log";
|
|
3
|
-
import type { Duration } from "webappwiz/time";
|
|
4
|
-
import type { Served } from "./dev-project.js";
|
|
5
|
-
import { type Behind, type Release } from "./release.js";
|
|
6
|
-
/** What `Versions` takes from `dev`'s options. */
|
|
7
|
-
export interface VersionsOptions {
|
|
8
|
-
/** The version serving. */
|
|
9
|
-
running: string;
|
|
10
|
-
/** The latest splates on npm, or null when it cannot say. */
|
|
11
|
-
newest: () => Promise<string | null>;
|
|
12
|
-
checkEvery: Duration;
|
|
13
|
-
/** The last commit to splates's own source, or null outside a checkout. */
|
|
14
|
-
source: () => Promise<string | null>;
|
|
15
|
-
sourceEvery: Duration;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Whether this run of `splates server` is stale: a newer splates on npm, or, run
|
|
19
|
-
* from a checkout, commits to splates's own source since it started. Each
|
|
20
|
-
* project's pages are told as a check finds one.
|
|
21
|
-
*/
|
|
22
|
-
export declare class Versions {
|
|
23
|
-
private readonly served;
|
|
24
|
-
private readonly log;
|
|
25
|
-
/**
|
|
26
|
-
* The last commit to splates's own source as this run started, or null
|
|
27
|
-
* when it does not run from a checkout of it.
|
|
28
|
-
*/
|
|
29
|
-
private readonly started;
|
|
30
|
-
private readonly opts;
|
|
31
|
-
/** A newer splates on npm, once a check has found one; every page says so. */
|
|
32
|
-
private newer;
|
|
33
|
-
/** Commits to that source since, once a check has seen one. */
|
|
34
|
-
private ahead;
|
|
35
|
-
/**
|
|
36
|
-
* Versions for this run, reading splates's source now, so a later commit
|
|
37
|
-
* to it is what makes this run stale.
|
|
38
|
-
*/
|
|
39
|
-
static start(served: Map<string, Promise<Served>>, log: Logger, opts: VersionsOptions): Promise<Versions>;
|
|
40
|
-
private constructor();
|
|
41
|
-
get running(): string;
|
|
42
|
-
get release(): Release | null;
|
|
43
|
-
get behind(): Behind | null;
|
|
44
|
-
/**
|
|
45
|
-
* Checks for a newer splates, or, run from a checkout, for commits to its
|
|
46
|
-
* source, until disposed.
|
|
47
|
-
*/
|
|
48
|
-
check(): Resource;
|
|
49
|
-
private checkNpm;
|
|
50
|
-
private checkSource;
|
|
51
|
-
/** Tells each project's pages to read it again. */
|
|
52
|
-
private refresh;
|
|
53
|
-
}
|