@zixt/host 0.0.27 → 0.0.29
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 +16 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { homedir } from "node:os";
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "@zixt/host",
|
|
34
|
-
version: "0.0.
|
|
34
|
+
version: "0.0.29",
|
|
35
35
|
type: "module",
|
|
36
36
|
exports: {
|
|
37
37
|
".": "./src/client.ts",
|
|
@@ -15331,6 +15331,10 @@ var HostConnectionIssue = external_exports.discriminatedUnion("code", [
|
|
|
15331
15331
|
external_exports.object({
|
|
15332
15332
|
code: external_exports.literal("handshake_invalid"),
|
|
15333
15333
|
observedAt: IsoDate2
|
|
15334
|
+
}).strict(),
|
|
15335
|
+
external_exports.object({
|
|
15336
|
+
code: external_exports.literal("readiness_report_missing"),
|
|
15337
|
+
observedAt: IsoDate2
|
|
15334
15338
|
}).strict()
|
|
15335
15339
|
]);
|
|
15336
15340
|
var Host = external_exports.object({
|
|
@@ -15345,7 +15349,7 @@ var Host = external_exports.object({
|
|
|
15345
15349
|
lastSeenAt: IsoDate2.nullable(),
|
|
15346
15350
|
telemetry: HostTelemetry.nullable().default(null),
|
|
15347
15351
|
telemetryAt: IsoDate2.nullable().default(null),
|
|
15348
|
-
/** Cleared automatically after this Machine
|
|
15352
|
+
/** Cleared automatically after this Machine reports current readiness. */
|
|
15349
15353
|
connectionIssue: HostConnectionIssue.nullable().default(null),
|
|
15350
15354
|
telemetryRedacted: external_exports.boolean().default(false),
|
|
15351
15355
|
createdAt: IsoDate2
|
|
@@ -19004,6 +19008,8 @@ async function generateTaskTitle(instructions, runner) {
|
|
|
19004
19008
|
const prompt = [
|
|
19005
19009
|
"Name this task for a task list. Reply with ONLY the name: at most eight",
|
|
19006
19010
|
"words, no quotes, no trailing period, same language as the request.",
|
|
19011
|
+
"Never ask a question or explain that context is missing. The request",
|
|
19012
|
+
"below is the context. If it is vague, name its apparent goal.",
|
|
19007
19013
|
"",
|
|
19008
19014
|
"<task_request>",
|
|
19009
19015
|
instructions.slice(0, INSTRUCTIONS_BUDGET),
|
|
@@ -19056,9 +19062,16 @@ function cleanTitleOutput(raw) {
|
|
|
19056
19062
|
const line = raw.split("\n").map((candidate) => candidate.trim()).find((candidate) => candidate.length > 0);
|
|
19057
19063
|
if (!line) return null;
|
|
19058
19064
|
const unwrapped = line.replace(/^["'`“”‘’]+/, "").replace(/["'`“”‘’]+$/, "").replace(/\.$/, "").replace(/\s+/g, " ").trim();
|
|
19059
|
-
if (!unwrapped
|
|
19065
|
+
if (!isPlausibleTaskTitle(unwrapped)) return null;
|
|
19060
19066
|
return unwrapped;
|
|
19061
19067
|
}
|
|
19068
|
+
function isPlausibleTaskTitle(title) {
|
|
19069
|
+
if (!title || title.length > 200 || title.includes("?")) return false;
|
|
19070
|
+
if (title.split(/\s+/u).length > 8) return false;
|
|
19071
|
+
return !/^(?:i (?:do not|don't|need|cannot|can't)|could you|can you|please (?:provide|describe|clarify)|what task|need more context)\b/iu.test(
|
|
19072
|
+
title
|
|
19073
|
+
);
|
|
19074
|
+
}
|
|
19062
19075
|
|
|
19063
19076
|
// src/worker-watchdog.ts
|
|
19064
19077
|
import { randomUUID } from "node:crypto";
|