@kontextmind/kxm 0.7.22 → 0.7.24

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.
@@ -164,6 +164,7 @@
164
164
  "run.created",
165
165
  "run.status_changed",
166
166
  "run.cancel_requested",
167
+ "run.drive_opened",
167
168
  "step.entered",
168
169
  "step.status_changed",
169
170
  "step.outcome_recorded",
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kxm.dev/vnext/drive-receipt.schema.json",
4
+ "title": "KXM vNext drive session receipt",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "driveId",
9
+ "runId",
10
+ "projectId",
11
+ "homeRuntimeId",
12
+ "mode",
13
+ "openedAt",
14
+ "openedSequence",
15
+ "closedAt",
16
+ "lastSequence",
17
+ "logHash",
18
+ "settlement",
19
+ "budget",
20
+ "producer"
21
+ ],
22
+ "properties": {
23
+ "schema": { "const": "kxm.drive-receipt.v1" },
24
+ "driveId": { "$ref": "common.schema.json#/$defs/opaqueId" },
25
+ "runId": { "$ref": "common.schema.json#/$defs/opaqueId" },
26
+ "projectId": { "$ref": "common.schema.json#/$defs/opaqueId" },
27
+ "homeRuntimeId": { "$ref": "common.schema.json#/$defs/opaqueId" },
28
+ "mode": { "enum": ["simulated", "live"] },
29
+ "openedAt": { "$ref": "common.schema.json#/$defs/timestamp" },
30
+ "openedSequence": { "type": "integer", "minimum": 1 },
31
+ "closedAt": { "$ref": "common.schema.json#/$defs/timestamp" },
32
+ "lastSequence": { "type": "integer", "minimum": 1 },
33
+ "logHash": { "$ref": "common.schema.json#/$defs/sha256" },
34
+ "settlement": { "$ref": "#/$defs/settlement" },
35
+ "budget": { "type": "null" },
36
+ "producer": {
37
+ "type": "object",
38
+ "required": ["id", "closed"],
39
+ "properties": {
40
+ "id": { "$ref": "common.schema.json#/$defs/identifier" },
41
+ "closed": { "type": "boolean" }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ },
46
+ "additionalProperties": false,
47
+ "$defs": {
48
+ "settlement": {
49
+ "type": "object",
50
+ "required": ["kind", "status", "reason"],
51
+ "properties": {
52
+ "kind": { "enum": ["terminal", "handoff", "unsettled"] },
53
+ "status": { "$ref": "common.schema.json#/$defs/lifecycleStatus" },
54
+ "reason": { "type": "string", "maxLength": 4000 },
55
+ "handoff": { "$ref": "#/$defs/handoff" },
56
+ "error": { "$ref": "common.schema.json#/$defs/errorSummary" }
57
+ },
58
+ "additionalProperties": false,
59
+ "allOf": [
60
+ {
61
+ "if": { "properties": { "kind": { "const": "handoff" } }, "required": ["kind"] },
62
+ "then": { "required": ["handoff"] },
63
+ "else": { "not": { "required": ["handoff"] } }
64
+ }
65
+ ]
66
+ },
67
+ "handoff": {
68
+ "type": "object",
69
+ "required": ["reason", "detail"],
70
+ "properties": {
71
+ "reason": { "type": "string", "minLength": 1, "maxLength": 80 },
72
+ "field": { "type": "string", "minLength": 1, "maxLength": 128 },
73
+ "stepId": { "$ref": "common.schema.json#/$defs/identifier" },
74
+ "detail": { "type": "string", "minLength": 1, "maxLength": 4000 }
75
+ },
76
+ "additionalProperties": false
77
+ }
78
+ }
79
+ }
@@ -278,6 +278,14 @@
278
278
  "payload": { "type": "object", "required": ["routing"] }
279
279
  }
280
280
  }
281
+ },
282
+ {
283
+ "if": { "properties": { "eventType": { "const": "run.drive_opened" } }, "required": ["eventType"] },
284
+ "then": {
285
+ "properties": {
286
+ "payload": { "type": "object", "required": ["driveId", "mode"] }
287
+ }
288
+ }
281
289
  }
282
290
  ],
283
291
  "additionalProperties": false,
@@ -394,6 +402,8 @@
394
402
  "maxItems": 64
395
403
  },
396
404
  "lease": { "$ref": "common.schema.json#/$defs/lease" },
405
+ "driveId": { "$ref": "common.schema.json#/$defs/opaqueId" },
406
+ "mode": { "enum": ["simulated", "live"] },
397
407
  "candidateId": { "$ref": "common.schema.json#/$defs/opaqueId" },
398
408
  "counts": {
399
409
  "type": "object",