@integrity-labs/agt-cli 0.28.853 → 0.28.855

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.
Files changed (24) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-XCAI3GSF.js → chunk-7YVKIYVW.js} +2 -2
  3. package/dist/{chunk-WUXQVP7A.js → chunk-IHBWFKOW.js} +172 -3
  4. package/dist/chunk-IHBWFKOW.js.map +1 -0
  5. package/dist/{chunk-6BA2US4B.js → chunk-RKCG63PT.js} +4 -4
  6. package/dist/{claude-pair-runtime-CJXQTVSC.js → claude-pair-runtime-FFUPKRVC.js} +2 -2
  7. package/dist/lib/manager-worker.js +37 -21
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +133 -0
  10. package/dist/mcp/index.js +133 -0
  11. package/dist/mcp/origami.js +133 -0
  12. package/dist/mcp/slack-channel.js +133 -0
  13. package/dist/mcp/telegram-channel.js +133 -0
  14. package/dist/{persistent-session-YGK7YHPR.js → persistent-session-CNVU25IF.js} +3 -3
  15. package/dist/{responsiveness-probe-NGWO3JK3.js → responsiveness-probe-TZOKOH6C.js} +3 -3
  16. package/dist/{session-auth-dead-4UZR5655.js → session-auth-dead-GRYXFDYD.js} +2 -2
  17. package/package.json +1 -1
  18. package/dist/chunk-WUXQVP7A.js.map +0 -1
  19. /package/dist/{chunk-XCAI3GSF.js.map → chunk-7YVKIYVW.js.map} +0 -0
  20. /package/dist/{chunk-6BA2US4B.js.map → chunk-RKCG63PT.js.map} +0 -0
  21. /package/dist/{claude-pair-runtime-CJXQTVSC.js.map → claude-pair-runtime-FFUPKRVC.js.map} +0 -0
  22. /package/dist/{persistent-session-YGK7YHPR.js.map → persistent-session-CNVU25IF.js.map} +0 -0
  23. /package/dist/{responsiveness-probe-NGWO3JK3.js.map → responsiveness-probe-TZOKOH6C.js.map} +0 -0
  24. /package/dist/{session-auth-dead-4UZR5655.js.map → session-auth-dead-GRYXFDYD.js.map} +0 -0
@@ -31462,6 +31462,110 @@ var HOURLY_BY_REGION = {
31462
31462
  };
31463
31463
  var KNOWN_PRICING_REGIONS = Object.keys(HOURLY_BY_REGION);
31464
31464
 
