@commonlyai/cli 0.1.106 → 0.1.107
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/package.json
CHANGED
|
@@ -208,6 +208,9 @@ const buildClaudeEnv = (input, state, expansionEnv = {}, credentialFile = null)
|
|
|
208
208
|
}
|
|
209
209
|
output.HOME = state.statePath;
|
|
210
210
|
output.TMPDIR = state.tmpPath;
|
|
211
|
+
// Claude keeps its temp root at /private/tmp/claude-<uid> unless told
|
|
212
|
+
// otherwise; the seat's Seatbelt profile admits only its own tmp.
|
|
213
|
+
output.CLAUDE_CODE_TMPDIR = state.tmpPath;
|
|
211
214
|
output.XDG_CACHE_HOME = join(state.statePath, '.cache');
|
|
212
215
|
output.XDG_CONFIG_HOME = join(state.statePath, '.config');
|
|
213
216
|
output.XDG_DATA_HOME = join(state.statePath, '.local', 'share');
|
|
@@ -415,18 +415,17 @@ export const buildSeatbeltProfile = ({
|
|
|
415
415
|
`(allow network-outbound (remote tcp "localhost:${port}"))`
|
|
416
416
|
)).join('\n');
|
|
417
417
|
const claudeRuntimeRules = allowClaudeRuntimeAccess ? (() => {
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
// Claude's temp root is the seat's own: the adapter sets CLAUDE_CODE_TMPDIR
|
|
419
|
+
// under statePath, which the state rule above already admits. The
|
|
420
|
+
// uid-wide /private/tmp/claude-<uid> holds every other Claude session's
|
|
421
|
+
// temp files on the machine, so it is not admitted.
|
|
422
|
+
// Claude's security helper needs the encrypted login-keychain database and
|
|
423
|
+
// this non-secret locale file: that one file, not the Keychains folder.
|
|
424
|
+
const loginKeychain = join(homedir(), 'Library', 'Keychains', 'login.keychain-db');
|
|
420
425
|
const textEncoding = join(homedir(), '.CFUserTextEncoding');
|
|
421
426
|
return [
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
`(allow file-read-metadata file-test-existence (path-ancestors "${escapeSbplString(claudeTmp)}"))`,
|
|
425
|
-
`(allow file-read* file-test-existence file-write* ${literal(claudeTmp)} ${subpath(claudeTmp)})`,
|
|
426
|
-
// Claude's security helper needs the encrypted login-keychain database
|
|
427
|
-
// and this non-secret locale file. Other wrappers do not get this access.
|
|
428
|
-
`(allow file-read* file-test-existence ${subpath(userKeychains)} ${literal(textEncoding)})`,
|
|
429
|
-
`(allow file-read-metadata file-test-existence (path-ancestors "${escapeSbplString(userKeychains)}"))`,
|
|
427
|
+
`(allow file-read* file-test-existence ${literal(loginKeychain)} ${literal(textEncoding)})`,
|
|
428
|
+
`(allow file-read-metadata file-test-existence (path-ancestors "${escapeSbplString(loginKeychain)}"))`,
|
|
430
429
|
];
|
|
431
430
|
})() : [];
|
|
432
431
|
|