forked from oxnw/agentrail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintake-routing-admin.openapi.yaml
More file actions
1346 lines (1346 loc) · 45.3 KB
/
Copy pathintake-routing-admin.openapi.yaml
File metadata and controls
1346 lines (1346 loc) · 45.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: AgentRail Intake Routing Admin API
version: 0.1.0
summary: Operator API for provider issue intake, routing decisions, assignment, and audit
contact:
name: AgentRail Engineering
license:
name: AgentRail Source-Available License 1.1
description: |
Separate operator/admin contract for AgentRail intake routing.
This API is intentionally not part of the normal agent task lifecycle SDK.
Worker agents consume assigned tasks through `task-lifecycle.openapi.yaml`.
Routing data is configurable through versioned rule sets; the engine keeps
supported predicates, conflict handling, permissions, audit writes, and task
assignment side effects in reviewed server code.
servers:
- url: http://127.0.0.1:3000
description: Local source-available self-hosted server
- url: https://api.agentrail.app/v1
description: Future AgentRail Cloud API
security:
- bearerAuth: []
tags:
- name: Intake
description: Provider issue ingestion surfaces used by adapters and sync jobs.
- name: Routing
description: Rule set management and route evaluation for operators.
- name: Setup
description: Trusted setup helpers that prepare deterministic smoke tasks for new agents.
- name: Agent Profiles
description: Operator-managed routable agent metadata used by the routing engine.
- name: Routing Audit
description: Read-only route decision history and explanations.
paths:
/operator/intake/provider-issues:
post:
tags: [Intake]
operationId: ingestProviderIssue
summary: Ingest one provider issue snapshot and route it
description: |
Receives a normalized provider issue snapshot from an adapter or sync job.
Safe to retry with the same `Idempotency-Key` and identical request body.
The control plane evaluates routing, stores the decision, applies the
assignment or triage outcome, and emits the relevant task event.
parameters:
- $ref: '#/components/parameters/IdempotencyKeyHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProviderIssueSnapshot'
examples:
github_issue:
value:
provider: github
providerIssueId: github:oxnw/agentrail:issues/95
sourceVersion: '2026-05-05T12:00:00Z:delivery-01'
repository:
provider: github
owner: oxnw
name: agentrail
defaultBranch: main
title: Define AgentRail intake routing engine and assignment model
bodyDigest: sha256:43c3f4e7b09f4f5f3d1e2a0e7d0a2c66
labels: [architecture, api, high-priority]
project: Documentation
issueType: architecture
priority: high
ownershipTags: [control-plane, docs]
capabilityTags: [api-design, architecture]
links:
providerIssue: https://github.com/oxnw/agentrail/issues/95
responses:
'202':
description: Snapshot accepted and routing decision recorded
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingDecisionResponse'
examples:
assigned:
value:
data:
id: rdec_01JZROUTE0000000000000001
taskId: tsk_01JZROUTE0000000000000001
taskIdentifier: AGEA-95
outcome: assigned
target:
type: agent
id: agt_cto
assignment:
assigneeAgentId: agt_cto
triageQueueId: null
assignmentSource: deterministic_rule
routingDecisionId: rdec_01JZROUTE0000000000000001
assignedAt: '2026-05-05T12:01:03Z'
roleTemplate: null
confidence: 0.99
routingReason:
summary: Repo agentrail plus labels architecture/api matched CTO ownership rule.
matchedRules:
- id: rule_architecture_to_cto
name: Architecture and API ownership
confidence: 0.99
classifier: null
conflictReasons: []
availableActions: [view_task, view_audit]
availableActions: [view_task, view_audit]
meta:
requestId: req_01JZROUTE0000000000000002
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'409':
$ref: '#/components/responses/Conflict'
/operator/routing/rule-sets/current:
get:
tags: [Routing]
operationId: getCurrentRoutingRuleSet
summary: Get the active routing rule set
description: Returns the active immutable rule set revision.
responses:
'200':
description: Active rule set
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingRuleSetResponse'
examples:
current:
value:
data:
id: rset_01JZROUTE0000000000000100
version: 7
status: active
source: admin_api
sourceRef: AGEA-95
createdBy: agt_cto
createdAt: '2026-05-05T12:10:00Z'
rules:
- id: rule_architecture_to_cto
name: Architecture and API ownership
enabled: true
priority: 10
conditions:
repositories: [oxnw/agentrail]
labelsAny: [architecture, api]
issueTypes: [architecture, design]
ownershipTagsAny: [control-plane]
capabilityTagsAll: [api-design]
target:
type: agent
id: agt_cto
confidence: 0.99
explanation: Repo and architecture/API labels map to CTO ownership.
classifier:
enabled: true
provider: internal-router
confidenceThreshold: 0.82
maxCandidates: 3
fallbackTriageQueueId: triage_engineering
fallbackBehavior: require_suitable_agent
timeoutMs: 180000
audit:
supersedesRuleSetId: rset_01JZROUTE0000000000000099
changeReason: Add explicit CTO ownership for API architecture tasks.
availableActions: [update, evaluate]
meta:
requestId: req_01JZROUTE0000000000000101
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
put:
tags: [Routing]
operationId: replaceCurrentRoutingRuleSet
summary: Create and activate a new routing rule set revision
description: |
Replaces the active rule set by creating an immutable new revision.
Historical rule set revisions remain queryable through audit records.
Safe to retry with the same `Idempotency-Key` and identical request body.
This is the normal path for operator-owned routing changes that should
not require an AgentRail code deployment.
parameters:
- $ref: '#/components/parameters/IdempotencyKeyHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingRuleSetReplaceRequest'
examples:
replace:
value:
sourceRef: AGEA-95
changeReason: Add ownership and classifier fallback for intake routing.
rules:
- id: rule_architecture_to_cto
name: Architecture and API ownership
enabled: true
priority: 10
conditions:
repositories: [oxnw/agentrail]
labelsAny: [architecture, api]
issueTypes: [architecture, design]
ownershipTagsAny: [control-plane]
capabilityTagsAll: [api-design]
target:
type: agent
id: agt_cto
confidence: 0.99
explanation: Repo and architecture/API labels map to CTO ownership.
classifier:
enabled: true
provider: internal-router
confidenceThreshold: 0.82
maxCandidates: 3
fallbackTriageQueueId: triage_engineering
fallbackBehavior: require_suitable_agent
timeoutMs: 180000
responses:
'201':
description: New active rule set revision
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingRuleSetResponse'
examples:
created:
value:
data:
id: rset_01JZROUTE0000000000000102
version: 8
status: active
source: admin_api
sourceRef: AGEA-95
createdBy: agt_cto
createdAt: '2026-05-05T12:14:00Z'
rules:
- id: rule_architecture_to_cto
name: Architecture and API ownership
enabled: true
priority: 10
conditions:
repositories: [oxnw/agentrail]
labelsAny: [architecture, api]
issueTypes: [architecture, design]
ownershipTagsAny: [control-plane]
capabilityTagsAll: [api-design]
target:
type: agent
id: agt_cto
confidence: 0.99
explanation: Repo and architecture/API labels map to CTO ownership.
classifier:
enabled: true
provider: internal-router
confidenceThreshold: 0.82
maxCandidates: 3
fallbackTriageQueueId: triage_engineering
fallbackBehavior: require_suitable_agent
timeoutMs: 180000
audit:
supersedesRuleSetId: rset_01JZROUTE0000000000000100
changeReason: Add ownership and classifier fallback for intake routing.
availableActions: [evaluate]
meta:
requestId: req_01JZROUTE0000000000000103
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'409':
$ref: '#/components/responses/Conflict'
/operator/routing/agent-profiles/{agentId}:
get:
tags: [Agent Profiles]
operationId: getRoutingAgentProfile
summary: Get one routable agent profile
description: |
Returns operator-managed routing metadata for one agent. Worker agents
do not write their own profiles; profiles are created by admin flows,
agent creation/hiring flows, or trusted infrastructure sync.
parameters:
- $ref: '#/components/parameters/AgentIdPath'
responses:
'200':
description: Agent profile
content:
application/json:
schema:
$ref: '#/components/schemas/AgentProfileResponse'
examples:
cto_profile:
value:
data:
agentId: agt_cto
displayName: CTO
role: cto
roleTemplateId: backend-api
status: active
capabilityTags: [api-design, architecture, security-review]
ownershipTags: [control-plane, docs]
repoAllowlist: [oxnw/agentrail]
maxConcurrentTasks: 3
source: operator_admin
sourceRef: AGEA-95
changeReason: Seed CTO routing profile for architecture/API work.
updatedBy: agt_ceo
updatedAt: '2026-05-05T15:40:00Z'
availableActions: [update, view_audit]
meta:
requestId: req_01JZROUTE0000000000000400
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'404':
$ref: '#/components/responses/NotFound'
put:
tags: [Agent Profiles]
operationId: replaceRoutingAgentProfile
summary: Create or replace one routable agent profile
description: |
Creates or replaces the routing profile used by the engine for
eligibility, ownership, capability, and capacity checks. Safe to retry with the same `Idempotency-Key` and
identical request body. Worker task keys must not receive this scope.
parameters:
- $ref: '#/components/parameters/AgentIdPath'
- $ref: '#/components/parameters/IdempotencyKeyHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentProfileReplaceRequest'
examples:
cto_profile:
value:
displayName: CTO
role: cto
roleTemplateId: backend-api
status: active
capabilityTags: [api-design, architecture, security-review]
ownershipTags: [control-plane, docs]
repoAllowlist: [oxnw/agentrail]
maxConcurrentTasks: 3
sourceRef: AGEA-95
changeReason: Seed CTO routing profile for architecture/API work.
responses:
'200':
description: Agent profile created or replaced
content:
application/json:
schema:
$ref: '#/components/schemas/AgentProfileResponse'
examples:
updated:
value:
data:
agentId: agt_cto
displayName: CTO
role: cto
roleTemplateId: backend-api
status: active
capabilityTags: [api-design, architecture, security-review]
ownershipTags: [control-plane, docs]
repoAllowlist: [oxnw/agentrail]
maxConcurrentTasks: 3
source: operator_admin
sourceRef: AGEA-95
changeReason: Seed CTO routing profile for architecture/API work.
updatedBy: agt_ceo
updatedAt: '2026-05-05T15:41:00Z'
availableActions: [evaluate, view_audit]
meta:
requestId: req_01JZROUTE0000000000000401
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'409':
$ref: '#/components/responses/Conflict'
/operator/setup/verification-task:
post:
tags: [Setup]
operationId: createSetupVerificationTask
summary: Create or refresh a deterministic setup verification smoke task
description: |
Creates one deterministic setup smoke task per selected `agentId`.
The task is assigned directly to that agent and stays in
`in_progress` so the managed runner can prove its run-scoped context works.
The CLI pairs this endpoint with `agentrail doctor`; setup is not
complete until the generated agent key can read the task from
`GET /tasks/mine?status=in_progress&limit=1`.
Safe to retry with the same `Idempotency-Key` and identical request
body; reruns without a matching idempotency replay reuse the same task
identifier for that agent instead of creating duplicates.
parameters:
- $ref: '#/components/parameters/IdempotencyKeyHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SetupVerificationTaskRequest'
examples:
create:
value:
agentId: agt_setup
sourceRef: agentrail-cli:init
responses:
'201':
description: Setup verification task created or refreshed
content:
application/json:
schema:
$ref: '#/components/schemas/SetupVerificationTaskResponse'
examples:
created:
value:
data:
taskId: tsk_01JZSETUP0000000000000001
taskIdentifier: LOCAL-SETUP-AGT-SETUP
agentId: agt_setup
sourceRef: agentrail-cli:init
status: in_progress
createdAt: '2026-05-05T12:30:00Z'
updatedAt: '2026-05-05T12:30:00Z'
availableActions: [submit]
meta:
requestId: req_01JZSETUP0000000000000001
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/operator/routing/evaluations:
post:
tags: [Routing]
operationId: evaluateRouting
summary: Dry-run routing without assigning a task
description: |
Evaluates the active or specified rule set against a provider issue
snapshot. This endpoint records an audit event but does not create,
update, or wake a task.
parameters:
- $ref: '#/components/parameters/IdempotencyKeyHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingEvaluationRequest'
examples:
dry_run:
value:
ruleSetVersion: 8
snapshot:
provider: github
providerIssueId: github:oxnw/agentrail:issues/96
sourceVersion: '2026-05-05T12:20:00Z:dry-run'
repository:
provider: github
owner: oxnw
name: agentrail
defaultBranch: main
title: Build hosted waitlist dashboard
bodyDigest: sha256:80edb73a5fcf4d71d01fb66b4ec64d98
labels: [frontend, dashboard]
project: Dashboard
issueType: feature
priority: medium
ownershipTags: [dashboard]
capabilityTags: [frontend]
links:
providerIssue: https://github.com/oxnw/agentrail/issues/96
responses:
'200':
description: Dry-run routing decision
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingDecisionResponse'
examples:
dry_run_no_route:
value:
data:
id: rdec_01JZROUTE0000000000000200
taskId: null
taskIdentifier: null
outcome: no_route
target:
type: triage_queue
id: triage_engineering
assignment:
assigneeAgentId: null
triageQueueId: triage_engineering
assignmentSource: manual_triage
routingDecisionId: rdec_01JZROUTE0000000000000200
assignedAt: null
roleTemplate: null
confidence: 0
routingReason:
summary: No deterministic route matched; AI routing could not find a suitable agent, so the task is waiting for a suitable agent.
matchedRules: []
classifier: null
conflictReasons: [no_matching_rule]
availableActions: [view_audit]
availableActions: [view_audit]
meta:
requestId: req_01JZROUTE0000000000000201
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'409':
$ref: '#/components/responses/Conflict'
/operator/routing/audit/{decisionId}:
get:
tags: [Routing Audit]
operationId: getRoutingDecisionAudit
summary: Get one routing decision audit record
description: Returns the persisted route decision, explanation, and rule version.
parameters:
- $ref: '#/components/parameters/RoutingDecisionIdPath'
responses:
'200':
description: Routing audit record
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingAuditResponse'
examples:
audit:
value:
data:
decision:
id: rdec_01JZROUTE0000000000000001
taskId: tsk_01JZROUTE0000000000000001
taskIdentifier: AGEA-95
outcome: assigned
target:
type: agent
id: agt_cto
assignment:
assigneeAgentId: agt_cto
triageQueueId: null
assignmentSource: deterministic_rule
routingDecisionId: rdec_01JZROUTE0000000000000001
assignedAt: '2026-05-05T12:01:03Z'
roleTemplate: null
confidence: 0.99
routingReason:
summary: Repo agentrail plus labels architecture/api matched CTO ownership rule.
matchedRules:
- id: rule_architecture_to_cto
name: Architecture and API ownership
confidence: 0.99
classifier: null
conflictReasons: []
availableActions: [view_task, view_rule_set]
inputDigest: sha256:43c3f4e7b09f4f5f3d1e2a0e7d0a2c66
ruleSet:
id: rset_01JZROUTE0000000000000102
version: 8
createdAt: '2026-05-05T12:01:03Z'
availableActions: [view_task, view_rule_set]
meta:
requestId: req_01JZROUTE0000000000000301
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/InsufficientScope'
'404':
$ref: '#/components/responses/NotFound'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: AgentRail API key
parameters:
IdempotencyKeyHeader:
name: Idempotency-Key
in: header
required: true
schema:
type: string
minLength: 8
maxLength: 128
description: Stable key for retry-safe mutation or evaluation requests.
RoutingDecisionIdPath:
name: decisionId
in: path
required: true
schema:
type: string
description: Stable routing decision identifier.
AgentIdPath:
name: agentId
in: path
required: true
schema:
type: string
description: Stable AgentRail `AgentIdentity.id`; this is the routing and task ownership key.
responses:
ValidationError:
description: Request validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalid:
value:
error:
code: validation_error
message: Request body did not match the routing contract.
details:
field: rules.0.target.id
availableActions: [fix_request]
Unauthorized:
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
missing:
value:
error:
code: unauthorized
message: Missing or invalid bearer token.
details:
availableActions: [authenticate]
InsufficientScope:
description: API key lacks the required routing scope
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
missing_scope:
value:
error:
code: insufficient_scope
message: API key does not include routing:admin.
details:
requiredScope: routing:admin
availableActions: [request_scope]
Conflict:
description: Idempotency conflict or stale routing revision
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
conflict:
value:
error:
code: conflict
message: Idempotency-Key has already been used with a different request payload.
details:
idempotencyKey: routing-AGEA-95-v1
availableActions: [retry_with_new_key, inspect_existing]
NotFound:
description: Routing decision was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
not_found:
value:
error:
code: not_found
message: Routing decision was not found.
details:
availableActions: [check_id]
schemas:
AvailableActions:
type: array
maxItems: 20
items:
type: string
ResponseMeta:
type: object
additionalProperties: false
required: [requestId]
properties:
requestId:
type: string
routingRetry:
$ref: '#/components/schemas/RoutingRetryResult'
ErrorResponse:
type: object
additionalProperties: false
required: [error]
properties:
error:
type: object
additionalProperties: false
required: [code, message, details]
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties: true
ProviderIssueSnapshot:
type: object
additionalProperties: false
required:
- provider
- providerIssueId
- sourceVersion
- repository
- title
- bodyDigest
- labels
- issueType
- priority
- ownershipTags
- capabilityTags
- links
properties:
provider:
type: string
enum: [github, linear, jira, gitlab]
providerIssueId:
type: string
sourceVersion:
type: string
repository:
$ref: '#/components/schemas/ProviderRepository'
title:
type: string
maxLength: 240
bodyDigest:
type: string
description: Digest of the provider body or normalized summary, not the full body.
labels:
type: array
maxItems: 50
items:
type: string
project:
type: [string, 'null']
issueType:
type: string
enum: [bug, feature, architecture, design, documentation, maintenance, unknown]
priority:
type: string
enum: [low, medium, high, critical]
ownershipTags:
type: array
maxItems: 20
items:
type: string
capabilityTags:
type: array
maxItems: 20
items:
type: string
links:
type: object
additionalProperties: false
required: [providerIssue]
properties:
providerIssue:
type: string
format: uri
ProviderRepository:
type: object
additionalProperties: false
required: [provider, owner, name, defaultBranch]
properties:
provider:
type: string
enum: [github, gitlab]
owner:
type: string
name:
type: string
defaultBranch:
type: string
AgentProfileReplaceRequest:
type: object
additionalProperties: false
required:
- displayName
- role
- status
- capabilityTags
- ownershipTags
- repoAllowlist
- maxConcurrentTasks
- sourceRef
- changeReason
properties:
displayName:
type: string
role:
type: string
roleTemplateId:
type: [string, 'null']
description: Optional built-in or custom role template id used to create this agent profile.
pattern: '^[a-z][a-z0-9-]*$'
status:
type: string
enum: [active, paused, disabled]
capabilityTags:
type: array
maxItems: 50
items:
type: string
ownershipTags:
type: array
maxItems: 50
items:
type: string
repoAllowlist:
type: array
maxItems: 200
items:
type: string
maxConcurrentTasks:
type: integer
minimum: 0
maximum: 50
sourceRef:
type: string
changeReason:
type: string
maxLength: 500
AgentProfile:
type: object
additionalProperties: false
required:
- agentId
- displayName
- role
- status
- capabilityTags
- ownershipTags
- repoAllowlist
- maxConcurrentTasks
- source
- sourceRef
- changeReason
- updatedBy
- updatedAt
properties:
agentId:
type: string
description: Stable AgentRail `AgentIdentity.id`; provider and runtime identities map into this value.
displayName:
type: string
role:
type: string
roleTemplateId:
type: [string, 'null']
description: Optional built-in or custom role template id used to create this agent profile.
pattern: '^[a-z][a-z0-9-]*$'
status:
type: string
enum: [active, paused, disabled]
capabilityTags:
type: array
maxItems: 50
items:
type: string
ownershipTags:
type: array
maxItems: 50
items:
type: string
repoAllowlist:
type: array
maxItems: 200
items:
type: string
maxConcurrentTasks:
type: integer
minimum: 0
maximum: 50
source:
type: string
enum: [agent_created, operator_admin, skill_assignment_sync, config_file_import]
sourceRef:
type: string
changeReason:
type: string
maxLength: 500
description: Operator or CLI trace reason for the latest profile change.
updatedBy:
type: string
updatedAt:
type: string
format: date-time
AgentProfileResponse:
type: object
additionalProperties: false
required: [data, availableActions, meta]
properties:
data:
$ref: '#/components/schemas/AgentProfile'
availableActions:
$ref: '#/components/schemas/AvailableActions'
meta:
$ref: '#/components/schemas/ResponseMeta'
SetupVerificationTaskRequest:
type: object
additionalProperties: false
required: [agentId]
properties:
agentId:
type: string
description: Stable AgentRail `AgentIdentity.id` that should receive the setup smoke task.
sourceRef:
type: string
description: Optional operator or CLI trace reference, for example `agentrail-cli:init`.
SetupVerificationTask:
type: object
additionalProperties: false
required:
- taskId
- taskIdentifier
- agentId
- sourceRef
- status
- createdAt
- updatedAt
properties:
taskId:
type: string
taskIdentifier:
type: string
agentId:
type: string
sourceRef:
type: string
description: Operator or CLI trace reference; defaults to `operator_setup_verification` when omitted from the request.
status:
type: string
enum: [todo, in_progress, in_review, blocked, done, cancelled]
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
SetupVerificationTaskResponse:
type: object
additionalProperties: false
required: [data, availableActions, meta]
properties:
data:
$ref: '#/components/schemas/SetupVerificationTask'
availableActions:
$ref: '#/components/schemas/AvailableActions'
meta:
$ref: '#/components/schemas/ResponseMeta'
RoutingRuleSetReplaceRequest:
type: object
additionalProperties: false
required: [sourceRef, changeReason, rules, classifier]
properties:
sourceRef:
type: string
changeReason:
type: string
maxLength: 500
rules:
type: array
minItems: 0
maxItems: 200
items:
$ref: '#/components/schemas/RoutingRule'
classifier:
$ref: '#/components/schemas/ClassifierConfig'