@akasecurity/ai-tc-codex 0.9.21 → 0.9.23

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.
@@ -8523,6 +8523,12 @@ var CaptureSighting = object({
8523
8523
  ruleId: string2().min(1),
8524
8524
  category: DetectionCategory
8525
8525
  }).meta({ id: "CaptureSighting" });
8526
+ var REVIEW_VALUES_MAX = 16;
8527
+ var REVIEW_VALUE_MAX_CHARS = 1024;
8528
+ var ReviewValue = object({
8529
+ ruleId: string2().min(1).max(256),
8530
+ value: string2().min(1).max(REVIEW_VALUE_MAX_CHARS)
8531
+ }).meta({ id: "ReviewValue" });
8526
8532
  var EventMetadata = object({
8527
8533
  sessionId: string2().optional(),
8528
8534
  repo: string2().optional(),
@@ -8630,7 +8636,14 @@ var EventMetadata = object({
8630
8636
  scanIncomplete: _enum(["timeout", "unavailable"]).optional(),
8631
8637
  // The sighting tokens in `content`, one entry per distinct token and rule.
8632
8638
  // Set only on a forwarded capture; the locally stored copy holds the values.
8633
- sightings: array(CaptureSighting).optional()
8639
+ sightings: array(CaptureSighting).optional(),
8640
+ // The length of the text this capture was cut from, when its content holds only the first
8641
+ // part of it. Absent when the content is the whole text.
8642
+ contentTruncatedFrom: number2().int().nonnegative().optional(),
8643
+ // The raw value of each finding in this capture, for review by the deployment. Set only on
8644
+ // a forwarded capture from a repository the organization's capture settings name; the
8645
+ // locally stored copy never carries it.
8646
+ reviewValues: array(ReviewValue).max(REVIEW_VALUES_MAX).optional()
8634
8647
  }).meta({ id: "EventMetadata" });
8635
8648
  var Event = object({
8636
8649
  id: guid2(),
@@ -9621,7 +9634,7 @@ var McpTool = object({
9621
9634
  signature: string2(),
9622
9635
  description: string2(),
9623
9636
  write: boolean2(),
9624
- /** Non-null string when tool is dangerous / blocked; null otherwise. */
9637
+ /** What makes the tool dangerous; null when nothing does. */
9625
9638
  risk: string2().nullable()
9626
9639
  }).meta({ id: "McpTool" });
9627
9640
  var AssetFindingRef = object({
@@ -9668,8 +9681,9 @@ var ProjectSensitiveData = object({ items: array(SensitiveDataClass) }).meta({ i
9668
9681
  var ListProjectsResponse = object({ items: array(ProjectSummary) }).meta({ id: "ListProjectsResponse" });
9669
9682
  var InventoryStats = object({
9670
9683
  /**
9671
- * Assets with a flag, plus projects with a finding in the last
9672
- * `PROJECT_FINDINGS_WINDOW_DAYS` days (drives the attention header chip).
9684
+ * Assets with a flag or with an `ATTENTION_TRUST_LEVELS` effective trust,
9685
+ * plus projects with a finding in the last `PROJECT_FINDINGS_WINDOW_DAYS`
9686
+ * days (drives the attention header chip). An asset counts once.
9673
9687
  */
9674
9688
  attention: number2().int().nonnegative(),
9675
9689
  byType: object({
@@ -10192,6 +10206,10 @@ var EgressIngestHit = object({
10192
10206
  */
10193
10207
  credentialRefs: EgressCredentialRefs.optional()
10194
10208
  }).meta({ id: "EgressIngestHit" });
10209
+ var SUPERSEDED_PROJECT_KEYS_MAX = 4;
10210
+ var SupersededProjectKeys = array(
10211
+ string2().regex(/^[0-9a-f]{64}$/, "a superseded key must be a 64-character lowercase hex digest")
10212
+ ).max(SUPERSEDED_PROJECT_KEYS_MAX);
10195
10213
  var EgressIngestRequest = object({
10196
10214
  /**
10197
10215
  * Hash digest of the local `projectKey`, never the plaintext.
@@ -10204,6 +10222,7 @@ var EgressIngestRequest = object({
10204
10222
  * that still has the plaintext to not send.
10205
10223
  */
10206
10224
  projectKey: string2().regex(/^[0-9a-f]{64}$/, "projectKey must be a 64-character lowercase hex digest"),
10225
+ supersededProjectKeys: SupersededProjectKeys.optional(),
10207
10226
  /** Display name only — never keys reconciliation. */
10208
10227
  project: string2(),
10209
10228
  reconcile: EgressReconcile,
@@ -10313,6 +10332,10 @@ var DeviceCommand = object({
10313
10332
  expiresAt: printable(64).min(1)
10314
10333
  }).strict();
10315
10334
  var DeviceCommandPollResponse = object({ command: DeviceCommand.nullable() });
10335
+ var SessionHoldResponse = object({
10336
+ held: boolean2(),
10337
+ reason: printable(500).optional()
10338
+ });
10316
10339
  var DeviceCommandFailureReason = _enum(["scan_failed", "no_projects", "expired"]);
10317
10340
  var DeviceCommandAckBody = discriminatedUnion("outcome", [
10318
10341
  object({
@@ -10375,7 +10398,9 @@ var CredentialSighting = object({
10375
10398
  }).strict().meta({ id: "CredentialSighting" });
10376
10399
  var CredentialSightingsRequest = object({
10377
10400
  sightings: array(CredentialSighting).min(1).max(CREDENTIAL_SIGHTINGS_BATCH_MAX),
10378
- scanId: uuid2().optional()
10401
+ scanId: uuid2().optional(),
10402
+ /** The earlier digests of the one project every sighting in the request names. */
10403
+ supersededProjectKeys: SupersededProjectKeys.optional()
10379
10404
  }).strict().meta({ id: "CredentialSightingsRequest" });
10380
10405
  var CredentialSightingsAck = object({
10381
10406
  accepted: number2().int().nonnegative()
@@ -10506,6 +10531,18 @@ var ModelPolicy = object({
10506
10531
  mode: literal("allowlist"),
10507
10532
  approved: array(string2().min(1).max(512)).max(1e3)
10508
10533
  }).meta({ id: "ModelPolicy" });
10534
+ var TOOL_OUTPUT_FORWARD_MIN_CHARS = 2;
10535
+ var TOOL_OUTPUT_FORWARD_MAX_CHARS = 65536;
10536
+ var CAPTURE_REPOS_MAX = 1e3;
10537
+ var CaptureRepos = array(string2().min(1).max(512)).max(CAPTURE_REPOS_MAX);
10538
+ var CaptureSettings = object({
10539
+ toolOutput: object({
10540
+ maxChars: number2().int().min(TOOL_OUTPUT_FORWARD_MIN_CHARS).max(TOOL_OUTPUT_FORWARD_MAX_CHARS),
10541
+ repos: CaptureRepos.optional()
10542
+ }).optional(),
10543
+ reviewValueRepos: CaptureRepos.optional(),
10544
+ sessionHold: boolean2().optional()
10545
+ }).meta({ id: "CaptureSettings" });
10509
10546
  var PolicyBundle = object({
10510
10547
  version: string2(),
10511
10548
  policies: array(Policy),
@@ -10569,6 +10606,9 @@ var PolicyBundle = object({
10569
10606
  // absent leaves the device's own setting in force, which is the behaviour
10570
10607
  // that predates the field and the safe direction to default.
10571
10608
  redactFallback: RedactFallback.optional(),
10609
+ // Optional so an older backend, and an older on-disk cache, still parses; absent sends what
10610
+ // the machine sent before the field existed.
10611
+ capture: CaptureSettings.optional(),
10572
10612
  customKeywords: array(string2()),
10573
10613
  fetchedAt: iso_exports.datetime()
10574
10614
  }).meta({ id: "PolicyBundle" });
@@ -10577,7 +10617,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
10577
10617
  ...Object.keys(Policy.shape).map((key) => `policies.${key}`),
10578
10618
  ...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
10579
10619
  ...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
10580
- ...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
10620
+ ...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`),
10621
+ ...Object.keys(CaptureSettings.shape).map((key) => `capture.${key}`)
10581
10622
  ].sort().join(",");
10582
10623
  var OBSERVE_ONLY_CATEGORIES = ["config"];
10583
10624
  var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));