31465
+ // ../core/dist/guardrails/enforcer-registry.js
31466
+ var GUARDRAIL_ENFORCERS = [
31467
+ // ---- Enforced: this definition has its own enforcement point -------------
31468
+ {
31469
+ id: "email.domain_restrict",
31470
+ mechanism: "enforced",
31471
+ stage: "live",
31472
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
31473
+ effect: "enforceEmailDomainGuard runs at the top of both agent-egress paths; internal_only with zero verified domains takes an explicit AUDITED no-op branch rather than failing open silently."
31474
+ },
31475
+ {
31476
+ // MEASURED, and it corrects a claim ADR-0080 makes about this definition.
31477
+ //
31478
+ // The ADR reports calendar as `enforced` + `stage: 'shadow'`, blocked by
31479
+ // ENG-5868 (caller identity is not threaded to `callIntegrationTool`). Read
31480
+ // literally that says an org cannot get redaction today, and that is not
31481
+ // what the code does. `decideCalendarRedactionMode` (calendar-policy.ts) is
31482
+ // FAIL-CLOSED: with the caller unresolvable it returns `redact`, not
31483
+ // pass-through. `redactCalendarToolResponseIfNeeded` then calls
31484
+ // `applyRedactionToResponse` for every response whenever `config.stage` is
31485
+ // `enforce`. So an org that sets the stage gets real redaction — ENG-5868
31486
+ // costs the control its PRECISION (it cannot spare the principal), not its
31487
+ // ability to act.
31488
+ //
31489
+ // The stage is therefore per-ORG configuration, which ADR-0080 decision 1
31490
+ // is explicit is the effectiveness axis the static union deliberately does
31491
+ // not carry. `effectiveCalendarEnforcement` in the CLAUDE.md renderer owns
31492
+ // it, and since ENG-10104 caps `enforce` to `warn` whenever the org's stage
31493
+ // is not `enforce`.
31494
+ id: "calendar.confidentiality",
31495
+ mechanism: "enforced",
31496
+ stage: "live",
31497
+ enforcer: "packages/api/src/lib/calendar-confidentiality-guard.ts",
31498
+ effect: "at config.stage=enforce, redacts summary/description/attendees/location out of calendar read responses; at shadow/warn it writes a would_redact audit row and returns the response unchanged."
31499
+ },
31500
+ // ---- Delegated: read by another definition's enforcement point -----------
31501
+ //
31502
+ // Both can block, because their owner's point is live — which is the question
31503
+ // `guardrailCanBlock` asks and the right answer to it. It is NOT the whole
31504
+ // story for these two, and the gap has its own ticket: the org's email guard
31505
+ // STAGE is threaded into the prompt shape for `email.domain_restrict`'s id
31506
+ // alone (`host-runtime.ts`, the ENG-7829 fix), so a row of either id stored at
31507
+ // `enforce` on a shadow-stage org still renders under "must comply" with
31508
+ // nothing capping it. That is the effectiveness axis, not the mechanism one —
31509
+ // ENG-10110.
31510
+ {
31511
+ id: "email.require_approval",
31512
+ mechanism: "delegated",
31513
+ ownedBy: "email.domain_restrict",
31514
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
31515
+ effect: "routes a send to an approver instead of letting it leave."
31516
+ },
31517
+ {
31518
+ id: "email.mail_rules",
31519
+ mechanism: "delegated",
31520
+ ownedBy: "email.domain_restrict",
31521
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
31522
+ effect: "gates mail-rule creation/modification on the same egress path."
31523
+ },
31524
+ // ---- Advisory: seeded, applied, rendered — and read by nothing -----------
31525
+ //
31526
+ // These are NOT dead config. They are presented to operators in the console
31527
+ // and to agents in CLAUDE.md, three of them under a heading that promises the
31528
+ // violation is blocked. Listed individually rather than as a wildcard so that
31529
+ // fixing one is a one-line diff from `advisory` to `enforced`.
31530
+ //
31531
+ // The ticket is ENG-9800, not ENG-9874. ENG-9874 catalogued these and is
31532
+ // closed; a closed ticket tracks nothing, which is the same shrug an absent
31533
+ // one would be. ENG-9800 is the open sweep that owns making them real.
31534
+ {
31535
+ id: "require-approval-for-actions",
31536
+ mechanism: "advisory",
31537
+ reason: "unimplemented",
31538
+ ticket: "ENG-9800",
31539
+ note: `Rendered to agents as "violation blocks the action". Nothing reads it. The ENG-8562 incident is this guardrail's promise, unkept.`
31540
+ },
31541
+ {
31542
+ id: "data.pii_access",
31543
+ mechanism: "advisory",
31544
+ reason: "unimplemented",
31545
+ ticket: "ENG-9800",
31546
+ note: "Rendered as Enforced with block_export semantics; no export path consults it."
31547
+ },
31548
+ {
31549
+ id: "data.credential_access",
31550
+ mechanism: "advisory",
31551
+ reason: "unimplemented",
31552
+ ticket: "ENG-9800",
31553
+ note: "Rendered as Enforced with block_read/block_write; no credential path consults it."
31554
+ },
31555
+ { id: "comm.social_posting", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31556
+ { id: "compliance.audit_all", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31557
+ { id: "no-external-network", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31558
+ { id: "no-pii-in-output", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31559
+ { id: "restrict-file-access", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31560
+ { id: "schedule.operating_hours", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31561
+ { id: "spend.hourly_limit", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31562
+ { id: "tool.allow_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31563
+ { id: "tool.block_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31564
+ { id: "tool.financial_txn", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
31565
+ { id: "working-hours-only", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" }
31566
+ ];
31567
+ var BY_ID = new Map(GUARDRAIL_ENFORCERS.map((e) => [e.id, e]));
31568
+
31465
31569
  // ../core/dist/provisioning/frameworks/claudecode/agent-rules.js
31466
31570
  var MAX_AGENT_RULES = 8;
31467
31571
  var MAX_AGENT_RULE_CHARS = 200;
@@ -36112,6 +36216,35 @@ var FLAG_REGISTRY = [
36112
36216
  defaultValue: false,
36113
36217
  envVar: "AGT_MODEL_API_ERROR_REPORTING_ENABLED"
36114
36218
  },
36219
+ {
36220
+ key: "model-policy-failover-trigger",
36221
+ description: "Automatic model-policy failover (ENG-10156, ADR-0074). off = the trigger does not run. shadow = it evaluates every ingested model-API error against the policy's failover_trigger config and LOGS the decision with its inputs, acting on nothing. Enum gate; ships OFF.",
36222
+ flagType: "enum",
36223
+ // `armed` is DELIBERATELY not an allowed value yet.
36224
+ //
36225
+ // Nothing writes model_policy_failover_state with source='auto' — that is
36226
+ // the actuation half, and it is gated behind a recorded shadow soak
36227
+ // (ENG-10156 AC8). Offering `armed` now would be a setting an operator can
36228
+ // select, that reports success, and that does nothing: the failure mode is
36229
+ // worse than the missing feature, because it looks like a fleet running
36230
+ // with automatic failover enabled. Add it in the same change that makes it
36231
+ // act, not before.
36232
+ allowedValues: ["off", "shadow"],
36233
+ // OFF, not `shadow`, and the contrast with `channel-quarantine-mode` is the
36234
+ // reason: that flag defaults to `shadow` because shadow WAS the live
36235
+ // manager's compiled behaviour, so anything else would have changed the
36236
+ // fleet. Here there is no incumbent behaviour to preserve — nothing has ever
36237
+ // evaluated this — so `off` is the honest default and turning shadow on is a
36238
+ // deliberate act with a soak attached to it.
36239
+ defaultValue: "off",
36240
+ envVar: "AGT_MODEL_POLICY_FAILOVER_TRIGGER_MODE",
36241
+ // Marked sensitive ahead of `armed` existing: the value this flag will
36242
+ // eventually carry moves a host onto a secondary binding whose credential
36243
+ // may be ours (credential_owner: 'platform'), i.e. it spends money with no
36244
+ // human in the loop. Declaring that now costs nothing and means the audited
36245
+ // -flip behaviour is already in place on the day the value is added.
36246
+ sensitive: true
36247
+ },
36115
36248
  {
36116
36249
  key: "claude-md-skills-index",
36117
36250
  description: `Manager injects the "## Available Skills" bullet list (one line per installed skill, name + frontmatter description) into the agent's project CLAUDE.md. Claude Code already surfaces installed skills to the model natively from .claude/skills/*/SKILL.md, so on current models the list is duplicated context - and an expensive one: it measured 12,045 chars across 29 skills on a prod agent, pushing project/CLAUDE.md to 51k against Claude Code's 40,000-char ceiling, past which the tail of the agent's own system prompt is silently truncated. OFF suppresses ONLY the skill bullets; the "Updating Integrations" guidance in the same managed block is real instruction and is always kept. Defaults ON (today's behaviour) - flip OFF per org to reclaim the headroom.`,
package/dist/mcp/index.js CHANGED
@@ -24011,6 +24011,110 @@ var HOURLY_BY_REGION = {
24011
24011
  };
24012
24012
  var KNOWN_PRICING_REGIONS = Object.keys(HOURLY_BY_REGION);
24013
24013
 
24014
+ // ../core/dist/guardrails/enforcer-registry.js
24015
+ var GUARDRAIL_ENFORCERS = [
24016
+ // ---- Enforced: this definition has its own enforcement point -------------
24017
+ {
24018
+ id: "email.domain_restrict",
24019
+ mechanism: "enforced",
24020
+ stage: "live",
24021
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
24022
+ effect: "enforceEmailDomainGuard runs at the top of both agent-egress paths; internal_only with zero verified domains takes an explicit AUDITED no-op branch rather than failing open silently."
24023
+ },
24024
+ {
24025
+ // MEASURED, and it corrects a claim ADR-0080 makes about this definition.
24026
+ //
24027
+ // The ADR reports calendar as `enforced` + `stage: 'shadow'`, blocked by
24028
+ // ENG-5868 (caller identity is not threaded to `callIntegrationTool`). Read
24029
+ // literally that says an org cannot get redaction today, and that is not
24030
+ // what the code does. `decideCalendarRedactionMode` (calendar-policy.ts) is
24031
+ // FAIL-CLOSED: with the caller unresolvable it returns `redact`, not
24032
+ // pass-through. `redactCalendarToolResponseIfNeeded` then calls
24033
+ // `applyRedactionToResponse` for every response whenever `config.stage` is
24034
+ // `enforce`. So an org that sets the stage gets real redaction — ENG-5868
24035
+ // costs the control its PRECISION (it cannot spare the principal), not its
24036
+ // ability to act.
24037
+ //
24038
+ // The stage is therefore per-ORG configuration, which ADR-0080 decision 1
24039
+ // is explicit is the effectiveness axis the static union deliberately does
24040
+ // not carry. `effectiveCalendarEnforcement` in the CLAUDE.md renderer owns
24041
+ // it, and since ENG-10104 caps `enforce` to `warn` whenever the org's stage
24042
+ // is not `enforce`.
24043
+ id: "calendar.confidentiality",
24044
+ mechanism: "enforced",
24045
+ stage: "live",
24046
+ enforcer: "packages/api/src/lib/calendar-confidentiality-guard.ts",
24047
+ effect: "at config.stage=enforce, redacts summary/description/attendees/location out of calendar read responses; at shadow/warn it writes a would_redact audit row and returns the response unchanged."
24048
+ },
24049
+ // ---- Delegated: read by another definition's enforcement point -----------
24050
+ //
24051
+ // Both can block, because their owner's point is live — which is the question
24052
+ // `guardrailCanBlock` asks and the right answer to it. It is NOT the whole
24053
+ // story for these two, and the gap has its own ticket: the org's email guard
24054
+ // STAGE is threaded into the prompt shape for `email.domain_restrict`'s id
24055
+ // alone (`host-runtime.ts`, the ENG-7829 fix), so a row of either id stored at
24056
+ // `enforce` on a shadow-stage org still renders under "must comply" with
24057
+ // nothing capping it. That is the effectiveness axis, not the mechanism one —
24058
+ // ENG-10110.
24059
+ {
24060
+ id: "email.require_approval",
24061
+ mechanism: "delegated",
24062
+ ownedBy: "email.domain_restrict",
24063
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
24064
+ effect: "routes a send to an approver instead of letting it leave."
24065
+ },
24066
+ {
24067
+ id: "email.mail_rules",
24068
+ mechanism: "delegated",
24069
+ ownedBy: "email.domain_restrict",
24070
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
24071
+ effect: "gates mail-rule creation/modification on the same egress path."
24072
+ },
24073
+ // ---- Advisory: seeded, applied, rendered — and read by nothing -----------
24074
+ //
24075
+ // These are NOT dead config. They are presented to operators in the console
24076
+ // and to agents in CLAUDE.md, three of them under a heading that promises the
24077
+ // violation is blocked. Listed individually rather than as a wildcard so that
24078
+ // fixing one is a one-line diff from `advisory` to `enforced`.
24079
+ //
24080
+ // The ticket is ENG-9800, not ENG-9874. ENG-9874 catalogued these and is
24081
+ // closed; a closed ticket tracks nothing, which is the same shrug an absent
24082
+ // one would be. ENG-9800 is the open sweep that owns making them real.
24083
+ {
24084
+ id: "require-approval-for-actions",
24085
+ mechanism: "advisory",
24086
+ reason: "unimplemented",
24087
+ ticket: "ENG-9800",
24088
+ note: `Rendered to agents as "violation blocks the action". Nothing reads it. The ENG-8562 incident is this guardrail's promise, unkept.`
24089
+ },
24090
+ {
24091
+ id: "data.pii_access",
24092
+ mechanism: "advisory",
24093
+ reason: "unimplemented",
24094
+ ticket: "ENG-9800",
24095
+ note: "Rendered as Enforced with block_export semantics; no export path consults it."
24096
+ },
24097
+ {
24098
+ id: "data.credential_access",
24099
+ mechanism: "advisory",
24100
+ reason: "unimplemented",
24101
+ ticket: "ENG-9800",
24102
+ note: "Rendered as Enforced with block_read/block_write; no credential path consults it."
24103
+ },
24104
+ { id: "comm.social_posting", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24105
+ { id: "compliance.audit_all", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24106
+ { id: "no-external-network", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24107
+ { id: "no-pii-in-output", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24108
+ { id: "restrict-file-access", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24109
+ { id: "schedule.operating_hours", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24110
+ { id: "spend.hourly_limit", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24111
+ { id: "tool.allow_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24112
+ { id: "tool.block_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24113
+ { id: "tool.financial_txn", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
24114
+ { id: "working-hours-only", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" }
24115
+ ];
24116
+ var BY_ID = new Map(GUARDRAIL_ENFORCERS.map((e) => [e.id, e]));
24117
+
24014
24118
  // ../core/dist/provisioning/frameworks/claudecode/agent-rules.js
24015
24119
  var MAX_AGENT_RULES = 8;
24016
24120
  var MAX_AGENT_RULE_CHARS = 200;
@@ -28382,6 +28486,35 @@ var FLAG_REGISTRY = [
28382
28486
  defaultValue: false,
28383
28487
  envVar: "AGT_MODEL_API_ERROR_REPORTING_ENABLED"
28384
28488
  },
28489
+ {
28490
+ key: "model-policy-failover-trigger",
28491
+ description: "Automatic model-policy failover (ENG-10156, ADR-0074). off = the trigger does not run. shadow = it evaluates every ingested model-API error against the policy's failover_trigger config and LOGS the decision with its inputs, acting on nothing. Enum gate; ships OFF.",
28492
+ flagType: "enum",
28493
+ // `armed` is DELIBERATELY not an allowed value yet.
28494
+ //
28495
+ // Nothing writes model_policy_failover_state with source='auto' — that is
28496
+ // the actuation half, and it is gated behind a recorded shadow soak
28497
+ // (ENG-10156 AC8). Offering `armed` now would be a setting an operator can
28498
+ // select, that reports success, and that does nothing: the failure mode is
28499
+ // worse than the missing feature, because it looks like a fleet running
28500
+ // with automatic failover enabled. Add it in the same change that makes it
28501
+ // act, not before.
28502
+ allowedValues: ["off", "shadow"],
28503
+ // OFF, not `shadow`, and the contrast with `channel-quarantine-mode` is the
28504
+ // reason: that flag defaults to `shadow` because shadow WAS the live
28505
+ // manager's compiled behaviour, so anything else would have changed the
28506
+ // fleet. Here there is no incumbent behaviour to preserve — nothing has ever
28507
+ // evaluated this — so `off` is the honest default and turning shadow on is a
28508
+ // deliberate act with a soak attached to it.
28509
+ defaultValue: "off",
28510
+ envVar: "AGT_MODEL_POLICY_FAILOVER_TRIGGER_MODE",
28511
+ // Marked sensitive ahead of `armed` existing: the value this flag will
28512
+ // eventually carry moves a host onto a secondary binding whose credential
28513
+ // may be ours (credential_owner: 'platform'), i.e. it spends money with no
28514
+ // human in the loop. Declaring that now costs nothing and means the audited
28515
+ // -flip behaviour is already in place on the day the value is added.
28516
+ sensitive: true
28517
+ },
28385
28518
  {
28386
28519
  key: "claude-md-skills-index",
28387
28520
  description: `Manager injects the "## Available Skills" bullet list (one line per installed skill, name + frontmatter description) into the agent's project CLAUDE.md. Claude Code already surfaces installed skills to the model natively from .claude/skills/*/SKILL.md, so on current models the list is duplicated context - and an expensive one: it measured 12,045 chars across 29 skills on a prod agent, pushing project/CLAUDE.md to 51k against Claude Code's 40,000-char ceiling, past which the tail of the agent's own system prompt is silently truncated. OFF suppresses ONLY the skill bullets; the "Updating Integrations" guidance in the same managed block is real instruction and is always kept. Defaults ON (today's behaviour) - flip OFF per org to reclaim the headroom.`,
@@ -38167,6 +38167,110 @@ var HOURLY_BY_REGION = {
38167
38167
  };
38168
38168
  var KNOWN_PRICING_REGIONS = Object.keys(HOURLY_BY_REGION);
38169
38169
 
38170
+ // ../core/dist/guardrails/enforcer-registry.js
38171
+ var GUARDRAIL_ENFORCERS = [
38172
+ // ---- Enforced: this definition has its own enforcement point -------------
38173
+ {
38174
+ id: "email.domain_restrict",
38175
+ mechanism: "enforced",
38176
+ stage: "live",
38177
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
38178
+ effect: "enforceEmailDomainGuard runs at the top of both agent-egress paths; internal_only with zero verified domains takes an explicit AUDITED no-op branch rather than failing open silently."
38179
+ },
38180
+ {
38181
+ // MEASURED, and it corrects a claim ADR-0080 makes about this definition.
38182
+ //
38183
+ // The ADR reports calendar as `enforced` + `stage: 'shadow'`, blocked by
38184
+ // ENG-5868 (caller identity is not threaded to `callIntegrationTool`). Read
38185
+ // literally that says an org cannot get redaction today, and that is not
38186
+ // what the code does. `decideCalendarRedactionMode` (calendar-policy.ts) is
38187
+ // FAIL-CLOSED: with the caller unresolvable it returns `redact`, not
38188
+ // pass-through. `redactCalendarToolResponseIfNeeded` then calls
38189
+ // `applyRedactionToResponse` for every response whenever `config.stage` is
38190
+ // `enforce`. So an org that sets the stage gets real redaction — ENG-5868
38191
+ // costs the control its PRECISION (it cannot spare the principal), not its
38192
+ // ability to act.
38193
+ //
38194
+ // The stage is therefore per-ORG configuration, which ADR-0080 decision 1
38195
+ // is explicit is the effectiveness axis the static union deliberately does
38196
+ // not carry. `effectiveCalendarEnforcement` in the CLAUDE.md renderer owns
38197
+ // it, and since ENG-10104 caps `enforce` to `warn` whenever the org's stage
38198
+ // is not `enforce`.
38199
+ id: "calendar.confidentiality",
38200
+ mechanism: "enforced",
38201
+ stage: "live",
38202
+ enforcer: "packages/api/src/lib/calendar-confidentiality-guard.ts",
38203
+ effect: "at config.stage=enforce, redacts summary/description/attendees/location out of calendar read responses; at shadow/warn it writes a would_redact audit row and returns the response unchanged."
38204
+ },
38205
+ // ---- Delegated: read by another definition's enforcement point -----------
38206
+ //
38207
+ // Both can block, because their owner's point is live — which is the question
38208
+ // `guardrailCanBlock` asks and the right answer to it. It is NOT the whole
38209
+ // story for these two, and the gap has its own ticket: the org's email guard
38210
+ // STAGE is threaded into the prompt shape for `email.domain_restrict`'s id
38211
+ // alone (`host-runtime.ts`, the ENG-7829 fix), so a row of either id stored at
38212
+ // `enforce` on a shadow-stage org still renders under "must comply" with
38213
+ // nothing capping it. That is the effectiveness axis, not the mechanism one —
38214
+ // ENG-10110.
38215
+ {
38216
+ id: "email.require_approval",
38217
+ mechanism: "delegated",
38218
+ ownedBy: "email.domain_restrict",
38219
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
38220
+ effect: "routes a send to an approver instead of letting it leave."
38221
+ },
38222
+ {
38223
+ id: "email.mail_rules",
38224
+ mechanism: "delegated",
38225
+ ownedBy: "email.domain_restrict",
38226
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
38227
+ effect: "gates mail-rule creation/modification on the same egress path."
38228
+ },
38229
+ // ---- Advisory: seeded, applied, rendered — and read by nothing -----------
38230
+ //
38231
+ // These are NOT dead config. They are presented to operators in the console
38232
+ // and to agents in CLAUDE.md, three of them under a heading that promises the
38233
+ // violation is blocked. Listed individually rather than as a wildcard so that
38234
+ // fixing one is a one-line diff from `advisory` to `enforced`.
38235
+ //
38236
+ // The ticket is ENG-9800, not ENG-9874. ENG-9874 catalogued these and is
38237
+ // closed; a closed ticket tracks nothing, which is the same shrug an absent
38238
+ // one would be. ENG-9800 is the open sweep that owns making them real.
38239
+ {
38240
+ id: "require-approval-for-actions",
38241
+ mechanism: "advisory",
38242
+ reason: "unimplemented",
38243
+ ticket: "ENG-9800",
38244
+ note: `Rendered to agents as "violation blocks the action". Nothing reads it. The ENG-8562 incident is this guardrail's promise, unkept.`
38245
+ },
38246
+ {
38247
+ id: "data.pii_access",
38248
+ mechanism: "advisory",
38249
+ reason: "unimplemented",
38250
+ ticket: "ENG-9800",
38251
+ note: "Rendered as Enforced with block_export semantics; no export path consults it."
38252
+ },
38253
+ {
38254
+ id: "data.credential_access",
38255
+ mechanism: "advisory",
38256
+ reason: "unimplemented",
38257
+ ticket: "ENG-9800",
38258
+ note: "Rendered as Enforced with block_read/block_write; no credential path consults it."
38259
+ },
38260
+ { id: "comm.social_posting", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38261
+ { id: "compliance.audit_all", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38262
+ { id: "no-external-network", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38263
+ { id: "no-pii-in-output", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38264
+ { id: "restrict-file-access", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38265
+ { id: "schedule.operating_hours", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38266
+ { id: "spend.hourly_limit", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38267
+ { id: "tool.allow_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38268
+ { id: "tool.block_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38269
+ { id: "tool.financial_txn", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
38270
+ { id: "working-hours-only", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" }
38271
+ ];
38272
+ var BY_ID = new Map(GUARDRAIL_ENFORCERS.map((e) => [e.id, e]));
38273
+
38170
38274
  // ../core/dist/provisioning/frameworks/claudecode/agent-rules.js
38171
38275
  var MAX_AGENT_RULES = 8;
38172
38276
  var MAX_AGENT_RULE_CHARS = 200;
@@ -42335,6 +42439,35 @@ var FLAG_REGISTRY = [
42335
42439
  defaultValue: false,
42336
42440
  envVar: "AGT_MODEL_API_ERROR_REPORTING_ENABLED"
42337
42441
  },
42442
+ {
42443
+ key: "model-policy-failover-trigger",
42444
+ description: "Automatic model-policy failover (ENG-10156, ADR-0074). off = the trigger does not run. shadow = it evaluates every ingested model-API error against the policy's failover_trigger config and LOGS the decision with its inputs, acting on nothing. Enum gate; ships OFF.",
42445
+ flagType: "enum",
42446
+ // `armed` is DELIBERATELY not an allowed value yet.
42447
+ //
42448
+ // Nothing writes model_policy_failover_state with source='auto' — that is
42449
+ // the actuation half, and it is gated behind a recorded shadow soak
42450
+ // (ENG-10156 AC8). Offering `armed` now would be a setting an operator can
42451
+ // select, that reports success, and that does nothing: the failure mode is
42452
+ // worse than the missing feature, because it looks like a fleet running
42453
+ // with automatic failover enabled. Add it in the same change that makes it
42454
+ // act, not before.
42455
+ allowedValues: ["off", "shadow"],
42456
+ // OFF, not `shadow`, and the contrast with `channel-quarantine-mode` is the
42457
+ // reason: that flag defaults to `shadow` because shadow WAS the live
42458
+ // manager's compiled behaviour, so anything else would have changed the
42459
+ // fleet. Here there is no incumbent behaviour to preserve — nothing has ever
42460
+ // evaluated this — so `off` is the honest default and turning shadow on is a
42461
+ // deliberate act with a soak attached to it.
42462
+ defaultValue: "off",
42463
+ envVar: "AGT_MODEL_POLICY_FAILOVER_TRIGGER_MODE",
42464
+ // Marked sensitive ahead of `armed` existing: the value this flag will
42465
+ // eventually carry moves a host onto a secondary binding whose credential
42466
+ // may be ours (credential_owner: 'platform'), i.e. it spends money with no
42467
+ // human in the loop. Declaring that now costs nothing and means the audited
42468
+ // -flip behaviour is already in place on the day the value is added.
42469
+ sensitive: true
42470
+ },
42338
42471
  {
42339
42472
  key: "claude-md-skills-index",
42340
42473
  description: `Manager injects the "## Available Skills" bullet list (one line per installed skill, name + frontmatter description) into the agent's project CLAUDE.md. Claude Code already surfaces installed skills to the model natively from .claude/skills/*/SKILL.md, so on current models the list is duplicated context - and an expensive one: it measured 12,045 chars across 29 skills on a prod agent, pushing project/CLAUDE.md to 51k against Claude Code's 40,000-char ceiling, past which the tail of the agent's own system prompt is silently truncated. OFF suppresses ONLY the skill bullets; the "Updating Integrations" guidance in the same managed block is real instruction and is always kept. Defaults ON (today's behaviour) - flip OFF per org to reclaim the headroom.`,
@@ -32309,6 +32309,110 @@ var HOURLY_BY_REGION = {
32309
32309
  };
32310
32310
  var KNOWN_PRICING_REGIONS = Object.keys(HOURLY_BY_REGION);
32311
32311
 
32312
+ // ../core/dist/guardrails/enforcer-registry.js
32313
+ var GUARDRAIL_ENFORCERS = [
32314
+ // ---- Enforced: this definition has its own enforcement point -------------
32315
+ {
32316
+ id: "email.domain_restrict",
32317
+ mechanism: "enforced",
32318
+ stage: "live",
32319
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
32320
+ effect: "enforceEmailDomainGuard runs at the top of both agent-egress paths; internal_only with zero verified domains takes an explicit AUDITED no-op branch rather than failing open silently."
32321
+ },
32322
+ {
32323
+ // MEASURED, and it corrects a claim ADR-0080 makes about this definition.
32324
+ //
32325
+ // The ADR reports calendar as `enforced` + `stage: 'shadow'`, blocked by
32326
+ // ENG-5868 (caller identity is not threaded to `callIntegrationTool`). Read
32327
+ // literally that says an org cannot get redaction today, and that is not
32328
+ // what the code does. `decideCalendarRedactionMode` (calendar-policy.ts) is
32329
+ // FAIL-CLOSED: with the caller unresolvable it returns `redact`, not
32330
+ // pass-through. `redactCalendarToolResponseIfNeeded` then calls
32331
+ // `applyRedactionToResponse` for every response whenever `config.stage` is
32332
+ // `enforce`. So an org that sets the stage gets real redaction — ENG-5868
32333
+ // costs the control its PRECISION (it cannot spare the principal), not its
32334
+ // ability to act.
32335
+ //
32336
+ // The stage is therefore per-ORG configuration, which ADR-0080 decision 1
32337
+ // is explicit is the effectiveness axis the static union deliberately does
32338
+ // not carry. `effectiveCalendarEnforcement` in the CLAUDE.md renderer owns
32339
+ // it, and since ENG-10104 caps `enforce` to `warn` whenever the org's stage
32340
+ // is not `enforce`.
32341
+ id: "calendar.confidentiality",
32342
+ mechanism: "enforced",
32343
+ stage: "live",
32344
+ enforcer: "packages/api/src/lib/calendar-confidentiality-guard.ts",
32345
+ effect: "at config.stage=enforce, redacts summary/description/attendees/location out of calendar read responses; at shadow/warn it writes a would_redact audit row and returns the response unchanged."
32346
+ },
32347
+ // ---- Delegated: read by another definition's enforcement point -----------
32348
+ //
32349
+ // Both can block, because their owner's point is live — which is the question
32350
+ // `guardrailCanBlock` asks and the right answer to it. It is NOT the whole
32351
+ // story for these two, and the gap has its own ticket: the org's email guard
32352
+ // STAGE is threaded into the prompt shape for `email.domain_restrict`'s id
32353
+ // alone (`host-runtime.ts`, the ENG-7829 fix), so a row of either id stored at
32354
+ // `enforce` on a shadow-stage org still renders under "must comply" with
32355
+ // nothing capping it. That is the effectiveness axis, not the mechanism one —
32356
+ // ENG-10110.
32357
+ {
32358
+ id: "email.require_approval",
32359
+ mechanism: "delegated",
32360
+ ownedBy: "email.domain_restrict",
32361
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
32362
+ effect: "routes a send to an approver instead of letting it leave."
32363
+ },
32364
+ {
32365
+ id: "email.mail_rules",
32366
+ mechanism: "delegated",
32367
+ ownedBy: "email.domain_restrict",
32368
+ enforcer: "packages/api/src/lib/email-domain-guard.ts",
32369
+ effect: "gates mail-rule creation/modification on the same egress path."
32370
+ },
32371
+ // ---- Advisory: seeded, applied, rendered — and read by nothing -----------
32372
+ //
32373
+ // These are NOT dead config. They are presented to operators in the console
32374
+ // and to agents in CLAUDE.md, three of them under a heading that promises the
32375
+ // violation is blocked. Listed individually rather than as a wildcard so that
32376
+ // fixing one is a one-line diff from `advisory` to `enforced`.
32377
+ //
32378
+ // The ticket is ENG-9800, not ENG-9874. ENG-9874 catalogued these and is
32379
+ // closed; a closed ticket tracks nothing, which is the same shrug an absent
32380
+ // one would be. ENG-9800 is the open sweep that owns making them real.
32381
+ {
32382
+ id: "require-approval-for-actions",
32383
+ mechanism: "advisory",
32384
+ reason: "unimplemented",
32385
+ ticket: "ENG-9800",
32386
+ note: `Rendered to agents as "violation blocks the action". Nothing reads it. The ENG-8562 incident is this guardrail's promise, unkept.`
32387
+ },
32388
+ {
32389
+ id: "data.pii_access",
32390
+ mechanism: "advisory",
32391
+ reason: "unimplemented",
32392
+ ticket: "ENG-9800",
32393
+ note: "Rendered as Enforced with block_export semantics; no export path consults it."
32394
+ },
32395
+ {
32396
+ id: "data.credential_access",
32397
+ mechanism: "advisory",
32398
+ reason: "unimplemented",
32399
+ ticket: "ENG-9800",
32400
+ note: "Rendered as Enforced with block_read/block_write; no credential path consults it."
32401
+ },
32402
+ { id: "comm.social_posting", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32403
+ { id: "compliance.audit_all", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32404
+ { id: "no-external-network", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32405
+ { id: "no-pii-in-output", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32406
+ { id: "restrict-file-access", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32407
+ { id: "schedule.operating_hours", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32408
+ { id: "spend.hourly_limit", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32409
+ { id: "tool.allow_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32410
+ { id: "tool.block_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32411
+ { id: "tool.financial_txn", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
32412
+ { id: "working-hours-only", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" }
32413
+ ];
32414
+ var BY_ID = new Map(GUARDRAIL_ENFORCERS.map((e) => [e.id, e]));
32415
+
32312
32416
  // ../core/dist/provisioning/frameworks/claudecode/agent-rules.js
32313
32417
  var MAX_AGENT_RULES = 8;
32314
32418
  var MAX_AGENT_RULE_CHARS = 200;
@@ -36890,6 +36994,35 @@ var FLAG_REGISTRY = [
36890
36994
  defaultValue: false,
36891
36995
  envVar: "AGT_MODEL_API_ERROR_REPORTING_ENABLED"
36892
36996
  },
36997
+ {
36998
+ key: "model-policy-failover-trigger",
36999
+ description: "Automatic model-policy failover (ENG-10156, ADR-0074). off = the trigger does not run. shadow = it evaluates every ingested model-API error against the policy's failover_trigger config and LOGS the decision with its inputs, acting on nothing. Enum gate; ships OFF.",
37000
+ flagType: "enum",
37001
+ // `armed` is DELIBERATELY not an allowed value yet.
37002
+ //
37003
+ // Nothing writes model_policy_failover_state with source='auto' — that is
37004
+ // the actuation half, and it is gated behind a recorded shadow soak
37005
+ // (ENG-10156 AC8). Offering `armed` now would be a setting an operator can
37006
+ // select, that reports success, and that does nothing: the failure mode is
37007
+ // worse than the missing feature, because it looks like a fleet running
37008
+ // with automatic failover enabled. Add it in the same change that makes it
37009
+ // act, not before.
37010
+ allowedValues: ["off", "shadow"],
37011
+ // OFF, not `shadow`, and the contrast with `channel-quarantine-mode` is the
37012
+ // reason: that flag defaults to `shadow` because shadow WAS the live
37013
+ // manager's compiled behaviour, so anything else would have changed the
37014
+ // fleet. Here there is no incumbent behaviour to preserve — nothing has ever
37015
+ // evaluated this — so `off` is the honest default and turning shadow on is a
37016
+ // deliberate act with a soak attached to it.
37017
+ defaultValue: "off",
37018
+ envVar: "AGT_MODEL_POLICY_FAILOVER_TRIGGER_MODE",
37019
+ // Marked sensitive ahead of `armed` existing: the value this flag will
37020
+ // eventually carry moves a host onto a secondary binding whose credential
37021
+ // may be ours (credential_owner: 'platform'), i.e. it spends money with no
37022
+ // human in the loop. Declaring that now costs nothing and means the audited
37023
+ // -flip behaviour is already in place on the day the value is added.
37024
+ sensitive: true
37025
+ },
36893
37026
  {
36894
37027
  key: "claude-md-skills-index",
36895
37028
  description: `Manager injects the "## Available Skills" bullet list (one line per installed skill, name + frontmatter description) into the agent's project CLAUDE.md. Claude Code already surfaces installed skills to the model natively from .claude/skills/*/SKILL.md, so on current models the list is duplicated context - and an expensive one: it measured 12,045 chars across 29 skills on a prod agent, pushing project/CLAUDE.md to 51k against Claude Code's 40,000-char ceiling, past which the tail of the agent's own system prompt is silently truncated. OFF suppresses ONLY the skill bullets; the "Updating Integrations" guidance in the same managed block is real instruction and is always kept. Defaults ON (today's behaviour) - flip OFF per org to reclaim the headroom.`,