@integrity-labs/agt-cli 0.28.1259 → 0.28.1261
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/{api-client-ATRLQZOU.js → api-client-2YLFNHFZ.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-5433KPH4.js → chunk-335HKIDZ.js} +2 -2
- package/dist/{chunk-BOITSKCM.js → chunk-6NHFZYUP.js} +3 -3
- package/dist/{chunk-RBC22FRC.js → chunk-I2NQQOMD.js} +3 -3
- package/dist/{chunk-F6U3ZJCG.js → chunk-JYSPPCHG.js} +2 -2
- package/dist/{chunk-NRNPYXG6.js → chunk-QFLR5EFT.js} +98 -6
- package/dist/chunk-QFLR5EFT.js.map +1 -0
- package/dist/{chunk-UAO5VMYK.js → chunk-ZEJUBTXJ.js} +441 -254
- package/dist/chunk-ZEJUBTXJ.js.map +1 -0
- package/dist/{claude-code-updater-SUL3OSGB.js → claude-code-updater-B2BWPRFE.js} +3 -3
- package/dist/{claude-pair-runtime-D6ZRO2FC.js → claude-pair-runtime-FNDHAPXR.js} +3 -3
- package/dist/lib/manager-worker.js +580 -427
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +94 -2
- package/dist/mcp/index.js +94 -2
- package/dist/mcp/origami.js +94 -2
- package/dist/mcp/slack-channel.js +94 -2
- package/dist/mcp/telegram-channel.js +94 -2
- package/dist/{persistent-session-UC56OJVB.js → persistent-session-LHQLLU4U.js} +4 -4
- package/dist/{responsiveness-probe-KGBRCJQW.js → responsiveness-probe-KDSNPKUY.js} +4 -4
- package/dist/{session-auth-dead-AVYJASOL.js → session-auth-dead-3IHR4M2B.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-NRNPYXG6.js.map +0 -1
- package/dist/chunk-UAO5VMYK.js.map +0 -1
- /package/dist/{api-client-ATRLQZOU.js.map → api-client-2YLFNHFZ.js.map} +0 -0
- /package/dist/{chunk-5433KPH4.js.map → chunk-335HKIDZ.js.map} +0 -0
- /package/dist/{chunk-BOITSKCM.js.map → chunk-6NHFZYUP.js.map} +0 -0
- /package/dist/{chunk-RBC22FRC.js.map → chunk-I2NQQOMD.js.map} +0 -0
- /package/dist/{chunk-F6U3ZJCG.js.map → chunk-JYSPPCHG.js.map} +0 -0
- /package/dist/{claude-code-updater-SUL3OSGB.js.map → claude-code-updater-B2BWPRFE.js.map} +0 -0
- /package/dist/{claude-pair-runtime-D6ZRO2FC.js.map → claude-pair-runtime-FNDHAPXR.js.map} +0 -0
- /package/dist/{persistent-session-UC56OJVB.js.map → persistent-session-LHQLLU4U.js.map} +0 -0
- /package/dist/{responsiveness-probe-KGBRCJQW.js.map → responsiveness-probe-KDSNPKUY.js.map} +0 -0
- /package/dist/{session-auth-dead-AVYJASOL.js.map → session-auth-dead-3IHR4M2B.js.map} +0 -0
|
@@ -39242,7 +39242,10 @@ var GITHUB_EVENT_RULES = {
|
|
|
39242
39242
|
pull_request_review: { actions: ["submitted"] },
|
|
39243
39243
|
check_suite: { actions: ["completed"] },
|
|
39244
39244
|
issues: { actions: ["opened", "closed"] },
|
|
39245
|
-
issue_comment: { actions: ["created"] }
|
|
39245
|
+
issue_comment: { actions: ["created"] },
|
|
39246
|
+
// ENG-12123 (CS-2564): a deployment's status changed. GitHub sends one
|
|
39247
|
+
// deployment_status event per state change, always with action `created`.
|
|
39248
|
+
deployment_status: { actions: ["created"] }
|
|
39246
39249
|
};
|
|
39247
39250
|
var GITHUB_WEBHOOK_EVENTS = Object.keys(GITHUB_EVENT_RULES);
|
|
39248
39251
|
var REPO_FULL_NAME = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$/;
|
|
@@ -39265,6 +39268,28 @@ var CHECK_CONCLUSIONS = /* @__PURE__ */ new Set([
|
|
|
39265
39268
|
"startup_failure"
|
|
39266
39269
|
]);
|
|
39267
39270
|
var ISSUE_STATE_REASONS = /* @__PURE__ */ new Set(["completed", "not_planned", "reopened", "duplicate"]);
|
|
39271
|
+
var DEPLOYMENT_STATES = /* @__PURE__ */ new Set(["success", "failure", "error", "pending", "in_progress", "queued", "inactive"]);
|
|
39272
|
+
var ENVIRONMENT_TOKEN = /^[A-Za-z0-9][A-Za-z0-9._/:-]{0,63}$/;
|
|
39273
|
+
var ACTIONS_RUN_PATH = /^\/([^/]+)\/([^/]+)\/actions\/runs\/([1-9][0-9]{0,18})(?:\/job\/([1-9][0-9]{0,18}))?\/?$/;
|
|
39274
|
+
function githubActionsRunUrl(v, repo) {
|
|
39275
|
+
const s = str(v);
|
|
39276
|
+
if (s === null || s.length > 500)
|
|
39277
|
+
return null;
|
|
39278
|
+
let u;
|
|
39279
|
+
try {
|
|
39280
|
+
u = new URL(s);
|
|
39281
|
+
} catch {
|
|
39282
|
+
return null;
|
|
39283
|
+
}
|
|
39284
|
+
if (u.protocol !== "https:" || u.username || u.password || u.port || u.hostname !== "github.com")
|
|
39285
|
+
return null;
|
|
39286
|
+
const m = ACTIONS_RUN_PATH.exec(u.pathname);
|
|
39287
|
+
if (!m)
|
|
39288
|
+
return null;
|
|
39289
|
+
if (`${m[1]}/${m[2]}`.toLowerCase() !== repo.toLowerCase())
|
|
39290
|
+
return null;
|
|
39291
|
+
return `https://github.com/${repo}/actions/runs/${m[3]}${m[4] ? `/job/${m[4]}` : ""}`;
|
|
39292
|
+
}
|
|
39268
39293
|
function asDict(v) {
|
|
39269
39294
|
return v !== null && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
39270
39295
|
}
|
|
@@ -39410,6 +39435,36 @@ function extractGithubFacts(event, payload) {
|
|
|
39410
39435
|
summary: `Issue #${n2} ${action} in ${repo}`
|
|
39411
39436
|
};
|
|
39412
39437
|
}
|
|
39438
|
+
if (event === "deployment_status") {
|
|
39439
|
+
const status = asDict(root["deployment_status"]);
|
|
39440
|
+
const deployment = asDict(root["deployment"]);
|
|
39441
|
+
if (!status || !deployment)
|
|
39442
|
+
return null;
|
|
39443
|
+
const state = inSet(status["state"], DEPLOYMENT_STATES);
|
|
39444
|
+
const environment = shaped(status["environment"], ENVIRONMENT_TOKEN) ?? shaped(deployment["environment"], ENVIRONMENT_TOKEN);
|
|
39445
|
+
details.push(["Environment", environment ?? "(name withheld: not a plain token)"]);
|
|
39446
|
+
details.push(["State", state ?? "unknown"]);
|
|
39447
|
+
const deploymentId = posInt(deployment["id"]);
|
|
39448
|
+
if (deploymentId !== null)
|
|
39449
|
+
details.push(["Deployment id", String(deploymentId)]);
|
|
39450
|
+
const sha = shaped(str(deployment["sha"])?.toLowerCase(), SHA);
|
|
39451
|
+
if (sha)
|
|
39452
|
+
details.push(["Commit", sha]);
|
|
39453
|
+
const creator = shaped(asDict(status["creator"])?.["login"], LOGIN);
|
|
39454
|
+
if (creator)
|
|
39455
|
+
details.push(["Status set by", creator]);
|
|
39456
|
+
const link = githubActionsRunUrl(status["log_url"], repo) ?? githubActionsRunUrl(status["target_url"], repo);
|
|
39457
|
+
return {
|
|
39458
|
+
event,
|
|
39459
|
+
action,
|
|
39460
|
+
repo,
|
|
39461
|
+
subject: null,
|
|
39462
|
+
url: link ?? `${base}/deployments`,
|
|
39463
|
+
sender,
|
|
39464
|
+
details,
|
|
39465
|
+
summary: `Deployment to ${environment ?? "an environment"} ${state ?? "updated"} in ${repo}`
|
|
39466
|
+
};
|
|
39467
|
+
}
|
|
39413
39468
|
const issue2 = asDict(root["issue"]);
|
|
39414
39469
|
const n = issue2 ? posInt(issue2["number"]) : null;
|
|
39415
39470
|
if (!issue2 || n === null)
|
|
@@ -39539,7 +39594,7 @@ var FLAG_REGISTRY = [
|
|
|
39539
39594
|
},
|
|
39540
39595
|
{
|
|
39541
39596
|
key: "at-rest-scheme-k-writes",
|
|
39542
|
-
description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot
|
|
39597
|
+
description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
|
|
39543
39598
|
flagType: "boolean",
|
|
39544
39599
|
// Declared safe value is `false` = scheme a. A flag-read error must never arm
|
|
39545
39600
|
// scheme k on its own: an unintended `a` row is re-sealable, an unintended
|
|
@@ -39586,6 +39641,43 @@ var FLAG_REGISTRY = [
|
|
|
39586
39641
|
flagType: "boolean",
|
|
39587
39642
|
defaultValue: false
|
|
39588
39643
|
},
|
|
39644
|
+
{
|
|
39645
|
+
key: "scratch-sweep-held",
|
|
39646
|
+
description: "ENG-11877: stops ALL scratch sweeping for an agent, including the existing tree rule, for files someone has asked to keep. Resolved per agent by the manager. Sticky on the host: once seen it is written to a marker outside scratch, which keeps the agent held until heartbeats that evaluated it find the flag off for 10 minutes, so a restart or a failed flag read cannot let a sweep through. A host only honours it once its CLI has the reader: check reach before relying on it. Off is the safe default for everyone else.",
|
|
39647
|
+
sensitive: true,
|
|
39648
|
+
flagType: "boolean",
|
|
39649
|
+
defaultValue: false,
|
|
39650
|
+
// No published agt-cli has this reader yet, and a guessed floor would report reach
|
|
39651
|
+
// on hosts that can't act on it. So this reads as "no host yet" on purpose, the
|
|
39652
|
+
// safe direction. ENG-11877 re-pins it from the published dist after merge.
|
|
39653
|
+
since: "0.28.999999"
|
|
39654
|
+
},
|
|
39655
|
+
{
|
|
39656
|
+
key: "scratch-sweep-per-file",
|
|
39657
|
+
description: "ENG-11877: also expire old files inside scratch folders still in use, instead of keeping a whole folder while anything in it is fresh. IRREVERSIBLE on its first pass: every file unchanged for 7 days goes, customer documents included, so arm it per agent and read scratch-sweep-dry-run first. Off = the tree rule only.",
|
|
39658
|
+
sensitive: true,
|
|
39659
|
+
// CodeRabbit on #7378: `sensitive` only forces a confirmation; it does not say
|
|
39660
|
+
// WHO. Its first pass irreversibly deletes old customer files, and arming it is
|
|
39661
|
+
// Brad's rollout decision (ENG-11877), so an org owner/admin must not be able to
|
|
39662
|
+
// switch it on for their own agents. Only the cross-org admin route can write it.
|
|
39663
|
+
platformAdminOnly: true,
|
|
39664
|
+
flagType: "boolean",
|
|
39665
|
+
defaultValue: false,
|
|
39666
|
+
// No published agt-cli has this reader yet, and a guessed floor would report reach
|
|
39667
|
+
// on hosts that can't act on it. So this reads as "no host yet" on purpose, the
|
|
39668
|
+
// safe direction. ENG-11877 re-pins it from the published dist after merge.
|
|
39669
|
+
since: "0.28.999999"
|
|
39670
|
+
},
|
|
39671
|
+
{
|
|
39672
|
+
key: "scratch-sweep-dry-run",
|
|
39673
|
+
description: "ENG-11877: count what scratch-sweep-per-file would remove and log it to manager.log every 6 hours ([scratch] [sweep-dry-run]). Metadata only: never opens a file, never logs a name, removes nothing extra.",
|
|
39674
|
+
flagType: "boolean",
|
|
39675
|
+
defaultValue: false,
|
|
39676
|
+
// No published agt-cli has this reader yet, and a guessed floor would report reach
|
|
39677
|
+
// on hosts that can't act on it. So this reads as "no host yet" on purpose, the
|
|
39678
|
+
// safe direction. ENG-11877 re-pins it from the published dist after merge.
|
|
39679
|
+
since: "0.28.999999"
|
|
39680
|
+
},
|
|
39589
39681
|
{
|
|
39590
39682
|
key: "broker-read-jobs",
|
|
39591
39683
|
description: `Slow broker READ tools finish in a background job (ENG-11476, ADR-0129). When on for an org, an opted-in read tool (Pronto Xi first) that misses an 18s grace window answers "still running, call again with the same arguments" and finishes in the broker-read-job worker instead of timing out. Off = today's synchronous call, so false is the safe value. Evaluated in the API per org, team and agent.`,
|
|
@@ -68,12 +68,12 @@ import {
|
|
|
68
68
|
writeDirectChatSessionState,
|
|
69
69
|
writeEgressAllowlist,
|
|
70
70
|
writePersistentClaudeWrapper
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-I2NQQOMD.js";
|
|
72
|
+
import "./chunk-JYSPPCHG.js";
|
|
73
73
|
import "./chunk-HYQ7VOC3.js";
|
|
74
74
|
import "./chunk-6HBXEJHO.js";
|
|
75
75
|
import "./chunk-XWVM4KPK.js";
|
|
76
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-QFLR5EFT.js";
|
|
77
77
|
import "./chunk-AIUIMEUS.js";
|
|
78
78
|
import "./chunk-DGUM43GV.js";
|
|
79
79
|
export {
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
writeEgressAllowlist,
|
|
148
148
|
writePersistentClaudeWrapper
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=persistent-session-
|
|
150
|
+
//# sourceMappingURL=persistent-session-LHQLLU4U.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I2NQQOMD.js";
|
|
4
|
+
import "./chunk-JYSPPCHG.js";
|
|
5
5
|
import "./chunk-HYQ7VOC3.js";
|
|
6
6
|
import "./chunk-6HBXEJHO.js";
|
|
7
7
|
import "./chunk-XWVM4KPK.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QFLR5EFT.js";
|
|
9
9
|
import "./chunk-AIUIMEUS.js";
|
|
10
10
|
import "./chunk-DGUM43GV.js";
|
|
11
11
|
|
|
@@ -804,4 +804,4 @@ export {
|
|
|
804
804
|
readAndResetSlackReplyBindingClassifications,
|
|
805
805
|
readAndResetSlackReplyTargetClassifications
|
|
806
806
|
};
|
|
807
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
807
|
+
//# sourceMappingURL=responsiveness-probe-KDSNPKUY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JYSPPCHG.js";
|
|
4
|
+
import "./chunk-QFLR5EFT.js";
|
|
5
5
|
import "./chunk-DGUM43GV.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/session-auth-dead.ts
|
|
@@ -205,4 +205,4 @@ export {
|
|
|
205
205
|
decideSessionAuthState,
|
|
206
206
|
probeSessionAuth
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=session-auth-dead-
|
|
208
|
+
//# sourceMappingURL=session-auth-dead-3IHR4M2B.js.map
|