@ancplua/qyl-api-schema 11.6.0 → 12.1.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.
@@ -0,0 +1,62 @@
1
+ import "./types.tsp";
2
+ using TypeSpec.OpenAPI;
3
+ namespace Qyl.Api.Contracts.Common;
4
+
5
+ @doc("Opaque project-scoped failure fingerprint issued and verified by the collector.")
6
+ @minLength(1)
7
+ @maxLength(512)
8
+ scalar FailureId extends string;
9
+
10
+ @doc("Signed self-contained project-scoped verification token issued by the collector.")
11
+ @minLength(1)
12
+ @maxLength(8192)
13
+ scalar VerifyId extends string;
14
+
15
+ @doc("A comparison operand preserves booleans and numbers rather than coercing them to strings.")
16
+ union MatcherValue { text: string, number: float64, boolean: boolean }
17
+
18
+ @doc("Supported predicate operators; equality and prefix retain their existing meaning.")
19
+ enum MatcherOp { eq, neq, `in`, prefix, contains, exists, gt, gte, lt, lte }
20
+
21
+ @doc("Attribute namespace in which the predicate is evaluated.")
22
+ enum MatcherScope { span, resource, log }
23
+
24
+ @doc("TelemetryMatcher contract.")
25
+ model TelemetryMatcher {
26
+ @minLength(1)
27
+ @maxLength(256)
28
+ key: string;
29
+ `op`: MatcherOp;
30
+ value?: MatcherValue;
31
+ @minItems(1)
32
+ @maxItems(256)
33
+ values?: MatcherValue[];
34
+ scope?: MatcherScope;
35
+ }
36
+
37
+ @doc("Absolute half-open window applied by the collector.")
38
+ model ToolWindow {
39
+ @encodedName("application/json", "start_time")
40
+ startTime: utcDateTime;
41
+ @encodedName("application/json", "end_time")
42
+ endTime: utcDateTime;
43
+ }
44
+
45
+ @doc("Scan coverage; unknown counts are null, never an invented zero.")
46
+ model ToolCoverage {
47
+ examined: Count | null;
48
+ matched: Count | null;
49
+ returned: Count | null;
50
+ truncated: boolean;
51
+ @encodedName("application/json", "scan_complete")
52
+ scanComplete: boolean;
53
+ @encodedName("application/json", "as_of")
54
+ asOf: utcDateTime;
55
+ }
56
+
57
+ @doc("ToolReadContext contract.")
58
+ model ToolReadContext {
59
+ window: ToolWindow;
60
+ coverage: ToolCoverage;
61
+ }
62
+
package/common/types.tsp CHANGED
@@ -159,10 +159,18 @@ scalar Temperature extends float64;
159
159
  @maxLength(64)
160
160
  scalar Sha256Hash extends string;
161
161
 
162
+ @doc("""
163
+ Opaque pagination cursor. Pass the `next_cursor` of one page to receive the
164
+ next page of the same query. Its content is not part of the contract and
165
+ must not be parsed or built by a client.
166
+ """)
167
+ scalar Cursor extends string;
168
+
162
169
  // The revision is a canonical digest of the semantic OpenAPI projection and the
163
170
  // exported telemetry-key projection, not a package version. Presentation-only
164
- // fields do not change it. Truncated to 16 hex characters because it is compared
165
- // for equality, never used as a security boundary.
171
+ // fields and the release version stamped into `info.version` do not change it.
172
+ // Truncated to 16 hex characters because it is compared for equality, never used
173
+ // as a security boundary.
166
174
  @doc("Deterministic revision of the generated API contract: 'sha256:' followed by the first 16 hex characters of its canonical semantic digest.")
167
175
  @pattern("^sha256:[a-f0-9]{16}$")
168
176
  @minLength(23)