@akasecurity/ai-tc-copilot 0.9.20 → 0.9.22

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.
@@ -8526,6 +8526,12 @@ var CaptureSighting = object({
8526
8526
  ruleId: string2().min(1),
8527
8527
  category: DetectionCategory
8528
8528
  }).meta({ id: "CaptureSighting" });
8529
+ var REVIEW_VALUES_MAX = 16;
8530
+ var REVIEW_VALUE_MAX_CHARS = 1024;
8531
+ var ReviewValue = object({
8532
+ ruleId: string2().min(1).max(256),
8533
+ value: string2().min(1).max(REVIEW_VALUE_MAX_CHARS)
8534
+ }).meta({ id: "ReviewValue" });
8529
8535
  var EventMetadata = object({
8530
8536
  sessionId: string2().optional(),
8531
8537
  repo: string2().optional(),
@@ -8633,7 +8639,14 @@ var EventMetadata = object({
8633
8639
  scanIncomplete: _enum(["timeout", "unavailable"]).optional(),
8634
8640
  // The sighting tokens in `content`, one entry per distinct token and rule.
8635
8641
  // Set only on a forwarded capture; the locally stored copy holds the values.
8636
- sightings: array(CaptureSighting).optional()
8642
+ sightings: array(CaptureSighting).optional(),
8643
+ // The length of the text this capture was cut from, when its content holds only the first
8644
+ // part of it. Absent when the content is the whole text.
8645
+ contentTruncatedFrom: number2().int().nonnegative().optional(),
8646
+ // The raw value of each finding in this capture, for review by the deployment. Set only on
8647
+ // a forwarded capture from a repository the organization's capture settings name; the
8648
+ // locally stored copy never carries it.
8649
+ reviewValues: array(ReviewValue).max(REVIEW_VALUES_MAX).optional()
8637
8650
  }).meta({ id: "EventMetadata" });
8638
8651
  var Event = object({
8639
8652
  id: guid2(),
@@ -9624,7 +9637,7 @@ var McpTool = object({
9624
9637
  signature: string2(),
9625
9638
  description: string2(),
9626
9639
  write: boolean2(),
9627
- /** Non-null string when tool is dangerous / blocked; null otherwise. */
9640
+ /** What makes the tool dangerous; null when nothing does. */
9628
9641
  risk: string2().nullable()
9629
9642
  }).meta({ id: "McpTool" });
9630
9643
  var AssetFindingRef = object({
@@ -9671,8 +9684,9 @@ var ProjectSensitiveData = object({ items: array(SensitiveDataClass) }).meta({ i
9671
9684
  var ListProjectsResponse = object({ items: array(ProjectSummary) }).meta({ id: "ListProjectsResponse" });
9672
9685
  var InventoryStats = object({
9673
9686
  /**
9674
- * Assets with a flag, plus projects with a finding in the last
9675
- * `PROJECT_FINDINGS_WINDOW_DAYS` days (drives the attention header chip).
9687
+ * Assets with a flag or with an `ATTENTION_TRUST_LEVELS` effective trust,
9688
+ * plus projects with a finding in the last `PROJECT_FINDINGS_WINDOW_DAYS`
9689
+ * days (drives the attention header chip). An asset counts once.
9676
9690
  */
9677
9691
  attention: number2().int().nonnegative(),
9678
9692
  byType: object({
@@ -10195,6 +10209,10 @@ var EgressIngestHit = object({
10195
10209
  */
10196
10210
  credentialRefs: EgressCredentialRefs.optional()
10197
10211
  }).meta({ id: "EgressIngestHit" });
10212
+ var SUPERSEDED_PROJECT_KEYS_MAX = 4;
10213
+ var SupersededProjectKeys = array(
10214
+ string2().regex(/^[0-9a-f]{64}$/, "a superseded key must be a 64-character lowercase hex digest")
10215
+ ).max(SUPERSEDED_PROJECT_KEYS_MAX);
10198
10216
  var EgressIngestRequest = object({
10199
10217
  /**
10200
10218
  * Hash digest of the local `projectKey`, never the plaintext.
@@ -10207,6 +10225,7 @@ var EgressIngestRequest = object({
10207
10225
  * that still has the plaintext to not send.
10208
10226
  */
10209
10227
  projectKey: string2().regex(/^[0-9a-f]{64}$/, "projectKey must be a 64-character lowercase hex digest"),
10228
+ supersededProjectKeys: SupersededProjectKeys.optional(),
10210
10229
  /** Display name only — never keys reconciliation. */
10211
10230
  project: string2(),
10212
10231
  reconcile: EgressReconcile,
@@ -10316,6 +10335,10 @@ var DeviceCommand = object({
10316
10335
  expiresAt: printable(64).min(1)
10317
10336
  }).strict();
10318
10337
  var DeviceCommandPollResponse = object({ command: DeviceCommand.nullable() });
10338
+ var SessionHoldResponse = object({
10339
+ held: boolean2(),
10340
+ reason: printable(500).optional()
10341
+ });
10319
10342
  var DeviceCommandFailureReason = _enum(["scan_failed", "no_projects", "expired"]);
10320
10343
  var DeviceCommandAckBody = discriminatedUnion("outcome", [
10321
10344
  object({
@@ -10378,7 +10401,9 @@ var CredentialSighting = object({
10378
10401
  }).strict().meta({ id: "CredentialSighting" });
10379
10402
  var CredentialSightingsRequest = object({
10380
10403
  sightings: array(CredentialSighting).min(1).max(CREDENTIAL_SIGHTINGS_BATCH_MAX),
10381
- scanId: uuid2().optional()
10404
+ scanId: uuid2().optional(),
10405
+ /** The earlier digests of the one project every sighting in the request names. */
10406
+ supersededProjectKeys: SupersededProjectKeys.optional()
10382
10407
  }).strict().meta({ id: "CredentialSightingsRequest" });
10383
10408
  var CredentialSightingsAck = object({
10384
10409
  accepted: number2().int().nonnegative()
@@ -10509,6 +10534,18 @@ var ModelPolicy = object({
10509
10534
  mode: literal("allowlist"),
10510
10535
  approved: array(string2().min(1).max(512)).max(1e3)
10511
10536
  }).meta({ id: "ModelPolicy" });
10537
+ var TOOL_OUTPUT_FORWARD_MIN_CHARS = 2;
10538
+ var TOOL_OUTPUT_FORWARD_MAX_CHARS = 65536;
10539
+ var CAPTURE_REPOS_MAX = 1e3;
10540
+ var CaptureRepos = array(string2().min(1).max(512)).max(CAPTURE_REPOS_MAX);
10541
+ var CaptureSettings = object({
10542
+ toolOutput: object({
10543
+ maxChars: number2().int().min(TOOL_OUTPUT_FORWARD_MIN_CHARS).max(TOOL_OUTPUT_FORWARD_MAX_CHARS),
10544
+ repos: CaptureRepos.optional()
10545
+ }).optional(),
10546
+ reviewValueRepos: CaptureRepos.optional(),
10547
+ sessionHold: boolean2().optional()
10548
+ }).meta({ id: "CaptureSettings" });
10512
10549
  var PolicyBundle = object({
10513
10550
  version: string2(),
10514
10551
  policies: array(Policy),
@@ -10572,6 +10609,9 @@ var PolicyBundle = object({
10572
10609
  // absent leaves the device's own setting in force, which is the behaviour
10573
10610
  // that predates the field and the safe direction to default.
10574
10611
  redactFallback: RedactFallback.optional(),
10612
+ // Optional so an older backend, and an older on-disk cache, still parses; absent sends what
10613
+ // the machine sent before the field existed.
10614
+ capture: CaptureSettings.optional(),
10575
10615
  customKeywords: array(string2()),
10576
10616
  fetchedAt: iso_exports.datetime()
10577
10617
  }).meta({ id: "PolicyBundle" });
@@ -10580,7 +10620,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
10580
10620
  ...Object.keys(Policy.shape).map((key) => `policies.${key}`),
10581
10621
  ...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
10582
10622
  ...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
10583
- ...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
10623
+ ...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`),
10624
+ ...Object.keys(CaptureSettings.shape).map((key) => `capture.${key}`)
10584
10625
  ].sort().join(",");
10585
10626
  var OBSERVE_ONLY_CATEGORIES = ["config"];
10586
10627
  var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
@@ -10941,7 +10982,7 @@ var DetectedWebAccounts = object({
10941
10982
  var DetectedWebAccountsEnvelope = DetectedWebAccounts.extend({ accounts: array(unknown()) });
10942
10983
 
10943
10984
  // ../../packages/schema/src/zod/local.ts
10944
- var WORKSPACE_SETTINGS_SPEC_VERSION = 10;
10985
+ var WORKSPACE_SETTINGS_SPEC_VERSION = 11;
10945
10986
  var RunMode = _enum(["standalone", "attached"]);
10946
10987
  var ControlPlaneConnection = object({
10947
10988
  endpoint: string2().min(1),
@@ -11043,6 +11084,15 @@ var BodyRetention = object({
11043
11084
  // candidate set that is already bounded by "delivered, or never owed".
11044
11085
  retainDays: number2().int().min(1).max(3650).default(BODY_RETENTION_DEFAULT_DAYS)
11045
11086
  }).meta({ id: "BodyRetention" });
11087
+ var MAX_PROTECTED_PATH_ENTRIES = 256;
11088
+ var MAX_PROTECTED_PATH_ENTRY_CHARS = 1024;
11089
+ var ProtectedPathEntry = string2().trim().min(1).max(MAX_PROTECTED_PATH_ENTRY_CHARS);
11090
+ var ProtectedPaths = array(unknown()).transform(
11091
+ (entries) => entries.flatMap((entry) => {
11092
+ const parsed = ProtectedPathEntry.safeParse(entry);
11093
+ return parsed.success ? [parsed.data] : [];
11094
+ }).slice(0, MAX_PROTECTED_PATH_ENTRIES)
11095
+ );
11046
11096
  var WorkspaceSettings = object({
11047
11097
  specVersion: number2().int().positive().default(WORKSPACE_SETTINGS_SPEC_VERSION),
11048
11098
  runMode: RunMode.default("standalone"),
@@ -11133,7 +11183,18 @@ var WorkspaceSettings = object({
11133
11183
  bodyRetention: BodyRetention.default({
11134
11184
  enabled: false,
11135
11185
  retainDays: BODY_RETENTION_DEFAULT_DAYS
11136
- })
11186
+ }),
11187
+ // Folders and file name globs whose files a tool call may not touch
11188
+ // unflagged: a Read, Grep, Glob or Bash naming one becomes a finding under
11189
+ // the command-risk pack's policy. Absent means none are protected, and
11190
+ // protectedPathsOf is the one reader.
11191
+ //
11192
+ // A bad entry is dropped on its own (see ProtectedPaths); `.catch(undefined)`
11193
+ // reads a value that is not a list at all as no list. A settings.json that
11194
+ // fails this schema reads as the unonboarded defaults, and the next save
11195
+ // writes those back over it, so a malformed value must not cost every other
11196
+ // setting. Not a ManagedSettingKey.
11197
+ protectedPaths: ProtectedPaths.optional().catch(void 0)
11137
11198
  });
11138
11199
 
11139
11200
  // ../../packages/schema/src/zod/agent-scope.ts
@@ -11297,6 +11358,9 @@ var ConfigInventoryAck = object({
11297
11358
  accepted: number2().int().nonnegative()
11298
11359
  });
11299
11360
 
11361
+ // ../../packages/schema/src/zod/credential-status.ts
11362
+ var CredentialStatus = _enum(["rotation_overdue", "exposed"]).meta({ id: "CredentialStatus" });
11363
+
11300
11364
  // ../../packages/schema/src/zod/registry.ts
11301
11365
  var Namespace = string2().regex(/^[a-z][a-z0-9-]*$/);
11302
11366
  var PackId = string2().regex(/^[a-z][a-z0-9-]*$/);