run402 4.62.1 → 4.63.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/gitvault-surface.json +1 -1
- package/lib/gitvault-daemon.mjs +28 -1
- package/lib/remote-helper-session.mjs +63 -7
- package/package.json +1 -1
- package/sdk/dist/node/gitvault-prewarm.d.ts +17 -1
- package/sdk/dist/node/gitvault-prewarm.d.ts.map +1 -1
- package/sdk/dist/node/gitvault-prewarm.js +21 -3
- package/sdk/dist/node/gitvault-prewarm.js.map +1 -1
- package/sdk/dist/node/http-dispatcher.d.ts +4 -0
- package/sdk/dist/node/http-dispatcher.d.ts.map +1 -1
- package/sdk/dist/node/http-dispatcher.js +22 -0
- package/sdk/dist/node/http-dispatcher.js.map +1 -1
package/gitvault-surface.json
CHANGED
package/lib/gitvault-daemon.mjs
CHANGED
|
@@ -53,7 +53,7 @@ export async function runDaemon() {
|
|
|
53
53
|
// Load the heavy module ONCE — this is the entire point of residency.
|
|
54
54
|
// Its top-level await pulls the SDK graph; the prewarm dials the API
|
|
55
55
|
// origin so the first forwarded session rides a warm h2 connection.
|
|
56
|
-
const { prewarmGitvaultConnection } = await import("../sdk/dist/node/gitvault-prewarm.js");
|
|
56
|
+
const { prewarmGitvaultConnection, kickGitvaultConnection } = await import("../sdk/dist/node/gitvault-prewarm.js");
|
|
57
57
|
prewarmGitvaultConnection();
|
|
58
58
|
const { runHelperSession } = await import("./remote-helper-session.mjs");
|
|
59
59
|
|
|
@@ -169,10 +169,26 @@ export async function runDaemon() {
|
|
|
169
169
|
socket.end();
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
+
// gitvault-first-op-premium (design point: pre-connect on session
|
|
173
|
+
// accept). Git's own helper handshake (capabilities/list stdin
|
|
174
|
+
// exchange) buys ~100-200ms of free overlap before the SESSION's
|
|
175
|
+
// first real transport op — kick the owned dispatcher's connection
|
|
176
|
+
// right now, before env/cwd swap even, so a dead/never-dialed
|
|
177
|
+
// socket redials NOW instead of on the verb's critical path. The
|
|
178
|
+
// NARROW half only (`kickGitvaultConnection`), never the full
|
|
179
|
+
// `prewarmGitvaultConnection` — that also (re)warms the signer +
|
|
180
|
+
// paid-fetch buyer stack, which this daemon already warmed ONCE at
|
|
181
|
+
// boot; re-running it per session was measured to cost an EXTRA
|
|
182
|
+
// ~150-300ms/session (two live Base RPC probes a gitvault session
|
|
183
|
+
// never needs) for zero benefit. Fire-and-forget by contract
|
|
184
|
+
// (never throws, never awaited, never delays a session).
|
|
185
|
+
const acceptedAt = Date.now();
|
|
186
|
+
kickGitvaultConnection();
|
|
172
187
|
busy = true;
|
|
173
188
|
sessionsServed += 1;
|
|
174
189
|
const stdin = new PassThrough();
|
|
175
190
|
const restoreEnv = applySessionEnv(msg.env ?? {});
|
|
191
|
+
const envReadyAt = Date.now();
|
|
176
192
|
const prevCwd = process.cwd();
|
|
177
193
|
let restoreCwd = () => {};
|
|
178
194
|
try {
|
|
@@ -213,6 +229,17 @@ export async function runDaemon() {
|
|
|
213
229
|
};
|
|
214
230
|
session = { stdin, restoreEnv, restoreCwd, restoreWrites, backgroundWork: null };
|
|
215
231
|
send({ t: "ready" });
|
|
232
|
+
// gitvault-first-op-premium task 1.1: phase stamps for attribution
|
|
233
|
+
// (session accept -> env ready -> first transport call, the last
|
|
234
|
+
// covered by the existing RUN402_GITVAULT_TRACE per-op lines).
|
|
235
|
+
// Emitted AFTER write-redirection so they ride the socket to the
|
|
236
|
+
// client and land in the SAME trace stream the bench harness
|
|
237
|
+
// already captures — gated on the session's own env, exactly like
|
|
238
|
+
// every other gitvault-trace line.
|
|
239
|
+
if (process.env.RUN402_GITVAULT_TRACE === "1") {
|
|
240
|
+
process.stderr.write(`gitvault-trace: daemon session-accept ${sessionsServed} at ${acceptedAt}\n`);
|
|
241
|
+
process.stderr.write(`gitvault-trace: daemon env-ready ${sessionsServed} +${envReadyAt - acceptedAt}ms\n`);
|
|
242
|
+
}
|
|
216
243
|
// gitvault-checkpoint-cadence design D2: a push's auto-gc cycle
|
|
217
244
|
// (if triggered) hands its ALREADY-STARTED promise here instead
|
|
218
245
|
// of being awaited inline — `runHelperSession` itself still
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
*/
|
|
116
116
|
|
|
117
117
|
import { createInterface } from "node:readline";
|
|
118
|
+
import { statSync } from "node:fs";
|
|
118
119
|
|
|
119
120
|
// The heavy graphs load as ONE top-level await batch — in the in-process
|
|
120
121
|
// host this races the thin bin's already-fired prewarm; in the daemon host
|
|
@@ -123,10 +124,65 @@ const sdkModP = import("./sdk.mjs");
|
|
|
123
124
|
const walletModP = import("./wallet-context.mjs");
|
|
124
125
|
const isoModP = import("#sdk");
|
|
125
126
|
const nodeModP = import("#sdk/node");
|
|
127
|
+
const configModP = import("./config.mjs");
|
|
126
128
|
const { getSdk } = await sdkModP;
|
|
127
129
|
const { resolveWalletCore, enforceWalletExistsCore, WalletSelectionError } = await walletModP;
|
|
128
130
|
const { gitvaultRemoteAddressForm, gitvaultSlugReleasedInfo, parseGitvaultRemoteUrl } = await isoModP;
|
|
129
131
|
const { GITVAULT_R402_REF_NAMESPACE, hardenedGit, resolveGitInvocationRepo, readPinnedGitvaultRepo, pinGitvaultRepo, readGitvaultRestoreMarker, readGitvaultAutoGcThreshold } = await nodeModP;
|
|
132
|
+
const { allowanceFile, projectCredentialsFile, profileStateFile } = await configModP;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Per-session SDK construction cache (gitvault-first-op-premium task 2.2).
|
|
136
|
+
*
|
|
137
|
+
* `getSdk()` builds a fresh Node SDK instance on every call — cheap for a
|
|
138
|
+
* traditional one-process-per-invocation CLI, but this module is ALSO the
|
|
139
|
+
* resident daemon's per-session engine, where every forwarded session calls
|
|
140
|
+
* it fresh exactly once (via `openVault`). Measured: constructing a NEW SDK
|
|
141
|
+
* instance re-probes the paid-fetch buyer's rail selection (two live RPC
|
|
142
|
+
* calls, `sepolia.base.org` + `mainnet.base.org`, ~150-300ms combined) on
|
|
143
|
+
* its own first authenticated request — a cost a genuinely resident process
|
|
144
|
+
* should pay ONCE, not once per session. This is the dominant share of the
|
|
145
|
+
* measured "first transport op" premium a resident daemon was built to
|
|
146
|
+
* eliminate and, before this cache, did not.
|
|
147
|
+
*
|
|
148
|
+
* Keyed on the resolved wallet + the env that governs config resolution
|
|
149
|
+
* (`RUN402_CONFIG_DIR`/`RUN402_API_BASE` — the exact two vars `getSdk`'s own
|
|
150
|
+
* doc comment calls out as reasons a fresh instance mattered for tests that
|
|
151
|
+
* mutate them between calls in one process) and INVALIDATED on the mtime of
|
|
152
|
+
* the three files whose bytes actually determine signer/credential material
|
|
153
|
+
* (allowance, project-credentials keystore, profile state) — a wallet
|
|
154
|
+
* rotation, `run402 init`, or any other on-disk change is picked up on the
|
|
155
|
+
* very next call, no daemon restart required. A file that does not exist
|
|
156
|
+
* yet (fresh wallet, no allowance) signs into the key as `null`, so its
|
|
157
|
+
* LATER appearance also busts the cache. The in-process fallback host calls
|
|
158
|
+
* this at most once per process anyway, so it degrades to exactly today's
|
|
159
|
+
* behavior there — this only changes anything for the daemon.
|
|
160
|
+
*/
|
|
161
|
+
let cachedSdk = null; // { key, sdk }
|
|
162
|
+
|
|
163
|
+
function mtimeOf(path) {
|
|
164
|
+
try {
|
|
165
|
+
return statSync(path).mtimeMs;
|
|
166
|
+
} catch {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function sdkCacheKey() {
|
|
172
|
+
const wallet = process.env.RUN402_WALLET ?? "";
|
|
173
|
+
const configDir = process.env.RUN402_CONFIG_DIR ?? "";
|
|
174
|
+
const apiBase = process.env.RUN402_API_BASE ?? "";
|
|
175
|
+
const files = [mtimeOf(allowanceFile()), mtimeOf(projectCredentialsFile()), mtimeOf(profileStateFile())];
|
|
176
|
+
return `${wallet} ${configDir} ${apiBase} ${files.join(",")}`;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function getCachedSdk() {
|
|
180
|
+
const key = sdkCacheKey();
|
|
181
|
+
if (cachedSdk && cachedSdk.key === key) return cachedSdk.sdk;
|
|
182
|
+
const sdk = getSdk();
|
|
183
|
+
cachedSdk = { key, sdk };
|
|
184
|
+
return sdk;
|
|
185
|
+
}
|
|
130
186
|
|
|
131
187
|
/** The session's input stream — injected per session (daemon: the socket's forwarded stdin). */
|
|
132
188
|
let sessionStdin = process.stdin;
|
|
@@ -450,7 +506,7 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
450
506
|
* pin.
|
|
451
507
|
*/
|
|
452
508
|
const openVault = async (repoDir) => {
|
|
453
|
-
const result = await
|
|
509
|
+
const result = await getCachedSdk().gitvault.resolveOrCreateAddress({ address, allow_create: false, ...(repoDir ? { repo_dir: repoDir } : {}) });
|
|
454
510
|
return { vault: result.handle.vault, resolution: result.resolution };
|
|
455
511
|
};
|
|
456
512
|
|
|
@@ -482,14 +538,14 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
482
538
|
if (addressForm === "id" && repoDir) {
|
|
483
539
|
const pinned = await readPinnedGitvaultRepo(repoDir);
|
|
484
540
|
if (pinned) {
|
|
485
|
-
const result = await
|
|
541
|
+
const result = await getCachedSdk().gitvault.resolveOrCreateAddress({ address, repo_dir: repoDir, allow_create: false });
|
|
486
542
|
return result.handle.vault;
|
|
487
543
|
}
|
|
488
544
|
}
|
|
489
545
|
const result =
|
|
490
546
|
addressForm === "id"
|
|
491
|
-
? await
|
|
492
|
-
: await
|
|
547
|
+
? await getCachedSdk().gitvault.openOrCreate({ ...target, repo_dir: repoDir })
|
|
548
|
+
: await getCachedSdk().gitvault.resolveOrCreateAddress({ address, repo_dir: repoDir, allow_create: true });
|
|
493
549
|
if (addressForm === "id" && repoDir) await pinGitvaultRepo(repoDir, result.handle.repo_id, undefined, { project_id: target.project_id, org_id: target.org_id });
|
|
494
550
|
if (!result.found && result.created) {
|
|
495
551
|
note("");
|
|
@@ -556,7 +612,7 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
556
612
|
// always runs `list` first in a helper session, so this one site
|
|
557
613
|
// heals the pin for the `fetch`/`push` that follows it.
|
|
558
614
|
const recovered = repoDir && opened.resolution?.offline
|
|
559
|
-
? await
|
|
615
|
+
? await getCachedSdk().gitvault.recoverStalePin({ address, repo_dir: repoDir, resolution: opened.resolution, error: err })
|
|
560
616
|
: null;
|
|
561
617
|
if (!recovered) throw err;
|
|
562
618
|
note(`pinned vault ${opened.resolution.repo_id} no longer resolves — re-resolved to ${recovered.resolution.repo_id}, retrying`);
|
|
@@ -630,7 +686,7 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
630
686
|
const shared = sharedListSession && sharedListSession.repoDir === repoDir && sharedListSession.walletName === (resolvedWallet?.name ?? null) ? sharedListSession : null;
|
|
631
687
|
const restored = shared
|
|
632
688
|
? await shared.vault.restoreObjectsInto(repoDir, { marker: shared.fetchMarker, state: shared.fetchState })
|
|
633
|
-
: await
|
|
689
|
+
: await getCachedSdk().gitvault.restore({ ...target, repo_dir: repoDir, target_dir: repoDir });
|
|
634
690
|
if (verbosity >= 1) note(`restored generation ${restored.generation}`);
|
|
635
691
|
// clone-installs-retained-refs D3: a bookkeeping failure here degrades to
|
|
636
692
|
// exactly today's (pre-change) behavior — one stderr note, fetch still
|
|
@@ -686,7 +742,7 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
686
742
|
if (!shouldRunAutoGc(threshold, generationsSinceCheckpoint)) return;
|
|
687
743
|
|
|
688
744
|
const runCycle = async () => {
|
|
689
|
-
const sdk =
|
|
745
|
+
const sdk = getCachedSdk();
|
|
690
746
|
const checkpoint = await sdk.gitvault.compact({ ...target });
|
|
691
747
|
const prune = await sdk.gitvault.prune(target); // PLAN only — never `submit`; see compact()'s own grant-close doc comment for why prune needs no headroom of its own
|
|
692
748
|
return { checkpoint, prune };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run402",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.63.0",
|
|
4
4
|
"description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -4,9 +4,25 @@ export declare const prewarmDeps: {
|
|
|
4
4
|
warmSigner: () => unknown;
|
|
5
5
|
warmPaidStack: () => unknown;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* The connection-dial half alone (gitvault-first-op-premium task 2.1 —
|
|
9
|
+
* "pre-connect on session accept"). A RESIDENT daemon already ran the full
|
|
10
|
+
* prewarm (dial + signer + paid-stack) exactly once at boot; re-running
|
|
11
|
+
* `warmPaidStack` on every forwarded session was measured to cost an EXTRA
|
|
12
|
+
* ~150-300ms per session (two live Base RPC probes, `sepolia.base.org` +
|
|
13
|
+
* `mainnet.base.org`, that a gitvault session never actually needs) for no
|
|
14
|
+
* benefit — the paid-fetch buyer stack only needs loading once per process.
|
|
15
|
+
* This is the narrow half a session-accept hook should call: kick the owned
|
|
16
|
+
* dispatcher's connection (so a dead/never-dialed socket redials NOW,
|
|
17
|
+
* overlapping git's own helper handshake) and nothing else. Same contract as
|
|
18
|
+
* the full prewarm: fire-and-forget, every failure swallowed, no side effects.
|
|
19
|
+
*/
|
|
20
|
+
export declare function kickGitvaultConnection(apiBase?: string): void;
|
|
7
21
|
/**
|
|
8
22
|
* Start the connection + signer prewarm. Returns immediately; nothing to
|
|
9
|
-
* await, nothing thrown, ever.
|
|
23
|
+
* await, nothing thrown, ever. Call this ONCE per process (verb startup, or
|
|
24
|
+
* daemon boot) — see `kickGitvaultConnection` for the narrower, repeatable
|
|
25
|
+
* connection-only half a resident daemon should use per forwarded session.
|
|
10
26
|
*/
|
|
11
27
|
export declare function prewarmGitvaultConnection(apiBase?: string): void;
|
|
12
28
|
//# sourceMappingURL=gitvault-prewarm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitvault-prewarm.d.ts","sourceRoot":"","sources":["../../src/node/gitvault-prewarm.ts"],"names":[],"mappings":"AAiCA,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAAE;IACxB,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAC/B,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,OAAO,CAAC;CAwB9B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"gitvault-prewarm.d.ts","sourceRoot":"","sources":["../../src/node/gitvault-prewarm.ts"],"names":[],"mappings":"AAiCA,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAAE;IACxB,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAC/B,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,OAAO,CAAC;CAwB9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAU7D;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAiBhE"}
|
|
@@ -56,10 +56,19 @@ export const prewarmDeps = {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* The connection-dial half alone (gitvault-first-op-premium task 2.1 —
|
|
60
|
+
* "pre-connect on session accept"). A RESIDENT daemon already ran the full
|
|
61
|
+
* prewarm (dial + signer + paid-stack) exactly once at boot; re-running
|
|
62
|
+
* `warmPaidStack` on every forwarded session was measured to cost an EXTRA
|
|
63
|
+
* ~150-300ms per session (two live Base RPC probes, `sepolia.base.org` +
|
|
64
|
+
* `mainnet.base.org`, that a gitvault session never actually needs) for no
|
|
65
|
+
* benefit — the paid-fetch buyer stack only needs loading once per process.
|
|
66
|
+
* This is the narrow half a session-accept hook should call: kick the owned
|
|
67
|
+
* dispatcher's connection (so a dead/never-dialed socket redials NOW,
|
|
68
|
+
* overlapping git's own helper handshake) and nothing else. Same contract as
|
|
69
|
+
* the full prewarm: fire-and-forget, every failure swallowed, no side effects.
|
|
61
70
|
*/
|
|
62
|
-
export function
|
|
71
|
+
export function kickGitvaultConnection(apiBase) {
|
|
63
72
|
try {
|
|
64
73
|
const base = apiBase ?? getApiBase();
|
|
65
74
|
void prewarmDeps
|
|
@@ -70,6 +79,15 @@ export function prewarmGitvaultConnection(apiBase) {
|
|
|
70
79
|
catch {
|
|
71
80
|
/* a malformed base or missing fetch must never reach a verb */
|
|
72
81
|
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Start the connection + signer prewarm. Returns immediately; nothing to
|
|
85
|
+
* await, nothing thrown, ever. Call this ONCE per process (verb startup, or
|
|
86
|
+
* daemon boot) — see `kickGitvaultConnection` for the narrower, repeatable
|
|
87
|
+
* connection-only half a resident daemon should use per forwarded session.
|
|
88
|
+
*/
|
|
89
|
+
export function prewarmGitvaultConnection(apiBase) {
|
|
90
|
+
kickGitvaultConnection(apiBase);
|
|
73
91
|
// Deferred so a remote helper's `capabilities` reply is never delayed by
|
|
74
92
|
// the synchronous sign — the warmup only has to land before the verb's
|
|
75
93
|
// first authenticated request, which is several stdin exchanges away.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitvault-prewarm.js","sourceRoot":"","sources":["../../src/node/gitvault-prewarm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,4BAA4B;AAC5B,MAAM,CAAC,MAAM,WAAW,GAIpB;IACF,yEAAyE;IACzE,qE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AE,GAAE,CAAC,CAAC,CAAC;aAClD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,+DAA+D;IACjE,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,yEAAyE;IACzE,uEAAuE;IACvE,sEAAsE;IACtE,YAAY,CAAC,GAAG,EAAE;QAChB,IAAI,CAAC;YACH,WAAW,CAAC,UAAU,EAAE,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;QAC5E,CAAC;QACD,IAAI,CAAC;YACH,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,mEAAmE;QACrE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -13,6 +13,10 @@ declare class TicketStore {
|
|
|
13
13
|
}
|
|
14
14
|
/** Test-only export of the store (the class itself is not public API). */
|
|
15
15
|
export { TicketStore as _TicketStoreForTests };
|
|
16
|
+
/** Test/diagnostic-only: the number of real dials to the API origin this process has made. */
|
|
17
|
+
export declare function _apiDialCount(): number;
|
|
18
|
+
/** Test-only: reset the dial counter alongside the dispatcher singleton. */
|
|
19
|
+
export declare function _resetApiDialCount(): void;
|
|
16
20
|
/** The owned dispatcher — created lazily so config/env resolution happens at first use, once per process. */
|
|
17
21
|
export declare function sdkDispatcher(): Dispatcher;
|
|
18
22
|
/** Test-only: drop the singleton so a suite can re-resolve config. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-dispatcher.d.ts","sourceRoot":"","sources":["../../src/node/http-dispatcher.ts"],"names":[],"mappings":"AAoCA,OAAO,EAA6C,KAAK,UAAU,EAAuB,MAAM,QAAQ,CAAC;AAMzG;;;;;GAKG;AACH,cAAM,WAAW;;gBAKH,IAAI,EAAE,MAAM;IAIxB,GAAG,IAAI,MAAM,GAAG,SAAS;IAezB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAY3B;
|
|
1
|
+
{"version":3,"file":"http-dispatcher.d.ts","sourceRoot":"","sources":["../../src/node/http-dispatcher.ts"],"names":[],"mappings":"AAoCA,OAAO,EAA6C,KAAK,UAAU,EAAuB,MAAM,QAAQ,CAAC;AAMzG;;;;;GAKG;AACH,cAAM,WAAW;;gBAKH,IAAI,EAAE,MAAM;IAIxB,GAAG,IAAI,MAAM,GAAG,SAAS;IAezB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAY3B;AAqCD,0EAA0E;AAC1E,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,CAAC;AAY/C,8FAA8F;AAC9F,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AACD,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAID,6GAA6G;AAC7G,wBAAgB,aAAa,IAAI,UAAU,CA0B1C;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAiDD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,UAAU,CAAC,KAGxC,CAAC"}
|
|
@@ -96,6 +96,10 @@ function apiConnector(store) {
|
|
|
96
96
|
callback(err, socket);
|
|
97
97
|
};
|
|
98
98
|
try {
|
|
99
|
+
apiDialCount += 1;
|
|
100
|
+
if (process.env.RUN402_GITVAULT_TRACE === "1") {
|
|
101
|
+
process.stderr.write(`gitvault-trace: dispatcher-dial #${apiDialCount} ${options.servername ?? options.hostname}\n`);
|
|
102
|
+
}
|
|
99
103
|
const socket = tlsConnect({
|
|
100
104
|
host: options.host ?? options.hostname,
|
|
101
105
|
port: options.port ? Number(options.port) : 443,
|
|
@@ -115,6 +119,24 @@ function apiConnector(store) {
|
|
|
115
119
|
}
|
|
116
120
|
/** Test-only export of the store (the class itself is not public API). */
|
|
117
121
|
export { TicketStore as _TicketStoreForTests };
|
|
122
|
+
/**
|
|
123
|
+
* Dial-vs-reused attribution (gitvault-first-op-premium task 1.1). Every
|
|
124
|
+
* real TCP dial to the API origin increments this — `apiConnector` is the
|
|
125
|
+
* ONLY place undici opens a fresh socket for that origin, so a count that
|
|
126
|
+
* climbs faster than "once per process" proves a connection is dying and
|
|
127
|
+
* being re-dialed rather than genuinely reused across daemon sessions.
|
|
128
|
+
* Cheap (an integer increment) and always counted; the stderr line is
|
|
129
|
+
* gated on `RUN402_GITVAULT_TRACE=1` like every other transport trace.
|
|
130
|
+
*/
|
|
131
|
+
let apiDialCount = 0;
|
|
132
|
+
/** Test/diagnostic-only: the number of real dials to the API origin this process has made. */
|
|
133
|
+
export function _apiDialCount() {
|
|
134
|
+
return apiDialCount;
|
|
135
|
+
}
|
|
136
|
+
/** Test-only: reset the dial counter alongside the dispatcher singleton. */
|
|
137
|
+
export function _resetApiDialCount() {
|
|
138
|
+
apiDialCount = 0;
|
|
139
|
+
}
|
|
118
140
|
let agentSingleton = null;
|
|
119
141
|
/** The owned dispatcher — created lazily so config/env resolution happens at first use, once per process. */
|
|
120
142
|
export function sdkDispatcher() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-dispatcher.js","sourceRoot":"","sources":["../../src/node/http-dispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,WAAW,EAAwC,MAAM,QAAQ,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAA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