@zixt/host 0.0.164 → 0.0.166
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 +55 -15
- 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.166",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -20835,6 +20835,12 @@ var ManagerTaskRailRepresentative = external_exports.object({
|
|
|
20835
20835
|
id: TaskId,
|
|
20836
20836
|
agentId: AgentId,
|
|
20837
20837
|
status: TaskStatus,
|
|
20838
|
+
/**
|
|
20839
|
+
* The represented Task's own title. The badge must be readable against
|
|
20840
|
+
* the work it belongs to: a thread's frozen title with another Task's
|
|
20841
|
+
* status read as that work's outcome (QA-022).
|
|
20842
|
+
*/
|
|
20843
|
+
title: external_exports.string().nullable().optional(),
|
|
20838
20844
|
gitSummary: TaskGitSummary.nullable(),
|
|
20839
20845
|
createdAt: external_exports.string(),
|
|
20840
20846
|
updatedAt: external_exports.string()
|
|
@@ -33272,6 +33278,18 @@ function createBrowserToolPack(deps) {
|
|
|
33272
33278
|
provider: "browser",
|
|
33273
33279
|
version: 1,
|
|
33274
33280
|
tools: BROWSER_TOOL_DEFINITIONS,
|
|
33281
|
+
// These narrate their own execution above; the runner's line would be a
|
|
33282
|
+
// duplicate — the customer read "Opened a page in the browser" and then
|
|
33283
|
+
// the same step again as a bare URL (QA-007).
|
|
33284
|
+
narratedTools: [
|
|
33285
|
+
"browser_navigate",
|
|
33286
|
+
"browser_open_tab",
|
|
33287
|
+
"browser_switch_tab",
|
|
33288
|
+
"browser_close_tab",
|
|
33289
|
+
"browser_click",
|
|
33290
|
+
"browser_type",
|
|
33291
|
+
"browser_login"
|
|
33292
|
+
],
|
|
33275
33293
|
call,
|
|
33276
33294
|
currentSignInWall: () => signInWall ? { origin: signInWall.origin } : null,
|
|
33277
33295
|
async close() {
|
|
@@ -43019,7 +43037,8 @@ function createCliRunner(adapter, opts = {}) {
|
|
|
43019
43037
|
alwaysLoad: server.alwaysLoad,
|
|
43020
43038
|
narrated: server.narrated
|
|
43021
43039
|
}))
|
|
43022
|
-
)
|
|
43040
|
+
),
|
|
43041
|
+
narratedTools: toolPacks.filter((pack) => !pack.mcpServers).flatMap((pack) => [...pack.narratedTools ?? []])
|
|
43023
43042
|
},
|
|
43024
43043
|
preparedWorkspace,
|
|
43025
43044
|
gitDetected,
|
|
@@ -43845,8 +43864,8 @@ import { homedir as homedir10 } from "node:os";
|
|
|
43845
43864
|
import { dirname as dirname10, join as join23 } from "node:path";
|
|
43846
43865
|
|
|
43847
43866
|
// src/runners/feed-labels.ts
|
|
43848
|
-
var SENTENCE_KEYS = ["title", "question", "description", "
|
|
43849
|
-
var LOCATOR_KEYS = ["file_path", "path", "pattern", "name"];
|
|
43867
|
+
var SENTENCE_KEYS = ["title", "question", "description", "query"];
|
|
43868
|
+
var LOCATOR_KEYS = ["file_path", "path", "pattern", "name", "url"];
|
|
43850
43869
|
function capLine(text, max = 100) {
|
|
43851
43870
|
if (text.length <= max) return text;
|
|
43852
43871
|
const cut = text.slice(0, max - 1);
|
|
@@ -43854,7 +43873,7 @@ function capLine(text, max = 100) {
|
|
|
43854
43873
|
return `${(space > max * 0.6 ? cut.slice(0, space) : cut).trimEnd()}\u2026`;
|
|
43855
43874
|
}
|
|
43856
43875
|
function tidyPath(text) {
|
|
43857
|
-
return text.replace(/[A-Za-z]:[\\/]Users[\\/][^\\/\s"']+/g, "~").replace(/\/(?:home|Users)\/[^\\/\s"']+/g, "~");
|
|
43876
|
+
return text.replace(/\\\\/g, "\\").replace(/[A-Za-z]:[\\/]Users[\\/][^\\/\s"']+/g, "~").replace(/\/(?:home|Users)\/[^\\/\s"']+/g, "~");
|
|
43858
43877
|
}
|
|
43859
43878
|
var FILE_SUFFIX = /^(?:js|cjs|mjs|ts|tsx|py|sh|ps1|exe|cmd|bat|json|md|txt)$/i;
|
|
43860
43879
|
function humanToolName(tool) {
|
|
@@ -43978,6 +43997,7 @@ function createCodexAdapter(threadIndexRoot, providerSessionStateRoot2) {
|
|
|
43978
43997
|
flags.push("-c", "mcp_servers.zixt.tool_timeout_sec=86400");
|
|
43979
43998
|
const taken = /* @__PURE__ */ new Set(["zixt"]);
|
|
43980
43999
|
const narratedServers = /* @__PURE__ */ new Set();
|
|
44000
|
+
const narratedTools = new Set(mcp.narratedTools);
|
|
43981
44001
|
for (const server of mcp.localServers) {
|
|
43982
44002
|
const key = serverKeyFor(server.name, taken);
|
|
43983
44003
|
if (server.narrated) narratedServers.add(key);
|
|
@@ -44075,8 +44095,13 @@ ${value}` : value;
|
|
|
44075
44095
|
...runner.effort ? { effort: runner.effort } : {},
|
|
44076
44096
|
developerInstructions: platformInstructions ?? "",
|
|
44077
44097
|
onThreadStarted,
|
|
44078
|
-
narratedServers
|
|
44079
|
-
|
|
44098
|
+
narratedServers,
|
|
44099
|
+
narratedTools
|
|
44100
|
+
}) : createCodexStreamParser(onStream, {
|
|
44101
|
+
onThreadStarted,
|
|
44102
|
+
narratedServers,
|
|
44103
|
+
narratedTools
|
|
44104
|
+
});
|
|
44080
44105
|
},
|
|
44081
44106
|
// Only one flip is meaningful: a resume whose rollout vanished starts
|
|
44082
44107
|
// over. Codex assigns new-session ids itself, so a new session can
|
|
@@ -44188,8 +44213,10 @@ function createCodexAppServerParser(onStream, options) {
|
|
|
44188
44213
|
}
|
|
44189
44214
|
if (type === "mcpToolCall") {
|
|
44190
44215
|
const server = String(item["server"] ?? "mcp");
|
|
44216
|
+
const toolName = String(item["tool"] ?? "tool");
|
|
44191
44217
|
if (options.narratedServers?.has(server)) return;
|
|
44192
|
-
|
|
44218
|
+
if (server === "zixt" && options.narratedTools?.has(toolName)) return;
|
|
44219
|
+
const tool = `${server}.${toolName}`.slice(0, 200);
|
|
44193
44220
|
const args = item["arguments"];
|
|
44194
44221
|
const parameter = (typeof args === "string" ? args : args ? JSON.stringify(args) : "").slice(
|
|
44195
44222
|
0,
|
|
@@ -44413,8 +44440,10 @@ function createCodexStreamParser(onStream, hooks = {}) {
|
|
|
44413
44440
|
});
|
|
44414
44441
|
} else if (phase === "item.started" && itemType === "mcp_tool_call") {
|
|
44415
44442
|
const server = String(item["server"] ?? "mcp");
|
|
44443
|
+
const toolName = String(item["tool"] ?? "tool");
|
|
44416
44444
|
if (hooks.narratedServers?.has(server)) return;
|
|
44417
|
-
|
|
44445
|
+
if (server === "zixt" && hooks.narratedTools?.has(toolName)) return;
|
|
44446
|
+
const tool = `${server}.${toolName}`.slice(0, 200);
|
|
44418
44447
|
const args = item["arguments"];
|
|
44419
44448
|
const parameter = (typeof args === "string" ? args : args ? JSON.stringify(args) : "").slice(
|
|
44420
44449
|
0,
|
|
@@ -46243,7 +46272,11 @@ function createClaudeCodeAdapter(providerSessionStateRoot2) {
|
|
|
46243
46272
|
missingApiKeyMessage: 'Runner auth is set to "API key" but no ANTHROPIC_API_KEY Credential is granted to this Task. Add it in Project settings \u2192 Credentials for the whole Project or selected AI teammates.',
|
|
46244
46273
|
async prepareRun(input) {
|
|
46245
46274
|
const liveInput = input.liveInput && input.task.followUps !== void 0;
|
|
46246
|
-
const {
|
|
46275
|
+
const {
|
|
46276
|
+
args: baseArgs,
|
|
46277
|
+
narratedServers,
|
|
46278
|
+
narratedTools
|
|
46279
|
+
} = await buildArgs(
|
|
46247
46280
|
input.task,
|
|
46248
46281
|
input.runner,
|
|
46249
46282
|
input.artifacts,
|
|
@@ -46279,7 +46312,11 @@ function createClaudeCodeAdapter(providerSessionStateRoot2) {
|
|
|
46279
46312
|
],
|
|
46280
46313
|
prompt: buildRunnerPrompt(input.task),
|
|
46281
46314
|
recoveryPrompt: buildRunnerPrompt(input.task, true),
|
|
46282
|
-
createParser: (onStream) => liveInput ? createClaudeLiveParser(onStream, observeRuntime, narratedServers) : createStreamParser(onStream, {
|
|
46315
|
+
createParser: (onStream) => liveInput ? createClaudeLiveParser(onStream, observeRuntime, narratedServers, narratedTools) : createStreamParser(onStream, {
|
|
46316
|
+
onSessionModel: observeRuntime,
|
|
46317
|
+
narratedServers,
|
|
46318
|
+
narratedTools
|
|
46319
|
+
}),
|
|
46283
46320
|
// Self-heal both directions: a crashed first run leaves a transcript
|
|
46284
46321
|
// (new → conflict), a lost workspace breaks resume (resume → not
|
|
46285
46322
|
// found). One flip covers both.
|
|
@@ -46356,6 +46393,7 @@ async function buildArgs(task, runner, artifacts, mcp, preparedWorkspace, taskRo
|
|
|
46356
46393
|
const allowedTools = ["mcp__zixt"];
|
|
46357
46394
|
const taken = /* @__PURE__ */ new Set(["zixt"]);
|
|
46358
46395
|
const narratedServers = /* @__PURE__ */ new Set();
|
|
46396
|
+
const narratedTools = new Set(mcp.narratedTools);
|
|
46359
46397
|
for (const server of mcp.localServers) {
|
|
46360
46398
|
const key = serverKeyFor(server.name, taken);
|
|
46361
46399
|
if (server.narrated) narratedServers.add(key);
|
|
@@ -46379,9 +46417,9 @@ async function buildArgs(task, runner, artifacts, mcp, preparedWorkspace, taskRo
|
|
|
46379
46417
|
"--disallowedTools",
|
|
46380
46418
|
[...CLAUDE_SESSION_CRON_TOOLS, ...CLAUDE_REINVOCATION_TOOLS].join(",")
|
|
46381
46419
|
);
|
|
46382
|
-
return { args, narratedServers };
|
|
46420
|
+
return { args, narratedServers, narratedTools };
|
|
46383
46421
|
}
|
|
46384
|
-
function createClaudeLiveParser(onStream, onSessionModel, narratedServers) {
|
|
46422
|
+
function createClaudeLiveParser(onStream, onSessionModel, narratedServers, narratedTools) {
|
|
46385
46423
|
let write = null;
|
|
46386
46424
|
const acknowledgements = /* @__PURE__ */ new Map();
|
|
46387
46425
|
const input = (uuid3, text) => `${JSON.stringify({
|
|
@@ -46394,6 +46432,7 @@ function createClaudeLiveParser(onStream, onSessionModel, narratedServers) {
|
|
|
46394
46432
|
const parser = createStreamParser(onStream, {
|
|
46395
46433
|
onSessionModel,
|
|
46396
46434
|
...narratedServers ? { narratedServers } : {},
|
|
46435
|
+
...narratedTools ? { narratedTools } : {},
|
|
46397
46436
|
onUserReplay: (uuid3) => {
|
|
46398
46437
|
const acknowledge = acknowledgements.get(uuid3);
|
|
46399
46438
|
if (!acknowledge) return;
|
|
@@ -46469,8 +46508,9 @@ function createStreamParser(onStream, hooks = {}) {
|
|
|
46469
46508
|
const input = block["input"];
|
|
46470
46509
|
const target = input?.["description"] ?? input?.["command"] ?? input?.["pattern"] ?? input?.["file_path"] ?? (typeof input?.["question"] === "string" ? input["question"] : void 0) ?? "";
|
|
46471
46510
|
const tool = String(block["name"]).slice(0, 200);
|
|
46472
|
-
const
|
|
46473
|
-
if (
|
|
46511
|
+
const mcpParts = /^mcp__([\w-]+?)__([\w-]+)$/.exec(tool);
|
|
46512
|
+
if (mcpParts && hooks.narratedServers?.has(mcpParts[1])) continue;
|
|
46513
|
+
if (mcpParts?.[1] === "zixt" && hooks.narratedTools?.has(mcpParts[2])) continue;
|
|
46474
46514
|
const parameter = String(target).slice(0, 2e3);
|
|
46475
46515
|
const localPath = typeof input?.["file_path"] === "string" ? input["file_path"] : null;
|
|
46476
46516
|
const label = typeof input?.["command"] === "string" && input["command"].trim() ? shellCommandLabel(input["command"]) : toolCallLabel(tool, input ?? {});
|