@zixt/host 0.0.138 → 0.0.139
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 +104 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { homedir as homedir4 } 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.139",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -16936,6 +16936,11 @@ var Schedule = external_exports.object({
|
|
|
16936
16936
|
/** TS-16 for standing work: every tick's Task asks for this exact Machine;
|
|
16937
16937
|
* null lets the dispatcher pick each time. */
|
|
16938
16938
|
requestedHostId: HostId.nullable().default(null),
|
|
16939
|
+
/**
|
|
16940
|
+
* Every tick's Task requires the AI teammate Browser, so dispatch waits for
|
|
16941
|
+
* a Machine with fresh Browser capability instead of running blind (OB-14).
|
|
16942
|
+
*/
|
|
16943
|
+
requiresBrowser: external_exports.boolean().default(false),
|
|
16939
16944
|
enabled: external_exports.boolean(),
|
|
16940
16945
|
lastRunAt: IsoDate.nullable(),
|
|
16941
16946
|
skippedRuns: external_exports.number().int().min(0).default(0),
|
|
@@ -16955,7 +16960,8 @@ var CreateScheduleRequest = external_exports.object({
|
|
|
16955
16960
|
presetId: Schedule.shape.presetId.removeDefault().optional(),
|
|
16956
16961
|
cadence: ScheduleCadence,
|
|
16957
16962
|
endsAt: IsoDate.nullable().optional(),
|
|
16958
|
-
requestedHostId: HostId.nullable().optional()
|
|
16963
|
+
requestedHostId: HostId.nullable().optional(),
|
|
16964
|
+
requiresBrowser: external_exports.boolean().optional()
|
|
16959
16965
|
});
|
|
16960
16966
|
var UpdateScheduleRequest = external_exports.object({
|
|
16961
16967
|
name: Schedule.shape.name,
|
|
@@ -16964,6 +16970,7 @@ var UpdateScheduleRequest = external_exports.object({
|
|
|
16964
16970
|
cadence: ScheduleCadence,
|
|
16965
16971
|
endsAt: IsoDate.nullable(),
|
|
16966
16972
|
requestedHostId: HostId.nullable(),
|
|
16973
|
+
requiresBrowser: external_exports.boolean(),
|
|
16967
16974
|
enabled: external_exports.boolean()
|
|
16968
16975
|
}).partial().refine((v) => Object.keys(v).length > 0, "empty update");
|
|
16969
16976
|
var ListSchedulesResponse = external_exports.object({
|
|
@@ -16983,9 +16990,21 @@ var AutomationProposalTrigger = external_exports.discriminatedUnion("kind", [
|
|
|
16983
16990
|
external_exports.object({
|
|
16984
16991
|
kind: external_exports.literal("webhook"),
|
|
16985
16992
|
source: external_exports.string().trim().min(1).max(120).nullable()
|
|
16986
|
-
})
|
|
16993
|
+
}),
|
|
16994
|
+
/**
|
|
16995
|
+
* One Task, created queued on the proposing teammate when an Admin accepts
|
|
16996
|
+
* (OB-14). Initiative sweeps propose the work they find here; nothing is
|
|
16997
|
+
* created or starts until the decision.
|
|
16998
|
+
*/
|
|
16999
|
+
external_exports.object({ kind: external_exports.literal("task") })
|
|
17000
|
+
]);
|
|
17001
|
+
var AutomationProposalItemStatus = external_exports.enum([
|
|
17002
|
+
"proposed",
|
|
17003
|
+
"created",
|
|
17004
|
+
"dismissed",
|
|
17005
|
+
/** Replaced undecided by a newer sweep from the same teammate: neither accepted nor refused (OB-14). */
|
|
17006
|
+
"superseded"
|
|
16987
17007
|
]);
|
|
16988
|
-
var AutomationProposalItemStatus = external_exports.enum(["proposed", "created", "dismissed"]);
|
|
16989
17008
|
var AutomationProposalItem = external_exports.object({
|
|
16990
17009
|
key: ItemKey,
|
|
16991
17010
|
name: external_exports.string().trim().min(1).max(120),
|
|
@@ -16995,7 +17014,9 @@ var AutomationProposalItem = external_exports.object({
|
|
|
16995
17014
|
why: external_exports.string().trim().min(1).max(300),
|
|
16996
17015
|
status: AutomationProposalItemStatus,
|
|
16997
17016
|
createdScheduleId: ScheduleId.nullable(),
|
|
16998
|
-
createdWebhookAutomationId: WebhookAutomationId.nullable()
|
|
17017
|
+
createdWebhookAutomationId: WebhookAutomationId.nullable(),
|
|
17018
|
+
/** The queued Task an accepted task-trigger item created (OB-14). */
|
|
17019
|
+
createdTaskId: TaskId.nullable()
|
|
16999
17020
|
});
|
|
17000
17021
|
var AutomationProposalSetStatus = external_exports.enum(["pending", "decided"]);
|
|
17001
17022
|
var AUTOMATION_PROPOSAL_MAX_ITEMS = 10;
|
|
@@ -17013,7 +17034,14 @@ var AutomationProposalSet = external_exports.object({
|
|
|
17013
17034
|
originTrust: external_exports.enum(["internal", "external"]),
|
|
17014
17035
|
createdAt: IsoDate,
|
|
17015
17036
|
decidedAt: IsoDate.nullable(),
|
|
17016
|
-
|
|
17037
|
+
/** Null on a superseded or empty set: no person decided it. */
|
|
17038
|
+
decidedBy: MemberId.nullable(),
|
|
17039
|
+
/**
|
|
17040
|
+
* The newer sweep that replaced this set while it sat undecided (OB-14).
|
|
17041
|
+
* A recurring sweep restates what still matters, so at most one proposal
|
|
17042
|
+
* card per teammate ever waits.
|
|
17043
|
+
*/
|
|
17044
|
+
supersededBySetId: AutomationProposalSetId.nullable().default(null)
|
|
17017
17045
|
});
|
|
17018
17046
|
var ListAutomationProposalsResponse = external_exports.object({
|
|
17019
17047
|
proposals: external_exports.array(AutomationProposalSet)
|
|
@@ -17038,7 +17066,9 @@ var CreatedWebhookSetup = external_exports.object({
|
|
|
17038
17066
|
var DecideAutomationProposalsResponse = external_exports.object({
|
|
17039
17067
|
proposalSet: AutomationProposalSet,
|
|
17040
17068
|
createdScheduleIds: external_exports.array(ScheduleId),
|
|
17041
|
-
createdWebhooks: external_exports.array(CreatedWebhookSetup)
|
|
17069
|
+
createdWebhooks: external_exports.array(CreatedWebhookSetup),
|
|
17070
|
+
/** Tasks created queued from accepted task-trigger items (OB-14). */
|
|
17071
|
+
createdTaskIds: external_exports.array(TaskId)
|
|
17042
17072
|
});
|
|
17043
17073
|
|
|
17044
17074
|
// ../../packages/contracts/src/reviews.ts
|
|
@@ -38844,6 +38874,45 @@ var TOOLS = [
|
|
|
38844
38874
|
required: ["summary", "automations"]
|
|
38845
38875
|
}
|
|
38846
38876
|
},
|
|
38877
|
+
{
|
|
38878
|
+
name: "propose_tasks",
|
|
38879
|
+
description: "Propose one-time Tasks WITHOUT creating them: the set is recorded for an organization Admin, who reviews it under Needs attention and on the Automations page and creates or dismisses each item; nothing is created or starts until a person approves. Use this when your own research or a routine sweep finds work worth doing that nobody asked for. Use create_task only for work your current instructions already authorize. Give each item an honest one-line why. An empty list honestly records that nothing worth proposing was found.",
|
|
38880
|
+
inputSchema: {
|
|
38881
|
+
type: "object",
|
|
38882
|
+
properties: {
|
|
38883
|
+
summary: {
|
|
38884
|
+
type: "string",
|
|
38885
|
+
minLength: 1,
|
|
38886
|
+
maxLength: 600,
|
|
38887
|
+
description: "One line: what you researched or noticed, and why this work."
|
|
38888
|
+
},
|
|
38889
|
+
tasks: {
|
|
38890
|
+
type: "array",
|
|
38891
|
+
maxItems: 10,
|
|
38892
|
+
items: {
|
|
38893
|
+
type: "object",
|
|
38894
|
+
properties: {
|
|
38895
|
+
name: { type: "string", minLength: 1, maxLength: 120 },
|
|
38896
|
+
instructions: {
|
|
38897
|
+
type: "string",
|
|
38898
|
+
minLength: 1,
|
|
38899
|
+
maxLength: 1e4,
|
|
38900
|
+
description: "The full brief the Task would run from, ready as written."
|
|
38901
|
+
},
|
|
38902
|
+
why: {
|
|
38903
|
+
type: "string",
|
|
38904
|
+
minLength: 1,
|
|
38905
|
+
maxLength: 300,
|
|
38906
|
+
description: "Honest one line: why this work helps this business."
|
|
38907
|
+
}
|
|
38908
|
+
},
|
|
38909
|
+
required: ["name", "instructions", "why"]
|
|
38910
|
+
}
|
|
38911
|
+
}
|
|
38912
|
+
},
|
|
38913
|
+
required: ["summary", "tasks"]
|
|
38914
|
+
}
|
|
38915
|
+
},
|
|
38847
38916
|
{
|
|
38848
38917
|
name: "list_schedules",
|
|
38849
38918
|
description: "List your own schedules (id, name, cadence, enabled, next run).",
|
|
@@ -39052,7 +39121,7 @@ var TOOLS = [
|
|
|
39052
39121
|
},
|
|
39053
39122
|
{
|
|
39054
39123
|
name: "create_task",
|
|
39055
|
-
description: "Open a new task, for yourself (omit agent_id) or for another AI teammate. This is real work: it queues, dispatches, and reports like a task a human opened. Check list_tasks first so you do not open a duplicate of something already queued or running. Omit requested_host_id for Auto routing; provide it only to require one eligible Machine.",
|
|
39124
|
+
description: "Open a new task, for yourself (omit agent_id) or for another AI teammate. This is real work: it queues, dispatches, and reports like a task a human opened. Check list_tasks first so you do not open a duplicate of something already queued or running. Omit requested_host_id for Auto routing; provide it only to require one eligible Machine. Use this for work your current instructions already authorize you to start; when you found new work on your own initiative and a person should decide first whether it is worth doing, use propose_tasks instead.",
|
|
39056
39125
|
inputSchema: {
|
|
39057
39126
|
type: "object",
|
|
39058
39127
|
properties: {
|
|
@@ -39198,6 +39267,33 @@ function opFor(name, args) {
|
|
|
39198
39267
|
})
|
|
39199
39268
|
};
|
|
39200
39269
|
}
|
|
39270
|
+
case "propose_tasks": {
|
|
39271
|
+
const rawItems = args["tasks"];
|
|
39272
|
+
if (!Array.isArray(rawItems)) throw new Error("missing required argument `tasks`");
|
|
39273
|
+
return {
|
|
39274
|
+
kind: "automation.propose",
|
|
39275
|
+
summary: str("summary"),
|
|
39276
|
+
items: rawItems.map((raw, index) => {
|
|
39277
|
+
if (typeof raw !== "object" || raw === null) {
|
|
39278
|
+
throw new Error(`tasks[${index}] must be an object`);
|
|
39279
|
+
}
|
|
39280
|
+
const item = raw;
|
|
39281
|
+
const field = (key) => {
|
|
39282
|
+
const value = item[key];
|
|
39283
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
39284
|
+
throw new Error(`tasks[${index}] is missing \`${key}\``);
|
|
39285
|
+
}
|
|
39286
|
+
return value;
|
|
39287
|
+
};
|
|
39288
|
+
return {
|
|
39289
|
+
name: field("name"),
|
|
39290
|
+
instructions: field("instructions"),
|
|
39291
|
+
why: field("why"),
|
|
39292
|
+
trigger: { kind: "task" }
|
|
39293
|
+
};
|
|
39294
|
+
})
|
|
39295
|
+
};
|
|
39296
|
+
}
|
|
39201
39297
|
case "list_schedules":
|
|
39202
39298
|
return { kind: "schedule.list" };
|
|
39203
39299
|
case "cancel_schedule":
|