@integrity-labs/agt-cli 0.27.21 → 0.27.23

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
@@ -27,7 +27,7 @@ import {
27
27
  success,
28
28
  table,
29
29
  warn
30
- } from "../chunk-UKZ7SN7K.js";
30
+ } from "../chunk-RM4XYPLD.js";
31
31
  import {
32
32
  CHANNEL_REGISTRY,
33
33
  DEPLOYMENT_TEMPLATES,
@@ -53,7 +53,7 @@ import {
53
53
  renderTemplate,
54
54
  resolveChannels,
55
55
  serializeManifestForSlackCli
56
- } from "../chunk-HT6EETEL.js";
56
+ } from "../chunk-6HFXSNNY.js";
57
57
 
58
58
  // src/bin/agt.ts
59
59
  import { join as join15 } from "path";
@@ -4643,7 +4643,7 @@ import { execFileSync, execSync } from "child_process";
4643
4643
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4644
4644
  import chalk18 from "chalk";
4645
4645
  import ora16 from "ora";
4646
- var cliVersion = true ? "0.27.21" : "dev";
4646
+ var cliVersion = true ? "0.27.23" : "dev";
4647
4647
  async function fetchLatestVersion() {
4648
4648
  const host2 = getHost();
4649
4649
  if (!host2) return null;
@@ -5175,7 +5175,7 @@ function handleError(err) {
5175
5175
  }
5176
5176
 
5177
5177
  // src/bin/agt.ts
5178
- var cliVersion2 = true ? "0.27.21" : "dev";
5178
+ var cliVersion2 = true ? "0.27.23" : "dev";
5179
5179
  var program = new Command();
5180
5180
  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");
5181
5181
  program.hook("preAction", (thisCommand) => {
@@ -1529,8 +1529,8 @@ var charter_frontmatter_v1_default = {
1529
1529
  },
1530
1530
  sender_policy: {
1531
1531
  type: "string",
1532
- enum: ["all", "agents_only", "team_agents_only"],
1533
- description: "Restricts which senders this agent processes. 'all' (default): anyone. 'agents_only': only Augmented-labelled agents. 'team_agents_only': only same-team Augmented agents. Enforced via message metadata labels in Slack and activity entity labels in Teams."
1532
+ enum: ["all", "agents_only", "team_agents_only", "manager_only"],
1533
+ description: "Restricts which senders this agent processes. 'all' (default): anyone. 'agents_only': only Augmented-labelled agents. 'team_agents_only': only same-team Augmented agents. 'manager_only' (ENG-5842): only the agent's reports_to_person OR same-team Augmented agents \u2014 narrows the human axis to one principal while keeping cross-agent coordination working. Enforced via message metadata labels (Slack/Teams) and principal-id env vars resolved at provision time."
1534
1534
  }
1535
1535
  },
1536
1536
  additionalProperties: false
@@ -2416,13 +2416,12 @@ function runChannelRules(charter, orgPolicy) {
2416
2416
  }
2417
2417
  if (orgPolicy?.sender_policy) {
2418
2418
  const orgMode = orgPolicy.sender_policy.mode;
2419
- const agentMode = channels.sender_policy ?? "all";
2420
- const rank = {
2421
- all: 0,
2422
- agents_only: 1,
2423
- team_agents_only: 2
2424
- };
2425
- if (!(agentMode in rank) || !(orgMode in rank)) {
2419
+ if (channels.sender_policy === void 0) {
2420
+ return diagnostics;
2421
+ }
2422
+ const agentMode = channels.sender_policy;
2423
+ const ranks = senderPolicyRanks();
2424
+ if (!(agentMode in ranks) || !(orgMode in ranks)) {
2426
2425
  diagnostics.push({
2427
2426
  file: "CHARTER.md",
2428
2427
  code: "CHARTER.CHANNELS.SENDER_POLICY_CONFLICT",
@@ -2430,18 +2429,32 @@ function runChannelRules(charter, orgPolicy) {
2430
2429
  severity: "error",
2431
2430
  message: `Invalid sender_policy mode (agent="${agentMode}", org="${orgMode}")`
2432
2431
  });
2433
- } else if (rank[agentMode] < rank[orgMode]) {
2434
- diagnostics.push({
2435
- file: "CHARTER.md",
2436
- code: "CHARTER.CHANNELS.SENDER_POLICY_CONFLICT",
2437
- path: "channels.sender_policy",
2438
- severity: "error",
2439
- message: `Agent sender_policy "${agentMode}" is less restrictive than the org policy "${orgMode}"`
2440
- });
2432
+ } else {
2433
+ const a = ranks[agentMode];
2434
+ const o = ranks[orgMode];
2435
+ if (a.humanRank < o.humanRank || a.agentRank < o.agentRank) {
2436
+ diagnostics.push({
2437
+ file: "CHARTER.md",
2438
+ code: "CHARTER.CHANNELS.SENDER_POLICY_CONFLICT",
2439
+ path: "channels.sender_policy",
2440
+ severity: "error",
2441
+ message: `Agent sender_policy "${agentMode}" is less restrictive than the org policy "${orgMode}"`
2442
+ });
2443
+ }
2441
2444
  }
2442
2445
  }
2443
2446
  return diagnostics;
2444
2447
  }
2448
+ function senderPolicyRanks() {
2449
+ return {
2450
+ all: { humanRank: 0, agentRank: 0 },
2451
+ agents_only: { humanRank: 1, agentRank: 0 },
2452
+ team_agents_only: { humanRank: 1, agentRank: 1 },
2453
+ // manager_only: stricter than team_agents_only on humans (only the
2454
+ // principal), same as team_agents_only on agents (same-team allowed).
2455
+ manager_only: { humanRank: 2, agentRank: 1 }
2456
+ };
2457
+ }
2445
2458
 
2446
2459
  // ../../packages/core/dist/lint/rules/cross-file.js
2447
2460
  function runCrossFileRules(charter, tools) {
@@ -3933,4 +3946,4 @@ export {
3933
3946
  attributeTranscriptUsageByRun,
3934
3947
  KANBAN_CHECK_COMMAND
3935
3948
  };
3936
- //# sourceMappingURL=chunk-HT6EETEL.js.map
3949
+ //# sourceMappingURL=chunk-6HFXSNNY.js.map