@integrity-labs/agt-cli 0.27.0 → 0.27.1

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.
@@ -1521,6 +1521,11 @@ var charter_frontmatter_v1_default = {
1521
1521
  require_approval_to_change: {
1522
1522
  type: "boolean",
1523
1523
  default: true
1524
+ },
1525
+ sender_policy: {
1526
+ type: "string",
1527
+ enum: ["all", "agents_only", "team_agents_only"],
1528
+ 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."
1524
1529
  }
1525
1530
  },
1526
1531
  additionalProperties: false
@@ -2404,6 +2409,32 @@ function runChannelRules(charter, orgPolicy) {
2404
2409
  }
2405
2410
  }
2406
2411
  }
2412
+ if (orgPolicy?.sender_policy) {
2413
+ const orgMode = orgPolicy.sender_policy.mode;
2414
+ const agentMode = channels.sender_policy ?? "all";
2415
+ const rank = {
2416
+ all: 0,
2417
+ agents_only: 1,
2418
+ team_agents_only: 2
2419
+ };
2420
+ if (!(agentMode in rank) || !(orgMode in rank)) {
2421
+ diagnostics.push({
2422
+ file: "CHARTER.md",
2423
+ code: "CHARTER.CHANNELS.SENDER_POLICY_CONFLICT",
2424
+ path: "channels.sender_policy",
2425
+ severity: "error",
2426
+ message: `Invalid sender_policy mode (agent="${agentMode}", org="${orgMode}")`
2427
+ });
2428
+ } else if (rank[agentMode] < rank[orgMode]) {
2429
+ diagnostics.push({
2430
+ file: "CHARTER.md",
2431
+ code: "CHARTER.CHANNELS.SENDER_POLICY_CONFLICT",
2432
+ path: "channels.sender_policy",
2433
+ severity: "error",
2434
+ message: `Agent sender_policy "${agentMode}" is less restrictive than the org policy "${orgMode}"`
2435
+ });
2436
+ }
2437
+ }
2407
2438
  return diagnostics;
2408
2439
  }
2409
2440
 
@@ -3896,4 +3927,4 @@ export {
3896
3927
  attributeTranscriptUsageByRun,
3897
3928
  KANBAN_CHECK_COMMAND
3898
3929
  };
3899
- //# sourceMappingURL=chunk-BKLEFKUZ.js.map
3930
+ //# sourceMappingURL=chunk-CTWY2X4S.js.map