fullcourtdefense-cli 1.36.3 → 1.37.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.
- package/dist/actionPolicyEngine.d.ts +19 -0
- package/dist/actionPolicyEngine.js +147 -0
- package/dist/askDialog.d.ts +1 -0
- package/dist/askDialog.js +20 -3
- package/dist/callerEnv.d.ts +29 -2
- package/dist/callerEnv.js +48 -2
- package/dist/commandNarrative.js +87 -7
- package/dist/commands/daemon.d.ts +10 -0
- package/dist/commands/daemon.js +348 -170
- package/dist/commands/desktopChatGuard.js +2 -0
- package/dist/commands/deterministicGuard.d.ts +11 -0
- package/dist/commands/deterministicGuard.js +445 -28
- package/dist/commands/discoverPaths.d.ts +12 -9
- package/dist/commands/discoverPaths.js +30 -0
- package/dist/commands/ephemeralStack.js +7 -0
- package/dist/commands/flushSpool.d.ts +2 -0
- package/dist/commands/flushSpool.js +9 -2
- package/dist/commands/hook.d.ts +14 -0
- package/dist/commands/hook.js +302 -101
- package/dist/commands/httpGatewayCommand.d.ts +1 -0
- package/dist/commands/httpGatewayCommand.js +7 -1
- package/dist/commands/installClaudeHook.js +32 -10
- package/dist/commands/installCursorHook.js +20 -9
- package/dist/commands/login.js +8 -1
- package/dist/commands/mcpGateway.d.ts +21 -0
- package/dist/commands/mcpGateway.js +90 -32
- package/dist/commands/refreshPolicyCache.d.ts +28 -0
- package/dist/commands/refreshPolicyCache.js +59 -0
- package/dist/commands/watchdog.d.ts +2 -0
- package/dist/commands/watchdog.js +30 -5
- package/dist/config.d.ts +36 -0
- package/dist/config.js +78 -12
- package/dist/daemonDetectorBoot.d.ts +1 -0
- package/dist/daemonDetectorBoot.js +12 -0
- package/dist/daemonForensics.d.ts +14 -1
- package/dist/daemonForensics.js +32 -0
- package/dist/detectorInProcess.d.ts +18 -0
- package/dist/detectorInProcess.js +234 -0
- package/dist/detectorInThread.d.ts +15 -0
- package/dist/detectorInThread.js +129 -0
- package/dist/distress.d.ts +2 -0
- package/dist/distress.js +2 -0
- package/dist/fileWriteCanon.d.ts +17 -0
- package/dist/fileWriteCanon.js +141 -0
- package/dist/gateReports.d.ts +144 -0
- package/dist/gateReports.js +488 -0
- package/dist/hookIo.d.ts +59 -0
- package/dist/hookIo.js +319 -9
- package/dist/hookSlim.d.ts +15 -8
- package/dist/hookSlim.js +187 -25
- package/dist/housekeeping.d.ts +64 -0
- package/dist/housekeeping.js +384 -0
- package/dist/housekeepingOps.d.ts +150 -0
- package/dist/housekeepingOps.js +218 -0
- package/dist/housekeepingWorker.d.ts +1 -0
- package/dist/housekeepingWorker.js +113 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -0
- package/dist/localDetectionData.d.ts +10 -0
- package/dist/localDetectionData.js +48 -0
- package/dist/localDetectionUpdates.d.ts +2 -2
- package/dist/localDetectionUpdates.js +4 -4
- package/dist/localSafetySnapshot.d.ts +48 -2
- package/dist/localSafetySnapshot.js +241 -25
- package/dist/machineIdentity.d.ts +7 -0
- package/dist/machineIdentity.js +20 -2
- package/dist/monitorFastPath.d.ts +191 -0
- package/dist/monitorFastPath.js +1198 -0
- package/dist/nativeHook.js +9 -2
- package/dist/pendingDrain.d.ts +82 -0
- package/dist/pendingDrain.js +215 -0
- package/dist/pendingDrainer.d.ts +30 -0
- package/dist/pendingDrainer.js +217 -0
- package/dist/perfSnapshot.d.ts +1 -1
- package/dist/perfSnapshot.js +28 -4
- package/dist/policyCacheFiles.d.ts +73 -0
- package/dist/policyCacheFiles.js +320 -0
- package/dist/policyGateHealth.d.ts +8 -0
- package/dist/policyGateHealth.js +17 -0
- package/dist/policyRefresh.d.ts +28 -0
- package/dist/policyRefresh.js +69 -0
- package/dist/protectionMaintenance.d.ts +15 -0
- package/dist/protectionMaintenance.js +43 -1
- package/dist/runtimeConfig.d.ts +77 -20
- package/dist/runtimeConfig.js +278 -57
- package/dist/selfTest.d.ts +6 -1
- package/dist/selfTest.js +11 -4
- package/dist/telemetry.d.ts +136 -4
- package/dist/telemetry.js +493 -96
- package/dist/verdictIpc.d.ts +60 -0
- package/dist/verdictIpc.js +504 -19
- package/dist/verdictIpcClient.d.ts +175 -18
- package/dist/verdictIpcClient.js +277 -59
- package/dist/version.json +1 -1
- package/package.json +2 -2
|
@@ -16,12 +16,19 @@ async function flushSpoolCommand(args, config) {
|
|
|
16
16
|
});
|
|
17
17
|
if (!creds.shieldId)
|
|
18
18
|
return; // nothing to attribute to
|
|
19
|
-
|
|
19
|
+
// Drains in batches and records completion for the hooks that coalesced
|
|
20
|
+
// onto this flusher. `--heartbeat liveness` (hook-requested flushes):
|
|
21
|
+
// liveness only, no diagnostic payload, and a short linger for the rest of
|
|
22
|
+
// the burst that requested it.
|
|
23
|
+
const hookRequested = args.heartbeat === 'liveness';
|
|
24
|
+
const result = await (0, telemetry_1.drainSpool)({
|
|
20
25
|
apiUrl: creds.apiUrl,
|
|
21
26
|
shieldId: creds.shieldId,
|
|
22
27
|
shieldKey: creds.shieldKey,
|
|
23
28
|
heartbeat: args.heartbeat !== 'false',
|
|
24
|
-
|
|
29
|
+
livenessOnly: hookRequested,
|
|
30
|
+
refreshGuardRules: args.guardRules !== 'false',
|
|
31
|
+
}, { linger: hookRequested });
|
|
25
32
|
if (result) {
|
|
26
33
|
console.log(`Flushed ${result.accepted} event(s)${result.deduped ? `, ${result.deduped} deduped` : ''}.`);
|
|
27
34
|
}
|
package/dist/commands/hook.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface HookArgs {
|
|
|
34
34
|
approvalMode?: string;
|
|
35
35
|
approvalTimeoutMs?: string;
|
|
36
36
|
approvalPollMs?: string;
|
|
37
|
+
ideTimeout?: string;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* `post` = a post-execution hook (Cursor afterShellExecution / afterMCPExecution, Claude
|
|
@@ -209,6 +210,14 @@ export interface HookIo {
|
|
|
209
210
|
* mode, where `exit` only unwinds the evaluation and the process lives on.
|
|
210
211
|
*/
|
|
211
212
|
exitsProcess: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Native hooks (Codex, Gemini CLI, Windsurf, Kiro): a block-mode local-first
|
|
215
|
+
* allow queues its check-tool-call report (gateReports.ts) instead of
|
|
216
|
+
* spooling it. These processes used to send that report themselves and
|
|
217
|
+
* wait for it; its answer still ends a gate-failure streak and feeds the
|
|
218
|
+
* server's behavior baseline, only after the verdict and off this process.
|
|
219
|
+
*/
|
|
220
|
+
deferGateReports?: boolean;
|
|
212
221
|
/** Evaluated inside the resident daemon for a thin client (see DaemonDeclined). */
|
|
213
222
|
viaDaemon?: boolean;
|
|
214
223
|
/** Set when this evaluation's verdict is a stop still being settled (approval wait). */
|
|
@@ -245,9 +254,14 @@ export declare function crashVerdictForProcess(event: string | undefined, messag
|
|
|
245
254
|
* snapshot, policy engine) is warm here — verdicts resolve in milliseconds.
|
|
246
255
|
* Mirrors hookCommand's fail-open contract: any unexpected exception yields
|
|
247
256
|
* an allow verdict, never an error the thin client would surface.
|
|
257
|
+
* `exitsProcess`: the caller is a one-shot hook process that ends with this
|
|
258
|
+
* verdict (the slim entry's fallback, native hooks) — see HookIo.exitsProcess.
|
|
259
|
+
* `deferGateReports`: native hooks — see HookIo.deferGateReports.
|
|
248
260
|
*/
|
|
249
261
|
export declare function evaluateHookRequest(args: HookArgs, stdinRaw: string, config: BotGuardConfig, opts?: {
|
|
250
262
|
viaDaemon?: boolean;
|
|
263
|
+
exitsProcess?: boolean;
|
|
264
|
+
deferGateReports?: boolean;
|
|
251
265
|
}): Promise<{
|
|
252
266
|
stdout: string;
|
|
253
267
|
stderr: string;
|