@integrity-labs/agt-cli 0.28.690 → 0.28.691

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-KNGLJ5PP.js";
43
+ } from "../chunk-ZY57BJYH.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
46
  } from "../chunk-XF2B7JHC.js";
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.690" : "dev";
4912
+ var cliVersion = true ? "0.28.691" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.690" : "dev";
6092
+ var cliVersion2 = true ? "0.28.691" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6526,7 +6526,7 @@ function exchangeFailureKind(err) {
6526
6526
  }
6527
6527
 
6528
6528
  // src/lib/api-client.ts
6529
- var agtCliVersion = true ? "0.28.690" : "dev";
6529
+ var agtCliVersion = true ? "0.28.691" : "dev";
6530
6530
  var lastConfigHash = null;
6531
6531
  function setConfigHash(hash) {
6532
6532
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10268,4 +10268,4 @@ export {
10268
10268
  managerInstallSystemUnitCommand,
10269
10269
  managerUninstallSystemUnitCommand
10270
10270
  };
10271
- //# sourceMappingURL=chunk-KNGLJ5PP.js.map
10271
+ //# sourceMappingURL=chunk-ZY57BJYH.js.map
@@ -55,7 +55,7 @@ import {
55
55
  setConfigHash,
56
56
  setSecretFileTmpfsBacking,
57
57
  tripClass
58
- } from "../chunk-KNGLJ5PP.js";
58
+ } from "../chunk-ZY57BJYH.js";
59
59
  import {
60
60
  getProjectDir as getProjectDir2,
61
61
  getReadyTasks,
@@ -12403,7 +12403,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12403
12403
  var lastVersionCheckAt = 0;
12404
12404
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12405
12405
  var lastResponsivenessProbeAt = 0;
12406
- var agtCliVersion = true ? "0.28.690" : "dev";
12406
+ var agtCliVersion = true ? "0.28.691" : "dev";
12407
12407
  function resolveBrewPath(execFileSync3) {
12408
12408
  try {
12409
12409
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -45810,11 +45810,61 @@ server.tool(
45810
45810
  return { content: [{ type: "text", text: data.message ?? `Offer ${data.offer_id} filed.` }] };
45811
45811
  }
45812
45812
  );
45813
+ server.tool(
45814
+ "routine_list",
45815
+ "List the routines YOU own - the recurring responsibilities a human accepted on your behalf. Call this FIRST whenever you need a routine_id: routine_revise and submit_routine_output both require one, and this is the only tool that produces it. Each entry gives you the routine_id, its name and status, the schedule it runs on (id, cron, timezone), its version, whether it owes a submit_routine_output call, and its FULL current prompt. The prompt is complete and untruncated on purpose: routine_revise replaces a routine's substance wholesale, so anything missing from what you read is missing from what you write. Read it here before revising rather than reconstructing it from memory. Returns an empty list if you own none - that is an answer, not an error.",
45816
+ {},
45817
+ async () => {
45818
+ try {
45819
+ const data = await apiPost("/host/routines/list", { agent_id: AGT_AGENT_ID }, false, 15e3, "routine_list", true);
45820
+ if (!data.ok) {
45821
+ return { content: [{ type: "text", text: data.error ?? "Could not list routines." }] };
45822
+ }
45823
+ const routines = data.routines ?? [];
45824
+ if (routines.length === 0) {
45825
+ return {
45826
+ content: [
45827
+ {
45828
+ type: "text",
45829
+ text: "You own no routines. A routine is created when you propose one with routine_propose and a human accepts it."
45830
+ }
45831
+ ]
45832
+ };
45833
+ }
45834
+ const body = routines.map((r) => {
45835
+ const when = r.cron ? `cron ${r.cron}` : r.every ? `every ${r.every}` : "no schedule";
45836
+ const tz = r.timezone ? ` ${r.timezone}` : "";
45837
+ const gated = r.requires_output_approval ? "\n approval: REQUIRED \u2014 call submit_routine_output instead of delivering directly" : "";
45838
+ return `\u2022 ${r.name} [${r.status}] v${r.version}
45839
+ routine_id: ${r.routine_id}
45840
+ schedule_id: ${r.schedule_id ?? "(none \u2014 this routine has no runtime row)"} (${when}${tz})${gated}
45841
+ prompt:
45842
+ ${r.prompt ?? "(none)"}`;
45843
+ }).join("\n\n");
45844
+ return {
45845
+ content: [
45846
+ {
45847
+ type: "text",
45848
+ text: `${routines.length} routine${routines.length === 1 ? "" : "s"} you own:
45849
+
45850
+ ${body}`
45851
+ }
45852
+ ]
45853
+ };
45854
+ } catch (err) {
45855
+ const msg = err instanceof Error ? err.message : String(err);
45856
+ return {
45857
+ content: [{ type: "text", text: `Could not list your routines: ${msg}` }],
45858
+ isError: true
45859
+ };
45860
+ }
45861
+ }
45862
+ );
45813
45863
  server.tool(
45814
45864
  "routine_revise",
45815
45865
  "Propose a CORRECTION to a routine you already own, for your manager to accept or decline. Use this when a routine you run is wrong: bad instructions, a gate that never fires, a step that no longer applies, or a defect you spotted before it ever ran. This is the only way to change what a routine DOES - schedule_update deliberately refuses prompt edits, and it will point you here. It does NOT change when the routine runs: to retime it, send only schedule fields to schedule_update instead. Nothing changes until your manager accepts: they get an accept/decline card, and the live routine keeps running as-is until they tap. On acceptance the SAME routine is updated in place - no duplicate is created. Pass the full replacement description, not a diff or a patch: it replaces the routine's substance wholesale, so anything you leave out is gone.",
45816
45866
  {
45817
- routine_id: external_exports.string().trim().min(1).describe("The id of the routine to revise. It must be a routine YOU own; anything else reads as not-found."),
45867
+ routine_id: external_exports.string().trim().min(1).describe("The routine to revise. Get this from routine_list. A schedule_id from schedule_list is also accepted and resolved server-side. It must be a routine YOU own; anything else reads as not-found."),
45818
45868
  description: external_exports.string().trim().min(1).describe(
45819
45869
  "The FULL replacement description - what the routine should do, from scratch. This becomes the routine's instructions verbatim, so write it as a complete brief rather than as a change to the old one. Anything you omit is removed."
45820
45870
  ),
@@ -45852,7 +45902,7 @@ server.tool(
45852
45902
  content: [
45853
45903
  {
45854
45904
  type: "text",
45855
- text: notFound ? `Could not revise: no routine "${params.routine_id}" that you own. Check the id - you can only revise routines that are yours.` : `Could not propose the revision: ${msg}`
45905
+ text: notFound ? `Could not revise: nothing matched "${params.routine_id}". Call routine_list to get the routine_id \u2014 it also accepts a schedule_id from schedule_list.` : `Could not propose the revision: ${msg}`
45856
45906
  }
45857
45907
  ],
45858
45908
  isError: true
@@ -46604,6 +46654,8 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
46604
46654
  "routine_propose",
46605
46655
  // ENG-9392: the correction half of routine_propose.
46606
46656
  "routine_revise",
46657
+ // ENG-9431: the discovery primitive both of the above depend on.
46658
+ "routine_list",
46607
46659
  "knowledge_list",
46608
46660
  "knowledge_add",
46609
46661
  "knowledge_update",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.690",
3
+ "version": "0.28.691",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {