@integrity-labs/agt-cli 0.28.852 → 0.28.854
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-XCAI3GSF.js → chunk-2E2NKILK.js} +2 -2
- package/dist/{chunk-WUXQVP7A.js → chunk-4Z4GFQAD.js} +143 -3
- package/dist/chunk-4Z4GFQAD.js.map +1 -0
- package/dist/{chunk-SFKO7OVI.js → chunk-FHOLG6VL.js} +4 -4
- package/dist/{claude-pair-runtime-CJXQTVSC.js → claude-pair-runtime-63TA3LT5.js} +2 -2
- package/dist/lib/manager-worker.js +35 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +104 -0
- package/dist/mcp/index.js +104 -0
- package/dist/mcp/origami.js +104 -0
- package/dist/mcp/slack-channel.js +104 -0
- package/dist/mcp/telegram-channel.js +104 -0
- package/dist/{persistent-session-YGK7YHPR.js → persistent-session-N4DJ4VXZ.js} +3 -3
- package/dist/{responsiveness-probe-NGWO3JK3.js → responsiveness-probe-GYE5MIVB.js} +3 -3
- package/dist/{session-auth-dead-4UZR5655.js → session-auth-dead-K6B6D3WR.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WUXQVP7A.js.map +0 -1
- /package/dist/{chunk-XCAI3GSF.js.map → chunk-2E2NKILK.js.map} +0 -0
- /package/dist/{chunk-SFKO7OVI.js.map → chunk-FHOLG6VL.js.map} +0 -0
- /package/dist/{claude-pair-runtime-CJXQTVSC.js.map → claude-pair-runtime-63TA3LT5.js.map} +0 -0
- /package/dist/{persistent-session-YGK7YHPR.js.map → persistent-session-N4DJ4VXZ.js.map} +0 -0
- /package/dist/{responsiveness-probe-NGWO3JK3.js.map → responsiveness-probe-GYE5MIVB.js.map} +0 -0
- /package/dist/{session-auth-dead-4UZR5655.js.map → session-auth-dead-K6B6D3WR.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-FHOLG6VL.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-2E2NKILK.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-4Z4GFQAD.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.854" : "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.854" : "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-4Z4GFQAD.js";
|
|
22
22
|
import {
|
|
23
23
|
reapOrphanChannelMcps
|
|
24
24
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5431,4 +5431,4 @@ export {
|
|
|
5431
5431
|
stopAllSessionsAndWait,
|
|
5432
5432
|
getProjectDir
|
|
5433
5433
|
};
|
|
5434
|
-
//# sourceMappingURL=chunk-
|
|
5434
|
+
//# sourceMappingURL=chunk-2E2NKILK.js.map
|
|
@@ -177,6 +177,137 @@ ${AGENT_RULES_SECTION_END}
|
|
|
177
177
|
`;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
// ../../packages/core/dist/guardrails/calendar-policy.js
|
|
181
|
+
function parseCalendarGuardStage(raw) {
|
|
182
|
+
if (raw === "warn" || raw === "enforce")
|
|
183
|
+
return raw;
|
|
184
|
+
return "shadow";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ../../packages/core/dist/guardrails/enforcer-registry.js
|
|
188
|
+
var GUARDRAIL_ENFORCERS = [
|
|
189
|
+
// ---- Enforced: this definition has its own enforcement point -------------
|
|
190
|
+
{
|
|
191
|
+
id: "email.domain_restrict",
|
|
192
|
+
mechanism: "enforced",
|
|
193
|
+
stage: "live",
|
|
194
|
+
enforcer: "packages/api/src/lib/email-domain-guard.ts",
|
|
195
|
+
effect: "enforceEmailDomainGuard runs at the top of both agent-egress paths; internal_only with zero verified domains takes an explicit AUDITED no-op branch rather than failing open silently."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
// MEASURED, and it corrects a claim ADR-0080 makes about this definition.
|
|
199
|
+
//
|
|
200
|
+
// The ADR reports calendar as `enforced` + `stage: 'shadow'`, blocked by
|
|
201
|
+
// ENG-5868 (caller identity is not threaded to `callIntegrationTool`). Read
|
|
202
|
+
// literally that says an org cannot get redaction today, and that is not
|
|
203
|
+
// what the code does. `decideCalendarRedactionMode` (calendar-policy.ts) is
|
|
204
|
+
// FAIL-CLOSED: with the caller unresolvable it returns `redact`, not
|
|
205
|
+
// pass-through. `redactCalendarToolResponseIfNeeded` then calls
|
|
206
|
+
// `applyRedactionToResponse` for every response whenever `config.stage` is
|
|
207
|
+
// `enforce`. So an org that sets the stage gets real redaction — ENG-5868
|
|
208
|
+
// costs the control its PRECISION (it cannot spare the principal), not its
|
|
209
|
+
// ability to act.
|
|
210
|
+
//
|
|
211
|
+
// The stage is therefore per-ORG configuration, which ADR-0080 decision 1
|
|
212
|
+
// is explicit is the effectiveness axis the static union deliberately does
|
|
213
|
+
// not carry. `effectiveCalendarEnforcement` in the CLAUDE.md renderer owns
|
|
214
|
+
// it, and since ENG-10104 caps `enforce` to `warn` whenever the org's stage
|
|
215
|
+
// is not `enforce`.
|
|
216
|
+
id: "calendar.confidentiality",
|
|
217
|
+
mechanism: "enforced",
|
|
218
|
+
stage: "live",
|
|
219
|
+
enforcer: "packages/api/src/lib/calendar-confidentiality-guard.ts",
|
|
220
|
+
effect: "at config.stage=enforce, redacts summary/description/attendees/location out of calendar read responses; at shadow/warn it writes a would_redact audit row and returns the response unchanged."
|
|
221
|
+
},
|
|
222
|
+
// ---- Delegated: read by another definition's enforcement point -----------
|
|
223
|
+
//
|
|
224
|
+
// Both can block, because their owner's point is live — which is the question
|
|
225
|
+
// `guardrailCanBlock` asks and the right answer to it. It is NOT the whole
|
|
226
|
+
// story for these two, and the gap has its own ticket: the org's email guard
|
|
227
|
+
// STAGE is threaded into the prompt shape for `email.domain_restrict`'s id
|
|
228
|
+
// alone (`host-runtime.ts`, the ENG-7829 fix), so a row of either id stored at
|
|
229
|
+
// `enforce` on a shadow-stage org still renders under "must comply" with
|
|
230
|
+
// nothing capping it. That is the effectiveness axis, not the mechanism one —
|
|
231
|
+
// ENG-10110.
|
|
232
|
+
{
|
|
233
|
+
id: "email.require_approval",
|
|
234
|
+
mechanism: "delegated",
|
|
235
|
+
ownedBy: "email.domain_restrict",
|
|
236
|
+
enforcer: "packages/api/src/lib/email-domain-guard.ts",
|
|
237
|
+
effect: "routes a send to an approver instead of letting it leave."
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: "email.mail_rules",
|
|
241
|
+
mechanism: "delegated",
|
|
242
|
+
ownedBy: "email.domain_restrict",
|
|
243
|
+
enforcer: "packages/api/src/lib/email-domain-guard.ts",
|
|
244
|
+
effect: "gates mail-rule creation/modification on the same egress path."
|
|
245
|
+
},
|
|
246
|
+
// ---- Advisory: seeded, applied, rendered — and read by nothing -----------
|
|
247
|
+
//
|
|
248
|
+
// These are NOT dead config. They are presented to operators in the console
|
|
249
|
+
// and to agents in CLAUDE.md, three of them under a heading that promises the
|
|
250
|
+
// violation is blocked. Listed individually rather than as a wildcard so that
|
|
251
|
+
// fixing one is a one-line diff from `advisory` to `enforced`.
|
|
252
|
+
//
|
|
253
|
+
// The ticket is ENG-9800, not ENG-9874. ENG-9874 catalogued these and is
|
|
254
|
+
// closed; a closed ticket tracks nothing, which is the same shrug an absent
|
|
255
|
+
// one would be. ENG-9800 is the open sweep that owns making them real.
|
|
256
|
+
{
|
|
257
|
+
id: "require-approval-for-actions",
|
|
258
|
+
mechanism: "advisory",
|
|
259
|
+
reason: "unimplemented",
|
|
260
|
+
ticket: "ENG-9800",
|
|
261
|
+
note: `Rendered to agents as "violation blocks the action". Nothing reads it. The ENG-8562 incident is this guardrail's promise, unkept.`
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: "data.pii_access",
|
|
265
|
+
mechanism: "advisory",
|
|
266
|
+
reason: "unimplemented",
|
|
267
|
+
ticket: "ENG-9800",
|
|
268
|
+
note: "Rendered as Enforced with block_export semantics; no export path consults it."
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "data.credential_access",
|
|
272
|
+
mechanism: "advisory",
|
|
273
|
+
reason: "unimplemented",
|
|
274
|
+
ticket: "ENG-9800",
|
|
275
|
+
note: "Rendered as Enforced with block_read/block_write; no credential path consults it."
|
|
276
|
+
},
|
|
277
|
+
{ id: "comm.social_posting", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
278
|
+
{ id: "compliance.audit_all", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
279
|
+
{ id: "no-external-network", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
280
|
+
{ id: "no-pii-in-output", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
281
|
+
{ id: "restrict-file-access", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
282
|
+
{ id: "schedule.operating_hours", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
283
|
+
{ id: "spend.hourly_limit", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
284
|
+
{ id: "tool.allow_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
285
|
+
{ id: "tool.block_list", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
286
|
+
{ id: "tool.financial_txn", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" },
|
|
287
|
+
{ id: "working-hours-only", mechanism: "advisory", reason: "unimplemented", ticket: "ENG-9800" }
|
|
288
|
+
];
|
|
289
|
+
var BY_ID = new Map(GUARDRAIL_ENFORCERS.map((e) => [e.id, e]));
|
|
290
|
+
function guardrailCanBlock(definitionId) {
|
|
291
|
+
return resolveCanBlock(definitionId, (id) => BY_ID.get(id));
|
|
292
|
+
}
|
|
293
|
+
function resolveCanBlock(definitionId, lookup) {
|
|
294
|
+
const seen = /* @__PURE__ */ new Set();
|
|
295
|
+
let id = definitionId;
|
|
296
|
+
for (; ; ) {
|
|
297
|
+
if (seen.has(id))
|
|
298
|
+
return false;
|
|
299
|
+
seen.add(id);
|
|
300
|
+
const entry = lookup(id);
|
|
301
|
+
if (!entry)
|
|
302
|
+
return false;
|
|
303
|
+
if (entry.mechanism === "enforced")
|
|
304
|
+
return entry.stage === "live";
|
|
305
|
+
if (entry.mechanism !== "delegated")
|
|
306
|
+
return false;
|
|
307
|
+
id = entry.ownedBy;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
180
311
|
// ../../packages/core/dist/provisioning/platform-storage.js
|
|
181
312
|
var PLATFORM_STORAGE_RULE = "Store durable, reusable work you build (repeatable procedures, recurring responsibilities, scheduled automation, orchestration scripts) through the Ninjafy 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.";
|
|
182
313
|
|
|
@@ -1033,11 +1164,13 @@ function renderOverriddenGuardrailBullet(g) {
|
|
|
1033
1164
|
function effectiveCalendarEnforcement(g) {
|
|
1034
1165
|
if (g.definitionId !== CALENDAR_CONFIDENTIALITY_DEF)
|
|
1035
1166
|
return g.enforcement;
|
|
1036
|
-
const stage =
|
|
1167
|
+
const stage = parseCalendarGuardStage(g.config?.["stage"]);
|
|
1037
1168
|
if (stage === "enforce")
|
|
1038
1169
|
return "enforce";
|
|
1039
1170
|
if (stage === "warn" && g.enforcement !== "enforce")
|
|
1040
1171
|
return "warn";
|
|
1172
|
+
if (g.enforcement === "enforce")
|
|
1173
|
+
return "warn";
|
|
1041
1174
|
return g.enforcement;
|
|
1042
1175
|
}
|
|
1043
1176
|
function effectiveEmailEnforcement(g) {
|
|
@@ -1075,7 +1208,10 @@ function buildGuardrailsSection(guardrails) {
|
|
|
1075
1208
|
return "";
|
|
1076
1209
|
const isOverridden = (g) => !!(g.overrideApplied && g.overrideReason?.trim());
|
|
1077
1210
|
const overridden = active.filter(isOverridden);
|
|
1078
|
-
const
|
|
1211
|
+
const notOverridden = active.filter((g) => !isOverridden(g));
|
|
1212
|
+
const canBlock = (g) => guardrailCanBlock(g.definitionId);
|
|
1213
|
+
const advisory = notOverridden.filter((g) => !canBlock(g));
|
|
1214
|
+
const normal = notOverridden.filter(canBlock);
|
|
1079
1215
|
const enforce = normal.filter((g) => g.enforcement === "enforce");
|
|
1080
1216
|
const warn = normal.filter((g) => g.enforcement === "warn");
|
|
1081
1217
|
const logOnly = normal.filter((g) => g.enforcement === "log");
|
|
@@ -1102,6 +1238,10 @@ function buildGuardrailsSection(guardrails) {
|
|
|
1102
1238
|
blocks.push(``, `### Logged (observability only)`, ``);
|
|
1103
1239
|
blocks.push(logOnly.map(renderGuardrailBullet).join("\n"));
|
|
1104
1240
|
}
|
|
1241
|
+
if (advisory.length > 0) {
|
|
1242
|
+
blocks.push(``, `### Advisory (policy only \u2014 not enforced by the platform)`, ``, `Follow these as operator instructions. No platform control backs them, so`, `never say an action was blocked, held for approval, or audited on their`, `basis \u2014 say you are declining, and why.`, ``);
|
|
1243
|
+
blocks.push(advisory.map(renderGuardrailBullet).join("\n"));
|
|
1244
|
+
}
|
|
1105
1245
|
if (overridden.length > 0) {
|
|
1106
1246
|
blocks.push(``, `### Approved exceptions (an operator override applies - follow the adjusted policy)`, ``);
|
|
1107
1247
|
blocks.push(overridden.map(renderOverriddenGuardrailBullet).join("\n"));
|
|
@@ -13972,4 +14112,4 @@ export {
|
|
|
13972
14112
|
peekCurrentSession,
|
|
13973
14113
|
readDailySessionPin
|
|
13974
14114
|
};
|
|
13975
|
-
//# sourceMappingURL=chunk-
|
|
14115
|
+
//# sourceMappingURL=chunk-4Z4GFQAD.js.map
|