@sentropic/h2a-runtime 0.81.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/dist/account-pool.d.ts +168 -0
- package/dist/account-pool.d.ts.map +1 -0
- package/dist/account-pool.js +385 -0
- package/dist/account-pool.js.map +1 -0
- package/dist/agents-projection.d.ts +56 -0
- package/dist/agents-projection.d.ts.map +1 -0
- package/dist/agents-projection.js +82 -0
- package/dist/agents-projection.js.map +1 -0
- package/dist/attach.d.ts +75 -0
- package/dist/attach.d.ts.map +1 -0
- package/dist/attach.js +432 -0
- package/dist/attach.js.map +1 -0
- package/dist/auth-bundle.d.ts +21 -0
- package/dist/auth-bundle.d.ts.map +1 -0
- package/dist/auth-bundle.js +112 -0
- package/dist/auth-bundle.js.map +1 -0
- package/dist/auth-diagnostics.d.ts +18 -0
- package/dist/auth-diagnostics.d.ts.map +1 -0
- package/dist/auth-diagnostics.js +23 -0
- package/dist/auth-diagnostics.js.map +1 -0
- package/dist/auth-login.d.ts +9 -0
- package/dist/auth-login.d.ts.map +1 -0
- package/dist/auth-login.js +21 -0
- package/dist/auth-login.js.map +1 -0
- package/dist/auth-refresh.d.ts +32 -0
- package/dist/auth-refresh.d.ts.map +1 -0
- package/dist/auth-refresh.js +83 -0
- package/dist/auth-refresh.js.map +1 -0
- package/dist/auth-tools.d.ts +55 -0
- package/dist/auth-tools.d.ts.map +1 -0
- package/dist/auth-tools.js +163 -0
- package/dist/auth-tools.js.map +1 -0
- package/dist/browser-bridge-local.d.ts +27 -0
- package/dist/browser-bridge-local.d.ts.map +1 -0
- package/dist/browser-bridge-local.js +51 -0
- package/dist/browser-bridge-local.js.map +1 -0
- package/dist/browser.d.ts +53 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +61 -0
- package/dist/browser.js.map +1 -0
- package/dist/conductor-launch.d.ts +179 -0
- package/dist/conductor-launch.d.ts.map +1 -0
- package/dist/conductor-launch.js +414 -0
- package/dist/conductor-launch.js.map +1 -0
- package/dist/config.d.ts +182 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +334 -0
- package/dist/config.js.map +1 -0
- package/dist/conv-guard.d.ts +76 -0
- package/dist/conv-guard.d.ts.map +1 -0
- package/dist/conv-guard.js +131 -0
- package/dist/conv-guard.js.map +1 -0
- package/dist/convsync.d.ts +24 -0
- package/dist/convsync.d.ts.map +1 -0
- package/dist/convsync.js +108 -0
- package/dist/convsync.js.map +1 -0
- package/dist/cred-health.d.ts +96 -0
- package/dist/cred-health.d.ts.map +1 -0
- package/dist/cred-health.js +170 -0
- package/dist/cred-health.js.map +1 -0
- package/dist/delegate.d.ts +406 -0
- package/dist/delegate.d.ts.map +1 -0
- package/dist/delegate.js +739 -0
- package/dist/delegate.js.map +1 -0
- package/dist/enroll.d.ts +91 -0
- package/dist/enroll.d.ts.map +1 -0
- package/dist/enroll.js +248 -0
- package/dist/enroll.js.map +1 -0
- package/dist/fanout.d.ts +63 -0
- package/dist/fanout.d.ts.map +1 -0
- package/dist/fanout.js +115 -0
- package/dist/fanout.js.map +1 -0
- package/dist/forward.d.ts +66 -0
- package/dist/forward.d.ts.map +1 -0
- package/dist/forward.js +141 -0
- package/dist/forward.js.map +1 -0
- package/dist/gitdiff.d.ts +31 -0
- package/dist/gitdiff.d.ts.map +1 -0
- package/dist/gitdiff.js +133 -0
- package/dist/gitdiff.js.map +1 -0
- package/dist/h2a-bridge.d.ts +102 -0
- package/dist/h2a-bridge.d.ts.map +1 -0
- package/dist/h2a-bridge.js +333 -0
- package/dist/h2a-bridge.js.map +1 -0
- package/dist/h2a-jobs.d.ts +235 -0
- package/dist/h2a-jobs.d.ts.map +1 -0
- package/dist/h2a-jobs.js +388 -0
- package/dist/h2a-jobs.js.map +1 -0
- package/dist/h2a-ping.d.ts +38 -0
- package/dist/h2a-ping.d.ts.map +1 -0
- package/dist/h2a-ping.js +58 -0
- package/dist/h2a-ping.js.map +1 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5887 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive-throttle.d.ts +164 -0
- package/dist/interactive-throttle.d.ts.map +1 -0
- package/dist/interactive-throttle.js +194 -0
- package/dist/interactive-throttle.js.map +1 -0
- package/dist/lineage-client.d.ts +77 -0
- package/dist/lineage-client.d.ts.map +1 -0
- package/dist/lineage-client.js +117 -0
- package/dist/lineage-client.js.map +1 -0
- package/dist/lineage-lease.d.ts +152 -0
- package/dist/lineage-lease.d.ts.map +1 -0
- package/dist/lineage-lease.js +303 -0
- package/dist/lineage-lease.js.map +1 -0
- package/dist/llm-gateway-runtime/accounts.d.ts +48 -0
- package/dist/llm-gateway-runtime/accounts.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/accounts.js +226 -0
- package/dist/llm-gateway-runtime/accounts.js.map +1 -0
- package/dist/llm-gateway-runtime/index.d.ts +4 -0
- package/dist/llm-gateway-runtime/index.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/index.js +58 -0
- package/dist/llm-gateway-runtime/index.js.map +1 -0
- package/dist/llm-gateway-runtime/model-catalog.d.ts +36 -0
- package/dist/llm-gateway-runtime/model-catalog.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/model-catalog.js +146 -0
- package/dist/llm-gateway-runtime/model-catalog.js.map +1 -0
- package/dist/llm-gateway-runtime/proxy-anthropic.d.ts +3 -0
- package/dist/llm-gateway-runtime/proxy-anthropic.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/proxy-anthropic.js +139 -0
- package/dist/llm-gateway-runtime/proxy-anthropic.js.map +1 -0
- package/dist/llm-gateway-runtime/proxy-openai.d.ts +117 -0
- package/dist/llm-gateway-runtime/proxy-openai.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/proxy-openai.js +1132 -0
- package/dist/llm-gateway-runtime/proxy-openai.js.map +1 -0
- package/dist/llm-gateway-runtime/session-ledger.d.ts +32 -0
- package/dist/llm-gateway-runtime/session-ledger.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/session-ledger.js +62 -0
- package/dist/llm-gateway-runtime/session-ledger.js.map +1 -0
- package/dist/llm-gateway-runtime/sticky.d.ts +40 -0
- package/dist/llm-gateway-runtime/sticky.d.ts.map +1 -0
- package/dist/llm-gateway-runtime/sticky.js +254 -0
- package/dist/llm-gateway-runtime/sticky.js.map +1 -0
- package/dist/llm-mesh.d.ts +102 -0
- package/dist/llm-mesh.d.ts.map +1 -0
- package/dist/llm-mesh.js +433 -0
- package/dist/llm-mesh.js.map +1 -0
- package/dist/migrate-candidates.d.ts +35 -0
- package/dist/migrate-candidates.d.ts.map +1 -0
- package/dist/migrate-candidates.js +128 -0
- package/dist/migrate-candidates.js.map +1 -0
- package/dist/migrate.d.ts +125 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +561 -0
- package/dist/migrate.js.map +1 -0
- package/dist/plugin-manifest.d.ts +143 -0
- package/dist/plugin-manifest.d.ts.map +1 -0
- package/dist/plugin-manifest.js +233 -0
- package/dist/plugin-manifest.js.map +1 -0
- package/dist/plugin.d.ts +274 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +919 -0
- package/dist/plugin.js.map +1 -0
- package/dist/pod-liveness.d.ts +51 -0
- package/dist/pod-liveness.d.ts.map +1 -0
- package/dist/pod-liveness.js +80 -0
- package/dist/pod-liveness.js.map +1 -0
- package/dist/profile-menu.d.ts +7 -0
- package/dist/profile-menu.d.ts.map +1 -0
- package/dist/profile-menu.js +52 -0
- package/dist/profile-menu.js.map +1 -0
- package/dist/profiles.d.ts +23 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +66 -0
- package/dist/profiles.js.map +1 -0
- package/dist/protocol-local.d.ts +27 -0
- package/dist/protocol-local.d.ts.map +1 -0
- package/dist/protocol-local.js +12 -0
- package/dist/protocol-local.js.map +1 -0
- package/dist/pty.d.ts +26 -0
- package/dist/pty.d.ts.map +1 -0
- package/dist/pty.js +45 -0
- package/dist/pty.js.map +1 -0
- package/dist/readiness.d.ts +38 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +169 -0
- package/dist/readiness.js.map +1 -0
- package/dist/registry.d.ts +258 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +570 -0
- package/dist/registry.js.map +1 -0
- package/dist/relaunch.d.ts +52 -0
- package/dist/relaunch.d.ts.map +1 -0
- package/dist/relaunch.js +76 -0
- package/dist/relaunch.js.map +1 -0
- package/dist/restore.d.ts +165 -0
- package/dist/restore.d.ts.map +1 -0
- package/dist/restore.js +530 -0
- package/dist/restore.js.map +1 -0
- package/dist/run.d.ts +29 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +206 -0
- package/dist/run.js.map +1 -0
- package/dist/secrets.d.ts +25 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +98 -0
- package/dist/secrets.js.map +1 -0
- package/dist/session-restore.d.ts +26 -0
- package/dist/session-restore.d.ts.map +1 -0
- package/dist/session-restore.js +122 -0
- package/dist/session-restore.js.map +1 -0
- package/dist/skills-sync.d.ts +126 -0
- package/dist/skills-sync.d.ts.map +1 -0
- package/dist/skills-sync.js +255 -0
- package/dist/skills-sync.js.map +1 -0
- package/dist/smoke.d.ts +23 -0
- package/dist/smoke.d.ts.map +1 -0
- package/dist/smoke.js +138 -0
- package/dist/smoke.js.map +1 -0
- package/dist/soft-refresh.d.ts +107 -0
- package/dist/soft-refresh.d.ts.map +1 -0
- package/dist/soft-refresh.js +426 -0
- package/dist/soft-refresh.js.map +1 -0
- package/dist/sync-status.d.ts +22 -0
- package/dist/sync-status.d.ts.map +1 -0
- package/dist/sync-status.js +41 -0
- package/dist/sync-status.js.map +1 -0
- package/dist/sync.d.ts +77 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +302 -0
- package/dist/sync.js.map +1 -0
- package/dist/throttle-signatures.d.ts +43 -0
- package/dist/throttle-signatures.d.ts.map +1 -0
- package/dist/throttle-signatures.js +116 -0
- package/dist/throttle-signatures.js.map +1 -0
- package/dist/tmux.d.ts +286 -0
- package/dist/tmux.d.ts.map +1 -0
- package/dist/tmux.js +970 -0
- package/dist/tmux.js.map +1 -0
- package/dist/tunnel.d.ts +25 -0
- package/dist/tunnel.d.ts.map +1 -0
- package/dist/tunnel.js +127 -0
- package/dist/tunnel.js.map +1 -0
- package/dist/workspace-merge.d.ts +17 -0
- package/dist/workspace-merge.d.ts.map +1 -0
- package/dist/workspace-merge.js +153 -0
- package/dist/workspace-merge.js.map +1 -0
- package/dist/workspace-sync-incremental.d.ts +64 -0
- package/dist/workspace-sync-incremental.d.ts.map +1 -0
- package/dist/workspace-sync-incremental.js +199 -0
- package/dist/workspace-sync-incremental.js.map +1 -0
- package/dist/workspace-sync.d.ts +3 -0
- package/dist/workspace-sync.d.ts.map +1 -0
- package/dist/workspace-sync.js +187 -0
- package/dist/workspace-sync.js.map +1 -0
- package/dist/workspace.d.ts +70 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +173 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* readiness.ts — Phase A
|
|
3
|
+
*
|
|
4
|
+
* Best-effort, network-free readiness check before a session migration.
|
|
5
|
+
* All checks use spawnSync only — no network calls, never throws.
|
|
6
|
+
*
|
|
7
|
+
* Exported: checkReadiness(opts?) → ReadinessResult
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, statSync } from "node:fs";
|
|
10
|
+
import { homedir } from "node:os";
|
|
11
|
+
import { spawnSync } from "node:child_process";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { localConvStat } from "./convsync.js";
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Thresholds for lazy mode
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
/** Max files in working set before switching to "lazy" mode. */
|
|
18
|
+
const LAZY_FILES_THRESHOLD = 200;
|
|
19
|
+
/** Max total bytes (50 MB) in working set before switching to "lazy" mode. */
|
|
20
|
+
const LAZY_BYTES_THRESHOLD = 50 * 1024 * 1024;
|
|
21
|
+
/** Transfer rate estimate: 10 MB/s */
|
|
22
|
+
const TRANSFER_RATE_BYTES_PER_SEC = 10_000_000;
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Implementation
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
/**
|
|
27
|
+
* Check whether the local workspace is ready for a session migration.
|
|
28
|
+
*
|
|
29
|
+
* All checks are best-effort and synchronous (no network, no throws).
|
|
30
|
+
* Returns a structured ReadinessResult.
|
|
31
|
+
*/
|
|
32
|
+
export function checkReadiness(opts = {}) {
|
|
33
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
34
|
+
const profile = opts.profile;
|
|
35
|
+
const home = opts.home ?? homedir();
|
|
36
|
+
const spawn = opts.spawnImpl ?? spawnSync;
|
|
37
|
+
const blockers = [];
|
|
38
|
+
const warnings = [];
|
|
39
|
+
let mode = "full";
|
|
40
|
+
// ------------------------------------------------------------------
|
|
41
|
+
// auth_ok — `remote auth status` rc=0
|
|
42
|
+
// ------------------------------------------------------------------
|
|
43
|
+
try {
|
|
44
|
+
const authResult = spawn("remote", ["auth", "status"], {
|
|
45
|
+
cwd,
|
|
46
|
+
encoding: "utf8",
|
|
47
|
+
timeout: 10_000,
|
|
48
|
+
});
|
|
49
|
+
if (authResult.status !== 0) {
|
|
50
|
+
blockers.push("auth: CLI not authenticated");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
blockers.push("auth: CLI not authenticated");
|
|
55
|
+
}
|
|
56
|
+
// ------------------------------------------------------------------
|
|
57
|
+
// repo_bootstrapped — `git rev-parse HEAD` rc=0
|
|
58
|
+
// ------------------------------------------------------------------
|
|
59
|
+
let gitOk = false;
|
|
60
|
+
try {
|
|
61
|
+
const gitResult = spawn("git", ["rev-parse", "HEAD"], {
|
|
62
|
+
cwd,
|
|
63
|
+
encoding: "utf8",
|
|
64
|
+
timeout: 5_000,
|
|
65
|
+
});
|
|
66
|
+
gitOk = gitResult.status === 0;
|
|
67
|
+
if (!gitOk) {
|
|
68
|
+
blockers.push("repo: not a git repository");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
blockers.push("repo: not a git repository");
|
|
73
|
+
}
|
|
74
|
+
// ------------------------------------------------------------------
|
|
75
|
+
// plugins_parity_ok — non-blocking warning
|
|
76
|
+
// Not all profiles have a plugin manifest; absence is not a blocker.
|
|
77
|
+
// ------------------------------------------------------------------
|
|
78
|
+
// ------------------------------------------------------------------
|
|
79
|
+
// conv_resolvable — non-blocking warning
|
|
80
|
+
// Claude-profile only: verify a conversation exists for this cwd.
|
|
81
|
+
// Other profiles (codex/agy) don't use path-keyed conversations.
|
|
82
|
+
// ------------------------------------------------------------------
|
|
83
|
+
if (profile !== undefined &&
|
|
84
|
+
(profile === "claude" || profile === "claude-code")) {
|
|
85
|
+
try {
|
|
86
|
+
const conv = localConvStat(cwd, home);
|
|
87
|
+
if (!conv) {
|
|
88
|
+
warnings.push("conv: no local conversation found for this directory — " +
|
|
89
|
+
"migrate will proceed but no active context will be transferred");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// best-effort: skip on any error
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// ------------------------------------------------------------------
|
|
97
|
+
// deps_rebuilt — no-op in local mode
|
|
98
|
+
// ------------------------------------------------------------------
|
|
99
|
+
// ------------------------------------------------------------------
|
|
100
|
+
// hot_set_synced — in "full" mode, check working set size
|
|
101
|
+
// Only meaningful when we have a git repo
|
|
102
|
+
// ------------------------------------------------------------------
|
|
103
|
+
let pendingFiles = 0;
|
|
104
|
+
let pendingBytes = 0;
|
|
105
|
+
if (gitOk) {
|
|
106
|
+
try {
|
|
107
|
+
// Modified/staged files relative to HEAD
|
|
108
|
+
const diffResult = spawn("git", ["diff", "--name-only", "HEAD", "--"], {
|
|
109
|
+
cwd,
|
|
110
|
+
encoding: "utf8",
|
|
111
|
+
timeout: 15_000,
|
|
112
|
+
});
|
|
113
|
+
// Untracked files (not in .gitignore)
|
|
114
|
+
const untrackedResult = spawn("git", ["ls-files", "--others", "--exclude-standard"], {
|
|
115
|
+
cwd,
|
|
116
|
+
encoding: "utf8",
|
|
117
|
+
timeout: 15_000,
|
|
118
|
+
});
|
|
119
|
+
const diffLines = diffResult.status === 0 && diffResult.stdout
|
|
120
|
+
? diffResult.stdout
|
|
121
|
+
.split("\n")
|
|
122
|
+
.map((l) => l.trim())
|
|
123
|
+
.filter(Boolean)
|
|
124
|
+
: [];
|
|
125
|
+
const untrackedLines = untrackedResult.status === 0 && untrackedResult.stdout
|
|
126
|
+
? untrackedResult.stdout
|
|
127
|
+
.split("\n")
|
|
128
|
+
.map((l) => l.trim())
|
|
129
|
+
.filter(Boolean)
|
|
130
|
+
: [];
|
|
131
|
+
const allPendingFiles = [...new Set([...diffLines, ...untrackedLines])];
|
|
132
|
+
pendingFiles = allPendingFiles.length;
|
|
133
|
+
// Estimate bytes for pending files
|
|
134
|
+
for (const file of allPendingFiles) {
|
|
135
|
+
try {
|
|
136
|
+
const filePath = join(cwd, file);
|
|
137
|
+
if (existsSync(filePath)) {
|
|
138
|
+
pendingBytes += statSync(filePath).size;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
// best-effort: skip files we can't stat
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Switch to lazy if working set is too large
|
|
146
|
+
if (pendingFiles >= LAZY_FILES_THRESHOLD ||
|
|
147
|
+
pendingBytes >= LAZY_BYTES_THRESHOLD) {
|
|
148
|
+
mode = "lazy";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// best-effort: if git commands fail, leave pendingFiles/pendingBytes at 0
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const est_seconds = Math.ceil(pendingBytes / TRANSFER_RATE_BYTES_PER_SEC);
|
|
156
|
+
const ready = blockers.length === 0;
|
|
157
|
+
return {
|
|
158
|
+
ready,
|
|
159
|
+
mode,
|
|
160
|
+
blockers,
|
|
161
|
+
warnings,
|
|
162
|
+
pending: {
|
|
163
|
+
files: pendingFiles,
|
|
164
|
+
bytes: pendingBytes,
|
|
165
|
+
est_seconds,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAyB9C,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E,gEAAgE;AAChE,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAEjC,8EAA8E;AAC9E,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,sCAAsC;AACtC,MAAM,2BAA2B,GAAG,UAAU,CAAC;AAE/C,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA8B,EAAE;IAEhC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CA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L,KAAK;QACL,IAAI;QACJ,QAAQ;QACR,QAAQ;QACR,OAAO,EAAE;YACP,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,YAAY;YACnB,WAAW;SACZ;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live-session registry — the source of truth for `remote ls` / `remote
|
|
3
|
+
* restore`, so they stop GUESSING sessions from filesystem mtimes.
|
|
4
|
+
*
|
|
5
|
+
* Entries land here from:
|
|
6
|
+
* - `remote run` (source "run" — local tmux sessions),
|
|
7
|
+
* - Claude Code hooks (source "hook" — `remote enroll --hook claude-*`),
|
|
8
|
+
* - the restore scanner (source "scan" — legacy fallback),
|
|
9
|
+
* - the control-plane (source "remote" — reconciled by the caller).
|
|
10
|
+
*
|
|
11
|
+
* The file is `<configDir>/registry.json`, written atomically (tmp + rename).
|
|
12
|
+
* Every function takes an optional explicit path so tests never touch the real
|
|
13
|
+
* config dir (default path honors REMOTE_CLI_CONFIG_HOME like config.ts).
|
|
14
|
+
*/
|
|
15
|
+
export type RegistryTool = "claude" | "codex" | "agy";
|
|
16
|
+
export type RegistryKind = "local-tmux" | "local" | "remote";
|
|
17
|
+
export type RegistrySource = "run" | "hook" | "scan" | "remote";
|
|
18
|
+
/**
|
|
19
|
+
* Delegated-job extension (P1 of cross-type agent delegation). A job IS a
|
|
20
|
+
* RegistryEntry with `role: "job"` — same atomic-write, same liveness guards,
|
|
21
|
+
* same `listLive`. These fields are OPTIONAL so every existing entry stays a
|
|
22
|
+
* valid RegistryEntry (back-compat).
|
|
23
|
+
*/
|
|
24
|
+
export type RegistryRole = "job";
|
|
25
|
+
export type JobState = "pending" | "running" | "throttled" | "done" | "failed";
|
|
26
|
+
/**
|
|
27
|
+
* Rate-limit ("throttled") bookkeeping for a HEADLESS LOCAL job whose agent CLI
|
|
28
|
+
* hit a TRANSIENT provider rate-limit (reliability slice 1). A throttled job
|
|
29
|
+
* KEEPS its concurrency slot (the limit is account-wide; admitting a replacement
|
|
30
|
+
* just burns the same quota) and is auto-resumed by the conductor on
|
|
31
|
+
* `nextRetryAt` with exponential backoff, up to a hard attempt cap. All fields
|
|
32
|
+
* are written under `withRegistryLock`; the whole object is optional so every
|
|
33
|
+
* existing entry stays a valid RegistryEntry (back-compat).
|
|
34
|
+
*/
|
|
35
|
+
export type ThrottleInfo = {
|
|
36
|
+
/** How many times this job has entered `throttled` (drives the backoff). */
|
|
37
|
+
attempts: number;
|
|
38
|
+
/** ISO ts of the FIRST throttle (for age / history windows). */
|
|
39
|
+
firstAt: string;
|
|
40
|
+
/** ISO ts the conductor may resume the job at (now + jitteredDelay(attempts)). */
|
|
41
|
+
nextRetryAt: string;
|
|
42
|
+
/** The signature tag that classified the last throttle (e.g. claude:rate-limited). */
|
|
43
|
+
lastSignature?: string;
|
|
44
|
+
};
|
|
45
|
+
export type RegistryEntry = {
|
|
46
|
+
/** Stable key: claude session uuid / codex rollout id / remoteId / tmux slug. */
|
|
47
|
+
id: string;
|
|
48
|
+
tool: RegistryTool;
|
|
49
|
+
kind: RegistryKind;
|
|
50
|
+
cwd: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Conversation id usable with the CLI's --resume. */
|
|
53
|
+
convId?: string;
|
|
54
|
+
/** Control-plane session id (kind "remote"). */
|
|
55
|
+
remoteId?: string;
|
|
56
|
+
/** Full tmux session name (kind "local-tmux"), e.g. `remote-surch`. */
|
|
57
|
+
tmuxSession?: string;
|
|
58
|
+
/** Local process id (kind "local"); liveness = process.kill(pid, 0). */
|
|
59
|
+
pid?: number;
|
|
60
|
+
enrolledAt: string;
|
|
61
|
+
lastSeenAt: string;
|
|
62
|
+
endedAt?: string;
|
|
63
|
+
source: RegistrySource;
|
|
64
|
+
/** "job" marks a delegated agent (see `delegate.ts`); absent = a session. */
|
|
65
|
+
role?: RegistryRole;
|
|
66
|
+
/** Lifecycle of a delegated job (role "job" only). */
|
|
67
|
+
jobState?: JobState;
|
|
68
|
+
/** Parent job/session id that delegated this job. */
|
|
69
|
+
parent?: string;
|
|
70
|
+
/** The task the delegated agent was primed with. */
|
|
71
|
+
task?: string;
|
|
72
|
+
/** h2a instance to address the `job.done` callback to (P3); the delegating
|
|
73
|
+
* parent/master. Absent = no callback recipient (best-effort, no-op). */
|
|
74
|
+
callbackTo?: string;
|
|
75
|
+
/**
|
|
76
|
+
* P4 — queued-launch spec. A job over the concurrency cap is enrolled
|
|
77
|
+
* `pending` WITHOUT being launched; the conductor launches it later. These
|
|
78
|
+
* fields carry everything `startJob` needs to launch it from the queue (they
|
|
79
|
+
* are also set on an immediately-launched job, harmlessly). All optional so
|
|
80
|
+
* every existing entry stays a valid RegistryEntry (back-compat).
|
|
81
|
+
*/
|
|
82
|
+
/** Run the job in a Pod (the remote control-plane URL), else a local tmux session. */
|
|
83
|
+
remoteTarget?: string;
|
|
84
|
+
/** Run-once-exit headless mode (claude -p / codex exec). */
|
|
85
|
+
headless?: boolean;
|
|
86
|
+
/** The cwd the delegate was invoked from (origin for the per-job worktree/logs). */
|
|
87
|
+
originCwd?: string;
|
|
88
|
+
/** Explicit `--cwd` override (local; used as-is, no worktree). */
|
|
89
|
+
explicitCwd?: string;
|
|
90
|
+
/** Remaining spawn-depth budget this job may spend if it re-delegates (P4 depth clamp). */
|
|
91
|
+
depthBudget?: number;
|
|
92
|
+
/** Track workpackage id to mirror this job under (`track item new --parent`). */
|
|
93
|
+
trackWp?: string;
|
|
94
|
+
/** Rate-limit backoff/resume bookkeeping (HEADLESS LOCAL only; reliability slice 1). */
|
|
95
|
+
throttle?: ThrottleInfo;
|
|
96
|
+
/** Model override passed to the CLI binary (--model for claude, -m for codex). */
|
|
97
|
+
model?: string;
|
|
98
|
+
/** Effort/reasoning override (claude --effort; not supported by codex). */
|
|
99
|
+
effort?: string;
|
|
100
|
+
/** Force a specific account from the pool (bypass selectAccountWithFallback). */
|
|
101
|
+
accountId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Pinned llm-mesh gateway choice, captured at launch from an EXPLICIT
|
|
104
|
+
* --gw/--no-gw. Re-emitted verbatim by `remote restore` so each instance
|
|
105
|
+
* keeps its own gateway posture instead of falling back to the global
|
|
106
|
+
* default. Absent = launched in "auto" mode (follows the default).
|
|
107
|
+
*/
|
|
108
|
+
gatewayMode?: "gateway" | "direct";
|
|
109
|
+
};
|
|
110
|
+
export type EnrollInput = {
|
|
111
|
+
id: string;
|
|
112
|
+
tool: RegistryTool;
|
|
113
|
+
kind: RegistryKind;
|
|
114
|
+
cwd: string;
|
|
115
|
+
source: RegistrySource;
|
|
116
|
+
label?: string;
|
|
117
|
+
convId?: string;
|
|
118
|
+
remoteId?: string;
|
|
119
|
+
tmuxSession?: string;
|
|
120
|
+
pid?: number;
|
|
121
|
+
role?: RegistryRole;
|
|
122
|
+
jobState?: JobState;
|
|
123
|
+
parent?: string;
|
|
124
|
+
task?: string;
|
|
125
|
+
callbackTo?: string;
|
|
126
|
+
remoteTarget?: string;
|
|
127
|
+
headless?: boolean;
|
|
128
|
+
originCwd?: string;
|
|
129
|
+
explicitCwd?: string;
|
|
130
|
+
depthBudget?: number;
|
|
131
|
+
trackWp?: string;
|
|
132
|
+
throttle?: ThrottleInfo;
|
|
133
|
+
model?: string;
|
|
134
|
+
effort?: string;
|
|
135
|
+
accountId?: string;
|
|
136
|
+
gatewayMode?: "gateway" | "direct";
|
|
137
|
+
};
|
|
138
|
+
/** Injectable liveness probes (tests stay deterministic, no tmux/pid needed). */
|
|
139
|
+
export type LivenessOpts = {
|
|
140
|
+
tmuxHasSession?: (name: string) => boolean;
|
|
141
|
+
pidAlive?: (pid: number) => boolean;
|
|
142
|
+
/** System boot time (ms epoch). A `kind:"local"` entry last seen before this
|
|
143
|
+
* is dead — its process died in the reboot, so its PID must not be trusted
|
|
144
|
+
* (PID reuse would falsely resurrect it). Injectable for tests. */
|
|
145
|
+
bootTimeMs?: number;
|
|
146
|
+
/** cmdline of a pid (to detect PID reuse after a crash). Injectable for tests. */
|
|
147
|
+
processCmdline?: (pid: number) => string | undefined;
|
|
148
|
+
};
|
|
149
|
+
type RegistryOpts = LivenessOpts & {
|
|
150
|
+
path?: string;
|
|
151
|
+
};
|
|
152
|
+
export declare function resolveRegistryPath(): string;
|
|
153
|
+
export declare function loadRegistry(path?: string): RegistryEntry[];
|
|
154
|
+
/**
|
|
155
|
+
* Run `fn` under the registry lock: load the current entries, let `fn` mutate
|
|
156
|
+
* them (and compute a return value), then persist atomically — all inside ONE
|
|
157
|
+
* critical section, so concurrent processes serialize and no enroll/advance is
|
|
158
|
+
* lost. `fn` returns `{ entries, result, save? }`: `entries` is what to save
|
|
159
|
+
* (return the same array you mutated), `result` is passed back to the caller, and
|
|
160
|
+
* `save:false` skips the write entirely (a read-only no-op must not rewrite — nor
|
|
161
|
+
* create — the file). If the lock can't be taken (a crashed holder, contention
|
|
162
|
+
* storm), we proceed WITHOUT it rather than block a hook — best-effort,
|
|
163
|
+
* last-writer-wins as before. Exported for tests.
|
|
164
|
+
*/
|
|
165
|
+
export declare function withRegistryLock<T>(path: string, fn: (entries: RegistryEntry[]) => {
|
|
166
|
+
entries: RegistryEntry[];
|
|
167
|
+
result: T;
|
|
168
|
+
save?: boolean;
|
|
169
|
+
}): T;
|
|
170
|
+
/**
|
|
171
|
+
* Upsert by id. A re-enroll refreshes lastSeenAt, merges the new fields over
|
|
172
|
+
* the stored ones, and REVIVES an ended entry (endedAt is dropped) — e.g. a
|
|
173
|
+
* claude SessionStart on a resumed conversation.
|
|
174
|
+
*/
|
|
175
|
+
export declare function enroll(input: EnrollInput, path?: string): RegistryEntry;
|
|
176
|
+
/**
|
|
177
|
+
* ATOMIC "is there a free slot? → enroll-as-running" (S3 fix). The cap check and
|
|
178
|
+
* the running-enroll happen in ONE locked critical section, so two concurrent
|
|
179
|
+
* `delegate`s can never both see the same free slot and overshoot the cap.
|
|
180
|
+
* `running` counts CURRENT `running` jobs (`role:"job"`); when `running < cap`
|
|
181
|
+
* the `input` is upserted with `jobState:"running"` and the returned entry is
|
|
182
|
+
* non-undefined. When the cap is full, NOTHING is written and `undefined` is
|
|
183
|
+
* returned (the caller enqueues a `pending` entry instead). Exported for tests.
|
|
184
|
+
*/
|
|
185
|
+
export declare function tryClaimSlot(input: EnrollInput, cap: number, path?: string): RegistryEntry | undefined;
|
|
186
|
+
export declare function canTransitionJob(from: JobState, to: JobState): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Does a job in `state` OCCUPY a concurrency slot? `running` does, and so does
|
|
189
|
+
* `throttled` — a throttled job is mid-flight (it KEEPS its slot rather than
|
|
190
|
+
* letting the conductor admit a replacement that would immediately throttle on
|
|
191
|
+
* the same account-wide limit). `pending`/`done`/`failed` do not. Pure, exported
|
|
192
|
+
* for the cap/admission logic in delegate.ts and its tests.
|
|
193
|
+
*/
|
|
194
|
+
export declare function occupiesSlot(state: JobState): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Move a job to `to`, persisting the new state (and stamping endedAt for the
|
|
197
|
+
* terminal states). Returns the updated entry, or undefined when the id is
|
|
198
|
+
* unknown / not a job / the transition is illegal. Reuses the atomic write.
|
|
199
|
+
*/
|
|
200
|
+
export declare function advanceJob(id: string, to: JobState, path?: string): RegistryEntry | undefined;
|
|
201
|
+
/** Live job entries (role "job"), liveness reconciled like any other entry. */
|
|
202
|
+
export declare function listJobs(opts?: RegistryOpts): RegistryEntry[];
|
|
203
|
+
/** Refresh lastSeenAt. Returns false when the id is unknown. */
|
|
204
|
+
export declare function touchEntry(id: string, path?: string): boolean;
|
|
205
|
+
/** Record the session's end. Returns false when the id is unknown. */
|
|
206
|
+
export declare function markEnded(id: string, path?: string): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Liveness:
|
|
209
|
+
* - local-tmux -> the tmux session exists,
|
|
210
|
+
* - local -> pid alive (when recorded) AND not endedAt; without a pid
|
|
211
|
+
* (hook-enrolled: the hook's parent pid is a throwaway shell)
|
|
212
|
+
* we trust SessionEnd + prune,
|
|
213
|
+
* - remote -> always "live" here; the CALLER reconciles against
|
|
214
|
+
* listRemoteSessions (the registry cannot probe the cluster).
|
|
215
|
+
*/
|
|
216
|
+
export declare function isLive(e: RegistryEntry, opts?: LivenessOpts): boolean;
|
|
217
|
+
/** Entries considered live right now (see isLive for the per-kind rules). */
|
|
218
|
+
export declare function listLive(opts?: RegistryOpts): RegistryEntry[];
|
|
219
|
+
/**
|
|
220
|
+
* Drop DEAD entries whose last activity (endedAt, else lastSeenAt) is older
|
|
221
|
+
* than maxAgeHours. Live entries always stay; recently-dead ones stay too so
|
|
222
|
+
* `restore` can still resume them after a reboot via the scan fallback.
|
|
223
|
+
* Returns the number of removed entries.
|
|
224
|
+
*/
|
|
225
|
+
export declare function prune(maxAgeHours: number, opts?: RegistryOpts): number;
|
|
226
|
+
/** Map a CLI profile name to a registry tool (undefined for shell/opencode/…). */
|
|
227
|
+
export declare function coerceRegistryTool(profile: string): RegistryTool | undefined;
|
|
228
|
+
/**
|
|
229
|
+
* Auto-enrolment after `remote run` started a local tmux session. Best-effort
|
|
230
|
+
* plumbing: never throws (a registry hiccup must not break the run).
|
|
231
|
+
*/
|
|
232
|
+
export declare function enrollFromRun(args: {
|
|
233
|
+
profile: string;
|
|
234
|
+
slug: string;
|
|
235
|
+
tmuxSession: string;
|
|
236
|
+
cwd: string;
|
|
237
|
+
convId?: string;
|
|
238
|
+
gatewayMode?: "gateway" | "direct";
|
|
239
|
+
}): void;
|
|
240
|
+
export type LocalLsRow = {
|
|
241
|
+
slug: string;
|
|
242
|
+
profile: string;
|
|
243
|
+
state: "attached" | "detached" | "live";
|
|
244
|
+
path: string;
|
|
245
|
+
/** "registry" = enrolled (reliable cwd/convId); "guess" = tmux-only. */
|
|
246
|
+
badge: "registry" | "guess";
|
|
247
|
+
/** custom display name set via `remote rename`, shown in PROJECT column */
|
|
248
|
+
displayName?: string;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* LOCAL rows for `remote ls`: live tmux sessions joined with the registry
|
|
252
|
+
* ([registry] vs [guess] badge), plus live registry-only sessions (e.g. a
|
|
253
|
+
* hook-enrolled claude running in a plain terminal). Dead registry entries are
|
|
254
|
+
* pruned on the way (layout maxAgeHours).
|
|
255
|
+
*/
|
|
256
|
+
export declare function listLocalForLs(opts?: RegistryOpts): LocalLsRow[];
|
|
257
|
+
export {};
|
|
258
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmBH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC;AACjC,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/E;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IACh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