@zixt/host 0.0.137 → 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 +151 -9
- 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",
|
|
@@ -14676,6 +14676,8 @@ var ID_PREFIXES = {
|
|
|
14676
14676
|
managerApiAction: "maa",
|
|
14677
14677
|
/** One Manager-prepared Webhook Automation setup card (MG-21). */
|
|
14678
14678
|
managerWebhookAction: "mwa",
|
|
14679
|
+
/** One Manager-prepared Email Integration setup card (MG-24). */
|
|
14680
|
+
managerEmailSetup: "mes",
|
|
14679
14681
|
/** One Manager-authored questionnaire waiting in a Conversation. */
|
|
14680
14682
|
managerQuestionnaire: "mqu",
|
|
14681
14683
|
/** One Manager inference call's token-metering row (MG-8). */
|
|
@@ -14763,6 +14765,10 @@ var ManagerWebhookActionId = idSchema(
|
|
|
14763
14765
|
ID_PREFIXES.managerWebhookAction,
|
|
14764
14766
|
"Manager webhook action id"
|
|
14765
14767
|
);
|
|
14768
|
+
var ManagerEmailSetupId = idSchema(
|
|
14769
|
+
ID_PREFIXES.managerEmailSetup,
|
|
14770
|
+
"Manager email setup id"
|
|
14771
|
+
);
|
|
14766
14772
|
var ManagerQuestionnaireId = idSchema(
|
|
14767
14773
|
ID_PREFIXES.managerQuestionnaire,
|
|
14768
14774
|
"Manager questionnaire id"
|
|
@@ -16930,6 +16936,11 @@ var Schedule = external_exports.object({
|
|
|
16930
16936
|
/** TS-16 for standing work: every tick's Task asks for this exact Machine;
|
|
16931
16937
|
* null lets the dispatcher pick each time. */
|
|
16932
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),
|
|
16933
16944
|
enabled: external_exports.boolean(),
|
|
16934
16945
|
lastRunAt: IsoDate.nullable(),
|
|
16935
16946
|
skippedRuns: external_exports.number().int().min(0).default(0),
|
|
@@ -16949,7 +16960,8 @@ var CreateScheduleRequest = external_exports.object({
|
|
|
16949
16960
|
presetId: Schedule.shape.presetId.removeDefault().optional(),
|
|
16950
16961
|
cadence: ScheduleCadence,
|
|
16951
16962
|
endsAt: IsoDate.nullable().optional(),
|
|
16952
|
-
requestedHostId: HostId.nullable().optional()
|
|
16963
|
+
requestedHostId: HostId.nullable().optional(),
|
|
16964
|
+
requiresBrowser: external_exports.boolean().optional()
|
|
16953
16965
|
});
|
|
16954
16966
|
var UpdateScheduleRequest = external_exports.object({
|
|
16955
16967
|
name: Schedule.shape.name,
|
|
@@ -16958,6 +16970,7 @@ var UpdateScheduleRequest = external_exports.object({
|
|
|
16958
16970
|
cadence: ScheduleCadence,
|
|
16959
16971
|
endsAt: IsoDate.nullable(),
|
|
16960
16972
|
requestedHostId: HostId.nullable(),
|
|
16973
|
+
requiresBrowser: external_exports.boolean(),
|
|
16961
16974
|
enabled: external_exports.boolean()
|
|
16962
16975
|
}).partial().refine((v) => Object.keys(v).length > 0, "empty update");
|
|
16963
16976
|
var ListSchedulesResponse = external_exports.object({
|
|
@@ -16977,9 +16990,21 @@ var AutomationProposalTrigger = external_exports.discriminatedUnion("kind", [
|
|
|
16977
16990
|
external_exports.object({
|
|
16978
16991
|
kind: external_exports.literal("webhook"),
|
|
16979
16992
|
source: external_exports.string().trim().min(1).max(120).nullable()
|
|
16980
|
-
})
|
|
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"
|
|
16981
17007
|
]);
|
|
16982
|
-
var AutomationProposalItemStatus = external_exports.enum(["proposed", "created", "dismissed"]);
|
|
16983
17008
|
var AutomationProposalItem = external_exports.object({
|
|
16984
17009
|
key: ItemKey,
|
|
16985
17010
|
name: external_exports.string().trim().min(1).max(120),
|
|
@@ -16989,7 +17014,9 @@ var AutomationProposalItem = external_exports.object({
|
|
|
16989
17014
|
why: external_exports.string().trim().min(1).max(300),
|
|
16990
17015
|
status: AutomationProposalItemStatus,
|
|
16991
17016
|
createdScheduleId: ScheduleId.nullable(),
|
|
16992
|
-
createdWebhookAutomationId: WebhookAutomationId.nullable()
|
|
17017
|
+
createdWebhookAutomationId: WebhookAutomationId.nullable(),
|
|
17018
|
+
/** The queued Task an accepted task-trigger item created (OB-14). */
|
|
17019
|
+
createdTaskId: TaskId.nullable()
|
|
16993
17020
|
});
|
|
16994
17021
|
var AutomationProposalSetStatus = external_exports.enum(["pending", "decided"]);
|
|
16995
17022
|
var AUTOMATION_PROPOSAL_MAX_ITEMS = 10;
|
|
@@ -17007,7 +17034,14 @@ var AutomationProposalSet = external_exports.object({
|
|
|
17007
17034
|
originTrust: external_exports.enum(["internal", "external"]),
|
|
17008
17035
|
createdAt: IsoDate,
|
|
17009
17036
|
decidedAt: IsoDate.nullable(),
|
|
17010
|
-
|
|
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)
|
|
17011
17045
|
});
|
|
17012
17046
|
var ListAutomationProposalsResponse = external_exports.object({
|
|
17013
17047
|
proposals: external_exports.array(AutomationProposalSet)
|
|
@@ -17032,7 +17066,9 @@ var CreatedWebhookSetup = external_exports.object({
|
|
|
17032
17066
|
var DecideAutomationProposalsResponse = external_exports.object({
|
|
17033
17067
|
proposalSet: AutomationProposalSet,
|
|
17034
17068
|
createdScheduleIds: external_exports.array(ScheduleId),
|
|
17035
|
-
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)
|
|
17036
17072
|
});
|
|
17037
17073
|
|
|
17038
17074
|
// ../../packages/contracts/src/reviews.ts
|
|
@@ -19861,7 +19897,9 @@ var ConversationEventProjection = external_exports.discriminatedUnion("kind", [
|
|
|
19861
19897
|
/** Present only for a Webhook Automation secure setup card (MG-21). */
|
|
19862
19898
|
webhookActionId: ManagerWebhookActionId.nullable().optional(),
|
|
19863
19899
|
/** Present only for a Manager-authored questionnaire (MG-22). */
|
|
19864
|
-
questionnaireId: ManagerQuestionnaireId.nullable().optional()
|
|
19900
|
+
questionnaireId: ManagerQuestionnaireId.nullable().optional(),
|
|
19901
|
+
/** Present only for an Email Integration setup card (MG-24). */
|
|
19902
|
+
emailSetupId: ManagerEmailSetupId.nullable().optional()
|
|
19865
19903
|
}).strict(),
|
|
19866
19904
|
/** A mirrored child-Task event: what the teammate wrote or became. */
|
|
19867
19905
|
external_exports.object({
|
|
@@ -19934,6 +19972,44 @@ var ManagerIntegrationActionResponse = external_exports.object({
|
|
|
19934
19972
|
action: ManagerIntegrationActionProjection,
|
|
19935
19973
|
oauth: ManagerIntegrationOAuthStart.nullable()
|
|
19936
19974
|
}).strict();
|
|
19975
|
+
var ManagerEmailSetupPrefill = external_exports.object({
|
|
19976
|
+
/** Connection name as it will appear under Integrations. */
|
|
19977
|
+
name: external_exports.string().min(1).max(120).optional(),
|
|
19978
|
+
provider: EmailProviderPreset.optional(),
|
|
19979
|
+
mode: EmailConnectionMode.optional(),
|
|
19980
|
+
fromName: external_exports.string().max(200).optional(),
|
|
19981
|
+
fromAddress: external_exports.string().max(320).optional(),
|
|
19982
|
+
replyTo: external_exports.string().max(320).optional(),
|
|
19983
|
+
usageNotes: external_exports.string().max(4e3).optional(),
|
|
19984
|
+
/** custom provider only; presets carry their own servers. */
|
|
19985
|
+
smtpHost: external_exports.string().max(255).optional(),
|
|
19986
|
+
smtpPort: external_exports.number().int().min(1).max(65535).optional(),
|
|
19987
|
+
incomingHost: external_exports.string().max(255).optional(),
|
|
19988
|
+
incomingPort: external_exports.number().int().min(1).max(65535).optional(),
|
|
19989
|
+
/** Sign-in name for the mailbox, when the person said it. Never a password. */
|
|
19990
|
+
username: external_exports.string().max(320).optional(),
|
|
19991
|
+
watch: external_exports.object({
|
|
19992
|
+
enabled: external_exports.boolean(),
|
|
19993
|
+
senderContains: external_exports.string().max(200).optional(),
|
|
19994
|
+
recipientContains: external_exports.string().max(200).optional(),
|
|
19995
|
+
subjectContains: external_exports.string().max(200).optional(),
|
|
19996
|
+
instructions: external_exports.string().max(2e4).optional()
|
|
19997
|
+
}).strict().optional()
|
|
19998
|
+
}).strict();
|
|
19999
|
+
var ManagerEmailSetupStatus = external_exports.enum(["open", "completed", "dismissed"]);
|
|
20000
|
+
var ManagerEmailSetupProjection = external_exports.object({
|
|
20001
|
+
id: ManagerEmailSetupId,
|
|
20002
|
+
conversationId: ConversationId,
|
|
20003
|
+
prefill: ManagerEmailSetupPrefill,
|
|
20004
|
+
status: ManagerEmailSetupStatus,
|
|
20005
|
+
/** True when the requesting member is the person this card was prepared for. */
|
|
20006
|
+
mine: external_exports.boolean(),
|
|
20007
|
+
/** The Email connection the card produced; present once completed. */
|
|
20008
|
+
connectionId: external_exports.string().nullable(),
|
|
20009
|
+
connectionName: external_exports.string().max(120).nullable(),
|
|
20010
|
+
createdAt: external_exports.string()
|
|
20011
|
+
}).strict();
|
|
20012
|
+
var CompleteManagerEmailSetupRequest = external_exports.object({ connectionId: external_exports.string().min(1).max(100) }).strict();
|
|
19937
20013
|
var ManagerCredentialRequestStatus = external_exports.enum([
|
|
19938
20014
|
"awaiting_entry",
|
|
19939
20015
|
"storing",
|
|
@@ -38798,6 +38874,45 @@ var TOOLS = [
|
|
|
38798
38874
|
required: ["summary", "automations"]
|
|
38799
38875
|
}
|
|
38800
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
|
+
},
|
|
38801
38916
|
{
|
|
38802
38917
|
name: "list_schedules",
|
|
38803
38918
|
description: "List your own schedules (id, name, cadence, enabled, next run).",
|
|
@@ -39006,7 +39121,7 @@ var TOOLS = [
|
|
|
39006
39121
|
},
|
|
39007
39122
|
{
|
|
39008
39123
|
name: "create_task",
|
|
39009
|
-
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.",
|
|
39010
39125
|
inputSchema: {
|
|
39011
39126
|
type: "object",
|
|
39012
39127
|
properties: {
|
|
@@ -39152,6 +39267,33 @@ function opFor(name, args) {
|
|
|
39152
39267
|
})
|
|
39153
39268
|
};
|
|
39154
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
|
+
}
|
|
39155
39297
|
case "list_schedules":
|
|
39156
39298
|
return { kind: "schedule.list" };
|
|
39157
39299
|
case "cancel_schedule":
|