@zixt/host 0.0.138 → 0.0.140

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.
Files changed (2) hide show
  1. package/dist/index.js +107 -8
  2. 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.138",
31
+ version: "0.0.140",
32
32
  type: "module",
33
33
  exports: {
34
34
  ".": "./src/client.ts",
@@ -15324,6 +15324,9 @@ var RoutineTemplateCadence = external_exports.discriminatedUnion("kind", [
15324
15324
  })
15325
15325
  ]);
15326
15326
  var RoutinePresetId = external_exports.enum([
15327
+ "developer-weekly-initiative",
15328
+ "marketing-weekly-initiative",
15329
+ "sales-weekly-initiative",
15327
15330
  "developer-weekly-architecture-review",
15328
15331
  "developer-weekly-dependency-review",
15329
15332
  "developer-weekly-release-review",
@@ -16936,6 +16939,11 @@ var Schedule = external_exports.object({
16936
16939
  /** TS-16 for standing work: every tick's Task asks for this exact Machine;
16937
16940
  * null lets the dispatcher pick each time. */
16938
16941
  requestedHostId: HostId.nullable().default(null),
16942
+ /**
16943
+ * Every tick's Task requires the AI teammate Browser, so dispatch waits for
16944
+ * a Machine with fresh Browser capability instead of running blind (OB-14).
16945
+ */
16946
+ requiresBrowser: external_exports.boolean().default(false),
16939
16947
  enabled: external_exports.boolean(),
16940
16948
  lastRunAt: IsoDate.nullable(),
16941
16949
  skippedRuns: external_exports.number().int().min(0).default(0),
@@ -16955,7 +16963,8 @@ var CreateScheduleRequest = external_exports.object({
16955
16963
  presetId: Schedule.shape.presetId.removeDefault().optional(),
16956
16964
  cadence: ScheduleCadence,
16957
16965
  endsAt: IsoDate.nullable().optional(),
16958
- requestedHostId: HostId.nullable().optional()
16966
+ requestedHostId: HostId.nullable().optional(),
16967
+ requiresBrowser: external_exports.boolean().optional()
16959
16968
  });
16960
16969
  var UpdateScheduleRequest = external_exports.object({
16961
16970
  name: Schedule.shape.name,
@@ -16964,6 +16973,7 @@ var UpdateScheduleRequest = external_exports.object({
16964
16973
  cadence: ScheduleCadence,
16965
16974
  endsAt: IsoDate.nullable(),
16966
16975
  requestedHostId: HostId.nullable(),
16976
+ requiresBrowser: external_exports.boolean(),
16967
16977
  enabled: external_exports.boolean()
16968
16978
  }).partial().refine((v) => Object.keys(v).length > 0, "empty update");
16969
16979
  var ListSchedulesResponse = external_exports.object({
@@ -16983,9 +16993,21 @@ var AutomationProposalTrigger = external_exports.discriminatedUnion("kind", [
16983
16993
  external_exports.object({
16984
16994
  kind: external_exports.literal("webhook"),
16985
16995
  source: external_exports.string().trim().min(1).max(120).nullable()
16986
- })
16996
+ }),
16997
+ /**
16998
+ * One Task, created queued on the proposing teammate when an Admin accepts
16999
+ * (OB-14). Initiative sweeps propose the work they find here; nothing is
17000
+ * created or starts until the decision.
17001
+ */
17002
+ external_exports.object({ kind: external_exports.literal("task") })
17003
+ ]);
17004
+ var AutomationProposalItemStatus = external_exports.enum([
17005
+ "proposed",
17006
+ "created",
17007
+ "dismissed",
17008
+ /** Replaced undecided by a newer sweep from the same teammate: neither accepted nor refused (OB-14). */
17009
+ "superseded"
16987
17010
  ]);
16988
- var AutomationProposalItemStatus = external_exports.enum(["proposed", "created", "dismissed"]);
16989
17011
  var AutomationProposalItem = external_exports.object({
16990
17012
  key: ItemKey,
16991
17013
  name: external_exports.string().trim().min(1).max(120),
@@ -16995,7 +17017,9 @@ var AutomationProposalItem = external_exports.object({
16995
17017
  why: external_exports.string().trim().min(1).max(300),
16996
17018
  status: AutomationProposalItemStatus,
16997
17019
  createdScheduleId: ScheduleId.nullable(),
16998
- createdWebhookAutomationId: WebhookAutomationId.nullable()
17020
+ createdWebhookAutomationId: WebhookAutomationId.nullable(),
17021
+ /** The queued Task an accepted task-trigger item created (OB-14). */
17022
+ createdTaskId: TaskId.nullable()
16999
17023
  });
17000
17024
  var AutomationProposalSetStatus = external_exports.enum(["pending", "decided"]);
17001
17025
  var AUTOMATION_PROPOSAL_MAX_ITEMS = 10;
@@ -17013,7 +17037,14 @@ var AutomationProposalSet = external_exports.object({
17013
17037
  originTrust: external_exports.enum(["internal", "external"]),
17014
17038
  createdAt: IsoDate,
17015
17039
  decidedAt: IsoDate.nullable(),
17016
- decidedBy: MemberId.nullable()
17040
+ /** Null on a superseded or empty set: no person decided it. */
17041
+ decidedBy: MemberId.nullable(),
17042
+ /**
17043
+ * The newer sweep that replaced this set while it sat undecided (OB-14).
17044
+ * A recurring sweep restates what still matters, so at most one proposal
17045
+ * card per teammate ever waits.
17046
+ */
17047
+ supersededBySetId: AutomationProposalSetId.nullable().default(null)
17017
17048
  });
17018
17049
  var ListAutomationProposalsResponse = external_exports.object({
17019
17050
  proposals: external_exports.array(AutomationProposalSet)
@@ -17038,7 +17069,9 @@ var CreatedWebhookSetup = external_exports.object({
17038
17069
  var DecideAutomationProposalsResponse = external_exports.object({
17039
17070
  proposalSet: AutomationProposalSet,
17040
17071
  createdScheduleIds: external_exports.array(ScheduleId),
17041
- createdWebhooks: external_exports.array(CreatedWebhookSetup)
17072
+ createdWebhooks: external_exports.array(CreatedWebhookSetup),
17073
+ /** Tasks created queued from accepted task-trigger items (OB-14). */
17074
+ createdTaskIds: external_exports.array(TaskId)
17042
17075
  });
17043
17076
 
17044
17077
  // ../../packages/contracts/src/reviews.ts
@@ -38844,6 +38877,45 @@ var TOOLS = [
38844
38877
  required: ["summary", "automations"]
38845
38878
  }
38846
38879
  },
38880
+ {
38881
+ name: "propose_tasks",
38882
+ 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.",
38883
+ inputSchema: {
38884
+ type: "object",
38885
+ properties: {
38886
+ summary: {
38887
+ type: "string",
38888
+ minLength: 1,
38889
+ maxLength: 600,
38890
+ description: "One line: what you researched or noticed, and why this work."
38891
+ },
38892
+ tasks: {
38893
+ type: "array",
38894
+ maxItems: 10,
38895
+ items: {
38896
+ type: "object",
38897
+ properties: {
38898
+ name: { type: "string", minLength: 1, maxLength: 120 },
38899
+ instructions: {
38900
+ type: "string",
38901
+ minLength: 1,
38902
+ maxLength: 1e4,
38903
+ description: "The full brief the Task would run from, ready as written."
38904
+ },
38905
+ why: {
38906
+ type: "string",
38907
+ minLength: 1,
38908
+ maxLength: 300,
38909
+ description: "Honest one line: why this work helps this business."
38910
+ }
38911
+ },
38912
+ required: ["name", "instructions", "why"]
38913
+ }
38914
+ }
38915
+ },
38916
+ required: ["summary", "tasks"]
38917
+ }
38918
+ },
38847
38919
  {
38848
38920
  name: "list_schedules",
38849
38921
  description: "List your own schedules (id, name, cadence, enabled, next run).",
@@ -39052,7 +39124,7 @@ var TOOLS = [
39052
39124
  },
39053
39125
  {
39054
39126
  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.",
39127
+ 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
39128
  inputSchema: {
39057
39129
  type: "object",
39058
39130
  properties: {
@@ -39198,6 +39270,33 @@ function opFor(name, args) {
39198
39270
  })
39199
39271
  };
39200
39272
  }
39273
+ case "propose_tasks": {
39274
+ const rawItems = args["tasks"];
39275
+ if (!Array.isArray(rawItems)) throw new Error("missing required argument `tasks`");
39276
+ return {
39277
+ kind: "automation.propose",
39278
+ summary: str("summary"),
39279
+ items: rawItems.map((raw, index) => {
39280
+ if (typeof raw !== "object" || raw === null) {
39281
+ throw new Error(`tasks[${index}] must be an object`);
39282
+ }
39283
+ const item = raw;
39284
+ const field = (key) => {
39285
+ const value = item[key];
39286
+ if (typeof value !== "string" || value.length === 0) {
39287
+ throw new Error(`tasks[${index}] is missing \`${key}\``);
39288
+ }
39289
+ return value;
39290
+ };
39291
+ return {
39292
+ name: field("name"),
39293
+ instructions: field("instructions"),
39294
+ why: field("why"),
39295
+ trigger: { kind: "task" }
39296
+ };
39297
+ })
39298
+ };
39299
+ }
39201
39300
  case "list_schedules":
39202
39301
  return { kind: "schedule.list" };
39203
39302
  case "cancel_schedule":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zixt/host",
3
- "version": "0.0.138",
3
+ "version": "0.0.140",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/client.ts",