@integrity-labs/agt-cli 0.28.1041 → 0.28.1043
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-7ORA3ZVJ.js → chunk-NUGMHIGZ.js} +6 -30
- package/dist/chunk-NUGMHIGZ.js.map +1 -0
- package/dist/{chunk-TXRZFABA.js → chunk-O44RDEIA.js} +43 -2
- package/dist/{chunk-TXRZFABA.js.map → chunk-O44RDEIA.js.map} +1 -1
- package/dist/{chunk-OHT4PWAK.js → chunk-PBMQ4KP6.js} +58 -4
- package/dist/chunk-PBMQ4KP6.js.map +1 -0
- package/dist/{claude-pair-runtime-JZU32YLZ.js → claude-pair-runtime-PC7H2NVY.js} +2 -2
- package/dist/lib/manager-worker.js +14 -14
- package/dist/{persistent-session-3IGNGFEX.js → persistent-session-WF7UMHOW.js} +3 -3
- package/dist/{responsiveness-probe-OVMYX6PK.js → responsiveness-probe-L6WGIQT3.js} +3 -3
- package/dist/{session-auth-dead-EL5HEEEV.js → session-auth-dead-VUJZ3ROC.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-7ORA3ZVJ.js.map +0 -1
- package/dist/chunk-OHT4PWAK.js.map +0 -1
- /package/dist/{claude-pair-runtime-JZU32YLZ.js.map → claude-pair-runtime-PC7H2NVY.js.map} +0 -0
- /package/dist/{persistent-session-3IGNGFEX.js.map → persistent-session-WF7UMHOW.js.map} +0 -0
- /package/dist/{responsiveness-probe-OVMYX6PK.js.map → responsiveness-probe-L6WGIQT3.js.map} +0 -0
- /package/dist/{session-auth-dead-EL5HEEEV.js.map → session-auth-dead-VUJZ3ROC.js.map} +0 -0
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
rotateDailySession,
|
|
24
24
|
sessionFileExists,
|
|
25
25
|
todayLocalIso
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-O44RDEIA.js";
|
|
27
27
|
import {
|
|
28
28
|
classifyUnanswerablePane,
|
|
29
29
|
findUsageLimitResetHint,
|
|
@@ -3722,12 +3722,51 @@ function roleFromAuthComponent(value) {
|
|
|
3722
3722
|
// src/lib/project-claude-settings.ts
|
|
3723
3723
|
import { existsSync as existsSync5, mkdirSync as mkdirSync5, readFileSync as readFileSync6, renameSync as renameSync2, unlinkSync, writeFileSync as writeFileSync4 } from "fs";
|
|
3724
3724
|
import { join as join6 } from "path";
|
|
3725
|
+
|
|
3726
|
+
// ../../packages/core/dist/provisioning/frameworks/claudecode/deny-permissions.js
|
|
3727
|
+
var SECRETS_DENY_PERMISSIONS = [
|
|
3728
|
+
// Read blocks
|
|
3729
|
+
"Read(**/.env*)",
|
|
3730
|
+
"Read(**/.dev.vars*)",
|
|
3731
|
+
"Read(**/*.pem)",
|
|
3732
|
+
"Read(**/*.key)",
|
|
3733
|
+
"Read(**/secrets/**)",
|
|
3734
|
+
"Read(**/credentials/**)",
|
|
3735
|
+
"Read(**/credentials.json)",
|
|
3736
|
+
"Read(**/.aws/**)",
|
|
3737
|
+
// gcloud stores ADC + cached access/refresh tokens under ~/.config/gcloud/
|
|
3738
|
+
// (application_default_credentials.json, credentials.db, access_tokens.db).
|
|
3739
|
+
// Brokered GCP access flows via CLOUDSDK_AUTH_ACCESS_TOKEN env, never these
|
|
3740
|
+
// files, so denying reads here is the GCP analogue of the .aws/ block.
|
|
3741
|
+
"Read(**/.config/gcloud/**)",
|
|
3742
|
+
"Read(**/.ssh/**)",
|
|
3743
|
+
"Read(**/config/database.yml)",
|
|
3744
|
+
"Read(**/config/credentials.json)",
|
|
3745
|
+
"Read(**/.npmrc)",
|
|
3746
|
+
"Read(**/.pypirc)",
|
|
3747
|
+
// Write blocks
|
|
3748
|
+
"Write(**/.env*)",
|
|
3749
|
+
"Write(**/secrets/**)",
|
|
3750
|
+
"Write(**/.ssh/**)"
|
|
3751
|
+
];
|
|
3752
|
+
var CLAUDE_ARTIFACT_TOOLS_DENY = [
|
|
3753
|
+
"Artifact",
|
|
3754
|
+
"ArtifactComments",
|
|
3755
|
+
"ArtifactData"
|
|
3756
|
+
];
|
|
3757
|
+
var PLATFORM_DENY_PERMISSIONS = [
|
|
3758
|
+
...SECRETS_DENY_PERMISSIONS,
|
|
3759
|
+
...CLAUDE_ARTIFACT_TOOLS_DENY
|
|
3760
|
+
];
|
|
3761
|
+
|
|
3762
|
+
// src/lib/project-claude-settings.ts
|
|
3725
3763
|
function writeProjectClaudeSettings(args) {
|
|
3726
3764
|
const { projectDir, managed } = args;
|
|
3765
|
+
const deny = args.deny ?? PLATFORM_DENY_PERMISSIONS;
|
|
3727
3766
|
const path = join6(projectDir, ".claude", "settings.json");
|
|
3728
3767
|
try {
|
|
3729
3768
|
const fileExists = existsSync5(path);
|
|
3730
|
-
if (Object.keys(managed).length === 0 && !fileExists) return { kind: "noop" };
|
|
3769
|
+
if (Object.keys(managed).length === 0 && deny.length === 0 && !fileExists) return { kind: "noop" };
|
|
3731
3770
|
let existing = {};
|
|
3732
3771
|
let backup = null;
|
|
3733
3772
|
if (fileExists) {
|
|
@@ -3750,6 +3789,16 @@ function writeProjectClaudeSettings(args) {
|
|
|
3750
3789
|
if (key in managed) next[key] = managed[key];
|
|
3751
3790
|
else delete next[key];
|
|
3752
3791
|
}
|
|
3792
|
+
let denyAdded = false;
|
|
3793
|
+
if (deny.length > 0) {
|
|
3794
|
+
const perms = next["permissions"] !== null && typeof next["permissions"] === "object" && !Array.isArray(next["permissions"]) ? { ...next["permissions"] } : {};
|
|
3795
|
+
const current = Array.isArray(perms["deny"]) ? perms["deny"].filter((d) => typeof d === "string") : [];
|
|
3796
|
+
const merged = [...current];
|
|
3797
|
+
for (const rule of deny) if (!merged.includes(rule)) merged.push(rule);
|
|
3798
|
+
denyAdded = merged.length !== current.length || !Array.isArray(perms["deny"]);
|
|
3799
|
+
perms["deny"] = merged;
|
|
3800
|
+
next["permissions"] = perms;
|
|
3801
|
+
}
|
|
3753
3802
|
if (Object.keys(next).length === 0) {
|
|
3754
3803
|
if (backup) return { kind: "recovered", path, backup, rewritten: false };
|
|
3755
3804
|
if (fileExists) {
|
|
@@ -3766,7 +3815,11 @@ function writeProjectClaudeSettings(args) {
|
|
|
3766
3815
|
mkdirSync5(join6(projectDir, ".claude"), { recursive: true });
|
|
3767
3816
|
writeFileSync4(path, serialized, { mode: 384 });
|
|
3768
3817
|
if (backup) return { kind: "recovered", path, backup, rewritten: true };
|
|
3769
|
-
return {
|
|
3818
|
+
return {
|
|
3819
|
+
kind: "written",
|
|
3820
|
+
path,
|
|
3821
|
+
keys: [...Object.keys(managed), ...denyAdded ? ["permissions.deny"] : []]
|
|
3822
|
+
};
|
|
3770
3823
|
} catch (err) {
|
|
3771
3824
|
return { kind: "failed", path, error: err instanceof Error ? err.message : String(err) };
|
|
3772
3825
|
}
|
|
@@ -5803,6 +5856,7 @@ function getProjectDir(codeName) {
|
|
|
5803
5856
|
}
|
|
5804
5857
|
|
|
5805
5858
|
export {
|
|
5859
|
+
PLATFORM_DENY_PERMISSIONS,
|
|
5806
5860
|
agentTmpDirFor,
|
|
5807
5861
|
buildRemoteMcpEntry,
|
|
5808
5862
|
buildLiveHeaderRemoteMcpProxyEntry,
|
|
@@ -5930,4 +5984,4 @@ export {
|
|
|
5930
5984
|
stopAllSessionsAndWait,
|
|
5931
5985
|
getProjectDir
|
|
5932
5986
|
};
|
|
5933
|
-
//# sourceMappingURL=chunk-
|
|
5987
|
+
//# sourceMappingURL=chunk-PBMQ4KP6.js.map
|