@h1r-ai/croche-react-native 0.0.0-stage → 0.5.1

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 (77) hide show
  1. package/LICENSE +32 -0
  2. package/README.md +486 -2
  3. package/THIRD-PARTY-NOTICES +5824 -0
  4. package/android/build.gradle +47 -0
  5. package/android/src/main/AndroidManifest.xml +8 -0
  6. package/android/src/main/java/dev/croche/reactnative/AgentMemory.kt +25 -0
  7. package/android/src/main/java/dev/croche/reactnative/CrocheRuntimeModule.kt +837 -0
  8. package/android/src/main/java/dev/croche/reactnative/CrocheRuntimePackage.kt +22 -0
  9. package/android/src/main/java/dev/croche/reactnative/ProjectAttestation.kt +17 -0
  10. package/android/src/main/java/dev/croche/reactnative/ProjectTimeZone.kt +14 -0
  11. package/android/src/test/java/dev/croche/reactnative/AgentMemoryTest.kt +49 -0
  12. package/android/src/test/java/dev/croche/reactnative/ProjectAttestationTest.kt +42 -0
  13. package/android/src/test/java/dev/croche/reactnative/ProjectTimeZoneTest.kt +24 -0
  14. package/android/vendor/CrocheRuntimeSDK/android/dev/croche/android/AndroidPlatform.kt +133 -0
  15. package/android/vendor/CrocheRuntimeSDK/android/dev/croche/android/BitmapImageCodec.kt +47 -0
  16. package/android/vendor/CrocheRuntimeSDK/android/dev/croche/android/CrocheProjectRecordProvider.kt +32 -0
  17. package/android/vendor/CrocheRuntimeSDK/android/dev/croche/android/WorkManagerScheduler.kt +146 -0
  18. package/android/vendor/CrocheRuntimeSDK/consumer-rules.pro +9 -0
  19. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/AppStreamBranch.kt +110 -0
  20. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Control.kt +178 -0
  21. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Core.kt +12 -0
  22. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Croche.kt +120 -0
  23. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/CrocheAgent.kt +116 -0
  24. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/CrocheRuntime.kt +415 -0
  25. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Effects.kt +195 -0
  26. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Host.kt +379 -0
  27. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Images.kt +161 -0
  28. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/NativeCoreStreamPort.kt +173 -0
  29. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Platform.kt +105 -0
  30. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ProjectBinding.kt +79 -0
  31. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ProjectPalRouting.kt +25 -0
  32. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ProjectPlatform.kt +46 -0
  33. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ProjectRecords.kt +87 -0
  34. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ProjectTypes.kt +44 -0
  35. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/SendEncoding.kt +27 -0
  36. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/Storage.kt +181 -0
  37. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/StreamHub.kt +227 -0
  38. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/SubscriptionTypes.kt +74 -0
  39. package/android/vendor/CrocheRuntimeSDK/core/dev/croche/ffi/croche_ffi.kt +8316 -0
  40. package/android/vendor/jniLibs/arm64-v8a/libcroche_ffi.so +0 -0
  41. package/android/vendor/jniLibs/armeabi-v7a/libcroche_ffi.so +0 -0
  42. package/android/vendor/jniLibs/x86_64/libcroche_ffi.so +0 -0
  43. package/croche-react-native.podspec +28 -0
  44. package/ios/CrocheRuntimeBridge.swift +1008 -0
  45. package/ios/RNCrocheRuntime.mm +221 -0
  46. package/ios/vendor/CrocheRuntimeSDK/Background.swift +59 -0
  47. package/ios/vendor/CrocheRuntimeSDK/Control.swift +192 -0
  48. package/ios/vendor/CrocheRuntimeSDK/Effects.swift +194 -0
  49. package/ios/vendor/CrocheRuntimeSDK/FFIStreamPort.swift +215 -0
  50. package/ios/vendor/CrocheRuntimeSDK/Host.swift +562 -0
  51. package/ios/vendor/CrocheRuntimeSDK/Images.swift +178 -0
  52. package/ios/vendor/CrocheRuntimeSDK/JSON.swift +63 -0
  53. package/ios/vendor/CrocheRuntimeSDK/OpenOptions.swift +172 -0
  54. package/ios/vendor/CrocheRuntimeSDK/Platform.swift +275 -0
  55. package/ios/vendor/CrocheRuntimeSDK/PortableSHA256.swift +42 -0
  56. package/ios/vendor/CrocheRuntimeSDK/Project.swift +271 -0
  57. package/ios/vendor/CrocheRuntimeSDK/Runtime.swift +558 -0
  58. package/ios/vendor/CrocheRuntimeSDK/Storage.swift +345 -0
  59. package/ios/vendor/CrocheRuntimeSDK/StreamHub.swift +453 -0
  60. package/ios/vendor/CrocheRuntimeSDK/SubscriptionRuntime.swift +38 -0
  61. package/ios/vendor/CrocheRuntimeSDK/SubscriptionTypes.swift +345 -0
  62. package/ios/vendor/CrocheRuntimeSDK/croche_ffi.swift +5666 -0
  63. package/ios/vendor/croche_ffiFFI.xcframework/Info.plist +48 -0
  64. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64/Headers/croche_ffiFFI.h +2006 -0
  65. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64/Headers/module.modulemap +4 -0
  66. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64/libcroche_ffi.a +0 -0
  67. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64_x86_64-simulator/Headers/croche_ffiFFI.h +2006 -0
  68. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap +4 -0
  69. package/ios/vendor/croche_ffiFFI.xcframework/ios-arm64_x86_64-simulator/libcroche_ffi.a +0 -0
  70. package/package.json +40 -4
  71. package/scripts/vendor-native.sh +56 -0
  72. package/src/NativeCrocheRuntime.ts +162 -0
  73. package/src/index.ts +660 -0
  74. package/src/project-types.ts +35 -0
  75. package/src/project.ts +434 -0
  76. package/src/protocol.ts +28 -0
  77. package/src/types.ts +9 -0
