@xtrape/capsule-contracts-node 0.3.0 → 0.5.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.
@@ -1,13 +1,13 @@
1
1
  openapi: 3.1.0
2
2
  info:
3
- title: Opstage CE API
3
+ title: Xtrape Panel CE API
4
4
  version: 0.1.0
5
- summary: CE v0.1 API contract for Opstage Capsule Service governance.
5
+ summary: CE v0.1 API contract for Xtrape Panel Worker governance.
6
6
  license:
7
7
  name: Apache-2.0
8
8
  identifier: Apache-2.0
9
9
  contact:
10
- name: Opstage CE maintainers
10
+ name: Xtrape Panel CE maintainers
11
11
  url: https://github.com/xtrape/xtrape-capsule-ce
12
12
  description: |
13
13
  This contract defines the CE v0.1 Admin API, Agent API, and System API.
@@ -72,13 +72,13 @@ tags:
72
72
  - name: AdminDashboard
73
73
  description: Aggregate counters for the CE governance loop.
74
74
  - name: AdminAgents
75
- description: List, inspect, and manage Agents bound to Capsule Services.
75
+ description: List, inspect, and manage Agents bound to Workers.
76
76
  - name: AdminRegistrationTokens
77
77
  description: Create, list, and revoke single-use registration tokens.
78
78
  - name: AdminCapsuleServices
79
- description: Inspect Capsule Services and request predefined actions.
79
+ description: Inspect Workers and request predefined actions.
80
80
  - name: AdminCommands
81
- description: Inspect Commands created via Capsule Service actions.
81
+ description: Inspect Commands created via Worker actions.
82
82
  - name: AdminAuditEvents
83
83
  description: Read the immutable audit trail.
84
84
  - name: Agent
@@ -510,7 +510,7 @@ paths:
510
510
  /api/admin/capsule-services:
511
511
  get:
512
512
  tags: [AdminCapsuleServices]
513
- summary: List Capsule Services.
513
+ summary: List Workers.
514
514
  description: |
515
515
  Allowed `sort` fields: `createdAt`, `lastReportedAt`, `code`, `name`.
516
516
  Default sort: `-createdAt`. Filter `status` accepts multiple values
@@ -536,7 +536,7 @@ paths:
536
536
  pattern: '^agt_'
537
537
  responses:
538
538
  '200':
539
- description: Capsule Service list.
539
+ description: Worker list.
540
540
  content:
541
541
  application/json:
542
542
  schema:
@@ -575,7 +575,7 @@ paths:
575
575
  /api/admin/capsule-services/{serviceId}:
576
576
  get:
577
577
  tags: [AdminCapsuleServices]
578
- summary: Get Capsule Service detail.
578
+ summary: Get Worker detail.
579
579
  operationId: getCapsuleService
580
580
  security:
581
581
  - AdminSessionCookie: []
@@ -583,7 +583,7 @@ paths:
583
583
  - $ref: '#/components/parameters/ServiceId'
584
584
  responses:
585
585
  '200':
586
- description: Capsule Service detail.
586
+ description: Worker detail.
587
587
  content:
588
588
  application/json:
589
589
  schema:
@@ -598,7 +598,7 @@ paths:
598
598
  /api/admin/capsule-services/{serviceId}/manifest:
599
599
  get:
600
600
  tags: [AdminCapsuleServices]
601
- summary: Get Capsule Service manifest JSON.
601
+ summary: Get Worker manifest JSON.
602
602
  operationId: getCapsuleServiceManifest
603
603
  security:
604
604
  - AdminSessionCookie: []
@@ -754,7 +754,7 @@ paths:
754
754
  description: |
755
755
  Allowed `sort` fields: `createdAt`, `finishedAt`. Default: `-createdAt`.
756
756
  Filter `status` accepts multiple values (OR'ed). `serviceId` and
757
- `agentId` filter by Capsule Service / Agent ownership.
757
+ `agentId` filter by Worker / Agent ownership.
758
758
  operationId: listCommands
759
759
  security:
760
760
  - AdminSessionCookie: []
@@ -1041,7 +1041,7 @@ paths:
1041
1041
  /api/agents/{agentId}/services/report:
1042
1042
  post:
1043
1043
  tags: [Agent]
1044
- summary: Report Capsule Service manifest, configs, actions, and health.
1044
+ summary: Report Worker manifest, configs, actions, and health.
1045
1045
  description: |
1046
1046
  Idempotent upsert keyed by `(workspaceId, code)`. The Agent SHOULD
1047
1047
  report once at startup and again when its manifest changes, NOT on
@@ -1906,7 +1906,7 @@ components:
1906
1906
  CapsuleManifest:
1907
1907
  type: object
1908
1908
  description: |
1909
- Authoritative shape of a Capsule Service manifest reported by the Agent.
1909
+ Authoritative shape of a Worker manifest reported by the Agent.
1910
1910
  Backend stores the full object as `CapsuleService.manifestJson` and validates
1911
1911
  the listed required fields. Unknown fields are preserved (forward-compat).
1912
1912
  required: [kind, code, name, version, runtime, agentMode]
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://xtrape.dev/contracts/worker-compatibility-v0.4.json",
4
+ "title": "Xtrape Worker compatibility additions",
5
+ "version": "0.4.0-rc.0",
6
+ "description": "Additive Worker terminology and endpoint aliases over the existing CE wire contract. Legacy identifiers remain valid until a versioned removal.",
7
+ "canonicalEndpoints": {
8
+ "workerReport": "/api/agents/{agentId}/workers/report",
9
+ "workerList": "/api/admin/workers",
10
+ "workerDetail": "/api/admin/workers/{serviceId}",
11
+ "workerAction": "/api/admin/workers/{serviceId}/actions/{actionName}"
12
+ },
13
+ "legacyAliases": {
14
+ "/api/agents/{agentId}/services/report": "/api/agents/{agentId}/workers/report",
15
+ "/api/admin/capsule-services": "/api/admin/workers",
16
+ "/api/admin/capsule-services/{serviceId}": "/api/admin/workers/{serviceId}",
17
+ "/api/admin/capsule-services/{serviceId}/actions/{actionName}": "/api/admin/workers/{serviceId}/actions/{actionName}"
18
+ },
19
+ "ownership": {
20
+ "rule": "An Agent may update only Worker Instance records it owns. Reporting an existing Worker code owned by another Agent fails until an explicit transfer flow exists.",
21
+ "conflictErrorCode": "CAPSULE_SERVICE_CODE_TAKEN",
22
+ "note": "The error code is a persisted compatibility identifier."
23
+ },
24
+ "requestShapes": {
25
+ "workerReport": {
26
+ "type": "object",
27
+ "required": ["workers"],
28
+ "properties": {
29
+ "workers": {
30
+ "type": "array",
31
+ "minItems": 1,
32
+ "items": { "$ref": "#/definitions/workerRuntimeReport" }
33
+ }
34
+ },
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "definitions": {
39
+ "workerRuntimeReport": {
40
+ "type": "object",
41
+ "required": ["code", "name", "manifest"],
42
+ "properties": {
43
+ "code": { "type": "string", "minLength": 1, "maxLength": 80 },
44
+ "name": { "type": "string", "minLength": 1, "maxLength": 200 },
45
+ "manifest": { "type": "object" },
46
+ "health": { "type": "object" },
47
+ "configs": { "type": "array" },
48
+ "actions": { "type": "array" }
49
+ },
50
+ "additionalProperties": true
51
+ }
52
+ }
53
+ }