@sentropic/h2a-runtime 0.98.7-rc.3 → 0.98.7-rc.7
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/agy-claude.d.ts +41 -1
- package/dist/agy-claude.d.ts.map +1 -1
- package/dist/agy-claude.js +147 -2
- package/dist/agy-claude.js.map +1 -1
- package/dist/central-mcp.d.ts +32 -0
- package/dist/central-mcp.d.ts.map +1 -1
- package/dist/central-mcp.js +186 -69
- package/dist/central-mcp.js.map +1 -1
- package/dist/cli-seat-codecs.d.ts +86 -0
- package/dist/cli-seat-codecs.d.ts.map +1 -0
- package/dist/cli-seat-codecs.js +255 -0
- package/dist/cli-seat-codecs.js.map +1 -0
- package/dist/cli-seat-fixtures.d.ts +86 -0
- package/dist/cli-seat-fixtures.d.ts.map +1 -0
- package/dist/cli-seat-fixtures.js +114 -0
- package/dist/cli-seat-fixtures.js.map +1 -0
- package/dist/cli-seat-materialization.d.ts +245 -0
- package/dist/cli-seat-materialization.d.ts.map +1 -0
- package/dist/cli-seat-materialization.js +646 -0
- package/dist/cli-seat-materialization.js.map +1 -0
- package/dist/conv-guard.d.ts.map +1 -1
- package/dist/conv-guard.js +6 -2
- package/dist/conv-guard.js.map +1 -1
- package/dist/file-lock.d.ts +4 -2
- package/dist/file-lock.d.ts.map +1 -1
- package/dist/file-lock.js +24 -10
- package/dist/file-lock.js.map +1 -1
- package/dist/gateway-host/config-file.d.ts +2 -0
- package/dist/gateway-host/config-file.d.ts.map +1 -1
- package/dist/gateway-host/config-file.js +5 -1
- package/dist/gateway-host/config-file.js.map +1 -1
- package/dist/gateway-host/daemon.d.ts.map +1 -1
- package/dist/gateway-host/daemon.js +1 -2
- package/dist/gateway-host/daemon.js.map +1 -1
- package/dist/gateway-model-catalog/model-catalog.d.ts +38 -0
- package/dist/gateway-model-catalog/model-catalog.d.ts.map +1 -0
- package/dist/gateway-model-catalog/model-catalog.js +167 -0
- package/dist/gateway-model-catalog/model-catalog.js.map +1 -0
- package/dist/identity-cull/cull.js +1 -1
- package/dist/identity-cull/cull.js.map +1 -1
- package/dist/identity-cull/identity-fence.d.ts +48 -0
- package/dist/identity-cull/identity-fence.d.ts.map +1 -0
- package/dist/identity-cull/identity-fence.js +221 -0
- package/dist/identity-cull/identity-fence.js.map +1 -0
- package/dist/identity-operator-break.d.ts +43 -0
- package/dist/identity-operator-break.d.ts.map +1 -0
- package/dist/identity-operator-break.js +85 -0
- package/dist/identity-operator-break.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -60
- package/dist/index.js.map +1 -1
- package/dist/llm-mesh-accounts.d.ts +59 -3
- package/dist/llm-mesh-accounts.d.ts.map +1 -1
- package/dist/llm-mesh-accounts.js +77 -8
- package/dist/llm-mesh-accounts.js.map +1 -1
- package/dist/native-host.d.ts +25 -1
- package/dist/native-host.d.ts.map +1 -1
- package/dist/native-host.js +174 -12
- package/dist/native-host.js.map +1 -1
- package/dist/native-terminal/fleet.d.ts +11 -0
- package/dist/native-terminal/fleet.d.ts.map +1 -1
- package/dist/native-terminal/fleet.js +58 -1
- package/dist/native-terminal/fleet.js.map +1 -1
- package/dist/native-terminal/host-scope.d.ts +18 -0
- package/dist/native-terminal/host-scope.d.ts.map +1 -0
- package/dist/native-terminal/host-scope.js +65 -0
- package/dist/native-terminal/host-scope.js.map +1 -0
- package/dist/native-terminal/host.d.ts +1 -0
- package/dist/native-terminal/host.d.ts.map +1 -1
- package/dist/native-terminal/host.js +4 -1
- package/dist/native-terminal/host.js.map +1 -1
- package/dist/native-terminal/op.d.ts +36 -1
- package/dist/native-terminal/op.d.ts.map +1 -1
- package/dist/native-terminal/op.js +190 -33
- package/dist/native-terminal/op.js.map +1 -1
- package/dist/native-terminal/process.d.ts.map +1 -1
- package/dist/native-terminal/process.js +10 -1
- package/dist/native-terminal/process.js.map +1 -1
- package/dist/native-terminal/screen.d.ts.map +1 -1
- package/dist/native-terminal/screen.js +1 -1
- package/dist/native-terminal/screen.js.map +1 -1
- package/dist/native-terminal/server.d.ts +12 -2
- package/dist/native-terminal/server.d.ts.map +1 -1
- package/dist/native-terminal/server.js +143 -42
- package/dist/native-terminal/server.js.map +1 -1
- package/dist/native-terminal/session-scope.d.ts +2 -0
- package/dist/native-terminal/session-scope.d.ts.map +1 -0
- package/dist/native-terminal/session-scope.js +32 -0
- package/dist/native-terminal/session-scope.js.map +1 -0
- package/dist/registry.d.ts +5 -12
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +20 -3
- package/dist/registry.js.map +1 -1
- package/dist/restore.d.ts.map +1 -1
- package/dist/restore.js +5 -37
- package/dist/restore.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +3 -3
- package/dist/run.js.map +1 -1
- package/dist/tmux.d.ts +1 -1
- package/dist/tmux.d.ts.map +1 -1
- package/dist/tmux.js +34 -2
- package/dist/tmux.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAsFA,OAAO,EAsDL,KAAK,YAAY,EAClB,MAAM,WAAW,CAAC;AAwCnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAU7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQ9C,OAAO,EAOL,KAAK,qBAAqB,EAE3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAqBL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EASL,gBAAgB,EAEhB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAkH5B,OAAO,EAGL,mBAAmB,EACpB,M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2BAA2B,EAAE,cAAc,wBAAwB,EAAE,2BACgB,CAAC;AACnG,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEhJ;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAE5E;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1F,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,8EAA8E;AAC9E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG/D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,MAAM,CAEnE"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { homedir, tmpdir } from "node:os";
|
|
|
6
6
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
import { Command, Help } from "commander";
|
|
9
|
+
import { resolveSeatEnrollmentProvider } from "./cli-seat-codecs.js";
|
|
9
10
|
import { agyClaudeQuotaError, assertAgyClaudeBuildAllowed, detectAgyClaudeQuotaExhaustion, isAgyClaudeModel, normalizeAgyEffort, readAgyClaudeQuotaStatus, resolveAgyModel, writeAgyClaudeQuotaStatus } from "./agy-claude.js";
|
|
10
11
|
import { applyRuntimeHelpGroups, groupRuntimeHelpItems, } from "./cli-help-groups.js";
|
|
11
12
|
import { attach, createRemoteSession, getRemoteSession, listRemoteSessions, refreshRemoteSession, renameRemoteSession, sessionTerminalHealth, stopRemoteSession, } from "./attach.js";
|
|
@@ -23,11 +24,12 @@ import { attachLocalSession, attachPodTmux, capturePane, capturePaneVisible, cle
|
|
|
23
24
|
import { deliverInitialPrompt, sleepSync, } from "./prompt-delivery.js";
|
|
24
25
|
import { startLaunchGuard } from "./launch-guard.js";
|
|
25
26
|
import { buildLaunchContext } from "./launch-context.js";
|
|
26
|
-
import { attachNativeSession, driveNativeInstruction, killNativeSessionIfIncarnation, killNativeSessionTree, nativeHostAvailable, nativePromptDeliveryDeps, nativeSessionLiveness, nativeSessionPid, nativeSessionState, nativeTreeCpuMs, nativeWorkerPid, preflightNativeLaunch, resolveSessionHostKind, startNativeH2aSidecar, startNativeHeadlessSession, startNativeSession, NativeHostCapabilityMismatchError, NativeLaunchAdmissionError, } from "./native-host.js";
|
|
27
|
+
import { attachNativeSession, driveNativeInstruction, killNativeSessionIfIncarnation, killNativeSessionTree, nativeHostAvailable, nativePromptDeliveryDeps, nativeSessionLiveness, nativeSessionPid, nativeSessionState, nativeSessionStateAsync, nativeTreeCpuMs, nativeWorkerPid, preflightNativeLaunch, resolveSessionHostKind, startNativeH2aSidecar, startNativeHeadlessSession, startNativeSession, startNativeSessionSingleShot, NativeHostCapabilityMismatchError, NativeLaunchAdmissionError, } from "./native-host.js";
|
|
27
28
|
import { executeNativeRestart, NativeRestartError, } from "./native-restart.js";
|
|
28
29
|
import { migrateTmuxNames } from "./tmux-name-migration.js";
|
|
29
30
|
import { projectStatusForH2a } from "./status-projection.js";
|
|
30
31
|
import { buildAgentLaunchArgs, buildAgentLaunchStdin, isAgentLaunchEffort, isAgentLaunchProfile, } from "./agent-launch-args.js";
|
|
32
|
+
import { resolveGatewayModelAlias } from "./gateway-model-catalog/model-catalog.js";
|
|
31
33
|
import { deriveSessionClass } from "./session-class.js";
|
|
32
34
|
import { isRelaunchKillable, planRelaunch, relaunchContinuationPrompt, tryAcquireResumeLaunchClaim, wakeRelaunchedSession, } from "./relaunch.js";
|
|
33
35
|
import { isHumanFacingSession, legacySessionEvidence, readConversationCustomTitle, readLastLayout, reconcileRunConvIds, restore as restoreLayout, } from "./restore.js";
|
|
@@ -43,7 +45,11 @@ import { DEFAULT_FANOUT_MAX, mapWithConcurrency, planRemoteFanout, } from "./fan
|
|
|
43
45
|
import { authenticateJobEnvelopes, buildDecisionReply, dropEnvelope, emitJobDone, envelopeFileName, isAwaitingDecision, jobInstance, parentInstance, pendingDecisions, readInboxEnvelopes, renderPendingDecisions, repliedDecisionJobIds, } from "./h2a-jobs.js";
|
|
44
46
|
import { buildConductorTask, computeDurableWorkspaceId, normalizeRootCommits, detectAvailableHosts, freshestLaunchEnvelope, h2aReportsLiveConductor, markLaunchEnvelopeProcessed, readLastLaunchAt, readLaunchEnvelopes, recordLaunchAt, selectHost, shouldLaunch, } from "./conductor-launch.js";
|
|
45
47
|
import { defaultLocalH2aRoot } from "./h2a-bridge.js";
|
|
46
|
-
import {
|
|
48
|
+
import { operatorBreak as operatorBreakToCore } from "./identity-operator-break.js";
|
|
49
|
+
// identity-cull is imported lazily at its verb below: cull.js needs the
|
|
50
|
+
// core identity fence (`@sentropic/h2a`), which must never become a
|
|
51
|
+
// load-time edge of this barrel — isolated installs of this package have
|
|
52
|
+
// no core beside them.
|
|
47
53
|
import { guardConvWriters } from "./conv-guard.js";
|
|
48
54
|
import { handleClaudeHook, installClaudeHooks, manualEnroll, readStdin, } from "./enroll.js";
|
|
49
55
|
import { probePodCredHealth, softRefreshSession } from "./soft-refresh.js";
|
|
@@ -76,7 +82,6 @@ const H2A_RUN_API_VERSION = "h2a.run/v1";
|
|
|
76
82
|
const STRUCTURED_LAUNCH_PHASE_PREFIX = "[h2a] h2a.run.phase/v1 ";
|
|
77
83
|
const H2A_RUNTIME_VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
78
84
|
import { CLI_PROFILES, gatewayModeForProfile, profileUsesLlmMeshGateway, } from "./protocol-local.js";
|
|
79
|
-
import { enrollViaFacade, formatLlmMeshAccountError, formatLlmMeshAccountList, listAccountsViaFacade, removeAccountViaFacade, } from "./llm-mesh-accounts.js";
|
|
80
85
|
import { readLlmMeshConfig, updateLlmMeshRoutingConfig, } from "./gateway-host/config-file.js";
|
|
81
86
|
import { startGateway, stopGateway, readGatewayPid, llmMeshLogPath, replaceAnthropicGatewayEnvironment, acquireLlmMeshSessionEnv, } from "./gateway-host/daemon.js";
|
|
82
87
|
import { describeLlmMeshRoutingConfig, parseLlmMeshRoutingConfig, preferredRoutingConfig, strategyRoutingConfig, } from "./routing-preferences.js";
|
|
@@ -1830,19 +1835,12 @@ export async function main(argv) {
|
|
|
1830
1835
|
const identityCommand = program
|
|
1831
1836
|
.command("identity")
|
|
1832
1837
|
.description("Inspect identity bindings or unlock a token-fenced identity lock");
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
if (!result.broken) {
|
|
1840
|
-
process.stderr.write(`[h2a] lock break refused: ${result.reason}${result.pid !== undefined ? ` (pid ${result.pid})` : ""}\n`);
|
|
1841
|
-
if (result.reason === "assert-dead-required") {
|
|
1842
|
-
process.stderr.write("[h2a] verify the holder has stopped, then explicitly pass --assert-dead; no PID is killed\n");
|
|
1843
|
-
}
|
|
1844
|
-
process.exitCode = 1;
|
|
1845
|
-
}
|
|
1838
|
+
// Operator break delegates to the core CLI's hidden `__operator-break`
|
|
1839
|
+
// plumbing (same `h2a`-binary spawn pattern as central-mcp): this package
|
|
1840
|
+
// must not import `@sentropic/h2a`, and the relay keeps stdio/exit codes
|
|
1841
|
+
// byte-for-byte identical where core is installed.
|
|
1842
|
+
const operatorBreak = (lockPath, token, assertDead) => {
|
|
1843
|
+
operatorBreakToCore(lockPath, token, assertDead, (code) => { process.exitCode = code; });
|
|
1846
1844
|
};
|
|
1847
1845
|
identityCommand
|
|
1848
1846
|
.command("unlock")
|
|
@@ -1872,9 +1870,18 @@ export async function main(argv) {
|
|
|
1872
1870
|
.option("--execute", "refuse destructive execution; no bypass exists")
|
|
1873
1871
|
.option("--root <path>", "DEF h2a root (default: H2A_ROOT or ~/h2a-workspace/.h2a)")
|
|
1874
1872
|
.option("--output <path>", "new external directory for the proof packet")
|
|
1875
|
-
.action((opts) => {
|
|
1873
|
+
.action(async (opts) => {
|
|
1874
|
+
let cull;
|
|
1875
|
+
try {
|
|
1876
|
+
cull = await import("./identity-cull/cull.js");
|
|
1877
|
+
}
|
|
1878
|
+
catch (error) {
|
|
1879
|
+
process.stderr.write(`[h2a] identity cull unavailable: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1880
|
+
process.exitCode = 1;
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1876
1883
|
if (opts.execute) {
|
|
1877
|
-
const refusal = refuseCullExecution();
|
|
1884
|
+
const refusal = cull.refuseCullExecution();
|
|
1878
1885
|
process.stderr.write(`[h2a] identity cull refused: ${refusal.refusalCodes.join(", ")}\n`);
|
|
1879
1886
|
process.exitCode = 2;
|
|
1880
1887
|
return;
|
|
@@ -1882,7 +1889,7 @@ export async function main(argv) {
|
|
|
1882
1889
|
const defRoot = opts.root ?? process.env.H2A_ROOT ?? defaultLocalH2aRoot();
|
|
1883
1890
|
const outputDir = opts.output ?? join(tmpdir(), `h2a-identity-cull-${randomUUID()}`);
|
|
1884
1891
|
try {
|
|
1885
|
-
const result = runIdentityCullDryRun({
|
|
1892
|
+
const result = cull.runIdentityCullDryRun({
|
|
1886
1893
|
defRoot,
|
|
1887
1894
|
pinRoot: join(homedir(), "src", "a2a-cli"),
|
|
1888
1895
|
outputDir,
|
|
@@ -4246,13 +4253,11 @@ export async function main(argv) {
|
|
|
4246
4253
|
}
|
|
4247
4254
|
};
|
|
4248
4255
|
try {
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
const reservedTmuxSlugs =
|
|
4254
|
-
? existingLocalSessionSlugs(labels, cwd)
|
|
4255
|
-
: [];
|
|
4256
|
+
// No separate preflight fork: the in-process name probe below prepares
|
|
4257
|
+
// the host for a native run. The single-shot launch still performs its
|
|
4258
|
+
// fenced admission with a fresh inventory before creating any session.
|
|
4259
|
+
void preflightNativeLaunch;
|
|
4260
|
+
const reservedTmuxSlugs = existingLocalSessionSlugs(labels, cwd);
|
|
4256
4261
|
// The inventory and this decision are separate reads: a structured
|
|
4257
4262
|
// launch can leave a name visible just before its last tmux process
|
|
4258
4263
|
// exits. Re-probe every canonical/legacy spelling and reclaim the slug
|
|
@@ -4287,14 +4292,16 @@ export async function main(argv) {
|
|
|
4287
4292
|
// twin over a live-but-unprovable native writer (sol-F3): the same
|
|
4288
4293
|
// fail-closed rule as resolveManagedHost's rule 4 applies — refuse
|
|
4289
4294
|
// to launch on an unprovable host state.
|
|
4290
|
-
const nativeExistence = labels
|
|
4295
|
+
const nativeExistence = await Promise.all(labels
|
|
4291
4296
|
.map((label) => slugify(label ?? cwd))
|
|
4292
|
-
.map((slug) => {
|
|
4293
|
-
const detail =
|
|
4297
|
+
.map(async (slug) => {
|
|
4298
|
+
const detail = sessionHost === "native"
|
|
4299
|
+
? await nativeSessionStateAsync(localSessionName(slug), true)
|
|
4300
|
+
: nativeSessionState(localSessionName(slug));
|
|
4294
4301
|
const probe = detail.state === "unknown" ? "unknown"
|
|
4295
4302
|
: detail.state === "found" && detail.session.status === "running" ? "live" : "dead";
|
|
4296
4303
|
return { slug, probe, reason: detail.state === "unknown" ? detail.reason : undefined };
|
|
4297
|
-
});
|
|
4304
|
+
}));
|
|
4298
4305
|
const unknownNativeSlugs = nativeExistence
|
|
4299
4306
|
.filter((probed) => probed.probe === "unknown");
|
|
4300
4307
|
if (unknownNativeSlugs.length > 0) {
|
|
@@ -4339,9 +4346,15 @@ export async function main(argv) {
|
|
|
4339
4346
|
// Single-writer guard: refuse to resume a conversation another live
|
|
4340
4347
|
// session (local registry / remote pod) is already writing.
|
|
4341
4348
|
if (opts.resume) {
|
|
4349
|
+
// Reuse this operation's certified name verdict for that SAME
|
|
4350
|
+
// session. Other conversation owners still require their own probe.
|
|
4351
|
+
// Creation rechecks the complete inventory and name admission at
|
|
4352
|
+
// the host, so this snapshot never authorizes a colliding create.
|
|
4353
|
+
const nativeLivenessByName = new Map(nativeExistence.map(({ slug, probe }) => [localSessionName(slug), probe === "dead" ? false : probe === "live" ? true : "unknown"]));
|
|
4342
4354
|
const ok = await guardConvWriters({
|
|
4343
4355
|
convId: opts.resume,
|
|
4344
4356
|
cwd,
|
|
4357
|
+
nativeSessionLiveness: name => nativeLivenessByName.get(name) ?? nativeSessionLiveness(name),
|
|
4345
4358
|
...(opts.force ? { force: true } : {}),
|
|
4346
4359
|
fetchRemoteSessions: async () => {
|
|
4347
4360
|
const url = getConfiguredRemoteOptional();
|
|
@@ -4415,6 +4428,12 @@ export async function main(argv) {
|
|
|
4415
4428
|
return;
|
|
4416
4429
|
}
|
|
4417
4430
|
const useBare = resolveClaudeBare(profile, bareChoiceFromOptions(opts) ?? pinnedLaunch?.bare);
|
|
4431
|
+
// H0 (#662): normalize readable gateway aliases (argon-high, wonder,
|
|
4432
|
+
// wonder-full, spark) to their exact canonical model id. Unknown
|
|
4433
|
+
// names pass through unchanged for exact-model validation downstream.
|
|
4434
|
+
const runModel = opts.model !== undefined
|
|
4435
|
+
? (resolveGatewayModelAlias(opts.model) ?? opts.model)
|
|
4436
|
+
: undefined;
|
|
4418
4437
|
let args;
|
|
4419
4438
|
try {
|
|
4420
4439
|
args =
|
|
@@ -4425,7 +4444,7 @@ export async function main(argv) {
|
|
|
4425
4444
|
? { prompt: initialPrompt }
|
|
4426
4445
|
: {}),
|
|
4427
4446
|
...(opts.agent !== undefined ? { agent: opts.agent } : {}),
|
|
4428
|
-
...(
|
|
4447
|
+
...(runModel !== undefined ? { model: runModel } : {}),
|
|
4429
4448
|
...(opts.effort !== undefined
|
|
4430
4449
|
? { effort: opts.effort }
|
|
4431
4450
|
: {}),
|
|
@@ -4451,6 +4470,10 @@ export async function main(argv) {
|
|
|
4451
4470
|
}
|
|
4452
4471
|
let name;
|
|
4453
4472
|
let slug;
|
|
4473
|
+
// R3 P1: pid/identity returned by the single-shot launch; the
|
|
4474
|
+
// re-probes below prefer these and skip their forks.
|
|
4475
|
+
let launchedPid;
|
|
4476
|
+
let launchedWorkerPid;
|
|
4454
4477
|
let outputLog;
|
|
4455
4478
|
let resultJson;
|
|
4456
4479
|
let agentPane;
|
|
@@ -4487,7 +4510,9 @@ export async function main(argv) {
|
|
|
4487
4510
|
}
|
|
4488
4511
|
}
|
|
4489
4512
|
else if (sessionHost === "native") {
|
|
4490
|
-
|
|
4513
|
+
// One in-process async operation, with a fresh admission inventory;
|
|
4514
|
+
// returns pid/identity so the re-probes below are skipped.
|
|
4515
|
+
({ name, slug, pid: launchedPid, workerPid: launchedWorkerPid } = await startNativeSessionSingleShot(profile, command, cwd, args, label, {
|
|
4491
4516
|
onCreateAttempt,
|
|
4492
4517
|
...(opts.resume !== undefined ? { resumeId: opts.resume } : {}),
|
|
4493
4518
|
...(initialPrompt !== undefined
|
|
@@ -4698,13 +4723,16 @@ export async function main(argv) {
|
|
|
4698
4723
|
sleepSync(50);
|
|
4699
4724
|
}
|
|
4700
4725
|
}
|
|
4726
|
+
// R3 P1: prefer the pid/identity returned by the single-shot
|
|
4727
|
+
// launch (no fork); fall back to probes only when absent (e.g.
|
|
4728
|
+
// tmux path or adopted pre-existing session without a fresh pid).
|
|
4701
4729
|
const pid = sessionHost === "native"
|
|
4702
|
-
? nativeSessionPid(name)
|
|
4730
|
+
? (launchedPid ?? nativeSessionPid(name))
|
|
4703
4731
|
: agentPane
|
|
4704
4732
|
? localSessionPanePid(agentPane)
|
|
4705
4733
|
: undefined;
|
|
4706
4734
|
const workerPid = sessionHost === "native"
|
|
4707
|
-
? nativeWorkerPid(name)
|
|
4735
|
+
? (launchedWorkerPid ?? nativeWorkerPid(name))
|
|
4708
4736
|
: agentPane !== undefined
|
|
4709
4737
|
? paneWorkerPid(agentPane)
|
|
4710
4738
|
: undefined;
|
|
@@ -7659,13 +7687,14 @@ export async function main(argv) {
|
|
|
7659
7687
|
.command("enroll <provider>")
|
|
7660
7688
|
.description("Enroll through the sentropic-owned OAuth state machine " +
|
|
7661
7689
|
"(cloud-code, codex, muse OAuth device flow, mistral-vibe browser sign-in — alias: vibe, or claude-code). " +
|
|
7662
|
-
"--from oauth|cli|token selects the source (default oauth): cli
|
|
7663
|
-
"token
|
|
7664
|
-
"--cli / --token are the same modes as booleans")
|
|
7690
|
+
"--from oauth|cli|token selects the source (default oauth): cli reads a private L1 parser profile selected by --seat-profile; " +
|
|
7691
|
+
"token reads a consumer SeatBundle via bounded stdin or masked input for all five CLIs. " +
|
|
7692
|
+
"--cli / --token are the same modes as booleans. Seat aliases: agy/cloud-code, claude/claude-code, vibe/mistral-vibe")
|
|
7665
7693
|
.option("--config-ref <ref>", "sentropic configuration reference for OAuth")
|
|
7666
|
-
.option("--from <mode>", "enrollment source: oauth (default), cli (
|
|
7667
|
-
.option("--cli", "import
|
|
7668
|
-
.option("--token", "import a
|
|
7694
|
+
.option("--from <mode>", "enrollment source: oauth (default), cli (private L1 seat profile) or token (consumer SeatBundle on stdin)")
|
|
7695
|
+
.option("--cli", "import a consumer seat from the explicitly selected --seat-profile. Takes no value")
|
|
7696
|
+
.option("--token", "import a consumer SeatBundle for any of the five CLIs via bounded stdin or masked input; never argv")
|
|
7697
|
+
.option("--seat-profile <path>", "private L1 CliSeatProfileInput file for --from cli; no ambient store fallback")
|
|
7669
7698
|
.allowExcessArguments(true)
|
|
7670
7699
|
.action(async (provider, opts, command) => {
|
|
7671
7700
|
// Static excess-argument refusal (m1): commander would otherwise echo
|
|
@@ -7678,8 +7707,8 @@ export async function main(argv) {
|
|
|
7678
7707
|
process.exitCode = 1;
|
|
7679
7708
|
return;
|
|
7680
7709
|
}
|
|
7681
|
-
//
|
|
7682
|
-
const normalized =
|
|
7710
|
+
// Seat names and enrollment providers share the five-CLI codec map.
|
|
7711
|
+
const normalized = ["agy", "claude", "vibe"].includes(provider) ? resolveSeatEnrollmentProvider(provider) : provider;
|
|
7683
7712
|
if (normalized === "muse-code") {
|
|
7684
7713
|
// Owner decision 2026-10-10: muse-code is no longer a user entry —
|
|
7685
7714
|
// muse enrolls via the OAuth device flow by default, --cli selects
|
|
@@ -7704,34 +7733,22 @@ export async function main(argv) {
|
|
|
7704
7733
|
process.exitCode = 1;
|
|
7705
7734
|
return;
|
|
7706
7735
|
}
|
|
7707
|
-
if ((opts.cli || opts.from === "cli") && normalized !== "muse" && normalized !== "claude-code") {
|
|
7708
|
-
process.stderr.write("[h2a] llm-mesh account: provider has no CLI-store import; " +
|
|
7709
|
-
"--cli/--from cli is only valid for providers with a local CLI import (muse, claude-code)\n");
|
|
7710
|
-
process.exitCode = 1;
|
|
7711
|
-
return;
|
|
7712
|
-
}
|
|
7713
|
-
if ((opts.token || opts.from === "token") && normalized !== "claude-code") {
|
|
7714
|
-
process.stderr.write(`[h2a] llm-mesh account: --token/--from token is only valid for claude-code\n`);
|
|
7715
|
-
process.exitCode = 1;
|
|
7716
|
-
return;
|
|
7717
|
-
}
|
|
7718
7736
|
if (normalized !== "cloud-code" &&
|
|
7719
7737
|
normalized !== "codex" &&
|
|
7720
7738
|
normalized !== "muse" &&
|
|
7721
7739
|
normalized !== "mistral-vibe" &&
|
|
7722
7740
|
normalized !== "claude-code") {
|
|
7723
7741
|
process.stderr.write("[h2a] llm-mesh account: unsupported provider. " +
|
|
7724
|
-
"Supported: cloud-code, codex, muse
|
|
7742
|
+
"Supported: cloud-code (agy), codex, muse, mistral-vibe (vibe), claude-code (claude); oauth is the default, cli/token import consumer seats\n");
|
|
7725
7743
|
process.exitCode = 1;
|
|
7726
7744
|
return;
|
|
7727
7745
|
}
|
|
7728
7746
|
try {
|
|
7729
|
-
const
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
...(opts.
|
|
7733
|
-
...(opts.
|
|
7734
|
-
});
|
|
7747
|
+
const source = opts.from ?? (opts.cli ? "cli" : opts.token ? "token" : "oauth");
|
|
7748
|
+
const { enrollViaFacade } = await import("./llm-mesh-accounts.js");
|
|
7749
|
+
const account = source === "oauth"
|
|
7750
|
+
? await enrollViaFacade(normalized, { ...(opts.configRef ? { configRef: opts.configRef } : {}), from: "oauth" })
|
|
7751
|
+
: await enrollSeatConsumerViaFacade(normalized, { from: source, ...(opts.seatProfile ? { seatProfile: opts.seatProfile } : {}) });
|
|
7735
7752
|
process.stdout.write(`[h2a] llm-mesh account: enrolled ${account.provider}; ` +
|
|
7736
7753
|
"account inventory remains in Sentropic\n");
|
|
7737
7754
|
// The gateway loads the account inventory at boot only: an account
|
|
@@ -7753,6 +7770,7 @@ export async function main(argv) {
|
|
|
7753
7770
|
.description("List public accounts owned by this local llm-mesh scope")
|
|
7754
7771
|
.option("--json", "emit public account metadata as JSON")
|
|
7755
7772
|
.action(async (opts) => {
|
|
7773
|
+
const { listAccountsViaFacade, formatLlmMeshAccountList, formatLlmMeshAccountError } = await import("./llm-mesh-accounts.js");
|
|
7756
7774
|
try {
|
|
7757
7775
|
const accounts = await listAccountsViaFacade();
|
|
7758
7776
|
process.stdout.write(`${formatLlmMeshAccountList(accounts, opts.json === true)}\n`);
|
|
@@ -7767,6 +7785,7 @@ export async function main(argv) {
|
|
|
7767
7785
|
.aliases(["rm", "unenroll"])
|
|
7768
7786
|
.description("Remove one account owned by this local llm-mesh scope")
|
|
7769
7787
|
.action(async (accountId) => {
|
|
7788
|
+
const { removeAccountViaFacade, formatLlmMeshAccountError } = await import("./llm-mesh-accounts.js");
|
|
7770
7789
|
try {
|
|
7771
7790
|
const result = await removeAccountViaFacade(accountId);
|
|
7772
7791
|
process.stdout.write(`[h2a] llm-mesh account: removed ${result.accountId}\n`);
|
|
@@ -8120,6 +8139,13 @@ export { main as dispatchH2a };
|
|
|
8120
8139
|
/** @deprecated Compatibility for older h2a cores; new cores require dispatchH2a. */
|
|
8121
8140
|
export { main as dispatch };
|
|
8122
8141
|
export { ensureCentralMcp } from "./central-mcp.js";
|
|
8142
|
+
/** Offline five-CLI seat contract and run-scoped materialization. */
|
|
8143
|
+
export * from "./cli-seat-fixtures.js";
|
|
8144
|
+
export * from "./cli-seat-codecs.js";
|
|
8145
|
+
export * from "./cli-seat-materialization.js";
|
|
8146
|
+
// Keep the public async consumer contract without loading account providers in
|
|
8147
|
+
// every local crash-recovery launcher before it can elect its native host.
|
|
8148
|
+
export const enrollSeatConsumerViaFacade = async (...args) => (await import("./llm-mesh-accounts.js")).enrollSeatConsumerViaFacade(...args);
|
|
8123
8149
|
/**
|
|
8124
8150
|
* h2a-facing surface: the read-only remote-agents projection consumed by the
|
|
8125
8151
|
* objective-loop tick's *agents adapter* in `@sentropic/h2a` (via lazy
|