@playola-radio/slipstream 0.1.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.
Files changed (104) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +132 -0
  3. package/SKILL.md +63 -0
  4. package/THIRD-PARTY-NOTICES.md +36 -0
  5. package/contracts/interface/v2/schema.json +480 -0
  6. package/dist/answer-forwarder.js +58 -0
  7. package/dist/attribution-engine.js +164 -0
  8. package/dist/attribution-producer.js +153 -0
  9. package/dist/attribution-scoring.js +86 -0
  10. package/dist/attribution.js +120 -0
  11. package/dist/blob-source.js +100 -0
  12. package/dist/boundary-registry.js +47 -0
  13. package/dist/cas.js +99 -0
  14. package/dist/change-view.js +201 -0
  15. package/dist/claude-root-transcript.js +110 -0
  16. package/dist/cli.js +629 -0
  17. package/dist/clip-blob-reader.js +104 -0
  18. package/dist/clip-function-parser.js +83 -0
  19. package/dist/clip-language.js +15 -0
  20. package/dist/clip-projection-service.js +240 -0
  21. package/dist/clip-projection-worker.js +18 -0
  22. package/dist/clip-projection.js +585 -0
  23. package/dist/clip-worker-pool.js +118 -0
  24. package/dist/config.js +154 -0
  25. package/dist/control-client.js +98 -0
  26. package/dist/control-protocol.js +72 -0
  27. package/dist/daemon-location.js +33 -0
  28. package/dist/daemon.js +951 -0
  29. package/dist/display-fold.js +332 -0
  30. package/dist/engine.js +112 -0
  31. package/dist/entrypoint.js +17 -0
  32. package/dist/event.js +79 -0
  33. package/dist/evidence-ingest.js +60 -0
  34. package/dist/harness-context/claude.js +42 -0
  35. package/dist/harness-context/codex.js +49 -0
  36. package/dist/harness-context.js +49 -0
  37. package/dist/health.js +65 -0
  38. package/dist/http-reader.js +655 -0
  39. package/dist/http-security.js +50 -0
  40. package/dist/interface-projection.js +243 -0
  41. package/dist/interface-range-resolver.js +230 -0
  42. package/dist/interface-service.js +509 -0
  43. package/dist/interface-ts-pool.js +111 -0
  44. package/dist/interface-ts-worker.js +35 -0
  45. package/dist/interface-v2-comparison.js +135 -0
  46. package/dist/interface-v2-core.js +123 -0
  47. package/dist/interface-v2-typescript.js +448 -0
  48. package/dist/lock.js +197 -0
  49. package/dist/log-reader.js +148 -0
  50. package/dist/log.js +59 -0
  51. package/dist/maintenance.js +255 -0
  52. package/dist/mcp-forwarder.js +161 -0
  53. package/dist/mcp-protocol.js +92 -0
  54. package/dist/platform.js +21 -0
  55. package/dist/projection-admission.js +296 -0
  56. package/dist/projection-trace.js +17 -0
  57. package/dist/public-events.js +27 -0
  58. package/dist/question-hook.js +110 -0
  59. package/dist/questions.js +167 -0
  60. package/dist/reader-runtime.js +38 -0
  61. package/dist/reader.js +93 -0
  62. package/dist/recovery.js +303 -0
  63. package/dist/schema.js +108 -0
  64. package/dist/session.js +866 -0
  65. package/dist/sibling-module.js +10 -0
  66. package/dist/snapshot.js +15 -0
  67. package/dist/storage.js +111 -0
  68. package/dist/store-reader.js +185 -0
  69. package/dist/swift-grammar.js +268 -0
  70. package/dist/swift-interface-extract.js +344 -0
  71. package/dist/swift-interface.js +62 -0
  72. package/dist/swift-parse-host.js +174 -0
  73. package/dist/swift-parse-worker.js +34 -0
  74. package/dist/swift-parse.js +134 -0
  75. package/dist/swift-spans.js +62 -0
  76. package/dist/task-forwarder.js +152 -0
  77. package/dist/transcript/claude.js +199 -0
  78. package/dist/transcript/codex.js +132 -0
  79. package/dist/transcript/discovery.js +365 -0
  80. package/dist/transcript/file-reader.js +128 -0
  81. package/dist/transcript/fs-io.js +287 -0
  82. package/dist/transcript/runner.js +62 -0
  83. package/dist/transcript/steppers.js +30 -0
  84. package/dist/transcript/types.js +30 -0
  85. package/dist/transcript/watcher.js +133 -0
  86. package/dist/tui.js +168 -0
  87. package/package.json +60 -0
  88. package/schemas/projections/clip.v1.json +195 -0
  89. package/schemas/projections/clip.v2.json +212 -0
  90. package/schemas/projections/clip.v3.json +212 -0
  91. package/schemas/slipstream.capture.baseline.completed.v1.json +62 -0
  92. package/schemas/slipstream.capture.gap.v1.json +112 -0
  93. package/schemas/slipstream.change.attribution.v1.json +115 -0
  94. package/schemas/slipstream.enrichment.configured.v1.json +77 -0
  95. package/schemas/slipstream.enrichment.coverage.v1.json +95 -0
  96. package/schemas/slipstream.file.baselined.v1.json +122 -0
  97. package/schemas/slipstream.file.changed.v1.json +179 -0
  98. package/schemas/slipstream.harness.evidence.v1.json +145 -0
  99. package/schemas/slipstream.question.answered.v1.json +29 -0
  100. package/schemas/slipstream.question.dispatch_attempted.v1.json +28 -0
  101. package/schemas/slipstream.question.queued.v1.json +55 -0
  102. package/schemas/slipstream.session.resumed.v1.json +70 -0
  103. package/schemas/slipstream.session.started.v1.json +69 -0
  104. package/schemas/slipstream.task.started.v1.json +72 -0
