@zixt/host 0.0.166 → 0.0.168
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/index.js +30 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { homedir as homedir6 } from "node:os";
|
|
|
28
28
|
// package.json
|
|
29
29
|
var package_default = {
|
|
30
30
|
name: "@zixt/host",
|
|
31
|
-
version: "0.0.
|
|
31
|
+
version: "0.0.168",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -17905,6 +17905,13 @@ var TaskTimingPhase = external_exports.object({
|
|
|
17905
17905
|
var TaskTimingRun = external_exports.object({
|
|
17906
17906
|
epoch: external_exports.number().int().min(1),
|
|
17907
17907
|
status: TaskStatus,
|
|
17908
|
+
/**
|
|
17909
|
+
* The run's own receipt outcome when finalized. A parked run boundary
|
|
17910
|
+
* ends the attempt as done but the receipt says escalated; showing the
|
|
17911
|
+
* bare attempt status painted "Done" over work that was handed back
|
|
17912
|
+
* (QA-052).
|
|
17913
|
+
*/
|
|
17914
|
+
outcome: external_exports.string().max(40).nullable().optional(),
|
|
17908
17915
|
startedAt: IsoDate.nullable(),
|
|
17909
17916
|
finishedAt: IsoDate.nullable(),
|
|
17910
17917
|
/** Waiting for this run's Machine, including re-queue after an earlier run. */
|
|
@@ -41032,6 +41039,12 @@ function createAskUserServer() {
|
|
|
41032
41039
|
agentOp: input.agentOp,
|
|
41033
41040
|
..."requestApproval" in input && input.requestApproval ? { requestApproval: input.requestApproval } : {},
|
|
41034
41041
|
..."publishFile" in input && input.publishFile ? { publishFile: input.publishFile } : {},
|
|
41042
|
+
// This rebuild copies fields one by one, so a handler omitted here is
|
|
41043
|
+
// silently absent for every runner: company files shipped wired in
|
|
41044
|
+
// cli-runner but dropped on this line, which made the whole store
|
|
41045
|
+
// answer "unavailable for this runner" on every fetch ever attempted
|
|
41046
|
+
// (QA-056).
|
|
41047
|
+
..."companyAssets" in input && input.companyAssets ? { companyAssets: input.companyAssets } : {},
|
|
41035
41048
|
..."software" in input && input.software ? { software: input.software } : {},
|
|
41036
41049
|
...toolPacks.length > 0 ? { toolPacks } : {}
|
|
41037
41050
|
};
|
|
@@ -42614,6 +42627,10 @@ async function recoverRecordedRunAssignments(registryRoot = defaultRunRegistryRo
|
|
|
42614
42627
|
(left, right) => left.projectId === right.projectId ? left.taskId === right.taskId ? left.epoch - right.epoch : left.taskId.localeCompare(right.taskId) : left.projectId.localeCompare(right.projectId)
|
|
42615
42628
|
);
|
|
42616
42629
|
}
|
|
42630
|
+
function honorDeclaredFailure(result) {
|
|
42631
|
+
if (result.outcome !== "done" || !/^\s*FAILED:\s*/i.test(result.summary)) return result;
|
|
42632
|
+
return { outcome: "failed", summary: result.summary.replace(/^\s*FAILED:\s*/i, "") };
|
|
42633
|
+
}
|
|
42617
42634
|
var MAX_THOUGHT_CHARS = 5e4;
|
|
42618
42635
|
var MAX_RUNNER_OUTPUT_LINE_CHARS = 4 * 1024 * 1024;
|
|
42619
42636
|
var MAX_RUNNER_STDERR_CHARS = 128 * 1024;
|
|
@@ -43317,9 +43334,12 @@ ${attachmentSection}` : prompt;
|
|
|
43317
43334
|
"status",
|
|
43318
43335
|
`${adapter.displayName} finished. Tokens in ${result.usage.inputTokens}, out ${result.usage.outputTokens}` + (result.usage.totalCostUsd !== void 0 ? `, cost $${result.usage.totalCostUsd.toFixed(4)}` : "")
|
|
43319
43336
|
);
|
|
43337
|
+
const declared = honorDeclaredFailure(result);
|
|
43320
43338
|
taskResult = {
|
|
43321
|
-
outcome:
|
|
43322
|
-
summary:
|
|
43339
|
+
outcome: declared.outcome,
|
|
43340
|
+
summary: declared.summary,
|
|
43341
|
+
// A declared failure is still the agent's own claim, not something
|
|
43342
|
+
// this Host observed.
|
|
43323
43343
|
summaryEvidence: result.outcome === "done" ? "agent_claimed" : "host_observed",
|
|
43324
43344
|
usage: result.usage
|
|
43325
43345
|
};
|
|
@@ -46773,12 +46793,15 @@ async function preflightClaudeCode(options = {}) {
|
|
|
46773
46793
|
doctor: doctorFromAuthStatus(parsed),
|
|
46774
46794
|
enforcement: "advisory",
|
|
46775
46795
|
checkedAt,
|
|
46776
|
-
error: parsed === "authenticated" ? null : (auth.error || auth.output || "
|
|
46777
|
-
0,
|
|
46778
|
-
1e3
|
|
46779
|
-
)
|
|
46796
|
+
error: parsed === "authenticated" ? null : humanizeClaudeAuthProbe(auth.error || auth.output || "")
|
|
46780
46797
|
};
|
|
46781
46798
|
}
|
|
46799
|
+
function humanizeClaudeAuthProbe(raw) {
|
|
46800
|
+
const text = raw.trim();
|
|
46801
|
+
const looksLikeAuthAnswer = text.startsWith("{") || /signed|logged|authenticat|token|api key/i.test(text);
|
|
46802
|
+
if (text && looksLikeAuthAnswer) return text.slice(0, 1e3);
|
|
46803
|
+
return "Zixt could not confirm the Claude Code sign-in on this Machine: the local `claude` command answered unexpectedly. Run `claude` there once to check the sign-in; agents using an API key do not need it.";
|
|
46804
|
+
}
|
|
46782
46805
|
async function preflightCodex(options = {}) {
|
|
46783
46806
|
const command = options.command ?? "codex";
|
|
46784
46807
|
const prefixArgs = options.commandPrefixArgs ?? [];
|