fullcourtdefense-cli 1.35.7 → 1.35.9
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/actionIdentity.js +2 -1
- package/dist/actionPolicyEngine.d.ts +38 -0
- package/dist/actionPolicyEngine.js +383 -24
- package/dist/approvalPrompt.js +2 -2
- package/dist/askDialog.js +5 -4
- package/dist/blockExplanation.js +2 -0
- package/dist/callerEnv.d.ts +33 -0
- package/dist/callerEnv.js +90 -0
- package/dist/commandNarrative.js +111 -4
- package/dist/commands/daemon.js +1 -1
- package/dist/commands/deterministicGuard.d.ts +32 -0
- package/dist/commands/deterministicGuard.js +214 -19
- package/dist/commands/hook.d.ts +34 -1
- package/dist/commands/hook.js +188 -31
- package/dist/commands/mcpGateway.js +2 -0
- package/dist/commands/taintLedger.js +3 -1
- package/dist/commands/workloadProtect.js +6 -2
- package/dist/devConfirm.d.ts +28 -12
- package/dist/devConfirm.js +134 -48
- package/dist/hookSlim.d.ts +1 -1
- package/dist/hookSlim.js +22 -2
- package/dist/nativeHook.d.ts +2 -1
- package/dist/nativeHook.js +109 -3
- package/dist/notify.js +4 -0
- package/dist/shellAst.d.ts +117 -0
- package/dist/shellAst.js +590 -0
- package/dist/shellAstLoader.d.ts +32 -0
- package/dist/shellAstLoader.js +271 -0
- package/dist/telemetry.d.ts +20 -0
- package/dist/telemetry.js +7 -0
- package/dist/vendor/tree-sitter/LICENSE.tree-sitter-bash +21 -0
- package/dist/vendor/tree-sitter/LICENSE.web-tree-sitter +21 -0
- package/dist/vendor/tree-sitter/VERSIONS.json +4 -0
- package/dist/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
- package/dist/vendor/tree-sitter/tree-sitter.cjs +4031 -0
- package/dist/vendor/tree-sitter/tree-sitter.wasm +0 -0
- package/dist/verdictIpc.js +5 -2
- package/dist/verdictIpcClient.d.ts +11 -1
- package/dist/verdictIpcClient.js +12 -2
- package/dist/version.json +1 -1
- package/package.json +9 -6
package/dist/actionIdentity.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.identityPart = identityPart;
|
|
4
4
|
exports.captureActionIdentity = captureActionIdentity;
|
|
5
|
+
const callerEnv_1 = require("./callerEnv");
|
|
5
6
|
function identityPart(value) {
|
|
6
7
|
return typeof value === 'string' && /^[A-Za-z0-9_.:@/-]{1,200}$/.test(value) ? value : undefined;
|
|
7
8
|
}
|
|
8
|
-
function captureActionIdentity(payload = {}, env =
|
|
9
|
+
function captureActionIdentity(payload = {}, env = (0, callerEnv_1.callerEnv)()) {
|
|
9
10
|
return {
|
|
10
11
|
sessionId: identityPart(payload.conversation_id || payload.conversationId || payload.session_id || payload.sessionId
|
|
11
12
|
|| env.FCD_SESSION_ID || env.CLAUDE_CODE_SESSION_ID || env.CODEX_THREAD_ID),
|
|
@@ -212,6 +212,7 @@ export declare function effectiveApprovalScope(approval: ActionPolicyApproval |
|
|
|
212
212
|
*/
|
|
213
213
|
export declare function deriveToolOperations(toolName: string, declaredActions?: string[]): string[];
|
|
214
214
|
export declare function toolCapabilities(value: string): Set<string>;
|
|
215
|
+
export declare function canonicalAgentClient(value: string): string;
|
|
215
216
|
/**
|
|
216
217
|
* "Contains a secret" means a secret VALUE is present — never that the text
|
|
217
218
|
* talks about secrets. Source code, docs, grep patterns and commit messages in
|
|
@@ -234,6 +235,43 @@ export declare function toolCapabilities(value: string): Set<string>;
|
|
|
234
235
|
*/
|
|
235
236
|
export type SecretKind = 'github_token' | 'aws_access_key' | 'google_api_key' | 'openai_key' | 'slack_token' | 'jwt' | 'private_key' | 'assignment' | 'high_entropy' | 'none';
|
|
236
237
|
export declare function detectSecretKind(raw: string): SecretKind;
|
|
238
|
+
export type ShellAstMode = 'off' | 'shadow' | 'primary';
|
|
239
|
+
/** Structural subset of shellAst.ts ShellFacts that the engine reads. */
|
|
240
|
+
export interface ShellAstFactsLike {
|
|
241
|
+
complete: boolean;
|
|
242
|
+
commands: Array<{
|
|
243
|
+
name: string;
|
|
244
|
+
argv: string[];
|
|
245
|
+
literal: boolean[];
|
|
246
|
+
text: string;
|
|
247
|
+
pipeline: number;
|
|
248
|
+
cwdScope: 'scoped' | 'unscoped' | 'unknown';
|
|
249
|
+
depth?: {
|
|
250
|
+
subshell: number;
|
|
251
|
+
function: number;
|
|
252
|
+
loop: number;
|
|
253
|
+
conditional: number;
|
|
254
|
+
substitution: number;
|
|
255
|
+
};
|
|
256
|
+
wrapper?: {
|
|
257
|
+
kind: string;
|
|
258
|
+
program: string;
|
|
259
|
+
inner?: ShellAstFactsLike;
|
|
260
|
+
};
|
|
261
|
+
}>;
|
|
262
|
+
}
|
|
263
|
+
export interface ShellAstOperationComparison {
|
|
264
|
+
mode: ShellAstMode;
|
|
265
|
+
complete: boolean;
|
|
266
|
+
regex: string;
|
|
267
|
+
ast?: string;
|
|
268
|
+
agree: boolean;
|
|
269
|
+
}
|
|
270
|
+
export declare function setShellAstProvider(provider: ((command: string) => ShellAstFactsLike | undefined) | undefined): void;
|
|
271
|
+
export declare function setShellAstMode(mode: ShellAstMode): void;
|
|
272
|
+
export declare function getShellAstMode(): ShellAstMode;
|
|
273
|
+
/** Shadow telemetry: the comparison recorded by the most recent top-level shell classification (consumed once). */
|
|
274
|
+
export declare function takeShellAstOperationComparison(): ShellAstOperationComparison | undefined;
|
|
237
275
|
/**
|
|
238
276
|
* Check a tool call against action policies.
|
|
239
277
|
* Returns the most restrictive matching verdict (pure — callers do their own logging).
|