@@ -0,0 +1,345 @@
1
+ import Foundation
2
+
3
+ public enum ImageResolution: String, Sendable, Codable { case standard, high }
4
+ public enum ImageMime: String, Sendable, Codable { case png, jpeg, webp, gif }
5
+ public struct InputImage: Sendable, Equatable {
6
+ let value: JSON
7
+ public init(data: Data, mime: ImageMime, alt: String? = nil, resolution: ImageResolution? = nil) {
8
+ var fields: [String: JSON] = ["data": .string(data.base64EncodedString()), "mime": .string("image/" + mime.rawValue)]
9
+ if let alt { fields["alt"] = .string(alt) }
10
+ if let resolution { fields["resolution"] = .string(resolution.rawValue) }
11
+ value = .object(fields)
12
+ }
13
+ public init(url: URL, alt: String? = nil) {
14
+ var fields: [String: JSON] = ["url": .string(url.absoluteString)]
15
+ if let alt { fields["alt"] = .string(alt) }
16
+ value = .object(fields)
17
+ }
18
+ }
19
+ public struct StackedInput: Sendable, Equatable {
20
+ public let kind: InputKind
21
+ public let text: String?
22
+ public let images: [InputImage]
23
+ public init(kind: InputKind = .user, text: String? = nil, images: [InputImage] = []) {
24
+ self.kind = kind; self.text = text; self.images = images
25
+ }
26
+ }
27
+ public struct SendInput: Sendable, Equatable {
28
+ public let id: String
29
+ public let text: String
30
+ public let kind: InputKind
31
+ public let images: [InputImage]
32
+ public let context: JSON?
33
+ public let inputs: [StackedInput]
34
+ public init(id: String, text: String, kind: InputKind = .user, images: [InputImage] = [], context: JSON? = nil) {
35
+ self.init(id: id, text: text, kind: kind, images: images, inputs: [], context: context)
36
+ }
37
+ public init(id: String, inputs: [StackedInput], context: JSON? = nil) {
38
+ self.init(id: id, text: "", kind: .user, images: [], inputs: inputs, context: context)
39
+ }
40
+ // Internal malformed-input construction for contract tests and fixture JSON;
41
+ // the public initializers select one form.
42
+ init(id: String, text: String, kind: InputKind, images: [InputImage], inputs: [StackedInput], context: JSON?) {
43
+ self.id = id; self.text = text; self.kind = kind; self.images = images; self.inputs = inputs; self.context = context
44
+ }
45
+ func wireJSON() throws -> JSON {
46
+ let encoder = JSONEncoder()
47
+ func kindJSON(_ kind: InputKind) throws -> JSON { try JSON(data: encoder.encode(kind)) }
48
+ var fields: [String: JSON] = ["id": .string(id)]
49
+ if let context { fields["context"] = context }
50
+ if !inputs.isEmpty {
51
+ fields["inputs"] = .array(try inputs.map { part in
52
+ var partFields: [String: JSON] = ["kind": try kindJSON(part.kind)]
53
+ if let text = part.text { partFields["text"] = .string(text) }
54
+ if !part.images.isEmpty { partFields["images"] = .array(part.images.map(\.value)) }
55
+ return .object(partFields)
56
+ })
57
+ if !text.isEmpty { fields["text"] = .string(text) }
58
+ if kind != .user { fields["kind"] = try kindJSON(kind) }
59
+ } else {
60
+ fields["text"] = .string(text); fields["kind"] = try kindJSON(kind)
61
+ }
62
+ if !images.isEmpty { fields["images"] = .array(images.map(\.value)) }
63
+ guard fields["inputs"] == nil || (fields["text"] == nil && fields["kind"] == nil && fields["images"] == nil) else {
64
+ throw CrocheError("invalid_input", "Send either text and kind (one input) or inputs (a stack), not both")
65
+ }
66
+ return .object(fields)
67
+ }
68
+ func coreJSON(options: SendOptions) throws -> JSON {
69
+ let value = try wireJSON()
70
+ #if CROCHE_SUBSCRIPTION_HOST
71
+ return value
72
+ #else
73
+ return Images.prepareInput(value, fallback: options.imageResolution)
74
+ #endif
75
+ }
76
+ }
77
+ public struct SendOptions: Sendable, Equatable {
78
+ public let responseFormat: JSON?
79
+ public let imageResolution: ImageResolution?
80
+ public init(responseFormat: JSON? = nil, imageResolution: ImageResolution? = nil) {
81
+ self.responseFormat = responseFormat; self.imageResolution = imageResolution
82
+ }
83
+ }
84
+ public enum RequestWait: Sendable { case idle }
85
+ public struct Receipt: Sendable, Equatable { public let id: String; public let status: InputStatus; public let seq: Int? }
86
+ public struct RequestResult: Sendable, Equatable {
87
+ public let id: String
88
+ public let status: InputStatus
89
+ public let messages: [MessageEnd]
90
+ public let gap: Bool
91
+ public let legacy: Bool
92
+ // RequestResult.pending comes with the coordinated TS/Swift/Kotlin consuming-unit change.
93
+ }
94
+ public struct Cursor: Sendable, Codable, Hashable {
95
+ public let logId: String
96
+ public let seq: Int
97
+ public init(logId: String, seq: Int) { self.logId = logId; self.seq = seq }
98
+ }
99
+ public struct StreamError: Sendable, Codable, Equatable { public let code: String; public let message: String; public let poisoned: Bool }
100
+ public struct RuntimeError: Sendable, Codable, Hashable { public let code: String; public let message: String }
101
+ public struct ToolSource: Sendable, Codable, Equatable { public let command: String; public let callId: String }
102
+ public struct ImageSummary: Sendable, Codable, Equatable { public let alt: String?; public let mime: String?; public let bytes: Int? }
103
+ public struct InputEvent: Sendable, Codable, Equatable {
104
+ public let seq: Int; public let firstSeq: Int; public let id: String; public let kind: InputKind
105
+ public let text: String?; public let images: [ImageSummary]; public let status: InputStatus
106
+ public let error: RuntimeError?; public let at: Date
107
+ }
108
+ public struct MessageStart: Sendable, Codable, Equatable { public let seq: Int; public let firstSeq: Int; public let id: String; public let at: Date }
109
+ public struct MessageDelta: Sendable, Codable, Equatable { public let id: String; public let text: String }
110
+ public struct MessageEnd: Sendable, Codable, Equatable {
111
+ public let seq: Int; public let firstSeq: Int; public let id: String
112
+ public let status: MessageStatus; public let text: String; public let markers: [String]; public let output: JSON?
113
+ public let inReplyTo: [String]; public let causedBy: [String]; public let error: RuntimeError?; public let at: Date
114
+ }
115
+ public struct Cleared: Sendable, Codable, Equatable { public let seq: Int; public let id: String; public let at: Date }
116
+ public struct Page: Sendable, Equatable { public let messages: [RuntimeEvent]; public let reachedFloor: Bool; public let logId: String; public let clearedSeq: Int }
117
+ public struct AppStreamEvent: Sendable, Codable, Equatable { public let seq: Int; public let id: String; public let name: String; public let data: JSON; public let source: ToolSource; public let at: Date }
118
+ public struct TurnEvent: Sendable, Codable, Equatable {
119
+ public let seq: Int; public let id: String; public let causedBy: [String]; public let inputs: [String]; public let purpose: String; public let usage: [String: Int]
120
+ public let costUsd: Double; public let costStatus: CostStatus; public let model: String; public let imagesOmitted: Int?; public let at: Date
121
+ }
122
+ public struct StateEvent: Sendable, Codable, Equatable {
123
+ public let status: AgentStatus; public let queued: Int; public let typing: Bool
124
+ /// What a running agent waits on: set exactly while `status` is `.running`, nil otherwise.
125
+ public let activity: AgentActivity?
126
+ /// With `.tool` only: the command keys the round runs, in call order. Never arguments.
127
+ public let tools: [String]?
128
+ public init(status: AgentStatus, queued: Int, typing: Bool, activity: AgentActivity? = nil, tools: [String]? = nil) {
129
+ self.status = status; self.queued = queued; self.typing = typing; self.activity = activity; self.tools = tools
130
+ }
131
+ }
132
+ public struct ErrorEvent: Sendable, Codable, Equatable { public let seq: Int; public let id: String; public let code: String; public let message: String; public let inputs: [String]; public let at: Date }
133
+ public struct Gap: Sendable, Codable, Equatable { public let afterSeq: Int; public let throughSeq: Int; public let reason: GapReason }
134
+ public struct Snapshot: Sendable, Codable, Equatable { public let logId: String; public let state: StateEvent; public let streaming: Streaming? }
135
+ public struct Streaming: Sendable, Codable, Equatable { public let messageId: String; public let firstSeq: Int; public let text: String }
136
+ public enum RuntimeEvent: Sendable, Equatable {
137
+ case input(InputEvent), messageStart(MessageStart), messageDelta(MessageDelta), messageEnd(MessageEnd)
138
+ case cleared(Cleared), page(Page), app(AppStreamEvent), turn(TurnEvent), state(StateEvent), error(ErrorEvent)
139
+ case gap(Gap), snapshot(Snapshot), streamError(StreamError), replaced, unknown(type: String)
140
+ public var seq: Int? {
141
+ switch self {
142
+ case .input(let v): v.seq
143
+ case .messageStart(let v): v.seq
144
+ case .messageEnd(let v): v.seq
145
+ case .cleared(let v): v.seq
146
+ case .app(let v): v.seq
147
+ case .turn(let v): v.seq
148
+ case .error(let v): v.seq
149
+ default: nil
150
+ }
151
+ }
152
+ }
153
+
154
+ public enum InputKind: Sendable, Codable, Hashable {
155
+ case user, event, unknown(String)
156
+ public init(from decoder: Decoder) throws {
157
+ let value = try decoder.singleValueContainer().decode(String.self)
158
+ switch value {
159
+ case "user": self = .user
160
+ case "event": self = .event
161
+ default: self = .unknown(value)
162
+ }
163
+ }
164
+ public func encode(to encoder: Encoder) throws {
165
+ var container = encoder.singleValueContainer()
166
+ switch self {
167
+ case .user: try container.encode("user")
168
+ case .event: try container.encode("event")
169
+ case .unknown(let value): try container.encode(value)
170
+ }
171
+ }
172
+ }
173
+
174
+ public enum InputStatus: Sendable, Codable, Hashable {
175
+ case queued, seen, answered, noReply, failed, cancelled, settledBeforeUpgrade, unknown(String)
176
+ public init(from decoder: Decoder) throws {
177
+ let value = try decoder.singleValueContainer().decode(String.self)
178
+ switch value {
179
+ case "queued": self = .queued
180
+ case "seen": self = .seen
181
+ case "answered": self = .answered
182
+ case "no_reply": self = .noReply
183
+ case "failed": self = .failed
184
+ case "cancelled": self = .cancelled
185
+ case "settled_before_upgrade": self = .settledBeforeUpgrade
186
+ default: self = .unknown(value)
187
+ }
188
+ }
189
+ public func encode(to encoder: Encoder) throws {
190
+ var container = encoder.singleValueContainer()
191
+ switch self {
192
+ case .queued: try container.encode("queued")
193
+ case .seen: try container.encode("seen")
194
+ case .answered: try container.encode("answered")
195
+ case .noReply: try container.encode("no_reply")
196
+ case .failed: try container.encode("failed")
197
+ case .cancelled: try container.encode("cancelled")
198
+ case .settledBeforeUpgrade: try container.encode("settled_before_upgrade")
199
+ case .unknown(let value): try container.encode(value)
200
+ }
201
+ }
202
+ }
203
+
204
+ public enum MessageStatus: Sendable, Codable, Hashable {
205
+ case completed, failed, cancelled, interrupted, unknown(String)
206
+ public init(from decoder: Decoder) throws {
207
+ let value = try decoder.singleValueContainer().decode(String.self)
208
+ switch value {
209
+ case "completed": self = .completed
210
+ case "failed": self = .failed
211
+ case "cancelled": self = .cancelled
212
+ case "interrupted": self = .interrupted
213
+ default: self = .unknown(value)
214
+ }
215
+ }
216
+ public func encode(to encoder: Encoder) throws {
217
+ var container = encoder.singleValueContainer()
218
+ switch self {
219
+ case .completed: try container.encode("completed")
220
+ case .failed: try container.encode("failed")
221
+ case .cancelled: try container.encode("cancelled")
222
+ case .interrupted: try container.encode("interrupted")
223
+ case .unknown(let value): try container.encode(value)
224
+ }
225
+ }
226
+ }
227
+
228
+ /// The stream `state`'s `activity`: a model call, a summary call (held before the reply), or a
229
+ /// tool round. A value this SDK does not know yet decodes as `.unknown`, never a stream error.
230
+ public enum AgentActivity: Sendable, Codable, Hashable {
231
+ case model, summary, tool, unknown(String)
232
+ public init(from decoder: Decoder) throws {
233
+ let value = try decoder.singleValueContainer().decode(String.self)
234
+ switch value {
235
+ case "model": self = .model
236
+ case "summary": self = .summary
237
+ case "tool": self = .tool
238
+ default: self = .unknown(value)
239
+ }
240
+ }
241
+ public func encode(to encoder: Encoder) throws {
242
+ var container = encoder.singleValueContainer()
243
+ switch self {
244
+ case .model: try container.encode("model")
245
+ case .summary: try container.encode("summary")
246
+ case .tool: try container.encode("tool")
247
+ case .unknown(let value): try container.encode(value)
248
+ }
249
+ }
250
+ }
251
+ public enum AgentStatus: Sendable, Codable, Hashable {
252
+ case running, waiting, idle, unknown(String)
253
+ public init(from decoder: Decoder) throws {
254
+ let value = try decoder.singleValueContainer().decode(String.self)
255
+ switch value {
256
+ case "running": self = .running
257
+ case "waiting": self = .waiting
258
+ case "idle": self = .idle
259
+ default: self = .unknown(value)
260
+ }
261
+ }
262
+ public func encode(to encoder: Encoder) throws {
263
+ var container = encoder.singleValueContainer()
264
+ switch self {
265
+ case .running: try container.encode("running")
266
+ case .waiting: try container.encode("waiting")
267
+ case .idle: try container.encode("idle")
268
+ case .unknown(let value): try container.encode(value)
269
+ }
270
+ }
271
+ }
272
+
273
+ public enum CostStatus: Sendable, Codable, Hashable {
274
+ case reported, estimated, none, unknown(String)
275
+ public init(from decoder: Decoder) throws {
276
+ let value = try decoder.singleValueContainer().decode(String.self)
277
+ switch value {
278
+ case "reported": self = .reported
279
+ case "estimated": self = .estimated
280
+ case "none": self = .none
281
+ default: self = .unknown(value)
282
+ }
283
+ }
284
+ public func encode(to encoder: Encoder) throws {
285
+ var container = encoder.singleValueContainer()
286
+ switch self {
287
+ case .reported: try container.encode("reported")
288
+ case .estimated: try container.encode("estimated")
289
+ case .none: try container.encode("none")
290
+ case .unknown(let value): try container.encode(value)
291
+ }
292
+ }
293
+ }
294
+
295
+ public enum GapReason: Sendable, Codable, Hashable {
296
+ case cleared, limit, unknown(String)
297
+ public init(from decoder: Decoder) throws {
298
+ let value = try decoder.singleValueContainer().decode(String.self)
299
+ switch value {
300
+ case "cleared": self = .cleared
301
+ case "limit": self = .limit
302
+ default: self = .unknown(value)
303
+ }
304
+ }
305
+ public func encode(to encoder: Encoder) throws {
306
+ var container = encoder.singleValueContainer()
307
+ switch self {
308
+ case .cleared: try container.encode("cleared")
309
+ case .limit: try container.encode("limit")
310
+ case .unknown(let value): try container.encode(value)
311
+ }
312
+ }
313
+ }
314
+
315
+ extension InputStatus {
316
+ var terminal: Bool {
317
+ switch self { case .answered, .noReply, .failed, .cancelled, .settledBeforeUpgrade: true; default: false }
318
+ }
319
+ }
320
+ func clampedMaintenanceInterval(_ seconds: TimeInterval) throws -> TimeInterval {
321
+ guard seconds.isFinite else { throw CrocheError("invalid_configuration", "maintenanceInterval must be finite") }
322
+ return max(1, seconds)
323
+ }
324
+
325
+ public struct RequestOptions: Sendable {
326
+ public var responseFormat: JSON?
327
+ public var wait: RequestWait?
328
+ public init(responseFormat: JSON? = nil, wait: RequestWait? = nil) { self.responseFormat = responseFormat; self.wait = wait }
329
+ }
330
+ public struct SubscribeOptions: Sendable {
331
+ public var initialMessages: Int?
332
+ public var after: Cursor?
333
+ public var onEvent: @Sendable (RuntimeEvent) async -> Void
334
+ public init(initialMessages: Int? = nil, after: Cursor? = nil, onEvent: @escaping @Sendable (RuntimeEvent) async -> Void) {
335
+ self.initialMessages = initialMessages; self.after = after; self.onEvent = onEvent
336
+ }
337
+ }
338
+ public struct HistoryOptions: Sendable {
339
+ public var before: Int?
340
+ public var limit: Int
341
+ public init(before: Int? = nil, limit: Int) { self.before = before; self.limit = limit }
342
+ }
343
+ public struct AppStreamEnd: Sendable, Equatable {
344
+ public let code: String
345
+ }