@zixt/host 0.0.28 → 0.0.30
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 +78 -2
- 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.30",
|
|
35
35
|
type: "module",
|
|
36
36
|
exports: {
|
|
37
37
|
".": "./src/client.ts",
|
|
@@ -16230,6 +16230,73 @@ var TaskDetailResponse = external_exports.object({
|
|
|
16230
16230
|
/** Newest host-observed folder/Git state; null until a current Host reports it. */
|
|
16231
16231
|
workingContext: TaskWorkingContext.nullable().default(null)
|
|
16232
16232
|
});
|
|
16233
|
+
var TaskSupportBundle = external_exports.object({
|
|
16234
|
+
schemaVersion: external_exports.literal(1),
|
|
16235
|
+
supportId: external_exports.string().regex(/^ZXT-[A-Z0-9]{12}$/),
|
|
16236
|
+
generatedAt: IsoDate,
|
|
16237
|
+
task: external_exports.object({
|
|
16238
|
+
id: TaskId,
|
|
16239
|
+
agentId: AgentId,
|
|
16240
|
+
hostId: HostId.nullable(),
|
|
16241
|
+
status: TaskStatus,
|
|
16242
|
+
priority: external_exports.number().int(),
|
|
16243
|
+
epoch: external_exports.number().int().min(0),
|
|
16244
|
+
origin: external_exports.object({ source: TaskOrigin.shape.source, trust: TaskOrigin.shape.trust }),
|
|
16245
|
+
cancellation: external_exports.object({
|
|
16246
|
+
state: external_exports.enum(["not_required", "requested", "acknowledged", "authority_expired"]),
|
|
16247
|
+
requestedAt: IsoDate,
|
|
16248
|
+
acknowledgedAt: IsoDate.nullable(),
|
|
16249
|
+
residualExposureUntil: IsoDate.nullable(),
|
|
16250
|
+
residualExposure: external_exports.enum(["none", "host_may_still_be_running"])
|
|
16251
|
+
}).nullable(),
|
|
16252
|
+
createdAt: IsoDate,
|
|
16253
|
+
updatedAt: IsoDate
|
|
16254
|
+
}),
|
|
16255
|
+
attempts: external_exports.array(
|
|
16256
|
+
external_exports.object({
|
|
16257
|
+
id: TaskAttemptId,
|
|
16258
|
+
epoch: external_exports.number().int().min(1),
|
|
16259
|
+
status: TaskStatus,
|
|
16260
|
+
hostId: HostId,
|
|
16261
|
+
runner: external_exports.object({
|
|
16262
|
+
type: external_exports.string().min(1),
|
|
16263
|
+
model: external_exports.string().nullable(),
|
|
16264
|
+
effort: external_exports.string().nullable()
|
|
16265
|
+
}),
|
|
16266
|
+
interactionMode: InteractionMode.nullable(),
|
|
16267
|
+
workspaceConfigured: external_exports.boolean(),
|
|
16268
|
+
credentialGrantNames: external_exports.array(external_exports.string()),
|
|
16269
|
+
connectionGrants: external_exports.array(external_exports.object({ connectionId: ConnectionId, name: external_exports.string() })),
|
|
16270
|
+
providerGrants: external_exports.array(
|
|
16271
|
+
external_exports.object({
|
|
16272
|
+
provider: external_exports.enum(["linear", "github"]),
|
|
16273
|
+
mode: external_exports.enum(["app", "connected_user", "pat"]).nullable(),
|
|
16274
|
+
operations: external_exports.array(external_exports.string()),
|
|
16275
|
+
providerExpiresAt: IsoDate.nullable()
|
|
16276
|
+
})
|
|
16277
|
+
),
|
|
16278
|
+
grantExpiresAt: IsoDate.nullable(),
|
|
16279
|
+
assignedAt: IsoDate,
|
|
16280
|
+
startedAt: IsoDate.nullable(),
|
|
16281
|
+
finishedAt: IsoDate.nullable(),
|
|
16282
|
+
receipt: external_exports.object({
|
|
16283
|
+
version: external_exports.number().int().min(1),
|
|
16284
|
+
outcome: external_exports.string(),
|
|
16285
|
+
finalizedAt: IsoDate
|
|
16286
|
+
}).nullable()
|
|
16287
|
+
})
|
|
16288
|
+
),
|
|
16289
|
+
activity: external_exports.array(
|
|
16290
|
+
external_exports.object({
|
|
16291
|
+
id: external_exports.string(),
|
|
16292
|
+
epoch: external_exports.number().int().min(0).nullable(),
|
|
16293
|
+
kind: external_exports.string(),
|
|
16294
|
+
tool: external_exports.string().nullable(),
|
|
16295
|
+
machine: external_exports.string().nullable(),
|
|
16296
|
+
at: IsoDate
|
|
16297
|
+
})
|
|
16298
|
+
)
|
|
16299
|
+
});
|
|
16233
16300
|
var ListTasksResponse = external_exports.object({
|
|
16234
16301
|
tasks: external_exports.array(TaskProjection)
|
|
16235
16302
|
});
|
|
@@ -19008,6 +19075,8 @@ async function generateTaskTitle(instructions, runner) {
|
|
|
19008
19075
|
const prompt = [
|
|
19009
19076
|
"Name this task for a task list. Reply with ONLY the name: at most eight",
|
|
19010
19077
|
"words, no quotes, no trailing period, same language as the request.",
|
|
19078
|
+
"Never ask a question or explain that context is missing. The request",
|
|
19079
|
+
"below is the context. If it is vague, name its apparent goal.",
|
|
19011
19080
|
"",
|
|
19012
19081
|
"<task_request>",
|
|
19013
19082
|
instructions.slice(0, INSTRUCTIONS_BUDGET),
|
|
@@ -19060,9 +19129,16 @@ function cleanTitleOutput(raw) {
|
|
|
19060
19129
|
const line = raw.split("\n").map((candidate) => candidate.trim()).find((candidate) => candidate.length > 0);
|
|
19061
19130
|
if (!line) return null;
|
|
19062
19131
|
const unwrapped = line.replace(/^["'`“”‘’]+/, "").replace(/["'`“”‘’]+$/, "").replace(/\.$/, "").replace(/\s+/g, " ").trim();
|
|
19063
|
-
if (!unwrapped
|
|
19132
|
+
if (!isPlausibleTaskTitle(unwrapped)) return null;
|
|
19064
19133
|
return unwrapped;
|
|
19065
19134
|
}
|
|
19135
|
+
function isPlausibleTaskTitle(title) {
|
|
19136
|
+
if (!title || title.length > 200 || title.includes("?")) return false;
|
|
19137
|
+
if (title.split(/\s+/u).length > 8) return false;
|
|
19138
|
+
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(
|
|
19139
|
+
title
|
|
19140
|
+
);
|
|
19141
|
+
}
|
|
19066
19142
|
|
|
19067
19143
|
// src/worker-watchdog.ts
|
|
19068
19144
|
import { randomUUID } from "node:crypto";
|