@integrity-labs/agt-cli 0.28.779 → 0.28.780
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-NTWABPKO.js → chunk-HHFDK7WB.js} +2 -2
- package/dist/{chunk-LLBJLKGL.js → chunk-REPC7LF2.js} +98 -90
- package/dist/chunk-REPC7LF2.js.map +1 -0
- package/dist/{chunk-3IDAWL35.js → chunk-VYFQRDSP.js} +9 -5
- package/dist/{chunk-3IDAWL35.js.map → chunk-VYFQRDSP.js.map} +1 -1
- package/dist/{claude-pair-runtime-3J7KK6BP.js → claude-pair-runtime-CK34MZ6M.js} +2 -2
- package/dist/lib/manager-worker.js +99 -15
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-GHIBAWHI.js → persistent-session-ETZBTCXU.js} +3 -3
- package/dist/{responsiveness-probe-TT3LAALK.js → responsiveness-probe-EWUJOLVA.js} +3 -3
- package/dist/{session-auth-dead-OHPGSHYL.js → session-auth-dead-TDPTLVBO.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-LLBJLKGL.js.map +0 -1
- /package/dist/{chunk-NTWABPKO.js.map → chunk-HHFDK7WB.js.map} +0 -0
- /package/dist/{claude-pair-runtime-3J7KK6BP.js.map → claude-pair-runtime-CK34MZ6M.js.map} +0 -0
- /package/dist/{persistent-session-GHIBAWHI.js.map → persistent-session-ETZBTCXU.js.map} +0 -0
- /package/dist/{responsiveness-probe-TT3LAALK.js.map → responsiveness-probe-EWUJOLVA.js.map} +0 -0
- /package/dist/{session-auth-dead-OHPGSHYL.js.map → session-auth-dead-TDPTLVBO.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-VYFQRDSP.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-HHFDK7WB.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-REPC7LF2.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.780" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6658,7 +6658,7 @@ function handleError(err) {
|
|
|
6658
6658
|
}
|
|
6659
6659
|
|
|
6660
6660
|
// src/bin/agt.ts
|
|
6661
|
-
var cliVersion2 = true ? "0.28.
|
|
6661
|
+
var cliVersion2 = true ? "0.28.780" : "dev";
|
|
6662
6662
|
var program = new Command();
|
|
6663
6663
|
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");
|
|
6664
6664
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
rotateDailySession,
|
|
19
19
|
sessionFileExists,
|
|
20
20
|
todayLocalIso
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-REPC7LF2.js";
|
|
22
22
|
import {
|
|
23
23
|
reapOrphanChannelMcps
|
|
24
24
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5141,4 +5141,4 @@ export {
|
|
|
5141
5141
|
stopAllSessionsAndWait,
|
|
5142
5142
|
getProjectDir
|
|
5143
5143
|
};
|
|
5144
|
-
//# sourceMappingURL=chunk-
|
|
5144
|
+
//# sourceMappingURL=chunk-HHFDK7WB.js.map
|
|
@@ -82,6 +82,101 @@ function resolveAvatarEnvUrl(raw) {
|
|
|
82
82
|
return { url: trimmed };
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// ../../packages/core/dist/provisioning/mcp-secret-lint.js
|
|
86
|
+
var LITERAL_SECRET_PATTERNS = [
|
|
87
|
+
// Slack bot token — `xoxb-<workspace>-<...>`
|
|
88
|
+
{ name: "slack_bot_token", re: /^xoxb-/ },
|
|
89
|
+
// Slack app-level token (Socket Mode) — `xapp-<...>`
|
|
90
|
+
{ name: "slack_app_token", re: /^xapp-/ },
|
|
91
|
+
// AGT host API key — `tlk_<...>` (see claudecode-plugin-augmented README).
|
|
92
|
+
{ name: "agt_host_api_key", re: /^tlk_/ },
|
|
93
|
+
// Composio / generic api-key prefix — `ak_<...>`
|
|
94
|
+
{ name: "composio_api_key", re: /^ak_/ },
|
|
95
|
+
// Telegram bot token — `<bot id>:AA<...>` (BotFather format). ENG-5901
|
|
96
|
+
// PR 4: the original `\d{10}:AAE` (from the issue AC) was too narrow —
|
|
97
|
+
// live tokens on agt-aws-1 carry `AA` + a varying third character
|
|
98
|
+
// (don/scout/stirling all had AA-not-E tokens the lint and migration
|
|
99
|
+
// missed). Bot ids are 8–12 digits; the token part always starts `AA`.
|
|
100
|
+
{ name: "telegram_bot_token", re: /^\d{8,12}:AA[A-Za-z0-9_-]/ },
|
|
101
|
+
// ENG-5901 extension beyond the original AC's five patterns: a literal
|
|
102
|
+
// JWT (`eyJ...`) is the shape of a leaked AGT_API_KEY, which the
|
|
103
|
+
// value-prefix patterns above would otherwise miss. Header values often
|
|
104
|
+
// carry it behind `Bearer ` (or a copy-pasted `Authorization: Bearer `),
|
|
105
|
+
// so those prefixes are optionally consumed (CodeRabbit #1731).
|
|
106
|
+
// Templates (`Bearer ${AGT_API_KEY}`) and concrete non-secret values
|
|
107
|
+
// (UUIDs, hosts) never put `eyJ` after the prefix, so this stays
|
|
108
|
+
// false-positive-safe inside .mcp.json.
|
|
109
|
+
{ name: "jwt_agt_api_key", re: /^(?:authorization:\s*)?(?:bearer\s+)?eyJ[A-Za-z0-9_-]+\./i }
|
|
110
|
+
];
|
|
111
|
+
function matchLiteralSecret(value) {
|
|
112
|
+
for (const { name, re } of LITERAL_SECRET_PATTERNS) {
|
|
113
|
+
if (re.test(value))
|
|
114
|
+
return name;
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
function scanRecord(server, record, location, findings) {
|
|
119
|
+
if (!record)
|
|
120
|
+
return;
|
|
121
|
+
for (const [field, value] of Object.entries(record)) {
|
|
122
|
+
if (typeof value !== "string")
|
|
123
|
+
continue;
|
|
124
|
+
const pattern = matchLiteralSecret(value);
|
|
125
|
+
if (pattern)
|
|
126
|
+
findings.push({ server, field, location, pattern });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function scanConfigForLiteralSecrets(config) {
|
|
130
|
+
const findings = [];
|
|
131
|
+
if (typeof config !== "object" || config === null)
|
|
132
|
+
return findings;
|
|
133
|
+
const servers = config.mcpServers;
|
|
134
|
+
if (typeof servers !== "object" || servers === null)
|
|
135
|
+
return findings;
|
|
136
|
+
for (const [server, raw] of Object.entries(servers)) {
|
|
137
|
+
if (typeof raw !== "object" || raw === null)
|
|
138
|
+
continue;
|
|
139
|
+
const entry = raw;
|
|
140
|
+
scanRecord(server, entry.env, "env", findings);
|
|
141
|
+
scanRecord(server, entry.headers, "header", findings);
|
|
142
|
+
}
|
|
143
|
+
return findings;
|
|
144
|
+
}
|
|
145
|
+
function formatLiteralSecretRejection(f) {
|
|
146
|
+
return `[mcp-write] [literal-secret-rejected] field=${f.field} server=${f.server} location=${f.location} pattern=${f.pattern}`;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ../../packages/core/dist/provisioning/frameworks/claudecode/agent-rules.js
|
|
150
|
+
var AGENT_RULES_SECTION_START = "<!-- AGT:RULES_START -->";
|
|
151
|
+
var AGENT_RULES_SECTION_END = "<!-- AGT:RULES_END -->";
|
|
152
|
+
var MAX_AGENT_RULES = 8;
|
|
153
|
+
var MAX_AGENT_RULE_CHARS = 200;
|
|
154
|
+
var MAX_AGENT_RULES_CHARS = MAX_AGENT_RULES * (MAX_AGENT_RULE_CHARS + 4);
|
|
155
|
+
function agentRulesRestartBasis(rules) {
|
|
156
|
+
return [...rules].map((r) => r.text.trim()).filter((t) => t.length > 0).sort().join("\0");
|
|
157
|
+
}
|
|
158
|
+
function agentHasRules(rules) {
|
|
159
|
+
return rules.some((r) => r.text.trim().length > 0);
|
|
160
|
+
}
|
|
161
|
+
function buildAgentRulesSection(rules) {
|
|
162
|
+
const kept = rules.map((r) => r.text.trim()).filter(Boolean).filter((t) => t.length <= MAX_AGENT_RULE_CHARS).slice(0, MAX_AGENT_RULES);
|
|
163
|
+
if (kept.length === 0)
|
|
164
|
+
return "";
|
|
165
|
+
const lines = kept.map((t) => `- ${t}`).join("\n");
|
|
166
|
+
return `${AGENT_RULES_SECTION_START}
|
|
167
|
+
## Standing rules from your people
|
|
168
|
+
|
|
169
|
+
Rules your team has asked you to follow every time, in their words. They are not
|
|
170
|
+
task-specific \u2014 they apply on every turn regardless of what you are doing. If one
|
|
171
|
+
ever conflicts with a guardrail above, the guardrail wins and you should say so
|
|
172
|
+
rather than silently picking one.
|
|
173
|
+
|
|
174
|
+
${lines}
|
|
175
|
+
${AGENT_RULES_SECTION_END}
|
|
176
|
+
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
|
|
85
180
|
// ../../packages/core/dist/provisioning/platform-storage.js
|
|
86
181
|
var PLATFORM_STORAGE_RULE = "Store durable, reusable work you build (repeatable procedures, recurring responsibilities, scheduled automation, orchestration scripts) through the Augmented Team platform tools, never as loose local files, unless the user explicitly requests a different destination. Platform artifacts are versioned, reviewable, and survive re-provisioning; loose local files are wiped on the next provision rebuild, reach no one else, and bypass review. Ephemeral scratch files for the task at hand are fine on disk.";
|
|
87
182
|
|
|
@@ -240,95 +335,6 @@ function identifierMemoryName(url) {
|
|
|
240
335
|
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
336
|
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
337
|
|
|
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
|
-
|
|
307
|
-
// ../../packages/core/dist/provisioning/frameworks/claudecode/agent-rules.js
|
|
308
|
-
var AGENT_RULES_SECTION_START = "<!-- AGT:RULES_START -->";
|
|
309
|
-
var AGENT_RULES_SECTION_END = "<!-- AGT:RULES_END -->";
|
|
310
|
-
var MAX_AGENT_RULES = 8;
|
|
311
|
-
var MAX_AGENT_RULE_CHARS = 200;
|
|
312
|
-
var MAX_AGENT_RULES_CHARS = MAX_AGENT_RULES * (MAX_AGENT_RULE_CHARS + 4);
|
|
313
|
-
function buildAgentRulesSection(rules) {
|
|
314
|
-
const kept = rules.map((r) => r.text.trim()).filter(Boolean).filter((t) => t.length <= MAX_AGENT_RULE_CHARS).slice(0, MAX_AGENT_RULES);
|
|
315
|
-
if (kept.length === 0)
|
|
316
|
-
return "";
|
|
317
|
-
const lines = kept.map((t) => `- ${t}`).join("\n");
|
|
318
|
-
return `${AGENT_RULES_SECTION_START}
|
|
319
|
-
## Standing rules from your people
|
|
320
|
-
|
|
321
|
-
Rules your team has asked you to follow every time, in their words. They are not
|
|
322
|
-
task-specific \u2014 they apply on every turn regardless of what you are doing. If one
|
|
323
|
-
ever conflicts with a guardrail above, the guardrail wins and you should say so
|
|
324
|
-
rather than silently picking one.
|
|
325
|
-
|
|
326
|
-
${lines}
|
|
327
|
-
${AGENT_RULES_SECTION_END}
|
|
328
|
-
|
|
329
|
-
`;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
338
|
// ../../packages/core/dist/provisioning/frameworks/claudecode/identity.js
|
|
333
339
|
var SCRATCH_RETENTION_DAYS = 7;
|
|
334
340
|
var CLAUDE_MD_CHARS_PER_TOKEN = 3.57;
|
|
@@ -13341,6 +13347,8 @@ export {
|
|
|
13341
13347
|
scrubPreservingIdentifiers,
|
|
13342
13348
|
identifierMemoryName,
|
|
13343
13349
|
EXTRACTOR_IDENTIFIER_RULE,
|
|
13350
|
+
agentRulesRestartBasis,
|
|
13351
|
+
agentHasRules,
|
|
13344
13352
|
SCRATCH_RETENTION_DAYS,
|
|
13345
13353
|
CLAUDE_MD_CONTEXT_ALARM_CHARS,
|
|
13346
13354
|
INTEGRATIONS_SECTION_START,
|
|
@@ -13485,4 +13493,4 @@ export {
|
|
|
13485
13493
|
peekCurrentSession,
|
|
13486
13494
|
readDailySessionPin
|
|
13487
13495
|
};
|
|
13488
|
-
//# sourceMappingURL=chunk-
|
|
13496
|
+
//# sourceMappingURL=chunk-REPC7LF2.js.map
|