@integrity-labs/agt-cli 0.28.546 → 0.28.548
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 +4 -4
- package/dist/{chunk-7WHF3QRW.js → chunk-GYBGWZJP.js} +3 -3
- package/dist/{chunk-QPSEQLSI.js → chunk-ST4PZ6RF.js} +1 -1
- package/dist/{claude-pair-runtime-R3R5OWDM.js → claude-pair-runtime-TZKJGXZU.js} +2 -2
- package/dist/lib/manager-worker.js +44 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/augmented-admin.js +76 -20
- package/dist/{persistent-session-FM5746XM.js → persistent-session-KVONGDAL.js} +2 -2
- package/dist/{responsiveness-probe-WZMDBY3T.js → responsiveness-probe-OUHRYJYH.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-7WHF3QRW.js.map → chunk-GYBGWZJP.js.map} +0 -0
- /package/dist/{chunk-QPSEQLSI.js.map → chunk-ST4PZ6RF.js.map} +0 -0
- /package/dist/{claude-pair-runtime-R3R5OWDM.js.map → claude-pair-runtime-TZKJGXZU.js.map} +0 -0
- /package/dist/{persistent-session-FM5746XM.js.map → persistent-session-KVONGDAL.js.map} +0 -0
- /package/dist/{responsiveness-probe-WZMDBY3T.js.map → responsiveness-probe-OUHRYJYH.js.map} +0 -0
|
@@ -1094,11 +1094,11 @@ var require_util = __commonJS({
|
|
|
1094
1094
|
return false;
|
|
1095
1095
|
}
|
|
1096
1096
|
exports.schemaHasRules = schemaHasRules;
|
|
1097
|
-
function schemaHasRulesButRef(schema,
|
|
1097
|
+
function schemaHasRulesButRef(schema, RULES2) {
|
|
1098
1098
|
if (typeof schema == "boolean")
|
|
1099
1099
|
return !schema;
|
|
1100
1100
|
for (const key in schema)
|
|
1101
|
-
if (key !== "$ref" &&
|
|
1101
|
+
if (key !== "$ref" && RULES2.all[key])
|
|
1102
1102
|
return true;
|
|
1103
1103
|
return false;
|
|
1104
1104
|
}
|
|
@@ -2492,17 +2492,17 @@ var require_validate = __commonJS({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
function schemaKeywords(it, types, typeErrors, errsCount) {
|
|
2494
2494
|
const { gen, schema, data, allErrors, opts, self } = it;
|
|
2495
|
-
const { RULES } = self;
|
|
2496
|
-
if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema,
|
|
2497
|
-
gen.block(() => keywordCode(it, "$ref",
|
|
2495
|
+
const { RULES: RULES2 } = self;
|
|
2496
|
+
if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES2))) {
|
|
2497
|
+
gen.block(() => keywordCode(it, "$ref", RULES2.all.$ref.definition));
|
|
2498
2498
|
return;
|
|
2499
2499
|
}
|
|
2500
2500
|
if (!opts.jtd)
|
|
2501
2501
|
checkStrictTypes(it, types);
|
|
2502
2502
|
gen.block(() => {
|
|
2503
|
-
for (const group of
|
|
2503
|
+
for (const group of RULES2.rules)
|
|
2504
2504
|
groupKeywords(group);
|
|
2505
|
-
groupKeywords(
|
|
2505
|
+
groupKeywords(RULES2.post);
|
|
2506
2506
|
});
|
|
2507
2507
|
function groupKeywords(group) {
|
|
2508
2508
|
if (!(0, applicability_1.shouldUseGroup)(schema, group))
|
|
@@ -4204,10 +4204,10 @@ var require_core = __commonJS({
|
|
|
4204
4204
|
}
|
|
4205
4205
|
// Remove keyword
|
|
4206
4206
|
removeKeyword(keyword) {
|
|
4207
|
-
const { RULES } = this;
|
|
4208
|
-
delete
|
|
4209
|
-
delete
|
|
4210
|
-
for (const group of
|
|
4207
|
+
const { RULES: RULES2 } = this;
|
|
4208
|
+
delete RULES2.keywords[keyword];
|
|
4209
|
+
delete RULES2.all[keyword];
|
|
4210
|
+
for (const group of RULES2.rules) {
|
|
4211
4211
|
const i = group.rules.findIndex((rule) => rule.keyword === keyword);
|
|
4212
4212
|
if (i >= 0)
|
|
4213
4213
|
group.rules.splice(i, 1);
|
|
@@ -4375,9 +4375,9 @@ var require_core = __commonJS({
|
|
|
4375
4375
|
}
|
|
4376
4376
|
var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
4377
4377
|
function checkKeyword(keyword, def) {
|
|
4378
|
-
const { RULES } = this;
|
|
4378
|
+
const { RULES: RULES2 } = this;
|
|
4379
4379
|
(0, util_1.eachItem)(keyword, (kwd) => {
|
|
4380
|
-
if (
|
|
4380
|
+
if (RULES2.keywords[kwd])
|
|
4381
4381
|
throw new Error(`Keyword ${kwd} is already defined`);
|
|
4382
4382
|
if (!KEYWORD_NAME.test(kwd))
|
|
4383
4383
|
throw new Error(`Keyword ${kwd} has invalid name`);
|
|
@@ -4393,13 +4393,13 @@ var require_core = __commonJS({
|
|
|
4393
4393
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
4394
4394
|
if (dataType && post)
|
|
4395
4395
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
4396
|
-
const { RULES } = this;
|
|
4397
|
-
let ruleGroup = post ?
|
|
4396
|
+
const { RULES: RULES2 } = this;
|
|
4397
|
+
let ruleGroup = post ? RULES2.post : RULES2.rules.find(({ type: t }) => t === dataType);
|
|
4398
4398
|
if (!ruleGroup) {
|
|
4399
4399
|
ruleGroup = { type: dataType, rules: [] };
|
|
4400
|
-
|
|
4400
|
+
RULES2.rules.push(ruleGroup);
|
|
4401
4401
|
}
|
|
4402
|
-
|
|
4402
|
+
RULES2.keywords[keyword] = true;
|
|
4403
4403
|
if (!definition)
|
|
4404
4404
|
return;
|
|
4405
4405
|
const rule = {
|
|
@@ -4414,7 +4414,7 @@ var require_core = __commonJS({
|
|
|
4414
4414
|
addBeforeRule.call(this, ruleGroup, rule, definition.before);
|
|
4415
4415
|
else
|
|
4416
4416
|
ruleGroup.rules.push(rule);
|
|
4417
|
-
|
|
4417
|
+
RULES2.all[keyword] = rule;
|
|
4418
4418
|
(_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
|
|
4419
4419
|
}
|
|
4420
4420
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
@@ -20985,7 +20985,63 @@ var StdioServerTransport = class {
|
|
|
20985
20985
|
}
|
|
20986
20986
|
};
|
|
20987
20987
|
|
|
20988
|
+
// src/redact.ts
|
|
20989
|
+
var REDACTED = "[redacted]";
|
|
20990
|
+
var MAX_RELAYED_MESSAGE_CHARS = 600;
|
|
20991
|
+
function truncationMarker(dropped) {
|
|
20992
|
+
return `\u2026 [truncated, ${dropped} chars]`;
|
|
20993
|
+
}
|
|
20994
|
+
function truncateWithMarker(text, max) {
|
|
20995
|
+
if (text.length <= max) return text;
|
|
20996
|
+
let keep = max;
|
|
20997
|
+
for (let i = 0; i < 8; i++) {
|
|
20998
|
+
const candidate = Math.max(0, max - truncationMarker(text.length - keep).length);
|
|
20999
|
+
if (candidate === keep) break;
|
|
21000
|
+
keep = candidate;
|
|
21001
|
+
}
|
|
21002
|
+
return text.slice(0, keep) + truncationMarker(text.length - keep);
|
|
21003
|
+
}
|
|
21004
|
+
var RULES = [
|
|
21005
|
+
// Authorization headers, with or without a scheme.
|
|
21006
|
+
{ name: "authorization-header", pattern: /\b(authorization\s*[:=]\s*)(?:bearer\s+|basic\s+)?\S+/gi, replace: `$1${REDACTED}` },
|
|
21007
|
+
{ name: "bearer", pattern: /\bbearer\s+[A-Za-z0-9._~+/-]{8,}=*/gi, replace: `Bearer ${REDACTED}` },
|
|
21008
|
+
// Cookies.
|
|
21009
|
+
{ name: "cookie-header", pattern: /\b(set-cookie|cookie)\s*[:=]\s*\S+/gi, replace: `$1: ${REDACTED}` },
|
|
21010
|
+
// JWTs — three base64url segments. Caught before generic blobs.
|
|
21011
|
+
{ name: "jwt", pattern: /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}/g, replace: REDACTED },
|
|
21012
|
+
// Platform + vendor key prefixes. `tlk_` is ours (host API keys).
|
|
21013
|
+
{ name: "prefixed-key", pattern: /\b(?:tlk|sk|pk|rk|gho|ghp|ghu|ghs|ghr|github_pat|xoxb|xoxp|xoxa|xapp|lin_api|shpat|shpss)[_-][A-Za-z0-9_-]{8,}/gi, replace: REDACTED },
|
|
21014
|
+
// AWS access key ids.
|
|
21015
|
+
{ name: "aws-access-key-id", pattern: /\b(?:AKIA|ASIA|ABIA|ACCA)[0-9A-Z]{12,}\b/g, replace: REDACTED },
|
|
21016
|
+
// Presigned-URL signature params and their friends.
|
|
21017
|
+
{ name: "signature-param", pattern: /\b(X-Amz-Signature|X-Amz-Security-Token|X-Amz-Credential|Signature|sig)=[^&\s"']+/gi, replace: `$1=${REDACTED}` },
|
|
21018
|
+
// Generic secret-bearing key=value / key: value pairs.
|
|
21019
|
+
{ name: "secret-kv", pattern: /\b(password|passwd|pwd|secret|token|api[-_]?key|access[-_]?key|private[-_]?key|client[-_]?secret|refresh[-_]?token|session[-_]?token|credential)s?\s*[:=]\s*(?:"[^"]*"|'[^']*'|\S+)/gi, replace: `$1=${REDACTED}` },
|
|
21020
|
+
// PEM blocks.
|
|
21021
|
+
{ name: "pem", pattern: /-----BEGIN[^-]{0,64}-----[\s\S]*?-----END[^-]{0,64}-----/g, replace: REDACTED }
|
|
21022
|
+
];
|
|
21023
|
+
function redactSensitive(message) {
|
|
21024
|
+
let out = message;
|
|
21025
|
+
for (const rule of RULES) {
|
|
21026
|
+
out = out.replace(rule.pattern, rule.replace);
|
|
21027
|
+
}
|
|
21028
|
+
out = out.replace(/\s+/g, " ").trim();
|
|
21029
|
+
return truncateWithMarker(out, MAX_RELAYED_MESSAGE_CHARS);
|
|
21030
|
+
}
|
|
21031
|
+
|
|
20988
21032
|
// src/broker-client.ts
|
|
21033
|
+
var REDACTED_ONLY = REDACTED;
|
|
21034
|
+
function serverMessageFrom(payload) {
|
|
21035
|
+
if (!payload || typeof payload !== "object") return null;
|
|
21036
|
+
for (const key of ["error", "reason"]) {
|
|
21037
|
+
const v = payload[key];
|
|
21038
|
+
if (typeof v === "string" && v.trim() !== "") {
|
|
21039
|
+
const safe = redactSensitive(v);
|
|
21040
|
+
return safe.trim() === "" || safe.trim() === REDACTED_ONLY ? null : safe;
|
|
21041
|
+
}
|
|
21042
|
+
}
|
|
21043
|
+
return null;
|
|
21044
|
+
}
|
|
20989
21045
|
function makeError(status, message, detail) {
|
|
20990
21046
|
const err = new Error(message);
|
|
20991
21047
|
err.status = status;
|
|
@@ -21070,7 +21126,7 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21070
21126
|
parseFailed = true;
|
|
21071
21127
|
}
|
|
21072
21128
|
if (!res.ok) {
|
|
21073
|
-
const message = payload
|
|
21129
|
+
const message = serverMessageFrom(payload) ?? `admin-debug request failed: ${res.status}`;
|
|
21074
21130
|
throw makeError(res.status, message, payload);
|
|
21075
21131
|
}
|
|
21076
21132
|
if (parseFailed) {
|
|
@@ -21195,7 +21251,7 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21195
21251
|
parseFailed = true;
|
|
21196
21252
|
}
|
|
21197
21253
|
if (!res.ok) {
|
|
21198
|
-
const message = payload
|
|
21254
|
+
const message = serverMessageFrom(payload) ?? `admin-debug request failed: ${res.status}`;
|
|
21199
21255
|
throw makeError(res.status, message, payload);
|
|
21200
21256
|
}
|
|
21201
21257
|
if (parseFailed) {
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
writeDirectChatSessionState,
|
|
42
42
|
writeEgressAllowlist,
|
|
43
43
|
writePersistentClaudeWrapper
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ST4PZ6RF.js";
|
|
45
45
|
import "./chunk-XWVM4KPK.js";
|
|
46
46
|
export {
|
|
47
47
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
writeEgressAllowlist,
|
|
88
88
|
writePersistentClaudeWrapper
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=persistent-session-
|
|
90
|
+
//# sourceMappingURL=persistent-session-KVONGDAL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ST4PZ6RF.js";
|
|
4
4
|
import "./chunk-XWVM4KPK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/responsiveness-probe.ts
|
|
@@ -689,4 +689,4 @@ export {
|
|
|
689
689
|
readAndResetSlackReplyBindingClassifications,
|
|
690
690
|
readAndResetSlackReplyTargetClassifications
|
|
691
691
|
};
|
|
692
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
692
|
+
//# sourceMappingURL=responsiveness-probe-OUHRYJYH.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|