@ancplua/qyl-api-schema 0.4.0 → 0.5.1
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 +52 -64
- package/api/routes.tsp +90 -943
- package/api/runner.tsp +99 -0
- package/api/streaming.tsp +13 -299
- package/common/errors.tsp +14 -1
- package/common/pagination.tsp +1 -1
- package/common/types.tsp +2 -41
- package/generated/json-schema/qyl-api-schema.json +3868 -0
- package/generated/openapi/qyl.openapi.json +6919 -0
- package/generated/ts-runtime/api.d.ts +886 -0
- package/generated/ts-runtime/api.js +237 -0
- package/index.tsp +8 -34
- package/models/health.tsp +22 -0
- package/models/mcp-tools.tsp +217 -0
- package/models/runner-mcp.tsp +76 -0
- package/models/runner.tsp +67 -0
- package/models/session.tsp +1 -1
- package/otel/enums.tsp +1 -1
- package/otel/logs.tsp +1 -1
- package/otel/otel-conventions.tsp +0 -1
- package/otel/profiles.tsp +1 -1
- package/otel/resource.tsp +1 -1
- package/otel/span.tsp +9 -6
- package/package.json +56 -36
- package/VERSIONING.md +0 -88
- package/generated/README.md +0 -35
- package/intelligence/causal-rules.tsp +0 -34
- package/intelligence/diagnostic-patterns.tsp +0 -54
- package/intelligence/investigation-strategies.tsp +0 -37
- package/intelligence/main.tsp +0 -17
- package/intelligence/seed/patterns.tsp +0 -171
- package/intelligence/seed/rules.tsp +0 -43
- package/intelligence/seed/strategies.tsp +0 -55
- package/intelligence/signals.tsp +0 -60
- package/models/agent/agent-run.tsp +0 -154
- package/models/agent/tool-call.tsp +0 -122
- package/models/agent/workflow-checkpoint.tsp +0 -50
- package/models/agent/workflow-execution.tsp +0 -136
- package/models/alerting.tsp +0 -436
- package/models/configurator.tsp +0 -433
- package/models/control-graph.tsp +0 -197
- package/models/db.tsp +0 -767
- package/models/deployment.tsp +0 -365
- package/models/error.tsp +0 -433
- package/models/genai.tsp +0 -1305
- package/models/http.tsp +0 -547
- package/models/identity.tsp +0 -213
- package/models/issues.tsp +0 -484
- package/models/log.tsp +0 -140
- package/models/messaging.tsp +0 -304
- package/models/otel-config.tsp +0 -455
- package/models/retention.tsp +0 -240
- package/models/rpc.tsp +0 -309
- package/models/search.tsp +0 -243
- package/models/system.tsp +0 -400
- package/models/test.tsp +0 -346
- package/models/triage.tsp +0 -113
- package/models/workflow.tsp +0 -396
- package/models/workspace.tsp +0 -435
- package/otel/metrics.tsp +0 -358
- package/tspconfig.yaml +0 -49
package/README.md
CHANGED
|
@@ -1,96 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ancplua/qyl-api-schema
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
compatibility layer for qyl ingestion and instrumentation; qyl's API contracts are product contracts
|
|
7
|
-
owned by qyl.
|
|
3
|
+
The TypeSpec source of truth for Qyl's client-visible product API. This repository
|
|
4
|
+
emits the public schema and contract artifacts; it does not implement the server,
|
|
5
|
+
storage engine, or OTLP receiver.
|
|
8
6
|
|
|
9
7
|
## Contract pipeline
|
|
10
8
|
|
|
11
9
|
```text
|
|
12
|
-
|
|
10
|
+
Qyl.OpenTelemetry.SemanticConventions
|
|
13
11
|
|
|
|
14
|
-
|
|
|
15
|
-
| generate.sh -> resolved-registry.json -> emit_typespec_keys.py)
|
|
12
|
+
| generated semantic key projection
|
|
16
13
|
v
|
|
17
14
|
generated/otel-keys.gen.tsp
|
|
18
15
|
|
|
|
19
|
-
| TypeSpec import / lockstep key projection
|
|
20
|
-
v
|
|
21
|
-
@ancplua/qyl-api-schema
|
|
22
|
-
|
|
|
23
|
-
| TypeSpec emit
|
|
24
16
|
v
|
|
25
|
-
|
|
17
|
+
authored Qyl TypeSpec
|
|
26
18
|
|
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
+----> OpenAPI ----> bundled JSON Schema
|
|
20
|
+
+----> Qyl.Api.Contracts
|
|
21
|
+
+----> generated TypeScript contracts
|
|
29
22
|
```
|
|
30
23
|
|
|
31
|
-
The
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`Qyl.OpenTelemetry.SemanticConventions` repo's Weaver pipeline.
|
|
35
|
-
This repo defines qyl domain models, routes, and response contracts under
|
|
36
|
-
`Qyl.Api.Contracts.*`.
|
|
24
|
+
The semantic-key projection is generated from the sibling conventions repository's
|
|
25
|
+
pinned core and GenAI registries. It supplies typed names for telemetry attributes;
|
|
26
|
+
Qyl domain models, routes, responses, stream events, and errors are authored here.
|
|
37
27
|
|
|
38
|
-
##
|
|
28
|
+
## Boundary
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
- Every client-visible Qyl request, response, stream event, and error is defined in
|
|
31
|
+
this repository.
|
|
32
|
+
- OTLP ingestion uses official OpenTelemetry protobuf messages in the runtime and is
|
|
33
|
+
not redefined here.
|
|
34
|
+
- Models under `otel/` used by Qyl routes are client-facing JSON projections, not
|
|
35
|
+
OTLP wire messages.
|
|
36
|
+
- Collector storage rows, ingest batches, query models, and internal projections do
|
|
37
|
+
not cross an HTTP, gRPC, MCP, streaming, or generated-client boundary.
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
world through a client emitter.
|
|
39
|
+
If a runtime shape needs to become client-visible, add it to TypeSpec first,
|
|
40
|
+
regenerate the artifacts, and map the runtime model to the generated contract.
|
|
48
41
|
|
|
49
|
-
##
|
|
42
|
+
## Published artifacts
|
|
50
43
|
|
|
51
|
-
|
|
|
52
|
-
| --- | --- |
|
|
53
|
-
|
|
|
54
|
-
| `
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
| `packaging/Qyl.Api.Contracts.csproj` | Packs `generated/contracts` as the `Qyl.Api.Contracts` NuGet. |
|
|
44
|
+
| Ecosystem | Artifact | Purpose |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| npm/TypeSpec | `@ancplua/qyl-api-schema` | Authored schema for TypeSpec consumers |
|
|
47
|
+
| NuGet | `Qyl.Api.Contracts` | BCL-only generated .NET contracts |
|
|
48
|
+
| Generated | OpenAPI, JSON Schema, TypeScript | Client and validation inputs |
|
|
49
|
+
|
|
50
|
+
`main.tsp` is the local compile entry point and includes emitter routing. `index.tsp`
|
|
51
|
+
is the published TypeSpec entry point and contains only the client-facing contract.
|
|
60
52
|
|
|
61
|
-
##
|
|
53
|
+
## Develop
|
|
62
54
|
|
|
63
55
|
```bash
|
|
64
56
|
npm ci
|
|
65
57
|
npm run lint
|
|
66
58
|
npm run lint:public
|
|
67
59
|
npm run compile
|
|
68
|
-
./build.sh
|
|
60
|
+
./build.sh Check
|
|
69
61
|
```
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
Important generated outputs include:
|
|
72
64
|
|
|
73
65
|
- `generated/openapi/qyl.openapi.json`
|
|
74
|
-
- `generated/json-schema/qyl-api-schema
|
|
66
|
+
- `generated/json-schema/qyl-api-schema`
|
|
75
67
|
- `generated/contracts/**/*.cs`
|
|
76
68
|
- `generated/ts-types/**`
|
|
77
69
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
pushes `Qyl.Api.Contracts` to nuget.org (NuGet/login OIDC) and publishes `@ancplua/qyl-api-schema` to
|
|
94
|
-
npmjs.org (npm trusted publishing + provenance). NuGet pushes first (idempotent) and npm last
|
|
95
|
-
(immutable), so a partial failure re-runs cleanly. See [VERSIONING.md](VERSIONING.md) for how the
|
|
96
|
-
version is derived from the tag. There are no long-lived publish tokens to manage or rotate.
|
|
70
|
+
Generated files are not editing surfaces. OpenAPI comes from the official TypeSpec
|
|
71
|
+
emitter; the bundled JSON Schema is a deterministic projection of its component
|
|
72
|
+
schemas so both artifacts preserve the same wire names. Change TypeSpec or the
|
|
73
|
+
owning generator and regenerate.
|
|
74
|
+
|
|
75
|
+
## Publish
|
|
76
|
+
|
|
77
|
+
GitHub Actions publishes both registries through OIDC trusted publishing. A release
|
|
78
|
+
tag supplies one version for npm and NuGet. The workflow validates and packs first,
|
|
79
|
+
publishes in an ordered restartable sequence, waits for indexed artifacts, and then
|
|
80
|
+
smokes clean consumers. No long-lived npm or NuGet token is stored.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
Apache-2.0
|