@zixt/host 0.0.159 → 0.0.161
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 +39 -6
- 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.161",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -21128,7 +21128,10 @@ var ApiError = external_exports.object({
|
|
|
21128
21128
|
})
|
|
21129
21129
|
});
|
|
21130
21130
|
var CreateOrgRequest = external_exports.object({
|
|
21131
|
-
|
|
21131
|
+
// Trimmed before the length checks, exactly like RenameOrgRequest below: a
|
|
21132
|
+
// whitespace-only name passed min(1) here and created a real organization
|
|
21133
|
+
// that rendered blank everywhere (QA-003, 2026-08-30).
|
|
21134
|
+
name: external_exports.string().trim().pipe(Org.shape.name),
|
|
21132
21135
|
slug: Org.shape.slug
|
|
21133
21136
|
});
|
|
21134
21137
|
var RenameOrgRequest = external_exports.object({
|
|
@@ -43792,6 +43795,36 @@ import { readFile as readFile13 } from "node:fs/promises";
|
|
|
43792
43795
|
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
43793
43796
|
import { homedir as homedir10 } from "node:os";
|
|
43794
43797
|
import { dirname as dirname10, join as join23 } from "node:path";
|
|
43798
|
+
|
|
43799
|
+
// src/runners/feed-labels.ts
|
|
43800
|
+
var SUMMARY_KEYS = ["title", "question", "url", "query", "path", "name"];
|
|
43801
|
+
function toolCallLabel(tool, args) {
|
|
43802
|
+
if (args && typeof args === "object" && !Array.isArray(args)) {
|
|
43803
|
+
const record2 = args;
|
|
43804
|
+
for (const key of SUMMARY_KEYS) {
|
|
43805
|
+
const value = record2[key];
|
|
43806
|
+
if (typeof value === "string" && value.trim()) {
|
|
43807
|
+
return `${tool}: ${value.trim().slice(0, 100)}`;
|
|
43808
|
+
}
|
|
43809
|
+
}
|
|
43810
|
+
return tool;
|
|
43811
|
+
}
|
|
43812
|
+
if (typeof args === "string" && args.trim() && args.trim() !== "{}") {
|
|
43813
|
+
return `${tool}: ${args.trim().slice(0, 100)}`;
|
|
43814
|
+
}
|
|
43815
|
+
return tool;
|
|
43816
|
+
}
|
|
43817
|
+
function shellCommandLabel(command) {
|
|
43818
|
+
const trimmed = command.trim();
|
|
43819
|
+
if (!trimmed) return "shell";
|
|
43820
|
+
const quoted = /^"([^"]+)"\s*(.*)$/s.exec(trimmed);
|
|
43821
|
+
const executable = quoted ? quoted[1] : trimmed.split(/\s+/, 1)[0] ?? trimmed;
|
|
43822
|
+
const rest = quoted ? quoted[2] : trimmed.slice(executable.length).trimStart();
|
|
43823
|
+
const basename8 = (executable.split(/[\\/]/).pop() ?? executable).replace(/\.(exe|cmd|bat)$/i, "");
|
|
43824
|
+
return `shell: ${`${basename8}${rest ? ` ${rest}` : ""}`.slice(0, 100)}`;
|
|
43825
|
+
}
|
|
43826
|
+
|
|
43827
|
+
// src/runners/codex.ts
|
|
43795
43828
|
var CODEX_NOT_FOUND_MESSAGE = "The `codex` CLI was not found on this Machine. Install it (npm install -g @openai/codex) and sign in with `codex login`, or switch the agent to API-key auth.";
|
|
43796
43829
|
function defaultCodexThreadIndexRoot() {
|
|
43797
43830
|
return join23(homedir10(), ".zixt", "codex-threads");
|
|
@@ -44055,7 +44088,7 @@ function createCodexAppServerParser(onStream, options) {
|
|
|
44055
44088
|
}
|
|
44056
44089
|
if (type === "commandExecution") {
|
|
44057
44090
|
const parameter = String(item["command"] ?? "").slice(0, 2e3);
|
|
44058
|
-
onStream("action",
|
|
44091
|
+
onStream("action", shellCommandLabel(parameter), {
|
|
44059
44092
|
tool: "shell",
|
|
44060
44093
|
...parameter ? { parameter } : {},
|
|
44061
44094
|
ephemeral: true
|
|
@@ -44072,7 +44105,7 @@ function createCodexAppServerParser(onStream, options) {
|
|
|
44072
44105
|
0,
|
|
44073
44106
|
2e3
|
|
44074
44107
|
);
|
|
44075
|
-
onStream("action",
|
|
44108
|
+
onStream("action", toolCallLabel(tool, args), {
|
|
44076
44109
|
tool,
|
|
44077
44110
|
...parameter ? { parameter } : {},
|
|
44078
44111
|
ephemeral: true
|
|
@@ -44283,7 +44316,7 @@ function createCodexStreamParser(onStream, hooks = {}) {
|
|
|
44283
44316
|
if (typeof item["text"] === "string") onStream("thought", truncateThought(item["text"]));
|
|
44284
44317
|
} else if (phase === "item.started" && itemType === "command_execution") {
|
|
44285
44318
|
const parameter = String(item["command"] ?? "").slice(0, 2e3);
|
|
44286
|
-
onStream("action",
|
|
44319
|
+
onStream("action", shellCommandLabel(parameter), {
|
|
44287
44320
|
tool: "shell",
|
|
44288
44321
|
...parameter ? { parameter } : {},
|
|
44289
44322
|
ephemeral: true
|
|
@@ -44298,7 +44331,7 @@ function createCodexStreamParser(onStream, hooks = {}) {
|
|
|
44298
44331
|
0,
|
|
44299
44332
|
2e3
|
|
44300
44333
|
);
|
|
44301
|
-
onStream("action",
|
|
44334
|
+
onStream("action", toolCallLabel(tool, args), {
|
|
44302
44335
|
tool,
|
|
44303
44336
|
...parameter ? { parameter } : {},
|
|
44304
44337
|
ephemeral: true
|