@integrity-labs/agt-cli 0.28.716 → 0.28.718
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-LHYYO4NY.js → chunk-7LH3SVAD.js} +124 -1
- package/dist/chunk-7LH3SVAD.js.map +1 -0
- package/dist/{chunk-OOYUWMTR.js → chunk-EEZHSNQ2.js} +4 -4
- package/dist/{chunk-ILDRNSOB.js → chunk-FNALM4HG.js} +120 -19
- package/dist/chunk-FNALM4HG.js.map +1 -0
- package/dist/{claude-pair-runtime-JK7GQU25.js → claude-pair-runtime-PDG74SAT.js} +2 -2
- package/dist/lib/manager-worker.js +535 -347
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +123 -0
- package/dist/mcp/index.js +123 -0
- package/dist/mcp/origami.js +123 -0
- package/dist/mcp/slack-channel.js +123 -0
- package/dist/mcp/telegram-channel.js +132 -9
- package/dist/{persistent-session-DJSSEIR6.js → persistent-session-2AWYIUCX.js} +7 -3
- package/dist/{responsiveness-probe-A5335ORT.js → responsiveness-probe-JQS4WA2L.js} +3 -3
- package/dist/{session-auth-dead-KUYVUOK5.js → session-auth-dead-VBMZW4GG.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-ILDRNSOB.js.map +0 -1
- package/dist/chunk-LHYYO4NY.js.map +0 -1
- /package/dist/{chunk-OOYUWMTR.js.map → chunk-EEZHSNQ2.js.map} +0 -0
- /package/dist/{claude-pair-runtime-JK7GQU25.js.map → claude-pair-runtime-PDG74SAT.js.map} +0 -0
- /package/dist/{persistent-session-DJSSEIR6.js.map → persistent-session-2AWYIUCX.js.map} +0 -0
- /package/dist/{responsiveness-probe-A5335ORT.js.map → responsiveness-probe-JQS4WA2L.js.map} +0 -0
- /package/dist/{session-auth-dead-KUYVUOK5.js.map → session-auth-dead-VBMZW4GG.js.map} +0 -0
|
@@ -34784,6 +34784,104 @@ var AGENT_DIRECTED_NOTICE_KINDS = [
|
|
|
34784
34784
|
"waiting_on_agent"
|
|
34785
34785
|
];
|
|
34786
34786
|
var AGENT_DIRECTED_KIND_SET = new Set(AGENT_DIRECTED_NOTICE_KINDS);
|
|
34787
|
+
var NOTICE_KIND_AUDIENCE = {
|
|
34788
|
+
// ---- USER -------------------------------------------------------------
|
|
34789
|
+
// An integration broke and only the customer can reconnect it. Carries the
|
|
34790
|
+
// ENG-7652 deep link and renders as the ENG-9256 card — the one notice kind
|
|
34791
|
+
// that already earned a bespoke renderer.
|
|
34792
|
+
integration_failure: "user",
|
|
34793
|
+
// The other half of that pair: the thing you were asked to reconnect is working
|
|
34794
|
+
// again. Kept visible even though it needs no ACTION, because it closes a loop
|
|
34795
|
+
// the customer was explicitly pulled into — hiding it would leave the reconnect
|
|
34796
|
+
// card as the last word on a problem that is now fixed.
|
|
34797
|
+
//
|
|
34798
|
+
// ENG-9592 left a wart here and recorded it: two of the three recovery arms
|
|
34799
|
+
// were written in the second person to the AGENT ("mention it to your owner",
|
|
34800
|
+
// "your session will pick it up"), which reads as nonsense to the customer now
|
|
34801
|
+
// seeing the same string. ENG-9609 rewrote all three to be true for both
|
|
34802
|
+
// readers and pinned it in `eng-9609-recovery-copy-dual-audience.test.ts`.
|
|
34803
|
+
// The note is deleted rather than updated: a deferral that outlives the thing
|
|
34804
|
+
// it defers is just a false claim about the code.
|
|
34805
|
+
integration_recovered: "user",
|
|
34806
|
+
// The form itself. `direct-chat-form.ts` calls it "the agent→user render
|
|
34807
|
+
// message"; hiding it would remove the control the user is meant to fill in.
|
|
34808
|
+
form_request_render: "user",
|
|
34809
|
+
// ENG-9592: the outcome chip for a button the user just pressed — "already
|
|
34810
|
+
// resolved", "only the manager can approve", the re-prompt. Its producer says
|
|
34811
|
+
// it exists so the click does not "look like it did nothing", which is exactly
|
|
34812
|
+
// an answer owed to a person. See the note on the stamped payload below.
|
|
34813
|
+
approval_outcome: "user",
|
|
34814
|
+
// ---- AGENT ------------------------------------------------------------
|
|
34815
|
+
// The ENG-9592 report's headline kind: parked-card pickup instructions, in the
|
|
34816
|
+
// second person, ending in an order not to reply in direct-chat.
|
|
34817
|
+
waiting_response: "agent",
|
|
34818
|
+
// Already agent-directed before this change; each is summarised above and its
|
|
34819
|
+
// reasoning lives beside its entry in AGENT_DIRECTED_NOTICE_KINDS.
|
|
34820
|
+
scheduled_task_nudge: "agent",
|
|
34821
|
+
kanban_check: "agent",
|
|
34822
|
+
manager_feedback: "agent",
|
|
34823
|
+
form_timeout: "agent",
|
|
34824
|
+
integration_connected: "agent",
|
|
34825
|
+
offer_result: "agent",
|
|
34826
|
+
waiting_on_agent: "agent",
|
|
34827
|
+
// "The user submitted your form … Use payload.values to continue the user's
|
|
34828
|
+
// task" — a delivery mechanism, with a raw request uuid. The user submitted it;
|
|
34829
|
+
// they do not need to be told they did.
|
|
34830
|
+
form_result: "agent",
|
|
34831
|
+
// Same shape for a tapped button: "The user tapped X on your button prompt
|
|
34832
|
+
// (request `<uuid>`)". They tapped it.
|
|
34833
|
+
button_click: "agent",
|
|
34834
|
+
// ENG-9397: tells the agent a question was answered AFTER it stopped listening
|
|
34835
|
+
// so it does not report the person as silent. The person's own answer goes
|
|
34836
|
+
// back on the channel they tapped in, not here.
|
|
34837
|
+
late_button_click: "agent",
|
|
34838
|
+
// Broker grant resolutions. Second person to the agent, and each carries the
|
|
34839
|
+
// grant uuid the tool contracts explicitly forbid showing a user ("NEVER paste
|
|
34840
|
+
// the grant UUID into user-facing prose"). Two of these are in the report.
|
|
34841
|
+
supabase_grant_resolved: "agent",
|
|
34842
|
+
supabase_grant_denied: "agent",
|
|
34843
|
+
aws_grant_resolved: "agent",
|
|
34844
|
+
aws_grant_denied: "agent",
|
|
34845
|
+
gcp_grant_resolved: "agent",
|
|
34846
|
+
gcp_grant_denied: "agent",
|
|
34847
|
+
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
34848
|
+
// action happened, and do NOT poll".
|
|
34849
|
+
integration_invoke_resolved: "agent",
|
|
34850
|
+
integration_invoke_denied: "agent",
|
|
34851
|
+
// Support/recruit approvals — same shape, agent resumes the provisioning.
|
|
34852
|
+
recruit_resolved: "agent",
|
|
34853
|
+
recruit_denied: "agent",
|
|
34854
|
+
// "Your `<verb>` approval request (`<uuid>`) EXPIRED at …" — in the report,
|
|
34855
|
+
// uuid and all.
|
|
34856
|
+
approval_expired: "agent",
|
|
34857
|
+
// A routine fired; the agent picks the work up.
|
|
34858
|
+
routine_firing_result: "agent",
|
|
34859
|
+
// Live-advisor wake: "Call `live_read` with escalation_id …" — a literal tool
|
|
34860
|
+
// call addressed to the machine.
|
|
34861
|
+
live_advisor_escalation: "agent",
|
|
34862
|
+
live_advisor_session_open: "agent",
|
|
34863
|
+
// The assigner reopened a card and the agent must work it again.
|
|
34864
|
+
assigner_reopen: "agent",
|
|
34865
|
+
// An inbound trigger event delivered onto the rail for the agent to handle.
|
|
34866
|
+
// Named `trigger_event` by `triggerDeliveryPayload` — NOT `trigger_delivery`,
|
|
34867
|
+
// which is what the producing module is called. Read from the builder.
|
|
34868
|
+
trigger_event: "agent",
|
|
34869
|
+
// Operational degradation routed into the agent's chat by the alert bridge.
|
|
34870
|
+
degradation_alert: "agent",
|
|
34871
|
+
// ENG-9592: probes and synthetic prompts, previously carrying NO payload at
|
|
34872
|
+
// all and therefore unclassifiable. Stamped at their producers so the verdict
|
|
34873
|
+
// is recorded rather than inherited from the default. `agent_probe` covers
|
|
34874
|
+
// both probe kinds (liveness and the board nudge); the specific one is
|
|
34875
|
+
// `payload.probe_kind`, so a new probe kind needs no entry here.
|
|
34876
|
+
agent_probe: "agent",
|
|
34877
|
+
agent_question_probe: "agent",
|
|
34878
|
+
kanban_confirm_prompt: "agent"
|
|
34879
|
+
};
|
|
34880
|
+
var USER_FACING_KIND_SET = new Set(Object.entries(NOTICE_KIND_AUDIENCE).filter(([, audience]) => audience === "user").map(([kind]) => kind));
|
|
34881
|
+
var USER_FACING_NOTICE_KINDS = Object.freeze([
|
|
34882
|
+
...USER_FACING_KIND_SET
|
|
34883
|
+
]);
|
|
34884
|
+
var HIDDEN_NOTICE_KINDS = Object.freeze(Object.entries(NOTICE_KIND_AUDIENCE).filter(([, audience]) => audience === "agent").map(([kind]) => kind));
|
|
34787
34885
|
|
|
34788
34886
|
// ../core/dist/direct-chat/cursor-advance.js
|
|
34789
34887
|
var CURSOR_ADVANCE_NON_SHORTFALL_KEYS = ["advanced", "advanced_unreported", "failed"];
|
|
@@ -35415,6 +35513,12 @@ var WAITING_KIND_SET = new Set(WAITING_KINDS);
|
|
|
35415
35513
|
// ../core/dist/alerts/index.js
|
|
35416
35514
|
init_snooze();
|
|
35417
35515
|
|
|
35516
|
+
// ../core/dist/alerts/age.js
|
|
35517
|
+
var MINUTE_MS = 6e4;
|
|
35518
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
35519
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
35520
|
+
var ALERT_AGE_SEVERITY_FLOORS = [{ afterMs: 24 * HOUR_MS, floor: "critical" }];
|
|
35521
|
+
|
|
35418
35522
|
// ../core/dist/conversations/metrics.js
|
|
35419
35523
|
var PERIOD_CONFIG = {
|
|
35420
35524
|
"24h": { windowMs: 24 * 60 * 60 * 1e3, bucket: "hour" },
|
|
@@ -36842,6 +36946,25 @@ var FLAG_REGISTRY = [
|
|
|
36842
36946
|
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
36843
36947
|
sensitive: true
|
|
36844
36948
|
},
|
|
36949
|
+
{
|
|
36950
|
+
key: "email-require-approval-enforcement",
|
|
36951
|
+
description: 'Enforcement gate for the `email.require_approval` guardrail (ENG-9611). That guardrail has been `default_for_new_orgs` since ~2026-05-03 and its display text promises "Require human approval before sending any email", but nothing ever read it: its only runtime path was toGuardrailForPrompt, i.e. a line in the agent CLAUDE.md. When ON for an org, a DISPATCHING email send (never a draft-create, ENG-7980) is held and routed to Human Approval regardless of recipient domain \u2014 which is what "any email" means, and is what distinguishes it from email-guard-require-approval-enabled, whose require_approval stage only intercepts a would-be DOMAIN block. Deliberately separate from the guardrail row: roughly four months of orgs already carry an inert `enforce`-level row, so reading the row alone would arm a blocking control across all of them on deploy. New orgs are armed by an org-scoped override written at org creation; existing orgs stay off until an operator flips them. Evaluated per-org. Ships dark.',
|
|
36952
|
+
flagType: "boolean",
|
|
36953
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, so a flags
|
|
36954
|
+
// outage can never silently start holding real customer email — the same fail-OPEN posture
|
|
36955
|
+
// enforceEmailDomainGuard already takes, and the opposite of the enforcement resolver's
|
|
36956
|
+
// fail-CLOSED, deliberately: a control that cannot verify itself must not block mail.
|
|
36957
|
+
// No envVar: net-new control with no pre-flags env gate to migrate (ADR-0022).
|
|
36958
|
+
defaultValue: false,
|
|
36959
|
+
// Turning it on holds real customer email pending a human tap, so it is a deliberate,
|
|
36960
|
+
// audited per-org flip (ADR-0022 §4).
|
|
36961
|
+
sensitive: true,
|
|
36962
|
+
// ENG-9629: NEW orgs are armed on. Declared here rather than hardcoded in the
|
|
36963
|
+
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36964
|
+
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36965
|
+
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36966
|
+
newOrgOverride: true
|
|
36967
|
+
},
|
|
36845
36968
|
{
|
|
36846
36969
|
key: "email-guard-require-approval-enabled",
|
|
36847
36970
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
|
@@ -37531,20 +37654,20 @@ function watchSuccessTextPlain(fileId, durationMs, reused) {
|
|
|
37531
37654
|
|
|
37532
37655
|
// src/telegram-peer-rate-limiter.ts
|
|
37533
37656
|
var SECOND_MS = 1e3;
|
|
37534
|
-
var
|
|
37535
|
-
var
|
|
37536
|
-
var
|
|
37657
|
+
var MINUTE_MS2 = 60 * SECOND_MS;
|
|
37658
|
+
var HOUR_MS2 = 60 * MINUTE_MS2;
|
|
37659
|
+
var DAY_MS2 = 24 * HOUR_MS2;
|
|
37537
37660
|
var DEFAULT_RATE_LIMITER_CONFIG = Object.freeze({
|
|
37538
37661
|
pairBurstLimit: 1,
|
|
37539
37662
|
pairBurstWindowMs: 10 * SECOND_MS,
|
|
37540
37663
|
pairWindowLimit: 5,
|
|
37541
|
-
pairWindowMs: 5 *
|
|
37664
|
+
pairWindowMs: 5 * MINUTE_MS2,
|
|
37542
37665
|
chatLimit: 10,
|
|
37543
|
-
chatWindowMs: 5 *
|
|
37666
|
+
chatWindowMs: 5 * MINUTE_MS2,
|
|
37544
37667
|
agentDailyLimit: 200,
|
|
37545
|
-
agentDailyWindowMs:
|
|
37668
|
+
agentDailyWindowMs: DAY_MS2,
|
|
37546
37669
|
dailyBudgetLimit: 500,
|
|
37547
|
-
dailyBudgetWindowMs:
|
|
37670
|
+
dailyBudgetWindowMs: DAY_MS2
|
|
37548
37671
|
});
|
|
37549
37672
|
function readSliding(window2, windowMs, now) {
|
|
37550
37673
|
if (!window2) return 0;
|
|
@@ -37631,7 +37754,7 @@ function createPeerRateLimiter(config2 = DEFAULT_RATE_LIMITER_CONFIG) {
|
|
|
37631
37754
|
};
|
|
37632
37755
|
}
|
|
37633
37756
|
function createPresenceTracker(opts = {}) {
|
|
37634
|
-
const retainMs = opts.retainMs ??
|
|
37757
|
+
const retainMs = opts.retainMs ?? DAY_MS2;
|
|
37635
37758
|
const lastHumanByChat = /* @__PURE__ */ new Map();
|
|
37636
37759
|
for (const [chatId, at] of Object.entries(opts.initial ?? {})) {
|
|
37637
37760
|
if (typeof at === "number" && Number.isFinite(at)) lastHumanByChat.set(chatId, at);
|
|
@@ -37656,7 +37779,7 @@ function createPresenceTracker(opts = {}) {
|
|
|
37656
37779
|
}
|
|
37657
37780
|
}
|
|
37658
37781
|
},
|
|
37659
|
-
shouldDropOutgress(chatId, now, maxAgeMs = 30 *
|
|
37782
|
+
shouldDropOutgress(chatId, now, maxAgeMs = 30 * MINUTE_MS2) {
|
|
37660
37783
|
const last = lastHumanByChat.get(chatId);
|
|
37661
37784
|
if (last === void 0) return "no_human_recent";
|
|
37662
37785
|
if (now - last >= maxAgeMs) return "no_human_recent";
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
buildSpawnEnv,
|
|
10
10
|
collectDiagnostics,
|
|
11
11
|
describePaneAgentIdMismatch,
|
|
12
|
+
detectFailureSignature,
|
|
12
13
|
directChatSessionStatePath,
|
|
13
14
|
egressAllowlistHostPath,
|
|
14
15
|
egressMode,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
rotatePaneLogForDayRollover,
|
|
37
38
|
rotateSessionForWedge,
|
|
38
39
|
sendToAgent,
|
|
40
|
+
spawnBackoffMs,
|
|
39
41
|
startPersistentSession,
|
|
40
42
|
stopAllSessions,
|
|
41
43
|
stopAllSessionsAndWait,
|
|
@@ -44,8 +46,8 @@ import {
|
|
|
44
46
|
writeDirectChatSessionState,
|
|
45
47
|
writeEgressAllowlist,
|
|
46
48
|
writePersistentClaudeWrapper
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-FNALM4HG.js";
|
|
50
|
+
import "./chunk-7LH3SVAD.js";
|
|
49
51
|
import "./chunk-XWVM4KPK.js";
|
|
50
52
|
export {
|
|
51
53
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -58,6 +60,7 @@ export {
|
|
|
58
60
|
buildSpawnEnv,
|
|
59
61
|
collectDiagnostics,
|
|
60
62
|
describePaneAgentIdMismatch,
|
|
63
|
+
detectFailureSignature,
|
|
61
64
|
directChatSessionStatePath,
|
|
62
65
|
egressAllowlistHostPath,
|
|
63
66
|
egressMode,
|
|
@@ -85,6 +88,7 @@ export {
|
|
|
85
88
|
rotatePaneLogForDayRollover,
|
|
86
89
|
rotateSessionForWedge,
|
|
87
90
|
sendToAgent,
|
|
91
|
+
spawnBackoffMs,
|
|
88
92
|
startPersistentSession,
|
|
89
93
|
stopAllSessions,
|
|
90
94
|
stopAllSessionsAndWait,
|
|
@@ -94,4 +98,4 @@ export {
|
|
|
94
98
|
writeEgressAllowlist,
|
|
95
99
|
writePersistentClaudeWrapper
|
|
96
100
|
};
|
|
97
|
-
//# sourceMappingURL=persistent-session-
|
|
101
|
+
//# sourceMappingURL=persistent-session-2AWYIUCX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FNALM4HG.js";
|
|
4
|
+
import "./chunk-7LH3SVAD.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -745,4 +745,4 @@ export {
|
|
|
745
745
|
readAndResetSlackReplyBindingClassifications,
|
|
746
746
|
readAndResetSlackReplyTargetClassifications
|
|
747
747
|
};
|
|
748
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
748
|
+
//# sourceMappingURL=responsiveness-probe-JQS4WA2L.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7LH3SVAD.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/session-auth-dead.ts
|
|
6
6
|
import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -203,4 +203,4 @@ export {
|
|
|
203
203
|
decideSessionAuthState,
|
|
204
204
|
probeSessionAuth
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=session-auth-dead-
|
|
206
|
+
//# sourceMappingURL=session-auth-dead-VBMZW4GG.js.map
|