@integrity-labs/agt-cli 0.28.1038 → 0.28.1039

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/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-6QCJRDMT.js";
43
+ } from "../chunk-X6D6UADI.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1038" : "dev";
5477
+ var cliVersion = true ? "0.28.1039" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1038" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1039" : "dev";
6738
6738
  var program = new Command();
6739
6739
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -7143,7 +7143,7 @@ function exchangeFailureKind(err) {
7143
7143
  }
7144
7144
 
7145
7145
  // src/lib/api-client.ts
7146
- var agtCliVersion = true ? "0.28.1038" : "dev";
7146
+ var agtCliVersion = true ? "0.28.1039" : "dev";
7147
7147
  var lastConfigHash = null;
7148
7148
  function setConfigHash(hash) {
7149
7149
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -12100,4 +12100,4 @@ export {
12100
12100
  managerInstallSystemUnitCommand,
12101
12101
  managerUninstallSystemUnitCommand
12102
12102
  };
12103
- //# sourceMappingURL=chunk-6QCJRDMT.js.map
12103
+ //# sourceMappingURL=chunk-X6D6UADI.js.map
@@ -66,7 +66,7 @@ import {
66
66
  safeWriteJsonAtomic,
67
67
  setConfigHash,
68
68
  tripClass
69
- } from "../chunk-6QCJRDMT.js";
69
+ } from "../chunk-X6D6UADI.js";
70
70
  import {
71
71
  getProjectDir as getProjectDir2,
72
72
  getReadyTasks,
@@ -14677,7 +14677,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
14677
14677
  var lastVersionCheckAt = 0;
14678
14678
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
14679
14679
  var lastResponsivenessProbeAt = 0;
14680
- var agtCliVersion = true ? "0.28.1038" : "dev";
14680
+ var agtCliVersion = true ? "0.28.1039" : "dev";
14681
14681
  function resolveBrewPath(execFileSync3) {
14682
14682
  try {
14683
14683
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -22369,6 +22369,40 @@ var require_nunjucks = __commonJS({
22369
22369
 
22370
22370
  // src/index.ts
22371
22371
  import { writeFile } from "fs/promises";
22372
+
22373
+ // src/routine-list-format.ts
22374
+ function formatRoutineListEntry(r) {
22375
+ const when = r.cron ? `cron ${r.cron}` : r.every ? `every ${r.every}` : "no schedule";
22376
+ const tz = r.timezone ? ` ${r.timezone}` : "";
22377
+ const gated = r.requires_output_approval ? "\n approval: REQUIRED \u2014 call submit_routine_output instead of delivering directly" : "";
22378
+ const pending = r.pending_revision ? `
22379
+ revision pending since ${r.pending_revision.proposed_at}` + (r.pending_revision.summary ? ` \u2014 "${r.pending_revision.summary}"` : "") + (r.pending_revision.snoozed_until ? `
22380
+ your manager chose "not now"; the card re-surfaces ${r.pending_revision.snoozed_until}` : "") + (r.pending_revision.review_url ? `
22381
+ review: ${r.pending_revision.review_url}` : "") + "\n You cannot propose another revision of this routine until they resolve it. Call routine_proposal_status to read what is waiting." : "";
22382
+ const others = (r.schedules ?? []).filter((s) => s.schedule_id !== r.schedule_id);
22383
+ const otherLines = others.map((s) => {
22384
+ const sWhen = s.cron ? `cron ${s.cron}` : s.every ? `every ${s.every}` : "no schedule";
22385
+ const sTz = s.timezone ? ` ${s.timezone}` : "";
22386
+ const off = s.enabled ? "" : " [disabled]";
22387
+ const label = s.role === "execute" ? `execute job${s.name ? ` "${s.name}"` : ""}` : s.role;
22388
+ const instructions = s.role === "execute" && s.prompt ? `
22389
+ prompt:
22390
+ ${s.prompt.replace(/^/gm, " ")}` : "";
22391
+ return `
22392
+ - ${label}: schedule_id ${s.schedule_id} (${sWhen}${sTz})${off}${instructions}`;
22393
+ }).join("");
22394
+ const alsoRuns = others.length > 0 ? `
22395
+ also runs:${otherLines}` : "";
22396
+ const primaryName = r.schedules?.find((s) => s.schedule_id === r.schedule_id)?.name ?? null;
22397
+ const primaryLabel = primaryName && primaryName !== r.name ? ` execute job "${primaryName}"` : "";
22398
+ return `\u2022 ${r.name} [${r.paused ? "paused by your manager - it will not run until they resume it" : r.status}] v${r.version}
22399
+ routine_id: ${r.routine_id}
22400
+ schedule_id: ${r.schedule_id ?? "(none \u2014 this routine has no runtime row)"} (${when}${tz})${primaryLabel}${gated}${pending}${alsoRuns}
22401
+ prompt:
22402
+ ${r.prompt ?? "(none)"}`;
22403
+ }
22404
+
22405
+ // src/index.ts
22372
22406
  import {
22373
22407
  closeSync,
22374
22408
  constants as fsConstants,
@@ -49275,7 +49309,7 @@ var ROUTINE_CADENCE_GUESS = external_exports.enum(["hourly", "daily", "weekdays"
49275
49309
  );
49276
49310
  server.tool(
49277
49311
  "routine_propose",
49278
- 'Propose a recurring ROUTINE the user just asked you to take on. The platform sends them an accept/decline offer; on acceptance it creates the routine and its schedule with full lifecycle (hand-back anytime, approval ramp). Prefer this over schedule_create for recurring responsibilities. If the user named a time, pass it as `at` - the reply tells you the schedule that was actually compiled, so check it matches what they asked for before you go quiet. For a routine with MORE THAN ONE cadence (e.g. "check hourly, but only report once a day"), use `schedules` instead of the flat cadence_guess/at/day_of_week - one entry per role, each with its own cadence.',
49312
+ 'Propose a recurring ROUTINE the user just asked you to take on. The platform sends them an accept/decline offer; on acceptance it creates the routine and its schedule with full lifecycle (hand-back anytime, approval ramp). Prefer this over schedule_create for recurring responsibilities. If the user named a time, pass it as `at` - the reply tells you the schedule that was actually compiled, so check it matches what they asked for before you go quiet. For a routine with MORE THAN ONE cadence (e.g. "check hourly, but only report once a day"), or several separate JOBS under one responsibility (e.g. "an hourly alert sweep AND a weekly health report"), or one job at several times of day (e.g. 08:00, 12:30 and 16:30), use `schedules` instead of the flat cadence_guess/at/day_of_week - one entry per schedule, each with its own cadence.',
49279
49313
  {
49280
49314
  name: external_exports.string().describe('Short routine name (e.g. "Morning inbox summary")'),
49281
49315
  description: external_exports.string().describe("What the routine does, self-contained (this text is shown to the user and becomes the routine prompt basis)"),
@@ -49303,14 +49337,21 @@ server.tool(
49303
49337
  schedules: external_exports.array(
49304
49338
  external_exports.object({
49305
49339
  role: external_exports.enum(["execute", "progress", "daily-report", "weekly-report"]).describe(
49306
- '"execute" does the actual work and is REQUIRED, exactly once. "progress" / "daily-report" / "weekly-report" are cheap narrations of what execute already did - they do not redo the work, they report on it, so only add one if the user actually wants a separate check-in on a different cadence from the work itself.'
49340
+ '"execute" does actual work: at least one is REQUIRED, and you may send several (ENG-11071) - each is its own job, or the same job at another time of day. "progress" / "daily-report" / "weekly-report" are cheap narrations of what the execute jobs already did - they do not redo the work, they report on it, at most one of each, so only add one if the user actually wants a separate check-in on a different cadence from the work itself.'
49341
+ ),
49342
+ // ENG-11071: a separate JOB inside one routine.
49343
+ name: external_exports.string().max(80).optional().describe(
49344
+ 'execute entries only: a short label for THIS job (e.g. "Alert sweep"), shown to the user next to its schedule. Omit when every execute entry does the same work (one job at several times of day).'
49345
+ ),
49346
+ instructions: external_exports.string().optional().describe(
49347
+ "execute entries only: what THIS job does, self-contained. Omit to use the routine's own description. Give each independent job its own instructions - the routine description is shared."
49307
49348
  ),
49308
49349
  cadence_guess: ROUTINE_CADENCE_GUESS.optional(),
49309
49350
  at: external_exports.string().optional().describe(`This entry's time of day, "HH:MM". Defaults to 09:00.`),
49310
49351
  day_of_week: external_exports.number().int().min(0).max(6).optional().describe(`This entry's weekday, for cadence_guess "weekly" only: 0 = Sunday .. 6 = Saturday.`)
49311
49352
  })
49312
49353
  ).optional().describe(
49313
- 'A schedule per role, for a routine that runs on more than one cadence. Exactly one entry must have role "execute". Example: hourly execute plus a daily report at 17:00 - [{role:"execute", cadence_guess:"hourly"}, {role:"daily-report", cadence_guess:"daily", at:"17:00"}]. Omit entirely for a routine with one job on one cadence and use the flat cadence_guess/at/day_of_week instead - simpler, and what most routines want.'
49354
+ 'One entry per schedule, for a routine that runs on more than one cadence (up to 8). At least one entry must have role "execute". Examples: hourly execute plus a daily report at 17:00 - [{role:"execute", cadence_guess:"hourly"}, {role:"daily-report", cadence_guess:"daily", at:"17:00"}]; two independent jobs - [{role:"execute", name:"Alert sweep", instructions:"...", cadence_guess:"hourly"}, {role:"execute", name:"Weekly health report", instructions:"...", cadence_guess:"weekly", at:"09:00", day_of_week:1}]. Omit entirely for a routine with one job on one cadence and use the flat cadence_guess/at/day_of_week instead - simpler, and what most routines want.'
49314
49355
  )
49315
49356
  },
49316
49357
  async ({ name, description, cadence_guess, at, timezone, day_of_week, schedules }) => {
@@ -49356,30 +49397,7 @@ server.tool(
49356
49397
  ]
49357
49398
  };
49358
49399
  }
49359
- const body = routines.map((r) => {
49360
- const when = r.cron ? `cron ${r.cron}` : r.every ? `every ${r.every}` : "no schedule";
49361
- const tz = r.timezone ? ` ${r.timezone}` : "";
49362
- const gated = r.requires_output_approval ? "\n approval: REQUIRED \u2014 call submit_routine_output instead of delivering directly" : "";
49363
- const pending = r.pending_revision ? `
49364
- revision pending since ${r.pending_revision.proposed_at}` + (r.pending_revision.summary ? ` \u2014 "${r.pending_revision.summary}"` : "") + (r.pending_revision.snoozed_until ? `
49365
- your manager chose "not now"; the card re-surfaces ${r.pending_revision.snoozed_until}` : "") + (r.pending_revision.review_url ? `
49366
- review: ${r.pending_revision.review_url}` : "") + "\n You cannot propose another revision of this routine until they resolve it. Call routine_proposal_status to read what is waiting." : "";
49367
- const others = (r.schedules ?? []).filter((s) => s.role !== "execute");
49368
- const otherLines = others.map((s) => {
49369
- const sWhen = s.cron ? `cron ${s.cron}` : s.every ? `every ${s.every}` : "no schedule";
49370
- const sTz = s.timezone ? ` ${s.timezone}` : "";
49371
- const off = s.enabled ? "" : " [disabled]";
49372
- return `
49373
- - ${s.role}: schedule_id ${s.schedule_id} (${sWhen}${sTz})${off}`;
49374
- }).join("");
49375
- const alsoRuns = others.length > 0 ? `
49376
- also runs:${otherLines}` : "";
49377
- return `\u2022 ${r.name} [${r.paused ? "paused by your manager - it will not run until they resume it" : r.status}] v${r.version}
49378
- routine_id: ${r.routine_id}
49379
- schedule_id: ${r.schedule_id ?? "(none \u2014 this routine has no runtime row)"} (${when}${tz})${gated}${pending}${alsoRuns}
49380
- prompt:
49381
- ${r.prompt ?? "(none)"}`;
49382
- }).join("\n\n");
49400
+ const body = routines.map(formatRoutineListEntry).join("\n\n");
49383
49401
  return {
49384
49402
  content: [
49385
49403
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1038",
3
+ "version": "0.28.1039",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {