@integrity-labs/agt-cli 0.28.1289 → 0.28.1291

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 (35) hide show
  1. package/dist/{api-client-LVYFYF3Z.js → api-client-6L3L4HKS.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-X7ZRYILH.js → chunk-3NCSZIK4.js} +2 -2
  4. package/dist/{chunk-JNEXXGKW.js → chunk-G4T3PGWR.js} +3 -3
  5. package/dist/{chunk-FRNONFQA.js → chunk-IPWGWDON.js} +2 -2
  6. package/dist/{chunk-DITI25ZO.js → chunk-LAJEUIP7.js} +35 -3
  7. package/dist/chunk-LAJEUIP7.js.map +1 -0
  8. package/dist/{chunk-WIU4M5EF.js → chunk-QSIKMH7L.js} +3 -3
  9. package/dist/{chunk-OJWLTVBR.js → chunk-RPZSSKF7.js} +5 -5
  10. package/dist/{claude-code-updater-6NRYKDKS.js → claude-code-updater-NBWLPWZU.js} +3 -3
  11. package/dist/{claude-pair-runtime-PMGEAT3Z.js → claude-pair-runtime-3RJNQ3XJ.js} +3 -3
  12. package/dist/lib/manager-worker.js +330 -57
  13. package/dist/lib/manager-worker.js.map +1 -1
  14. package/dist/mcp/direct-chat-channel.js +34 -2
  15. package/dist/mcp/index.js +34 -2
  16. package/dist/mcp/origami.js +34 -2
  17. package/dist/mcp/slack-channel.js +34 -2
  18. package/dist/mcp/telegram-channel.js +34 -2
  19. package/dist/mcp/xero.js +44 -11
  20. package/dist/{persistent-session-XYZN6NSP.js → persistent-session-Q5FJJAFR.js} +4 -4
  21. package/dist/{responsiveness-probe-NIH64ZZE.js → responsiveness-probe-EYIQ2RPD.js} +4 -4
  22. package/dist/{session-auth-dead-IBUKQXBO.js → session-auth-dead-TYDPUWCV.js} +3 -3
  23. package/package.json +1 -1
  24. package/dist/chunk-DITI25ZO.js.map +0 -1
  25. /package/dist/{api-client-LVYFYF3Z.js.map → api-client-6L3L4HKS.js.map} +0 -0
  26. /package/dist/{chunk-X7ZRYILH.js.map → chunk-3NCSZIK4.js.map} +0 -0
  27. /package/dist/{chunk-JNEXXGKW.js.map → chunk-G4T3PGWR.js.map} +0 -0
  28. /package/dist/{chunk-FRNONFQA.js.map → chunk-IPWGWDON.js.map} +0 -0
  29. /package/dist/{chunk-WIU4M5EF.js.map → chunk-QSIKMH7L.js.map} +0 -0
  30. /package/dist/{chunk-OJWLTVBR.js.map → chunk-RPZSSKF7.js.map} +0 -0
  31. /package/dist/{claude-code-updater-6NRYKDKS.js.map → claude-code-updater-NBWLPWZU.js.map} +0 -0
  32. /package/dist/{claude-pair-runtime-PMGEAT3Z.js.map → claude-pair-runtime-3RJNQ3XJ.js.map} +0 -0
  33. /package/dist/{persistent-session-XYZN6NSP.js.map → persistent-session-Q5FJJAFR.js.map} +0 -0
  34. /package/dist/{responsiveness-probe-NIH64ZZE.js.map → responsiveness-probe-EYIQ2RPD.js.map} +0 -0
  35. /package/dist/{session-auth-dead-IBUKQXBO.js.map → session-auth-dead-TYDPUWCV.js.map} +0 -0
