fullcourtdefense-cli 1.31.0 → 1.32.0

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.
@@ -91,7 +91,51 @@ export interface EngineActionPolicy {
91
91
  resourceType?: string;
92
92
  rules: ActionPolicyRule[];
93
93
  enabled?: boolean;
94
+ /**
95
+ * Enforcement ceiling on a machine where a HUMAN is present (a developer
96
+ * workstation). `standard` (default): a `block` rule pauses the action and asks
97
+ * the developer in their IDE — a wrong Ask costs one click, a wrong block costs
98
+ * the customer. `hard`: the policy blocks outright even with a human present.
99
+ * Where no human is present (CI, workloads, SDK-embedded agents) every block is
100
+ * hard — an Ask nobody can answer must never silently allow.
101
+ */
102
+ enforcement?: ActionPolicyEnforcement;
94
103
  }
104
+ export type ActionPolicyEnforcement = 'standard' | 'hard';
105
+ /**
106
+ * The developer Ask a softened block becomes: IDE prompt, asked EVERY time (no
107
+ * session memory — a Block-level rule is exactly where a second, different
108
+ * action must not ride on the first yes), blocks on timeout.
109
+ */
110
+ export declare const WORKSTATION_ASK_APPROVAL: ResolvedActionPolicyApproval;
111
+ /**
112
+ * LOCAL CONTENT CEILING.
113
+ *
114
+ * Facts about what the arguments CONTAIN. A rule that needs one of these to
115
+ * fire is a rule about content, and content on this machine's own disk is not
116
+ * exfiltration: typing a key into `.env`, pasting a token into a test fixture,
117
+ * reading a config file that holds a password. Secret scanning on file content
118
+ * is inherently approximate (there is no finite list of what a fake key looks
119
+ * like), and the industry treats it as advisory for exactly that reason — a
120
+ * hard stop on EDITING is how a developer loses trust in the product after two
121
+ * wrong blocks. So: a `block` that fires on a content fact for a LOCAL FILE
122
+ * action is recorded as a warning (verdict `log`, `loggedInsteadOfBlocked`),
123
+ * never enforced. The same content leaving the machine — an external
124
+ * destination, a recipient, a shell command that sends it — is untouched by
125
+ * this ceiling and still blocks. A policy marked `enforcement: 'hard'` is also
126
+ * untouched: the admin confirmed it should stop without asking.
127
+ */
128
+ export declare const CONTENT_FACT_FIELDS: ReadonlySet<string>;
129
+ /** Does this rule need a content fact to fire? (A rule with no content constraint is about the ACTION, not the content.) */
130
+ export declare function ruleNeedsContentFact(rule: Pick<ActionPolicyRule, 'constraints'>): boolean;
131
+ /**
132
+ * Is this call a LOCAL FILE action — content touching this machine's disk with
133
+ * nothing leaving the machine? Requires a file path, no external destination,
134
+ * no recipient, and a file-shaped tool or operation. A shell command is never
135
+ * a local file action here (the command line may send data in ways the URL
136
+ * parser cannot see), so `echo $KEY | nc host 4444` keeps its verdict.
137
+ */
138
+ export declare function isLocalFileContentAction(toolName: string, operation: string, context: Record<string, string>): boolean;
95
139
  /** A monitor-stage policy match: what WOULD have happened, recorded but not enforced. */
96
140
  export interface ActionPolicyMonitorMatch {
97
141
  policyId?: string;
@@ -113,6 +157,22 @@ export interface EngineCheckResult {
113
157
  * session > 1h, block > org) so one permissive rule can never loosen another.
114
158
  */
115
159
  approval?: ResolvedActionPolicyApproval;
160
+ /**
161
+ * The matched rule said `block`, but a human is present and the policy is not
162
+ * `enforcement: 'hard'`, so the action pauses and asks the developer instead
163
+ * (verdict is `require_approval` with WORKSTATION_ASK_APPROVAL). Surfaced so
164
+ * explanations can say "set to Block; asks you on a workstation; an admin can
165
+ * mark it Hard block".
166
+ */
167
+ askedInsteadOfBlocked?: boolean;
168
+ /**
169
+ * The matched rule said `block` because of what the arguments CONTAIN
170
+ * (`toolArgs.containsSecret` / `secretKind` / `containsPii`), but the action
171
+ * only touches a file on this machine's own disk and nothing leaves the
172
+ * machine — so it is recorded as a warning (verdict `log`) instead of
173
+ * stopping the developer. See LOCAL CONTENT CEILING below.
174
+ */
175
+ loggedInsteadOfBlocked?: boolean;
116
176
  /** Monitor-stage policies that matched (would-block / would-approve) without enforcing. */
117
177
  monitorMatches?: ActionPolicyMonitorMatch[];
118
178
  /** Org-scoped policies skipped because the call carried no developerName (for caller-side logging). */