fullcourtdefense-cli 1.36.0 → 1.36.3
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/actionPolicyEngine.d.ts +23 -0
- package/dist/actionPolicyEngine.js +68 -20
- package/dist/approvalPrompt.d.ts +15 -0
- package/dist/approvalPrompt.js +157 -20
- package/dist/askDialog.d.ts +2 -0
- package/dist/askDialog.js +15 -1
- package/dist/askHeader.d.ts +87 -0
- package/dist/askHeader.js +612 -0
- package/dist/blockExplanation.d.ts +9 -0
- package/dist/blockExplanation.js +14 -0
- package/dist/callerEnv.d.ts +1 -1
- package/dist/callerEnv.js +14 -0
- package/dist/cloudGrant.d.ts +46 -0
- package/dist/cloudGrant.js +420 -0
- package/dist/cloudGrantTools.d.ts +97 -0
- package/dist/cloudGrantTools.js +1112 -0
- package/dist/commandNarrative.d.ts +13 -0
- package/dist/commandNarrative.js +249 -49
- package/dist/commands/cmdGuard.js +1 -1
- package/dist/commands/daemon.js +37 -3
- package/dist/commands/demoActions.js +2 -2
- package/dist/commands/deterministicGuard.d.ts +13 -2
- package/dist/commands/deterministicGuard.js +259 -57
- package/dist/commands/discover.js +37 -14
- package/dist/commands/discoverAgentFiles.d.ts +2 -0
- package/dist/commands/discoverAgentFiles.js +1 -0
- package/dist/commands/discoverPaths.d.ts +4 -0
- package/dist/commands/discoverPaths.js +19 -1
- package/dist/commands/discoverProjectRoots.d.ts +72 -0
- package/dist/commands/discoverProjectRoots.js +327 -0
- package/dist/commands/discoverProxy.d.ts +1 -1
- package/dist/commands/discoverProxy.js +1 -1
- package/dist/commands/discoverSecrets.d.ts +44 -0
- package/dist/commands/discoverSecrets.js +158 -14
- package/dist/commands/doctor.js +1 -0
- package/dist/commands/hook.js +10 -7
- package/dist/commands/login.js +4 -0
- package/dist/commands/mcpGateway.js +9 -7
- package/dist/commands/posixShellGuard.js +1 -1
- package/dist/commands/shellGuard.js +70 -25
- package/dist/commands/uninstallAll.d.ts +1 -7
- package/dist/commands/uninstallAll.js +6 -45
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -3
- package/dist/credentialGrant.d.ts +48 -0
- package/dist/credentialGrant.js +29 -18
- package/dist/credentialStore.js +1 -1
- package/dist/devConfirm.d.ts +44 -3
- package/dist/devConfirm.js +166 -30
- package/dist/distress.d.ts +2 -0
- package/dist/distress.js +2 -0
- package/dist/grantTargets.d.ts +21 -0
- package/dist/grantTargets.js +235 -0
- package/dist/identityRecovery.d.ts +50 -0
- package/dist/identityRecovery.js +99 -0
- package/dist/localSafetySnapshot.js +2 -0
- package/dist/machineIdentity.d.ts +90 -1
- package/dist/machineIdentity.js +457 -94
- package/dist/msiProductCode.d.ts +10 -0
- package/dist/msiProductCode.js +124 -0
- package/dist/notify.js +1 -0
- package/dist/selfTest.d.ts +1 -1
- package/dist/selfTest.js +1 -1
- package/dist/selfUpdate.d.ts +51 -2
- package/dist/selfUpdate.js +217 -19
- package/dist/shellAst.d.ts +2 -0
- package/dist/shellAst.js +7 -1
- package/dist/shellAstLoader.js +12 -1
- package/dist/telemetry.d.ts +9 -0
- package/dist/telemetry.js +29 -7
- package/dist/version.json +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export type EnvironmentTag = 'production' | 'staging' | 'dev';
|
|
2
|
+
/** Facts the ask envelope carries besides the reason text (all optional: the MCP gateway has none). */
|
|
3
|
+
export interface AskSubject {
|
|
4
|
+
/** Hook event: shell | mcp | file | read. */
|
|
5
|
+
event?: string;
|
|
6
|
+
/** Engine operation of the action (read / write / DELETE / SHELL …). */
|
|
7
|
+
operation?: string;
|
|
8
|
+
/** Grant scope cloud entries, `gcloud|<how>|<where>`. */
|
|
9
|
+
cloud?: string[];
|
|
10
|
+
/** Host the action reaches (engine `destination.domain`). */
|
|
11
|
+
destinationDomain?: string;
|
|
12
|
+
/** Hosts a credential line sends to (credential binding). */
|
|
13
|
+
credentialHosts?: string[];
|
|
14
|
+
/** Rule id: `local-safety:<item>` or the action policy id. */
|
|
15
|
+
ruleId?: string;
|
|
16
|
+
/** Why no "Always allow" when the scope itself did not refuse it. */
|
|
17
|
+
alwaysOff?: 'rule' | 'org' | 'no_rule';
|
|
18
|
+
/** The client the hook records as `agentClient` on the runtime event (cursor, claude-code, …). */
|
|
19
|
+
agentClient?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AskHeaderInput {
|
|
22
|
+
/** The full action text: the script, else the "What" line. */
|
|
23
|
+
command?: string;
|
|
24
|
+
/** "shell command", "file edit", "MCP tool call" … */
|
|
25
|
+
kind?: string;
|
|
26
|
+
/** Tool line (MCP gateway). */
|
|
27
|
+
tool?: string;
|
|
28
|
+
/** The rule by name. */
|
|
29
|
+
policy?: string;
|
|
30
|
+
/** Local Safety rule detail from the Rule line: "id x, credential_commands". */
|
|
31
|
+
ruleDetail?: string;
|
|
32
|
+
/** The `IDE:` line of the reason (MCP gateway, older hook builds). */
|
|
33
|
+
ide?: string;
|
|
34
|
+
subject?: AskSubject;
|
|
35
|
+
/** "Always allow" is offered; `covers` says what it would cover. */
|
|
36
|
+
alwaysOffered: boolean;
|
|
37
|
+
alwaysCovers?: string;
|
|
38
|
+
/** The scope's own reason for not offering it (`grantNotOfferedReason`). */
|
|
39
|
+
alwaysNotOffered?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface AskHeader {
|
|
42
|
+
/** Who is asking: "Your AI agent (Claude Code) wants to run this command." */
|
|
43
|
+
who: string;
|
|
44
|
+
/** One plain sentence. */
|
|
45
|
+
why: string;
|
|
46
|
+
/** What the action would change or remove, when the line names it; absent when unreadable. */
|
|
47
|
+
affects?: string;
|
|
48
|
+
/** Removes the home folder, a whole drive or the filesystem root: drawn like production (the words say it too). */
|
|
49
|
+
danger?: boolean;
|
|
50
|
+
/** Credential rules: where the token / secret is sent ("firestore.googleapis.com" or "unknown"). */
|
|
51
|
+
secretSentTo?: {
|
|
52
|
+
label: 'Token sent to' | 'Secret sent to';
|
|
53
|
+
value: string;
|
|
54
|
+
};
|
|
55
|
+
/** "Command" for shell lines, "Tool" for tool calls, "Target" otherwise. */
|
|
56
|
+
commandLabel: string;
|
|
57
|
+
command: string;
|
|
58
|
+
action: string;
|
|
59
|
+
/** Where the action lands, without the tag. */
|
|
60
|
+
where: string;
|
|
61
|
+
tag?: EnvironmentTag;
|
|
62
|
+
/** `where` with the tag spelled out: "acme-prod · production (by name)". */
|
|
63
|
+
whereText: string;
|
|
64
|
+
always: string;
|
|
65
|
+
/** Which fact the sentence came from; the dialog skips repeating it under "Why it triggered". */
|
|
66
|
+
source: 'cloud' | 'credential' | 'operation' | 'rule';
|
|
67
|
+
}
|
|
68
|
+
/** The client id as the console labels it; undefined for a missing or placeholder id. */
|
|
69
|
+
export declare function agentClientLabel(raw?: string): string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The guard's credential-command patterns (`deterministicGuard` CREDENTIAL_COMMAND_RULES), for
|
|
72
|
+
* naming a secret the line sends somewhere when ANOTHER rule asked. Copied because this module stays
|
|
73
|
+
* pure (the guard reads files); test-ask-dialog.js fails when the two differ.
|
|
74
|
+
*/
|
|
75
|
+
export declare const LINE_CREDENTIAL_PATTERNS: Readonly<Record<string, string>>;
|
|
76
|
+
/** Name tokens of a project id → environment. Deterministic, and only a hint: the dialog says "(by name)". */
|
|
77
|
+
export declare function environmentTag(projectId: string): EnvironmentTag | undefined;
|
|
78
|
+
interface ProjectRead {
|
|
79
|
+
/** Literal project ids, in order of appearance, unique. */
|
|
80
|
+
ids: string[];
|
|
81
|
+
/** A project reference exists but is computed (`$p`, `$(cat p.txt)`). */
|
|
82
|
+
computed: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** Literal project ids named on the command: `--project x` / `--project=x` and Google API `projects/<id>` paths. */
|
|
85
|
+
export declare function projectsInCommand(command: string): ProjectRead;
|
|
86
|
+
export declare function buildAskHeader(input: AskHeaderInput): AskHeader;
|
|
87
|
+
export {};
|