terminalhire 0.42.32 → 0.42.33
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/bin/jpi-claim.js +24 -9
- package/dist/bin/jpi-dispatch.js +28 -13
- package/dist/bin/jpi-mcp.js +24 -9
- package/dist/bin/jpi-run.js +24 -9
- package/dist/bin/jpi-sync.js +2 -2
- package/package.json +1 -1
package/dist/bin/jpi-claim.js
CHANGED
|
@@ -26026,6 +26026,9 @@ var init_progress = __esm({
|
|
|
26026
26026
|
});
|
|
26027
26027
|
|
|
26028
26028
|
// ../../packages/envrun/dist/classify.js
|
|
26029
|
+
function reportedCounts(classified, reparsed) {
|
|
26030
|
+
return classified !== void 0 ? classified : reparsed;
|
|
26031
|
+
}
|
|
26029
26032
|
function readCounts(stdout, stderr = "") {
|
|
26030
26033
|
const out = `${stdout}
|
|
26031
26034
|
${stderr}`;
|
|
@@ -29244,14 +29247,16 @@ async function runEnvironmentSpec(req) {
|
|
|
29244
29247
|
result = {
|
|
29245
29248
|
outcome: "test-command-unavailable",
|
|
29246
29249
|
note: installEnvironmentFailureNote(install, image),
|
|
29247
|
-
installOk: false
|
|
29250
|
+
installOk: false,
|
|
29251
|
+
counts: null
|
|
29248
29252
|
};
|
|
29249
29253
|
} else if (req.spec.testCommand === null) {
|
|
29250
29254
|
const why = req.spec.unresolved.find((r) => r.kind === "no-test-command")?.detail;
|
|
29251
29255
|
result = {
|
|
29252
29256
|
outcome: "no-tests-observed",
|
|
29253
29257
|
note: "the spec derived no test command, so nothing was executed: nothing failed and nothing ran. Certain, not inferred \u2014 no command was ever invoked." + (why === void 0 ? "" : ` Why: ${why}.`),
|
|
29254
|
-
installOk: true
|
|
29258
|
+
installOk: true,
|
|
29259
|
+
counts: null
|
|
29255
29260
|
};
|
|
29256
29261
|
} else {
|
|
29257
29262
|
test = await runStep(containment, {
|
|
@@ -29276,7 +29281,12 @@ async function runEnvironmentSpec(req) {
|
|
|
29276
29281
|
timeoutMs: req.testTimeoutMs ?? 9e5
|
|
29277
29282
|
});
|
|
29278
29283
|
const verdict = classifyVerification({ ...toExecution(test), runtime: req.spec.runtime });
|
|
29279
|
-
result = {
|
|
29284
|
+
result = {
|
|
29285
|
+
outcome: verdict.outcome,
|
|
29286
|
+
note: verdict.reason,
|
|
29287
|
+
installOk: true,
|
|
29288
|
+
counts: verdict.counts
|
|
29289
|
+
};
|
|
29280
29290
|
}
|
|
29281
29291
|
} finally {
|
|
29282
29292
|
watch?.stop();
|
|
@@ -29300,7 +29310,7 @@ async function runEnvironmentSpec(req) {
|
|
|
29300
29310
|
install,
|
|
29301
29311
|
test,
|
|
29302
29312
|
installOk: result.installOk,
|
|
29303
|
-
counts: test ? readCounts(test.stdout, test.stderr) : null,
|
|
29313
|
+
counts: reportedCounts(result.counts, test ? readCounts(test.stdout, test.stderr) : null),
|
|
29304
29314
|
leaks: judgeLeaks(peak, after, observation),
|
|
29305
29315
|
note: result.note,
|
|
29306
29316
|
wallMs: Date.now() - startedAt
|
|
@@ -34833,6 +34843,9 @@ var init_dist3 = __esm({
|
|
|
34833
34843
|
// ../../packages/envrun/dist/screenshots.js
|
|
34834
34844
|
import { copyFileSync as copyFileSync4, mkdirSync as mkdirSync6 } from "fs";
|
|
34835
34845
|
import { join as join27 } from "path";
|
|
34846
|
+
function captureTimeout(ctx, fixedMs) {
|
|
34847
|
+
return ctx.deadline === void 0 ? fixedMs : timeoutWithin(GUARDED_CAPTURE_CAP_MS, ctx.deadline);
|
|
34848
|
+
}
|
|
34836
34849
|
function normalizeRoutes(routes) {
|
|
34837
34850
|
const out = [];
|
|
34838
34851
|
for (const raw of routes ?? []) {
|
|
@@ -35058,7 +35071,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35058
35071
|
user,
|
|
35059
35072
|
labels: ctx.labels,
|
|
35060
35073
|
onTiming: stepTimer(ctx, side)
|
|
35061
|
-
},
|
|
35074
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
35062
35075
|
if (shot.status === "captured")
|
|
35063
35076
|
return done(side, shot, staticOut);
|
|
35064
35077
|
if (shot.status !== "no-site" || plan.serveCommand === null) {
|
|
@@ -35068,7 +35081,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35068
35081
|
const findApp = () => lease.docker.sync(["ps", "-aq", "--filter", `label=terminalhire.capture-app=${appLabel}`], syncOpts(ctx)).stdout.trim().split("\n")[0] || null;
|
|
35069
35082
|
const labels = { ...ctx.labels ?? {}, "terminalhire.capture-app": appLabel };
|
|
35070
35083
|
ctx.progress?.("screenshots", `${side}: ${plan.serveCommand}`);
|
|
35071
|
-
const serving = step("serve", "offline", plan.serveCommand, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs, { labels }).catch(() => null);
|
|
35084
|
+
const serving = step("serve", "offline", plan.serveCommand, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), { labels }).catch(() => null);
|
|
35072
35085
|
let appId = null;
|
|
35073
35086
|
try {
|
|
35074
35087
|
for (let i = 0; i < 60 && appId === null; i++) {
|
|
@@ -35091,7 +35104,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35091
35104
|
user,
|
|
35092
35105
|
labels: ctx.labels,
|
|
35093
35106
|
onTiming: stepTimer(ctx, side)
|
|
35094
|
-
},
|
|
35107
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
35095
35108
|
if (served.status !== "captured")
|
|
35096
35109
|
return skip(served.reason ?? "the serve script produced no screenshot");
|
|
35097
35110
|
return done(side, served, serverOut);
|
|
@@ -35195,7 +35208,7 @@ function syncOpts(ctx) {
|
|
|
35195
35208
|
function message(err) {
|
|
35196
35209
|
return String(err?.message ?? err).slice(0, 500);
|
|
35197
35210
|
}
|
|
35198
|
-
var SCREENSHOT_LIMITS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
35211
|
+
var SCREENSHOT_LIMITS, GUARDED_CAPTURE_CAP_MS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
35199
35212
|
var init_screenshots = __esm({
|
|
35200
35213
|
"../../packages/envrun/dist/screenshots.js"() {
|
|
35201
35214
|
"use strict";
|
|
@@ -35210,6 +35223,7 @@ var init_screenshots = __esm({
|
|
|
35210
35223
|
captureTimeoutMs: 18e4,
|
|
35211
35224
|
waitForPortMs: 6e4
|
|
35212
35225
|
};
|
|
35226
|
+
GUARDED_CAPTURE_CAP_MS = 6e5;
|
|
35213
35227
|
BUILD_MARKER = ".terminalhire-build-start";
|
|
35214
35228
|
realDeps = {
|
|
35215
35229
|
runStep: (lease, r) => runStep(lease.containment, r),
|
|
@@ -35227,7 +35241,7 @@ var init_screenshots = __esm({
|
|
|
35227
35241
|
};
|
|
35228
35242
|
HOSTED_BEFORE_REASON = "before side not captured on hosted runs yet";
|
|
35229
35243
|
SCREENSHOT_BUDGET_MS = 3e5;
|
|
35230
|
-
HOSTED_SCREENSHOT_BUDGET_MS =
|
|
35244
|
+
HOSTED_SCREENSHOT_BUDGET_MS = 36e4;
|
|
35231
35245
|
RENDERED_EXTENSIONS = /\.(html?|css|scss|sass|less|tsx|jsx|vue|svelte|astro|mdx|hbs|handlebars|ejs|erb|liquid|twig|njk)$/i;
|
|
35232
35246
|
RENDERED_DIRS = /(^|\/)(public|static|assets|templates)\//i;
|
|
35233
35247
|
}
|
|
@@ -37288,6 +37302,7 @@ __export(dist_exports, {
|
|
|
37288
37302
|
renderRunReport: () => renderRunReport,
|
|
37289
37303
|
renderVenueLine: () => renderVenueLine,
|
|
37290
37304
|
renderVerdictLine: () => renderVerdictLine,
|
|
37305
|
+
reportedCounts: () => reportedCounts,
|
|
37291
37306
|
resolveImageForSpec: () => resolveImageForSpec,
|
|
37292
37307
|
resolveLease: () => resolveLease,
|
|
37293
37308
|
resolveRunEnvironment: () => resolveRunEnvironment,
|
package/dist/bin/jpi-dispatch.js
CHANGED
|
@@ -31786,6 +31786,9 @@ var init_progress = __esm({
|
|
|
31786
31786
|
});
|
|
31787
31787
|
|
|
31788
31788
|
// ../../packages/envrun/dist/classify.js
|
|
31789
|
+
function reportedCounts(classified, reparsed) {
|
|
31790
|
+
return classified !== void 0 ? classified : reparsed;
|
|
31791
|
+
}
|
|
31789
31792
|
function readCounts(stdout, stderr = "") {
|
|
31790
31793
|
const out = `${stdout}
|
|
31791
31794
|
${stderr}`;
|
|
@@ -35004,14 +35007,16 @@ async function runEnvironmentSpec(req) {
|
|
|
35004
35007
|
result = {
|
|
35005
35008
|
outcome: "test-command-unavailable",
|
|
35006
35009
|
note: installEnvironmentFailureNote(install, image),
|
|
35007
|
-
installOk: false
|
|
35010
|
+
installOk: false,
|
|
35011
|
+
counts: null
|
|
35008
35012
|
};
|
|
35009
35013
|
} else if (req.spec.testCommand === null) {
|
|
35010
35014
|
const why = req.spec.unresolved.find((r) => r.kind === "no-test-command")?.detail;
|
|
35011
35015
|
result = {
|
|
35012
35016
|
outcome: "no-tests-observed",
|
|
35013
35017
|
note: "the spec derived no test command, so nothing was executed: nothing failed and nothing ran. Certain, not inferred \u2014 no command was ever invoked." + (why === void 0 ? "" : ` Why: ${why}.`),
|
|
35014
|
-
installOk: true
|
|
35018
|
+
installOk: true,
|
|
35019
|
+
counts: null
|
|
35015
35020
|
};
|
|
35016
35021
|
} else {
|
|
35017
35022
|
test = await runStep(containment, {
|
|
@@ -35036,7 +35041,12 @@ async function runEnvironmentSpec(req) {
|
|
|
35036
35041
|
timeoutMs: req.testTimeoutMs ?? 9e5
|
|
35037
35042
|
});
|
|
35038
35043
|
const verdict = classifyVerification({ ...toExecution(test), runtime: req.spec.runtime });
|
|
35039
|
-
result = {
|
|
35044
|
+
result = {
|
|
35045
|
+
outcome: verdict.outcome,
|
|
35046
|
+
note: verdict.reason,
|
|
35047
|
+
installOk: true,
|
|
35048
|
+
counts: verdict.counts
|
|
35049
|
+
};
|
|
35040
35050
|
}
|
|
35041
35051
|
} finally {
|
|
35042
35052
|
watch?.stop();
|
|
@@ -35060,7 +35070,7 @@ async function runEnvironmentSpec(req) {
|
|
|
35060
35070
|
install,
|
|
35061
35071
|
test,
|
|
35062
35072
|
installOk: result.installOk,
|
|
35063
|
-
counts: test ? readCounts(test.stdout, test.stderr) : null,
|
|
35073
|
+
counts: reportedCounts(result.counts, test ? readCounts(test.stdout, test.stderr) : null),
|
|
35064
35074
|
leaks: judgeLeaks(peak, after, observation),
|
|
35065
35075
|
note: result.note,
|
|
35066
35076
|
wallMs: Date.now() - startedAt
|
|
@@ -40593,6 +40603,9 @@ var init_dist3 = __esm({
|
|
|
40593
40603
|
// ../../packages/envrun/dist/screenshots.js
|
|
40594
40604
|
import { copyFileSync as copyFileSync4, mkdirSync as mkdirSync8 } from "fs";
|
|
40595
40605
|
import { join as join43 } from "path";
|
|
40606
|
+
function captureTimeout(ctx, fixedMs) {
|
|
40607
|
+
return ctx.deadline === void 0 ? fixedMs : timeoutWithin(GUARDED_CAPTURE_CAP_MS, ctx.deadline);
|
|
40608
|
+
}
|
|
40596
40609
|
function normalizeRoutes(routes) {
|
|
40597
40610
|
const out = [];
|
|
40598
40611
|
for (const raw of routes ?? []) {
|
|
@@ -40818,7 +40831,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
40818
40831
|
user,
|
|
40819
40832
|
labels: ctx.labels,
|
|
40820
40833
|
onTiming: stepTimer(ctx, side)
|
|
40821
|
-
},
|
|
40834
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
40822
40835
|
if (shot.status === "captured")
|
|
40823
40836
|
return done(side, shot, staticOut);
|
|
40824
40837
|
if (shot.status !== "no-site" || plan.serveCommand === null) {
|
|
@@ -40828,7 +40841,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
40828
40841
|
const findApp = () => lease.docker.sync(["ps", "-aq", "--filter", `label=terminalhire.capture-app=${appLabel}`], syncOpts(ctx)).stdout.trim().split("\n")[0] || null;
|
|
40829
40842
|
const labels = { ...ctx.labels ?? {}, "terminalhire.capture-app": appLabel };
|
|
40830
40843
|
ctx.progress?.("screenshots", `${side}: ${plan.serveCommand}`);
|
|
40831
|
-
const serving = step("serve", "offline", plan.serveCommand, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs, { labels }).catch(() => null);
|
|
40844
|
+
const serving = step("serve", "offline", plan.serveCommand, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), { labels }).catch(() => null);
|
|
40832
40845
|
let appId = null;
|
|
40833
40846
|
try {
|
|
40834
40847
|
for (let i = 0; i < 60 && appId === null; i++) {
|
|
@@ -40851,7 +40864,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
40851
40864
|
user,
|
|
40852
40865
|
labels: ctx.labels,
|
|
40853
40866
|
onTiming: stepTimer(ctx, side)
|
|
40854
|
-
},
|
|
40867
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
40855
40868
|
if (served.status !== "captured")
|
|
40856
40869
|
return skip(served.reason ?? "the serve script produced no screenshot");
|
|
40857
40870
|
return done(side, served, serverOut);
|
|
@@ -40955,7 +40968,7 @@ function syncOpts(ctx) {
|
|
|
40955
40968
|
function message(err) {
|
|
40956
40969
|
return String(err?.message ?? err).slice(0, 500);
|
|
40957
40970
|
}
|
|
40958
|
-
var SCREENSHOT_LIMITS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
40971
|
+
var SCREENSHOT_LIMITS, GUARDED_CAPTURE_CAP_MS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
40959
40972
|
var init_screenshots = __esm({
|
|
40960
40973
|
"../../packages/envrun/dist/screenshots.js"() {
|
|
40961
40974
|
"use strict";
|
|
@@ -40970,6 +40983,7 @@ var init_screenshots = __esm({
|
|
|
40970
40983
|
captureTimeoutMs: 18e4,
|
|
40971
40984
|
waitForPortMs: 6e4
|
|
40972
40985
|
};
|
|
40986
|
+
GUARDED_CAPTURE_CAP_MS = 6e5;
|
|
40973
40987
|
BUILD_MARKER = ".terminalhire-build-start";
|
|
40974
40988
|
realDeps = {
|
|
40975
40989
|
runStep: (lease, r) => runStep(lease.containment, r),
|
|
@@ -40987,7 +41001,7 @@ var init_screenshots = __esm({
|
|
|
40987
41001
|
};
|
|
40988
41002
|
HOSTED_BEFORE_REASON = "before side not captured on hosted runs yet";
|
|
40989
41003
|
SCREENSHOT_BUDGET_MS = 3e5;
|
|
40990
|
-
HOSTED_SCREENSHOT_BUDGET_MS =
|
|
41004
|
+
HOSTED_SCREENSHOT_BUDGET_MS = 36e4;
|
|
40991
41005
|
RENDERED_EXTENSIONS = /\.(html?|css|scss|sass|less|tsx|jsx|vue|svelte|astro|mdx|hbs|handlebars|ejs|erb|liquid|twig|njk)$/i;
|
|
40992
41006
|
RENDERED_DIRS = /(^|\/)(public|static|assets|templates)\//i;
|
|
40993
41007
|
}
|
|
@@ -43048,6 +43062,7 @@ __export(dist_exports, {
|
|
|
43048
43062
|
renderRunReport: () => renderRunReport,
|
|
43049
43063
|
renderVenueLine: () => renderVenueLine,
|
|
43050
43064
|
renderVerdictLine: () => renderVerdictLine,
|
|
43065
|
+
reportedCounts: () => reportedCounts,
|
|
43051
43066
|
resolveImageForSpec: () => resolveImageForSpec,
|
|
43052
43067
|
resolveLease: () => resolveLease,
|
|
43053
43068
|
resolveRunEnvironment: () => resolveRunEnvironment,
|
|
@@ -80593,12 +80608,12 @@ async function run26() {
|
|
|
80593
80608
|
console.log(" terminalhire sync \u2014 opt-in Tier-1 profile sync (one-time snapshot)");
|
|
80594
80609
|
console.log("");
|
|
80595
80610
|
console.log(
|
|
80596
|
-
|
|
80611
|
+
" terminalhire sync --push Send your profile (shows a consent card, requires browser confirm)"
|
|
80597
80612
|
);
|
|
80598
80613
|
console.log(" terminalhire sync --status Show whether you have consented (local read only)");
|
|
80599
80614
|
console.log(" terminalhire sync --delete Hard-delete your synced profile (revocation)");
|
|
80600
80615
|
console.log("");
|
|
80601
|
-
console.log(
|
|
80616
|
+
console.log(" Your profile is NEVER sent without an explicit browser confirm.");
|
|
80602
80617
|
console.log(" This is NOT required to use terminalhire.");
|
|
80603
80618
|
console.log("");
|
|
80604
80619
|
}
|
|
@@ -82378,7 +82393,7 @@ if (!firstArg || firstArg === "help" || firstArg === "--help" || firstArg === "-
|
|
|
82378
82393
|
console.log(" terminalhire saved List all locally-saved jobs");
|
|
82379
82394
|
console.log(" terminalhire unsave <jobId> Remove a saved job");
|
|
82380
82395
|
console.log(
|
|
82381
|
-
" terminalhire sync --push Opt-in: send your profile to staqs (
|
|
82396
|
+
" terminalhire sync --push Opt-in: send your profile to staqs (browser confirm)"
|
|
82382
82397
|
);
|
|
82383
82398
|
console.log(
|
|
82384
82399
|
" terminalhire sync --status Show whether you have consented (local read only)"
|
|
@@ -82402,7 +82417,7 @@ if (!firstArg || firstArg === "help" || firstArg === "--help" || firstArg === "-
|
|
|
82402
82417
|
console.log(" GET /api/index \u2014 anonymous index download (no dev data)");
|
|
82403
82418
|
console.log(" POST /api/lead \u2014 only after explicit per-role named-entity consent");
|
|
82404
82419
|
console.log(
|
|
82405
|
-
" POST /api/profile-sync \u2014 only via `terminalhire sync --push` with a
|
|
82420
|
+
" POST /api/profile-sync \u2014 only via `terminalhire sync --push` with a browser confirm token"
|
|
82406
82421
|
);
|
|
82407
82422
|
console.log(
|
|
82408
82423
|
" GitHub token \u2014 encrypted at ~/.terminalhire/github-token.enc, scope: read:user"
|
package/dist/bin/jpi-mcp.js
CHANGED
|
@@ -26561,6 +26561,9 @@ var init_progress = __esm({
|
|
|
26561
26561
|
});
|
|
26562
26562
|
|
|
26563
26563
|
// ../../packages/envrun/dist/classify.js
|
|
26564
|
+
function reportedCounts(classified, reparsed) {
|
|
26565
|
+
return classified !== void 0 ? classified : reparsed;
|
|
26566
|
+
}
|
|
26564
26567
|
function readCounts(stdout, stderr = "") {
|
|
26565
26568
|
const out = `${stdout}
|
|
26566
26569
|
${stderr}`;
|
|
@@ -29779,14 +29782,16 @@ async function runEnvironmentSpec(req) {
|
|
|
29779
29782
|
result = {
|
|
29780
29783
|
outcome: "test-command-unavailable",
|
|
29781
29784
|
note: installEnvironmentFailureNote(install, image),
|
|
29782
|
-
installOk: false
|
|
29785
|
+
installOk: false,
|
|
29786
|
+
counts: null
|
|
29783
29787
|
};
|
|
29784
29788
|
} else if (req.spec.testCommand === null) {
|
|
29785
29789
|
const why = req.spec.unresolved.find((r) => r.kind === "no-test-command")?.detail;
|
|
29786
29790
|
result = {
|
|
29787
29791
|
outcome: "no-tests-observed",
|
|
29788
29792
|
note: "the spec derived no test command, so nothing was executed: nothing failed and nothing ran. Certain, not inferred \u2014 no command was ever invoked." + (why === void 0 ? "" : ` Why: ${why}.`),
|
|
29789
|
-
installOk: true
|
|
29793
|
+
installOk: true,
|
|
29794
|
+
counts: null
|
|
29790
29795
|
};
|
|
29791
29796
|
} else {
|
|
29792
29797
|
test = await runStep(containment, {
|
|
@@ -29811,7 +29816,12 @@ async function runEnvironmentSpec(req) {
|
|
|
29811
29816
|
timeoutMs: req.testTimeoutMs ?? 9e5
|
|
29812
29817
|
});
|
|
29813
29818
|
const verdict = classifyVerification({ ...toExecution(test), runtime: req.spec.runtime });
|
|
29814
|
-
result = {
|
|
29819
|
+
result = {
|
|
29820
|
+
outcome: verdict.outcome,
|
|
29821
|
+
note: verdict.reason,
|
|
29822
|
+
installOk: true,
|
|
29823
|
+
counts: verdict.counts
|
|
29824
|
+
};
|
|
29815
29825
|
}
|
|
29816
29826
|
} finally {
|
|
29817
29827
|
watch?.stop();
|
|
@@ -29835,7 +29845,7 @@ async function runEnvironmentSpec(req) {
|
|
|
29835
29845
|
install,
|
|
29836
29846
|
test,
|
|
29837
29847
|
installOk: result.installOk,
|
|
29838
|
-
counts: test ? readCounts(test.stdout, test.stderr) : null,
|
|
29848
|
+
counts: reportedCounts(result.counts, test ? readCounts(test.stdout, test.stderr) : null),
|
|
29839
29849
|
leaks: judgeLeaks(peak, after, observation),
|
|
29840
29850
|
note: result.note,
|
|
29841
29851
|
wallMs: Date.now() - startedAt
|
|
@@ -35368,6 +35378,9 @@ var init_dist3 = __esm({
|
|
|
35368
35378
|
// ../../packages/envrun/dist/screenshots.js
|
|
35369
35379
|
import { copyFileSync as copyFileSync4, mkdirSync as mkdirSync6 } from "fs";
|
|
35370
35380
|
import { join as join29 } from "path";
|
|
35381
|
+
function captureTimeout(ctx, fixedMs) {
|
|
35382
|
+
return ctx.deadline === void 0 ? fixedMs : timeoutWithin(GUARDED_CAPTURE_CAP_MS, ctx.deadline);
|
|
35383
|
+
}
|
|
35371
35384
|
function normalizeRoutes(routes) {
|
|
35372
35385
|
const out = [];
|
|
35373
35386
|
for (const raw of routes ?? []) {
|
|
@@ -35593,7 +35606,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35593
35606
|
user,
|
|
35594
35607
|
labels: ctx.labels,
|
|
35595
35608
|
onTiming: stepTimer(ctx, side)
|
|
35596
|
-
},
|
|
35609
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
35597
35610
|
if (shot.status === "captured")
|
|
35598
35611
|
return done(side, shot, staticOut);
|
|
35599
35612
|
if (shot.status !== "no-site" || plan.serveCommand === null) {
|
|
@@ -35603,7 +35616,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35603
35616
|
const findApp = () => lease.docker.sync(["ps", "-aq", "--filter", `label=terminalhire.capture-app=${appLabel}`], syncOpts(ctx)).stdout.trim().split("\n")[0] || null;
|
|
35604
35617
|
const labels = { ...ctx.labels ?? {}, "terminalhire.capture-app": appLabel };
|
|
35605
35618
|
ctx.progress?.("screenshots", `${side}: ${plan.serveCommand}`);
|
|
35606
|
-
const serving = step("serve", "offline", plan.serveCommand, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs, { labels }).catch(() => null);
|
|
35619
|
+
const serving = step("serve", "offline", plan.serveCommand, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), { labels }).catch(() => null);
|
|
35607
35620
|
let appId = null;
|
|
35608
35621
|
try {
|
|
35609
35622
|
for (let i = 0; i < 60 && appId === null; i++) {
|
|
@@ -35626,7 +35639,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
35626
35639
|
user,
|
|
35627
35640
|
labels: ctx.labels,
|
|
35628
35641
|
onTiming: stepTimer(ctx, side)
|
|
35629
|
-
},
|
|
35642
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
35630
35643
|
if (served.status !== "captured")
|
|
35631
35644
|
return skip(served.reason ?? "the serve script produced no screenshot");
|
|
35632
35645
|
return done(side, served, serverOut);
|
|
@@ -35730,7 +35743,7 @@ function syncOpts(ctx) {
|
|
|
35730
35743
|
function message(err) {
|
|
35731
35744
|
return String(err?.message ?? err).slice(0, 500);
|
|
35732
35745
|
}
|
|
35733
|
-
var SCREENSHOT_LIMITS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
35746
|
+
var SCREENSHOT_LIMITS, GUARDED_CAPTURE_CAP_MS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
35734
35747
|
var init_screenshots = __esm({
|
|
35735
35748
|
"../../packages/envrun/dist/screenshots.js"() {
|
|
35736
35749
|
"use strict";
|
|
@@ -35745,6 +35758,7 @@ var init_screenshots = __esm({
|
|
|
35745
35758
|
captureTimeoutMs: 18e4,
|
|
35746
35759
|
waitForPortMs: 6e4
|
|
35747
35760
|
};
|
|
35761
|
+
GUARDED_CAPTURE_CAP_MS = 6e5;
|
|
35748
35762
|
BUILD_MARKER = ".terminalhire-build-start";
|
|
35749
35763
|
realDeps = {
|
|
35750
35764
|
runStep: (lease, r) => runStep(lease.containment, r),
|
|
@@ -35762,7 +35776,7 @@ var init_screenshots = __esm({
|
|
|
35762
35776
|
};
|
|
35763
35777
|
HOSTED_BEFORE_REASON = "before side not captured on hosted runs yet";
|
|
35764
35778
|
SCREENSHOT_BUDGET_MS = 3e5;
|
|
35765
|
-
HOSTED_SCREENSHOT_BUDGET_MS =
|
|
35779
|
+
HOSTED_SCREENSHOT_BUDGET_MS = 36e4;
|
|
35766
35780
|
RENDERED_EXTENSIONS = /\.(html?|css|scss|sass|less|tsx|jsx|vue|svelte|astro|mdx|hbs|handlebars|ejs|erb|liquid|twig|njk)$/i;
|
|
35767
35781
|
RENDERED_DIRS = /(^|\/)(public|static|assets|templates)\//i;
|
|
35768
35782
|
}
|
|
@@ -37823,6 +37837,7 @@ __export(dist_exports, {
|
|
|
37823
37837
|
renderRunReport: () => renderRunReport,
|
|
37824
37838
|
renderVenueLine: () => renderVenueLine,
|
|
37825
37839
|
renderVerdictLine: () => renderVerdictLine,
|
|
37840
|
+
reportedCounts: () => reportedCounts,
|
|
37826
37841
|
resolveImageForSpec: () => resolveImageForSpec,
|
|
37827
37842
|
resolveLease: () => resolveLease,
|
|
37828
37843
|
resolveRunEnvironment: () => resolveRunEnvironment,
|
package/dist/bin/jpi-run.js
CHANGED
|
@@ -10,6 +10,9 @@ var __export = (target, all) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// ../../packages/envrun/dist/classify.js
|
|
13
|
+
function reportedCounts(classified, reparsed) {
|
|
14
|
+
return classified !== void 0 ? classified : reparsed;
|
|
15
|
+
}
|
|
13
16
|
function readCounts(stdout, stderr = "") {
|
|
14
17
|
const out = `${stdout}
|
|
15
18
|
${stderr}`;
|
|
@@ -3228,14 +3231,16 @@ async function runEnvironmentSpec(req) {
|
|
|
3228
3231
|
result = {
|
|
3229
3232
|
outcome: "test-command-unavailable",
|
|
3230
3233
|
note: installEnvironmentFailureNote(install, image),
|
|
3231
|
-
installOk: false
|
|
3234
|
+
installOk: false,
|
|
3235
|
+
counts: null
|
|
3232
3236
|
};
|
|
3233
3237
|
} else if (req.spec.testCommand === null) {
|
|
3234
3238
|
const why = req.spec.unresolved.find((r) => r.kind === "no-test-command")?.detail;
|
|
3235
3239
|
result = {
|
|
3236
3240
|
outcome: "no-tests-observed",
|
|
3237
3241
|
note: "the spec derived no test command, so nothing was executed: nothing failed and nothing ran. Certain, not inferred \u2014 no command was ever invoked." + (why === void 0 ? "" : ` Why: ${why}.`),
|
|
3238
|
-
installOk: true
|
|
3242
|
+
installOk: true,
|
|
3243
|
+
counts: null
|
|
3239
3244
|
};
|
|
3240
3245
|
} else {
|
|
3241
3246
|
test = await runStep(containment, {
|
|
@@ -3260,7 +3265,12 @@ async function runEnvironmentSpec(req) {
|
|
|
3260
3265
|
timeoutMs: req.testTimeoutMs ?? 9e5
|
|
3261
3266
|
});
|
|
3262
3267
|
const verdict = classifyVerification({ ...toExecution(test), runtime: req.spec.runtime });
|
|
3263
|
-
result = {
|
|
3268
|
+
result = {
|
|
3269
|
+
outcome: verdict.outcome,
|
|
3270
|
+
note: verdict.reason,
|
|
3271
|
+
installOk: true,
|
|
3272
|
+
counts: verdict.counts
|
|
3273
|
+
};
|
|
3264
3274
|
}
|
|
3265
3275
|
} finally {
|
|
3266
3276
|
watch?.stop();
|
|
@@ -3284,7 +3294,7 @@ async function runEnvironmentSpec(req) {
|
|
|
3284
3294
|
install,
|
|
3285
3295
|
test,
|
|
3286
3296
|
installOk: result.installOk,
|
|
3287
|
-
counts: test ? readCounts(test.stdout, test.stderr) : null,
|
|
3297
|
+
counts: reportedCounts(result.counts, test ? readCounts(test.stdout, test.stderr) : null),
|
|
3288
3298
|
leaks: judgeLeaks(peak, after, observation),
|
|
3289
3299
|
note: result.note,
|
|
3290
3300
|
wallMs: Date.now() - startedAt
|
|
@@ -8817,6 +8827,9 @@ var init_dist3 = __esm({
|
|
|
8817
8827
|
// ../../packages/envrun/dist/screenshots.js
|
|
8818
8828
|
import { copyFileSync as copyFileSync3, mkdirSync as mkdirSync7 } from "fs";
|
|
8819
8829
|
import { join as join14 } from "path";
|
|
8830
|
+
function captureTimeout(ctx, fixedMs) {
|
|
8831
|
+
return ctx.deadline === void 0 ? fixedMs : timeoutWithin(GUARDED_CAPTURE_CAP_MS, ctx.deadline);
|
|
8832
|
+
}
|
|
8820
8833
|
function normalizeRoutes(routes) {
|
|
8821
8834
|
const out = [];
|
|
8822
8835
|
for (const raw of routes ?? []) {
|
|
@@ -9042,7 +9055,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
9042
9055
|
user,
|
|
9043
9056
|
labels: ctx.labels,
|
|
9044
9057
|
onTiming: stepTimer(ctx, side)
|
|
9045
|
-
},
|
|
9058
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
9046
9059
|
if (shot.status === "captured")
|
|
9047
9060
|
return done(side, shot, staticOut);
|
|
9048
9061
|
if (shot.status !== "no-site" || plan.serveCommand === null) {
|
|
@@ -9052,7 +9065,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
9052
9065
|
const findApp = () => lease.docker.sync(["ps", "-aq", "--filter", `label=terminalhire.capture-app=${appLabel}`], syncOpts(ctx)).stdout.trim().split("\n")[0] || null;
|
|
9053
9066
|
const labels = { ...ctx.labels ?? {}, "terminalhire.capture-app": appLabel };
|
|
9054
9067
|
ctx.progress?.("screenshots", `${side}: ${plan.serveCommand}`);
|
|
9055
|
-
const serving = step("serve", "offline", plan.serveCommand, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs, { labels }).catch(() => null);
|
|
9068
|
+
const serving = step("serve", "offline", plan.serveCommand, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), { labels }).catch(() => null);
|
|
9056
9069
|
let appId = null;
|
|
9057
9070
|
try {
|
|
9058
9071
|
for (let i = 0; i < 60 && appId === null; i++) {
|
|
@@ -9075,7 +9088,7 @@ async function captureSide(ctx, deps, side, tree, plan, image, code, routes) {
|
|
|
9075
9088
|
user,
|
|
9076
9089
|
labels: ctx.labels,
|
|
9077
9090
|
onTiming: stepTimer(ctx, side)
|
|
9078
|
-
},
|
|
9091
|
+
}, captureTimeout(ctx, SCREENSHOT_LIMITS.waitForPortMs + SCREENSHOT_LIMITS.captureTimeoutMs), ctx.signal, ctx.deadline);
|
|
9079
9092
|
if (served.status !== "captured")
|
|
9080
9093
|
return skip(served.reason ?? "the serve script produced no screenshot");
|
|
9081
9094
|
return done(side, served, serverOut);
|
|
@@ -9179,7 +9192,7 @@ function syncOpts(ctx) {
|
|
|
9179
9192
|
function message(err) {
|
|
9180
9193
|
return String(err?.message ?? err).slice(0, 500);
|
|
9181
9194
|
}
|
|
9182
|
-
var SCREENSHOT_LIMITS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
9195
|
+
var SCREENSHOT_LIMITS, GUARDED_CAPTURE_CAP_MS, BUILD_MARKER, realDeps, HOSTED_BEFORE_REASON, SCREENSHOT_BUDGET_MS, HOSTED_SCREENSHOT_BUDGET_MS, RENDERED_EXTENSIONS, RENDERED_DIRS;
|
|
9183
9196
|
var init_screenshots = __esm({
|
|
9184
9197
|
"../../packages/envrun/dist/screenshots.js"() {
|
|
9185
9198
|
"use strict";
|
|
@@ -9194,6 +9207,7 @@ var init_screenshots = __esm({
|
|
|
9194
9207
|
captureTimeoutMs: 18e4,
|
|
9195
9208
|
waitForPortMs: 6e4
|
|
9196
9209
|
};
|
|
9210
|
+
GUARDED_CAPTURE_CAP_MS = 6e5;
|
|
9197
9211
|
BUILD_MARKER = ".terminalhire-build-start";
|
|
9198
9212
|
realDeps = {
|
|
9199
9213
|
runStep: (lease, r) => runStep(lease.containment, r),
|
|
@@ -9211,7 +9225,7 @@ var init_screenshots = __esm({
|
|
|
9211
9225
|
};
|
|
9212
9226
|
HOSTED_BEFORE_REASON = "before side not captured on hosted runs yet";
|
|
9213
9227
|
SCREENSHOT_BUDGET_MS = 3e5;
|
|
9214
|
-
HOSTED_SCREENSHOT_BUDGET_MS =
|
|
9228
|
+
HOSTED_SCREENSHOT_BUDGET_MS = 36e4;
|
|
9215
9229
|
RENDERED_EXTENSIONS = /\.(html?|css|scss|sass|less|tsx|jsx|vue|svelte|astro|mdx|hbs|handlebars|ejs|erb|liquid|twig|njk)$/i;
|
|
9216
9230
|
RENDERED_DIRS = /(^|\/)(public|static|assets|templates)\//i;
|
|
9217
9231
|
}
|
|
@@ -11272,6 +11286,7 @@ __export(dist_exports, {
|
|
|
11272
11286
|
renderRunReport: () => renderRunReport,
|
|
11273
11287
|
renderVenueLine: () => renderVenueLine,
|
|
11274
11288
|
renderVerdictLine: () => renderVerdictLine,
|
|
11289
|
+
reportedCounts: () => reportedCounts,
|
|
11275
11290
|
resolveImageForSpec: () => resolveImageForSpec,
|
|
11276
11291
|
resolveLease: () => resolveLease,
|
|
11277
11292
|
resolveRunEnvironment: () => resolveRunEnvironment,
|
package/dist/bin/jpi-sync.js
CHANGED
|
@@ -2300,12 +2300,12 @@ async function run() {
|
|
|
2300
2300
|
console.log(" terminalhire sync \u2014 opt-in Tier-1 profile sync (one-time snapshot)");
|
|
2301
2301
|
console.log("");
|
|
2302
2302
|
console.log(
|
|
2303
|
-
|
|
2303
|
+
" terminalhire sync --push Send your profile (shows a consent card, requires browser confirm)"
|
|
2304
2304
|
);
|
|
2305
2305
|
console.log(" terminalhire sync --status Show whether you have consented (local read only)");
|
|
2306
2306
|
console.log(" terminalhire sync --delete Hard-delete your synced profile (revocation)");
|
|
2307
2307
|
console.log("");
|
|
2308
|
-
console.log(
|
|
2308
|
+
console.log(" Your profile is NEVER sent without an explicit browser confirm.");
|
|
2309
2309
|
console.log(" This is NOT required to use terminalhire.");
|
|
2310
2310
|
console.log("");
|
|
2311
2311
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "terminalhire",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.33",
|
|
4
4
|
"description": "Developer jobs and paid bounties, matched in the terminal — ambient matches in the Claude Code spinner. Claim a scoped bounty and get paid when the poster accepts it.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|