@archildata/api-types 0.0.67 → 0.0.68

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.
Files changed (2) hide show
  1. package/index.d.ts +43 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3109,6 +3109,36 @@ export interface components {
3109
3109
  * ]
3110
3110
  */
3111
3111
  typesNot?: string[];
3112
+ /**
3113
+ * @description Lines of context to return before each match (`rg -B`). When
3114
+ * either context field is set, the result includes `groups`.
3115
+ * @default 0
3116
+ */
3117
+ contextBefore: number;
3118
+ /**
3119
+ * @description Lines of context to return after each match (`rg -A`). When
3120
+ * either context field is set, the result includes `groups`.
3121
+ * @default 0
3122
+ */
3123
+ contextAfter: number;
3124
+ };
3125
+ /**
3126
+ * @description A run of consecutive lines from one file, as grep prints it with
3127
+ * context: each match with its surrounding lines, with nearby matches
3128
+ * merged into one group so every line appears once.
3129
+ */
3130
+ GrepGroup: {
3131
+ /** @description Path to the file (relative to the disk root). */
3132
+ file: string;
3133
+ lines: components["schemas"]["GrepGroupLine"][];
3134
+ };
3135
+ GrepGroupLine: {
3136
+ /** @description 1-based line number. */
3137
+ line: number;
3138
+ /** @description The line, truncated like `GrepMatch.text`. */
3139
+ text: string;
3140
+ /** @description True for a matching line, false for a context line. */
3141
+ match: boolean;
3112
3142
  };
3113
3143
  GrepMatch: {
3114
3144
  /**
@@ -3121,7 +3151,7 @@ export interface components {
3121
3151
  * @example 142
3122
3152
  */
3123
3153
  line: number;
3124
- /** @description The matching line, truncated at 512 KiB. */
3154
+ /** @description The matching line, truncated at 512 KiB, or shorter with context. */
3125
3155
  text: string;
3126
3156
  };
3127
3157
  /**
@@ -3140,6 +3170,18 @@ export interface components {
3140
3170
  GrepStoppedReason: "completed" | "incomplete" | "max_results" | "deadline" | "list_failed";
3141
3171
  GrepDiskResult: {
3142
3172
  matches: components["schemas"]["GrepMatch"][];
3173
+ /**
3174
+ * @description Matches with their context lines, grouped the way grep prints
3175
+ * them. Present only when `contextBefore` or `contextAfter` is set.
3176
+ * Holds the same matches as `matches`. When the search stops at
3177
+ * `maxResults`, the last group ends up to `contextAfter` lines
3178
+ * after its last kept match, and any matches in those lines are
3179
+ * shown as context, so `groups` holds exactly the matches in
3180
+ * `matches`. Each line of a group
3181
+ * counts toward the response size, so large context and
3182
+ * `maxResults` multiply it.
3183
+ */
3184
+ groups?: components["schemas"]["GrepGroup"][];
3143
3185
  stoppedReason: components["schemas"]["GrepStoppedReason"];
3144
3186
  /** @description Files actually fed to a grep container. */
3145
3187
  filesScanned: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.67",
3
+ "version": "0.0.68",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",