@integrity-labs/agt-cli 0.28.1163 → 0.28.1165
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 +6 -6
- package/dist/{chunk-QRFACFSH.js → chunk-FGPPJKJ5.js} +3 -3
- package/dist/{chunk-DPMVTSFO.js → chunk-MBNPMML4.js} +5 -5
- package/dist/{chunk-3DISC7BU.js → chunk-T7NKHOJF.js} +2 -2
- package/dist/{chunk-D55RMQTG.js → chunk-TNPLCJIG.js} +179 -2
- package/dist/chunk-TNPLCJIG.js.map +1 -0
- package/dist/{chunk-CXEP3UC7.js → chunk-ZDHCIJL6.js} +2 -2
- package/dist/{claude-code-updater-DXLSLDHW.js → claude-code-updater-EM3AY2PR.js} +3 -3
- package/dist/{claude-pair-runtime-BCZPQPWP.js → claude-pair-runtime-P45H3GNC.js} +3 -3
- package/dist/lib/manager-worker.js +19 -19
- package/dist/mcp/direct-chat-channel.js +180 -3
- package/dist/mcp/index.js +182 -5
- package/dist/mcp/origami.js +180 -3
- package/dist/mcp/slack-channel.js +180 -3
- package/dist/mcp/telegram-channel.js +180 -3
- package/dist/{persistent-session-XCV7VQWS.js → persistent-session-KSV7RIQQ.js} +4 -4
- package/dist/{responsiveness-probe-WZVS3U5H.js → responsiveness-probe-XVYYSQQN.js} +4 -4
- package/dist/{session-auth-dead-AR7G7XZZ.js → session-auth-dead-KMMDVC5E.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-D55RMQTG.js.map +0 -1
- /package/dist/{chunk-QRFACFSH.js.map → chunk-FGPPJKJ5.js.map} +0 -0
- /package/dist/{chunk-DPMVTSFO.js.map → chunk-MBNPMML4.js.map} +0 -0
- /package/dist/{chunk-3DISC7BU.js.map → chunk-T7NKHOJF.js.map} +0 -0
- /package/dist/{chunk-CXEP3UC7.js.map → chunk-ZDHCIJL6.js.map} +0 -0
- /package/dist/{claude-code-updater-DXLSLDHW.js.map → claude-code-updater-EM3AY2PR.js.map} +0 -0
- /package/dist/{claude-pair-runtime-BCZPQPWP.js.map → claude-pair-runtime-P45H3GNC.js.map} +0 -0
- /package/dist/{persistent-session-XCV7VQWS.js.map → persistent-session-KSV7RIQQ.js.map} +0 -0
- /package/dist/{responsiveness-probe-WZVS3U5H.js.map → responsiveness-probe-XVYYSQQN.js.map} +0 -0
- /package/dist/{session-auth-dead-AR7G7XZZ.js.map → session-auth-dead-KMMDVC5E.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,17 +40,17 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-MBNPMML4.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-FGPPJKJ5.js";
|
|
49
49
|
import {
|
|
50
50
|
markDailySessionSpawn,
|
|
51
51
|
sessionFileExists,
|
|
52
52
|
sessionTranscriptDir
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-ZDHCIJL6.js";
|
|
54
54
|
import "../chunk-B6UYVEMD.js";
|
|
55
55
|
import "../chunk-OAWK4OBN.js";
|
|
56
56
|
import "../chunk-XWVM4KPK.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
requiredMcpWildcard,
|
|
85
85
|
resolveChannels,
|
|
86
86
|
serializeManifestForSlackCli
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-TNPLCJIG.js";
|
|
88
88
|
import "../chunk-EL5MWGGH.js";
|
|
89
89
|
import "../chunk-DGUM43GV.js";
|
|
90
90
|
|
|
@@ -5513,7 +5513,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5513
5513
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5514
5514
|
import chalk18 from "chalk";
|
|
5515
5515
|
import ora16 from "ora";
|
|
5516
|
-
var cliVersion = true ? "0.28.
|
|
5516
|
+
var cliVersion = true ? "0.28.1165" : "dev";
|
|
5517
5517
|
async function fetchLatestVersion() {
|
|
5518
5518
|
const host2 = getHost();
|
|
5519
5519
|
if (!host2) return null;
|
|
@@ -6773,7 +6773,7 @@ function handleError(err) {
|
|
|
6773
6773
|
}
|
|
6774
6774
|
|
|
6775
6775
|
// src/bin/agt.ts
|
|
6776
|
-
var cliVersion2 = true ? "0.28.
|
|
6776
|
+
var cliVersion2 = true ? "0.28.1165" : "dev";
|
|
6777
6777
|
var program = new Command();
|
|
6778
6778
|
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");
|
|
6779
6779
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZDHCIJL6.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
findUsageLimitResetHint,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
remoteMcpConnectionEnvInfix,
|
|
48
48
|
remoteMcpConnectionLabel,
|
|
49
49
|
remoteMcpConnectionScopedEnvVar
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-TNPLCJIG.js";
|
|
51
51
|
import {
|
|
52
52
|
CLAUDE_CONFIG_DIR_ENV,
|
|
53
53
|
archiveLegacyClaudeJson,
|
|
@@ -6130,4 +6130,4 @@ export {
|
|
|
6130
6130
|
stopAllSessionsAndWait,
|
|
6131
6131
|
getProjectDir
|
|
6132
6132
|
};
|
|
6133
|
-
//# sourceMappingURL=chunk-
|
|
6133
|
+
//# sourceMappingURL=chunk-FGPPJKJ5.js.map
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
parseEnvFileEntries,
|
|
17
17
|
parseEnvIntegrations,
|
|
18
18
|
shellQuote
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FGPPJKJ5.js";
|
|
20
20
|
import {
|
|
21
21
|
readDailySessionPin,
|
|
22
22
|
sessionTranscriptDir
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZDHCIJL6.js";
|
|
24
24
|
import {
|
|
25
25
|
classifyUnanswerablePane,
|
|
26
26
|
isConsumerTermsDialogVisible,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
scanConfigForLiteralSecrets,
|
|
91
91
|
worseConnectivityOutcome,
|
|
92
92
|
wrapScheduledTaskPrompt
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-TNPLCJIG.js";
|
|
94
94
|
import {
|
|
95
95
|
claudeJsonPathFor,
|
|
96
96
|
effectiveClaudeJsonPath,
|
|
@@ -8078,7 +8078,7 @@ function exchangeFailureKind(err) {
|
|
|
8078
8078
|
}
|
|
8079
8079
|
|
|
8080
8080
|
// src/lib/api-client.ts
|
|
8081
|
-
var agtCliVersion = true ? "0.28.
|
|
8081
|
+
var agtCliVersion = true ? "0.28.1165" : "dev";
|
|
8082
8082
|
var lastConfigHash = null;
|
|
8083
8083
|
function setConfigHash(hash) {
|
|
8084
8084
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -13235,4 +13235,4 @@ export {
|
|
|
13235
13235
|
managerInstallSystemUnitCommand,
|
|
13236
13236
|
managerUninstallSystemUnitCommand
|
|
13237
13237
|
};
|
|
13238
|
-
//# sourceMappingURL=chunk-
|
|
13238
|
+
//# sourceMappingURL=chunk-MBNPMML4.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XWVM4KPK.js";
|
|
5
5
|
import {
|
|
6
6
|
FORCED_UPDATE_HARD_DEADLINE_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TNPLCJIG.js";
|
|
8
8
|
import {
|
|
9
9
|
effectiveClaudeJsonPath
|
|
10
10
|
} from "./chunk-EL5MWGGH.js";
|
|
@@ -714,4 +714,4 @@ export {
|
|
|
714
714
|
probeClaudeInstalls,
|
|
715
715
|
maybeUpdateClaudeCode
|
|
716
716
|
};
|
|
717
|
-
//# sourceMappingURL=chunk-
|
|
717
|
+
//# sourceMappingURL=chunk-T7NKHOJF.js.map
|
|
@@ -7829,7 +7829,7 @@ var FLAG_REGISTRY = [
|
|
|
7829
7829
|
},
|
|
7830
7830
|
{
|
|
7831
7831
|
key: "ninja-lists",
|
|
7832
|
-
description: 'Ninja Lists (ADR-0120): small tables agents and people fill and review together. Gates the "
|
|
7832
|
+
description: 'Apps, formerly Ninja Lists (ADR-0120): small tables agents and people fill and review together. Gates the "Apps" nav item, the /apps pages AND the /ninja-lists API, per org. Unlike its siblings `projects-menu` / `ninjafy-notes-menu`, this is the whole feature\'s gate, not only its menu entry: the surface is unlaunched, so an org with the flag off gets 404 from the API rather than a hidden link to a working one.',
|
|
7833
7833
|
flagType: "boolean",
|
|
7834
7834
|
// PUBLIC (ADR-0022 §2): the nav shells read it via usePublicBooleanFlag and
|
|
7835
7835
|
// the pages via getPublicBooleanFlagServer, so it is serialized to the
|
|
@@ -16735,6 +16735,183 @@ var videoRenderTriggerAdapter = {
|
|
|
16735
16735
|
};
|
|
16736
16736
|
registerTriggerSource(videoRenderTriggerAdapter);
|
|
16737
16737
|
|
|
16738
|
+
// ../../packages/core/dist/triggers/adapters/webhook.js
|
|
16739
|
+
var WEBHOOK_TRIGGER_PROVIDER = "webhook";
|
|
16740
|
+
var WEBHOOK_MAX_BODY_BYTES = 1280 * 1024;
|
|
16741
|
+
var WEBHOOK_PROMPT_MAX_CHARS = 8e3;
|
|
16742
|
+
var WEBHOOK_RAW_MAX_CHARS = 64 * 1024;
|
|
16743
|
+
var WEBHOOK_INSTRUCTION_MAX_CHARS = 2e3;
|
|
16744
|
+
var WEBHOOK_NAME_MAX_CHARS = 80;
|
|
16745
|
+
var WEBHOOK_DEFAULT_RATE_CAP = 60;
|
|
16746
|
+
var WEBHOOK_MAX_RATE_CAP = 1e3;
|
|
16747
|
+
var WEBHOOK_PRESETS = {
|
|
16748
|
+
// https://docs.aws.amazon.com/eventbridge/latest/ref/overiew-event-structure.html
|
|
16749
|
+
eventbridge: {
|
|
16750
|
+
dedupPath: "id",
|
|
16751
|
+
eventTypePaths: ["source", "detail-type"],
|
|
16752
|
+
payloadPath: "detail",
|
|
16753
|
+
timePath: "time"
|
|
16754
|
+
},
|
|
16755
|
+
// Raw-body hash dedup, whole body as payload. Set dedup_path when the
|
|
16756
|
+
// sender has a stable id, or two identical bodies collapse into one.
|
|
16757
|
+
generic: {}
|
|
16758
|
+
};
|
|
16759
|
+
var PATH_RE = /^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+){0,9}$/;
|
|
16760
|
+
function readPath(value, path) {
|
|
16761
|
+
let cur = value;
|
|
16762
|
+
for (const key of path.split(".")) {
|
|
16763
|
+
if (cur === null || typeof cur !== "object" || Array.isArray(cur))
|
|
16764
|
+
return void 0;
|
|
16765
|
+
if (!Object.prototype.hasOwnProperty.call(cur, key))
|
|
16766
|
+
return void 0;
|
|
16767
|
+
cur = cur[key];
|
|
16768
|
+
}
|
|
16769
|
+
return cur;
|
|
16770
|
+
}
|
|
16771
|
+
function scalarString(v) {
|
|
16772
|
+
if (typeof v === "string")
|
|
16773
|
+
return v.length > 0 ? v : null;
|
|
16774
|
+
if (typeof v === "number" && Number.isFinite(v))
|
|
16775
|
+
return String(v);
|
|
16776
|
+
return null;
|
|
16777
|
+
}
|
|
16778
|
+
function truncate(text, max) {
|
|
16779
|
+
if (text.length <= max)
|
|
16780
|
+
return text;
|
|
16781
|
+
return `${text.slice(0, max)}
|
|
16782
|
+
... [truncated ${text.length - max} more characters]`;
|
|
16783
|
+
}
|
|
16784
|
+
function resolvePreset(config) {
|
|
16785
|
+
const name = config["preset"];
|
|
16786
|
+
const base = typeof name === "string" && name in WEBHOOK_PRESETS ? WEBHOOK_PRESETS[name] : WEBHOOK_PRESETS.generic;
|
|
16787
|
+
const dedup = config["dedup_path"];
|
|
16788
|
+
const type = config["event_type_path"];
|
|
16789
|
+
const payload = config["payload_path"];
|
|
16790
|
+
return {
|
|
16791
|
+
...base,
|
|
16792
|
+
...typeof dedup === "string" && dedup ? { dedupPath: dedup } : {},
|
|
16793
|
+
...typeof type === "string" && type ? { eventTypePaths: [type] } : {},
|
|
16794
|
+
...typeof payload === "string" && payload ? { payloadPath: payload } : {}
|
|
16795
|
+
};
|
|
16796
|
+
}
|
|
16797
|
+
function validateWebhookConfig(input) {
|
|
16798
|
+
const out = {};
|
|
16799
|
+
const name = input["name"];
|
|
16800
|
+
if (name !== void 0) {
|
|
16801
|
+
if (typeof name !== "string")
|
|
16802
|
+
return { ok: false, error: "name must be a string" };
|
|
16803
|
+
const trimmed = name.trim();
|
|
16804
|
+
if (trimmed.length > WEBHOOK_NAME_MAX_CHARS) {
|
|
16805
|
+
return { ok: false, error: `name must be at most ${WEBHOOK_NAME_MAX_CHARS} characters` };
|
|
16806
|
+
}
|
|
16807
|
+
if (trimmed)
|
|
16808
|
+
out["name"] = trimmed;
|
|
16809
|
+
}
|
|
16810
|
+
const instruction = input["instruction"];
|
|
16811
|
+
if (typeof instruction !== "string" || !instruction.trim()) {
|
|
16812
|
+
return {
|
|
16813
|
+
ok: false,
|
|
16814
|
+
error: "instruction is required: tell the agent what to do when an event arrives"
|
|
16815
|
+
};
|
|
16816
|
+
}
|
|
16817
|
+
if (instruction.trim().length > WEBHOOK_INSTRUCTION_MAX_CHARS) {
|
|
16818
|
+
return {
|
|
16819
|
+
ok: false,
|
|
16820
|
+
error: `instruction must be at most ${WEBHOOK_INSTRUCTION_MAX_CHARS} characters`
|
|
16821
|
+
};
|
|
16822
|
+
}
|
|
16823
|
+
out["instruction"] = instruction.trim();
|
|
16824
|
+
const preset = input["preset"] ?? "generic";
|
|
16825
|
+
if (typeof preset !== "string" || !(preset in WEBHOOK_PRESETS)) {
|
|
16826
|
+
return {
|
|
16827
|
+
ok: false,
|
|
16828
|
+
error: `preset must be one of: ${Object.keys(WEBHOOK_PRESETS).join(", ")}`
|
|
16829
|
+
};
|
|
16830
|
+
}
|
|
16831
|
+
out["preset"] = preset;
|
|
16832
|
+
for (const key of ["dedup_path", "event_type_path", "payload_path"]) {
|
|
16833
|
+
const v = input[key];
|
|
16834
|
+
if (v === void 0 || v === null || v === "")
|
|
16835
|
+
continue;
|
|
16836
|
+
if (typeof v !== "string" || !PATH_RE.test(v)) {
|
|
16837
|
+
return { ok: false, error: `${key} must be a dot path like "detail.id"` };
|
|
16838
|
+
}
|
|
16839
|
+
out[key] = v;
|
|
16840
|
+
}
|
|
16841
|
+
const cap = input["max_events_per_hour"];
|
|
16842
|
+
if (cap !== void 0 && cap !== null) {
|
|
16843
|
+
if (typeof cap !== "number" || !Number.isInteger(cap) || cap < 1 || cap > WEBHOOK_MAX_RATE_CAP) {
|
|
16844
|
+
return {
|
|
16845
|
+
ok: false,
|
|
16846
|
+
error: `max_events_per_hour must be an integer from 1 to ${WEBHOOK_MAX_RATE_CAP}`
|
|
16847
|
+
};
|
|
16848
|
+
}
|
|
16849
|
+
out["max_events_per_hour"] = cap;
|
|
16850
|
+
} else {
|
|
16851
|
+
out["max_events_per_hour"] = WEBHOOK_DEFAULT_RATE_CAP;
|
|
16852
|
+
}
|
|
16853
|
+
return { ok: true, config: out };
|
|
16854
|
+
}
|
|
16855
|
+
function webhookRateCap(trigger) {
|
|
16856
|
+
const cap = trigger.config["max_events_per_hour"];
|
|
16857
|
+
if (typeof cap === "number" && Number.isInteger(cap) && cap >= 1) {
|
|
16858
|
+
return Math.min(cap, WEBHOOK_MAX_RATE_CAP);
|
|
16859
|
+
}
|
|
16860
|
+
return WEBHOOK_DEFAULT_RATE_CAP;
|
|
16861
|
+
}
|
|
16862
|
+
function buildWebhookEvent(req, config, now = /* @__PURE__ */ new Date()) {
|
|
16863
|
+
const preset = resolvePreset(config);
|
|
16864
|
+
const body = req.body;
|
|
16865
|
+
const raw = req.rawBody ?? JSON.stringify(body ?? null);
|
|
16866
|
+
const idValue = preset.dedupPath ? scalarString(readPath(body, preset.dedupPath)) : null;
|
|
16867
|
+
const dedupKey = idValue ? `wh:id:${stableHash(idValue)}` : `wh:raw:${stableHash(raw)}`;
|
|
16868
|
+
const typeParts = (preset.eventTypePaths ?? []).map((p2) => scalarString(readPath(body, p2))).filter((v) => v !== null).map((v) => v.slice(0, 200));
|
|
16869
|
+
const eventType = typeParts.length > 0 ? typeParts.join(" / ") : "webhook event";
|
|
16870
|
+
const timeValue = preset.timePath ? scalarString(readPath(body, preset.timePath)) : null;
|
|
16871
|
+
const timeMs = timeValue ? Date.parse(timeValue) : NaN;
|
|
16872
|
+
const occurredAt = Number.isFinite(timeMs) ? new Date(timeMs).toISOString() : now.toISOString();
|
|
16873
|
+
let payload = body;
|
|
16874
|
+
if (preset.payloadPath) {
|
|
16875
|
+
const sub = readPath(body, preset.payloadPath);
|
|
16876
|
+
if (sub !== void 0)
|
|
16877
|
+
payload = sub;
|
|
16878
|
+
}
|
|
16879
|
+
const rendered = typeof payload === "string" ? payload : JSON.stringify(payload, null, 2) ?? "null";
|
|
16880
|
+
const lines = [`Event: ${eventType}`];
|
|
16881
|
+
if (idValue)
|
|
16882
|
+
lines.push(`Event id: ${idValue.slice(0, 200)}`);
|
|
16883
|
+
lines.push("", truncate(rendered, WEBHOOK_PROMPT_MAX_CHARS));
|
|
16884
|
+
return {
|
|
16885
|
+
provider: WEBHOOK_TRIGGER_PROVIDER,
|
|
16886
|
+
occurredAt,
|
|
16887
|
+
dedupKey,
|
|
16888
|
+
sourceTrust: "untrusted",
|
|
16889
|
+
title: eventType,
|
|
16890
|
+
body: lines.join("\n"),
|
|
16891
|
+
// Keep the ledger row bounded: the full body when small, else a marker
|
|
16892
|
+
// with the head of it. Never headers (the bearer token rides there).
|
|
16893
|
+
raw: raw.length <= WEBHOOK_RAW_MAX_CHARS ? body : { truncated: true, bytes: raw.length, head: raw.slice(0, WEBHOOK_RAW_MAX_CHARS) },
|
|
16894
|
+
meaningful: true
|
|
16895
|
+
};
|
|
16896
|
+
}
|
|
16897
|
+
var webhookTriggerAdapter = {
|
|
16898
|
+
provider: WEBHOOK_TRIGGER_PROVIDER,
|
|
16899
|
+
kind: "webhook",
|
|
16900
|
+
webhookAuth: "bearer",
|
|
16901
|
+
webhookEvents: [],
|
|
16902
|
+
multiInstance: true,
|
|
16903
|
+
maxBodyBytes: WEBHOOK_MAX_BODY_BYTES,
|
|
16904
|
+
validateConfig: validateWebhookConfig,
|
|
16905
|
+
rateCapPerHour: (trigger) => webhookRateCap(trigger),
|
|
16906
|
+
// Webhook-kind triggers are minted only on POST /agents/:id/triggers
|
|
16907
|
+
// (agent.edit); /host/triggers refuses non-poll providers.
|
|
16908
|
+
operatorInstruction: true,
|
|
16909
|
+
ingest(req, trigger) {
|
|
16910
|
+
return [buildWebhookEvent(req, trigger.config)];
|
|
16911
|
+
}
|
|
16912
|
+
};
|
|
16913
|
+
registerTriggerSource(webhookTriggerAdapter);
|
|
16914
|
+
|
|
16738
16915
|
// ../../packages/core/dist/restart/breaker-thresholds.js
|
|
16739
16916
|
var RESTART_BREAKER_PROVISIONING_MAX = 5;
|
|
16740
16917
|
var RESTART_BREAKER_PROVISIONING_WINDOW_MS = 18e5;
|
|
@@ -16942,4 +17119,4 @@ export {
|
|
|
16942
17119
|
forcedUpdatePendingForMs,
|
|
16943
17120
|
isForcedUpdatePastDeadline
|
|
16944
17121
|
};
|
|
16945
|
-
//# sourceMappingURL=chunk-
|
|
17122
|
+
//# sourceMappingURL=chunk-TNPLCJIG.js.map
|