@ancplua/qyl-api-schema 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -4,6 +4,10 @@ The TypeSpec source of truth for Qyl's client-visible product API. This reposito
4
4
  emits the public schema and contract artifacts; it does not implement the server,
5
5
  storage engine, or OTLP receiver.
6
6
 
7
+ Qyl stores and exposes traces and logs. Metrics are accepted and discarded only by
8
+ the collector's OTLP wire-compatibility handlers, so this product contract exposes
9
+ no metric DTOs or routes. Profiles are not supported.
10
+
7
11
  ## Contract pipeline
8
12
 
9
13
  ```text
package/api/routes.tsp CHANGED
@@ -6,8 +6,6 @@ import "../common/errors.tsp";
6
6
  import "../common/pagination.tsp";
7
7
  import "../otel/span.tsp";
8
8
  import "../otel/logs.tsp";
9
- import "../otel/metrics.tsp";
10
- import "../otel/profiles.tsp";
11
9
  import "../models/session.tsp";
12
10
  import "../models/health.tsp";
13
11
 
@@ -19,9 +17,7 @@ using Qyl.Api.Contracts.Common.Errors;
19
17
  using Qyl.Api.Contracts.Common.Pagination;
20
18
  using Qyl.Api.Contracts.OTel.Traces;
21
19
  using Qyl.Api.Contracts.OTel.Logs;
22
- using Qyl.Api.Contracts.OTel.Metrics;
23
20
  using Qyl.Api.Contracts.OTel.Enums;
24
- using Qyl.Api.Contracts.OTel.Profiles;
25
21
  using Qyl.Api.Contracts.Domains.Observe.Session;
26
22
  using Qyl.Api.Contracts.Health;
27
23
 
@@ -108,92 +104,6 @@ interface LogsApi {
108
104
  | InternalServerError;
109
105
  }
110
106
 
111
- // -----------------------------------------------------------------------------
112
- // Metrics
113
- // -----------------------------------------------------------------------------
114
-
115
- @route("/api/v1/metrics")
116
- @tag("Metrics")
117
- @useAuth(QylApiKeyHeaderAuth)
118
- interface MetricsApi {
119
- @doc("List persisted OTLP metric data points without re-aggregating producer values.")
120
- @get
121
- list(
122
- ...ProjectScopeHeader,
123
- @query name?: string,
124
- @query type?: MetricType,
125
- @query serviceName?: string,
126
- @query startTime?: utcDateTime,
127
- @query endTime?: utcDateTime,
128
-
129
- @query
130
- @minValue(1)
131
- @maxValue(1000)
132
- limit?: int32 = 100,
133
-
134
- @query cursor?: string,
135
- ):
136
- | CursorPage<MetricPoint>
137
- | ValidationError
138
- | UnauthorizedError
139
- | InternalServerError;
140
- }
141
-
142
- // -----------------------------------------------------------------------------
143
- // Profiles (OpenTelemetry development signal)
144
- // -----------------------------------------------------------------------------
145
-
146
- @route("/api/v1/profiles")
147
- @tag("Profiles")
148
- @useAuth(QylApiKeyHeaderAuth)
149
- interface ProfilesApi {
150
- @get
151
- list(
152
- ...ProjectScopeHeader,
153
- @query sessionId?: SessionId,
154
- @query traceId?: TraceId,
155
- @query serviceName?: string,
156
- @query sampleType?: string,
157
-
158
- @query
159
- @minValue(1)
160
- @maxValue(1000)
161
- limit?: int32 = 100,
162
- ): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
163
-
164
- @get
165
- @route("/{profileId}")
166
- get(...ProjectScopeHeader, @path profileId: string):
167
- | Profile
168
- | NotFoundError
169
- | UnauthorizedError
170
- | InternalServerError;
171
-
172
- @get
173
- @route("/by-trace/{traceId}")
174
- getByTrace(
175
- ...ProjectScopeHeader,
176
- @path traceId: TraceId,
177
-
178
- @query
179
- @minValue(1)
180
- @maxValue(1000)
181
- limit?: int32 = 100,
182
- ): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
183
-
184
- @get
185
- @route("/by-span/{spanId}")
186
- getBySpan(
187
- ...ProjectScopeHeader,
188
- @path spanId: SpanId,
189
-
190
- @query
191
- @minValue(1)
192
- @maxValue(1000)
193
- limit?: int32 = 100,
194
- ): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
195
- }
196
-
197
107
  // -----------------------------------------------------------------------------
198
108
  // Sessions
199
109
  // -----------------------------------------------------------------------------
package/api/runner.tsp CHANGED
@@ -130,54 +130,6 @@ namespace Qyl.Api.Contracts.Runner {
130
130
  | InternalServerError;
131
131
  }
132
132
 
133
- @route("/runner/mcp/{resource}")
134
- @tag("Runner MCP")
135
- interface RunnerMcpApi {
136
- @doc("Returns the MCP SDK-owned tools/list result without redefining its protocol body.")
137
- @get
138
- @route("/tools")
139
- listTools(@path resource: string):
140
- | unknown
141
- | ForbiddenError
142
- | NotFoundError
143
- | ConflictError
144
- | BadGatewayError
145
- | ServiceUnavailableError
146
- | InternalServerError;
147
-
148
- @doc("Accepts and returns MCP SDK-owned tools/call bodies without redefining the protocol DTOs.")
149
- @post
150
- @route("/tools/call")
151
- callTool(
152
- @path resource: string,
153
- @body request: unknown,
154
- ):
155
- | unknown
156
- | ValidationError
157
- | ForbiddenError
158
- | NotFoundError
159
- | ConflictError
160
- | BadGatewayError
161
- | ServiceUnavailableError
162
- | InternalServerError;
163
-
164
- @doc("Accepts and returns MCP SDK-owned resources/read bodies without redefining the protocol DTOs.")
165
- @post
166
- @route("/resources/read")
167
- readResource(
168
- @path resource: string,
169
- @body request: unknown,
170
- ):
171
- | unknown
172
- | ValidationError
173
- | ForbiddenError
174
- | NotFoundError
175
- | ConflictError
176
- | BadGatewayError
177
- | ServiceUnavailableError
178
- | InternalServerError;
179
- }
180
-
181
133
  @route("/runner/workspaces")
182
134
  @tag("Runner workspaces")
183
135
  @useAuth(RunnerMcpSessionCookieAuth)