@@ -0,0 +1,122 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.file.baselined.v1.json",
4
+ "title": "slipstream.file.baselined.v1",
5
+ "$comment": "One initial observed snapshot for a path at attach. Not an edit. Self-contained; unknown fields permitted for forward compatibility.",
6
+ "type": "object",
7
+ "required": [
8
+ "specversion",
9
+ "id",
10
+ "source",
11
+ "type",
12
+ "datacontenttype",
13
+ "seq",
14
+ "time",
15
+ "data"
16
+ ],
17
+ "properties": {
18
+ "specversion": {
19
+ "const": "1.0"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[1-9][0-9]*$"
24
+ },
25
+ "source": {
26
+ "type": "string",
27
+ "pattern": "^urn:slipstream:session:"
28
+ },
29
+ "type": {
30
+ "const": "slipstream.file.baselined.v1"
31
+ },
32
+ "datacontenttype": {
33
+ "const": "application/json"
34
+ },
35
+ "seq": {
36
+ "type": "string",
37
+ "pattern": "^[1-9][0-9]*$"
38
+ },
39
+ "time": {
40
+ "type": "string",
41
+ "format": "date-time"
42
+ },
43
+ "data": {
44
+ "type": "object",
45
+ "required": [
46
+ "session_id",
47
+ "path",
48
+ "snapshot"
49
+ ],
50
+ "properties": {
51
+ "session_id": {
52
+ "type": "string"
53
+ },
54
+ "path": {
55
+ "type": "string"
56
+ },
57
+ "snapshot": {
58
+ "$ref": "#/$defs/snapshot"
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "$defs": {
64
+ "snapshot": {
65
+ "oneOf": [
66
+ {
67
+ "type": "object",
68
+ "required": [
69
+ "kind",
70
+ "sha256",
71
+ "size"
72
+ ],
73
+ "properties": {
74
+ "kind": {
75
+ "const": "content"
76
+ },
77
+ "sha256": {
78
+ "type": "string",
79
+ "pattern": "^[0-9a-f]{64}$"
80
+ },
81
+ "size": {
82
+ "type": "integer",
83
+ "minimum": 0
84
+ }
85
+ }
86
+ },
87
+ {
88
+ "type": "object",
89
+ "required": [
90
+ "kind"
91
+ ],
92
+ "properties": {
93
+ "kind": {
94
+ "const": "absent"
95
+ }
96
+ }
97
+ },
98
+ {
99
+ "type": "object",
100
+ "required": [
101
+ "kind",
102
+ "reason"
103
+ ],
104
+ "properties": {
105
+ "kind": {
106
+ "const": "unavailable"
107
+ },
108
+ "reason": {
109
+ "enum": [
110
+ "oversize",
111
+ "unreadable",
112
+ "unstable",
113
+ "io-error",
114
+ "baseline-unknown"
115
+ ]
116
+ }
117
+ }
118
+ }
119
+ ]
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,179 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.file.changed.v1.json",
4
+ "title": "slipstream.file.changed.v1",
5
+ "$comment": "An observed transition at a path. `observation` distinguishes a live watcher observation from a restart/recovery reconciliation. `task_hint_id` is the immutable grouping hint (the committed task in effect when this change was ordered); `attribution` is revisable inference, never verified authorship. Self-contained; unknown fields permitted for forward compatibility.",
6
+ "type": "object",
7
+ "required": [
8
+ "specversion",
9
+ "id",
10
+ "source",
11
+ "type",
12
+ "datacontenttype",
13
+ "seq",
14
+ "time",
15
+ "data"
16
+ ],
17
+ "properties": {
18
+ "specversion": {
19
+ "const": "1.0"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[1-9][0-9]*$"
24
+ },
25
+ "source": {
26
+ "type": "string",
27
+ "pattern": "^urn:slipstream:session:"
28
+ },
29
+ "type": {
30
+ "const": "slipstream.file.changed.v1"
31
+ },
32
+ "datacontenttype": {
33
+ "const": "application/json"
34
+ },
35
+ "seq": {
36
+ "type": "string",
37
+ "pattern": "^[1-9][0-9]*$"
38
+ },
39
+ "time": {
40
+ "type": "string",
41
+ "format": "date-time"
42
+ },
43
+ "data": {
44
+ "type": "object",
45
+ "required": [
46
+ "session_id",
47
+ "path",
48
+ "before",
49
+ "after",
50
+ "observation",
51
+ "observed_at_ms"
52
+ ],
53
+ "properties": {
54
+ "session_id": {
55
+ "type": "string"
56
+ },
57
+ "path": {
58
+ "type": "string"
59
+ },
60
+ "before": {
61
+ "$ref": "#/$defs/snapshot"
62
+ },
63
+ "after": {
64
+ "$ref": "#/$defs/snapshot"
65
+ },
66
+ "observation": {
67
+ "enum": [
68
+ "watcher",
69
+ "reconciliation"
70
+ ]
71
+ },
72
+ "coalesced": {
73
+ "type": "boolean"
74
+ },
75
+ "gap_ref": {
76
+ "type": "string",
77
+ "pattern": "^[1-9][0-9]*$"
78
+ },
79
+ "observed_at_ms": {
80
+ "type": "integer",
81
+ "minimum": 0
82
+ },
83
+ "observed_interval_ms": {
84
+ "oneOf": [
85
+ {
86
+ "type": "object",
87
+ "required": ["start_ms", "end_ms"],
88
+ "properties": {
89
+ "start_ms": { "type": "integer", "minimum": 0 },
90
+ "end_ms": { "type": "integer", "minimum": 0 }
91
+ }
92
+ },
93
+ {
94
+ "type": "object",
95
+ "required": ["unavailable", "reason"],
96
+ "properties": {
97
+ "unavailable": { "const": true },
98
+ "reason": { "type": "string" }
99
+ }
100
+ }
101
+ ]
102
+ },
103
+ "task_hint_id": {
104
+ "type": "string"
105
+ },
106
+ "attribution": {
107
+ "type": "object",
108
+ "required": [
109
+ "status"
110
+ ],
111
+ "properties": {
112
+ "status": {
113
+ "const": "unknown"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "$defs": {
121
+ "snapshot": {
122
+ "oneOf": [
123
+ {
124
+ "type": "object",
125
+ "required": [
126
+ "kind",
127
+ "sha256",
128
+ "size"
129
+ ],
130
+ "properties": {
131
+ "kind": {
132
+ "const": "content"
133
+ },
134
+ "sha256": {
135
+ "type": "string",
136
+ "pattern": "^[0-9a-f]{64}$"
137
+ },
138
+ "size": {
139
+ "type": "integer",
140
+ "minimum": 0
141
+ }
142
+ }
143
+ },
144
+ {
145
+ "type": "object",
146
+ "required": [
147
+ "kind"
148
+ ],
149
+ "properties": {
150
+ "kind": {
151
+ "const": "absent"
152
+ }
153
+ }
154
+ },
155
+ {
156
+ "type": "object",
157
+ "required": [
158
+ "kind",
159
+ "reason"
160
+ ],
161
+ "properties": {
162
+ "kind": {
163
+ "const": "unavailable"
164
+ },
165
+ "reason": {
166
+ "enum": [
167
+ "oversize",
168
+ "unreadable",
169
+ "unstable",
170
+ "io-error",
171
+ "baseline-unknown"
172
+ ]
173
+ }
174
+ }
175
+ }
176
+ ]
177
+ }
178
+ }
179
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.harness.evidence.v1.json",
4
+ "title": "slipstream.harness.evidence.v1",
5
+ "$comment": "One durable, normalized harness-transcript record used to refine attribution. Never a filesystem-change event and never authorship. Records sharing an evidence_key describe one invocation (e.g. a start and an end); conflicting records under one key are all retained and disclosed, never merged. Self-contained; unknown fields permitted for forward compatibility.",
6
+ "type": "object",
7
+ "required": [
8
+ "specversion",
9
+ "id",
10
+ "source",
11
+ "type",
12
+ "datacontenttype",
13
+ "seq",
14
+ "time",
15
+ "data"
16
+ ],
17
+ "properties": {
18
+ "specversion": {
19
+ "const": "1.0"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[1-9][0-9]*$"
24
+ },
25
+ "source": {
26
+ "type": "string",
27
+ "pattern": "^urn:slipstream:session:"
28
+ },
29
+ "type": {
30
+ "const": "slipstream.harness.evidence.v1"
31
+ },
32
+ "datacontenttype": {
33
+ "const": "application/json"
34
+ },
35
+ "seq": {
36
+ "type": "string",
37
+ "pattern": "^[1-9][0-9]*$"
38
+ },
39
+ "time": {
40
+ "type": "string",
41
+ "format": "date-time"
42
+ },
43
+ "data": {
44
+ "type": "object",
45
+ "required": [
46
+ "session_id",
47
+ "evidence_key",
48
+ "adapter_version",
49
+ "tool_name",
50
+ "timestamp",
51
+ "file_scope"
52
+ ],
53
+ "properties": {
54
+ "session_id": {
55
+ "type": "string"
56
+ },
57
+ "evidence_key": {
58
+ "type": "object",
59
+ "required": [
60
+ "harness",
61
+ "harness_session_id",
62
+ "record_id"
63
+ ],
64
+ "properties": {
65
+ "harness": {
66
+ "enum": [
67
+ "claude-code",
68
+ "codex"
69
+ ]
70
+ },
71
+ "harness_session_id": {
72
+ "type": "string"
73
+ },
74
+ "record_id": {
75
+ "type": "string"
76
+ }
77
+ }
78
+ },
79
+ "adapter_version": {
80
+ "type": "string"
81
+ },
82
+ "tool_name": {
83
+ "type": "string"
84
+ },
85
+ "timestamp": {
86
+ "type": "object",
87
+ "required": [
88
+ "at_ms",
89
+ "basis"
90
+ ],
91
+ "properties": {
92
+ "at_ms": {
93
+ "type": "integer",
94
+ "minimum": 0
95
+ },
96
+ "basis": {
97
+ "enum": [
98
+ "tool-start",
99
+ "tool-end",
100
+ "record-time"
101
+ ]
102
+ }
103
+ }
104
+ },
105
+ "file_scope": {
106
+ "oneOf": [
107
+ {
108
+ "type": "object",
109
+ "required": [
110
+ "kind",
111
+ "paths"
112
+ ],
113
+ "properties": {
114
+ "kind": {
115
+ "const": "paths"
116
+ },
117
+ "paths": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "string"
121
+ }
122
+ }
123
+ }
124
+ },
125
+ {
126
+ "type": "object",
127
+ "required": [
128
+ "kind",
129
+ "reason"
130
+ ],
131
+ "properties": {
132
+ "kind": {
133
+ "const": "unknown"
134
+ },
135
+ "reason": {
136
+ "type": "string"
137
+ }
138
+ }
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.question.answered.v1.json",
4
+ "title": "slipstream.question.answered.v1",
5
+ "$comment": "An answer returned through the slipstream_answer_question tool by the harness session a question was dispatched to. It proves the call came through that session, not which agent in the session wrote it.",
6
+ "type": "object",
7
+ "required": ["specversion", "id", "source", "type", "datacontenttype", "seq", "time", "subject", "data"],
8
+ "properties": {
9
+ "specversion": { "const": "1.0" },
10
+ "id": { "type": "string", "pattern": "^[1-9][0-9]*$" },
11
+ "source": { "type": "string", "pattern": "^urn:slipstream:session:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
12
+ "type": { "const": "slipstream.question.answered.v1" },
13
+ "datacontenttype": { "const": "application/json" },
14
+ "seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
15
+ "time": { "type": "string", "format": "date-time" },
16
+ "subject": { "type": "string", "pattern": "^question/[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
17
+ "data": {
18
+ "type": "object",
19
+ "required": ["session_id", "question_id", "attempt_seq", "text", "answered_at_ms"],
20
+ "properties": {
21
+ "session_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
22
+ "question_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
23
+ "attempt_seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
24
+ "text": { "type": "string", "minLength": 1, "maxLength": 16384 },
25
+ "answered_at_ms": { "type": "integer", "minimum": 0 }
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.question.dispatch_attempted.v1.json",
4
+ "title": "slipstream.question.dispatch_attempted.v1",
5
+ "$comment": "A durable delivery attempt committed before the hook response. It does not prove receipt or an answer.",
6
+ "type": "object",
7
+ "required": ["specversion", "id", "source", "type", "datacontenttype", "seq", "time", "subject", "data"],
8
+ "properties": {
9
+ "specversion": { "const": "1.0" },
10
+ "id": { "type": "string", "pattern": "^[1-9][0-9]*$" },
11
+ "source": { "type": "string", "pattern": "^urn:slipstream:session:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
12
+ "type": { "const": "slipstream.question.dispatch_attempted.v1" },
13
+ "datacontenttype": { "const": "application/json" },
14
+ "seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
15
+ "time": { "type": "string", "format": "date-time" },
16
+ "subject": { "type": "string", "pattern": "^question/[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
17
+ "data": {
18
+ "type": "object",
19
+ "required": ["session_id", "question_id", "queued_seq", "attempted_at_ms"],
20
+ "properties": {
21
+ "session_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
22
+ "question_id": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
23
+ "queued_seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
24
+ "attempted_at_ms": { "type": "integer", "minimum": 0 }
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.question.queued.v1.json",
4
+ "title": "slipstream.question.queued.v1",
5
+ "$comment": "A durable queue admission. It acknowledges persistence, never target-harness or model receipt. Self-contained; unknown fields permitted for forward compatibility.",
6
+ "type": "object",
7
+ "required": ["specversion", "id", "source", "type", "datacontenttype", "seq", "time", "subject", "data"],
8
+ "properties": {
9
+ "specversion": { "const": "1.0" },
10
+ "id": { "type": "string", "pattern": "^[1-9][0-9]*$" },
11
+ "source": { "type": "string", "pattern": "^urn:slipstream:session:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
12
+ "type": { "const": "slipstream.question.queued.v1" },
13
+ "datacontenttype": { "const": "application/json" },
14
+ "seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
15
+ "time": { "type": "string", "format": "date-time" },
16
+ "subject": { "type": "string", "pattern": "^question/[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
17
+ "data": {
18
+ "type": "object",
19
+ "required": ["session_id", "question_id", "request_id", "target", "text", "context", "queued_at_ms", "expires_at_ms"],
20
+ "properties": {
21
+ "session_id": { "$ref": "#/$defs/uuid" },
22
+ "question_id": { "$ref": "#/$defs/uuid" },
23
+ "request_id": { "$ref": "#/$defs/uuid" },
24
+ "target": {
25
+ "type": "object",
26
+ "required": ["harness", "harness_session_id", "worktree"],
27
+ "properties": {
28
+ "harness": { "enum": ["claude-code", "codex"] },
29
+ "harness_session_id": { "type": "string", "minLength": 1 },
30
+ "worktree": { "type": "string", "minLength": 1 }
31
+ }
32
+ },
33
+ "text": { "type": "string", "minLength": 1 },
34
+ "context": {
35
+ "type": "object",
36
+ "required": ["change_seq", "path", "snapshot_sha256", "line_start", "line_end", "selected_text"],
37
+ "properties": {
38
+ "change_seq": { "type": "string", "pattern": "^[1-9][0-9]*$" },
39
+ "path": { "type": "string", "minLength": 1 },
40
+ "snapshot_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
41
+ "line_start": { "type": "integer", "minimum": 1 },
42
+ "line_end": { "type": "integer", "minimum": 1 },
43
+ "selected_text": { "type": "string" }
44
+ }
45
+ },
46
+ "queued_at_ms": { "type": "integer", "minimum": 0 },
47
+ "expires_at_ms": { "type": "integer", "minimum": 0 },
48
+ "reply_to_question_id": { "$ref": "#/$defs/uuid" }
49
+ }
50
+ }
51
+ },
52
+ "$defs": {
53
+ "uuid": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" }
54
+ }
55
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://slipstream.dev/schemas/slipstream.session.resumed.v1.json",
4
+ "title": "slipstream.session.resumed.v1",
5
+ "$comment": "Recorded on restart at recovered_through_seq + 1. Self-contained; unknown fields permitted for forward compatibility.",
6
+ "type": "object",
7
+ "required": [
8
+ "specversion",
9
+ "id",
10
+ "source",
11
+ "type",
12
+ "datacontenttype",
13
+ "seq",
14
+ "time",
15
+ "data"
16
+ ],
17
+ "properties": {
18
+ "specversion": {
19
+ "const": "1.0"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[1-9][0-9]*$"
24
+ },
25
+ "source": {
26
+ "type": "string",
27
+ "pattern": "^urn:slipstream:session:"
28
+ },
29
+ "type": {
30
+ "const": "slipstream.session.resumed.v1"
31
+ },
32
+ "datacontenttype": {
33
+ "const": "application/json"
34
+ },
35
+ "seq": {
36
+ "type": "string",
37
+ "pattern": "^[1-9][0-9]*$"
38
+ },
39
+ "time": {
40
+ "type": "string",
41
+ "format": "date-time"
42
+ },
43
+ "data": {
44
+ "type": "object",
45
+ "required": [
46
+ "session_id",
47
+ "recovered_through_seq",
48
+ "discarded_tail_bytes",
49
+ "resumed_at_ms"
50
+ ],
51
+ "properties": {
52
+ "session_id": {
53
+ "type": "string"
54
+ },
55
+ "recovered_through_seq": {
56
+ "type": "string",
57
+ "pattern": "^[0-9]+$"
58
+ },
59
+ "discarded_tail_bytes": {
60
+ "type": "integer",
61
+ "minimum": 0
62
+ },
63
+ "resumed_at_ms": {
64
+ "type": "integer",
65
+ "minimum": 0
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }