@integrity-labs/agt-cli 0.28.772 → 0.28.774
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-SBAX57SN.js → chunk-BUCKLMKD.js} +6 -71
- package/dist/chunk-BUCKLMKD.js.map +1 -0
- package/dist/{chunk-UPSDSMNC.js → chunk-PMKI7ZTP.js} +136 -1
- package/dist/chunk-PMKI7ZTP.js.map +1 -0
- package/dist/{chunk-R6XGVTQS.js → chunk-SXTHAF3R.js} +2 -2
- package/dist/{claude-pair-runtime-Z7JFVKIY.js → claude-pair-runtime-O7T3PIMT.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/mcp/direct-chat-channel.js +68 -0
- package/dist/mcp/index.js +213 -13
- package/dist/mcp/origami.js +68 -0
- package/dist/mcp/slack-channel.js +68 -0
- package/dist/mcp/telegram-channel.js +68 -0
- package/dist/{persistent-session-NUVUR3PB.js → persistent-session-C2Y4CSAY.js} +3 -3
- package/dist/{responsiveness-probe-J3D7MRIU.js → responsiveness-probe-7CVB5NBT.js} +3 -3
- package/dist/{session-auth-dead-GKZNZKWI.js → session-auth-dead-E3WEZYEH.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-SBAX57SN.js.map +0 -1
- package/dist/chunk-UPSDSMNC.js.map +0 -1
- /package/dist/{chunk-R6XGVTQS.js.map → chunk-SXTHAF3R.js.map} +0 -0
- /package/dist/{claude-pair-runtime-Z7JFVKIY.js.map → claude-pair-runtime-O7T3PIMT.js.map} +0 -0
- /package/dist/{persistent-session-NUVUR3PB.js.map → persistent-session-C2Y4CSAY.js.map} +0 -0
- /package/dist/{responsiveness-probe-J3D7MRIU.js.map → responsiveness-probe-7CVB5NBT.js.map} +0 -0
- /package/dist/{session-auth-dead-GKZNZKWI.js.map → session-auth-dead-E3WEZYEH.js.map} +0 -0
|
@@ -240,6 +240,70 @@ function identifierMemoryName(url) {
|
|
|
240
240
|
var AGENT_IDENTIFIER_RULE = "An identifier the work depends on is never an ephemeral detail: when a message gives you a URL, file, folder, document or ticket id, save the identifier itself, verbatim, before you reply \u2014 as its own short entry, not folded into prose. A note that a link is coming is not a substitute for the link. You can always re-derive a summary; you can never re-derive an identifier without asking the person for it again.";
|
|
241
241
|
var EXTRACTOR_IDENTIFIER_RULE = 'An identifier is ALWAYS durable, and is the one exception to "no one-off task details": if the conversation contains a URL, file, folder, document or ticket id that the work depends on, emit it as a "reference" memory with the identifier copied EXACTLY as it appeared \u2014 never paraphrased, never shortened, never described. Conversation history does not survive a restart, so an identifier that is only described is lost.';
|
|
242
242
|
|
|
243
|
+
// ../../packages/core/dist/provisioning/mcp-secret-lint.js
|
|
244
|
+
var LITERAL_SECRET_PATTERNS = [
|
|
245
|
+
// Slack bot token — `xoxb-<workspace>-<...>`
|
|
246
|
+
{ name: "slack_bot_token", re: /^xoxb-/ },
|
|
247
|
+
// Slack app-level token (Socket Mode) — `xapp-<...>`
|
|
248
|
+
{ name: "slack_app_token", re: /^xapp-/ },
|
|
249
|
+
// AGT host API key — `tlk_<...>` (see claudecode-plugin-augmented README).
|
|
250
|
+
{ name: "agt_host_api_key", re: /^tlk_/ },
|
|
251
|
+
// Composio / generic api-key prefix — `ak_<...>`
|
|
252
|
+
{ name: "composio_api_key", re: /^ak_/ },
|
|
253
|
+
// Telegram bot token — `<bot id>:AA<...>` (BotFather format). ENG-5901
|
|
254
|
+
// PR 4: the original `\d{10}:AAE` (from the issue AC) was too narrow —
|
|
255
|
+
// live tokens on agt-aws-1 carry `AA` + a varying third character
|
|
256
|
+
// (don/scout/stirling all had AA-not-E tokens the lint and migration
|
|
257
|
+
// missed). Bot ids are 8–12 digits; the token part always starts `AA`.
|
|
258
|
+
{ name: "telegram_bot_token", re: /^\d{8,12}:AA[A-Za-z0-9_-]/ },
|
|
259
|
+
// ENG-5901 extension beyond the original AC's five patterns: a literal
|
|
260
|
+
// JWT (`eyJ...`) is the shape of a leaked AGT_API_KEY, which the
|
|
261
|
+
// value-prefix patterns above would otherwise miss. Header values often
|
|
262
|
+
// carry it behind `Bearer ` (or a copy-pasted `Authorization: Bearer `),
|
|
263
|
+
// so those prefixes are optionally consumed (CodeRabbit #1731).
|
|
264
|
+
// Templates (`Bearer ${AGT_API_KEY}`) and concrete non-secret values
|
|
265
|
+
// (UUIDs, hosts) never put `eyJ` after the prefix, so this stays
|
|
266
|
+
// false-positive-safe inside .mcp.json.
|
|
267
|
+
{ name: "jwt_agt_api_key", re: /^(?:authorization:\s*)?(?:bearer\s+)?eyJ[A-Za-z0-9_-]+\./i }
|
|
268
|
+
];
|
|
269
|
+
function matchLiteralSecret(value) {
|
|
270
|
+
for (const { name, re } of LITERAL_SECRET_PATTERNS) {
|
|
271
|
+
if (re.test(value))
|
|
272
|
+
return name;
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
function scanRecord(server, record, location, findings) {
|
|
277
|
+
if (!record)
|
|
278
|
+
return;
|
|
279
|
+
for (const [field, value] of Object.entries(record)) {
|
|
280
|
+
if (typeof value !== "string")
|
|
281
|
+
continue;
|
|
282
|
+
const pattern = matchLiteralSecret(value);
|
|
283
|
+
if (pattern)
|
|
284
|
+
findings.push({ server, field, location, pattern });
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function scanConfigForLiteralSecrets(config) {
|
|
288
|
+
const findings = [];
|
|
289
|
+
if (typeof config !== "object" || config === null)
|
|
290
|
+
return findings;
|
|
291
|
+
const servers = config.mcpServers;
|
|
292
|
+
if (typeof servers !== "object" || servers === null)
|
|
293
|
+
return findings;
|
|
294
|
+
for (const [server, raw] of Object.entries(servers)) {
|
|
295
|
+
if (typeof raw !== "object" || raw === null)
|
|
296
|
+
continue;
|
|
297
|
+
const entry = raw;
|
|
298
|
+
scanRecord(server, entry.env, "env", findings);
|
|
299
|
+
scanRecord(server, entry.headers, "header", findings);
|
|
300
|
+
}
|
|
301
|
+
return findings;
|
|
302
|
+
}
|
|
303
|
+
function formatLiteralSecretRejection(f) {
|
|
304
|
+
return `[mcp-write] [literal-secret-rejected] field=${f.field} server=${f.server} location=${f.location} pattern=${f.pattern}`;
|
|
305
|
+
}
|
|
306
|
+
|
|
243
307
|
// ../../packages/core/dist/provisioning/frameworks/claudecode/agent-rules.js
|
|
244
308
|
var AGENT_RULES_SECTION_START = "<!-- AGT:RULES_START -->";
|
|
245
309
|
var AGENT_RULES_SECTION_END = "<!-- AGT:RULES_END -->";
|
|
@@ -6217,6 +6281,74 @@ var FLAG_REGISTRY = [
|
|
|
6217
6281
|
// dominant callers. This is precisely the deliberate, audited flip ADR-0022
|
|
6218
6282
|
// §4 reserves confirmation for.
|
|
6219
6283
|
sensitive: true
|
|
6284
|
+
},
|
|
6285
|
+
{
|
|
6286
|
+
key: "artefact-export-jobs-serve",
|
|
6287
|
+
description: 'ADR-0077 / ENG-9729 \u2014 the MASTER switch for the async artefact-export lane. ON (default) = a route may resolve an export request to an artefact_export_jobs row: attach to one that is already rendering, or hand back the bytes of one that has completed. OFF = the job lane is invisible and every export renders synchronously, which is the pre-ADR-0077 behaviour. DEFAULT true DOES NOT MEAN ASYNC IS ON. Nothing CREATES a job unless artefact-export-jobs-start is also on, so with the shipped defaults this flag governs an empty table and no caller can tell it exists. WHY THE LANE IS TWO FLAGS AND NOT ONE. Disarming the start lever while renders are in flight must not strand the callers holding their job ids: those renders keep running (a Lambda invocation nobody awaits still runs to completion), and their bytes land in the private bucket regardless. A single flag would take the only door to them away at the moment it was most needed. So "stop creating new jobs" and "keep serving the ones that exist" are separate, and this is the second one. READ-ONLY BY CONSTRUCTION: with start off, the route looks up a REUSABLE row and nothing more \u2014 it never inserts, never requeues a terminal row, and never dispatches a renderer. A requeue mints an attempt and fires an invoke, so a serve lever that requeued would start new renders under a disarmed start lever, which is the exact thing disarming it was meant to stop. Evaluated server-side per request (org-scoped), so a flip applies within the evaluation cache TTL with no deploy and no host update. Deliberately NO envVar: the consumer is the API Lambda, whose environment block is at the AWS 4KB cap (ENG-7972), and a literal in sst.config.ts would pin every stage and make the admin control inert (ENG-8303).',
|
|
6288
|
+
flagType: "boolean",
|
|
6289
|
+
// ON is the no-op default here, which looks like the wrong direction until
|
|
6290
|
+
// you read it with the start lever: serving an empty table is
|
|
6291
|
+
// indistinguishable from not serving at all. Shipping it OFF would instead
|
|
6292
|
+
// mean that arming async later takes TWO flips, and that the second one is
|
|
6293
|
+
// the easy one to forget — leaving a fleet that creates jobs it refuses to
|
|
6294
|
+
// serve, i.e. every slow export failing while the flag page reads "async: on".
|
|
6295
|
+
defaultValue: true
|
|
6296
|
+
},
|
|
6297
|
+
{
|
|
6298
|
+
key: "artefact-export-jobs-start",
|
|
6299
|
+
description: "ADR-0077 / ENG-9729 \u2014 whether a route may CREATE an async artefact-export job: insert or requeue an artefact_export_jobs row, dispatch the worker, and answer a caller with a job id instead of bytes when the ~20s grace window is exceeded. OFF (default) = today's synchronous render on every export. THIS IS THE ROLLOUT GATE, AND IT IS ORDERED AGAINST A CLIENT, NOT A DEPLOY. The agent caller is `artefacts_download`, which ships inside the agt CLI to a permanently mixed-version fleet \u2014 hosts self-update overnight and some never do. Arming this against a CLI that cannot read a job-id body does not degrade an export, it BREAKS one: the pre-ENG-9729 tool does Buffer.from(data.base64) with no branch for any other shape, so a job id arrives as a TypeError deep in file-write logic. That is strictly worse than the 503 + Retry-After it would replace, which the tool already understands. A published CLI version is NOT evidence of convergence \u2014 measure hosts.agt_version across recently-seen hosts first. The procedure is docs/runbooks/async-export-rollout.md; arm this only after running it. Turning it back OFF stops new jobs and leaves artefact-export-jobs-serve delivering the in-flight ones, which is why the two are separate. Org-scoped, so it can be armed for one tenant at a time. Deliberately NO envVar (ENG-7972 4KB cap, ENG-8303 pin).",
|
|
6300
|
+
flagType: "boolean",
|
|
6301
|
+
// Dark. The client half of this change publishes with the same merge, and
|
|
6302
|
+
// the fleet has not converged on it at merge time by construction — see the
|
|
6303
|
+
// runbook. Arming is an operator action taken against a measurement.
|
|
6304
|
+
defaultValue: false,
|
|
6305
|
+
// Arming this changes the RESPONSE SHAPE of a route whose callers include a
|
|
6306
|
+
// binary we do not control the version of. ADR-0022 section 4 reserves
|
|
6307
|
+
// confirmation for exactly this: a flip that a single unguarded write should
|
|
6308
|
+
// not be able to make.
|
|
6309
|
+
sensitive: true,
|
|
6310
|
+
// `since` USED SLIGHTLY OFF-LABEL, AND THAT IS THE POINT.
|
|
6311
|
+
//
|
|
6312
|
+
// The field's docblock says it records the CLI whose build first shipped
|
|
6313
|
+
// this flag's HOST-SIDE READER, and this flag has none — it is evaluated
|
|
6314
|
+
// server-side in the export route, so every host "honors" a flip the instant
|
|
6315
|
+
// it is made. Read literally, `since` should therefore be undefined.
|
|
6316
|
+
//
|
|
6317
|
+
// Undefined is the dangerous answer. `classifyHostReach` returns `honors`
|
|
6318
|
+
// for every host when `since` is unset, so the flip-reach modal — the screen
|
|
6319
|
+
// an operator is looking at AT THE MOMENT OF THE FLIP — would report full
|
|
6320
|
+
// reach for the one flag whose entire purpose is "do not flip this until you
|
|
6321
|
+
// have measured the fleet". It would be telling the truth about the
|
|
6322
|
+
// mechanism (the flip does reach every host immediately) while giving
|
|
6323
|
+
// exactly the wrong answer to the question being asked (can those hosts
|
|
6324
|
+
// survive it). The dependency is real; it is on the CLI's ability to SURVIVE
|
|
6325
|
+
// the flag, not to READ it, and the modal cannot tell those apart.
|
|
6326
|
+
//
|
|
6327
|
+
// Pinned ABOVE every published release on purpose, the `agt-bin-path`
|
|
6328
|
+
// precedent: it classifies EVERY host as `stale`, so the modal reports no
|
|
6329
|
+
// reach rather than reach it has no basis for. A guessed number would be
|
|
6330
|
+
// worse than a placeholder, and the two directions are not symmetric —
|
|
6331
|
+
// too HIGH over-warns (annoying), too LOW promises reach to a build that
|
|
6332
|
+
// answers a job id with a TypeError inside file-write logic (a broken export
|
|
6333
|
+
// reported to the agent as "download failed").
|
|
6334
|
+
//
|
|
6335
|
+
// The exact version cannot be known here: the CLI auto-publishes ON MERGE of
|
|
6336
|
+
// this change, patch-bumping from whatever is current, so any pre-merge
|
|
6337
|
+
// value is a guess. Do NOT read it off `apps/cli/package.json`, and do NOT
|
|
6338
|
+
// trust a version produced by re-running a failed publish job (ENG-9647: a
|
|
6339
|
+
// re-run rebuilds the ORIGINAL tree under a HIGHER number, so the version
|
|
6340
|
+
// string would claim a capability the bytes do not carry).
|
|
6341
|
+
//
|
|
6342
|
+
// AND `since` IS ADVISORY, NOT A GUARD. It is read in exactly one place —
|
|
6343
|
+
// the flip-reach modal. Nothing in the evaluation or override-write path
|
|
6344
|
+
// consults it, so this changes what an operator is TOLD and does not stop a
|
|
6345
|
+
// flip on an under-`since` host. What holds the line is `defaultValue:
|
|
6346
|
+
// false` + `sensitive: true` + the runbook.
|
|
6347
|
+
//
|
|
6348
|
+
// REPLACING IT IS STEP 1 OF THE ARMING PROCEDURE in
|
|
6349
|
+
// docs/runbooks/async-export-rollout.md, so the placeholder has a named
|
|
6350
|
+
// owner and a named moment rather than being a deferral nobody holds.
|
|
6351
|
+
since: "0.29.0"
|
|
6220
6352
|
}
|
|
6221
6353
|
];
|
|
6222
6354
|
var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
|
|
@@ -13184,6 +13316,9 @@ function readDailySessionPin(codeName) {
|
|
|
13184
13316
|
}
|
|
13185
13317
|
|
|
13186
13318
|
export {
|
|
13319
|
+
LITERAL_SECRET_PATTERNS,
|
|
13320
|
+
scanConfigForLiteralSecrets,
|
|
13321
|
+
formatLiteralSecretRejection,
|
|
13187
13322
|
DEFAULT_FRAMEWORK,
|
|
13188
13323
|
isDeprecatedFramework,
|
|
13189
13324
|
modelSlotsForFramework,
|
|
@@ -13347,4 +13482,4 @@ export {
|
|
|
13347
13482
|
peekCurrentSession,
|
|
13348
13483
|
readDailySessionPin
|
|
13349
13484
|
};
|
|
13350
|
-
//# sourceMappingURL=chunk-
|
|
13485
|
+
//# sourceMappingURL=chunk-PMKI7ZTP.js.map
|