@integrity-labs/agt-cli 0.28.807 → 0.28.809
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-SHQCTBFE.js → chunk-2Z5SJMME.js} +4 -4
- package/dist/{chunk-GIV6ORI3.js → chunk-5TXNXEOF.js} +2 -2
- package/dist/{chunk-VK35F6O7.js → chunk-JNHL4KS4.js} +77 -12
- package/dist/chunk-JNHL4KS4.js.map +1 -0
- package/dist/{claude-pair-runtime-XZLX2PEL.js → claude-pair-runtime-P4R5WMUQ.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/mcp/direct-chat-channel.js +49 -9
- package/dist/mcp/index.js +49 -9
- package/dist/mcp/origami.js +49 -9
- package/dist/mcp/slack-channel.js +49 -9
- package/dist/mcp/telegram-channel.js +49 -9
- package/dist/{persistent-session-LEICQMWY.js → persistent-session-QYP6FYFI.js} +3 -3
- package/dist/{responsiveness-probe-WEXP254C.js → responsiveness-probe-SL2MZ3WT.js} +3 -3
- package/dist/{session-auth-dead-AROKHZET.js → session-auth-dead-VZWGAV5K.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-VK35F6O7.js.map +0 -1
- /package/dist/{chunk-SHQCTBFE.js.map → chunk-2Z5SJMME.js.map} +0 -0
- /package/dist/{chunk-GIV6ORI3.js.map → chunk-5TXNXEOF.js.map} +0 -0
- /package/dist/{claude-pair-runtime-XZLX2PEL.js.map → claude-pair-runtime-P4R5WMUQ.js.map} +0 -0
- /package/dist/{persistent-session-LEICQMWY.js.map → persistent-session-QYP6FYFI.js.map} +0 -0
- /package/dist/{responsiveness-probe-WEXP254C.js.map → responsiveness-probe-SL2MZ3WT.js.map} +0 -0
- /package/dist/{session-auth-dead-AROKHZET.js.map → session-auth-dead-VZWGAV5K.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-2Z5SJMME.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-5TXNXEOF.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-JNHL4KS4.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.809" : "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.809" : "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) => {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseEnvIntegrations,
|
|
17
17
|
shellQuote,
|
|
18
18
|
summarizeUnanswerablePane
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5TXNXEOF.js";
|
|
20
20
|
import {
|
|
21
21
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
22
22
|
INTEGRATIONS_SECTION_END,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
sessionTranscriptDir,
|
|
72
72
|
worseConnectivityOutcome,
|
|
73
73
|
wrapScheduledTaskPrompt
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-JNHL4KS4.js";
|
|
75
75
|
import {
|
|
76
76
|
parsePsRows
|
|
77
77
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6523,7 +6523,7 @@ function exchangeFailureKind(err) {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
|
|
6525
6525
|
// src/lib/api-client.ts
|
|
6526
|
-
var agtCliVersion = true ? "0.28.
|
|
6526
|
+
var agtCliVersion = true ? "0.28.809" : "dev";
|
|
6527
6527
|
var lastConfigHash = null;
|
|
6528
6528
|
function setConfigHash(hash) {
|
|
6529
6529
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10818,4 +10818,4 @@ export {
|
|
|
10818
10818
|
managerInstallSystemUnitCommand,
|
|
10819
10819
|
managerUninstallSystemUnitCommand
|
|
10820
10820
|
};
|
|
10821
|
-
//# sourceMappingURL=chunk-
|
|
10821
|
+
//# sourceMappingURL=chunk-2Z5SJMME.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
rotateDailySession,
|
|
19
19
|
sessionFileExists,
|
|
20
20
|
todayLocalIso
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JNHL4KS4.js";
|
|
22
22
|
import {
|
|
23
23
|
reapOrphanChannelMcps
|
|
24
24
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5209,4 +5209,4 @@ export {
|
|
|
5209
5209
|
stopAllSessionsAndWait,
|
|
5210
5210
|
getProjectDir
|
|
5211
5211
|
};
|
|
5212
|
-
//# sourceMappingURL=chunk-
|
|
5212
|
+
//# sourceMappingURL=chunk-5TXNXEOF.js.map
|
|
@@ -357,6 +357,32 @@ function checkClaudeMdSize(md) {
|
|
|
357
357
|
overBy: Math.max(0, chars - CLAUDE_MD_CONTEXT_ALARM_CHARS)
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
+
var CLAUDE_MD_WARN_DELTA_CHARS = 1e3;
|
|
361
|
+
var CLAUDE_MD_WARN_INTERVAL_MS = 60 * 60 * 1e3;
|
|
362
|
+
var CLAUDE_MD_WARN_STATE_MAX = 256;
|
|
363
|
+
var claudeMdWarnState = /* @__PURE__ */ new Map();
|
|
364
|
+
function shouldWarnClaudeMdOverBudget(codeName, size, nowMs = Date.now()) {
|
|
365
|
+
const prev = claudeMdWarnState.get(codeName);
|
|
366
|
+
const changedSeverity = prev !== void 0 && prev.ok !== size.ok;
|
|
367
|
+
const movedMaterially = prev !== void 0 && Math.abs(size.chars - prev.chars) >= CLAUDE_MD_WARN_DELTA_CHARS;
|
|
368
|
+
const stale = prev !== void 0 && nowMs - prev.atMs >= CLAUDE_MD_WARN_INTERVAL_MS;
|
|
369
|
+
if (prev !== void 0 && !changedSeverity && !movedMaterially && !stale)
|
|
370
|
+
return false;
|
|
371
|
+
if (claudeMdWarnState.size >= CLAUDE_MD_WARN_STATE_MAX && !claudeMdWarnState.has(codeName)) {
|
|
372
|
+
let oldestKey;
|
|
373
|
+
let oldestAt = Infinity;
|
|
374
|
+
for (const [key, st] of claudeMdWarnState) {
|
|
375
|
+
if (st.atMs < oldestAt) {
|
|
376
|
+
oldestAt = st.atMs;
|
|
377
|
+
oldestKey = key;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (oldestKey !== void 0)
|
|
381
|
+
claudeMdWarnState.delete(oldestKey);
|
|
382
|
+
}
|
|
383
|
+
claudeMdWarnState.set(codeName, { chars: size.chars, ok: size.ok, atMs: nowMs });
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
360
386
|
function buildMemorySection() {
|
|
361
387
|
const recall = `### Recall
|
|
362
388
|
|
|
@@ -1485,9 +1511,9 @@ Reversible and internal actions stay liberal \u2014 draft, edit, open a PR.
|
|
|
1485
1511
|
- Before concluding that an agent or person doesn't exist, call \`directory_lookup\` first. Only report "not found" after the directory confirms no match. (ENG-7955)
|
|
1486
1512
|
${frontmatter.environment === "prod" ? "- Production environment: exercise extra caution with all operations.\n" : ""}`;
|
|
1487
1513
|
const size = checkClaudeMdSize(body);
|
|
1488
|
-
if (!size.withinBudget) {
|
|
1514
|
+
if (!size.withinBudget && shouldWarnClaudeMdOverBudget(frontmatter.code_name, size)) {
|
|
1489
1515
|
const share = (size.contextShare * 100).toFixed(1);
|
|
1490
|
-
console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars (~${size.tokens} tokens, ~${share}% of a ${CLAUDE_MD_CONTEXT_WINDOW_TOKENS}-token context window), over the ${CLAUDE_MD_BUDGET_CHARS}-char generator budget by ${size.chars - CLAUDE_MD_BUDGET_CHARS}${size.ok ? "" : ` \u2014 and past the ${CLAUDE_MD_CONTEXT_ALARM_CHARS}-char operational threshold`}. Nothing is truncated; this is context the agent pays for on every request. Trim the generated sections
|
|
1516
|
+
console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars (~${size.tokens} tokens, ~${share}% of a ${CLAUDE_MD_CONTEXT_WINDOW_TOKENS}-token context window), over the ${CLAUDE_MD_BUDGET_CHARS}-char generator budget by ${size.chars - CLAUDE_MD_BUDGET_CHARS}${size.ok ? "" : ` \u2014 and past the ${CLAUDE_MD_CONTEXT_ALARM_CHARS}-char operational threshold`}. Nothing is truncated; this is context the agent pays for on every request. Trim the generated sections \u2014 the largest movers are the per-agent role/charter prose, the Active-tasks block and the Integrations list. packages/core/src/__tests__/claudemd-size-budget.test.ts is the CI gate.`);
|
|
1491
1517
|
}
|
|
1492
1518
|
return body;
|
|
1493
1519
|
}
|
|
@@ -1934,7 +1960,15 @@ var INTEGRATION_REGISTRY = [
|
|
|
1934
1960
|
// integration_rate_cards; this only declares the model + meter.
|
|
1935
1961
|
premium: {
|
|
1936
1962
|
pricing: "usage",
|
|
1937
|
-
|
|
1963
|
+
// THE OPT-IN AUTHORISES BOTH METERS, SO THE NOTE NAMES BOTH (ENG-9913).
|
|
1964
|
+
// This string is the point of sale — it renders in the add-integration
|
|
1965
|
+
// dialog an org admin reads before opting in — and it described only
|
|
1966
|
+
// `voice_session` while the same opt-in, and the same $50 pool, had also
|
|
1967
|
+
// covered Ninja Notes cloud transcription since ENG-9870. "Of audio"
|
|
1968
|
+
// rather than "of meeting" is load-bearing: the two capture sources post
|
|
1969
|
+
// independently, so an hour-long meeting on default settings spends two
|
|
1970
|
+
// audio-hours (ADR-0063 §2a).
|
|
1971
|
+
note: "Billed per minute of real-time voice conversation, and per hour of audio for Ninja Notes cloud transcription \u2014 both against the same monthly budget.",
|
|
1938
1972
|
meters: [
|
|
1939
1973
|
{ event_type: "voice_session", unit: "minute" },
|
|
1940
1974
|
// ENG-9870. Ninja Notes cloud transcription, on the SAME definition id
|
|
@@ -1946,16 +1980,24 @@ var INTEGRATION_REGISTRY = [
|
|
|
1946
1980
|
// `audio_hour`, not `minute`. The vendor prices per hour and the sell
|
|
1947
1981
|
// price is per hour, so hours store exactly (50 minor) where minutes
|
|
1948
1982
|
// would be 0.8333 repeating; `integration_usage_events.units` is
|
|
1949
|
-
// `numeric`, so
|
|
1983
|
+
// `numeric`, so 30 minutes of audio records 0.5 units precisely. This
|
|
1950
1984
|
// is the answer to ENG-9773 §10.1's open question about whether hours
|
|
1951
1985
|
// convert to minutes or the vocabulary gains hours.
|
|
1952
1986
|
//
|
|
1953
|
-
//
|
|
1954
|
-
//
|
|
1955
|
-
//
|
|
1956
|
-
//
|
|
1957
|
-
//
|
|
1958
|
-
//
|
|
1987
|
+
// AN AUDIO-HOUR IS NOT A MEETING-HOUR (ENG-9913, Brad, 2026-09-03). The
|
|
1988
|
+
// Mac captures system audio and the microphone as two independent
|
|
1989
|
+
// pipelines that post separately, and both default on, so the ordinary
|
|
1990
|
+
// meeting records two units per wall-clock hour. That is deliberate: the
|
|
1991
|
+
// audio-hour is what we buy, since xAI bills on the duration uploaded.
|
|
1992
|
+
// Pricing per meeting-hour would have varied the markup with a capture
|
|
1993
|
+
// toggle and could only have been built on a client's assertion about
|
|
1994
|
+
// how many pipelines were live. See ADR-0063 §2a.
|
|
1995
|
+
//
|
|
1996
|
+
// THE CHOKEPOINT EXISTS NOW — `POST /notes/transcribe` (ENG-9913)
|
|
1997
|
+
// reserves against this meter before the vendor call, from the bytes it
|
|
1998
|
+
// received. The rate card still had to land first, in ENG-9870: a
|
|
1999
|
+
// billable event with no USD rate makes `evaluateUsageBudget` throw, and
|
|
2000
|
+
// on a SHARED pool that would break Voice Chat's budget check too.
|
|
1959
2001
|
{ event_type: "transcription", unit: "audio_hour" }
|
|
1960
2002
|
]
|
|
1961
2003
|
}
|
|
@@ -2852,7 +2894,18 @@ var INTEGRATION_REGISTRY = [
|
|
|
2852
2894
|
// premium surface — is the structurally right answer and the follow-up.
|
|
2853
2895
|
premium: {
|
|
2854
2896
|
pricing: "included",
|
|
2855
|
-
|
|
2897
|
+
// "THE ONE EXCEPTION" BECAME TWO (ENG-9913). Cloud transcription is the
|
|
2898
|
+
// second metered capability under this integration, and this sentence was
|
|
2899
|
+
// true only for as long as its flag stayed off — it would have become
|
|
2900
|
+
// false on arming, silently, in a consent dialog. Both exceptions are
|
|
2901
|
+
// written the same way, and both are still off until someone turns them
|
|
2902
|
+
// on, so the sentence is accurate before and after the rollout.
|
|
2903
|
+
//
|
|
2904
|
+
// "Per hour of AUDIO" is deliberate here too: the two capture sources post
|
|
2905
|
+
// independently, so an hour-long meeting on default settings spends two
|
|
2906
|
+
// audio-hours (ADR-0063 §2a). The Mac's own caption carries the fuller
|
|
2907
|
+
// explanation, at the point where the person choosing it can read it.
|
|
2908
|
+
note: "Notes are included in your plan. Transcription runs on your own Mac by default and no platform summariser runs, so nothing is metered per note \u2014 the agent turn that reads it is billed as agent-hours like any other. Two capabilities are turned on separately and billed when they are: live meeting advising, per minute the advisor is armed; and cloud transcription, per hour of audio."
|
|
2856
2909
|
}
|
|
2857
2910
|
},
|
|
2858
2911
|
{
|
|
@@ -6432,6 +6485,18 @@ var FLAG_REGISTRY = [
|
|
|
6432
6485
|
// agent-hours-billing-enabled.
|
|
6433
6486
|
sensitive: true
|
|
6434
6487
|
},
|
|
6488
|
+
{
|
|
6489
|
+
key: "cloud-speech-to-text",
|
|
6490
|
+
description: 'Cloud transcription in Ninja Notes (ENG-9913). When ON for an org, a person recording a meeting on the Mac may choose to have each capture window transcribed by xAI instead of on-device: the window is POSTed to /notes/transcribe, proxied to xAI with the platform key, metered as grok-voice/transcription per audio_hour, and the text comes back with no speaker labels. THIS IS OUR ROLLOUT GATE AND IT IS THE THIRD KEY, NOT THE FIRST. Three things must all be true before a window leaves the Mac: the org holds the grok-voice premium opt-in (authorisation, resolveCloudSttEntitlement), the user has elected it per-install (consent, CaptureSettings.cloudTranscriptionEnabled), and this flag is on (our own readiness). Without this flag the first two alone were sufficient, which is why it exists: resolveCloudSttEntitlement reports enabled for every org that ever bought Voice Chat, so the route would go live for all of them the moment it deployed. It is what finally lets the server emit `not_available` \u2014 CloudTranscriptionRefusal.notRolledOut has shipped since ENG-9869 carrying the sentence "Cloud transcription is not available for your organisation yet" with nothing able to produce it. Boolean gate; ships dark. OFF NEVER COSTS THE RECORDING. An org without the flag \u2014 or a flag read that fails \u2014 transcribes on-device exactly as before; the microphone still starts and the note is still transcribed and delivered. Same direction as live-meeting-advisor and for the same reason: the user pressed Record and a recording is what they are owed. It is also what makes rollback cheap, because flipping this off mid-flight degrades in-progress meetings to on-device rather than breaking them. Deliberately NO envVar. This is an org-scoped gate, and an envVar is highest-precedence per ADR-0022 \u2014 a literal in sst.config.ts would pin every stage and make the admin control do nothing, the ENG-8303 class exactly. No `since`: the reader is the API route, not a host-side agt-cli consumer, so this does not depend on fleet convergence. The Mac client is a separate fleet that reports no version at all, which is precisely why the gate has to live server-side.',
|
|
6491
|
+
flagType: "boolean",
|
|
6492
|
+
defaultValue: false,
|
|
6493
|
+
// Turning it ON starts sending meeting audio — INCLUDING the other side of
|
|
6494
|
+
// the call, whose participants have not been asked — to a third-party
|
|
6495
|
+
// vendor, and arms a per-audio-hour meter against the org's shared
|
|
6496
|
+
// grok-voice budget. Either half alone would warrant the confirm ADR-0022
|
|
6497
|
+
// §4 reserves for deliberate, audited flips.
|
|
6498
|
+
sensitive: true
|
|
6499
|
+
},
|
|
6435
6500
|
{
|
|
6436
6501
|
key: "first-party-token-refusal",
|
|
6437
6502
|
description: "ENG-8972 AC4 / ADR-0076 decision 2 \u2014 whether `resolveUserId` (packages/api/src/middleware/auth.ts) REFUSES a bearer token carrying a first-party marker that is foreign to the host-exchange lane. SUPABASE_JWT_SECRET is symmetric and signs twelve distinct token families; the generic Bearer door has always admitted any of them that mints a uuid-shaped `sub`, so a token minted for one purpose authenticates as a user for every purpose. off = the capture never runs (no log, no refusal). shadow = record the population an enforcement flip would change, on BOTH admitting lanes (lane=gotrue, lane=sub-claim), and refuse nothing \u2014 this is exactly the behaviour compiled into prod today. enforce = return null with reason=foreign-first-party-marker, above the strategy split, so the token reaches neither GoTrue nor the sub-claim lane. DEFAULT IS `shadow`, NOT `off`, and the divergence is deliberate \u2014 the shadow lines have been live in prod since 68863974b, and they are the soak instrument. Defaulting to `off` would silently switch off the measurement this flag exists to act on: the channel-quarantine-mode landmine (ENG-6252) in its exact shape. A flag-read failure degrades to `shadow` for the same reason it fails open elsewhere on this path: this is the platform front door, and a `feature_flags` blip must not start refusing the fleet. Deliberately NO envVar. The consumer is the API Lambda, whose environment block is at the AWS 4KB cap (ENG-7972), and an envVar is highest-precedence per ADR-0022 \u2014 a literal in sst.config.ts would pin every stage and make the admin control do nothing (ENG-8303). The flag value IS the kill switch: a flip back to shadow takes effect within the ~60s evaluation cache, with no deploy.",
|
|
@@ -13707,4 +13772,4 @@ export {
|
|
|
13707
13772
|
peekCurrentSession,
|
|
13708
13773
|
readDailySessionPin
|
|
13709
13774
|
};
|
|
13710
|
-
//# sourceMappingURL=chunk-
|
|
13775
|
+
//# sourceMappingURL=chunk-JNHL4KS4.js.map
|