@akasecurity/ai-tc-claude-code 0.9.1 → 0.9.2
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/.claude-plugin/plugin.json +1 -1
- package/README.md +3 -1
- package/commands/setup.md +101 -19
- package/package.json +3 -3
- package/scripts/apply-suppressions.js +3192 -487
- package/scripts/backfill.js +951 -455
- package/scripts/filescan.js +939 -449
- package/scripts/firstrun.js +895 -413
- package/scripts/intro.js +91 -24
- package/scripts/onboard.js +920 -416
- package/scripts/post-tool-use.js +932 -442
- package/scripts/pre-tool-use.js +937 -447
- package/scripts/query.js +895 -413
- package/scripts/reconcile.js +924 -436
- package/scripts/remediate.js +942 -452
- package/scripts/session-start.js +957 -475
- package/scripts/start-light.js +91 -24
- package/scripts/statusline.js +895 -413
- package/scripts/stop.js +132 -38
- package/scripts/triage-rubric.md +4 -3
- package/scripts/user-prompt-submit.js +940 -450
package/scripts/intro.js
CHANGED
|
@@ -15182,7 +15182,12 @@ var FindingFacets = external_exports.object({
|
|
|
15182
15182
|
severity: external_exports.array(FindingFacetItem),
|
|
15183
15183
|
subtype: external_exports.array(FindingFacetItem),
|
|
15184
15184
|
provider: external_exports.array(FindingFacetItem),
|
|
15185
|
-
action: external_exports.array(FindingFacetItem)
|
|
15185
|
+
action: external_exports.array(FindingFacetItem),
|
|
15186
|
+
// Counts by the group's derived status. The SQLite store derives a status
|
|
15187
|
+
// for every instance, so every group lands in a bucket; a status-less
|
|
15188
|
+
// group (possible only for callers whose rows carry no statuses) is
|
|
15189
|
+
// counted under no value.
|
|
15190
|
+
status: external_exports.array(FindingFacetItem)
|
|
15186
15191
|
}).meta({ id: "FindingFacets" });
|
|
15187
15192
|
var ListGroupedFindingsQuery = external_exports.object({
|
|
15188
15193
|
// NOTE: severity filters by Severity (critical/high/medium/low), not by
|
|
@@ -15191,6 +15196,10 @@ var ListGroupedFindingsQuery = external_exports.object({
|
|
|
15191
15196
|
subtype: external_exports.array(external_exports.string()).optional(),
|
|
15192
15197
|
provider: external_exports.array(FindingProvider).optional(),
|
|
15193
15198
|
action: external_exports.array(FindingAction).optional(),
|
|
15199
|
+
// Matches a group's DERIVED status (see FindingGroup.status), not its
|
|
15200
|
+
// individual instances' — so a filtered group's Status column always reads
|
|
15201
|
+
// one of the requested values.
|
|
15202
|
+
status: external_exports.array(FindingStatus).optional(),
|
|
15194
15203
|
q: external_exports.string().optional(),
|
|
15195
15204
|
// Scope to findings whose event carries this session id (the Activity page's
|
|
15196
15205
|
// session → findings drilldown). Findings without a session never match.
|
|
@@ -15371,6 +15380,33 @@ var ToolCallAttributes = external_exports.object({
|
|
|
15371
15380
|
parent_uuid: external_exports.string().optional(),
|
|
15372
15381
|
run_key: external_exports.string().optional()
|
|
15373
15382
|
}).catchall(external_exports.unknown());
|
|
15383
|
+
var CaptureAttributes = external_exports.object({
|
|
15384
|
+
// The harness/tool that produced the capture (`claude-code`, `cli`, …). A
|
|
15385
|
+
// column on the legacy `events` table; here it rides the bag because a
|
|
15386
|
+
// capture-typed audit row has no equivalent column of its own.
|
|
15387
|
+
source_tool: external_exports.string().optional(),
|
|
15388
|
+
file_path: external_exports.string().optional(),
|
|
15389
|
+
repo: external_exports.string().optional(),
|
|
15390
|
+
// The host tool whose input/output was scanned (e.g. 'Bash', 'WebFetch') —
|
|
15391
|
+
// gives a non-file capture a display location ("via Bash") when file_path
|
|
15392
|
+
// is absent. The tool NAME only, never its arguments/output.
|
|
15393
|
+
tool_name: external_exports.string().optional(),
|
|
15394
|
+
// Presence-only provenance flag: set when the file is excluded by the
|
|
15395
|
+
// repo's .gitignore. Omitted (not false) for tracked files.
|
|
15396
|
+
gitignored: external_exports.boolean().optional(),
|
|
15397
|
+
// Set ONLY when the capture is a COMPLETE file snapshot (a worktree scan
|
|
15398
|
+
// reading from disk), never a partial fragment (a hook-captured edit).
|
|
15399
|
+
whole_file: external_exports.boolean().optional(),
|
|
15400
|
+
// Distributed-tracing correlation: `correlation_id` ties the capture back to
|
|
15401
|
+
// the request that produced it; `trace_id` is the originating span's W3C
|
|
15402
|
+
// trace id when telemetry is enabled.
|
|
15403
|
+
correlation_id: external_exports.uuid().optional(),
|
|
15404
|
+
trace_id: external_exports.string().regex(/^[0-9a-f]{32}$/).optional(),
|
|
15405
|
+
// Ids of the detection exceptions that downgraded findings in this capture
|
|
15406
|
+
// to 'allow' — the enforcement audit trail's link back to the grant that
|
|
15407
|
+
// authorized the bypass.
|
|
15408
|
+
exception_ids: external_exports.array(external_exports.guid()).optional()
|
|
15409
|
+
}).catchall(external_exports.unknown());
|
|
15374
15410
|
var ToolCallInspection = external_exports.object({
|
|
15375
15411
|
ruleId: external_exports.string().min(1),
|
|
15376
15412
|
ruleName: external_exports.string(),
|
|
@@ -15457,7 +15493,18 @@ var InspectionFindingInput = external_exports.object({
|
|
|
15457
15493
|
span: Span,
|
|
15458
15494
|
maskedMatch: external_exports.string(),
|
|
15459
15495
|
actionTaken: ActionTaken,
|
|
15460
|
-
confidence: external_exports.number().min(0).max(1)
|
|
15496
|
+
confidence: external_exports.number().min(0).max(1),
|
|
15497
|
+
// Stable, content-addressed key correlating this finding across re-detections
|
|
15498
|
+
// — mirrors the legacy `findings.finding_key` (uq_inspection_findings_key is
|
|
15499
|
+
// its unique index). Optional: only an at-rest/re-scannable finding carries
|
|
15500
|
+
// one; an in-flight capture (prompt/response) has nothing to re-detect
|
|
15501
|
+
// against and leaves it unset, so every insert is a fresh row.
|
|
15502
|
+
findingKey: external_exports.string().optional(),
|
|
15503
|
+
// The ORIGINAL detection time, preserved across a later re-detection of the
|
|
15504
|
+
// same findingKey — mirrors the legacy `findings.first_detected_at`.
|
|
15505
|
+
// Optional: when omitted, the writer derives it from the referenced audit
|
|
15506
|
+
// event's startedAt on first insert (see SqliteInspectionFindingsRepository).
|
|
15507
|
+
firstDetectedAt: external_exports.iso.datetime().optional()
|
|
15461
15508
|
});
|
|
15462
15509
|
var InventoryContext = external_exports.object({
|
|
15463
15510
|
host: InventoryInput.optional(),
|
|
@@ -15656,6 +15703,7 @@ var ActivityOverviewResponse = external_exports.object({
|
|
|
15656
15703
|
|
|
15657
15704
|
// ../../packages/schema/src/zod/event.ts
|
|
15658
15705
|
var EventKind = external_exports.enum(["prompt", "response", "code_change", "tool_use"]).meta({ id: "EventKind" });
|
|
15706
|
+
var CAPTURE_EVENT_TYPES_SQL = EventKind.options.map((k) => `'${k}'`).join(",");
|
|
15659
15707
|
var SourceTool = external_exports.enum(["claude-code", "claude-desktop", "cursor", "chatgpt", "github-copilot", "cli", "unknown"]).meta({ id: "SourceTool" });
|
|
15660
15708
|
var EventMetadata = external_exports.object({
|
|
15661
15709
|
sessionId: external_exports.string().optional(),
|
|
@@ -16145,6 +16193,12 @@ var PolicyBundle = external_exports.object({
|
|
|
16145
16193
|
// on-disk caches — that omit the field still parse; consumers read
|
|
16146
16194
|
// `bundle.exceptions ?? []`.
|
|
16147
16195
|
exceptions: external_exports.array(ExceptionBundleEntry).optional(),
|
|
16196
|
+
// Installed pack version, keyed by ruleId, for rules in `rules` that came
|
|
16197
|
+
// from a versioned installed pack. Optional so older backends — and older
|
|
16198
|
+
// on-disk caches — that omit the field still parse; consumers fall back to
|
|
16199
|
+
// the rule's own spec version. NOT the bundle version above — see
|
|
16200
|
+
// installedRuleset's ruleVersions for the source of truth.
|
|
16201
|
+
ruleVersions: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
16148
16202
|
customKeywords: external_exports.array(external_exports.string()),
|
|
16149
16203
|
fetchedAt: external_exports.iso.datetime()
|
|
16150
16204
|
}).meta({ id: "PolicyBundle" });
|
|
@@ -16743,10 +16797,14 @@ var PatchInstalledPackRequest = external_exports.object({
|
|
|
16743
16797
|
}).meta({ id: "PatchInstalledPackRequest" });
|
|
16744
16798
|
|
|
16745
16799
|
// ../../packages/schema/src/zod/local.ts
|
|
16746
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
16800
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 4;
|
|
16747
16801
|
var RunMode = external_exports.enum(["standalone"]);
|
|
16748
16802
|
var SimpleDetectionPolicy = external_exports.enum(["redact", "warn"]);
|
|
16749
16803
|
var HistoricalAccess = external_exports.enum(["full", "session-only"]);
|
|
16804
|
+
var ModelJudgeConsent = external_exports.object({
|
|
16805
|
+
acknowledgedAt: external_exports.iso.datetime(),
|
|
16806
|
+
payloadVersion: external_exports.number().int().positive()
|
|
16807
|
+
});
|
|
16750
16808
|
var WorkspaceSettings = external_exports.object({
|
|
16751
16809
|
specVersion: external_exports.number().int().positive().default(WORKSPACE_SETTINGS_SPEC_VERSION),
|
|
16752
16810
|
// Settings files written by earlier releases may carry the retired 'attached'
|
|
@@ -16762,7 +16820,12 @@ var WorkspaceSettings = external_exports.object({
|
|
|
16762
16820
|
// Shares writes.
|
|
16763
16821
|
dataSharesInPlace: external_exports.boolean().default(true),
|
|
16764
16822
|
// Absent until /aka:setup completes; its presence is what "onboarded" means.
|
|
16765
|
-
onboardedAt: external_exports.iso.datetime().optional()
|
|
16823
|
+
onboardedAt: external_exports.iso.datetime().optional(),
|
|
16824
|
+
// Records that the user consented to sending findings to the model API for
|
|
16825
|
+
// the /aka:setup judge, along with the payload-shape version they agreed to.
|
|
16826
|
+
// Absent until granted; a stale payloadVersion means the consent no longer
|
|
16827
|
+
// covers the current payload and must be re-granted.
|
|
16828
|
+
modelJudgeConsent: ModelJudgeConsent.optional()
|
|
16766
16829
|
});
|
|
16767
16830
|
|
|
16768
16831
|
// ../../packages/schema/src/zod/project-files.ts
|
|
@@ -17141,9 +17204,13 @@ var SetupHandoffOffer = external_exports.object({
|
|
|
17141
17204
|
import { execFileSync } from "child_process";
|
|
17142
17205
|
var USE_SHELL = process.platform === "win32";
|
|
17143
17206
|
|
|
17207
|
+
// ../../packages/plugin-sdk/src/config.ts
|
|
17208
|
+
import { existsSync as existsSync3 } from "fs";
|
|
17209
|
+
import { join as join6 } from "path";
|
|
17210
|
+
|
|
17144
17211
|
// ../../packages/persistence/src/database.ts
|
|
17145
17212
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
17146
|
-
import { existsSync, renameSync, rmSync } from "fs";
|
|
17213
|
+
import { existsSync, renameSync as renameSync2, rmSync as rmSync2 } from "fs";
|
|
17147
17214
|
import { join, sep } from "path";
|
|
17148
17215
|
import { DatabaseSync } from "node:sqlite";
|
|
17149
17216
|
|
|
@@ -17151,7 +17218,7 @@ import { DatabaseSync } from "node:sqlite";
|
|
|
17151
17218
|
import { createHash } from "crypto";
|
|
17152
17219
|
|
|
17153
17220
|
// ../../packages/persistence/src/paths.ts
|
|
17154
|
-
import { chmodSync, mkdirSync } from "fs";
|
|
17221
|
+
import { chmodSync, lstatSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs";
|
|
17155
17222
|
|
|
17156
17223
|
// ../../packages/persistence/src/repositories/activity.ts
|
|
17157
17224
|
var LIVE_ACTIVITY_WINDOW_MS = 30 * 6e4;
|
|
@@ -17181,23 +17248,26 @@ import { randomUUID as randomUUID6 } from "crypto";
|
|
|
17181
17248
|
// ../../packages/persistence/src/repositories/shares.ts
|
|
17182
17249
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
17183
17250
|
|
|
17251
|
+
// ../../packages/persistence/src/finding-key.ts
|
|
17252
|
+
import { createHash as createHash3 } from "crypto";
|
|
17253
|
+
|
|
17184
17254
|
// ../../packages/persistence/src/fingerprint.ts
|
|
17185
17255
|
import { createHmac, randomBytes } from "crypto";
|
|
17186
|
-
import {
|
|
17256
|
+
import { readFileSync } from "fs";
|
|
17187
17257
|
import { join as join2 } from "path";
|
|
17188
17258
|
|
|
17189
17259
|
// ../../packages/persistence/src/local-layout.ts
|
|
17190
|
-
import {
|
|
17191
|
-
import {
|
|
17260
|
+
import { renameSync as renameSync3 } from "fs";
|
|
17261
|
+
import { mkdir } from "fs/promises";
|
|
17192
17262
|
import { homedir } from "os";
|
|
17193
17263
|
import { join as join3 } from "path";
|
|
17194
17264
|
|
|
17195
17265
|
// ../../packages/persistence/src/settings.ts
|
|
17196
|
-
import { readFileSync as readFileSync2
|
|
17266
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
17197
17267
|
import { join as join4 } from "path";
|
|
17198
17268
|
|
|
17199
17269
|
// ../../packages/persistence/src/warn-era-cap.ts
|
|
17200
|
-
import { existsSync as existsSync2, writeFileSync as
|
|
17270
|
+
import { existsSync as existsSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
17201
17271
|
import { join as join5 } from "path";
|
|
17202
17272
|
|
|
17203
17273
|
// ../../packages/plugin-sdk/src/provider-env.ts
|
|
@@ -17221,7 +17291,7 @@ var ProviderEnvSchema = external_exports.object(providerEnvShape);
|
|
|
17221
17291
|
// ../../packages/plugin-sdk/src/config-inventory.ts
|
|
17222
17292
|
import { readdirSync, readFileSync as readFileSync4, realpathSync, statSync as statSync2 } from "fs";
|
|
17223
17293
|
import { homedir as homedir2 } from "os";
|
|
17224
|
-
import { basename as basename2, join as
|
|
17294
|
+
import { basename as basename2, join as join8 } from "path";
|
|
17225
17295
|
|
|
17226
17296
|
// ../../packages/detections/src/egress/registry.ts
|
|
17227
17297
|
var EXTRACTOR_VERSION = "1";
|
|
@@ -17932,21 +18002,18 @@ var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].m
|
|
|
17932
18002
|
);
|
|
17933
18003
|
|
|
17934
18004
|
// ../../packages/plugin-sdk/src/repo.ts
|
|
17935
|
-
import { existsSync as
|
|
17936
|
-
import { basename, dirname, isAbsolute, join as
|
|
18005
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3, statSync } from "fs";
|
|
18006
|
+
import { basename, dirname, isAbsolute, join as join7, sep as sep2 } from "path";
|
|
17937
18007
|
|
|
17938
18008
|
// ../../packages/plugin-sdk/src/events.ts
|
|
17939
|
-
import { createHash as
|
|
17940
|
-
|
|
17941
|
-
// ../../packages/plugin-sdk/src/finding-key.ts
|
|
17942
|
-
import { createHash as createHash4 } from "crypto";
|
|
18009
|
+
import { createHash as createHash4, randomUUID as randomUUID9 } from "crypto";
|
|
17943
18010
|
|
|
17944
18011
|
// ../../packages/plugin-sdk/src/inventory-resolver.ts
|
|
17945
18012
|
import { arch, hostname as hostname3, platform, release } from "os";
|
|
17946
18013
|
|
|
17947
18014
|
// ../../packages/plugin-sdk/src/nudge.ts
|
|
17948
|
-
import { mkdirSync as
|
|
17949
|
-
import { join as
|
|
18015
|
+
import { mkdirSync as mkdirSync2, readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "fs";
|
|
18016
|
+
import { join as join9 } from "path";
|
|
17950
18017
|
|
|
17951
18018
|
// ../../packages/plugin-sdk/src/paths.ts
|
|
17952
18019
|
import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
|
|
@@ -17954,8 +18021,8 @@ import { basename as basename3, dirname as dirname2, sep as sep3 } from "path";
|
|
|
17954
18021
|
|
|
17955
18022
|
// ../../packages/plugin-sdk/src/project-files.ts
|
|
17956
18023
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
17957
|
-
import { existsSync as
|
|
17958
|
-
import { basename as basename4, join as
|
|
18024
|
+
import { existsSync as existsSync5, readdirSync as readdirSync3, readFileSync as readFileSync6 } from "fs";
|
|
18025
|
+
import { basename as basename4, join as join10, relative, sep as sep4 } from "path";
|
|
17959
18026
|
|
|
17960
18027
|
// ../../packages/plugin-sdk/src/runtime.ts
|
|
17961
18028
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
@@ -17964,8 +18031,8 @@ import { randomUUID as randomUUID10 } from "crypto";
|
|
|
17964
18031
|
var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
17965
18032
|
|
|
17966
18033
|
// ../../packages/plugin-sdk/src/throttle.ts
|
|
17967
|
-
import { mkdirSync as
|
|
17968
|
-
import { join as
|
|
18034
|
+
import { mkdirSync as mkdirSync3, statSync as statSync3, writeFileSync as writeFileSync4 } from "fs";
|
|
18035
|
+
import { join as join11 } from "path";
|
|
17969
18036
|
|
|
17970
18037
|
// src/command-registry.ts
|
|
17971
18038
|
import { readdirSync as readdirSync4 } from "fs";
|