@integrity-labs/agt-cli 0.27.120 → 0.27.122
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
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
success,
|
|
29
29
|
table,
|
|
30
30
|
warn
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-EGFIMYNT.js";
|
|
32
32
|
import {
|
|
33
33
|
CHANNEL_REGISTRY,
|
|
34
34
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4934
4934
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4935
4935
|
import chalk18 from "chalk";
|
|
4936
4936
|
import ora16 from "ora";
|
|
4937
|
-
var cliVersion = true ? "0.27.
|
|
4937
|
+
var cliVersion = true ? "0.27.122" : "dev";
|
|
4938
4938
|
async function fetchLatestVersion() {
|
|
4939
4939
|
const host2 = getHost();
|
|
4940
4940
|
if (!host2) return null;
|
|
@@ -5857,7 +5857,7 @@ function handleError(err) {
|
|
|
5857
5857
|
}
|
|
5858
5858
|
|
|
5859
5859
|
// src/bin/agt.ts
|
|
5860
|
-
var cliVersion2 = true ? "0.27.
|
|
5860
|
+
var cliVersion2 = true ? "0.27.122" : "dev";
|
|
5861
5861
|
var program = new Command();
|
|
5862
5862
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
5863
5863
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -5039,6 +5039,7 @@ function buildMcpJson(input) {
|
|
|
5039
5039
|
integration
|
|
5040
5040
|
});
|
|
5041
5041
|
}
|
|
5042
|
+
const hasXeroBroker = input.integrations?.some((i) => i.definition_id === "xero-broker") ?? false;
|
|
5042
5043
|
const xeroIntegration = input.integrations?.find((i) => i.definition_id === "xero");
|
|
5043
5044
|
if (xeroIntegration) {
|
|
5044
5045
|
const brokerMode = Boolean(xeroIntegration.id);
|
|
@@ -5053,6 +5054,8 @@ function buildMcpJson(input) {
|
|
|
5053
5054
|
AGT_API_KEY: "${AGT_API_KEY}",
|
|
5054
5055
|
AGT_AGENT_ID: input.agent.agent_id,
|
|
5055
5056
|
...brokerMode ? { AGT_INTEGRATION_ID: xeroIntegration.id } : {},
|
|
5057
|
+
// ENG-4922: writes go through xero-broker → read-only vendor server.
|
|
5058
|
+
...hasXeroBroker ? { XERO_WRITES_VIA_BROKER: "true" } : {},
|
|
5056
5059
|
PATH: process.env["PATH"] ?? "",
|
|
5057
5060
|
HOME: process.env["HOME"] ?? ""
|
|
5058
5061
|
}
|
|
@@ -5091,6 +5094,20 @@ function buildMcpJson(input) {
|
|
|
5091
5094
|
}
|
|
5092
5095
|
};
|
|
5093
5096
|
}
|
|
5097
|
+
if (hasXeroBroker) {
|
|
5098
|
+
mcpServers["xero-broker"] = {
|
|
5099
|
+
command: "npx",
|
|
5100
|
+
args: ["-y", "@integrity-labs/xero-broker@latest"],
|
|
5101
|
+
env: {
|
|
5102
|
+
AGT_HOST: "${AGT_HOST}",
|
|
5103
|
+
AGT_AGENT_ID: input.agent.agent_id,
|
|
5104
|
+
AGT_RUN_ID: "${AGT_RUN_ID}",
|
|
5105
|
+
AGT_API_KEY: "${AGT_API_KEY}",
|
|
5106
|
+
PATH: process.env["PATH"] ?? "",
|
|
5107
|
+
HOME: process.env["HOME"] ?? ""
|
|
5108
|
+
}
|
|
5109
|
+
};
|
|
5110
|
+
}
|
|
5094
5111
|
return { mcpServers };
|
|
5095
5112
|
}
|
|
5096
5113
|
function parseIntervalMinutes(scheduleEvery) {
|
|
@@ -5981,12 +5998,15 @@ ${sections}`
|
|
|
5981
5998
|
integration
|
|
5982
5999
|
}));
|
|
5983
6000
|
}
|
|
6001
|
+
const hasXeroBroker = integrations.some((i) => i.definition_id === "xero-broker");
|
|
5984
6002
|
const xeroIntegration = integrations.find((i) => i.definition_id === "xero");
|
|
5985
6003
|
if (xeroIntegration) {
|
|
5986
6004
|
const brokerMode = Boolean(agentId && xeroIntegration.id);
|
|
5987
6005
|
const xeroEnv = {
|
|
5988
6006
|
...brokerMode ? {} : { XERO_CLIENT_BEARER_TOKEN: "${XERO_ACCESS_TOKEN}" },
|
|
5989
6007
|
XERO_TENANT_ID: "${XERO_TENANT_ID}",
|
|
6008
|
+
// ENG-4922: writes go through xero-broker → read-only vendor server.
|
|
6009
|
+
...hasXeroBroker ? { XERO_WRITES_VIA_BROKER: "true" } : {},
|
|
5990
6010
|
PATH: process.env["PATH"] ?? "",
|
|
5991
6011
|
HOME: process.env["HOME"] ?? ""
|
|
5992
6012
|
};
|
|
@@ -6037,12 +6057,33 @@ ${sections}`
|
|
|
6037
6057
|
});
|
|
6038
6058
|
}
|
|
6039
6059
|
}
|
|
6060
|
+
if (hasXeroBroker) {
|
|
6061
|
+
const brokerAgentId = resolveBrokerAgentId(codeName);
|
|
6062
|
+
if (!brokerAgentId) {
|
|
6063
|
+
process.stderr.write(`[manager-worker] [xero-broker] skipping write for '${codeName}': no real AGT_AGENT_ID available. The full-provision artifact pipeline will recreate this on the next cycle.
|
|
6064
|
+
`);
|
|
6065
|
+
} else {
|
|
6066
|
+
this.writeMcpServer(codeName, "xero-broker", {
|
|
6067
|
+
command: "npx",
|
|
6068
|
+
args: ["-y", "@integrity-labs/xero-broker@latest"],
|
|
6069
|
+
env: {
|
|
6070
|
+
AGT_HOST: "${AGT_HOST}",
|
|
6071
|
+
AGT_API_KEY: "${AGT_API_KEY}",
|
|
6072
|
+
AGT_AGENT_ID: brokerAgentId,
|
|
6073
|
+
AGT_RUN_ID: "${AGT_RUN_ID}",
|
|
6074
|
+
PATH: process.env["PATH"] ?? "",
|
|
6075
|
+
HOME: process.env["HOME"] ?? ""
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6040
6080
|
if (this.removeMcpServer) {
|
|
6041
6081
|
const nativeMcpKeys = INTEGRATION_REGISTRY.filter((d) => d.nativeMcp !== void 0).map((d) => d.nativeMcp.key ?? d.id);
|
|
6042
6082
|
const integrationDerivedKeys = /* @__PURE__ */ new Set([
|
|
6043
6083
|
"xero",
|
|
6044
6084
|
"postiz",
|
|
6045
6085
|
"cloud-broker",
|
|
6086
|
+
"xero-broker",
|
|
6046
6087
|
...nativeMcpKeys,
|
|
6047
6088
|
...Object.entries(OAUTH_PROVIDERS).filter(([, provider]) => Boolean(provider.mcpUrl)).map(([id]) => id)
|
|
6048
6089
|
]);
|
|
@@ -6053,6 +6094,8 @@ ${sections}`
|
|
|
6053
6094
|
expectedKeys.add("postiz");
|
|
6054
6095
|
if (hasCloudBroker)
|
|
6055
6096
|
expectedKeys.add("cloud-broker");
|
|
6097
|
+
if (hasXeroBroker)
|
|
6098
|
+
expectedKeys.add("xero-broker");
|
|
6056
6099
|
for (const integration of integrations) {
|
|
6057
6100
|
const def = INTEGRATION_REGISTRY.find((d) => d.id === integration.definition_id);
|
|
6058
6101
|
if (def?.nativeMcp) {
|
|
@@ -7603,4 +7646,4 @@ export {
|
|
|
7603
7646
|
managerInstallSystemUnitCommand,
|
|
7604
7647
|
managerUninstallSystemUnitCommand
|
|
7605
7648
|
};
|
|
7606
|
-
//# sourceMappingURL=chunk-
|
|
7649
|
+
//# sourceMappingURL=chunk-EGFIMYNT.js.map
|