@integrity-labs/agt-cli 0.28.932 → 0.28.934
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-RZXKHPTJ.js → chunk-3ZYWTOUW.js} +2 -2
- package/dist/{chunk-7KVUXOE4.js → chunk-TH3HADAH.js} +90 -2
- package/dist/chunk-TH3HADAH.js.map +1 -0
- package/dist/{chunk-7BQR2GIS.js → chunk-WM2VOATL.js} +4 -4
- package/dist/{claude-pair-runtime-XJUTHQBY.js → claude-pair-runtime-GMAY5E45.js} +2 -2
- package/dist/lib/manager-worker.js +14 -14
- package/dist/mcp/direct-chat-channel.js +9 -0
- package/dist/mcp/index.js +9 -0
- package/dist/mcp/origami.js +37 -2
- package/dist/mcp/slack-channel.js +9 -0
- package/dist/mcp/telegram-channel.js +9 -0
- package/dist/{persistent-session-SJ5ANAFY.js → persistent-session-JL7QVQJH.js} +3 -3
- package/dist/{responsiveness-probe-ROU7HNBP.js → responsiveness-probe-H5HCW7HT.js} +3 -3
- package/dist/{session-auth-dead-7IA3OFBT.js → session-auth-dead-PRK7BNLU.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-7KVUXOE4.js.map +0 -1
- /package/dist/{chunk-RZXKHPTJ.js.map → chunk-3ZYWTOUW.js.map} +0 -0
- /package/dist/{chunk-7BQR2GIS.js.map → chunk-WM2VOATL.js.map} +0 -0
- /package/dist/{claude-pair-runtime-XJUTHQBY.js.map → claude-pair-runtime-GMAY5E45.js.map} +0 -0
- /package/dist/{persistent-session-SJ5ANAFY.js.map → persistent-session-JL7QVQJH.js.map} +0 -0
- /package/dist/{responsiveness-probe-ROU7HNBP.js.map → responsiveness-probe-H5HCW7HT.js.map} +0 -0
- /package/dist/{session-auth-dead-7IA3OFBT.js.map → session-auth-dead-PRK7BNLU.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-WM2VOATL.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-3ZYWTOUW.js";
|
|
49
49
|
import {
|
|
50
50
|
AnchorSessionClient,
|
|
51
51
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-TH3HADAH.js";
|
|
83
83
|
import "../chunk-XWVM4KPK.js";
|
|
84
84
|
|
|
85
85
|
// src/bin/agt.ts
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.934" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6727,7 +6727,7 @@ function handleError(err) {
|
|
|
6727
6727
|
}
|
|
6728
6728
|
|
|
6729
6729
|
// src/bin/agt.ts
|
|
6730
|
-
var cliVersion2 = true ? "0.28.
|
|
6730
|
+
var cliVersion2 = true ? "0.28.934" : "dev";
|
|
6731
6731
|
var program = new Command();
|
|
6732
6732
|
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");
|
|
6733
6733
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
rotateDailySession,
|
|
20
20
|
sessionFileExists,
|
|
21
21
|
todayLocalIso
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TH3HADAH.js";
|
|
23
23
|
import {
|
|
24
24
|
reapOrphanChannelMcps
|
|
25
25
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5730,4 +5730,4 @@ export {
|
|
|
5730
5730
|
stopAllSessionsAndWait,
|
|
5731
5731
|
getProjectDir
|
|
5732
5732
|
};
|
|
5733
|
-
//# sourceMappingURL=chunk-
|
|
5733
|
+
//# sourceMappingURL=chunk-3ZYWTOUW.js.map
|
|
@@ -8007,6 +8007,11 @@ var integration_metadata_v1_default = {
|
|
|
8007
8007
|
pattern: "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$",
|
|
8008
8008
|
description: "Authorization scheme word placed before the credential, e.g. `Key` for Higgsfield's `Authorization: Key KEY_ID:KEY_SECRET` (ENG-8440). Omit for the `Bearer` default. Constrained to a single RFC 7230 token because it is concatenated straight into a header value."
|
|
8009
8009
|
},
|
|
8010
|
+
auth_encoding: {
|
|
8011
|
+
type: "string",
|
|
8012
|
+
enum: ["basic_username"],
|
|
8013
|
+
description: "How the credential is encoded into Authorization (ENG-10524). `basic_username` sends it as the HTTP Basic username with an empty password (`Authorization: Basic base64(<credential>:)`), Sportsyear's API-key form. Omit for `<auth_scheme> <credential>`. Must not be combined with `auth_scheme`."
|
|
8014
|
+
},
|
|
8010
8015
|
runtime_scopes: {
|
|
8011
8016
|
type: "object",
|
|
8012
8017
|
description: "Per-runtime-scope support map. Each slot is either null (the integration does not support installs at this scope) or an object describing how token resolution and auth work for that scope.",
|
|
@@ -8041,6 +8046,10 @@ var integration_metadata_v1_default = {
|
|
|
8041
8046
|
required: ["tools"]
|
|
8042
8047
|
},
|
|
8043
8048
|
then: { required: ["base_url"] },
|
|
8049
|
+
not: {
|
|
8050
|
+
description: "auth_scheme and auth_encoding are mutually exclusive (ENG-10524). The templater refuses the combination on every call, so catalog validation refuses it first.",
|
|
8051
|
+
required: ["auth_scheme", "auth_encoding"]
|
|
8052
|
+
},
|
|
8044
8053
|
$defs: {
|
|
8045
8054
|
scopeConfig: {
|
|
8046
8055
|
oneOf: [
|
|
@@ -8187,6 +8196,31 @@ function validateToolsFrontmatter(data) {
|
|
|
8187
8196
|
};
|
|
8188
8197
|
}
|
|
8189
8198
|
|
|
8199
|
+
// ../../packages/core/dist/integrations/integration-broker/http-templater.js
|
|
8200
|
+
function basicUsernameAuthorization(credential) {
|
|
8201
|
+
if (credential.includes(":")) {
|
|
8202
|
+
throw new TemplateError('credential for basic_username auth must not contain ":"');
|
|
8203
|
+
}
|
|
8204
|
+
if (!isValidHeaderValue(credential)) {
|
|
8205
|
+
throw new TemplateError("credential for basic_username auth contains control characters");
|
|
8206
|
+
}
|
|
8207
|
+
const bytes = new TextEncoder().encode(`${credential}:`);
|
|
8208
|
+
let binary = "";
|
|
8209
|
+
for (const b of bytes)
|
|
8210
|
+
binary += String.fromCharCode(b);
|
|
8211
|
+
return `Basic ${btoa(binary)}`;
|
|
8212
|
+
}
|
|
8213
|
+
function isValidHeaderValue(value) {
|
|
8214
|
+
return !/[\x00-\x1f\x7f]/.test(value);
|
|
8215
|
+
}
|
|
8216
|
+
var TemplateError = class extends Error {
|
|
8217
|
+
status = 400;
|
|
8218
|
+
constructor(message) {
|
|
8219
|
+
super(message);
|
|
8220
|
+
this.name = "TemplateError";
|
|
8221
|
+
}
|
|
8222
|
+
};
|
|
8223
|
+
|
|
8190
8224
|
// ../../packages/core/dist/generation/charter-generator.js
|
|
8191
8225
|
import { stringify as stringifyYaml } from "yaml";
|
|
8192
8226
|
function generateCharterMd(input) {
|
|
@@ -10751,7 +10785,20 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
10751
10785
|
//
|
|
10752
10786
|
// Routes to `probeBearerJson` against the free, read-only, no-argument
|
|
10753
10787
|
// `/v1/metadata/client` — the same read that backs `sprout_social_list_clients`.
|
|
10754
|
-
"sprout-social"
|
|
10788
|
+
"sprout-social",
|
|
10789
|
+
// ENG-10524: Sportsyear, added WITH the integration rather than after an
|
|
10790
|
+
// incident, because the vendor's auth model makes the omission unusually
|
|
10791
|
+
// expensive. A Sportsyear API key never expires — it dies only when someone
|
|
10792
|
+
// removes or regenerates it — so there is no `expires_at` to watch and no
|
|
10793
|
+
// refresh to fail. Calling the API is the only way to learn a key has stopped
|
|
10794
|
+
// working, and without this entry nothing would ever call it: the toolkit is
|
|
10795
|
+
// `source_type: 'native'` and would fall to the `builtin` rubber-stamp. Worse
|
|
10796
|
+
// than Sprout's case, the integration is read-only, so a dead key shows up
|
|
10797
|
+
// as empty search results rather than a failed write.
|
|
10798
|
+
//
|
|
10799
|
+
// Routes to `probeSportsyear`: HTTP Basic (key as username, empty password)
|
|
10800
|
+
// against the free, read-only, no-argument `GET /api/v1/member`.
|
|
10801
|
+
"sportsyear"
|
|
10755
10802
|
// ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
|
|
10756
10803
|
// connectivity monitor's routing, where github (source_type='native')
|
|
10757
10804
|
// stays host-side (cli_command — `gh`, the credential the agent actually
|
|
@@ -11950,6 +11997,45 @@ async function probeHiggsfield(creds, fetchImpl) {
|
|
|
11950
11997
|
return networkOutcome(err, String(token ?? ""));
|
|
11951
11998
|
}
|
|
11952
11999
|
}
|
|
12000
|
+
async function probeSportsyear(creds, fetchImpl) {
|
|
12001
|
+
const key = creds.api_key ?? creds.access_token;
|
|
12002
|
+
if (!key)
|
|
12003
|
+
return { status: "down", message: "No Sportsyear credential present" };
|
|
12004
|
+
let authorization;
|
|
12005
|
+
try {
|
|
12006
|
+
authorization = basicUsernameAuthorization(String(key));
|
|
12007
|
+
} catch {
|
|
12008
|
+
return {
|
|
12009
|
+
status: "down",
|
|
12010
|
+
message: 'Sportsyear credential is not a bare API key (it contains ":") \u2014 paste the key alone, not email:password'
|
|
12011
|
+
};
|
|
12012
|
+
}
|
|
12013
|
+
const encoded = authorization.slice("Basic ".length);
|
|
12014
|
+
try {
|
|
12015
|
+
const res = await timedFetch2(fetchImpl, "https://sportsyear.com.au/api/v1/member", {
|
|
12016
|
+
headers: { Authorization: authorization, Accept: "application/json" }
|
|
12017
|
+
});
|
|
12018
|
+
if (!res.ok) {
|
|
12019
|
+
const message = res.status === 429 ? rateLimitMessage("Sportsyear", res.status) : res.status === 401 || res.status === 403 ? `Sportsyear rejected the API key (${res.status}) \u2014 removed, regenerated, or API access disabled on the member account` : `Sportsyear API returned ${res.status}`;
|
|
12020
|
+
return {
|
|
12021
|
+
status: statusForHttp(res.status),
|
|
12022
|
+
cause: causeForHttp(res.status),
|
|
12023
|
+
message
|
|
12024
|
+
};
|
|
12025
|
+
}
|
|
12026
|
+
const body = await res.json();
|
|
12027
|
+
const member = typeof body === "object" && body !== null && !Array.isArray(body) ? body : null;
|
|
12028
|
+
const id = member?.id;
|
|
12029
|
+
if (typeof id !== "number" && !(typeof id === "string" && id.trim() !== "")) {
|
|
12030
|
+
return { status: "down", message: "Sportsyear returned no member account for this API key" };
|
|
12031
|
+
}
|
|
12032
|
+
const label = typeof member?.organisation === "string" && member.organisation.trim() !== "" ? member.organisation.trim() : `member ${String(id)}`;
|
|
12033
|
+
return { status: "ok", message: `Reached Sportsyear as ${redactSecret(redactSecret(label, String(key)), encoded)}` };
|
|
12034
|
+
} catch (err) {
|
|
12035
|
+
const outcome = networkOutcome(err, String(key));
|
|
12036
|
+
return outcome.message === void 0 ? outcome : { ...outcome, message: redactSecret(outcome.message, encoded) };
|
|
12037
|
+
}
|
|
12038
|
+
}
|
|
11953
12039
|
async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
|
|
11954
12040
|
switch (definitionId) {
|
|
11955
12041
|
case "linear":
|
|
@@ -11960,6 +12046,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
|
|
|
11960
12046
|
return probeVercel(credentials, fetchImpl);
|
|
11961
12047
|
case "higgsfield":
|
|
11962
12048
|
return probeHiggsfield(credentials, fetchImpl);
|
|
12049
|
+
case "sportsyear":
|
|
12050
|
+
return probeSportsyear(credentials, fetchImpl);
|
|
11963
12051
|
case "google-workspace":
|
|
11964
12052
|
return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
|
|
11965
12053
|
const info = body;
|
|
@@ -14681,4 +14769,4 @@ export {
|
|
|
14681
14769
|
peekCurrentSession,
|
|
14682
14770
|
readDailySessionPin
|
|
14683
14771
|
};
|
|
14684
|
-
//# sourceMappingURL=chunk-
|
|
14772
|
+
//# sourceMappingURL=chunk-TH3HADAH.js.map
|