@ancplua/qyl-api-schema 8.0.0 → 9.0.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.
@@ -303,154 +303,6 @@ export const WorkbenchTransportKindValues = {
303
303
  "streamableHttp": "streamable_http",
304
304
  "builtin": "builtin",
305
305
  };
306
- export const WorkflowRunStatusValues = {
307
- "active": "active",
308
- "completed": "completed",
309
- "failed": "failed",
310
- "interrupted": "interrupted",
311
- };
312
- export const WorkflowContentEncodingValues = {
313
- "utf8": "utf8",
314
- "base64": "base64",
315
- };
316
- export const WorkflowJournalEventKindValues = {
317
- "runCreated": "run_created",
318
- "runCompleted": "run_completed",
319
- "threadStarted": "thread_started",
320
- "threadResumed": "thread_resumed",
321
- "turnStarted": "turn_started",
322
- "turnCompleted": "turn_completed",
323
- "turnInterrupted": "turn_interrupted",
324
- "attemptStarted": "attempt_started",
325
- "attemptCompleted": "attempt_completed",
326
- "agentSpawned": "agent_spawned",
327
- "agentStarted": "agent_started",
328
- "agentCompleted": "agent_completed",
329
- "messageSent": "message_sent",
330
- "messageReceived": "message_received",
331
- "waitStarted": "wait_started",
332
- "waitCompleted": "wait_completed",
333
- "joined": "joined",
334
- "itemStarted": "item_started",
335
- "itemCompleted": "item_completed",
336
- "toolStarted": "tool_started",
337
- "toolCompleted": "tool_completed",
338
- "approvalRequested": "approval_requested",
339
- "approvalResolved": "approval_resolved",
340
- "contentCaptured": "content_captured",
341
- "fileWritten": "file_written",
342
- "controlRequested": "control_requested",
343
- "controlAccepted": "control_accepted",
344
- "controlApplied": "control_applied",
345
- "controlRejected": "control_rejected",
346
- "controlFailed": "control_failed",
347
- };
348
- export const WorkflowNodeKindValues = {
349
- "run": "run",
350
- "attempt": "attempt",
351
- "turn": "turn",
352
- "agent": "agent",
353
- "toolCall": "tool_call",
354
- "message": "message",
355
- "wait": "wait",
356
- "gate": "gate",
357
- "resource": "resource",
358
- };
359
- export const WorkflowEdgeKindValues = {
360
- "data": "data",
361
- "control": "control",
362
- "conflict": "conflict",
363
- "resource": "resource",
364
- "gate": "gate",
365
- "temporal": "temporal",
366
- };
367
- export const WorkflowControlActionValues = {
368
- "steer": "steer",
369
- "interrupt": "interrupt",
370
- "resume": "resume",
371
- };
372
- export const WorkflowControlStatusValues = {
373
- "requested": "requested",
374
- "accepted": "accepted",
375
- "applied": "applied",
376
- "rejected": "rejected",
377
- "failed": "failed",
378
- };
379
- export const WorkflowCursorKindValues = {
380
- "node": "node",
381
- "edge": "edge",
382
- };
383
- export const WorkflowCursorFailureReasonValues = {
384
- "invalid": "invalid",
385
- "wrongRun": "wrong_run",
386
- "wrongGeneration": "wrong_generation",
387
- "stale": "stale",
388
- };
389
- export const WorkflowAttemptStatusValues = {
390
- "pending": "pending",
391
- "running": "running",
392
- "succeeded": "succeeded",
393
- "failed": "failed",
394
- "interrupted": "interrupted",
395
- };
396
- export const WorkflowAgentStatusValues = {
397
- "pending": "pending",
398
- "running": "running",
399
- "waiting": "waiting",
400
- "succeeded": "succeeded",
401
- "failed": "failed",
402
- "interrupted": "interrupted",
403
- };
404
- export const WorkflowToolCallStatusValues = {
405
- "requested": "requested",
406
- "running": "running",
407
- "succeeded": "succeeded",
408
- "failed": "failed",
409
- "rejected": "rejected",
410
- };
411
- export const AgentDiagnosticValueTypeValues = {
412
- "null": "null",
413
- "boolean": "boolean",
414
- "integer": "integer",
415
- "number": "number",
416
- "string": "string",
417
- "json": "json",
418
- };
419
- export const AgentDiagnosticClassificationValues = {
420
- "public": "public",
421
- "internal": "internal",
422
- "sensitive": "sensitive",
423
- "secret": "secret",
424
- };
425
- export const AgentDiagnosticOperatorValues = {
426
- "equal": "equal",
427
- "notEqual": "not_equal",
428
- "exists": "exists",
429
- "typeIs": "type_is",
430
- "contains": "contains",
431
- "lessThan": "less_than",
432
- "greaterThan": "greater_than",
433
- };
434
- export const AgentDiagnosticCheckOutcomeValues = {
435
- "pass": "pass",
436
- "fail": "fail",
437
- "unknownResult": "unknown",
438
- };
439
- export const AgentDiagnosticExtensionIdValues = {
440
- "snapshot": "qyl.agent.diagnostic.snapshot",
441
- };
442
- export const AgentDiagnosticPhaseValues = {
443
- "input": "input",
444
- "output": "output",
445
- "error": "error",
446
- "checkpoint": "checkpoint",
447
- };
448
- export const AgentDiagnosticOutcomeValues = {
449
- "pass": "pass",
450
- "fail": "fail",
451
- "unknownResult": "unknown",
452
- "notEvaluated": "not_evaluated",
453
- };
454
306
  export const McpDataModeValues = {
455
307
  "live": "live",
456
308
  "demo": "demo",
@@ -468,4 +320,4 @@ export const FetchTelemetryViewValues = {
468
320
  };
469
321
  // --- contract revision (scripts/emit-contract-revision.mjs) ---
470
322
  /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
471
- export const CONTRACT_REVISION = "sha256:64c464569005a485";
323
+ export const CONTRACT_REVISION = "sha256:d1c859393b628164";
package/index.tsp CHANGED
@@ -22,12 +22,9 @@ import "./models/health.tsp";
22
22
  import "./models/metrics.tsp";
23
23
  import "./models/runner.tsp";
24
24
  import "./models/workbench.tsp";
25
- import "./models/workflow.tsp";
26
- import "./models/diagnostics.tsp";
27
25
  import "./models/mcp-tools.tsp";
28
26
 
29
27
  import "./api/routes.tsp";
30
28
  import "./api/streaming.tsp";
31
29
  import "./api/runner.tsp";
32
30
  import "./api/workbench.tsp";
33
- import "./api/workflow.tsp";
@@ -1,16 +1,12 @@
1
1
  import "../common/types.tsp";
2
2
  import "../otel/logs.tsp";
3
3
  import "../otel/span.tsp";
4
- import "./diagnostics.tsp";
5
4
  import "./session.tsp";
6
- import "./workflow.tsp";
7
5
 
8
6
  using Qyl.Api.Contracts.Common;
9
- using Qyl.Api.Contracts.Diagnostics;
10
7
  using Qyl.Api.Contracts.Domains.Observe.Session;
11
8
  using Qyl.Api.Contracts.OTel.Logs;
12
9
  using Qyl.Api.Contracts.OTel.Traces;
13
- using Qyl.Api.Contracts.Workflow;
14
10
 
15
11
  namespace Qyl.Api.Contracts.Mcp.Tools;
16
12
 
@@ -220,258 +216,6 @@ model FetchTelemetryOutput {
220
216
  mode: McpDataMode;
221
217
  }
222
218
 
223
- @doc("Input for get_active_workflow_run.")
224
- model GetActiveWorkflowRunInput {}
225
-
226
- @doc("Structured output for get_active_workflow_run.")
227
- model GetActiveWorkflowRunOutput {
228
- active: boolean;
229
-
230
- @encodedName("application/json", "live_controls_available")
231
- liveControlsAvailable: boolean;
232
-
233
- @encodedName("application/json", "run_id")
234
- runId?: WorkflowRunId;
235
-
236
- @encodedName("application/json", "thread_id")
237
- threadId?: string;
238
-
239
- @encodedName("application/json", "started_at")
240
- startedAt?: utcDateTime;
241
- }
242
-
243
- @doc("One dynamically named JSON value submitted for protected diagnostic capture. Classification is applied before the frame leaves the observer bridge.")
244
- model RecordDiagnosticSnapshotVariableInput {
245
- name: AgentDiagnosticVariableName;
246
- classification: AgentDiagnosticClassification;
247
- value: unknown | null;
248
- }
249
-
250
- @doc("One structural diagnostic check submitted for evaluation. equal, not_equal, contains, less_than, and greater_than require expected and forbid expected_type; type_is requires expected_type and forbids expected; exists forbids both.")
251
- model RecordDiagnosticSnapshotCheckInput {
252
- @encodedName("application/json", "check_id")
253
- checkId: AgentDiagnosticCheckId;
254
-
255
- operator: AgentDiagnosticOperator;
256
- actual: AgentDiagnosticVariableName;
257
- expected?: AgentDiagnosticVariableName;
258
-
259
- @encodedName("application/json", "expected_type")
260
- expectedType?: AgentDiagnosticValueType;
261
- }
262
-
263
- @doc("Input for record_diagnostic_snapshot. Reuse the same snapshot_id and semantic payload when retrying; changing the payload under an existing snapshot_id is a conflict.")
264
- model RecordDiagnosticSnapshotInput {
265
- @encodedName("application/json", "snapshot_id")
266
- snapshotId: AgentDiagnosticSnapshotId;
267
-
268
- @encodedName("application/json", "probe_id")
269
- probeId: AgentDiagnosticProbeId;
270
-
271
- phase: AgentDiagnosticPhase;
272
-
273
- @maxItems(64)
274
- variables: RecordDiagnosticSnapshotVariableInput[];
275
-
276
- @maxItems(64)
277
- checks?: RecordDiagnosticSnapshotCheckInput[] = #[];
278
- }
279
-
280
- @doc("Structured output for record_diagnostic_snapshot.")
281
- model RecordDiagnosticSnapshotOutput {
282
- recorded: boolean;
283
- code: string;
284
-
285
- @encodedName("application/json", "snapshot_id")
286
- snapshotId: AgentDiagnosticSnapshotId;
287
-
288
- @encodedName("application/json", "event_id")
289
- eventId?: WorkflowEventId;
290
-
291
- field?: string;
292
- }
293
-
294
- @doc("Input for list_workflow_runs.")
295
- model ListWorkflowRunsInput {
296
- status?: WorkflowRunStatus;
297
-
298
- cursor?: WorkflowRunCursor;
299
-
300
- @minValue(1)
301
- @maxValue(100)
302
- limit?: int32 = 20;
303
- }
304
-
305
- @doc("Structured output for list_workflow_runs.")
306
- model ListWorkflowRunsOutput {
307
- runs: WorkflowRun[];
308
-
309
- @encodedName("application/json", "next_cursor")
310
- nextCursor?: WorkflowRunCursor;
311
-
312
- @encodedName("application/json", "has_more")
313
- hasMore: boolean;
314
-
315
- mode: McpDataMode;
316
- }
317
-
318
- @doc("Input for get_workflow_graph.")
319
- model GetWorkflowGraphInput {
320
- @encodedName("application/json", "run_id")
321
- runId: WorkflowRunId;
322
-
323
- @doc("Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it.")
324
- @encodedName("application/json", "node_cursor")
325
- nodeCursor?: WorkflowNodeCursor;
326
-
327
- @encodedName("application/json", "node_limit")
328
- @minValue(1)
329
- @maxValue(1000)
330
- nodeLimit?: int32 = 250;
331
-
332
- @doc("Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it.")
333
- @encodedName("application/json", "edge_cursor")
334
- edgeCursor?: WorkflowEdgeCursor;
335
-
336
- @encodedName("application/json", "edge_limit")
337
- @minValue(1)
338
- @maxValue(2000)
339
- edgeLimit?: int32 = 500;
340
- }
341
-
342
- @doc("Structured output for get_workflow_graph.")
343
- model GetWorkflowGraphOutput {
344
- graph: WorkflowGraphSnapshot;
345
- mode: McpDataMode;
346
- }
347
-
348
- @doc("Input for display_workflow_graph. Omit run_id to select the most recent run.")
349
- model DisplayWorkflowGraphInput {
350
- @encodedName("application/json", "run_id")
351
- runId?: WorkflowRunId;
352
-
353
- @doc("Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it.")
354
- @encodedName("application/json", "node_cursor")
355
- nodeCursor?: WorkflowNodeCursor;
356
-
357
- @encodedName("application/json", "node_limit")
358
- @minValue(1)
359
- @maxValue(1000)
360
- nodeLimit?: int32 = 250;
361
-
362
- @doc("Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it.")
363
- @encodedName("application/json", "edge_cursor")
364
- edgeCursor?: WorkflowEdgeCursor;
365
-
366
- @encodedName("application/json", "edge_limit")
367
- @minValue(1)
368
- @maxValue(2000)
369
- edgeLimit?: int32 = 500;
370
- }
371
-
372
- @doc("Structured output for display_workflow_graph.")
373
- model DisplayWorkflowGraphOutput {
374
- graph: WorkflowGraphSnapshot;
375
-
376
- @encodedName("application/json", "live_controls_available")
377
- liveControlsAvailable: boolean;
378
-
379
- mode: McpDataMode;
380
- }
381
-
382
- @doc("Input for the app-only fetch_workflow_graph_updates tool.")
383
- model FetchWorkflowGraphUpdatesInput {
384
- @encodedName("application/json", "run_id")
385
- runId: WorkflowRunId;
386
-
387
- @encodedName("application/json", "after_sequence")
388
- afterSequence: WorkflowJournalPosition;
389
-
390
- @minValue(1)
391
- @maxValue(1000)
392
- limit?: int32 = 250;
393
-
394
- @encodedName("application/json", "wait_ms")
395
- @minValue(0)
396
- @maxValue(30000)
397
- waitMs?: int32 = 20000;
398
-
399
- @doc("Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it.")
400
- @encodedName("application/json", "node_cursor")
401
- nodeCursor?: WorkflowNodeCursor;
402
-
403
- @encodedName("application/json", "node_limit")
404
- @minValue(1)
405
- @maxValue(1000)
406
- nodeLimit?: int32 = 250;
407
-
408
- @doc("Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it.")
409
- @encodedName("application/json", "edge_cursor")
410
- edgeCursor?: WorkflowEdgeCursor;
411
-
412
- @encodedName("application/json", "edge_limit")
413
- @minValue(1)
414
- @maxValue(2000)
415
- edgeLimit?: int32 = 500;
416
-
417
- @doc("Optional captured payload to retrieve lazily for the selected run.")
418
- @encodedName("application/json", "content_ref")
419
- contentRef?: WorkflowContentRef;
420
- }
421
-
422
- @doc("Structured output for the app-only fetch_workflow_graph_updates tool.")
423
- model FetchWorkflowGraphUpdatesOutput {
424
- page: WorkflowEventPage;
425
- graph?: WorkflowGraphSnapshot;
426
- content?: WorkflowContent;
427
- mode: McpDataMode;
428
- }
429
-
430
- @doc("Input for inspect_workflow_events.")
431
- model InspectWorkflowEventsInput {
432
- @encodedName("application/json", "run_id")
433
- runId: WorkflowRunId;
434
-
435
- @encodedName("application/json", "after_sequence")
436
- afterSequence: WorkflowJournalPosition;
437
-
438
- @minValue(1)
439
- @maxValue(1000)
440
- limit?: int32 = 250;
441
-
442
- @doc("Optional captured payload to retrieve lazily for the selected run.")
443
- @encodedName("application/json", "content_ref")
444
- contentRef?: WorkflowContentRef;
445
- }
446
-
447
- @doc("Structured output for inspect_workflow_events.")
448
- model InspectWorkflowEventsOutput {
449
- page: WorkflowEventPage;
450
- content?: WorkflowContent;
451
- mode: McpDataMode;
452
- }
453
-
454
- @doc("Input for control_workflow_run.")
455
- model ControlWorkflowRunInput {
456
- @encodedName("application/json", "run_id")
457
- runId: WorkflowRunId;
458
-
459
- action: WorkflowControlAction;
460
-
461
- @encodedName("application/json", "idempotency_key")
462
- @minLength(1)
463
- @maxLength(160)
464
- idempotencyKey: string;
465
-
466
- @maxLength(32768)
467
- input?: string;
468
- }
469
-
470
- @doc("Structured output for control_workflow_run.")
471
- model ControlWorkflowRunOutput {
472
- command: WorkflowControlCommand;
473
- }
474
-
475
219
  @doc("Aggregate MCP traffic statistics shown by qyl.mcp.")
476
220
  model McpDashboardStats {
477
221
  window: McpDashboardWindow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancplua/qyl-api-schema",
3
- "version": "8.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -58,7 +58,6 @@
58
58
  "api/routes.tsp",
59
59
  "api/runner.tsp",
60
60
  "api/streaming.tsp",
61
- "api/workflow.tsp",
62
61
  "api/workbench.tsp",
63
62
  "common/errors.tsp",
64
63
  "common/pagination.tsp",
@@ -66,8 +65,6 @@
66
65
  "models/health.tsp",
67
66
  "models/runner.tsp",
68
67
  "models/workbench.tsp",
69
- "models/workflow.tsp",
70
- "models/diagnostics.tsp",
71
68
  "models/mcp-tools.tsp",
72
69
  "models/session.tsp",
73
70
  "otel/enums.tsp",
@@ -96,11 +93,10 @@
96
93
  "build:ts-runtime": "tsc -p tsconfig.contracts.json",
97
94
  "build:zod-runtime": "tsc -p tsconfig.zod.json",
98
95
  "build:json-schema": "node scripts/openapi-to-json-schema.mjs",
99
- "emit:mcp-tool-schemas": "node scripts/emit-mcp-tool-schemas.mjs",
100
96
  "emit:contract-revision": "node scripts/emit-contract-revision.mjs",
101
97
  "prepare": "npm run build:emitters",
102
98
  "prepack": "npm run compile",
103
- "compile": "npm run clean:generated && npm run build:emitters && tsp compile main.tsp && npm run emit:contract-revision && npm run build:json-schema && npm run emit:mcp-tool-schemas && npm run build:ts-runtime && npm run build:zod-runtime",
99
+ "compile": "npm run clean:generated && npm run build:emitters && tsp compile main.tsp && npm run emit:contract-revision && npm run build:json-schema && npm run build:ts-runtime && npm run build:zod-runtime",
104
100
  "format": "tsp format **/*.tsp",
105
101
  "lint": "npm run build:emitters && tsp compile main.tsp --no-emit --warn-as-error",
106
102
  "lint:public": "npm run build:emitters && tsp compile index.tsp --no-emit --warn-as-error",