@integrity-labs/agt-cli 0.19.16 → 0.19.18

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
@@ -50,7 +50,7 @@ import {
50
50
  success,
51
51
  table,
52
52
  warn
53
- } from "../chunk-NT26H4DO.js";
53
+ } from "../chunk-WTFROCJ3.js";
54
54
 
55
55
  // src/bin/agt.ts
56
56
  import { join as join10 } from "path";
@@ -3734,7 +3734,7 @@ import { execFileSync, execSync } from "child_process";
3734
3734
  import { existsSync as existsSync5, realpathSync } from "fs";
3735
3735
  import chalk17 from "chalk";
3736
3736
  import ora15 from "ora";
3737
- var cliVersion = true ? "0.19.16" : "dev";
3737
+ var cliVersion = true ? "0.19.18" : "dev";
3738
3738
  async function fetchLatestVersion() {
3739
3739
  const host2 = getHost();
3740
3740
  if (!host2) return null;
@@ -4192,7 +4192,7 @@ function handleError(err) {
4192
4192
  }
4193
4193
 
4194
4194
  // src/bin/agt.ts
4195
- var cliVersion2 = true ? "0.19.16" : "dev";
4195
+ var cliVersion2 = true ? "0.19.18" : "dev";
4196
4196
  var program = new Command();
4197
4197
  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");
4198
4198
  program.hook("preAction", (thisCommand) => {
@@ -4209,9 +4209,10 @@ function buildMcpJson(input) {
4209
4209
  if (hasXero) {
4210
4210
  mcpServers["xero"] = {
4211
4211
  command: "npx",
4212
- args: ["-y", "@xeroapi/xero-mcp-server@latest"],
4212
+ args: ["-y", "@integrity-labs/xero-mcp-server@latest"],
4213
4213
  env: {
4214
4214
  XERO_CLIENT_BEARER_TOKEN: "${XERO_ACCESS_TOKEN}",
4215
+ XERO_TENANT_ID: "${XERO_TENANT_ID}",
4215
4216
  PATH: process.env["PATH"] ?? "",
4216
4217
  HOME: process.env["HOME"] ?? ""
4217
4218
  }
@@ -4771,9 +4772,10 @@ ${sections}`
4771
4772
  if (hasXero) {
4772
4773
  this.writeMcpServer(codeName, "xero", {
4773
4774
  command: "npx",
4774
- args: ["-y", "@xeroapi/xero-mcp-server@latest"],
4775
+ args: ["-y", "@integrity-labs/xero-mcp-server@latest"],
4775
4776
  env: {
4776
4777
  XERO_CLIENT_BEARER_TOKEN: "${XERO_ACCESS_TOKEN}",
4778
+ XERO_TENANT_ID: "${XERO_TENANT_ID}",
4777
4779
  PATH: process.env["PATH"] ?? "",
4778
4780
  HOME: process.env["HOME"] ?? ""
4779
4781
  }
@@ -6522,6 +6524,36 @@ var charter_frontmatter_v1_default = {
6522
6524
  },
6523
6525
  additionalProperties: false
6524
6526
  },
6527
+ multi_agent: {
6528
+ type: "object",
6529
+ description: "ENG-4465: per-agent peer-collaboration registry. Today only telegram_peers; other channels may follow.",
6530
+ properties: {
6531
+ telegram_peers: {
6532
+ type: "array",
6533
+ description: "Agents this agent may collaborate with via Telegram Bot-to-Bot Mode. bot_id is the immutable from.id of the peer's Telegram bot; code_name is for humans.",
6534
+ items: {
6535
+ type: "object",
6536
+ required: [
6537
+ "code_name",
6538
+ "bot_id"
6539
+ ],
6540
+ properties: {
6541
+ code_name: {
6542
+ type: "string",
6543
+ pattern: "^[a-z0-9]+(-[a-z0-9]+)*$"
6544
+ },
6545
+ bot_id: {
6546
+ type: "integer",
6547
+ exclusiveMinimum: 0
6548
+ }
6549
+ },
6550
+ additionalProperties: false
6551
+ },
6552
+ uniqueItems: true
6553
+ }
6554
+ },
6555
+ additionalProperties: false
6556
+ },
6525
6557
  tools: {
6526
6558
  type: "object",
6527
6559
  description: "ENG-4588: gates on agent-driven actions (currently the skill-management MCP tools).",
@@ -6907,6 +6939,9 @@ function generateCharterMd(input) {
6907
6939
  created: today,
6908
6940
  last_updated: today
6909
6941
  };
6942
+ if (input.telegram_peers && input.telegram_peers.length > 0) {
6943
+ frontmatter.multi_agent = { telegram_peers: input.telegram_peers };
6944
+ }
6910
6945
  const yaml = stringifyYaml2(frontmatter, { lineWidth: 0 });
6911
6946
  const desc = input.description ?? "";
6912
6947
  const roleDisplay = input.role ?? "";
@@ -7241,6 +7276,59 @@ function runCrossFileRules(charter, tools) {
7241
7276
  return diagnostics;
7242
7277
  }
7243
7278
 
7279
+ // ../../packages/core/dist/lint/rules/multi-agent.js
7280
+ function runMultiAgentRules(charter, teamPeers) {
7281
+ const diagnostics = [];
7282
+ const peers = charter.multi_agent?.telegram_peers;
7283
+ if (!peers || peers.length === 0) {
7284
+ return diagnostics;
7285
+ }
7286
+ for (let i = 0; i < peers.length; i++) {
7287
+ const peer = peers[i];
7288
+ const path = `multi_agent.telegram_peers[${i}]`;
7289
+ const match = teamPeers.find((p) => p.telegram_bot_id === peer.bot_id);
7290
+ if (peer.code_name === charter.code_name || match?.agent_id === charter.agent_id) {
7291
+ diagnostics.push({
7292
+ file: "CHARTER.md",
7293
+ code: "CHARTER.MULTI_AGENT.SELF_PEER",
7294
+ path,
7295
+ severity: "error",
7296
+ message: `Agent "${charter.code_name}" cannot list itself as a peer`
7297
+ });
7298
+ continue;
7299
+ }
7300
+ if (!match) {
7301
+ diagnostics.push({
7302
+ file: "CHARTER.md",
7303
+ code: "CHARTER.MULTI_AGENT.UNKNOWN_PEER",
7304
+ path,
7305
+ severity: "error",
7306
+ message: `No agent on this team has a Telegram bot with bot_id ${peer.bot_id} (declared peer "${peer.code_name}")`
7307
+ });
7308
+ continue;
7309
+ }
7310
+ if (match.code_name !== peer.code_name) {
7311
+ diagnostics.push({
7312
+ file: "CHARTER.md",
7313
+ code: "CHARTER.MULTI_AGENT.CODE_NAME_MISMATCH",
7314
+ path,
7315
+ severity: "warning",
7316
+ message: `bot_id ${peer.bot_id} belongs to agent "${match.code_name}", but is listed under code_name "${peer.code_name}"`
7317
+ });
7318
+ }
7319
+ if (match.telegram_peer_agent_mode === null || match.telegram_peer_agent_mode === "off") {
7320
+ diagnostics.push({
7321
+ file: "CHARTER.md",
7322
+ code: "CHARTER.MULTI_AGENT.PEER_OPTED_OUT",
7323
+ path,
7324
+ severity: "error",
7325
+ message: `Peer "${match.code_name}" has peer_agent_mode "${match.telegram_peer_agent_mode ?? "unset"}"; set it to 'listen' or 'respond' on that agent's Telegram channel config`
7326
+ });
7327
+ }
7328
+ }
7329
+ return diagnostics;
7330
+ }
7331
+
7244
7332
  // ../../packages/core/dist/lint/engine.js
7245
7333
  function buildResult(diagnostics) {
7246
7334
  const errors = diagnostics.filter((d) => d.severity === "error");
@@ -7274,6 +7362,9 @@ function lintCharter(content, ctx = {}) {
7274
7362
  if (schemaResult.valid && schemaResult.data) {
7275
7363
  diagnostics.push(...runSemanticRules("CHARTER.md", schemaResult.data));
7276
7364
  diagnostics.push(...runChannelRules(schemaResult.data, ctx.orgChannelPolicy));
7365
+ if (ctx.teamPeers !== void 0) {
7366
+ diagnostics.push(...runMultiAgentRules(schemaResult.data, ctx.teamPeers));
7367
+ }
7277
7368
  }
7278
7369
  return buildResult(diagnostics);
7279
7370
  }
@@ -8517,4 +8608,4 @@ export {
8517
8608
  managerInstallSystemUnitCommand,
8518
8609
  managerUninstallSystemUnitCommand
8519
8610
  };
8520
- //# sourceMappingURL=chunk-NT26H4DO.js.map
8611
+ //# sourceMappingURL=chunk-WTFROCJ3.js.map