@integrity-labs/agt-cli 0.28.1289 → 0.28.1290
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/{api-client-LVYFYF3Z.js → api-client-G5MBBP5G.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-X7ZRYILH.js → chunk-3NCSZIK4.js} +2 -2
- package/dist/{chunk-OJWLTVBR.js → chunk-6YJL5HCY.js} +5 -5
- package/dist/{chunk-FRNONFQA.js → chunk-IPWGWDON.js} +2 -2
- package/dist/{chunk-DITI25ZO.js → chunk-LAJEUIP7.js} +35 -3
- package/dist/chunk-LAJEUIP7.js.map +1 -0
- package/dist/{chunk-WIU4M5EF.js → chunk-QSIKMH7L.js} +3 -3
- package/dist/{chunk-JNEXXGKW.js → chunk-XDMJSKLQ.js} +3 -3
- package/dist/{claude-code-updater-6NRYKDKS.js → claude-code-updater-NBWLPWZU.js} +3 -3
- package/dist/{claude-pair-runtime-PMGEAT3Z.js → claude-pair-runtime-3RJNQ3XJ.js} +3 -3
- package/dist/lib/manager-worker.js +21 -21
- package/dist/mcp/direct-chat-channel.js +34 -2
- package/dist/mcp/index.js +34 -2
- package/dist/mcp/origami.js +34 -2
- package/dist/mcp/slack-channel.js +34 -2
- package/dist/mcp/telegram-channel.js +34 -2
- package/dist/mcp/xero.js +44 -11
- package/dist/{persistent-session-XYZN6NSP.js → persistent-session-Q5FJJAFR.js} +4 -4
- package/dist/{responsiveness-probe-NIH64ZZE.js → responsiveness-probe-EYIQ2RPD.js} +4 -4
- package/dist/{session-auth-dead-IBUKQXBO.js → session-auth-dead-TYDPUWCV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-DITI25ZO.js.map +0 -1
- /package/dist/{api-client-LVYFYF3Z.js.map → api-client-G5MBBP5G.js.map} +0 -0
- /package/dist/{chunk-X7ZRYILH.js.map → chunk-3NCSZIK4.js.map} +0 -0
- /package/dist/{chunk-OJWLTVBR.js.map → chunk-6YJL5HCY.js.map} +0 -0
- /package/dist/{chunk-FRNONFQA.js.map → chunk-IPWGWDON.js.map} +0 -0
- /package/dist/{chunk-WIU4M5EF.js.map → chunk-QSIKMH7L.js.map} +0 -0
- /package/dist/{chunk-JNEXXGKW.js.map → chunk-XDMJSKLQ.js.map} +0 -0
- /package/dist/{claude-code-updater-6NRYKDKS.js.map → claude-code-updater-NBWLPWZU.js.map} +0 -0
- /package/dist/{claude-pair-runtime-PMGEAT3Z.js.map → claude-pair-runtime-3RJNQ3XJ.js.map} +0 -0
- /package/dist/{persistent-session-XYZN6NSP.js.map → persistent-session-Q5FJJAFR.js.map} +0 -0
- /package/dist/{responsiveness-probe-NIH64ZZE.js.map → responsiveness-probe-EYIQ2RPD.js.map} +0 -0
- /package/dist/{session-auth-dead-IBUKQXBO.js.map → session-auth-dead-TYDPUWCV.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3NCSZIK4.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
remoteMcpConnectionEnvInfix,
|
|
55
55
|
remoteMcpConnectionLabel,
|
|
56
56
|
remoteMcpConnectionScopedEnvVar
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LAJEUIP7.js";
|
|
58
58
|
import {
|
|
59
59
|
CLAUDE_CONFIG_DIR_ENV,
|
|
60
60
|
approveApiKeyInClaudeConfig,
|
|
@@ -6574,4 +6574,4 @@ export {
|
|
|
6574
6574
|
stopAllSessionsAndWait,
|
|
6575
6575
|
getProjectDir
|
|
6576
6576
|
};
|
|
6577
|
-
//# sourceMappingURL=chunk-
|
|
6577
|
+
//# sourceMappingURL=chunk-QSIKMH7L.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_ROTATE_KEY_CONFLICT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LAJEUIP7.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/config.ts
|
|
6
6
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/lib/api-client.ts
|
|
106
|
-
var agtCliVersion = true ? "0.28.
|
|
106
|
+
var agtCliVersion = true ? "0.28.1290" : "dev";
|
|
107
107
|
var lastConfigHash = null;
|
|
108
108
|
function setConfigHash(hash) {
|
|
109
109
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
api,
|
|
469
469
|
getHostId
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-XDMJSKLQ.js.map
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
probeClaudeInstalls,
|
|
14
14
|
readsAsNativeInstall,
|
|
15
15
|
shouldRunClaudeCodeUpdater
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IPWGWDON.js";
|
|
17
17
|
import "./chunk-XWVM4KPK.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-LAJEUIP7.js";
|
|
19
19
|
import "./chunk-AIUIMEUS.js";
|
|
20
20
|
import "./chunk-DGUM43GV.js";
|
|
21
21
|
export {
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
readsAsNativeInstall,
|
|
35
35
|
shouldRunClaudeCodeUpdater
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=claude-code-updater-
|
|
37
|
+
//# sourceMappingURL=claude-code-updater-NBWLPWZU.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
redactPaneFrame,
|
|
12
12
|
sanitizeTerminalFrame
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LAJEUIP7.js";
|
|
14
14
|
import {
|
|
15
15
|
CLAUDE_CONFIG_DIR_ENV,
|
|
16
16
|
claudeConfigDirFor,
|
|
@@ -323,7 +323,7 @@ async function spawnPairSession(session) {
|
|
|
323
323
|
return { ok: true };
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
326
|
+
const { resolveClaudeBinary } = await import("./persistent-session-Q5FJJAFR.js");
|
|
327
327
|
const claudeBin = resolveClaudeBinary();
|
|
328
328
|
const pairEnv = {
|
|
329
329
|
...process.env,
|
|
@@ -838,4 +838,4 @@ export {
|
|
|
838
838
|
startClaudePair,
|
|
839
839
|
submitClaudePairCode
|
|
840
840
|
};
|
|
841
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
841
|
+
//# sourceMappingURL=claude-pair-runtime-3RJNQ3XJ.js.map
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
tripClass,
|
|
71
71
|
writeEtcEnvironment,
|
|
72
72
|
writeProfileDScript
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-6YJL5HCY.js";
|
|
74
74
|
import {
|
|
75
75
|
ApiError,
|
|
76
76
|
adoptHostKeyInProcess,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
probeHostKey,
|
|
89
89
|
requireHost,
|
|
90
90
|
setConfigHash
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-XDMJSKLQ.js";
|
|
92
92
|
import {
|
|
93
93
|
BLOCKED_ON_PROMPT_DECISION,
|
|
94
94
|
CHANNEL_SECRET_ENV_KEYS,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
webFetchBaselineValue,
|
|
181
181
|
webFetchRestartNeeded,
|
|
182
182
|
writeEgressAllowlist
|
|
183
|
-
} from "../chunk-
|
|
183
|
+
} from "../chunk-QSIKMH7L.js";
|
|
184
184
|
import {
|
|
185
185
|
isAgentIdle,
|
|
186
186
|
isStaleForToday,
|
|
@@ -191,7 +191,7 @@ import {
|
|
|
191
191
|
subagentActivityAgeSeconds,
|
|
192
192
|
subagentTranscriptDir,
|
|
193
193
|
transcriptActivityAgeSeconds
|
|
194
|
-
} from "../chunk-
|
|
194
|
+
} from "../chunk-3NCSZIK4.js";
|
|
195
195
|
import {
|
|
196
196
|
classifyUnanswerablePane,
|
|
197
197
|
focusedConfirmDialogBlock,
|
|
@@ -217,7 +217,7 @@ import {
|
|
|
217
217
|
runSafeCleanup,
|
|
218
218
|
tightestDiskStat,
|
|
219
219
|
withPackageCacheLock
|
|
220
|
-
} from "../chunk-
|
|
220
|
+
} from "../chunk-IPWGWDON.js";
|
|
221
221
|
import {
|
|
222
222
|
parsePsRows,
|
|
223
223
|
reapOrphanChannelMcps
|
|
@@ -346,7 +346,7 @@ import {
|
|
|
346
346
|
stabiliseResetInstant,
|
|
347
347
|
sumTranscriptUsageInWindow,
|
|
348
348
|
summarizeTranscriptActivity
|
|
349
|
-
} from "../chunk-
|
|
349
|
+
} from "../chunk-LAJEUIP7.js";
|
|
350
350
|
import {
|
|
351
351
|
CLAUDE_CONFIG_DIR_ENV,
|
|
352
352
|
claudeConfigDirFor,
|
|
@@ -15444,7 +15444,7 @@ function createFileMigrationReportIO(codeName, log2) {
|
|
|
15444
15444
|
};
|
|
15445
15445
|
}
|
|
15446
15446
|
var managerHostPost = async (path, body) => {
|
|
15447
|
-
const { api: api2, ApiError: ApiError3 } = await import("../api-client-
|
|
15447
|
+
const { api: api2, ApiError: ApiError3 } = await import("../api-client-G5MBBP5G.js");
|
|
15448
15448
|
try {
|
|
15449
15449
|
const json = await api2.post(path, body);
|
|
15450
15450
|
return { status: 200, json };
|
|
@@ -17499,7 +17499,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
17499
17499
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
17500
17500
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
17501
17501
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
17502
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
17502
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-EYIQ2RPD.js");
|
|
17503
17503
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
17504
17504
|
if (newest === null) return null;
|
|
17505
17505
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -18380,7 +18380,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
18380
18380
|
var lastVersionCheckAt = 0;
|
|
18381
18381
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
18382
18382
|
var lastResponsivenessProbeAt = 0;
|
|
18383
|
-
var agtCliVersion = true ? "0.28.
|
|
18383
|
+
var agtCliVersion = true ? "0.28.1290" : "dev";
|
|
18384
18384
|
function resolveBrewPath(execFileSync5) {
|
|
18385
18385
|
try {
|
|
18386
18386
|
const out = execFileSync5("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -20491,7 +20491,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
20491
20491
|
if (codeNames.length === 0) return;
|
|
20492
20492
|
void (async () => {
|
|
20493
20493
|
try {
|
|
20494
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20494
|
+
const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
|
|
20495
20495
|
await api.post("/host/heartbeat", {
|
|
20496
20496
|
host_id: hostId,
|
|
20497
20497
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -20634,7 +20634,7 @@ async function pollCycleInner() {
|
|
|
20634
20634
|
}
|
|
20635
20635
|
try {
|
|
20636
20636
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
20637
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20637
|
+
const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
|
|
20638
20638
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
20639
20639
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
|
|
20640
20640
|
let tailscaleHostname;
|
|
@@ -20933,7 +20933,7 @@ async function pollCycleInner() {
|
|
|
20933
20933
|
}
|
|
20934
20934
|
try {
|
|
20935
20935
|
const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
|
|
20936
|
-
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-
|
|
20936
|
+
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-NBWLPWZU.js");
|
|
20937
20937
|
const securityFloor = currentSecurityFloor();
|
|
20938
20938
|
claudeUpdaterInFlight = true;
|
|
20939
20939
|
if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
|
|
@@ -20968,7 +20968,7 @@ async function pollCycleInner() {
|
|
|
20968
20968
|
collectPanelessActivityProbes,
|
|
20969
20969
|
getResponsivenessIntervalMs,
|
|
20970
20970
|
occupancyQualificationClassifications
|
|
20971
|
-
} = await import("../responsiveness-probe-
|
|
20971
|
+
} = await import("../responsiveness-probe-EYIQ2RPD.js");
|
|
20972
20972
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
20973
20973
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
20974
20974
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -21085,7 +21085,7 @@ async function pollCycleInner() {
|
|
|
21085
21085
|
collectResponsivenessProbes,
|
|
21086
21086
|
livePendingInboundOldestAgeSeconds,
|
|
21087
21087
|
parkPendingInbound
|
|
21088
|
-
} = await import("../responsiveness-probe-
|
|
21088
|
+
} = await import("../responsiveness-probe-EYIQ2RPD.js");
|
|
21089
21089
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-5PCBGRNY.js");
|
|
21090
21090
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
21091
21091
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -21371,7 +21371,7 @@ async function pollCycleInner() {
|
|
|
21371
21371
|
}
|
|
21372
21372
|
}
|
|
21373
21373
|
);
|
|
21374
|
-
const { parkPendingInbound } = await import("../responsiveness-probe-
|
|
21374
|
+
const { parkPendingInbound } = await import("../responsiveness-probe-EYIQ2RPD.js");
|
|
21375
21375
|
const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
|
|
21376
21376
|
paneFatalStreak.delete(codeName);
|
|
21377
21377
|
paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
|
|
@@ -21402,7 +21402,7 @@ async function pollCycleInner() {
|
|
|
21402
21402
|
TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
|
|
21403
21403
|
bindSourceEscalations
|
|
21404
21404
|
} = await import("../transcript-mount-health-OHE6IVJV.js");
|
|
21405
|
-
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-
|
|
21405
|
+
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-Q5FJJAFR.js");
|
|
21406
21406
|
const mountConfig = resolveTranscriptMountConfig();
|
|
21407
21407
|
const liveAgents = agentState.persistentSessionAgents;
|
|
21408
21408
|
for (const tracked of [
|
|
@@ -21567,7 +21567,7 @@ async function pollCycleInner() {
|
|
|
21567
21567
|
}
|
|
21568
21568
|
try {
|
|
21569
21569
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
21570
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
21570
|
+
const { probeSessionAuth } = await import("../session-auth-dead-TYDPUWCV.js");
|
|
21571
21571
|
const observations = [];
|
|
21572
21572
|
const pendingCacheCommits = [];
|
|
21573
21573
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -26678,7 +26678,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
26678
26678
|
if (!refreshData) return;
|
|
26679
26679
|
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
26680
26680
|
const hostId = await getHostId();
|
|
26681
|
-
const parkForRestart = await import("../responsiveness-probe-
|
|
26681
|
+
const parkForRestart = await import("../responsiveness-probe-EYIQ2RPD.js").then(
|
|
26682
26682
|
(m) => m.parkPendingInbound,
|
|
26683
26683
|
(err) => err
|
|
26684
26684
|
);
|
|
@@ -26755,7 +26755,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
26755
26755
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
26756
26756
|
void (async () => {
|
|
26757
26757
|
try {
|
|
26758
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
26758
|
+
const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
|
|
26759
26759
|
await api.post("/host/heartbeat", {
|
|
26760
26760
|
host_id: hostId,
|
|
26761
26761
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -26808,7 +26808,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
26808
26808
|
}
|
|
26809
26809
|
try {
|
|
26810
26810
|
const hostId = await getHostId();
|
|
26811
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
26811
|
+
const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
|
|
26812
26812
|
await api.post("/host/heartbeat", {
|
|
26813
26813
|
host_id: hostId,
|
|
26814
26814
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -27547,7 +27547,7 @@ async function processClaudePairSessions(agents) {
|
|
|
27547
27547
|
snapshotPairConfig,
|
|
27548
27548
|
// ENG-11659: result -> report body + the manager.log line that records it.
|
|
27549
27549
|
planPairStartReport
|
|
27550
|
-
} = await import("../claude-pair-runtime-
|
|
27550
|
+
} = await import("../claude-pair-runtime-3RJNQ3XJ.js");
|
|
27551
27551
|
const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
|
|
27552
27552
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
27553
27553
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
@@ -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
|
|
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
|
|
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
|
package/dist/mcp/origami.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
125618
|
-
|
|
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
|
|
125657
|
+
const held = parseScopeSet(effectiveScopes);
|
|
125623
125658
|
return (toolName) => {
|
|
125624
|
-
|
|
125625
|
-
|
|
125626
|
-
|
|
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
|
|
125673
|
+
if (effectiveScopes != null && !parseScopeSet(effectiveScopes).has("payroll.employees.read")) {
|
|
125641
125674
|
console.error(
|
|
125642
|
-
"xero-mcp-server: agent policy
|
|
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-
|
|
89
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
184
|
+
//# sourceMappingURL=persistent-session-Q5FJJAFR.js.map
|