@integrity-labs/agt-cli 0.28.779 → 0.28.781

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.
Files changed (24) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-3IDAWL35.js → chunk-GFKNOWPF.js} +9 -5
  3. package/dist/{chunk-3IDAWL35.js.map → chunk-GFKNOWPF.js.map} +1 -1
  4. package/dist/{chunk-LLBJLKGL.js → chunk-TNETRPYC.js} +119 -90
  5. package/dist/chunk-TNETRPYC.js.map +1 -0
  6. package/dist/{chunk-NTWABPKO.js → chunk-YA5PGNN2.js} +2 -2
  7. package/dist/{claude-pair-runtime-3J7KK6BP.js → claude-pair-runtime-2PDHNNKZ.js} +2 -2
  8. package/dist/lib/manager-worker.js +101 -15
  9. package/dist/lib/manager-worker.js.map +1 -1
  10. package/dist/mcp/direct-chat-channel.js +21 -0
  11. package/dist/mcp/index.js +21 -0
  12. package/dist/mcp/origami.js +21 -0
  13. package/dist/mcp/slack-channel.js +21 -0
  14. package/dist/mcp/telegram-channel.js +21 -0
  15. package/dist/{persistent-session-GHIBAWHI.js → persistent-session-PX5UJ3WY.js} +3 -3
  16. package/dist/{responsiveness-probe-TT3LAALK.js → responsiveness-probe-U4BEPPKX.js} +3 -3
  17. package/dist/{session-auth-dead-OHPGSHYL.js → session-auth-dead-2TLMBIM6.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-LLBJLKGL.js.map +0 -1
  20. /package/dist/{chunk-NTWABPKO.js.map → chunk-YA5PGNN2.js.map} +0 -0
  21. /package/dist/{claude-pair-runtime-3J7KK6BP.js.map → claude-pair-runtime-2PDHNNKZ.js.map} +0 -0
  22. /package/dist/{persistent-session-GHIBAWHI.js.map → persistent-session-PX5UJ3WY.js.map} +0 -0
  23. /package/dist/{responsiveness-probe-TT3LAALK.js.map → responsiveness-probe-U4BEPPKX.js.map} +0 -0
  24. /package/dist/{session-auth-dead-OHPGSHYL.js.map → session-auth-dead-2TLMBIM6.js.map} +0 -0
@@ -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;
@@ -6349,6 +6355,27 @@ var FLAG_REGISTRY = [
6349
6355
  // docs/runbooks/async-export-rollout.md, so the placeholder has a named
6350
6356
  // owner and a named moment rather than being a deferral nobody holds.
6351
6357
  since: "0.29.0"
6358
+ },
6359
+ {
6360
+ key: "artefact-export-public-jobs",
6361
+ description: "ADR-0077 / ENG-9730 - whether the PUBLIC Download button may create an async artefact-export job. OFF (default) = today's synchronous render on the public route. SEPARATE FROM artefact-export-jobs-start ON PURPOSE, and the reason is the whole point of the flag. That one is ordered against the agt CLI fleet: a pre-ENG-9729 agent cannot read a job-id body, so arming it early BREAKS an export. This lane's client is a BROWSER, which has no version to converge on - the waiting page is generated fresh by the server on every request. Sharing one lever would hold the customer-facing half hostage to an agent-side constraint that does not apply to it. Note what this flag does NOT gate: a navigation always gets HTML rather than a JSON error body. That is the fix for a live defect (a renderer outage used to navigate a reader off their document to a raw error) and is not conditional on async. Reading artefact-export-jobs-serve as an AND still applies - the master switch turns off both lanes. ONE CHECK BEFORE ARMING, and it is not fleet convergence: the lane assumes a browser NAVIGATES to the waiting page rather than saving it, which holds because the cross-origin download attribute is ignored. Documented for Chrome/Firefox/ WebKit, but unverified on a real Safari - and a phone is where a contract link gets opened. Run the desktop+iOS Safari smoke check in the runbook first. Org-scoped, so it can be armed for one tenant at a time. Deliberately NO envVar (ENG-7972 4KB cap, ENG-8303 pin).",
6362
+ flagType: "boolean",
6363
+ // Dark, like every other lane in this ADR. What it changes is real - a slow
6364
+ // render stops completing in place and starts arriving via a waiting page -
6365
+ // so it wants a deliberate flip per tenant, not a deploy-time default.
6366
+ defaultValue: false
6367
+ // Deliberately NOT sensitive, and the contrast with artefact-export-jobs-start
6368
+ // is the argument. That flag is `sensitive` because arming it can hand a job
6369
+ // id to a binary that answers with a TypeError - an unguarded write breaks a
6370
+ // caller we do not control. Here the worst case is a reader seeing an
6371
+ // explanatory page a few seconds sooner than they otherwise would, on a
6372
+ // client that is re-served from this deploy on every request. Marking it
6373
+ // sensitive would spend a confirmation step on a reversible display change
6374
+ // and blunt the signal on the flags where confirmation is load-bearing.
6375
+ //
6376
+ // No `since` for the same reason: there is no host-side reader and no fleet
6377
+ // to converge, so `classifyHostReach` returning `honors` for every host is
6378
+ // the literal truth here rather than the trap it is one flag above.
6352
6379
  }
6353
6380
  ];
6354
6381
  var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
@@ -13341,6 +13368,8 @@ export {
13341
13368
  scrubPreservingIdentifiers,
13342
13369
  identifierMemoryName,
13343
13370
  EXTRACTOR_IDENTIFIER_RULE,
13371
+ agentRulesRestartBasis,
13372
+ agentHasRules,
13344
13373
  SCRATCH_RETENTION_DAYS,
13345
13374
  CLAUDE_MD_CONTEXT_ALARM_CHARS,
13346
13375
  INTEGRATIONS_SECTION_START,
@@ -13485,4 +13514,4 @@ export {
13485
13514
  peekCurrentSession,
13486
13515
  readDailySessionPin
13487
13516
  };
13488
- //# sourceMappingURL=chunk-LLBJLKGL.js.map
13517
+ //# sourceMappingURL=chunk-TNETRPYC.js.map