@vtxmacro/cli 2026.9.53 → 2026.9.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/vtx-service-bootstrap.js +4 -4
- package/bin/vtx.js +166 -108
- package/package.json +2 -2
|
@@ -16,9 +16,9 @@ import { fileURLToPath } from "node:url";
|
|
|
16
16
|
// agent-cli-release.json
|
|
17
17
|
var agent_cli_release_default = {
|
|
18
18
|
package_name: "@vtxmacro/cli",
|
|
19
|
-
package_version: "2026.9.
|
|
19
|
+
package_version: "2026.9.55",
|
|
20
20
|
codex_package_name: "@openai/codex",
|
|
21
|
-
codex_version: "0.
|
|
21
|
+
codex_version: "0.155.0",
|
|
22
22
|
copilot_sdk_package_name: "@github/copilot-sdk",
|
|
23
23
|
copilot_sdk_version: "1.0.0-beta.8",
|
|
24
24
|
copilot_cli_package_name: "@github/copilot",
|
|
@@ -82,13 +82,13 @@ var agent_cli_release_default = {
|
|
|
82
82
|
package_name: "@openai/codex-linux-x64",
|
|
83
83
|
target: "x86_64-unknown-linux-musl",
|
|
84
84
|
binary_name: "codex",
|
|
85
|
-
sha256: "
|
|
85
|
+
sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501"
|
|
86
86
|
},
|
|
87
87
|
"win32-x64": {
|
|
88
88
|
package_name: "@openai/codex-win32-x64",
|
|
89
89
|
target: "x86_64-pc-windows-msvc",
|
|
90
90
|
binary_name: "codex.exe",
|
|
91
|
-
sha256: "
|
|
91
|
+
sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
pi_coding_agent_package_name: "@earendil-works/pi-coding-agent",
|
package/bin/vtx.js
CHANGED
|
@@ -77,9 +77,9 @@ var init_agent_cli_release = __esm({
|
|
|
77
77
|
"agent-cli-release.json"() {
|
|
78
78
|
agent_cli_release_default = {
|
|
79
79
|
package_name: "@vtxmacro/cli",
|
|
80
|
-
package_version: "2026.9.
|
|
80
|
+
package_version: "2026.9.55",
|
|
81
81
|
codex_package_name: "@openai/codex",
|
|
82
|
-
codex_version: "0.
|
|
82
|
+
codex_version: "0.155.0",
|
|
83
83
|
copilot_sdk_package_name: "@github/copilot-sdk",
|
|
84
84
|
copilot_sdk_version: "1.0.0-beta.8",
|
|
85
85
|
copilot_cli_package_name: "@github/copilot",
|
|
@@ -143,13 +143,13 @@ var init_agent_cli_release = __esm({
|
|
|
143
143
|
package_name: "@openai/codex-linux-x64",
|
|
144
144
|
target: "x86_64-unknown-linux-musl",
|
|
145
145
|
binary_name: "codex",
|
|
146
|
-
sha256: "
|
|
146
|
+
sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501"
|
|
147
147
|
},
|
|
148
148
|
"win32-x64": {
|
|
149
149
|
package_name: "@openai/codex-win32-x64",
|
|
150
150
|
target: "x86_64-pc-windows-msvc",
|
|
151
151
|
binary_name: "codex.exe",
|
|
152
|
-
sha256: "
|
|
152
|
+
sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
155
|
pi_coding_agent_package_name: "@earendil-works/pi-coding-agent",
|
|
@@ -21519,7 +21519,8 @@ var init_mcp_client = __esm({
|
|
|
21519
21519
|
this.#initialized = true;
|
|
21520
21520
|
}
|
|
21521
21521
|
async callTool(name, argumentsValue, options = {}) {
|
|
21522
|
-
const
|
|
21522
|
+
const timingObserver = name === "inference.job.claim" ? options.onClaimTiming : name === "inference.host.heartbeat" ? options.onHostHeartbeatTiming : void 0;
|
|
21523
|
+
const timing = timingObserver ? new ClaimTiming() : void 0;
|
|
21523
21524
|
let outcome = "failure";
|
|
21524
21525
|
try {
|
|
21525
21526
|
if (!this.#initialized) {
|
|
@@ -21598,7 +21599,7 @@ var init_mcp_client = __esm({
|
|
|
21598
21599
|
if (timing) {
|
|
21599
21600
|
const receipt = Object.freeze({ ...timing.finish(outcome), transport_route: this.#transport.route });
|
|
21600
21601
|
try {
|
|
21601
|
-
void Promise.resolve(
|
|
21602
|
+
void Promise.resolve(timingObserver?.(receipt)).catch(() => void 0);
|
|
21602
21603
|
} catch {
|
|
21603
21604
|
}
|
|
21604
21605
|
}
|
|
@@ -32615,6 +32616,39 @@ var init_runner = __esm({
|
|
|
32615
32616
|
};
|
|
32616
32617
|
const hostHeartbeatAbort = new AbortController();
|
|
32617
32618
|
stopHostHeartbeatLoop = () => hostHeartbeatAbort.abort();
|
|
32619
|
+
const backgroundHostHeartbeat = async (advertisementGeneration, allowOfflineProjection, deadlineAtMs) => {
|
|
32620
|
+
const startedAt = performance.now();
|
|
32621
|
+
let clientTiming;
|
|
32622
|
+
try {
|
|
32623
|
+
await hostHeartbeat("healthy", {
|
|
32624
|
+
signal: hostHeartbeatAbort.signal,
|
|
32625
|
+
// A liveness request must not inherit the general MCP timeout,
|
|
32626
|
+
// which can exceed the server's host-staleness window. Generation
|
|
32627
|
+
// recovery shares this deadline with its first attempt.
|
|
32628
|
+
timeoutMs: settings.hostHeartbeatMs,
|
|
32629
|
+
deadlineAtMs,
|
|
32630
|
+
onHostHeartbeatTiming: (timing) => {
|
|
32631
|
+
clientTiming = timing;
|
|
32632
|
+
}
|
|
32633
|
+
}, false, allowOfflineProjection, 0, advertisementGeneration);
|
|
32634
|
+
} catch (error48) {
|
|
32635
|
+
if (!hostHeartbeatAbort.signal.aborted && !drainRequested) {
|
|
32636
|
+
emitDiagnostic("host_heartbeat_request_failed", {
|
|
32637
|
+
elapsed_ms: Math.max(0, Math.round(performance.now() - startedAt)),
|
|
32638
|
+
request_timeout_ms: settings.hostHeartbeatMs,
|
|
32639
|
+
advertisement_generation: advertisementGeneration,
|
|
32640
|
+
failure_code: safeFailureCode(
|
|
32641
|
+
error48 instanceof ExternalInferenceMcpError ? error48.code : "",
|
|
32642
|
+
"heartbeat_failed"
|
|
32643
|
+
),
|
|
32644
|
+
http_status_code: error48 instanceof ExternalInferenceMcpError ? error48.httpStatusCode : null,
|
|
32645
|
+
retry_after_ms: error48 instanceof ExternalInferenceMcpError ? error48.retryAfterMs : null,
|
|
32646
|
+
...clientTiming ? { client_timing: clientTiming } : {}
|
|
32647
|
+
});
|
|
32648
|
+
}
|
|
32649
|
+
throw error48;
|
|
32650
|
+
}
|
|
32651
|
+
};
|
|
32618
32652
|
let nextHostHeartbeatAt = now() + settings.hostHeartbeatMs;
|
|
32619
32653
|
hostHeartbeatLoop = (async () => {
|
|
32620
32654
|
while (!drainRequested && !hostHeartbeatAbort.signal.aborted) {
|
|
@@ -32643,19 +32677,16 @@ var init_runner = __esm({
|
|
|
32643
32677
|
}
|
|
32644
32678
|
}
|
|
32645
32679
|
if (drainRequested || hostHeartbeatAbort.signal.aborted) return;
|
|
32646
|
-
const
|
|
32680
|
+
const heartbeatDeadlineAtMs = Date.now() + settings.hostHeartbeatMs;
|
|
32647
32681
|
const attemptedAdvertisementGeneration = receipt.advertisement_generation;
|
|
32648
32682
|
try {
|
|
32649
|
-
await
|
|
32650
|
-
|
|
32651
|
-
{ signal: hostHeartbeatAbort.signal },
|
|
32652
|
-
false,
|
|
32683
|
+
await backgroundHostHeartbeat(
|
|
32684
|
+
attemptedAdvertisementGeneration,
|
|
32653
32685
|
// The server evaluates advertisement expiry when it receives
|
|
32654
32686
|
// the heartbeat. A request sent just before expiry can therefore
|
|
32655
32687
|
// truthfully return offline; the advertisement loop owns repair.
|
|
32656
32688
|
true,
|
|
32657
|
-
|
|
32658
|
-
attemptedAdvertisementGeneration
|
|
32689
|
+
heartbeatDeadlineAtMs
|
|
32659
32690
|
);
|
|
32660
32691
|
} catch (error48) {
|
|
32661
32692
|
if (hostHeartbeatAbort.signal.aborted || drainRequested) return;
|
|
@@ -32664,13 +32695,10 @@ var init_runner = __esm({
|
|
|
32664
32695
|
const recoveryAdvertisementGeneration = receipt.advertisement_generation > attemptedAdvertisementGeneration ? receipt.advertisement_generation : errorCode === "generation_stale" && pendingAdvertisement && pendingAdvertisement.advertisement_generation === attemptedAdvertisementGeneration + 1 ? pendingAdvertisement.advertisement_generation : null;
|
|
32665
32696
|
if (errorCode === "generation_stale" && recoveryAdvertisementGeneration !== null) {
|
|
32666
32697
|
try {
|
|
32667
|
-
await
|
|
32668
|
-
|
|
32669
|
-
{ signal: hostHeartbeatAbort.signal },
|
|
32670
|
-
false,
|
|
32698
|
+
await backgroundHostHeartbeat(
|
|
32699
|
+
recoveryAdvertisementGeneration,
|
|
32671
32700
|
false,
|
|
32672
|
-
|
|
32673
|
-
recoveryAdvertisementGeneration
|
|
32701
|
+
heartbeatDeadlineAtMs
|
|
32674
32702
|
);
|
|
32675
32703
|
if (receipt.advertisement_generation < recoveryAdvertisementGeneration) {
|
|
32676
32704
|
await mutateReceipt((current) => current.advertisement_generation >= recoveryAdvertisementGeneration ? current : {
|
|
@@ -40297,10 +40325,10 @@ var init_grok_transport_proxy = __esm({
|
|
|
40297
40325
|
|
|
40298
40326
|
// lib/inference-host/grok-runtime.ts
|
|
40299
40327
|
import { spawn as spawn7 } from "node:child_process";
|
|
40300
|
-
import { randomBytes as randomBytes7 } from "node:crypto";
|
|
40328
|
+
import { randomBytes as randomBytes7, randomUUID as randomUUID7 } from "node:crypto";
|
|
40301
40329
|
import { createServer as createServer4 } from "node:http";
|
|
40302
40330
|
import { join as join9 } from "node:path";
|
|
40303
|
-
import { lstat as lstat6 } from "node:fs/promises";
|
|
40331
|
+
import { link, lstat as lstat6, rm as rm8 } from "node:fs/promises";
|
|
40304
40332
|
var grokObject, grokRuntimeEnvironment, prepareGrokHome, GrokAcpSession, createGrokToolServer;
|
|
40305
40333
|
var init_grok_runtime = __esm({
|
|
40306
40334
|
"lib/inference-host/grok-runtime.ts"() {
|
|
@@ -40367,6 +40395,28 @@ var init_grok_runtime = __esm({
|
|
|
40367
40395
|
env.XDG_STATE_HOME,
|
|
40368
40396
|
env.XDG_CACHE_HOME
|
|
40369
40397
|
]) await ensureInferencePrivateDirectory(path);
|
|
40398
|
+
const agentIdPath = join9(grokHome, "agent_id");
|
|
40399
|
+
let needsAgentId = false;
|
|
40400
|
+
try {
|
|
40401
|
+
await lstat6(agentIdPath);
|
|
40402
|
+
} catch (error48) {
|
|
40403
|
+
if (error48.code !== "ENOENT") throw error48;
|
|
40404
|
+
needsAgentId = true;
|
|
40405
|
+
}
|
|
40406
|
+
if (needsAgentId) {
|
|
40407
|
+
const temporary = join9(grokHome, `.agent-id-${randomUUID7()}.tmp`);
|
|
40408
|
+
try {
|
|
40409
|
+
await writeAtomicInferencePrivateFile(temporary, `${randomUUID7()}
|
|
40410
|
+
`);
|
|
40411
|
+
try {
|
|
40412
|
+
await link(temporary, agentIdPath);
|
|
40413
|
+
} catch (error48) {
|
|
40414
|
+
if (error48.code !== "EEXIST") throw error48;
|
|
40415
|
+
}
|
|
40416
|
+
} finally {
|
|
40417
|
+
await rm8(temporary, { force: true });
|
|
40418
|
+
}
|
|
40419
|
+
}
|
|
40370
40420
|
await writeAtomicInferencePrivateFile(join9(grokHome, "config.toml"), "[claude_compat]\nimported = true\n");
|
|
40371
40421
|
await writeAtomicInferencePrivateFile(join9(grokHome, "requirements.toml"), [
|
|
40372
40422
|
"[auth]",
|
|
@@ -40586,7 +40636,7 @@ var init_grok_runtime = __esm({
|
|
|
40586
40636
|
|
|
40587
40637
|
// lib/inference-host/grok-state.ts
|
|
40588
40638
|
import { constants as constants2 } from "node:fs";
|
|
40589
|
-
import { lstat as lstat7, mkdtemp as mkdtemp4, open as open3, readdir as readdir3, realpath as realpath6, rm as
|
|
40639
|
+
import { lstat as lstat7, mkdtemp as mkdtemp4, open as open3, readdir as readdir3, realpath as realpath6, rm as rm9, rmdir, unlink, writeFile as writeFile3 } from "node:fs/promises";
|
|
40590
40640
|
import { basename as basename3, dirname as dirname8, join as join10, resolve as resolve6 } from "node:path";
|
|
40591
40641
|
var markerName, ownedName, invalid, missing, sessionIdValid, directory, nativeDirectory, roots, owner, nativeFile, encodedCwd, nativeSession, removeEmptyNativeGroup, createGrokOwnedWorkspace, bindGrokOwnedSession, validateGrokOwnedThread, releaseGrokOwnedWorkspace, cleanupGrokOwnedState;
|
|
40592
40642
|
var init_grok_state = __esm({
|
|
@@ -40755,7 +40805,7 @@ var init_grok_state = __esm({
|
|
|
40755
40805
|
await writeAtomicInferencePrivateFile(join10(workspace, markerName), JSON.stringify(value));
|
|
40756
40806
|
return workspace;
|
|
40757
40807
|
} catch (error48) {
|
|
40758
|
-
await
|
|
40808
|
+
await rm9(workspace, { recursive: true, force: true });
|
|
40759
40809
|
throw error48;
|
|
40760
40810
|
}
|
|
40761
40811
|
};
|
|
@@ -40788,11 +40838,11 @@ var init_grok_state = __esm({
|
|
|
40788
40838
|
if (session) {
|
|
40789
40839
|
await owner(options, workspace);
|
|
40790
40840
|
if (await nativeSession(value, false) !== session) throw invalid();
|
|
40791
|
-
await
|
|
40841
|
+
await rm9(session, { recursive: true, force: true });
|
|
40792
40842
|
await removeEmptyNativeGroup(dirname8(session), workspace);
|
|
40793
40843
|
}
|
|
40794
40844
|
await owner(options, workspace);
|
|
40795
|
-
await
|
|
40845
|
+
await rm9(workspace, { recursive: true, force: true });
|
|
40796
40846
|
};
|
|
40797
40847
|
cleanupGrokOwnedState = async (options) => {
|
|
40798
40848
|
let scope;
|
|
@@ -40824,7 +40874,7 @@ var init_grok_state = __esm({
|
|
|
40824
40874
|
});
|
|
40825
40875
|
|
|
40826
40876
|
// lib/inference-host/grok-adapter.ts
|
|
40827
|
-
import { randomUUID as
|
|
40877
|
+
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
40828
40878
|
import { join as join11 } from "node:path";
|
|
40829
40879
|
var unwrap, list, nonempty, integer2, grokModelCapabilities, grokPromptUsage, agentProfile, modelState, assertSelection, GrokBuildAdapter;
|
|
40830
40880
|
var init_grok_adapter = __esm({
|
|
@@ -41090,7 +41140,7 @@ var init_grok_adapter = __esm({
|
|
|
41090
41140
|
activeThread = { ...activeThread, effectiveModel: observedModel };
|
|
41091
41141
|
await agent.onThreadReady?.(activeThread);
|
|
41092
41142
|
}
|
|
41093
|
-
const callId =
|
|
41143
|
+
const callId = randomUUID8();
|
|
41094
41144
|
const tool = name;
|
|
41095
41145
|
const result3 = await agent.executeTool({ callId, tool, arguments: args });
|
|
41096
41146
|
evidence.push({ callId, tool, arguments: args, success: result3.success });
|
|
@@ -41196,7 +41246,7 @@ var init_grok_adapter = __esm({
|
|
|
41196
41246
|
if (update.sessionUpdate === "agent_message_chunk" && firstToken === null) firstToken = Date.now() - startedAt;
|
|
41197
41247
|
if (update.sessionUpdate === "agent_thought_chunk" && Buffer.byteLength(thought) + Buffer.byteLength(text2) <= 3e5) thought += text2;
|
|
41198
41248
|
};
|
|
41199
|
-
const promptId =
|
|
41249
|
+
const promptId = randomUUID8();
|
|
41200
41250
|
const result2 = await session.request("session/prompt", {
|
|
41201
41251
|
sessionId,
|
|
41202
41252
|
prompt: [{ type: "text", text: input.userPrompt }],
|
|
@@ -41375,9 +41425,9 @@ var init_grok_auth = __esm({
|
|
|
41375
41425
|
|
|
41376
41426
|
// lib/inference-host/exo-adapter.ts
|
|
41377
41427
|
import { spawn as spawn9 } from "node:child_process";
|
|
41378
|
-
import { randomUUID as
|
|
41428
|
+
import { randomUUID as randomUUID9, timingSafeEqual as timingSafeEqual2 } from "node:crypto";
|
|
41379
41429
|
import { createServer as createServer5 } from "node:http";
|
|
41380
|
-
import { access as access3, lstat as lstat8, readdir as readdir4, realpath as realpath7, rm as
|
|
41430
|
+
import { access as access3, lstat as lstat8, readdir as readdir4, realpath as realpath7, rm as rm10 } from "node:fs/promises";
|
|
41381
41431
|
import { basename as basename4, dirname as dirname9, join as join12, resolve as resolve7 } from "node:path";
|
|
41382
41432
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
41383
41433
|
var import_ajv3, failure, object4, validModel, receiptUsage, assertOwnedRuntime, cleanupExoOwnedState, ExoForegroundAdapter;
|
|
@@ -41439,7 +41489,7 @@ var init_exo_adapter = __esm({
|
|
|
41439
41489
|
if (!match || !entry.isDirectory() || entry.isSymbolicLink()) throw failure("exo_state_not_owned");
|
|
41440
41490
|
await assertOwnedRuntime(join12(root, entry.name), match[1]);
|
|
41441
41491
|
}
|
|
41442
|
-
await
|
|
41492
|
+
await rm10(root, { recursive: true, force: true });
|
|
41443
41493
|
};
|
|
41444
41494
|
ExoForegroundAdapter = class {
|
|
41445
41495
|
constructor(options) {
|
|
@@ -41559,7 +41609,7 @@ var init_exo_adapter = __esm({
|
|
|
41559
41609
|
const credential = await this.options.credentialStore.read(input.signal);
|
|
41560
41610
|
const provider = selected.model.split("/")[0];
|
|
41561
41611
|
if (!credential || credential.provider !== provider) throw failure("exo_credential_required", false, "auth");
|
|
41562
|
-
const id2 = agent?.durableThread?.threadId ??
|
|
41612
|
+
const id2 = agent?.durableThread?.threadId ?? randomUUID9();
|
|
41563
41613
|
const runtimeRoot = agent?.durableThread ? await this.ownedRoot(agent.durableThread) : join12(await realpath7(this.options.stateRoot), `${agent ? "agent" : "attempt"}-${id2}`);
|
|
41564
41614
|
let thread = { threadId: id2, threadPath: runtimeRoot, effectiveModel: input.requestedModel, effectiveReasoningEffort: input.requestedReasoningEffort };
|
|
41565
41615
|
const owner2 = agent?.durableThread ? await assertOwnedRuntime(runtimeRoot, id2) : null;
|
|
@@ -41573,7 +41623,7 @@ var init_exo_adapter = __esm({
|
|
|
41573
41623
|
const relay = () => abort.abort();
|
|
41574
41624
|
input.signal?.addEventListener("abort", relay, { once: true });
|
|
41575
41625
|
const timer = setTimeout(relay, Math.max(0, input.deadlineAtMs - started));
|
|
41576
|
-
const token =
|
|
41626
|
+
const token = randomUUID9();
|
|
41577
41627
|
let dispatched = false;
|
|
41578
41628
|
let terminal = null;
|
|
41579
41629
|
let workerFailure = null;
|
|
@@ -41699,7 +41749,7 @@ var init_exo_adapter = __esm({
|
|
|
41699
41749
|
}
|
|
41700
41750
|
await agent?.onThreadReady?.(thread);
|
|
41701
41751
|
try {
|
|
41702
|
-
await this.command([...args, "conversation", "send", "vtx", "trading",
|
|
41752
|
+
await this.command([...args, "conversation", "send", "vtx", "trading", randomUUID9()], env, abort.signal);
|
|
41703
41753
|
} catch (error48) {
|
|
41704
41754
|
if (!terminal) throw error48;
|
|
41705
41755
|
}
|
|
@@ -41771,11 +41821,11 @@ var init_exo_adapter = __esm({
|
|
|
41771
41821
|
this.active.delete(abort);
|
|
41772
41822
|
server.closeAllConnections();
|
|
41773
41823
|
await new Promise((done) => server.close(() => done()));
|
|
41774
|
-
if (!agent) await
|
|
41824
|
+
if (!agent) await rm10(runtimeRoot, { recursive: true, force: true });
|
|
41775
41825
|
}
|
|
41776
41826
|
}
|
|
41777
41827
|
async releaseThread(thread) {
|
|
41778
|
-
await
|
|
41828
|
+
await rm10(await this.ownedRoot(thread), { recursive: true, force: true });
|
|
41779
41829
|
}
|
|
41780
41830
|
async close() {
|
|
41781
41831
|
this.closing = true;
|
|
@@ -42374,7 +42424,7 @@ var init_durable_adapter = __esm({
|
|
|
42374
42424
|
});
|
|
42375
42425
|
|
|
42376
42426
|
// lib/inference-host/service-launcher-state.ts
|
|
42377
|
-
import { access as access4, readFile as readFile9, rm as
|
|
42427
|
+
import { access as access4, readFile as readFile9, rm as rm11 } from "node:fs/promises";
|
|
42378
42428
|
import { dirname as dirname12, isAbsolute as isAbsolute5, join as join13, relative as relative3, resolve as resolve10 } from "node:path";
|
|
42379
42429
|
var launcherSibling, within, launcherSelection, readLauncherSelection, readLauncherState, writeLauncherState, targetForSelection;
|
|
42380
42430
|
var init_service_launcher_state = __esm({
|
|
@@ -42634,9 +42684,9 @@ var init_runtime_policy_generated2 = __esm({
|
|
|
42634
42684
|
|
|
42635
42685
|
// lib/inference-host/service.ts
|
|
42636
42686
|
import { spawn as spawn10 } from "node:child_process";
|
|
42637
|
-
import { randomUUID as
|
|
42687
|
+
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
42638
42688
|
import { createWriteStream, readFileSync as readFileSync2 } from "node:fs";
|
|
42639
|
-
import { access as access5, chmod as chmod3, mkdir as mkdir3, readFile as readFile10, rm as
|
|
42689
|
+
import { access as access5, chmod as chmod3, mkdir as mkdir3, readFile as readFile10, rm as rm12, writeFile as writeFile4 } from "node:fs/promises";
|
|
42640
42690
|
import { homedir as homedir2 } from "node:os";
|
|
42641
42691
|
import { dirname as dirname13, join as join14, resolve as resolve11 } from "node:path";
|
|
42642
42692
|
var SERVICE_NAME, SYSTEMD_UNIT, LAUNCHD_LABEL, SERVICE_COOPERATIVE_STOP_SECONDS, SERVICE_UPDATE_STARTUP_SECONDS, INFERENCE_HOST_SERVICE_DRAIN_COMMAND, INFERENCE_HOST_SERVICE_QUIESCE_COMMAND, InferenceHostBootstrapRestartRequiredError, inferenceHostServiceChildEnvironment, isWindowsSubsystemForLinux, inferenceHostServiceManifestPath, inferenceHostServiceDesiredPath, inferenceHostServiceLogPath, inferenceHostServiceRuntimePath, xmlEscape, plistEscape, systemdQuote, defaultRunCommand, probeInferenceHostLauncher, managerName, assertRuntimeEnvironment, withoutConcurrencyLimit, assertServicePath, manifestGeneration, assertWorker, assertManifest, assertServiceRuntimeState, assertDesiredState, readInferenceHostServiceManifest, readManifestAcrossAtomicReplacement, readInferenceHostServiceRuntime, readRuntimeAcrossAtomicReplacement, readInferenceHostServiceDesired, readDesiredAcrossAtomicReplacement, writeDesired, runtimeEnvironment, serviceBootstrapArguments, windowsOwnedCommandLine, vbScriptString, windowsServiceLauncher, windowsTaskXml, systemdUnit, launchAgentPlist, sameWorker, sameServiceDefinition, sameWorkerSet, InferenceHostServiceManager, appendServiceLog, spawnInferenceHostServiceChild, runInferenceHostServiceSupervisor;
|
|
@@ -42713,7 +42763,7 @@ var init_service = __esm({
|
|
|
42713
42763
|
}));
|
|
42714
42764
|
});
|
|
42715
42765
|
probeInferenceHostLauncher = async (executable, destination, bytes3, runCommand = defaultRunCommand) => {
|
|
42716
|
-
const probe = `${destination}.${
|
|
42766
|
+
const probe = `${destination}.${randomUUID10()}.probe.js`;
|
|
42717
42767
|
try {
|
|
42718
42768
|
await writeAtomicInferencePrivateFile(probe, bytes3);
|
|
42719
42769
|
const result2 = await runCommand(executable, [probe]);
|
|
@@ -42721,7 +42771,7 @@ var init_service = __esm({
|
|
|
42721
42771
|
throw new Error("Copied service launcher failed its isolated startup check.");
|
|
42722
42772
|
}
|
|
42723
42773
|
} finally {
|
|
42724
|
-
await
|
|
42774
|
+
await rm12(probe, { force: true });
|
|
42725
42775
|
}
|
|
42726
42776
|
};
|
|
42727
42777
|
managerName = (platform) => {
|
|
@@ -43217,7 +43267,7 @@ WantedBy=default.target
|
|
|
43217
43267
|
const previousRuntimeUpdatedAt = previousRuntime?.manifest_generation === manifest.generation ? Date.parse(previousRuntime.updated_at) : Number.NaN;
|
|
43218
43268
|
const restoredManifest = preserveGeneration ? manifest : assertManifest({
|
|
43219
43269
|
...manifest,
|
|
43220
|
-
generation:
|
|
43270
|
+
generation: randomUUID10(),
|
|
43221
43271
|
installed_at: this.now().toISOString()
|
|
43222
43272
|
});
|
|
43223
43273
|
await writeAtomicInferencePrivateFile(
|
|
@@ -43374,16 +43424,16 @@ ${cleanup.stderr}`)) {
|
|
|
43374
43424
|
);
|
|
43375
43425
|
}
|
|
43376
43426
|
}
|
|
43377
|
-
await
|
|
43427
|
+
await rm12(this.definitionPath(), { force: true }).catch(() => void 0);
|
|
43378
43428
|
if (this.platform === "win32") {
|
|
43379
|
-
await
|
|
43429
|
+
await rm12(this.windowsLauncherPath(), { force: true }).catch(() => void 0);
|
|
43380
43430
|
}
|
|
43381
|
-
await
|
|
43382
|
-
await
|
|
43383
|
-
await
|
|
43384
|
-
if (!existingRecovery) await
|
|
43431
|
+
await rm12(this.manifestPath(), { force: true }).catch(() => void 0);
|
|
43432
|
+
await rm12(this.desiredPath(), { force: true }).catch(() => void 0);
|
|
43433
|
+
await rm12(this.runtimePath(), { force: true }).catch(() => void 0);
|
|
43434
|
+
if (!existingRecovery) await rm12(this.serviceBootstrapPath(), { force: true }).catch(() => void 0);
|
|
43385
43435
|
for (const suffix of [".service-launcher.json", ".service-bootstrap.previous.js"]) {
|
|
43386
|
-
if (!existingRecovery) await
|
|
43436
|
+
if (!existingRecovery) await rm12(launcherSibling(this.manifestPath(), suffix), { force: true }).catch(() => void 0);
|
|
43387
43437
|
}
|
|
43388
43438
|
if (this.platform === "linux") {
|
|
43389
43439
|
await this.runCommand("systemctl", ["--user", "daemon-reload"]).catch(() => void 0);
|
|
@@ -43535,7 +43585,7 @@ ${cleanup.stderr}`)) {
|
|
|
43535
43585
|
].sort((left, right) => left.instance_name.localeCompare(right.instance_name));
|
|
43536
43586
|
const manifest = assertManifest({
|
|
43537
43587
|
schema_version: "vtx_inference_service_v3",
|
|
43538
|
-
generation:
|
|
43588
|
+
generation: randomUUID10(),
|
|
43539
43589
|
installed_at: this.now().toISOString(),
|
|
43540
43590
|
executable: this.executable,
|
|
43541
43591
|
script: this.script,
|
|
@@ -43758,7 +43808,7 @@ ${result2.stderr}`)) {
|
|
|
43758
43808
|
if (remaining.length === 0) return await this.uninstallUnlocked();
|
|
43759
43809
|
return await this.replaceManifestUnlocked({
|
|
43760
43810
|
...manifest,
|
|
43761
|
-
generation:
|
|
43811
|
+
generation: randomUUID10(),
|
|
43762
43812
|
installed_at: this.now().toISOString(),
|
|
43763
43813
|
workers: remaining
|
|
43764
43814
|
}, await readInferenceHostServiceDesired(this.desiredPath()));
|
|
@@ -43781,20 +43831,20 @@ ${result2.stderr}`)) {
|
|
|
43781
43831
|
${result2.stderr}`)) {
|
|
43782
43832
|
throw new Error(`Background service uninstall failed: ${result2.stderr.trim()}`);
|
|
43783
43833
|
}
|
|
43784
|
-
await
|
|
43785
|
-
if (this.platform === "win32") await
|
|
43834
|
+
await rm12(this.definitionPath(), { force: true });
|
|
43835
|
+
if (this.platform === "win32") await rm12(this.windowsLauncherPath(), { force: true });
|
|
43786
43836
|
if (this.platform === "linux") await this.runCommand("systemctl", ["--user", "daemon-reload"]);
|
|
43787
|
-
await
|
|
43788
|
-
await
|
|
43789
|
-
await
|
|
43837
|
+
await rm12(this.manifestPath(), { force: true });
|
|
43838
|
+
await rm12(this.desiredPath(), { force: true });
|
|
43839
|
+
await rm12(this.runtimePath(), { force: true });
|
|
43790
43840
|
if (!preserveRecovery) {
|
|
43791
|
-
await
|
|
43841
|
+
await rm12(this.serviceBootstrapPath(), { force: true });
|
|
43792
43842
|
for (const suffix of [".service-launcher.json", ".service-bootstrap.previous.js"]) {
|
|
43793
|
-
await
|
|
43843
|
+
await rm12(launcherSibling(this.manifestPath(), suffix), { force: true });
|
|
43794
43844
|
}
|
|
43795
|
-
await
|
|
43796
|
-
await
|
|
43797
|
-
await
|
|
43845
|
+
await rm12(this.serviceReleasePath(), { force: true });
|
|
43846
|
+
await rm12(this.serviceReleaseRejectionPath(), { force: true });
|
|
43847
|
+
await rm12(this.serviceReleasesPath(), { recursive: true, force: true });
|
|
43798
43848
|
}
|
|
43799
43849
|
return {
|
|
43800
43850
|
installed: false,
|
|
@@ -44257,9 +44307,9 @@ __export(cli_exports, {
|
|
|
44257
44307
|
registerInferenceHostServiceControlInput: () => registerInferenceHostServiceControlInput,
|
|
44258
44308
|
runInferenceHostCli: () => runInferenceHostCli
|
|
44259
44309
|
});
|
|
44260
|
-
import { createHash as createHash12, randomUUID as
|
|
44310
|
+
import { createHash as createHash12, randomUUID as randomUUID11 } from "node:crypto";
|
|
44261
44311
|
import { spawn as spawn11 } from "node:child_process";
|
|
44262
|
-
import { lstat as lstat9, realpath as realpath8, rm as
|
|
44312
|
+
import { lstat as lstat9, realpath as realpath8, rm as rm13 } from "node:fs/promises";
|
|
44263
44313
|
import { hostname as osHostname } from "node:os";
|
|
44264
44314
|
import { join as join15, resolve as resolve12 } from "node:path";
|
|
44265
44315
|
async function runInferenceHostCli(argv2, env = process.env, dependencies = {}) {
|
|
@@ -44898,7 +44948,7 @@ Durable service:
|
|
|
44898
44948
|
runtimeReceiptPath(config2),
|
|
44899
44949
|
"Inference host runtime receipt file"
|
|
44900
44950
|
);
|
|
44901
|
-
await
|
|
44951
|
+
await rm13(codexGuardianReceiptRoot(config2), { recursive: true, force: true });
|
|
44902
44952
|
await clearInferencePrivateFile(
|
|
44903
44953
|
codexRecoveryPath(config2),
|
|
44904
44954
|
"Codex attempt recovery file"
|
|
@@ -45166,7 +45216,7 @@ Waiting for approval...
|
|
|
45166
45216
|
await writeInferenceHostCredentialContextTransition(config2, previousCredentialContext);
|
|
45167
45217
|
await writeInferenceHostCredentialContext(config2);
|
|
45168
45218
|
const keyPair = generateExternalInferenceEnvelopeKeyPair();
|
|
45169
|
-
const hostId =
|
|
45219
|
+
const hostId = randomUUID11();
|
|
45170
45220
|
const beginLogin = dependencies.beginLogin ?? beginInferenceOAuthLogin;
|
|
45171
45221
|
const loginStore = {
|
|
45172
45222
|
kind: store.kind,
|
|
@@ -46054,7 +46104,7 @@ Waiting for approval...
|
|
|
46054
46104
|
}
|
|
46055
46105
|
return record5;
|
|
46056
46106
|
};
|
|
46057
|
-
agentOperationId = (kind) => `${kind}-${
|
|
46107
|
+
agentOperationId = (kind) => `${kind}-${randomUUID11()}`;
|
|
46058
46108
|
agentSession = async (config2, dependencies, warnings, signal) => {
|
|
46059
46109
|
if (await readRevocationCheckpoint(config2)) {
|
|
46060
46110
|
throw new Error("Inference host revocation recovery must finish first.");
|
|
@@ -47133,7 +47183,7 @@ Waiting for approval...
|
|
|
47133
47183
|
if (recoveryRaw === null && existingTransaction?.phase !== "reconciled") {
|
|
47134
47184
|
throw new Error("Codex recovery evidence changed before service recovery began.");
|
|
47135
47185
|
}
|
|
47136
|
-
const transactionId = existingTransaction?.transaction_id ??
|
|
47186
|
+
const transactionId = existingTransaction?.transaction_id ?? randomUUID11();
|
|
47137
47187
|
const backupPath = existingTransaction?.recovery_backup_path ?? recoveryBackupPath(config2, transactionId);
|
|
47138
47188
|
if (!existingTransaction) {
|
|
47139
47189
|
await writeAtomicInferencePrivateFile(backupPath, recoveryRaw);
|
|
@@ -47281,7 +47331,7 @@ Waiting for approval...
|
|
|
47281
47331
|
serviceRecoveryTransactionPath(config2),
|
|
47282
47332
|
"Inference-host service recovery transaction"
|
|
47283
47333
|
);
|
|
47284
|
-
await
|
|
47334
|
+
await rm13(backupPath, { force: true });
|
|
47285
47335
|
}
|
|
47286
47336
|
}
|
|
47287
47337
|
} finally {
|
|
@@ -47556,7 +47606,7 @@ Waiting for approval...
|
|
|
47556
47606
|
});
|
|
47557
47607
|
|
|
47558
47608
|
// lib/agent-core/config.ts
|
|
47559
|
-
import { mkdir as mkdir5, readFile as readFile11, rm as
|
|
47609
|
+
import { mkdir as mkdir5, readFile as readFile11, rm as rm14, writeFile as writeFile5 } from "node:fs/promises";
|
|
47560
47610
|
import { dirname as dirname14, join as join16 } from "node:path";
|
|
47561
47611
|
import { homedir as homedir3 } from "node:os";
|
|
47562
47612
|
function defaultBaseDir() {
|
|
@@ -47600,7 +47650,7 @@ async function writeStoredAgentAuth(path, auth) {
|
|
|
47600
47650
|
`, { encoding: "utf8", mode: 384 });
|
|
47601
47651
|
}
|
|
47602
47652
|
async function clearStoredAgentAuth(path) {
|
|
47603
|
-
await
|
|
47653
|
+
await rm14(path, { force: true });
|
|
47604
47654
|
}
|
|
47605
47655
|
async function readRuntimeState(path) {
|
|
47606
47656
|
try {
|
|
@@ -47635,7 +47685,7 @@ async function writeRuntimeState(path, state) {
|
|
|
47635
47685
|
`, { encoding: "utf8", mode: 384 });
|
|
47636
47686
|
}
|
|
47637
47687
|
async function clearRuntimeState(path) {
|
|
47638
|
-
await
|
|
47688
|
+
await rm14(path, { force: true });
|
|
47639
47689
|
}
|
|
47640
47690
|
var init_config2 = __esm({
|
|
47641
47691
|
"lib/agent-core/config.ts"() {
|
|
@@ -47667,7 +47717,7 @@ var init_types = __esm({
|
|
|
47667
47717
|
});
|
|
47668
47718
|
|
|
47669
47719
|
// lib/agent-core/client.ts
|
|
47670
|
-
import { randomUUID as
|
|
47720
|
+
import { randomUUID as randomUUID12 } from "node:crypto";
|
|
47671
47721
|
function normalizeApiUrl(value) {
|
|
47672
47722
|
const parsed = String(value || "").trim();
|
|
47673
47723
|
if (!parsed) {
|
|
@@ -47934,7 +47984,7 @@ var init_client = __esm({
|
|
|
47934
47984
|
return this.request("/trading/ai/runtime/decision", {
|
|
47935
47985
|
method: "POST",
|
|
47936
47986
|
profileId,
|
|
47937
|
-
idempotencyKey:
|
|
47987
|
+
idempotencyKey: randomUUID12(),
|
|
47938
47988
|
headers: { "x-client-runtime-lease": leaseToken },
|
|
47939
47989
|
body: payload
|
|
47940
47990
|
});
|
|
@@ -47943,7 +47993,7 @@ var init_client = __esm({
|
|
|
47943
47993
|
return this.request("/trading/ai/runtime/trade-sync", {
|
|
47944
47994
|
method: "POST",
|
|
47945
47995
|
profileId,
|
|
47946
|
-
idempotencyKey:
|
|
47996
|
+
idempotencyKey: randomUUID12(),
|
|
47947
47997
|
headers: { "x-client-runtime-lease": leaseToken },
|
|
47948
47998
|
body: payload
|
|
47949
47999
|
});
|
|
@@ -47952,7 +48002,7 @@ var init_client = __esm({
|
|
|
47952
48002
|
return this.request("/trading/ai/runtime/error", {
|
|
47953
48003
|
method: "POST",
|
|
47954
48004
|
profileId,
|
|
47955
|
-
idempotencyKey:
|
|
48005
|
+
idempotencyKey: randomUUID12(),
|
|
47956
48006
|
headers: { "x-client-runtime-lease": leaseToken },
|
|
47957
48007
|
body: payload
|
|
47958
48008
|
});
|
|
@@ -47964,7 +48014,7 @@ var init_client = __esm({
|
|
|
47964
48014
|
return this.request("/trading/market-order", {
|
|
47965
48015
|
method: "POST",
|
|
47966
48016
|
profileId,
|
|
47967
|
-
idempotencyKey:
|
|
48017
|
+
idempotencyKey: randomUUID12(),
|
|
47968
48018
|
body: payload
|
|
47969
48019
|
});
|
|
47970
48020
|
}
|
|
@@ -47972,7 +48022,7 @@ var init_client = __esm({
|
|
|
47972
48022
|
return this.request("/trading/limit-order", {
|
|
47973
48023
|
method: "POST",
|
|
47974
48024
|
profileId,
|
|
47975
|
-
idempotencyKey:
|
|
48025
|
+
idempotencyKey: randomUUID12(),
|
|
47976
48026
|
body: payload
|
|
47977
48027
|
});
|
|
47978
48028
|
}
|
|
@@ -47980,7 +48030,7 @@ var init_client = __esm({
|
|
|
47980
48030
|
return this.request("/trading/cancel-order", {
|
|
47981
48031
|
method: "POST",
|
|
47982
48032
|
profileId,
|
|
47983
|
-
idempotencyKey:
|
|
48033
|
+
idempotencyKey: randomUUID12(),
|
|
47984
48034
|
body: payload
|
|
47985
48035
|
});
|
|
47986
48036
|
}
|
|
@@ -47999,7 +48049,7 @@ var init_client = __esm({
|
|
|
47999
48049
|
return this.request("/trading/ai/start", {
|
|
48000
48050
|
method: "POST",
|
|
48001
48051
|
profileId,
|
|
48002
|
-
idempotencyKey:
|
|
48052
|
+
idempotencyKey: randomUUID12(),
|
|
48003
48053
|
body: payload
|
|
48004
48054
|
});
|
|
48005
48055
|
}
|
|
@@ -48007,7 +48057,7 @@ var init_client = __esm({
|
|
|
48007
48057
|
return this.request("/trading/ai/stop", {
|
|
48008
48058
|
method: "POST",
|
|
48009
48059
|
profileId,
|
|
48010
|
-
idempotencyKey:
|
|
48060
|
+
idempotencyKey: randomUUID12(),
|
|
48011
48061
|
body: {}
|
|
48012
48062
|
});
|
|
48013
48063
|
}
|
|
@@ -48015,7 +48065,7 @@ var init_client = __esm({
|
|
|
48015
48065
|
return this.request("/trading/ai/assistant/start", {
|
|
48016
48066
|
method: "POST",
|
|
48017
48067
|
profileId,
|
|
48018
|
-
idempotencyKey:
|
|
48068
|
+
idempotencyKey: randomUUID12(),
|
|
48019
48069
|
body: {}
|
|
48020
48070
|
});
|
|
48021
48071
|
}
|
|
@@ -48023,7 +48073,7 @@ var init_client = __esm({
|
|
|
48023
48073
|
return this.request("/trading/ai/assistant/stop", {
|
|
48024
48074
|
method: "POST",
|
|
48025
48075
|
profileId,
|
|
48026
|
-
idempotencyKey:
|
|
48076
|
+
idempotencyKey: randomUUID12(),
|
|
48027
48077
|
body: {}
|
|
48028
48078
|
});
|
|
48029
48079
|
}
|
|
@@ -48031,7 +48081,7 @@ var init_client = __esm({
|
|
|
48031
48081
|
return this.request("/trading/ai/runtime/session/start", {
|
|
48032
48082
|
method: "POST",
|
|
48033
48083
|
profileId,
|
|
48034
|
-
idempotencyKey:
|
|
48084
|
+
idempotencyKey: randomUUID12(),
|
|
48035
48085
|
body: payload
|
|
48036
48086
|
});
|
|
48037
48087
|
}
|
|
@@ -48042,7 +48092,7 @@ var init_client = __esm({
|
|
|
48042
48092
|
return this.request("/trading/ai/runtime/session/stop", {
|
|
48043
48093
|
method: "POST",
|
|
48044
48094
|
profileId,
|
|
48045
|
-
idempotencyKey:
|
|
48095
|
+
idempotencyKey: randomUUID12(),
|
|
48046
48096
|
body: payload
|
|
48047
48097
|
});
|
|
48048
48098
|
}
|
|
@@ -48059,7 +48109,7 @@ var init_client = __esm({
|
|
|
48059
48109
|
}).request("/trading/ai/runtime/session/stop", {
|
|
48060
48110
|
method: "POST",
|
|
48061
48111
|
profileId,
|
|
48062
|
-
idempotencyKey:
|
|
48112
|
+
idempotencyKey: randomUUID12(),
|
|
48063
48113
|
body: payload
|
|
48064
48114
|
});
|
|
48065
48115
|
}
|
|
@@ -48076,7 +48126,7 @@ import {
|
|
|
48076
48126
|
unlinkSync,
|
|
48077
48127
|
writeFileSync
|
|
48078
48128
|
} from "node:fs";
|
|
48079
|
-
import { randomUUID as
|
|
48129
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
48080
48130
|
import { dirname as dirname15 } from "node:path";
|
|
48081
48131
|
var parseStoredValues, FileBackedProtectionStorage, clientRuntimeProtectionStatePath;
|
|
48082
48132
|
var init_protection_storage = __esm({
|
|
@@ -48136,7 +48186,7 @@ var init_protection_storage = __esm({
|
|
|
48136
48186
|
mkdirSync(dirname15(this.path), { recursive: true, mode: 448 });
|
|
48137
48187
|
const serialized = `${JSON.stringify(values)}
|
|
48138
48188
|
`;
|
|
48139
|
-
const temporaryPath = `${this.path}.${process.pid}.${
|
|
48189
|
+
const temporaryPath = `${this.path}.${process.pid}.${randomUUID13()}.tmp`;
|
|
48140
48190
|
try {
|
|
48141
48191
|
writeFileSync(temporaryPath, serialized, {
|
|
48142
48192
|
encoding: "utf8",
|
|
@@ -48163,7 +48213,7 @@ var init_protection_storage = __esm({
|
|
|
48163
48213
|
});
|
|
48164
48214
|
|
|
48165
48215
|
// lib/agent-core/headless-runtime.ts
|
|
48166
|
-
import { randomUUID as
|
|
48216
|
+
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
48167
48217
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
48168
48218
|
function objectOrNull2(value) {
|
|
48169
48219
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -48275,8 +48325,8 @@ async function runAndReportLocalWorkCycle(options, state, leaseToken, context) {
|
|
|
48275
48325
|
return Boolean(result2.decision || tradeSync || result2.afterDecision);
|
|
48276
48326
|
}
|
|
48277
48327
|
async function startHeadlessRuntime(options) {
|
|
48278
|
-
const runtimeSessionId =
|
|
48279
|
-
const deviceId = String(options.deviceId || "").trim() ||
|
|
48328
|
+
const runtimeSessionId = randomUUID14();
|
|
48329
|
+
const deviceId = String(options.deviceId || "").trim() || randomUUID14();
|
|
48280
48330
|
const startResponse = await options.client.startRuntime(options.profileId, {
|
|
48281
48331
|
session_id: runtimeSessionId,
|
|
48282
48332
|
device_id: deviceId,
|
|
@@ -49817,6 +49867,8 @@ var init_network_debug = __esm({
|
|
|
49817
49867
|
kind: input.kind,
|
|
49818
49868
|
label: input.label,
|
|
49819
49869
|
transport: "browser",
|
|
49870
|
+
providerTransport: input.kind === "provider" ? input.providerTransport ?? "direct" : null,
|
|
49871
|
+
actualRelayPath: input.kind === "provider" && input.providerTransport === "server_relay" ? "/llm/native-provider-relay" : null,
|
|
49820
49872
|
method: (input.method || "POST").toUpperCase(),
|
|
49821
49873
|
targetProtocol,
|
|
49822
49874
|
targetHost,
|
|
@@ -64639,9 +64691,9 @@ var init_fragments = __esm({
|
|
|
64639
64691
|
}
|
|
64640
64692
|
const result2 = [];
|
|
64641
64693
|
while (this.#offset < top.match - 1) {
|
|
64642
|
-
const
|
|
64643
|
-
result2.push(this.#subTokenString(this.#offset + 1,
|
|
64644
|
-
this.#offset =
|
|
64694
|
+
const link2 = this.peek().linkNext;
|
|
64695
|
+
result2.push(this.#subTokenString(this.#offset + 1, link2));
|
|
64696
|
+
this.#offset = link2;
|
|
64645
64697
|
}
|
|
64646
64698
|
this.#offset = top.match + 1;
|
|
64647
64699
|
return result2;
|
|
@@ -69365,15 +69417,15 @@ var init_contract2 = __esm({
|
|
|
69365
69417
|
});
|
|
69366
69418
|
|
|
69367
69419
|
// node_modules/ethers/lib.esm/providers/ens-resolver.js
|
|
69368
|
-
function getIpfsLink(
|
|
69369
|
-
if (
|
|
69370
|
-
|
|
69371
|
-
} else if (
|
|
69372
|
-
|
|
69420
|
+
function getIpfsLink(link2) {
|
|
69421
|
+
if (link2.match(/^ipfs:\/\/ipfs\//i)) {
|
|
69422
|
+
link2 = link2.substring(12);
|
|
69423
|
+
} else if (link2.match(/^ipfs:\/\//i)) {
|
|
69424
|
+
link2 = link2.substring(7);
|
|
69373
69425
|
} else {
|
|
69374
|
-
assertArgument(false, "unsupported IPFS format", "link",
|
|
69426
|
+
assertArgument(false, "unsupported IPFS format", "link", link2);
|
|
69375
69427
|
}
|
|
69376
|
-
return `https://gateway.ipfs.io/ipfs/${
|
|
69428
|
+
return `https://gateway.ipfs.io/ipfs/${link2}`;
|
|
69377
69429
|
}
|
|
69378
69430
|
var MulticoinProviderPlugin, matcherIpfs, matchers, EnsResolver;
|
|
69379
69431
|
var init_ens_resolver = __esm({
|
|
@@ -92429,13 +92481,14 @@ var init_constraint_contract = __esm({
|
|
|
92429
92481
|
});
|
|
92430
92482
|
|
|
92431
92483
|
// lib/runtime/provider-observability.ts
|
|
92432
|
-
var record4, identifier, count3, normalizeProviderDiagnostics;
|
|
92484
|
+
var MAX_DIAGNOSTIC_LIST_ITEMS, record4, identifier, count3, normalizeProviderDiagnostics;
|
|
92433
92485
|
var init_provider_observability = __esm({
|
|
92434
92486
|
"lib/runtime/provider-observability.ts"() {
|
|
92435
92487
|
"use strict";
|
|
92436
92488
|
init_define_VTX_EXO_POLICY();
|
|
92437
92489
|
init_define_VTX_GROK_POLICY();
|
|
92438
92490
|
init_define_VTX_PI_MODEL_POLICY();
|
|
92491
|
+
MAX_DIAGNOSTIC_LIST_ITEMS = 16;
|
|
92439
92492
|
record4 = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
92440
92493
|
identifier = (v) => typeof v === "string" && /^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,255}$/.test(v) ? v : void 0;
|
|
92441
92494
|
count3 = (v) => {
|
|
@@ -92457,7 +92510,7 @@ var init_provider_observability = __esm({
|
|
|
92457
92510
|
result2.quota_project_source = "provider_quota_subject";
|
|
92458
92511
|
}
|
|
92459
92512
|
if (Array.isArray(raw.quota_violations)) {
|
|
92460
|
-
const violations = raw.quota_violations.slice(0,
|
|
92513
|
+
const violations = raw.quota_violations.slice(0, MAX_DIAGNOSTIC_LIST_ITEMS).map((item) => {
|
|
92461
92514
|
const v = record4(item);
|
|
92462
92515
|
const out = {};
|
|
92463
92516
|
const metric = identifier(v.metric), id2 = identifier(v.id), value2 = count3(v.value);
|
|
@@ -92471,6 +92524,11 @@ var init_provider_observability = __esm({
|
|
|
92471
92524
|
}).filter((v) => Object.keys(v).length > 0);
|
|
92472
92525
|
if (violations.length) result2.quota_violations = violations;
|
|
92473
92526
|
}
|
|
92527
|
+
const outputValidation = record4(raw.output_validation);
|
|
92528
|
+
if (Array.isArray(outputValidation.expected_symbols)) {
|
|
92529
|
+
const symbols = outputValidation.expected_symbols.slice(0, MAX_DIAGNOSTIC_LIST_ITEMS).map(identifier).filter((symbol2) => symbol2 !== void 0);
|
|
92530
|
+
if (symbols.length) result2.output_validation = { expected_symbols: [...new Set(symbols)] };
|
|
92531
|
+
}
|
|
92474
92532
|
return result2;
|
|
92475
92533
|
};
|
|
92476
92534
|
}
|
|
@@ -93032,7 +93090,7 @@ var headless_local_worker_exports = {};
|
|
|
93032
93090
|
__export(headless_local_worker_exports, {
|
|
93033
93091
|
createHeadlessLocalWorker: () => createHeadlessLocalWorker
|
|
93034
93092
|
});
|
|
93035
|
-
import { randomUUID as
|
|
93093
|
+
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
93036
93094
|
function objectOrNull3(value) {
|
|
93037
93095
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
93038
93096
|
}
|
|
@@ -93461,7 +93519,7 @@ function createHeadlessLocalWorker(options) {
|
|
|
93461
93519
|
const statusMatch = errorText.match(/\b([45]\d{2})\b/);
|
|
93462
93520
|
const statusCode = statusMatch ? Number(statusMatch[1]) : null;
|
|
93463
93521
|
const failedInvocation = normalizeAiInvocationTelemetry({
|
|
93464
|
-
client_invocation_id:
|
|
93522
|
+
client_invocation_id: randomUUID15(),
|
|
93465
93523
|
use_case: "trader",
|
|
93466
93524
|
role: "primary",
|
|
93467
93525
|
attempt_index: 0,
|
|
@@ -93517,7 +93575,7 @@ function createHeadlessLocalWorker(options) {
|
|
|
93517
93575
|
billable_cached_input_tokens: normalizedUsage.cached_input_tokens
|
|
93518
93576
|
};
|
|
93519
93577
|
const invocation = normalizeAiInvocationTelemetry({
|
|
93520
|
-
client_invocation_id:
|
|
93578
|
+
client_invocation_id: randomUUID15(),
|
|
93521
93579
|
use_case: "trader",
|
|
93522
93580
|
role: "primary",
|
|
93523
93581
|
attempt_index: 0,
|
|
@@ -93781,7 +93839,7 @@ var vtx_exports = {};
|
|
|
93781
93839
|
__export(vtx_exports, {
|
|
93782
93840
|
runVtxCli: () => runVtxCli
|
|
93783
93841
|
});
|
|
93784
|
-
import { randomUUID as
|
|
93842
|
+
import { randomUUID as randomUUID16 } from "node:crypto";
|
|
93785
93843
|
import { spawn as spawn12 } from "node:child_process";
|
|
93786
93844
|
function render2(value, json2) {
|
|
93787
93845
|
if (json2) {
|
|
@@ -94195,8 +94253,8 @@ async function runVtxCli(argv2, env = process.env) {
|
|
|
94195
94253
|
});
|
|
94196
94254
|
return { exitCode: 0, stdout: render2(redactCliOutput(response2), json2), stderr: "" };
|
|
94197
94255
|
}
|
|
94198
|
-
const runtimeSessionId =
|
|
94199
|
-
const deviceId = config2.runtimeDeviceId ??
|
|
94256
|
+
const runtimeSessionId = randomUUID16();
|
|
94257
|
+
const deviceId = config2.runtimeDeviceId ?? randomUUID16();
|
|
94200
94258
|
const response = await client.startRuntime(profileId, {
|
|
94201
94259
|
session_id: runtimeSessionId,
|
|
94202
94260
|
device_id: deviceId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtxmacro/cli",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.55",
|
|
4
4
|
"description": "VTX Macro CLI, MCP server, and durable external inference host.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"undici": "8.10.0",
|
|
24
|
-
"@openai/codex": "0.
|
|
24
|
+
"@openai/codex": "0.155.0",
|
|
25
25
|
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
26
26
|
"@earendil-works/pi-ai": "0.85.1",
|
|
27
27
|
"@earendil-works/pi-agent-core": "0.85.1",
|