@integrity-labs/agt-cli 0.28.1085 → 0.28.1087
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agt.js +5 -5
- package/dist/{chunk-QJHOJMYV.js → chunk-EKFINAHM.js} +4 -4
- package/dist/{chunk-672WJ7K3.js → chunk-HN6B5G5V.js} +2 -2
- package/dist/{chunk-36PNRFZD.js → chunk-YOIJFB4J.js} +7 -7
- package/dist/chunk-YOIJFB4J.js.map +1 -0
- package/dist/{claude-pair-runtime-P5RI3SNT.js → claude-pair-runtime-XZXUHC4Q.js} +2 -2
- package/dist/lib/manager-worker.js +16 -16
- package/dist/mcp/direct-chat-channel.js +5 -5
- package/dist/mcp/index.js +8 -8
- package/dist/mcp/origami.js +5 -5
- package/dist/mcp/slack-channel.js +5 -5
- package/dist/mcp/telegram-channel.js +5 -5
- package/dist/mcp/xero.js +70 -48
- package/dist/{persistent-session-V2TJ6HPL.js → persistent-session-QVJASJSQ.js} +3 -3
- package/dist/{responsiveness-probe-2JSH5Y3H.js → responsiveness-probe-AZSZBDKL.js} +3 -3
- package/dist/{session-auth-dead-WUMWF4GK.js → session-auth-dead-VY7AZM77.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-36PNRFZD.js.map +0 -1
- /package/dist/{chunk-QJHOJMYV.js.map → chunk-EKFINAHM.js.map} +0 -0
- /package/dist/{chunk-672WJ7K3.js.map → chunk-HN6B5G5V.js.map} +0 -0
- /package/dist/{claude-pair-runtime-P5RI3SNT.js.map → claude-pair-runtime-XZXUHC4Q.js.map} +0 -0
- /package/dist/{persistent-session-V2TJ6HPL.js.map → persistent-session-QVJASJSQ.js.map} +0 -0
- /package/dist/{responsiveness-probe-2JSH5Y3H.js.map → responsiveness-probe-AZSZBDKL.js.map} +0 -0
- /package/dist/{session-auth-dead-WUMWF4GK.js.map → session-auth-dead-VY7AZM77.js.map} +0 -0
|
@@ -266,7 +266,7 @@ async function spawnPairSession(session) {
|
|
|
266
266
|
return { ok: true };
|
|
267
267
|
} catch {
|
|
268
268
|
}
|
|
269
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
269
|
+
const { resolveClaudeBinary } = await import("./persistent-session-QVJASJSQ.js");
|
|
270
270
|
const claudeBin = resolveClaudeBinary();
|
|
271
271
|
const pairEnv = {
|
|
272
272
|
...process.env,
|
|
@@ -734,4 +734,4 @@ export {
|
|
|
734
734
|
startClaudePair,
|
|
735
735
|
submitClaudePairCode
|
|
736
736
|
};
|
|
737
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
737
|
+
//# sourceMappingURL=claude-pair-runtime-XZXUHC4Q.js.map
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
safeWriteJsonAtomic,
|
|
68
68
|
setConfigHash,
|
|
69
69
|
tripClass
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-EKFINAHM.js";
|
|
71
71
|
import {
|
|
72
72
|
getProjectDir as getProjectDir2,
|
|
73
73
|
getReadyTasks,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
webFetchBaselineValue,
|
|
155
155
|
webFetchRestartNeeded,
|
|
156
156
|
writeEgressAllowlist
|
|
157
|
-
} from "../chunk-
|
|
157
|
+
} from "../chunk-HN6B5G5V.js";
|
|
158
158
|
import {
|
|
159
159
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
160
160
|
AnchorSessionClient,
|
|
@@ -264,7 +264,7 @@ import {
|
|
|
264
264
|
subagentActivityAgeSeconds,
|
|
265
265
|
sumTranscriptUsageInWindow,
|
|
266
266
|
transcriptActivityAgeSeconds
|
|
267
|
-
} from "../chunk-
|
|
267
|
+
} from "../chunk-YOIJFB4J.js";
|
|
268
268
|
import {
|
|
269
269
|
classifyUnanswerablePane,
|
|
270
270
|
paneRemedy
|
|
@@ -14142,7 +14142,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
14142
14142
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
14143
14143
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
14144
14144
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
14145
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
14145
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-AZSZBDKL.js");
|
|
14146
14146
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
14147
14147
|
if (newest === null) return null;
|
|
14148
14148
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -14900,7 +14900,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
14900
14900
|
var lastVersionCheckAt = 0;
|
|
14901
14901
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
14902
14902
|
var lastResponsivenessProbeAt = 0;
|
|
14903
|
-
var agtCliVersion = true ? "0.28.
|
|
14903
|
+
var agtCliVersion = true ? "0.28.1087" : "dev";
|
|
14904
14904
|
function resolveBrewPath(execFileSync3) {
|
|
14905
14905
|
try {
|
|
14906
14906
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -16517,7 +16517,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
16517
16517
|
if (codeNames.length === 0) return;
|
|
16518
16518
|
void (async () => {
|
|
16519
16519
|
try {
|
|
16520
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16520
|
+
const { collectDiagnostics } = await import("../persistent-session-QVJASJSQ.js");
|
|
16521
16521
|
await api.post("/host/heartbeat", {
|
|
16522
16522
|
host_id: hostId,
|
|
16523
16523
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -16659,7 +16659,7 @@ async function pollCycleInner() {
|
|
|
16659
16659
|
}
|
|
16660
16660
|
try {
|
|
16661
16661
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
16662
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16662
|
+
const { collectDiagnostics } = await import("../persistent-session-QVJASJSQ.js");
|
|
16663
16663
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
16664
16664
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
|
|
16665
16665
|
let tailscaleHostname;
|
|
@@ -16867,7 +16867,7 @@ async function pollCycleInner() {
|
|
|
16867
16867
|
collectPanelessActivityProbes,
|
|
16868
16868
|
getResponsivenessIntervalMs,
|
|
16869
16869
|
occupancyQualificationClassifications
|
|
16870
|
-
} = await import("../responsiveness-probe-
|
|
16870
|
+
} = await import("../responsiveness-probe-AZSZBDKL.js");
|
|
16871
16871
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
16872
16872
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
16873
16873
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -16984,7 +16984,7 @@ async function pollCycleInner() {
|
|
|
16984
16984
|
collectResponsivenessProbes,
|
|
16985
16985
|
livePendingInboundOldestAgeSeconds,
|
|
16986
16986
|
parkPendingInbound
|
|
16987
|
-
} = await import("../responsiveness-probe-
|
|
16987
|
+
} = await import("../responsiveness-probe-AZSZBDKL.js");
|
|
16988
16988
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
|
|
16989
16989
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
16990
16990
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -17270,7 +17270,7 @@ async function pollCycleInner() {
|
|
|
17270
17270
|
}
|
|
17271
17271
|
}
|
|
17272
17272
|
);
|
|
17273
|
-
const { parkPendingInbound } = await import("../responsiveness-probe-
|
|
17273
|
+
const { parkPendingInbound } = await import("../responsiveness-probe-AZSZBDKL.js");
|
|
17274
17274
|
const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
|
|
17275
17275
|
paneFatalStreak.delete(codeName);
|
|
17276
17276
|
paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
|
|
@@ -17301,7 +17301,7 @@ async function pollCycleInner() {
|
|
|
17301
17301
|
TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
|
|
17302
17302
|
bindSourceEscalations
|
|
17303
17303
|
} = await import("../transcript-mount-health-OHE6IVJV.js");
|
|
17304
|
-
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-
|
|
17304
|
+
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-QVJASJSQ.js");
|
|
17305
17305
|
const mountConfig = resolveTranscriptMountConfig();
|
|
17306
17306
|
const liveAgents = agentState.persistentSessionAgents;
|
|
17307
17307
|
for (const tracked of [
|
|
@@ -17466,7 +17466,7 @@ async function pollCycleInner() {
|
|
|
17466
17466
|
}
|
|
17467
17467
|
try {
|
|
17468
17468
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
17469
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
17469
|
+
const { probeSessionAuth } = await import("../session-auth-dead-VY7AZM77.js");
|
|
17470
17470
|
const observations = [];
|
|
17471
17471
|
const pendingCacheCommits = [];
|
|
17472
17472
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -22038,7 +22038,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
22038
22038
|
try {
|
|
22039
22039
|
const freshId = rotateSessionForWedge(codeName);
|
|
22040
22040
|
consecutiveWedgeCycles.delete(codeName);
|
|
22041
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
22041
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-AZSZBDKL.js");
|
|
22042
22042
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
22043
22043
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
22044
22044
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -22081,7 +22081,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
22081
22081
|
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}`));
|
|
22082
22082
|
void (async () => {
|
|
22083
22083
|
try {
|
|
22084
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
22084
|
+
const { collectDiagnostics } = await import("../persistent-session-QVJASJSQ.js");
|
|
22085
22085
|
await api.post("/host/heartbeat", {
|
|
22086
22086
|
host_id: hostId,
|
|
22087
22087
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -22132,7 +22132,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
22132
22132
|
}
|
|
22133
22133
|
try {
|
|
22134
22134
|
const hostId = await getHostId();
|
|
22135
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
22135
|
+
const { collectDiagnostics } = await import("../persistent-session-QVJASJSQ.js");
|
|
22136
22136
|
await api.post("/host/heartbeat", {
|
|
22137
22137
|
host_id: hostId,
|
|
22138
22138
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -22804,7 +22804,7 @@ async function processClaudePairSessions(agents) {
|
|
|
22804
22804
|
// cannot take it for itself — by the time it runs, the write it is looking
|
|
22805
22805
|
// for may already have happened.
|
|
22806
22806
|
snapshotPairConfig
|
|
22807
|
-
} = await import("../claude-pair-runtime-
|
|
22807
|
+
} = await import("../claude-pair-runtime-XZXUHC4Q.js");
|
|
22808
22808
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
22809
22809
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
22810
22810
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -33999,13 +33999,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
33999
33999
|
id: "image-gen",
|
|
34000
34000
|
name: "Image Generation",
|
|
34001
34001
|
category: "media",
|
|
34002
|
-
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on
|
|
34002
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on a Ninja Canvas page (ENG-7535). Ninjafy manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
34003
34003
|
// No vendor key to enter: Ninjafy owns the shared Vercel AI Gateway virtual
|
|
34004
34004
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
34005
34005
|
// (customers never enter a key), same as ElevenLabs.
|
|
34006
34006
|
supported_auth_types: ["none"],
|
|
34007
34007
|
capabilities: [
|
|
34008
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or
|
|
34008
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or a Ninja Canvas page", access: "write" }
|
|
34009
34009
|
],
|
|
34010
34010
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
34011
34011
|
beta: true,
|
|
@@ -36861,7 +36861,7 @@ var FLAG_REGISTRY = [
|
|
|
36861
36861
|
},
|
|
36862
36862
|
{
|
|
36863
36863
|
key: "live-page-comments",
|
|
36864
|
-
description: "Text-selection commenting on public
|
|
36864
|
+
description: "Text-selection commenting on public Ninja Canvas pages for authenticated team members (ENG-6788). When on, a member viewing live.augmented.team/{slug} can select text and send a comment to the agent via the relay bridge; evaluated per-org in GET /artifacts/:slug/comment-access. Additive feature, not an enforcement control. Boolean gate; ships dark.",
|
|
36865
36865
|
flagType: "boolean",
|
|
36866
36866
|
defaultValue: false
|
|
36867
36867
|
},
|
|
@@ -36913,14 +36913,14 @@ var FLAG_REGISTRY = [
|
|
|
36913
36913
|
},
|
|
36914
36914
|
{
|
|
36915
36915
|
key: "augmented-live-stream-producer",
|
|
36916
|
-
description: "
|
|
36916
|
+
description: "Ninja Canvas live-preview streaming producer (ENG-7210). The receiver (codec, artifact-draft channel, stream route, console Live Preview tab) shipped under ENG-6234 but never engages because nothing writes the working file the manager scanner watches. When ON for an org, a host-side PostToolUse hook mirrors agt-live.publish/editing content to ~/.augmented/{codeName}/artifacts/<slug>/index.html, so the scanner mints a draft and streams a keyframe to the console Live Preview tab. Additive, best-effort. Boolean gate; ships dark. Materialized to the host flags-cache; the bash hook reads it (operator/canary override AGT_LIVE_STREAM_PRODUCER_ENABLED).",
|
|
36917
36917
|
flagType: "boolean",
|
|
36918
36918
|
defaultValue: false,
|
|
36919
36919
|
envVar: "AGT_LIVE_STREAM_PRODUCER_ENABLED"
|
|
36920
36920
|
},
|
|
36921
36921
|
{
|
|
36922
36922
|
key: "auto-provision-agt-live",
|
|
36923
|
-
description: "Auto-provision the
|
|
36923
|
+
description: "Auto-provision the Ninja Canvas integration (free tier, watermarked) into every NEW organization as an org-scoped install (ENG-7819). Consumed in TWO places: the seed_default_live_integration AFTER INSERT trigger on organizations reads the EXPLICIT feature_flags row (a plpgsql trigger cannot see this compiled default, so dark = no row = trigger no-ops; flipping the flag on this page writes the row the trigger reads - GLOBAL value only, per-org overrides are not consulted by the trigger), and the POST /organizations route evaluates it normally to send the owner provisioning notice. Restricted-posture orgs are skipped; opt-out (remove/block) is permanent - no reconciler. Boolean gate; ships dark. Pre-flip gates: docs/operator/default-integrations-admission.md.",
|
|
36924
36924
|
flagType: "boolean",
|
|
36925
36925
|
defaultValue: false,
|
|
36926
36926
|
// Grants every new open org a public-publishing capability by default;
|
package/dist/mcp/index.js
CHANGED
|
@@ -26502,13 +26502,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
26502
26502
|
id: "image-gen",
|
|
26503
26503
|
name: "Image Generation",
|
|
26504
26504
|
category: "media",
|
|
26505
|
-
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on
|
|
26505
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on a Ninja Canvas page (ENG-7535). Ninjafy manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
26506
26506
|
// No vendor key to enter: Ninjafy owns the shared Vercel AI Gateway virtual
|
|
26507
26507
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
26508
26508
|
// (customers never enter a key), same as ElevenLabs.
|
|
26509
26509
|
supported_auth_types: ["none"],
|
|
26510
26510
|
capabilities: [
|
|
26511
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or
|
|
26511
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or a Ninja Canvas page", access: "write" }
|
|
26512
26512
|
],
|
|
26513
26513
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
26514
26514
|
beta: true,
|
|
@@ -29079,7 +29079,7 @@ var FLAG_REGISTRY = [
|
|
|
29079
29079
|
},
|
|
29080
29080
|
{
|
|
29081
29081
|
key: "live-page-comments",
|
|
29082
|
-
description: "Text-selection commenting on public
|
|
29082
|
+
description: "Text-selection commenting on public Ninja Canvas pages for authenticated team members (ENG-6788). When on, a member viewing live.augmented.team/{slug} can select text and send a comment to the agent via the relay bridge; evaluated per-org in GET /artifacts/:slug/comment-access. Additive feature, not an enforcement control. Boolean gate; ships dark.",
|
|
29083
29083
|
flagType: "boolean",
|
|
29084
29084
|
defaultValue: false
|
|
29085
29085
|
},
|
|
@@ -29131,14 +29131,14 @@ var FLAG_REGISTRY = [
|
|
|
29131
29131
|
},
|
|
29132
29132
|
{
|
|
29133
29133
|
key: "augmented-live-stream-producer",
|
|
29134
|
-
description: "
|
|
29134
|
+
description: "Ninja Canvas live-preview streaming producer (ENG-7210). The receiver (codec, artifact-draft channel, stream route, console Live Preview tab) shipped under ENG-6234 but never engages because nothing writes the working file the manager scanner watches. When ON for an org, a host-side PostToolUse hook mirrors agt-live.publish/editing content to ~/.augmented/{codeName}/artifacts/<slug>/index.html, so the scanner mints a draft and streams a keyframe to the console Live Preview tab. Additive, best-effort. Boolean gate; ships dark. Materialized to the host flags-cache; the bash hook reads it (operator/canary override AGT_LIVE_STREAM_PRODUCER_ENABLED).",
|
|
29135
29135
|
flagType: "boolean",
|
|
29136
29136
|
defaultValue: false,
|
|
29137
29137
|
envVar: "AGT_LIVE_STREAM_PRODUCER_ENABLED"
|
|
29138
29138
|
},
|
|
29139
29139
|
{
|
|
29140
29140
|
key: "auto-provision-agt-live",
|
|
29141
|
-
description: "Auto-provision the
|
|
29141
|
+
description: "Auto-provision the Ninja Canvas integration (free tier, watermarked) into every NEW organization as an org-scoped install (ENG-7819). Consumed in TWO places: the seed_default_live_integration AFTER INSERT trigger on organizations reads the EXPLICIT feature_flags row (a plpgsql trigger cannot see this compiled default, so dark = no row = trigger no-ops; flipping the flag on this page writes the row the trigger reads - GLOBAL value only, per-org overrides are not consulted by the trigger), and the POST /organizations route evaluates it normally to send the owner provisioning notice. Restricted-posture orgs are skipped; opt-out (remove/block) is permanent - no reconciler. Boolean gate; ships dark. Pre-flip gates: docs/operator/default-integrations-admission.md.",
|
|
29142
29142
|
flagType: "boolean",
|
|
29143
29143
|
defaultValue: false,
|
|
29144
29144
|
// Grants every new open org a public-publishing capability by default;
|
|
@@ -51054,7 +51054,7 @@ server.tool(
|
|
|
51054
51054
|
);
|
|
51055
51055
|
server.tool(
|
|
51056
51056
|
"artefacts_analytics",
|
|
51057
|
-
"Get
|
|
51057
|
+
"Get Ninja Canvas viewer analytics (views, unique visitors, dwell time, 30-day trend) for the agent's published work. Pass artefact_id for one artefact, or project_id for a whole series/project (total + per-episode breakdown + combined trend). Exactly one of artefact_id or project_id is required. Requires Augmented Live Premium.",
|
|
51058
51058
|
{
|
|
51059
51059
|
artefact_id: external_exports.string().uuid().optional().describe("Analytics for a single published artefact (id from artefacts_list / artefacts_resolve)."),
|
|
51060
51060
|
project_id: external_exports.string().uuid().optional().describe("Rolled-up analytics for a whole project/series (id from projects_list): total + per-episode + trend.")
|
|
@@ -51305,9 +51305,9 @@ async function resolveArtefactText(url) {
|
|
|
51305
51305
|
}
|
|
51306
51306
|
server.tool(
|
|
51307
51307
|
"artefacts_resolve",
|
|
51308
|
-
"Resolve
|
|
51308
|
+
"Resolve a Ninja Canvas URL (e.g. https://live.augmented.team/<slug>) or a bare slug to the internal artefact id, so you can act on a link someone shared. Returns the id plus title, kind, status, project, and the CONTENT url. Resolves any published artefact in your ORGANISATION, not just your own - so a link a teammate or a human shared with you works. Note the shell/content split: the page URL serves a wrapper that loads the body from the content URL, so fetch the content URL to read what is on the page. The content-returning tools (artefacts_get, artefacts_download, artefacts_get_source_chunk) remain limited to artefacts YOU published.",
|
|
51309
51309
|
{
|
|
51310
|
-
url: external_exports.string().min(1).describe("
|
|
51310
|
+
url: external_exports.string().min(1).describe("A Ninja Canvas URL or the bare slug from one (the last path segment)")
|
|
51311
51311
|
},
|
|
51312
51312
|
async (params) => ({
|
|
51313
51313
|
content: [{ type: "text", text: await resolveArtefactText(params.url) }]
|
package/dist/mcp/origami.js
CHANGED
|
@@ -40628,13 +40628,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
40628
40628
|
id: "image-gen",
|
|
40629
40629
|
name: "Image Generation",
|
|
40630
40630
|
category: "media",
|
|
40631
|
-
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on
|
|
40631
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on a Ninja Canvas page (ENG-7535). Ninjafy manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
40632
40632
|
// No vendor key to enter: Ninjafy owns the shared Vercel AI Gateway virtual
|
|
40633
40633
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
40634
40634
|
// (customers never enter a key), same as ElevenLabs.
|
|
40635
40635
|
supported_auth_types: ["none"],
|
|
40636
40636
|
capabilities: [
|
|
40637
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or
|
|
40637
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or a Ninja Canvas page", access: "write" }
|
|
40638
40638
|
],
|
|
40639
40639
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
40640
40640
|
beta: true,
|
|
@@ -43002,7 +43002,7 @@ var FLAG_REGISTRY = [
|
|
|
43002
43002
|
},
|
|
43003
43003
|
{
|
|
43004
43004
|
key: "live-page-comments",
|
|
43005
|
-
description: "Text-selection commenting on public
|
|
43005
|
+
description: "Text-selection commenting on public Ninja Canvas pages for authenticated team members (ENG-6788). When on, a member viewing live.augmented.team/{slug} can select text and send a comment to the agent via the relay bridge; evaluated per-org in GET /artifacts/:slug/comment-access. Additive feature, not an enforcement control. Boolean gate; ships dark.",
|
|
43006
43006
|
flagType: "boolean",
|
|
43007
43007
|
defaultValue: false
|
|
43008
43008
|
},
|
|
@@ -43054,14 +43054,14 @@ var FLAG_REGISTRY = [
|
|
|
43054
43054
|
},
|
|
43055
43055
|
{
|
|
43056
43056
|
key: "augmented-live-stream-producer",
|
|
43057
|
-
description: "
|
|
43057
|
+
description: "Ninja Canvas live-preview streaming producer (ENG-7210). The receiver (codec, artifact-draft channel, stream route, console Live Preview tab) shipped under ENG-6234 but never engages because nothing writes the working file the manager scanner watches. When ON for an org, a host-side PostToolUse hook mirrors agt-live.publish/editing content to ~/.augmented/{codeName}/artifacts/<slug>/index.html, so the scanner mints a draft and streams a keyframe to the console Live Preview tab. Additive, best-effort. Boolean gate; ships dark. Materialized to the host flags-cache; the bash hook reads it (operator/canary override AGT_LIVE_STREAM_PRODUCER_ENABLED).",
|
|
43058
43058
|
flagType: "boolean",
|
|
43059
43059
|
defaultValue: false,
|
|
43060
43060
|
envVar: "AGT_LIVE_STREAM_PRODUCER_ENABLED"
|
|
43061
43061
|
},
|
|
43062
43062
|
{
|
|
43063
43063
|
key: "auto-provision-agt-live",
|
|
43064
|
-
description: "Auto-provision the
|
|
43064
|
+
description: "Auto-provision the Ninja Canvas integration (free tier, watermarked) into every NEW organization as an org-scoped install (ENG-7819). Consumed in TWO places: the seed_default_live_integration AFTER INSERT trigger on organizations reads the EXPLICIT feature_flags row (a plpgsql trigger cannot see this compiled default, so dark = no row = trigger no-ops; flipping the flag on this page writes the row the trigger reads - GLOBAL value only, per-org overrides are not consulted by the trigger), and the POST /organizations route evaluates it normally to send the owner provisioning notice. Restricted-posture orgs are skipped; opt-out (remove/block) is permanent - no reconciler. Boolean gate; ships dark. Pre-flip gates: docs/operator/default-integrations-admission.md.",
|
|
43065
43065
|
flagType: "boolean",
|
|
43066
43066
|
defaultValue: false,
|
|
43067
43067
|
// Grants every new open org a public-publishing capability by default;
|
|
@@ -34842,13 +34842,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
34842
34842
|
id: "image-gen",
|
|
34843
34843
|
name: "Image Generation",
|
|
34844
34844
|
category: "media",
|
|
34845
|
-
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on
|
|
34845
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on a Ninja Canvas page (ENG-7535). Ninjafy manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
34846
34846
|
// No vendor key to enter: Ninjafy owns the shared Vercel AI Gateway virtual
|
|
34847
34847
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
34848
34848
|
// (customers never enter a key), same as ElevenLabs.
|
|
34849
34849
|
supported_auth_types: ["none"],
|
|
34850
34850
|
capabilities: [
|
|
34851
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or
|
|
34851
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or a Ninja Canvas page", access: "write" }
|
|
34852
34852
|
],
|
|
34853
34853
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
34854
34854
|
beta: true,
|
|
@@ -37632,7 +37632,7 @@ var FLAG_REGISTRY = [
|
|
|
37632
37632
|
},
|
|
37633
37633
|
{
|
|
37634
37634
|
key: "live-page-comments",
|
|
37635
|
-
description: "Text-selection commenting on public
|
|
37635
|
+
description: "Text-selection commenting on public Ninja Canvas pages for authenticated team members (ENG-6788). When on, a member viewing live.augmented.team/{slug} can select text and send a comment to the agent via the relay bridge; evaluated per-org in GET /artifacts/:slug/comment-access. Additive feature, not an enforcement control. Boolean gate; ships dark.",
|
|
37636
37636
|
flagType: "boolean",
|
|
37637
37637
|
defaultValue: false
|
|
37638
37638
|
},
|
|
@@ -37684,14 +37684,14 @@ var FLAG_REGISTRY = [
|
|
|
37684
37684
|
},
|
|
37685
37685
|
{
|
|
37686
37686
|
key: "augmented-live-stream-producer",
|
|
37687
|
-
description: "
|
|
37687
|
+
description: "Ninja Canvas live-preview streaming producer (ENG-7210). The receiver (codec, artifact-draft channel, stream route, console Live Preview tab) shipped under ENG-6234 but never engages because nothing writes the working file the manager scanner watches. When ON for an org, a host-side PostToolUse hook mirrors agt-live.publish/editing content to ~/.augmented/{codeName}/artifacts/<slug>/index.html, so the scanner mints a draft and streams a keyframe to the console Live Preview tab. Additive, best-effort. Boolean gate; ships dark. Materialized to the host flags-cache; the bash hook reads it (operator/canary override AGT_LIVE_STREAM_PRODUCER_ENABLED).",
|
|
37688
37688
|
flagType: "boolean",
|
|
37689
37689
|
defaultValue: false,
|
|
37690
37690
|
envVar: "AGT_LIVE_STREAM_PRODUCER_ENABLED"
|
|
37691
37691
|
},
|
|
37692
37692
|
{
|
|
37693
37693
|
key: "auto-provision-agt-live",
|
|
37694
|
-
description: "Auto-provision the
|
|
37694
|
+
description: "Auto-provision the Ninja Canvas integration (free tier, watermarked) into every NEW organization as an org-scoped install (ENG-7819). Consumed in TWO places: the seed_default_live_integration AFTER INSERT trigger on organizations reads the EXPLICIT feature_flags row (a plpgsql trigger cannot see this compiled default, so dark = no row = trigger no-ops; flipping the flag on this page writes the row the trigger reads - GLOBAL value only, per-org overrides are not consulted by the trigger), and the POST /organizations route evaluates it normally to send the owner provisioning notice. Restricted-posture orgs are skipped; opt-out (remove/block) is permanent - no reconciler. Boolean gate; ships dark. Pre-flip gates: docs/operator/default-integrations-admission.md.",
|
|
37695
37695
|
flagType: "boolean",
|
|
37696
37696
|
defaultValue: false,
|
|
37697
37697
|
// Grants every new open org a public-publishing capability by default;
|
|
@@ -34948,13 +34948,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
34948
34948
|
id: "image-gen",
|
|
34949
34949
|
name: "Image Generation",
|
|
34950
34950
|
category: "media",
|
|
34951
|
-
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on
|
|
34951
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on a Ninja Canvas page (ENG-7535). Ninjafy manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
34952
34952
|
// No vendor key to enter: Ninjafy owns the shared Vercel AI Gateway virtual
|
|
34953
34953
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
34954
34954
|
// (customers never enter a key), same as ElevenLabs.
|
|
34955
34955
|
supported_auth_types: ["none"],
|
|
34956
34956
|
capabilities: [
|
|
34957
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or
|
|
34957
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or a Ninja Canvas page", access: "write" }
|
|
34958
34958
|
],
|
|
34959
34959
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
34960
34960
|
beta: true,
|
|
@@ -37738,7 +37738,7 @@ var FLAG_REGISTRY = [
|
|
|
37738
37738
|
},
|
|
37739
37739
|
{
|
|
37740
37740
|
key: "live-page-comments",
|
|
37741
|
-
description: "Text-selection commenting on public
|
|
37741
|
+
description: "Text-selection commenting on public Ninja Canvas pages for authenticated team members (ENG-6788). When on, a member viewing live.augmented.team/{slug} can select text and send a comment to the agent via the relay bridge; evaluated per-org in GET /artifacts/:slug/comment-access. Additive feature, not an enforcement control. Boolean gate; ships dark.",
|
|
37742
37742
|
flagType: "boolean",
|
|
37743
37743
|
defaultValue: false
|
|
37744
37744
|
},
|
|
@@ -37790,14 +37790,14 @@ var FLAG_REGISTRY = [
|
|
|
37790
37790
|
},
|
|
37791
37791
|
{
|
|
37792
37792
|
key: "augmented-live-stream-producer",
|
|
37793
|
-
description: "
|
|
37793
|
+
description: "Ninja Canvas live-preview streaming producer (ENG-7210). The receiver (codec, artifact-draft channel, stream route, console Live Preview tab) shipped under ENG-6234 but never engages because nothing writes the working file the manager scanner watches. When ON for an org, a host-side PostToolUse hook mirrors agt-live.publish/editing content to ~/.augmented/{codeName}/artifacts/<slug>/index.html, so the scanner mints a draft and streams a keyframe to the console Live Preview tab. Additive, best-effort. Boolean gate; ships dark. Materialized to the host flags-cache; the bash hook reads it (operator/canary override AGT_LIVE_STREAM_PRODUCER_ENABLED).",
|
|
37794
37794
|
flagType: "boolean",
|
|
37795
37795
|
defaultValue: false,
|
|
37796
37796
|
envVar: "AGT_LIVE_STREAM_PRODUCER_ENABLED"
|
|
37797
37797
|
},
|
|
37798
37798
|
{
|
|
37799
37799
|
key: "auto-provision-agt-live",
|
|
37800
|
-
description: "Auto-provision the
|
|
37800
|
+
description: "Auto-provision the Ninja Canvas integration (free tier, watermarked) into every NEW organization as an org-scoped install (ENG-7819). Consumed in TWO places: the seed_default_live_integration AFTER INSERT trigger on organizations reads the EXPLICIT feature_flags row (a plpgsql trigger cannot see this compiled default, so dark = no row = trigger no-ops; flipping the flag on this page writes the row the trigger reads - GLOBAL value only, per-org overrides are not consulted by the trigger), and the POST /organizations route evaluates it normally to send the owner provisioning notice. Restricted-posture orgs are skipped; opt-out (remove/block) is permanent - no reconciler. Boolean gate; ships dark. Pre-flip gates: docs/operator/default-integrations-admission.md.",
|
|
37801
37801
|
flagType: "boolean",
|
|
37802
37802
|
defaultValue: false,
|
|
37803
37803
|
// Grants every new open org a public-publishing capability by default;
|
package/dist/mcp/xero.js
CHANGED
|
@@ -114339,9 +114339,17 @@ function ensureError(value) {
|
|
|
114339
114339
|
}
|
|
114340
114340
|
|
|
114341
114341
|
// src/helpers/pick-tenant-id.ts
|
|
114342
|
-
|
|
114342
|
+
var UNEXPANDED_PLACEHOLDER = /^\$\{[^}]*\}$/;
|
|
114343
|
+
function normaliseDesiredTenant(raw) {
|
|
114344
|
+
if (typeof raw !== "string") return void 0;
|
|
114345
|
+
const trimmed = raw.trim();
|
|
114346
|
+
if (trimmed === "" || UNEXPANDED_PLACEHOLDER.test(trimmed)) return void 0;
|
|
114347
|
+
return trimmed;
|
|
114348
|
+
}
|
|
114349
|
+
function pickTenantId(tenants, rawDesired) {
|
|
114350
|
+
const desired = normaliseDesiredTenant(rawDesired);
|
|
114343
114351
|
if (!desired) {
|
|
114344
|
-
return tenants[0]
|
|
114352
|
+
return tenants.length === 1 ? tenants[0].tenantId : "";
|
|
114345
114353
|
}
|
|
114346
114354
|
const match = tenants.find((t) => t.tenantId === desired);
|
|
114347
114355
|
if (!match) {
|
|
@@ -114363,6 +114371,49 @@ function currentCallTenant() {
|
|
|
114363
114371
|
return store.getStore()?.tenantId;
|
|
114364
114372
|
}
|
|
114365
114373
|
|
|
114374
|
+
// src/helpers/resolve-call-tenant.ts
|
|
114375
|
+
function describe(allowed) {
|
|
114376
|
+
return allowed.map((t) => t.tenantName ? `${t.tenantName} (${t.tenantId})` : t.tenantId).join(", ");
|
|
114377
|
+
}
|
|
114378
|
+
function resolveCallTenant(allowed, requested) {
|
|
114379
|
+
const wanted = typeof requested === "string" ? requested.trim() : "";
|
|
114380
|
+
if (allowed !== null && allowed.length === 0) {
|
|
114381
|
+
return {
|
|
114382
|
+
ok: false,
|
|
114383
|
+
message: "This agent has no Xero organisations selected, so no Xero call can run. Ask an admin to choose the organisations for this integration."
|
|
114384
|
+
};
|
|
114385
|
+
}
|
|
114386
|
+
if (allowed === null) {
|
|
114387
|
+
if (wanted) {
|
|
114388
|
+
return {
|
|
114389
|
+
ok: false,
|
|
114390
|
+
message: `tenant_id ${wanted} cannot be used: this Xero connection has no organisation list to check it against.`
|
|
114391
|
+
};
|
|
114392
|
+
}
|
|
114393
|
+
return { ok: true, tenantId: void 0 };
|
|
114394
|
+
}
|
|
114395
|
+
if (wanted) {
|
|
114396
|
+
if (allowed.some((t) => t.tenantId === wanted)) return { ok: true, tenantId: wanted };
|
|
114397
|
+
return {
|
|
114398
|
+
ok: false,
|
|
114399
|
+
message: `tenant_id ${wanted} is not one of the Xero organisations this agent may use: ${describe(allowed)}.`
|
|
114400
|
+
};
|
|
114401
|
+
}
|
|
114402
|
+
if (allowed.length === 1) return { ok: true, tenantId: allowed[0].tenantId };
|
|
114403
|
+
return {
|
|
114404
|
+
ok: false,
|
|
114405
|
+
message: `This agent can use more than one Xero organisation, so pass tenant_id. Allowed: ${describe(allowed)}. Call list-organisations to see them.`
|
|
114406
|
+
};
|
|
114407
|
+
}
|
|
114408
|
+
function fallbackAllowedTenants(pinnedTenantId, tokenTenants) {
|
|
114409
|
+
const fromToken = tokenTenants.filter((t) => typeof t?.tenantId === "string" && t.tenantId !== "").map((t) => ({ tenantId: t.tenantId, tenantName: typeof t.tenantName === "string" ? t.tenantName : null }));
|
|
114410
|
+
if (pinnedTenantId) {
|
|
114411
|
+
const match = fromToken.find((t) => t.tenantId === pinnedTenantId);
|
|
114412
|
+
return [{ tenantId: pinnedTenantId, tenantName: match?.tenantName ?? null }];
|
|
114413
|
+
}
|
|
114414
|
+
return fromToken;
|
|
114415
|
+
}
|
|
114416
|
+
|
|
114366
114417
|
// src/clients/broker-credential-client.ts
|
|
114367
114418
|
function makeError(status, message, needsReauth = false) {
|
|
114368
114419
|
const err = new Error(message);
|
|
@@ -114541,6 +114592,15 @@ var MCPXeroClient = class extends import_xero_node.XeroClient {
|
|
|
114541
114592
|
* despite the operator allowing nothing.
|
|
114542
114593
|
*/
|
|
114543
114594
|
allowedTenants = null;
|
|
114595
|
+
/**
|
|
114596
|
+
* CS-1944 (Obi Wan on #6802): the organisations this token carries, for
|
|
114597
|
+
* clients that learn them WITHOUT going through xero-node's updateTenants()
|
|
114598
|
+
* (whose `tenants` is a read-only getter here). Custom Connections read
|
|
114599
|
+
* /connections directly, so without this the unpinned multi-organisation
|
|
114600
|
+
* fallback saw an empty list and refused every call, explicit tenant_id
|
|
114601
|
+
* included.
|
|
114602
|
+
*/
|
|
114603
|
+
tokenTenants = null;
|
|
114544
114604
|
constructor(config2) {
|
|
114545
114605
|
super(config2);
|
|
114546
114606
|
}
|
|
@@ -114561,9 +114621,7 @@ var MCPXeroClient = class extends import_xero_node.XeroClient {
|
|
|
114561
114621
|
async getAllowedTenants() {
|
|
114562
114622
|
await this.authenticate();
|
|
114563
114623
|
if (this.allowedTenants !== null) return this.allowedTenants;
|
|
114564
|
-
|
|
114565
|
-
const match = (this.tenants ?? []).find((t) => t?.tenantId === this.pinnedTenantId);
|
|
114566
|
-
return [{ tenantId: this.pinnedTenantId, tenantName: match?.tenantName ?? null }];
|
|
114624
|
+
return fallbackAllowedTenants(this.pinnedTenantId, this.tokenTenants ?? this.tenants ?? []);
|
|
114567
114625
|
}
|
|
114568
114626
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114569
114627
|
async updateTenants(fullOrgDetails) {
|
|
@@ -114687,12 +114745,9 @@ var CustomConnectionsXeroClient = class extends MCPXeroClient {
|
|
|
114687
114745
|
}
|
|
114688
114746
|
}
|
|
114689
114747
|
);
|
|
114690
|
-
|
|
114691
|
-
|
|
114692
|
-
|
|
114693
|
-
process.env.XERO_TENANT_ID
|
|
114694
|
-
);
|
|
114695
|
-
}
|
|
114748
|
+
const connections = Array.isArray(connectionsResponse.data) ? connectionsResponse.data : [];
|
|
114749
|
+
this.tokenTenants = connections;
|
|
114750
|
+
this.tenantId = pickTenantId(connections, process.env.XERO_TENANT_ID);
|
|
114696
114751
|
return response.data;
|
|
114697
114752
|
}
|
|
114698
114753
|
async authenticate() {
|
|
@@ -120917,12 +120972,14 @@ var ListOrganisationsTool = CreateXeroTool(
|
|
|
120917
120972
|
isError: true
|
|
120918
120973
|
};
|
|
120919
120974
|
}
|
|
120975
|
+
const single = allowed.length === 1;
|
|
120920
120976
|
const lines = allowed.map(
|
|
120921
|
-
(t, i) => `${i + 1}. ${t.tenantName ?? "(name unknown)"} - tenant_id: ${t.tenantId}${
|
|
120977
|
+
(t, i) => `${i + 1}. ${t.tenantName ?? "(name unknown)"} - tenant_id: ${t.tenantId}${single ? " (default)" : ""}`
|
|
120922
120978
|
);
|
|
120979
|
+
const footer = single ? "" : "\nThere is no default: pass tenant_id on every Xero call to choose one of these.";
|
|
120923
120980
|
return {
|
|
120924
120981
|
content: [{ type: "text", text: `Xero organisations this agent may use:
|
|
120925
|
-
${lines.join("\n")}` }]
|
|
120982
|
+
${lines.join("\n")}${footer}` }]
|
|
120926
120983
|
};
|
|
120927
120984
|
} catch (error2) {
|
|
120928
120985
|
return {
|
|
@@ -120934,41 +120991,6 @@ ${lines.join("\n")}` }]
|
|
|
120934
120991
|
);
|
|
120935
120992
|
var list_organisations_tool_default = ListOrganisationsTool;
|
|
120936
120993
|
|
|
120937
|
-
// src/helpers/resolve-call-tenant.ts
|
|
120938
|
-
function describe(allowed) {
|
|
120939
|
-
return allowed.map((t) => t.tenantName ? `${t.tenantName} (${t.tenantId})` : t.tenantId).join(", ");
|
|
120940
|
-
}
|
|
120941
|
-
function resolveCallTenant(allowed, requested) {
|
|
120942
|
-
const wanted = typeof requested === "string" ? requested.trim() : "";
|
|
120943
|
-
if (allowed !== null && allowed.length === 0) {
|
|
120944
|
-
return {
|
|
120945
|
-
ok: false,
|
|
120946
|
-
message: "This agent has no Xero organisations selected, so no Xero call can run. Ask an admin to choose the organisations for this integration."
|
|
120947
|
-
};
|
|
120948
|
-
}
|
|
120949
|
-
if (allowed === null) {
|
|
120950
|
-
if (wanted) {
|
|
120951
|
-
return {
|
|
120952
|
-
ok: false,
|
|
120953
|
-
message: `tenant_id ${wanted} cannot be used: this Xero connection has no organisation list to check it against.`
|
|
120954
|
-
};
|
|
120955
|
-
}
|
|
120956
|
-
return { ok: true, tenantId: void 0 };
|
|
120957
|
-
}
|
|
120958
|
-
if (wanted) {
|
|
120959
|
-
if (allowed.some((t) => t.tenantId === wanted)) return { ok: true, tenantId: wanted };
|
|
120960
|
-
return {
|
|
120961
|
-
ok: false,
|
|
120962
|
-
message: `tenant_id ${wanted} is not one of the Xero organisations this agent may use: ${describe(allowed)}.`
|
|
120963
|
-
};
|
|
120964
|
-
}
|
|
120965
|
-
if (allowed.length === 1) return { ok: true, tenantId: allowed[0].tenantId };
|
|
120966
|
-
return {
|
|
120967
|
-
ok: false,
|
|
120968
|
-
message: `This agent can use more than one Xero organisation, so pass tenant_id. Allowed: ${describe(allowed)}. Call list-organisations to see them.`
|
|
120969
|
-
};
|
|
120970
|
-
}
|
|
120971
|
-
|
|
120972
120994
|
// src/tools/tenant-scope.ts
|
|
120973
120995
|
var TENANT_ID_ARG_DESCRIPTION = "Optional. The Xero organisation id (tenant) to use. Needed only when this agent can use more than one Xero organisation; call list-organisations to see them. Defaults to the only allowed organisation.";
|
|
120974
120996
|
function errorResult(text) {
|
|
@@ -68,8 +68,8 @@ import {
|
|
|
68
68
|
writeDirectChatSessionState,
|
|
69
69
|
writeEgressAllowlist,
|
|
70
70
|
writePersistentClaudeWrapper
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-HN6B5G5V.js";
|
|
72
|
+
import "./chunk-YOIJFB4J.js";
|
|
73
73
|
import "./chunk-OCMJ5E6J.js";
|
|
74
74
|
import "./chunk-XWVM4KPK.js";
|
|
75
75
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
writeEgressAllowlist,
|
|
146
146
|
writePersistentClaudeWrapper
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=persistent-session-
|
|
148
|
+
//# sourceMappingURL=persistent-session-QVJASJSQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HN6B5G5V.js";
|
|
4
|
+
import "./chunk-YOIJFB4J.js";
|
|
5
5
|
import "./chunk-OCMJ5E6J.js";
|
|
6
6
|
import "./chunk-XWVM4KPK.js";
|
|
7
7
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -802,4 +802,4 @@ export {
|
|
|
802
802
|
readAndResetSlackReplyBindingClassifications,
|
|
803
803
|
readAndResetSlackReplyTargetClassifications
|
|
804
804
|
};
|
|
805
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
805
|
+
//# sourceMappingURL=responsiveness-probe-AZSZBDKL.js.map
|