@@ -40592,7 +40592,39 @@ var INTEGRATION_REGISTRY = [
40592
40592
  { id: "xero:read-accounts", name: "Read Accounts", description: "View chart of accounts and account balances", access: "read" },
40593
40593
  { id: "xero:read-transactions", name: "Read Transactions", description: "View bank transactions, invoices, and journal entries", access: "read" },
40594
40594
  { id: "xero:read-contacts", name: "Read Contacts", description: "View customers, suppliers, and contact groups", access: "read" },
40595
- { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" }
40595
+ { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" },
40596
+ {
40597
+ // CS-2548: the second `requires_org_opt_in` capability, and the first
40598
+ // that carries OAuth scopes. Payroll write consent (payroll.payruns,
40599
+ // payroll.payslip) is the org's decision: it must not be asked for, or
40600
+ // flagged as missing, for every Xero org because one wants pay runs.
40601
+ // The consent and reconnect paths drop it for a non-opted org
40602
+ // (api/lib/opt-in-oauth-scopes.ts) and the broker refuses its verbs
40603
+ // unless the org opted in AND the agent holds the scope
40604
+ // (api/lib/xero-payroll-gate.ts). The scope id matches the seeded
40605
+ // defined_scope `xero:payroll-payruns`.
40606
+ id: "xero:payroll-payruns",
40607
+ name: "Payroll pay runs (draft)",
40608
+ description: "Let agents create DRAFT pay runs in Xero Payroll (Australia) and fill in earnings lines, each held for human approval. Agents never post, approve or finalise a pay run; a person does that in Xero. Off until you turn it on. After turning it on, reconnect Xero so it can grant payroll access.",
40609
+ access: "write",
40610
+ // payroll.settings.read (Obi Wan b662d8ad8266): create_draft reads
40611
+ // GET /PayrollCalendars/<id> to check the calendar name, and Xero puts
40612
+ // PayrollCalendars under payroll.settings(.read). Declared HERE too, so
40613
+ // an agent with the payroll READ skill excluded can still do it once its
40614
+ // org opts in. Read-only; a non-opted org still gets it only via
40615
+ // xero:payroll, because the opt-in filter drops scope IDS, not strings.
40616
+ //
40617
+ // What opting in makes reachable (Obi Wan 5f8a1b871260): these three
40618
+ // scopes enter the agent's effective_scopes, and NOTHING else. They do
40619
+ // NOT unlock the vendor MCP's payroll read tools (employees, leave,
40620
+ // timesheets): xero-mcp-server's tool gate requires an exact `.read`
40621
+ // scope that only xero:payroll declares (PAYROLL_TOOL_REQUIRED_SCOPES in
40622
+ // xero-mcp-server/src/tools/tool-factory.ts), and settings.read is never
40623
+ // a tool's only requirement. So an operator's exclusion of the Payroll &
40624
+ // HR read skill still holds after the org opts in to draft pay runs.
40625
+ required_scopes: ["payroll.payruns", "payroll.payslip", "payroll.settings.read"],
40626
+ requires_org_opt_in: true
40627
+ }
40596
40628
  ]
40597
40629
  },
40598
40630
  {
@@ -42383,7 +42415,7 @@ var INTEGRATION_REGISTRY = [
42383
42415
  // noting, because this registry is what the org-scoped premium surface
42384
42416
  // reads and the seed is not.
42385
42417
  //
42386
- // THE ONE `requires_org_opt_in` CAPABILITY TODAY, and the reason the
42418
+ // THE FIRST `requires_org_opt_in` CAPABILITY (CS-2548 added xero:payroll-payruns), and the reason the
42387
42419
  // field exists. Live advising streams a meeting IN FLIGHT to a
42388
42420
  // server-side vet and meters per armed minute — a different exposure
42389
42421
  // from reading a transcript afterwards (ADR-0072), and a recurring
package/dist/mcp/index.js CHANGED
@@ -26605,7 +26605,39 @@ var INTEGRATION_REGISTRY = [
26605
26605
  { id: "xero:read-accounts", name: "Read Accounts", description: "View chart of accounts and account balances", access: "read" },
26606
26606
  { id: "xero:read-transactions", name: "Read Transactions", description: "View bank transactions, invoices, and journal entries", access: "read" },
26607
26607
  { id: "xero:read-contacts", name: "Read Contacts", description: "View customers, suppliers, and contact groups", access: "read" },
26608
- { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" }
26608
+ { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" },
26609
+ {
26610
+ // CS-2548: the second `requires_org_opt_in` capability, and the first
26611
+ // that carries OAuth scopes. Payroll write consent (payroll.payruns,
26612
+ // payroll.payslip) is the org's decision: it must not be asked for, or
26613
+ // flagged as missing, for every Xero org because one wants pay runs.
26614
+ // The consent and reconnect paths drop it for a non-opted org
26615
+ // (api/lib/opt-in-oauth-scopes.ts) and the broker refuses its verbs
26616
+ // unless the org opted in AND the agent holds the scope
26617
+ // (api/lib/xero-payroll-gate.ts). The scope id matches the seeded
26618
+ // defined_scope `xero:payroll-payruns`.
26619
+ id: "xero:payroll-payruns",
26620
+ name: "Payroll pay runs (draft)",
26621
+ description: "Let agents create DRAFT pay runs in Xero Payroll (Australia) and fill in earnings lines, each held for human approval. Agents never post, approve or finalise a pay run; a person does that in Xero. Off until you turn it on. After turning it on, reconnect Xero so it can grant payroll access.",
26622
+ access: "write",
26623
+ // payroll.settings.read (Obi Wan b662d8ad8266): create_draft reads
26624
+ // GET /PayrollCalendars/<id> to check the calendar name, and Xero puts
26625
+ // PayrollCalendars under payroll.settings(.read). Declared HERE too, so
26626
+ // an agent with the payroll READ skill excluded can still do it once its
26627
+ // org opts in. Read-only; a non-opted org still gets it only via
26628
+ // xero:payroll, because the opt-in filter drops scope IDS, not strings.
26629
+ //
26630
+ // What opting in makes reachable (Obi Wan 5f8a1b871260): these three
26631
+ // scopes enter the agent's effective_scopes, and NOTHING else. They do
26632
+ // NOT unlock the vendor MCP's payroll read tools (employees, leave,
26633
+ // timesheets): xero-mcp-server's tool gate requires an exact `.read`
26634
+ // scope that only xero:payroll declares (PAYROLL_TOOL_REQUIRED_SCOPES in
26635
+ // xero-mcp-server/src/tools/tool-factory.ts), and settings.read is never
26636
+ // a tool's only requirement. So an operator's exclusion of the Payroll &
26637
+ // HR read skill still holds after the org opts in to draft pay runs.
26638
+ required_scopes: ["payroll.payruns", "payroll.payslip", "payroll.settings.read"],
26639
+ requires_org_opt_in: true
26640
+ }
26609
26641
  ]
26610
26642
  },
26611
26643
  {
@@ -28396,7 +28428,7 @@ var INTEGRATION_REGISTRY = [
28396
28428
  // noting, because this registry is what the org-scoped premium surface
28397
28429
  // reads and the seed is not.
28398
28430
  //
28399
- // THE ONE `requires_org_opt_in` CAPABILITY TODAY, and the reason the
28431
+ // THE FIRST `requires_org_opt_in` CAPABILITY (CS-2548 added xero:payroll-payruns), and the reason the
28400
28432
  // field exists. Live advising streams a meeting IN FLIGHT to a
28401
28433
  // server-side vet and meters per armed minute — a different exposure
28402
28434
  // from reading a transcript afterwards (ADR-0072), and a recurring
@@ -40666,7 +40666,39 @@ var INTEGRATION_REGISTRY = [
40666
40666
  { id: "xero:read-accounts", name: "Read Accounts", description: "View chart of accounts and account balances", access: "read" },
40667
40667
  { id: "xero:read-transactions", name: "Read Transactions", description: "View bank transactions, invoices, and journal entries", access: "read" },
40668
40668
  { id: "xero:read-contacts", name: "Read Contacts", description: "View customers, suppliers, and contact groups", access: "read" },
40669
- { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" }
40669
+ { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" },
40670
+ {
40671
+ // CS-2548: the second `requires_org_opt_in` capability, and the first
40672
+ // that carries OAuth scopes. Payroll write consent (payroll.payruns,
40673
+ // payroll.payslip) is the org's decision: it must not be asked for, or
40674
+ // flagged as missing, for every Xero org because one wants pay runs.
40675
+ // The consent and reconnect paths drop it for a non-opted org
40676
+ // (api/lib/opt-in-oauth-scopes.ts) and the broker refuses its verbs
40677
+ // unless the org opted in AND the agent holds the scope
40678
+ // (api/lib/xero-payroll-gate.ts). The scope id matches the seeded
40679
+ // defined_scope `xero:payroll-payruns`.
40680
+ id: "xero:payroll-payruns",
40681
+ name: "Payroll pay runs (draft)",
40682
+ description: "Let agents create DRAFT pay runs in Xero Payroll (Australia) and fill in earnings lines, each held for human approval. Agents never post, approve or finalise a pay run; a person does that in Xero. Off until you turn it on. After turning it on, reconnect Xero so it can grant payroll access.",
40683
+ access: "write",
40684
+ // payroll.settings.read (Obi Wan b662d8ad8266): create_draft reads
40685
+ // GET /PayrollCalendars/<id> to check the calendar name, and Xero puts
40686
+ // PayrollCalendars under payroll.settings(.read). Declared HERE too, so
40687
+ // an agent with the payroll READ skill excluded can still do it once its
40688
+ // org opts in. Read-only; a non-opted org still gets it only via
40689
+ // xero:payroll, because the opt-in filter drops scope IDS, not strings.
40690
+ //
40691
+ // What opting in makes reachable (Obi Wan 5f8a1b871260): these three
40692
+ // scopes enter the agent's effective_scopes, and NOTHING else. They do
40693
+ // NOT unlock the vendor MCP's payroll read tools (employees, leave,
40694
+ // timesheets): xero-mcp-server's tool gate requires an exact `.read`
40695
+ // scope that only xero:payroll declares (PAYROLL_TOOL_REQUIRED_SCOPES in
40696
+ // xero-mcp-server/src/tools/tool-factory.ts), and settings.read is never
40697
+ // a tool's only requirement. So an operator's exclusion of the Payroll &
40698
+ // HR read skill still holds after the org opts in to draft pay runs.
40699
+ required_scopes: ["payroll.payruns", "payroll.payslip", "payroll.settings.read"],
40700
+ requires_org_opt_in: true
40701
+ }
40670
40702
  ]
40671
40703
  },
40672
40704
  {
@@ -42457,7 +42489,7 @@ var INTEGRATION_REGISTRY = [
42457
42489
  // noting, because this registry is what the org-scoped premium surface
42458
42490
  // reads and the seed is not.
42459
42491
  //
42460
- // THE ONE `requires_org_opt_in` CAPABILITY TODAY, and the reason the
42492
+ // THE FIRST `requires_org_opt_in` CAPABILITY (CS-2548 added xero:payroll-payruns), and the reason the
42461
42493
  // field exists. Live advising streams a meeting IN FLIGHT to a
42462
42494
  // server-side vet and meters per armed minute — a different exposure
42463
42495
  // from reading a transcript afterwards (ADR-0072), and a recurring
@@ -35100,7 +35100,39 @@ var INTEGRATION_REGISTRY = [
35100
35100
  { id: "xero:read-accounts", name: "Read Accounts", description: "View chart of accounts and account balances", access: "read" },
35101
35101
  { id: "xero:read-transactions", name: "Read Transactions", description: "View bank transactions, invoices, and journal entries", access: "read" },
35102
35102
  { id: "xero:read-contacts", name: "Read Contacts", description: "View customers, suppliers, and contact groups", access: "read" },
35103
- { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" }
35103
+ { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" },
35104
+ {
35105
+ // CS-2548: the second `requires_org_opt_in` capability, and the first
35106
+ // that carries OAuth scopes. Payroll write consent (payroll.payruns,
35107
+ // payroll.payslip) is the org's decision: it must not be asked for, or
35108
+ // flagged as missing, for every Xero org because one wants pay runs.
35109
+ // The consent and reconnect paths drop it for a non-opted org
35110
+ // (api/lib/opt-in-oauth-scopes.ts) and the broker refuses its verbs
35111
+ // unless the org opted in AND the agent holds the scope
35112
+ // (api/lib/xero-payroll-gate.ts). The scope id matches the seeded
35113
+ // defined_scope `xero:payroll-payruns`.
35114
+ id: "xero:payroll-payruns",
35115
+ name: "Payroll pay runs (draft)",
35116
+ description: "Let agents create DRAFT pay runs in Xero Payroll (Australia) and fill in earnings lines, each held for human approval. Agents never post, approve or finalise a pay run; a person does that in Xero. Off until you turn it on. After turning it on, reconnect Xero so it can grant payroll access.",
35117
+ access: "write",
35118
+ // payroll.settings.read (Obi Wan b662d8ad8266): create_draft reads
35119
+ // GET /PayrollCalendars/<id> to check the calendar name, and Xero puts
35120
+ // PayrollCalendars under payroll.settings(.read). Declared HERE too, so
35121
+ // an agent with the payroll READ skill excluded can still do it once its
35122
+ // org opts in. Read-only; a non-opted org still gets it only via
35123
+ // xero:payroll, because the opt-in filter drops scope IDS, not strings.
35124
+ //
35125
+ // What opting in makes reachable (Obi Wan 5f8a1b871260): these three
35126
+ // scopes enter the agent's effective_scopes, and NOTHING else. They do
35127
+ // NOT unlock the vendor MCP's payroll read tools (employees, leave,
35128
+ // timesheets): xero-mcp-server's tool gate requires an exact `.read`
35129
+ // scope that only xero:payroll declares (PAYROLL_TOOL_REQUIRED_SCOPES in
35130
+ // xero-mcp-server/src/tools/tool-factory.ts), and settings.read is never
35131
+ // a tool's only requirement. So an operator's exclusion of the Payroll &
35132
+ // HR read skill still holds after the org opts in to draft pay runs.
35133
+ required_scopes: ["payroll.payruns", "payroll.payslip", "payroll.settings.read"],
35134
+ requires_org_opt_in: true
35135
+ }
35104
35136
  ]
35105
35137
  },
35106
35138
  {
@@ -36891,7 +36923,7 @@ var INTEGRATION_REGISTRY = [
36891
36923
  // noting, because this registry is what the org-scoped premium surface
36892
36924
  // reads and the seed is not.
36893
36925
  //
36894
- // THE ONE `requires_org_opt_in` CAPABILITY TODAY, and the reason the
36926
+ // THE FIRST `requires_org_opt_in` CAPABILITY (CS-2548 added xero:payroll-payruns), and the reason the
36895
36927
  // field exists. Live advising streams a meeting IN FLIGHT to a
36896
36928
  // server-side vet and meters per armed minute — a different exposure
36897
36929
  // from reading a transcript afterwards (ADR-0072), and a recurring
@@ -35572,7 +35572,39 @@ var INTEGRATION_REGISTRY = [
35572
35572
  { id: "xero:read-accounts", name: "Read Accounts", description: "View chart of accounts and account balances", access: "read" },
35573
35573
  { id: "xero:read-transactions", name: "Read Transactions", description: "View bank transactions, invoices, and journal entries", access: "read" },
35574
35574
  { id: "xero:read-contacts", name: "Read Contacts", description: "View customers, suppliers, and contact groups", access: "read" },
35575
- { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" }
35575
+ { id: "xero:manage-settings", name: "Manage Settings", description: "Manage org settings and chart of accounts", access: "admin" },
35576
+ {
35577
+ // CS-2548: the second `requires_org_opt_in` capability, and the first
35578
+ // that carries OAuth scopes. Payroll write consent (payroll.payruns,
35579
+ // payroll.payslip) is the org's decision: it must not be asked for, or
35580
+ // flagged as missing, for every Xero org because one wants pay runs.
35581
+ // The consent and reconnect paths drop it for a non-opted org
35582
+ // (api/lib/opt-in-oauth-scopes.ts) and the broker refuses its verbs
35583
+ // unless the org opted in AND the agent holds the scope
35584
+ // (api/lib/xero-payroll-gate.ts). The scope id matches the seeded
35585
+ // defined_scope `xero:payroll-payruns`.
35586
+ id: "xero:payroll-payruns",
35587
+ name: "Payroll pay runs (draft)",
35588
+ description: "Let agents create DRAFT pay runs in Xero Payroll (Australia) and fill in earnings lines, each held for human approval. Agents never post, approve or finalise a pay run; a person does that in Xero. Off until you turn it on. After turning it on, reconnect Xero so it can grant payroll access.",
35589
+ access: "write",
35590
+ // payroll.settings.read (Obi Wan b662d8ad8266): create_draft reads
35591
+ // GET /PayrollCalendars/<id> to check the calendar name, and Xero puts
35592
+ // PayrollCalendars under payroll.settings(.read). Declared HERE too, so
35593
+ // an agent with the payroll READ skill excluded can still do it once its
35594
+ // org opts in. Read-only; a non-opted org still gets it only via
35595
+ // xero:payroll, because the opt-in filter drops scope IDS, not strings.
35596
+ //
35597
+ // What opting in makes reachable (Obi Wan 5f8a1b871260): these three
35598
+ // scopes enter the agent's effective_scopes, and NOTHING else. They do
35599
+ // NOT unlock the vendor MCP's payroll read tools (employees, leave,
35600
+ // timesheets): xero-mcp-server's tool gate requires an exact `.read`
35601
+ // scope that only xero:payroll declares (PAYROLL_TOOL_REQUIRED_SCOPES in
35602
+ // xero-mcp-server/src/tools/tool-factory.ts), and settings.read is never
35603
+ // a tool's only requirement. So an operator's exclusion of the Payroll &
35604
+ // HR read skill still holds after the org opts in to draft pay runs.
35605
+ required_scopes: ["payroll.payruns", "payroll.payslip", "payroll.settings.read"],
35606
+ requires_org_opt_in: true
35607
+ }
35576
35608
  ]
35577
35609
  },
35578
35610
  {
@@ -37363,7 +37395,7 @@ var INTEGRATION_REGISTRY = [
37363
37395
  // noting, because this registry is what the org-scoped premium surface
37364
37396
  // reads and the seed is not.
37365
37397
  //
37366
- // THE ONE `requires_org_opt_in` CAPABILITY TODAY, and the reason the
37398
+ // THE FIRST `requires_org_opt_in` CAPABILITY (CS-2548 added xero:payroll-payruns), and the reason the
37367
37399
  // field exists. Live advising streams a meeting IN FLIGHT to a
37368
37400
  // server-side vet and meters per armed minute — a different exposure
37369
37401
  // from reading a transcript afterwards (ADR-0072), and a recurring
package/dist/mcp/xero.js CHANGED
@@ -125614,18 +125614,51 @@ function writesGoViaBroker() {
125614
125614
  const raw = (process.env.XERO_WRITES_VIA_BROKER ?? "").trim().toLowerCase();
125615
125615
  return raw === "true" || raw === "1" || raw === "yes";
125616
125616
  }
125617
- var SCOPE_GATES = [
125618
- { family: /payroll/i, requiresScope: "payroll" }
125619
- ];
125617
+ var PAYROLL_TOOL_REQUIRED_SCOPES = {
125618
+ // Employees and leave (employee personal data): payroll.employees.read.
125619
+ "list-payroll-employees": ["payroll.employees.read"],
125620
+ "list-payroll-employee-leave": ["payroll.employees.read"],
125621
+ "list-payroll-employee-leave-balances": ["payroll.employees.read"],
125622
+ "list-payroll-employee-leave-types": ["payroll.employees.read"],
125623
+ "list-payroll-leave-periods": ["payroll.employees.read"],
125624
+ // Org leave types are settings, but settings.read alone is shared with the
125625
+ // opt-in skill, so the employees.read that only xero:payroll holds is required too.
125626
+ "list-payroll-leave-types": ["payroll.settings.read", "payroll.employees.read"],
125627
+ // CS-2548 / #7615 AU payroll reads. Pay items, calendars and pay templates are
125628
+ // settings-shaped, but settings.read is shared with the opt-in skill, so each
125629
+ // also requires the employees.read that only xero:payroll holds.
125630
+ "list-payroll-pay-items": ["payroll.settings.read", "payroll.employees.read"],
125631
+ "list-payroll-calendars": ["payroll.settings.read", "payroll.employees.read"],
125632
+ "get-payroll-employee-pay-template": ["payroll.settings.read", "payroll.employees.read"],
125633
+ // Pay runs and payslips: the .read scopes only xero:payroll declares (the
125634
+ // opt-in's payroll.payruns / payroll.payslip, without .read, never match).
125635
+ "list-payroll-pay-runs": ["payroll.payruns.read"],
125636
+ "get-payroll-pay-run": ["payroll.payruns.read"],
125637
+ "get-payroll-payslip": ["payroll.payslip.read"],
125638
+ // Timesheets (read).
125639
+ "list-timesheets": ["payroll.timesheets.read"],
125640
+ "get-timesheet": ["payroll.timesheets.read"],
125641
+ // Timesheets (write): explicit write scope, standalone mode only.
125642
+ "create-timesheet": ["payroll.timesheets"],
125643
+ "delete-timesheet": ["payroll.timesheets"],
125644
+ "approve-timesheet": ["payroll.timesheets"],
125645
+ "revert-timesheet": ["payroll.timesheets"],
125646
+ "add-timesheet-line": ["payroll.timesheets"],
125647
+ "update-timesheet-line": ["payroll.timesheets"]
125648
+ };
125649
+ var PAYROLL_FAMILY = /payroll|timesheet/i;
125650
+ function parseScopeSet(effectiveScopes) {
125651
+ return new Set(
125652
+ effectiveScopes.split(/[\s,]+/).map((s) => s.trim().toLowerCase()).filter((s) => s.length > 0)
125653
+ );
125654
+ }
125620
125655
  function makeToolGate(effectiveScopes) {
125621
125656
  if (effectiveScopes == null) return () => true;
125622
- const scopes = effectiveScopes.toLowerCase();
125657
+ const held = parseScopeSet(effectiveScopes);
125623
125658
  return (toolName) => {
125624
- for (const gate of SCOPE_GATES) {
125625
- if (gate.family.test(toolName) && !scopes.includes(gate.requiresScope)) {
125626
- return false;
125627
- }
125628
- }
125659
+ const required2 = Object.prototype.hasOwnProperty.call(PAYROLL_TOOL_REQUIRED_SCOPES, toolName) ? PAYROLL_TOOL_REQUIRED_SCOPES[toolName] : void 0;
125660
+ if (required2) return required2.every((scope) => held.has(scope));
125661
+ if (PAYROLL_FAMILY.test(toolName)) return false;
125629
125662
  return true;
125630
125663
  };
125631
125664
  }
@@ -125637,9 +125670,9 @@ function ToolFactory(server, effectiveScopes = null) {
125637
125670
  "xero-mcp-server: XERO_WRITES_VIA_BROKER is set \u2014 registering read-only tools only (Get/List). Create/Update/Delete are gated through the Augmented xero-broker (HITL)."
125638
125671
  );
125639
125672
  }
125640
- if (effectiveScopes != null && !effectiveScopes.toLowerCase().includes("payroll")) {
125673
+ if (effectiveScopes != null && !parseScopeSet(effectiveScopes).has("payroll.employees.read")) {
125641
125674
  console.error(
125642
- "xero-mcp-server: agent policy excludes payroll scopes \u2014 payroll tools not registered (ENG-7824)."
125675
+ "xero-mcp-server: agent policy lacks payroll.employees.read - employee and leave payroll tools not registered (ENG-7824, CS-2548)."
125643
125676
  );
125644
125677
  }
125645
125678
  const listOrganisations = list_organisations_tool_default();
@@ -85,12 +85,12 @@ import {
85
85
  writeDirectChatSessionState,
86
86
  writeEgressAllowlist,
87
87
  writePersistentClaudeWrapper
88
- } from "./chunk-WIU4M5EF.js";
89
- import "./chunk-X7ZRYILH.js";
88
+ } from "./chunk-QSIKMH7L.js";
89
+ import "./chunk-3NCSZIK4.js";
90
90
  import "./chunk-XL2HPM67.js";
91
91
  import "./chunk-6HBXEJHO.js";
92
92
  import "./chunk-XWVM4KPK.js";
93
- import "./chunk-DITI25ZO.js";
93
+ import "./chunk-LAJEUIP7.js";
94
94
  import "./chunk-AIUIMEUS.js";
95
95
  import "./chunk-DGUM43GV.js";
96
96
  export {
@@ -181,4 +181,4 @@ export {
181
181
  writeEgressAllowlist,
182
182
  writePersistentClaudeWrapper
183
183
  };
184
- //# sourceMappingURL=persistent-session-XYZN6NSP.js.map
184
+ //# sourceMappingURL=persistent-session-Q5FJJAFR.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-WIU4M5EF.js";
4
- import "./chunk-X7ZRYILH.js";
3
+ } from "./chunk-QSIKMH7L.js";
4
+ import "./chunk-3NCSZIK4.js";
5
5
  import "./chunk-XL2HPM67.js";
6
6
  import "./chunk-6HBXEJHO.js";
7
7
  import "./chunk-XWVM4KPK.js";
8
- import "./chunk-DITI25ZO.js";
8
+ import "./chunk-LAJEUIP7.js";
9
9
  import "./chunk-AIUIMEUS.js";
10
10
  import "./chunk-DGUM43GV.js";
11
11
 
@@ -804,4 +804,4 @@ export {
804
804
  readAndResetSlackReplyBindingClassifications,
805
805
  readAndResetSlackReplyTargetClassifications
806
806
  };
807
- //# sourceMappingURL=responsiveness-probe-NIH64ZZE.js.map
807
+ //# sourceMappingURL=responsiveness-probe-EYIQ2RPD.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-X7ZRYILH.js";
4
- import "./chunk-DITI25ZO.js";
3
+ } from "./chunk-3NCSZIK4.js";
4
+ import "./chunk-LAJEUIP7.js";
5
5
  import "./chunk-DGUM43GV.js";
6
6
 
7
7
  // src/lib/session-auth-dead.ts
@@ -205,4 +205,4 @@ export {
205
205
  decideSessionAuthState,
206
206
  probeSessionAuth
207
207
  };
208
- //# sourceMappingURL=session-auth-dead-IBUKQXBO.js.map
208
+ //# sourceMappingURL=session-auth-dead-TYDPUWCV.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1289",
3
+ "version": "0.28.1291",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {