@theford/runly 0.0.0-stage → 0.20.0
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/LICENSE +202 -0
- package/README.md +157 -2
- package/dist/cli/client.d.ts +80 -0
- package/dist/cli/client.js +294 -0
- package/dist/cli/client.js.map +1 -0
- package/dist/cli/daemon-unit.d.ts +58 -0
- package/dist/cli/daemon-unit.js +289 -0
- package/dist/cli/daemon-unit.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +1482 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/install.d.ts +9 -0
- package/dist/cli/install.js +53 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/logs.d.ts +43 -0
- package/dist/cli/logs.js +232 -0
- package/dist/cli/logs.js.map +1 -0
- package/dist/cli/tether.d.ts +3 -0
- package/dist/cli/tether.js +65 -0
- package/dist/cli/tether.js.map +1 -0
- package/dist/cli/watchdog.d.ts +1 -0
- package/dist/cli/watchdog.js +81 -0
- package/dist/cli/watchdog.js.map +1 -0
- package/dist/core/builds.d.ts +20 -0
- package/dist/core/builds.js +93 -0
- package/dist/core/builds.js.map +1 -0
- package/dist/core/caller-env.d.ts +17 -0
- package/dist/core/caller-env.js +77 -0
- package/dist/core/caller-env.js.map +1 -0
- package/dist/core/diagnostics.d.ts +68 -0
- package/dist/core/diagnostics.js +34 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/env-vars.d.ts +35 -0
- package/dist/core/env-vars.js +32 -0
- package/dist/core/env-vars.js.map +1 -0
- package/dist/core/events.d.ts +10 -0
- package/dist/core/events.js +42 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/exec.d.ts +22 -0
- package/dist/core/exec.js +84 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/journal.d.ts +227 -0
- package/dist/core/journal.js +395 -0
- package/dist/core/journal.js.map +1 -0
- package/dist/core/logs.d.ts +56 -0
- package/dist/core/logs.js +259 -0
- package/dist/core/logs.js.map +1 -0
- package/dist/core/manifest.d.ts +292 -0
- package/dist/core/manifest.js +179 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/core/namespaces.d.ts +7 -0
- package/dist/core/namespaces.js +59 -0
- package/dist/core/namespaces.js.map +1 -0
- package/dist/core/paths.d.ts +31 -0
- package/dist/core/paths.js +65 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/policy.d.ts +94 -0
- package/dist/core/policy.js +122 -0
- package/dist/core/policy.js.map +1 -0
- package/dist/core/ports.d.ts +52 -0
- package/dist/core/ports.js +94 -0
- package/dist/core/ports.js.map +1 -0
- package/dist/core/presets.d.ts +25 -0
- package/dist/core/presets.js +86 -0
- package/dist/core/presets.js.map +1 -0
- package/dist/core/procscan.d.ts +111 -0
- package/dist/core/procscan.js +342 -0
- package/dist/core/procscan.js.map +1 -0
- package/dist/core/retention.d.ts +97 -0
- package/dist/core/retention.js +322 -0
- package/dist/core/retention.js.map +1 -0
- package/dist/core/sleep.d.ts +51 -0
- package/dist/core/sleep.js +99 -0
- package/dist/core/sleep.js.map +1 -0
- package/dist/core/tree-ledger.d.ts +39 -0
- package/dist/core/tree-ledger.js +92 -0
- package/dist/core/tree-ledger.js.map +1 -0
- package/dist/core/types.d.ts +21 -0
- package/dist/core/types.js +6 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/units.d.ts +20 -0
- package/dist/core/units.js +69 -0
- package/dist/core/units.js.map +1 -0
- package/dist/core/upkeep.d.ts +90 -0
- package/dist/core/upkeep.js +176 -0
- package/dist/core/upkeep.js.map +1 -0
- package/dist/core/util.d.ts +46 -0
- package/dist/core/util.js +168 -0
- package/dist/core/util.js.map +1 -0
- package/dist/core/version.d.ts +39 -0
- package/dist/core/version.js +144 -0
- package/dist/core/version.js.map +1 -0
- package/dist/core/worktree.d.ts +51 -0
- package/dist/core/worktree.js +309 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/daemon/budget.d.ts +155 -0
- package/dist/daemon/budget.js +288 -0
- package/dist/daemon/budget.js.map +1 -0
- package/dist/daemon/election.d.ts +9 -0
- package/dist/daemon/election.js +140 -0
- package/dist/daemon/election.js.map +1 -0
- package/dist/daemon/engine.d.ts +1703 -0
- package/dist/daemon/engine.js +5305 -0
- package/dist/daemon/engine.js.map +1 -0
- package/dist/daemon/index.d.ts +2 -0
- package/dist/daemon/index.js +412 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/proxy.d.ts +108 -0
- package/dist/daemon/proxy.js +615 -0
- package/dist/daemon/proxy.js.map +1 -0
- package/dist/daemon/supervisor.d.ts +101 -0
- package/dist/daemon/supervisor.js +493 -0
- package/dist/daemon/supervisor.js.map +1 -0
- package/dist/drivers/appliances.d.ts +11 -0
- package/dist/drivers/appliances.js +174 -0
- package/dist/drivers/appliances.js.map +1 -0
- package/dist/drivers/datastores.d.ts +144 -0
- package/dist/drivers/datastores.js +775 -0
- package/dist/drivers/datastores.js.map +1 -0
- package/dist/drivers/preview.d.ts +69 -0
- package/dist/drivers/preview.js +605 -0
- package/dist/drivers/preview.js.map +1 -0
- package/dist/drivers/types.d.ts +70 -0
- package/dist/drivers/types.js +13 -0
- package/dist/drivers/types.js.map +1 -0
- package/package.json +63 -4
- package/schema/backlot.schema.json +549 -0
- package/schema/runly.schema.json +556 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DESIGN TARGET — NOT YET WIRED. These are sketches for the remote SUBSTRATE
|
|
3
|
+
* seam, which the engine does not call: it supervises local processes itself.
|
|
4
|
+
* The LIVE datastore seam is `DsDriver` in ./datastores.ts and the live preview
|
|
5
|
+
* seam is `PreviewPublisher` in ./preview.ts, not this file. Do not import
|
|
6
|
+
* these types expecting the engine to honor them (see docs/driver-spec.md).
|
|
7
|
+
*
|
|
8
|
+
* Drivers own TRANSPORT and STORAGE mechanics; the engine owns all POLICY
|
|
9
|
+
* (leases, hygiene, upkeep, idle and teardown, the load budget, error
|
|
10
|
+
* taxonomy). A driver that wants policy is a design bug.
|
|
11
|
+
*/
|
|
12
|
+
export interface ExecOptions {
|
|
13
|
+
cwd?: string;
|
|
14
|
+
env?: Record<string, string>;
|
|
15
|
+
/** Remote substrates must support detached (submit-and-poll) execution. */
|
|
16
|
+
detach?: boolean;
|
|
17
|
+
timeoutMs?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ExecResult {
|
|
20
|
+
exitCode: number;
|
|
21
|
+
stdout: string;
|
|
22
|
+
stderr: string;
|
|
23
|
+
/** Set when detach:true — poll/reattach handle, journaled on the box. */
|
|
24
|
+
jobId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface EnvHandle {
|
|
27
|
+
id: string;
|
|
28
|
+
/** Filesystem root of the environment's tree (local path or remote path). */
|
|
29
|
+
root: string;
|
|
30
|
+
substrate: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SubstrateCapabilities {
|
|
33
|
+
pause: boolean;
|
|
34
|
+
checkpoint: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface SubstrateDriver {
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly capabilities: SubstrateCapabilities;
|
|
39
|
+
/** Idempotent per env id. */
|
|
40
|
+
provision(envId: string): Promise<EnvHandle>;
|
|
41
|
+
exec(env: EnvHandle, cmd: string[], opts?: ExecOptions): Promise<ExecResult>;
|
|
42
|
+
/** Superseded design: the git-sync transport went with the source copy (decision 0032); how a remote substrate reaches the worktree is open. */
|
|
43
|
+
gitEndpoint(env: EnvHandle): Promise<string>;
|
|
44
|
+
/** Consumer-reachable URL for a port inside the environment. */
|
|
45
|
+
expose(env: EnvHandle, port: number): Promise<string>;
|
|
46
|
+
destroy(env: EnvHandle): Promise<void>;
|
|
47
|
+
pause?(env: EnvHandle): Promise<void>;
|
|
48
|
+
resume?(env: EnvHandle): Promise<void>;
|
|
49
|
+
checkpoint?(env: EnvHandle, key: string): Promise<void>;
|
|
50
|
+
restore?(key: string, envId: string): Promise<EnvHandle>;
|
|
51
|
+
/** Adopt-or-reap discovery of instances the local journal forgot (remote). */
|
|
52
|
+
reconcile?(): Promise<EnvHandle[]>;
|
|
53
|
+
}
|
|
54
|
+
export interface DatastoreCapabilities {
|
|
55
|
+
template: boolean;
|
|
56
|
+
/** Reset-data degenerates to flush; presets are meaningless. */
|
|
57
|
+
ephemeral: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface DatastoreDriver {
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly capabilities: DatastoreCapabilities;
|
|
62
|
+
/** infra-error (never code blame) when the external server is unreachable. */
|
|
63
|
+
probe(): Promise<void>;
|
|
64
|
+
create(ns: string, preset: string): Promise<void>;
|
|
65
|
+
/** Must refuse namespaces outside runly's own pattern. */
|
|
66
|
+
drop(ns: string): Promise<void>;
|
|
67
|
+
url(ns: string): string;
|
|
68
|
+
templateBake?(preset: string, seedHash: string): Promise<void>;
|
|
69
|
+
templateRestore?(ns: string, preset: string, seedHash: string): Promise<void>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DESIGN TARGET — NOT YET WIRED. These are sketches for the remote SUBSTRATE
|
|
3
|
+
* seam, which the engine does not call: it supervises local processes itself.
|
|
4
|
+
* The LIVE datastore seam is `DsDriver` in ./datastores.ts and the live preview
|
|
5
|
+
* seam is `PreviewPublisher` in ./preview.ts, not this file. Do not import
|
|
6
|
+
* these types expecting the engine to honor them (see docs/driver-spec.md).
|
|
7
|
+
*
|
|
8
|
+
* Drivers own TRANSPORT and STORAGE mechanics; the engine owns all POLICY
|
|
9
|
+
* (leases, hygiene, upkeep, idle and teardown, the load budget, error
|
|
10
|
+
* taxonomy). A driver that wants policy is a design bug.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/drivers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theford/runly",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"description": "The repo-aware environment broker: puts a working, seeded, provable instance of your web application in front of coding agents and humans — warm pools, leases, bind-by-sync. Brokers environments; never provides them.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"environment",
|
|
7
|
+
"broker",
|
|
8
|
+
"dev-environment",
|
|
9
|
+
"coding-agents",
|
|
10
|
+
"e2e",
|
|
11
|
+
"preview",
|
|
12
|
+
"warm-pool",
|
|
13
|
+
"sandbox",
|
|
14
|
+
"harness"
|
|
15
|
+
],
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.13.0"
|
|
20
|
+
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"runly": "dist/cli/index.js",
|
|
23
|
+
"backlot": "dist/cli/index.js"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"schema",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "node scripts/clean-dist.mjs && tsc -p tsconfig.json && node scripts/mark-bin.mjs",
|
|
36
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"coverage": "npm run build && rm -rf coverage && NODE_V8_COVERAGE=\"$PWD/coverage/tmp\" vitest run; c8 report --temp-directory coverage/tmp --report-dir coverage --reporter text --reporter lcov --exclude-after-remap --include 'src/**'",
|
|
39
|
+
"lint": "eslint src",
|
|
40
|
+
"pretest": "npm run build",
|
|
41
|
+
"prepublishOnly": "npm run build",
|
|
42
|
+
"prepack": "npm run build"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^22.10.0",
|
|
46
|
+
"c8": "12.0.0",
|
|
47
|
+
"eslint": "9.39.5",
|
|
48
|
+
"typescript": "^5.7.0",
|
|
49
|
+
"typescript-eslint": "8.64.0",
|
|
50
|
+
"vitest": "^3.0.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"ajv": "^8.17.0",
|
|
54
|
+
"yaml": "^2.6.0"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/ChristianKohlberg/backlot.git"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/ChristianKohlberg/backlot#readme",
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/ChristianKohlberg/backlot/issues"
|
|
63
|
+
},
|
|
64
|
+
"author": "Christian Kohlberg"
|
|
65
|
+
}
|