@integrity-labs/agt-cli 0.28.516 → 0.28.518
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 +4 -4
- package/dist/{chunk-IBI6VSGP.js → chunk-RDDUP6Z4.js} +3 -3
- package/dist/{chunk-UQ3TQ7M4.js → chunk-SSRYNA7T.js} +25 -1
- package/dist/{chunk-UQ3TQ7M4.js.map → chunk-SSRYNA7T.js.map} +1 -1
- package/dist/{claude-pair-runtime-FWD7QWAR.js → claude-pair-runtime-4JSAVQLI.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/mcp/direct-chat-channel.js +24 -0
- package/dist/mcp/index.js +23 -1
- package/dist/mcp/origami.js +24 -0
- package/dist/mcp/slack-channel.js +24 -0
- package/dist/mcp/telegram-channel.js +24 -0
- package/dist/mcp/xero.js +81 -19
- package/dist/{persistent-session-3SY36KIU.js → persistent-session-ZB5BXOWR.js} +2 -2
- package/dist/{responsiveness-probe-DSWGHXGG.js → responsiveness-probe-4KU7FOTM.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-IBI6VSGP.js.map → chunk-RDDUP6Z4.js.map} +0 -0
- /package/dist/{claude-pair-runtime-FWD7QWAR.js.map → claude-pair-runtime-4JSAVQLI.js.map} +0 -0
- /package/dist/{persistent-session-3SY36KIU.js.map → persistent-session-ZB5BXOWR.js.map} +0 -0
- /package/dist/{responsiveness-probe-DSWGHXGG.js.map → responsiveness-probe-4KU7FOTM.js.map} +0 -0
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-ZB5BXOWR.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-4JSAVQLI.js.map
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
safeWriteJsonAtomic,
|
|
54
54
|
setConfigHash,
|
|
55
55
|
tripClass
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-RDDUP6Z4.js";
|
|
57
57
|
import {
|
|
58
58
|
getProjectDir as getProjectDir2,
|
|
59
59
|
getReadyTasks,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
toOpencodeModel,
|
|
178
178
|
transcriptActivityAgeSeconds,
|
|
179
179
|
writeEgressAllowlist
|
|
180
|
-
} from "../chunk-
|
|
180
|
+
} from "../chunk-SSRYNA7T.js";
|
|
181
181
|
import {
|
|
182
182
|
reapOrphanChannelMcps
|
|
183
183
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -10106,7 +10106,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
10106
10106
|
var lastVersionCheckAt = 0;
|
|
10107
10107
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
10108
10108
|
var lastResponsivenessProbeAt = 0;
|
|
10109
|
-
var agtCliVersion = true ? "0.28.
|
|
10109
|
+
var agtCliVersion = true ? "0.28.518" : "dev";
|
|
10110
10110
|
function resolveBrewPath(execFileSync2) {
|
|
10111
10111
|
try {
|
|
10112
10112
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -11314,7 +11314,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
11314
11314
|
if (codeNames.length === 0) return;
|
|
11315
11315
|
void (async () => {
|
|
11316
11316
|
try {
|
|
11317
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11317
|
+
const { collectDiagnostics } = await import("../persistent-session-ZB5BXOWR.js");
|
|
11318
11318
|
await api.post("/host/heartbeat", {
|
|
11319
11319
|
host_id: hostId,
|
|
11320
11320
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -11421,7 +11421,7 @@ async function pollCycle() {
|
|
|
11421
11421
|
}
|
|
11422
11422
|
try {
|
|
11423
11423
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
11424
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11424
|
+
const { collectDiagnostics } = await import("../persistent-session-ZB5BXOWR.js");
|
|
11425
11425
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
11426
11426
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
|
|
11427
11427
|
let tailscaleHostname;
|
|
@@ -11536,7 +11536,7 @@ async function pollCycle() {
|
|
|
11536
11536
|
collectResponsivenessProbes,
|
|
11537
11537
|
collectPanelessActivityProbes,
|
|
11538
11538
|
getResponsivenessIntervalMs
|
|
11539
|
-
} = await import("../responsiveness-probe-
|
|
11539
|
+
} = await import("../responsiveness-probe-4KU7FOTM.js");
|
|
11540
11540
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
11541
11541
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
11542
11542
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -11600,7 +11600,7 @@ async function pollCycle() {
|
|
|
11600
11600
|
collectResponsivenessProbes,
|
|
11601
11601
|
livePendingInboundOldestAgeSeconds,
|
|
11602
11602
|
parkPendingInbound
|
|
11603
|
-
} = await import("../responsiveness-probe-
|
|
11603
|
+
} = await import("../responsiveness-probe-4KU7FOTM.js");
|
|
11604
11604
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
11605
11605
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
11606
11606
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15108,7 +15108,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
15108
15108
|
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}`));
|
|
15109
15109
|
void (async () => {
|
|
15110
15110
|
try {
|
|
15111
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15111
|
+
const { collectDiagnostics } = await import("../persistent-session-ZB5BXOWR.js");
|
|
15112
15112
|
await api.post("/host/heartbeat", {
|
|
15113
15113
|
host_id: hostId,
|
|
15114
15114
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15158,7 +15158,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
15158
15158
|
}
|
|
15159
15159
|
try {
|
|
15160
15160
|
const hostId = await getHostId();
|
|
15161
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15161
|
+
const { collectDiagnostics } = await import("../persistent-session-ZB5BXOWR.js");
|
|
15162
15162
|
await api.post("/host/heartbeat", {
|
|
15163
15163
|
host_id: hostId,
|
|
15164
15164
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15676,7 +15676,7 @@ async function processClaudePairSessions(agents) {
|
|
|
15676
15676
|
killPairSession,
|
|
15677
15677
|
pairTmuxSession,
|
|
15678
15678
|
finalizeClaudePairOnboarding
|
|
15679
|
-
} = await import("../claude-pair-runtime-
|
|
15679
|
+
} = await import("../claude-pair-runtime-4JSAVQLI.js");
|
|
15680
15680
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
15681
15681
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
15682
15682
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -35550,6 +35550,30 @@ var FLAG_REGISTRY = [
|
|
|
35550
35550
|
// must never be serialized into the browser map.
|
|
35551
35551
|
defaultValue: false
|
|
35552
35552
|
},
|
|
35553
|
+
{
|
|
35554
|
+
key: "agent-unified-screen",
|
|
35555
|
+
description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). Ships dark.',
|
|
35556
|
+
flagType: "boolean",
|
|
35557
|
+
// Declared safe value is `false` = the current view/edit pages. A flag-DB read
|
|
35558
|
+
// error must fall back to what ships today, never a half-built redesign.
|
|
35559
|
+
defaultValue: false,
|
|
35560
|
+
// Read CLIENT-SIDE by the agent screen ("use client") via usePublicBooleanFlag,
|
|
35561
|
+
// so the key must be in the browser-exposed public map. Additive viewer gate,
|
|
35562
|
+
// resolved within the active-org cookie's scope — not sensitive.
|
|
35563
|
+
public: true
|
|
35564
|
+
},
|
|
35565
|
+
{
|
|
35566
|
+
key: "app-top-nav-shell",
|
|
35567
|
+
description: "Global top-navigation shell redesign (ENG-8478 epic / ENG-8486). When ON, the dashboard chrome replaces the left sidebar with a top navigation bar (team switcher \xB7 destinations \xB7 command palette + account) so the left side is free for an agent-scoped rail; when OFF, the existing left sidebar is unchanged. Additive layout gate \u2014 no data-model change. Composes independently with agent-unified-screen (the two flags are reconciled in ENG-8488). Ships dark.",
|
|
35568
|
+
flagType: "boolean",
|
|
35569
|
+
// Declared safe value is `false` = the current left sidebar. Fail-closed to the
|
|
35570
|
+
// shell that ships today if the flag DB is unreachable.
|
|
35571
|
+
defaultValue: false,
|
|
35572
|
+
// Read CLIENT-SIDE by the dashboard layout + sidebar ("use client") via
|
|
35573
|
+
// usePublicBooleanFlag, so the key must be in the browser-exposed public map.
|
|
35574
|
+
// Additive layout gate — not sensitive.
|
|
35575
|
+
public: true
|
|
35576
|
+
},
|
|
35553
35577
|
{
|
|
35554
35578
|
key: "ninjafy-brand",
|
|
35555
35579
|
description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is USER-FACING BRAND TEXT ONLY: it must never gate a code identifier, package name, env var or CLI name, which stay `Augmented`/`agt` per the CLAUDE.md naming contract (the deep code rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here). Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot one organization while every other org still sees Augmented. Ships dark.',
|
package/dist/mcp/index.js
CHANGED
|
@@ -21773,7 +21773,29 @@ function scopeFooter(scope) {
|
|
|
21773
21773
|
const visible = scope?.teams_visible;
|
|
21774
21774
|
const total = scope?.teams_in_org;
|
|
21775
21775
|
const teams = typeof visible === "number" && typeof total === "number" ? ` (${visible} of ${total} team${total === 1 ? "" : "s"} visible to you)` : "";
|
|
21776
|
-
return `Scope: ${org} only${teams}. Other organizations are not searchable from here, so one match is not proof it is the only one, and no match is not proof there is none
|
|
21776
|
+
return `Scope: ${org} only${teams}. Other organizations are not searchable from here, so one match is not proof it is the only one, and no match is not proof there is none.` + (peopleExclusionNote(scope) ?? "");
|
|
21777
|
+
}
|
|
21778
|
+
function peopleExclusionNote(scope) {
|
|
21779
|
+
const excluded = scope?.people_excluded;
|
|
21780
|
+
if (typeof excluded !== "number" || excluded <= 0) return null;
|
|
21781
|
+
const by = scope?.people_excluded_by_reason ?? {};
|
|
21782
|
+
const parts = [];
|
|
21783
|
+
const unlinked = by.no_platform_account;
|
|
21784
|
+
if (typeof unlinked === "number" && unlinked > 0) {
|
|
21785
|
+
parts.push(`${unlinked} with no linked console account`);
|
|
21786
|
+
}
|
|
21787
|
+
const infra = by.host_runtime_user;
|
|
21788
|
+
if (typeof infra === "number" && infra > 0) {
|
|
21789
|
+
parts.push(`${infra} infrastructure account${infra === 1 ? "" : "s"}`);
|
|
21790
|
+
}
|
|
21791
|
+
const noEmail = by.no_email;
|
|
21792
|
+
if (typeof noEmail === "number" && noEmail > 0) {
|
|
21793
|
+
parts.push(`${noEmail} with no email on record`);
|
|
21794
|
+
}
|
|
21795
|
+
const because = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
21796
|
+
return `
|
|
21797
|
+
|
|
21798
|
+
Note: ${excluded} more ${excluded === 1 ? "person is" : "people are"} in this organization but not listed above${because}. The people list is FILTERED, not complete - do not conclude someone does not exist because they are absent from it. If you needed a Slack id to address a card and found none, that is very likely why; ask a human rather than parking the card on nobody.`;
|
|
21777
21799
|
}
|
|
21778
21800
|
function formatDirectoryResult(data, query, slackUserId) {
|
|
21779
21801
|
const agents = data.agents ?? [];
|
package/dist/mcp/origami.js
CHANGED
|
@@ -41452,6 +41452,30 @@ var FLAG_REGISTRY = [
|
|
|
41452
41452
|
// must never be serialized into the browser map.
|
|
41453
41453
|
defaultValue: false
|
|
41454
41454
|
},
|
|
41455
|
+
{
|
|
41456
|
+
key: "agent-unified-screen",
|
|
41457
|
+
description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). Ships dark.',
|
|
41458
|
+
flagType: "boolean",
|
|
41459
|
+
// Declared safe value is `false` = the current view/edit pages. A flag-DB read
|
|
41460
|
+
// error must fall back to what ships today, never a half-built redesign.
|
|
41461
|
+
defaultValue: false,
|
|
41462
|
+
// Read CLIENT-SIDE by the agent screen ("use client") via usePublicBooleanFlag,
|
|
41463
|
+
// so the key must be in the browser-exposed public map. Additive viewer gate,
|
|
41464
|
+
// resolved within the active-org cookie's scope — not sensitive.
|
|
41465
|
+
public: true
|
|
41466
|
+
},
|
|
41467
|
+
{
|
|
41468
|
+
key: "app-top-nav-shell",
|
|
41469
|
+
description: "Global top-navigation shell redesign (ENG-8478 epic / ENG-8486). When ON, the dashboard chrome replaces the left sidebar with a top navigation bar (team switcher \xB7 destinations \xB7 command palette + account) so the left side is free for an agent-scoped rail; when OFF, the existing left sidebar is unchanged. Additive layout gate \u2014 no data-model change. Composes independently with agent-unified-screen (the two flags are reconciled in ENG-8488). Ships dark.",
|
|
41470
|
+
flagType: "boolean",
|
|
41471
|
+
// Declared safe value is `false` = the current left sidebar. Fail-closed to the
|
|
41472
|
+
// shell that ships today if the flag DB is unreachable.
|
|
41473
|
+
defaultValue: false,
|
|
41474
|
+
// Read CLIENT-SIDE by the dashboard layout + sidebar ("use client") via
|
|
41475
|
+
// usePublicBooleanFlag, so the key must be in the browser-exposed public map.
|
|
41476
|
+
// Additive layout gate — not sensitive.
|
|
41477
|
+
public: true
|
|
41478
|
+
},
|
|
41455
41479
|
{
|
|
41456
41480
|
key: "ninjafy-brand",
|
|
41457
41481
|
description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is USER-FACING BRAND TEXT ONLY: it must never gate a code identifier, package name, env var or CLI name, which stay `Augmented`/`agt` per the CLAUDE.md naming contract (the deep code rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here). Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot one organization while every other org still sees Augmented. Ships dark.',
|
|
@@ -35719,6 +35719,30 @@ var FLAG_REGISTRY = [
|
|
|
35719
35719
|
// must never be serialized into the browser map.
|
|
35720
35720
|
defaultValue: false
|
|
35721
35721
|
},
|
|
35722
|
+
{
|
|
35723
|
+
key: "agent-unified-screen",
|
|
35724
|
+
description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). Ships dark.',
|
|
35725
|
+
flagType: "boolean",
|
|
35726
|
+
// Declared safe value is `false` = the current view/edit pages. A flag-DB read
|
|
35727
|
+
// error must fall back to what ships today, never a half-built redesign.
|
|
35728
|
+
defaultValue: false,
|
|
35729
|
+
// Read CLIENT-SIDE by the agent screen ("use client") via usePublicBooleanFlag,
|
|
35730
|
+
// so the key must be in the browser-exposed public map. Additive viewer gate,
|
|
35731
|
+
// resolved within the active-org cookie's scope — not sensitive.
|
|
35732
|
+
public: true
|
|
35733
|
+
},
|
|
35734
|
+
{
|
|
35735
|
+
key: "app-top-nav-shell",
|
|
35736
|
+
description: "Global top-navigation shell redesign (ENG-8478 epic / ENG-8486). When ON, the dashboard chrome replaces the left sidebar with a top navigation bar (team switcher \xB7 destinations \xB7 command palette + account) so the left side is free for an agent-scoped rail; when OFF, the existing left sidebar is unchanged. Additive layout gate \u2014 no data-model change. Composes independently with agent-unified-screen (the two flags are reconciled in ENG-8488). Ships dark.",
|
|
35737
|
+
flagType: "boolean",
|
|
35738
|
+
// Declared safe value is `false` = the current left sidebar. Fail-closed to the
|
|
35739
|
+
// shell that ships today if the flag DB is unreachable.
|
|
35740
|
+
defaultValue: false,
|
|
35741
|
+
// Read CLIENT-SIDE by the dashboard layout + sidebar ("use client") via
|
|
35742
|
+
// usePublicBooleanFlag, so the key must be in the browser-exposed public map.
|
|
35743
|
+
// Additive layout gate — not sensitive.
|
|
35744
|
+
public: true
|
|
35745
|
+
},
|
|
35722
35746
|
{
|
|
35723
35747
|
key: "ninjafy-brand",
|
|
35724
35748
|
description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is USER-FACING BRAND TEXT ONLY: it must never gate a code identifier, package name, env var or CLI name, which stay `Augmented`/`agt` per the CLAUDE.md naming contract (the deep code rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here). Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot one organization while every other org still sees Augmented. Ships dark.',
|
|
@@ -36045,6 +36045,30 @@ var FLAG_REGISTRY = [
|
|
|
36045
36045
|
// must never be serialized into the browser map.
|
|
36046
36046
|
defaultValue: false
|
|
36047
36047
|
},
|
|
36048
|
+
{
|
|
36049
|
+
key: "agent-unified-screen",
|
|
36050
|
+
description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). Ships dark.',
|
|
36051
|
+
flagType: "boolean",
|
|
36052
|
+
// Declared safe value is `false` = the current view/edit pages. A flag-DB read
|
|
36053
|
+
// error must fall back to what ships today, never a half-built redesign.
|
|
36054
|
+
defaultValue: false,
|
|
36055
|
+
// Read CLIENT-SIDE by the agent screen ("use client") via usePublicBooleanFlag,
|
|
36056
|
+
// so the key must be in the browser-exposed public map. Additive viewer gate,
|
|
36057
|
+
// resolved within the active-org cookie's scope — not sensitive.
|
|
36058
|
+
public: true
|
|
36059
|
+
},
|
|
36060
|
+
{
|
|
36061
|
+
key: "app-top-nav-shell",
|
|
36062
|
+
description: "Global top-navigation shell redesign (ENG-8478 epic / ENG-8486). When ON, the dashboard chrome replaces the left sidebar with a top navigation bar (team switcher \xB7 destinations \xB7 command palette + account) so the left side is free for an agent-scoped rail; when OFF, the existing left sidebar is unchanged. Additive layout gate \u2014 no data-model change. Composes independently with agent-unified-screen (the two flags are reconciled in ENG-8488). Ships dark.",
|
|
36063
|
+
flagType: "boolean",
|
|
36064
|
+
// Declared safe value is `false` = the current left sidebar. Fail-closed to the
|
|
36065
|
+
// shell that ships today if the flag DB is unreachable.
|
|
36066
|
+
defaultValue: false,
|
|
36067
|
+
// Read CLIENT-SIDE by the dashboard layout + sidebar ("use client") via
|
|
36068
|
+
// usePublicBooleanFlag, so the key must be in the browser-exposed public map.
|
|
36069
|
+
// Additive layout gate — not sensitive.
|
|
36070
|
+
public: true
|
|
36071
|
+
},
|
|
36048
36072
|
{
|
|
36049
36073
|
key: "ninjafy-brand",
|
|
36050
36074
|
description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is USER-FACING BRAND TEXT ONLY: it must never gate a code identifier, package name, env var or CLI name, which stay `Augmented`/`agt` per the CLAUDE.md naming contract (the deep code rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here). Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot one organization while every other org still sees Augmented. Ships dark.',
|
package/dist/mcp/xero.js
CHANGED
|
@@ -114299,12 +114299,39 @@ var {
|
|
|
114299
114299
|
var import_dotenv = __toESM(require_main(), 1);
|
|
114300
114300
|
var import_xero_node = __toESM(require_dist2(), 1);
|
|
114301
114301
|
|
|
114302
|
+
// src/helpers/redact-sensitive.ts
|
|
114303
|
+
var SENSITIVE_HEADER_NAMES = [
|
|
114304
|
+
"authorization",
|
|
114305
|
+
"proxy-authorization",
|
|
114306
|
+
"www-authenticate",
|
|
114307
|
+
"cookie",
|
|
114308
|
+
"set-cookie",
|
|
114309
|
+
"x-api-key",
|
|
114310
|
+
"api-key",
|
|
114311
|
+
"x-auth-token",
|
|
114312
|
+
"x-access-token",
|
|
114313
|
+
"refresh_token",
|
|
114314
|
+
"access_token",
|
|
114315
|
+
"client_secret"
|
|
114316
|
+
];
|
|
114317
|
+
var REDACTED = "<redacted>";
|
|
114318
|
+
var NAME_ALTERNATION = SENSITIVE_HEADER_NAMES.join("|");
|
|
114319
|
+
var JSON_PAIR_RE = new RegExp(
|
|
114320
|
+
`("(?:${NAME_ALTERNATION})"\\s*:\\s*)("(?:[^"\\\\]|\\\\.)*"|\\[[^\\]]*\\])`,
|
|
114321
|
+
"gi"
|
|
114322
|
+
);
|
|
114323
|
+
var HEADER_LINE_RE = new RegExp(`\\b(${NAME_ALTERNATION})\\s*:\\s*([^\\r\\n,}"]+)`, "gi");
|
|
114324
|
+
var BEARER_VALUE_RE = /\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi;
|
|
114325
|
+
function redactSensitiveText(input) {
|
|
114326
|
+
return input.replace(JSON_PAIR_RE, (_m, key) => `${key}"${REDACTED}"`).replace(HEADER_LINE_RE, (_m, name) => `${name}: ${REDACTED}`).replace(BEARER_VALUE_RE, (_m, scheme) => `${scheme} ${REDACTED}`);
|
|
114327
|
+
}
|
|
114328
|
+
|
|
114302
114329
|
// src/helpers/ensure-error.ts
|
|
114303
114330
|
function ensureError(value) {
|
|
114304
114331
|
if (value instanceof Error) return value;
|
|
114305
114332
|
let stringified = "[Unable to stringify the thrown value]";
|
|
114306
114333
|
try {
|
|
114307
|
-
stringified = JSON.stringify(value);
|
|
114334
|
+
stringified = redactSensitiveText(JSON.stringify(value) ?? String(value));
|
|
114308
114335
|
} catch {
|
|
114309
114336
|
}
|
|
114310
114337
|
const error2 = new Error(`Error thrown: ${stringified}`);
|
|
@@ -114692,9 +114719,12 @@ var XeroScopeMissingError = class extends Error {
|
|
|
114692
114719
|
}
|
|
114693
114720
|
};
|
|
114694
114721
|
function classifyXeroError(error2) {
|
|
114695
|
-
|
|
114696
|
-
|
|
114697
|
-
|
|
114722
|
+
const rejection = parseXeroApiRejection(error2);
|
|
114723
|
+
const status = rejection ? rejection.statusCode : axiosStatus(error2);
|
|
114724
|
+
if (status !== 401) return null;
|
|
114725
|
+
const detail = readXeroDetail(
|
|
114726
|
+
rejection ? rejection.body : error2.response?.data
|
|
114727
|
+
);
|
|
114698
114728
|
if (detail !== "AuthorizationUnsuccessful") return null;
|
|
114699
114729
|
return new XeroScopeMissingError(
|
|
114700
114730
|
`Xero rejected this call as scope-missing \u2014 the OAuth consent did not grant the scope this endpoint requires. Token refresh will not help: refresh tokens cannot widen scope. Ask the user to click "Reconnect" on the Xero card in the Augmented console so the consent screen requests the scopes the agent's installed skills need.`,
|
|
@@ -114702,6 +114732,25 @@ function classifyXeroError(error2) {
|
|
|
114702
114732
|
detail
|
|
114703
114733
|
);
|
|
114704
114734
|
}
|
|
114735
|
+
function axiosStatus(error2) {
|
|
114736
|
+
return error2 instanceof AxiosError2 ? error2.response?.status : void 0;
|
|
114737
|
+
}
|
|
114738
|
+
function parseXeroApiRejection(error2) {
|
|
114739
|
+
if (typeof error2 !== "string") return null;
|
|
114740
|
+
if (!error2.startsWith("{")) return null;
|
|
114741
|
+
let parsed;
|
|
114742
|
+
try {
|
|
114743
|
+
parsed = JSON.parse(error2);
|
|
114744
|
+
} catch {
|
|
114745
|
+
return null;
|
|
114746
|
+
}
|
|
114747
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
114748
|
+
const response = parsed.response;
|
|
114749
|
+
if (!response || typeof response !== "object") return null;
|
|
114750
|
+
const statusCode = response.statusCode;
|
|
114751
|
+
if (typeof statusCode !== "number") return null;
|
|
114752
|
+
return { statusCode, body: response.body };
|
|
114753
|
+
}
|
|
114705
114754
|
function readXeroDetail(data) {
|
|
114706
114755
|
if (data && typeof data === "object" && "Detail" in data) {
|
|
114707
114756
|
const d = data.Detail;
|
|
@@ -114717,23 +114766,36 @@ function readXeroDetail(data) {
|
|
|
114717
114766
|
function formatError2(error2) {
|
|
114718
114767
|
const scopeMissing = classifyXeroError(error2);
|
|
114719
114768
|
if (scopeMissing) return scopeMissing.message;
|
|
114769
|
+
const rejection = parseXeroApiRejection(error2);
|
|
114770
|
+
if (rejection) {
|
|
114771
|
+
return messageForStatus(rejection.statusCode, readDetail(rejection.body));
|
|
114772
|
+
}
|
|
114720
114773
|
if (error2 instanceof AxiosError2) {
|
|
114721
|
-
|
|
114722
|
-
const detail = error2.response?.data?.Detail;
|
|
114723
|
-
switch (status) {
|
|
114724
|
-
case 401:
|
|
114725
|
-
return "Authentication failed. Please check your Xero credentials.";
|
|
114726
|
-
case 403:
|
|
114727
|
-
return "You don't have permission to access this resource in Xero.";
|
|
114728
|
-
case 404:
|
|
114729
|
-
return "The requested resource was not found in Xero.";
|
|
114730
|
-
case 429:
|
|
114731
|
-
return "Too many requests to Xero. Please try again in a moment.";
|
|
114732
|
-
default:
|
|
114733
|
-
return detail || "An error occurred while communicating with Xero.";
|
|
114734
|
-
}
|
|
114774
|
+
return messageForStatus(error2.response?.status, readDetail(error2.response?.data));
|
|
114735
114775
|
}
|
|
114736
|
-
|
|
114776
|
+
if (error2 instanceof Error) return redactSensitiveText(error2.message);
|
|
114777
|
+
return "An unexpected error occurred while communicating with Xero.";
|
|
114778
|
+
}
|
|
114779
|
+
function messageForStatus(status, detail) {
|
|
114780
|
+
switch (status) {
|
|
114781
|
+
case 401:
|
|
114782
|
+
return "Authentication failed. Please check your Xero credentials.";
|
|
114783
|
+
case 403:
|
|
114784
|
+
return "You don't have permission to access this resource in Xero.";
|
|
114785
|
+
case 404:
|
|
114786
|
+
return "The requested resource was not found in Xero.";
|
|
114787
|
+
case 429:
|
|
114788
|
+
return "Too many requests to Xero. Please try again in a moment.";
|
|
114789
|
+
default:
|
|
114790
|
+
return detail ? redactSensitiveText(detail) : "An error occurred while communicating with Xero.";
|
|
114791
|
+
}
|
|
114792
|
+
}
|
|
114793
|
+
function readDetail(body) {
|
|
114794
|
+
if (body && typeof body === "object" && "Detail" in body) {
|
|
114795
|
+
const d = body.Detail;
|
|
114796
|
+
return typeof d === "string" ? d : null;
|
|
114797
|
+
}
|
|
114798
|
+
return null;
|
|
114737
114799
|
}
|
|
114738
114800
|
|
|
114739
114801
|
// src/helpers/get-package-version.ts
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
writeDirectChatSessionState,
|
|
38
38
|
writeEgressAllowlist,
|
|
39
39
|
writePersistentClaudeWrapper
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SSRYNA7T.js";
|
|
41
41
|
import "./chunk-XWVM4KPK.js";
|
|
42
42
|
export {
|
|
43
43
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
writeEgressAllowlist,
|
|
80
80
|
writePersistentClaudeWrapper
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=persistent-session-
|
|
82
|
+
//# sourceMappingURL=persistent-session-ZB5BXOWR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SSRYNA7T.js";
|
|
4
4
|
import "./chunk-XWVM4KPK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/responsiveness-probe.ts
|
|
@@ -662,4 +662,4 @@ export {
|
|
|
662
662
|
readAndResetSlackReplyBindingClassifications,
|
|
663
663
|
readAndResetSlackReplyTargetClassifications
|
|
664
664
|
};
|
|
665
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
665
|
+
//# sourceMappingURL=responsiveness-probe-4KU7FOTM.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|