@collective-intelligence/ai 0.0.0-placeholder.0 → 0.7.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 (172) hide show
  1. package/AGENTS.md +52 -0
  2. package/README.md +463 -1
  3. package/dist/api/access-check.d.ts +18 -0
  4. package/dist/api/answer-sources.d.ts +48 -0
  5. package/dist/api/attachments-api.d.ts +187 -0
  6. package/dist/api/catalog-api.d.ts +408 -0
  7. package/dist/api/chat-api.d.ts +2401 -0
  8. package/dist/api/chat-surface-api.d.ts +4186 -0
  9. package/dist/api/compaction.d.ts +52 -0
  10. package/dist/api/conversations.d.ts +107 -0
  11. package/dist/api/errors.d.ts +117 -0
  12. package/dist/api/feedback-api.d.ts +185 -0
  13. package/dist/api/files.d.ts +22 -0
  14. package/dist/api/ids.d.ts +33 -0
  15. package/dist/api/index.d.ts +21 -0
  16. package/dist/api/intents-api.d.ts +65 -0
  17. package/dist/api/place-context.d.ts +34 -0
  18. package/dist/api/projects-api.d.ts +718 -0
  19. package/dist/api/speech-api.d.ts +345 -0
  20. package/dist/api/transcript.d.ts +260 -0
  21. package/dist/api/turns.d.ts +196 -0
  22. package/dist/api.d.ts +21 -0
  23. package/dist/api.js +1 -0
  24. package/dist/domain/access.d.ts +29 -0
  25. package/dist/domain/context-trail.d.ts +65 -0
  26. package/dist/domain/data-parts.d.ts +247 -0
  27. package/dist/domain/errors.d.ts +28 -0
  28. package/dist/domain/index.d.ts +14 -0
  29. package/dist/domain/intents.d.ts +101 -0
  30. package/dist/domain/message.d.ts +173 -0
  31. package/dist/domain/place.d.ts +17 -0
  32. package/dist/domain/runtime-value.d.ts +16 -0
  33. package/dist/domain-50vzrrp9.js +2 -0
  34. package/dist/domain-5fpd4fte.js +1 -0
  35. package/dist/domain-9wzbv87n.js +2 -0
  36. package/dist/domain-g97xs965.js +2 -0
  37. package/dist/domain-hk3yw2m7.js +1 -0
  38. package/dist/domain-qyts6dgz.js +0 -0
  39. package/dist/domain-s07s1ry1.js +2 -0
  40. package/dist/domain.d.ts +14 -0
  41. package/dist/domain.js +1 -0
  42. package/dist/headless/access/access-store.d.ts +28 -0
  43. package/dist/headless/access/visibility.d.ts +24 -0
  44. package/dist/headless/blocked-state.d.ts +21 -0
  45. package/dist/headless/chat-registry.d.ts +63 -0
  46. package/dist/headless/chat-session-provider.d.ts +109 -0
  47. package/dist/headless/chat-surface.d.ts +4210 -0
  48. package/dist/headless/host-ports.d.ts +146 -0
  49. package/dist/headless/index.d.ts +33 -0
  50. package/dist/headless/intents/card-ends.d.ts +22 -0
  51. package/dist/headless/intents/intent-call.d.ts +28 -0
  52. package/dist/headless/intents/intents-provider.d.ts +108 -0
  53. package/dist/headless/intents/page-registry.d.ts +129 -0
  54. package/dist/headless/intents/use-intent-dispatch.d.ts +60 -0
  55. package/dist/headless/intents/use-intents.d.ts +11 -0
  56. package/dist/headless/intents/use-returned-intent-handle.d.ts +11 -0
  57. package/dist/headless/launch/chat-launch.d.ts +42 -0
  58. package/dist/headless/launch/launch-target.d.ts +25 -0
  59. package/dist/headless/launch/submit.d.ts +29 -0
  60. package/dist/headless/run-state.d.ts +16 -0
  61. package/dist/headless/sent-files.d.ts +20 -0
  62. package/dist/headless/server-started-turn-follow.proof.d.ts +26 -0
  63. package/dist/headless/session-machine.d.ts +745 -0
  64. package/dist/headless/trail/buffer.d.ts +48 -0
  65. package/dist/headless/trail/json-ld.d.ts +10 -0
  66. package/dist/headless/trail/switches.d.ts +10 -0
  67. package/dist/headless/trail/trail-provider.d.ts +53 -0
  68. package/dist/headless/transcript-messages.d.ts +26 -0
  69. package/dist/headless.d.ts +33 -0
  70. package/dist/headless.js +2 -0
  71. package/dist/transport/chat-client.d.ts +25 -0
  72. package/dist/transport/chat-transport.d.ts +57 -0
  73. package/dist/transport/index.d.ts +6 -0
  74. package/dist/transport/simulated-chat-transport.d.ts +39 -0
  75. package/dist/transport.d.ts +6 -0
  76. package/dist/transport.js +1 -0
  77. package/dist/views/assistant-sidebar/assistant-sidebar.d.ts +15 -0
  78. package/dist/views/assistant-sidebar/layout.d.ts +47 -0
  79. package/dist/views/assistant-sidebar/toggle.d.ts +14 -0
  80. package/dist/views/assistant-sidebar/use-shortcut.d.ts +11 -0
  81. package/dist/views/blocked/chat-blocked-state.d.ts +15 -0
  82. package/dist/views/chat-operations.d.ts +46 -0
  83. package/dist/views/chat-root.d.ts +14 -0
  84. package/dist/views/chat.d.ts +51 -0
  85. package/dist/views/composer/capability-picker.d.ts +77 -0
  86. package/dist/views/composer/capability-pickers.d.ts +24 -0
  87. package/dist/views/composer/chat-composer.d.ts +15 -0
  88. package/dist/views/composer/composer-picks.d.ts +31 -0
  89. package/dist/views/composer/composer-trail.d.ts +21 -0
  90. package/dist/views/composer/draft-attachments.d.ts +36 -0
  91. package/dist/views/composer/queued-messages.d.ts +9 -0
  92. package/dist/views/composer/send-menu.d.ts +11 -0
  93. package/dist/views/composer/slash-suggestions.d.ts +37 -0
  94. package/dist/views/composer/trail-chips.d.ts +15 -0
  95. package/dist/views/composer/voice-input/microphone.d.ts +14 -0
  96. package/dist/views/composer/voice-input/remote-transcription.d.ts +12 -0
  97. package/dist/views/composer/voice-input/use-voice-input.d.ts +30 -0
  98. package/dist/views/composer/voice-input/voice-input.d.ts +15 -0
  99. package/dist/views/dock/chat-dock.d.ts +57 -0
  100. package/dist/views/dock/dock-session.d.ts +22 -0
  101. package/dist/views/header/chat-header.d.ts +10 -0
  102. package/dist/views/header/compaction-controls.d.ts +17 -0
  103. package/dist/views/header/memory-switch.d.ts +16 -0
  104. package/dist/views/index.d.ts +58 -0
  105. package/dist/views/intents/form-fields.d.ts +38 -0
  106. package/dist/views/intents/intent-card.d.ts +61 -0
  107. package/dist/views/intents/intent-form.d.ts +23 -0
  108. package/dist/views/intents/intent-notices.d.ts +39 -0
  109. package/dist/views/intents/intent-trigger.d.ts +46 -0
  110. package/dist/views/intents/labels.d.ts +23 -0
  111. package/dist/views/labels/en.d.ts +3 -0
  112. package/dist/views/labels/index.d.ts +13 -0
  113. package/dist/views/labels/it.d.ts +3 -0
  114. package/dist/views/labels/types.d.ts +7 -0
  115. package/dist/views/launch/chat-launch-button.d.ts +21 -0
  116. package/dist/views/parts/answer-feedback.d.ts +26 -0
  117. package/dist/views/parts/evidence-part.d.ts +8 -0
  118. package/dist/views/parts/file-part.d.ts +8 -0
  119. package/dist/views/parts/image-generation-part.d.ts +9 -0
  120. package/dist/views/parts/image-generation.d.ts +84 -0
  121. package/dist/views/parts/intent-card-part.d.ts +8 -0
  122. package/dist/views/parts/memory-evidence-part.d.ts +7 -0
  123. package/dist/views/parts/message-parts.d.ts +21 -0
  124. package/dist/views/parts/question-part.d.ts +8 -0
  125. package/dist/views/parts/read-aloud.d.ts +23 -0
  126. package/dist/views/parts/reasoning-part.d.ts +8 -0
  127. package/dist/views/parts/steering-message-part.d.ts +7 -0
  128. package/dist/views/parts/text-part.d.ts +4 -0
  129. package/dist/views/parts/tool-part.d.ts +11 -0
  130. package/dist/views/parts/types.d.ts +103 -0
  131. package/dist/views/parts/use-read-aloud.d.ts +13 -0
  132. package/dist/views/run-trace/message-run.d.ts +17 -0
  133. package/dist/views/run-trace/run-stream.d.ts +128 -0
  134. package/dist/views/run-trace/run-trace-parts.d.ts +26 -0
  135. package/dist/views/run-trace/run-trace.d.ts +31 -0
  136. package/dist/views/sidebar/conversation-dialogs.d.ts +38 -0
  137. package/dist/views/sidebar/conversation-row.d.ts +23 -0
  138. package/dist/views/sidebar/conversation-sidebar.d.ts +10 -0
  139. package/dist/views/sidebar/date-groups.d.ts +12 -0
  140. package/dist/views/sidebar/history-filter.d.ts +57 -0
  141. package/dist/views/sidebar/projects/project-dialogs.d.ts +40 -0
  142. package/dist/views/sidebar/projects/project-files.d.ts +16 -0
  143. package/dist/views/sidebar/projects/project-groups.d.ts +19 -0
  144. package/dist/views/sidebar/projects/project-view.d.ts +21 -0
  145. package/dist/views/sidebar/projects/projects-section.d.ts +21 -0
  146. package/dist/views/sidebar/projects/use-chat-projects.d.ts +32 -0
  147. package/dist/views/slots.d.ts +148 -0
  148. package/dist/views/transcript/chat-transcript.d.ts +13 -0
  149. package/dist/views/transcript/sent-trail.d.ts +13 -0
  150. package/dist/views/transcript/use-image-reload.d.ts +16 -0
  151. package/dist/views.d.ts +58 -0
  152. package/dist/views.js +3 -0
  153. package/docs/guide/ai/index.md +377 -0
  154. package/docs/guide/ai/studio.md +245 -0
  155. package/docs/guide/data/connectors.md +267 -0
  156. package/docs/guide/data/datasets.md +145 -0
  157. package/docs/guide/data/documents.md +235 -0
  158. package/docs/guide/data/index.md +62 -0
  159. package/docs/guide/data/knowledge.md +214 -0
  160. package/docs/guide/develop/extensions.md +299 -0
  161. package/docs/guide/develop/external-apps.md +279 -0
  162. package/docs/guide/develop/infrastructure.md +135 -0
  163. package/docs/guide/develop/sdks.md +233 -0
  164. package/docs/guide/index.md +83 -0
  165. package/docs/guide/platform/access.md +311 -0
  166. package/docs/guide/platform/architecture.md +166 -0
  167. package/docs/guide/platform/built-ins.md +225 -0
  168. package/docs/guide/platform/entrypoints.md +318 -0
  169. package/docs/guide/scenarios/index.md +130 -0
  170. package/docs/guide/template/index.md +295 -0
  171. package/docs/guide/template/state-machines.md +294 -0
  172. package/package.json +120 -4
@@ -0,0 +1,4210 @@
1
+ import type { EffectRunner } from "@collective-intelligence/effect-xstate/actors";
2
+ import * as Context from "effect/Context";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import * as Schema from "effect/Schema";
6
+ import type { ChatSurfaceClient, ChatSurfaceClientOptions } from "../api/index.js";
7
+ import type { ChatFetch } from "../transport/index.js";
8
+ import { AiFailureError } from "../domain/index.js";
9
+ declare const ChatSurface_base: Context.ServiceClass<ChatSurface, "@collective-intelligence/ai/headless/ChatSurface", {
10
+ readonly chat: {
11
+ readonly cancelTurn: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"cancelTurn", "POST", "/chat/turns/:invocationId/cancel", Schema.toCodecStringTree<Schema.Struct<{
12
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
13
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
14
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
15
+ readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
16
+ }>>, Schema.toCodecJson<Schema.Struct<{
17
+ readonly correlationId: Schema.String;
18
+ readonly error: Schema.Struct<{
19
+ readonly details: Schema.optionalKey<Schema.Struct<{
20
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
21
+ }>>;
22
+ } & {
23
+ readonly code: Schema.Literal<"conflict">;
24
+ readonly message: Schema.String;
25
+ readonly retryable: Schema.Boolean;
26
+ }>;
27
+ readonly ok: Schema.Literal<false>;
28
+ }> | Schema.Struct<{
29
+ readonly correlationId: Schema.String;
30
+ readonly error: Schema.Struct<{
31
+ readonly details: Schema.Struct<{
32
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
33
+ }>;
34
+ } & {
35
+ readonly code: Schema.Literal<"forbidden">;
36
+ readonly message: Schema.String;
37
+ readonly retryable: Schema.Boolean;
38
+ }>;
39
+ readonly ok: Schema.Literal<false>;
40
+ }> | Schema.Struct<{
41
+ readonly correlationId: Schema.String;
42
+ readonly error: Schema.Struct<{
43
+ readonly code: Schema.Literal<"internal">;
44
+ readonly message: Schema.String;
45
+ readonly retryable: Schema.Boolean;
46
+ }>;
47
+ readonly ok: Schema.Literal<false>;
48
+ }> | Schema.Struct<{
49
+ readonly correlationId: Schema.String;
50
+ readonly error: Schema.Struct<{
51
+ readonly details: Schema.optionalKey<Schema.Struct<{
52
+ readonly filename: Schema.optionalKey<Schema.String>;
53
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
54
+ }>>;
55
+ } & {
56
+ readonly code: Schema.Literal<"invalid_request">;
57
+ readonly message: Schema.String;
58
+ readonly retryable: Schema.Boolean;
59
+ }>;
60
+ readonly ok: Schema.Literal<false>;
61
+ }> | Schema.Struct<{
62
+ readonly correlationId: Schema.String;
63
+ readonly error: Schema.Struct<{
64
+ readonly code: Schema.Literal<"not_found">;
65
+ readonly message: Schema.String;
66
+ readonly retryable: Schema.Boolean;
67
+ }>;
68
+ readonly ok: Schema.Literal<false>;
69
+ }> | Schema.Struct<{
70
+ readonly correlationId: Schema.String;
71
+ readonly error: Schema.Struct<{
72
+ readonly code: Schema.Literal<"rate_limited">;
73
+ readonly message: Schema.String;
74
+ readonly retryable: Schema.Boolean;
75
+ }>;
76
+ readonly ok: Schema.Literal<false>;
77
+ }> | Schema.Struct<{
78
+ readonly correlationId: Schema.String;
79
+ readonly error: Schema.Struct<{
80
+ readonly code: Schema.Literal<"unauthenticated">;
81
+ readonly message: Schema.String;
82
+ readonly retryable: Schema.Boolean;
83
+ }>;
84
+ readonly ok: Schema.Literal<false>;
85
+ }> | Schema.Struct<{
86
+ readonly correlationId: Schema.String;
87
+ readonly error: Schema.Struct<{
88
+ readonly code: Schema.Literal<"unavailable">;
89
+ readonly message: Schema.String;
90
+ readonly retryable: Schema.Boolean;
91
+ }>;
92
+ readonly ok: Schema.Literal<false>;
93
+ }>>, never, never>, never, never>;
94
+ readonly compact: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"compact", "POST", "/chat/conversations/:conversationId/compactions", Schema.toCodecStringTree<Schema.Struct<{
95
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
96
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
97
+ readonly compaction: Schema.Struct<{
98
+ readonly active: Schema.Boolean;
99
+ readonly activeSummary: Schema.NullOr<Schema.Struct<{
100
+ readonly id: Schema.String;
101
+ readonly status: Schema.String;
102
+ readonly summary: Schema.String;
103
+ readonly trigger: Schema.String;
104
+ }>>;
105
+ readonly boundary: Schema.NullOr<Schema.Struct<{
106
+ readonly compactedThroughInvocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
107
+ readonly coveredInvocationCount: Schema.Int;
108
+ readonly coveredMessageCount: Schema.Int;
109
+ }>>;
110
+ }>;
111
+ readonly conversation: Schema.Struct<{
112
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
113
+ readonly createdAt: Schema.NullOr<Schema.Date>;
114
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
115
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
116
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
117
+ readonly memoryEnabled: Schema.Boolean;
118
+ readonly organizationId: Schema.String;
119
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
120
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
121
+ readonly subject: Schema.NullOr<Schema.Struct<{
122
+ readonly id: Schema.String;
123
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
124
+ }>>;
125
+ readonly title: Schema.String;
126
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
127
+ readonly userId: Schema.NullOr<Schema.String>;
128
+ }>;
129
+ }>>, Schema.toCodecJson<Schema.Struct<{
130
+ readonly correlationId: Schema.String;
131
+ readonly error: Schema.Struct<{
132
+ readonly details: Schema.optionalKey<Schema.Struct<{
133
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
134
+ }>>;
135
+ } & {
136
+ readonly code: Schema.Literal<"conflict">;
137
+ readonly message: Schema.String;
138
+ readonly retryable: Schema.Boolean;
139
+ }>;
140
+ readonly ok: Schema.Literal<false>;
141
+ }> | Schema.Struct<{
142
+ readonly correlationId: Schema.String;
143
+ readonly error: Schema.Struct<{
144
+ readonly details: Schema.Struct<{
145
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
146
+ }>;
147
+ } & {
148
+ readonly code: Schema.Literal<"forbidden">;
149
+ readonly message: Schema.String;
150
+ readonly retryable: Schema.Boolean;
151
+ }>;
152
+ readonly ok: Schema.Literal<false>;
153
+ }> | Schema.Struct<{
154
+ readonly correlationId: Schema.String;
155
+ readonly error: Schema.Struct<{
156
+ readonly code: Schema.Literal<"internal">;
157
+ readonly message: Schema.String;
158
+ readonly retryable: Schema.Boolean;
159
+ }>;
160
+ readonly ok: Schema.Literal<false>;
161
+ }> | Schema.Struct<{
162
+ readonly correlationId: Schema.String;
163
+ readonly error: Schema.Struct<{
164
+ readonly details: Schema.optionalKey<Schema.Struct<{
165
+ readonly filename: Schema.optionalKey<Schema.String>;
166
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
167
+ }>>;
168
+ } & {
169
+ readonly code: Schema.Literal<"invalid_request">;
170
+ readonly message: Schema.String;
171
+ readonly retryable: Schema.Boolean;
172
+ }>;
173
+ readonly ok: Schema.Literal<false>;
174
+ }> | Schema.Struct<{
175
+ readonly correlationId: Schema.String;
176
+ readonly error: Schema.Struct<{
177
+ readonly code: Schema.Literal<"not_found">;
178
+ readonly message: Schema.String;
179
+ readonly retryable: Schema.Boolean;
180
+ }>;
181
+ readonly ok: Schema.Literal<false>;
182
+ }> | Schema.Struct<{
183
+ readonly correlationId: Schema.String;
184
+ readonly error: Schema.Struct<{
185
+ readonly code: Schema.Literal<"rate_limited">;
186
+ readonly message: Schema.String;
187
+ readonly retryable: Schema.Boolean;
188
+ }>;
189
+ readonly ok: Schema.Literal<false>;
190
+ }> | Schema.Struct<{
191
+ readonly correlationId: Schema.String;
192
+ readonly error: Schema.Struct<{
193
+ readonly code: Schema.Literal<"unauthenticated">;
194
+ readonly message: Schema.String;
195
+ readonly retryable: Schema.Boolean;
196
+ }>;
197
+ readonly ok: Schema.Literal<false>;
198
+ }> | Schema.Struct<{
199
+ readonly correlationId: Schema.String;
200
+ readonly error: Schema.Struct<{
201
+ readonly code: Schema.Literal<"unavailable">;
202
+ readonly message: Schema.String;
203
+ readonly retryable: Schema.Boolean;
204
+ }>;
205
+ readonly ok: Schema.Literal<false>;
206
+ }>>, never, never>, never, never>;
207
+ readonly createConversation: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"createConversation", "POST", "/chat/conversations", never, never, Schema.toCodecJson<Schema.Struct<{
208
+ readonly agentId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
209
+ readonly projectId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
210
+ readonly title: Schema.optionalKey<Schema.String>;
211
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
212
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
213
+ readonly createdAt: Schema.NullOr<Schema.Date>;
214
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
215
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
216
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
217
+ readonly memoryEnabled: Schema.Boolean;
218
+ readonly organizationId: Schema.String;
219
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
220
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
221
+ readonly subject: Schema.NullOr<Schema.Struct<{
222
+ readonly id: Schema.String;
223
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
224
+ }>>;
225
+ readonly title: Schema.String;
226
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
227
+ readonly userId: Schema.NullOr<Schema.String>;
228
+ }>>, Schema.toCodecJson<Schema.Struct<{
229
+ readonly correlationId: Schema.String;
230
+ readonly error: Schema.Struct<{
231
+ readonly details: Schema.optionalKey<Schema.Struct<{
232
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
233
+ }>>;
234
+ } & {
235
+ readonly code: Schema.Literal<"conflict">;
236
+ readonly message: Schema.String;
237
+ readonly retryable: Schema.Boolean;
238
+ }>;
239
+ readonly ok: Schema.Literal<false>;
240
+ }> | Schema.Struct<{
241
+ readonly correlationId: Schema.String;
242
+ readonly error: Schema.Struct<{
243
+ readonly details: Schema.Struct<{
244
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
245
+ }>;
246
+ } & {
247
+ readonly code: Schema.Literal<"forbidden">;
248
+ readonly message: Schema.String;
249
+ readonly retryable: Schema.Boolean;
250
+ }>;
251
+ readonly ok: Schema.Literal<false>;
252
+ }> | Schema.Struct<{
253
+ readonly correlationId: Schema.String;
254
+ readonly error: Schema.Struct<{
255
+ readonly code: Schema.Literal<"internal">;
256
+ readonly message: Schema.String;
257
+ readonly retryable: Schema.Boolean;
258
+ }>;
259
+ readonly ok: Schema.Literal<false>;
260
+ }> | Schema.Struct<{
261
+ readonly correlationId: Schema.String;
262
+ readonly error: Schema.Struct<{
263
+ readonly details: Schema.optionalKey<Schema.Struct<{
264
+ readonly filename: Schema.optionalKey<Schema.String>;
265
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
266
+ }>>;
267
+ } & {
268
+ readonly code: Schema.Literal<"invalid_request">;
269
+ readonly message: Schema.String;
270
+ readonly retryable: Schema.Boolean;
271
+ }>;
272
+ readonly ok: Schema.Literal<false>;
273
+ }> | Schema.Struct<{
274
+ readonly correlationId: Schema.String;
275
+ readonly error: Schema.Struct<{
276
+ readonly code: Schema.Literal<"not_found">;
277
+ readonly message: Schema.String;
278
+ readonly retryable: Schema.Boolean;
279
+ }>;
280
+ readonly ok: Schema.Literal<false>;
281
+ }> | Schema.Struct<{
282
+ readonly correlationId: Schema.String;
283
+ readonly error: Schema.Struct<{
284
+ readonly code: Schema.Literal<"rate_limited">;
285
+ readonly message: Schema.String;
286
+ readonly retryable: Schema.Boolean;
287
+ }>;
288
+ readonly ok: Schema.Literal<false>;
289
+ }> | Schema.Struct<{
290
+ readonly correlationId: Schema.String;
291
+ readonly error: Schema.Struct<{
292
+ readonly code: Schema.Literal<"unauthenticated">;
293
+ readonly message: Schema.String;
294
+ readonly retryable: Schema.Boolean;
295
+ }>;
296
+ readonly ok: Schema.Literal<false>;
297
+ }> | Schema.Struct<{
298
+ readonly correlationId: Schema.String;
299
+ readonly error: Schema.Struct<{
300
+ readonly code: Schema.Literal<"unavailable">;
301
+ readonly message: Schema.String;
302
+ readonly retryable: Schema.Boolean;
303
+ }>;
304
+ readonly ok: Schema.Literal<false>;
305
+ }>>, never, never>, never, never>;
306
+ readonly deleteConversation: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteConversation", "DELETE", "/chat/conversations/:conversationId", Schema.toCodecStringTree<Schema.Struct<{
307
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
308
+ }>>, never, never, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, Schema.toCodecJson<Schema.Struct<{
309
+ readonly correlationId: Schema.String;
310
+ readonly error: Schema.Struct<{
311
+ readonly details: Schema.optionalKey<Schema.Struct<{
312
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
313
+ }>>;
314
+ } & {
315
+ readonly code: Schema.Literal<"conflict">;
316
+ readonly message: Schema.String;
317
+ readonly retryable: Schema.Boolean;
318
+ }>;
319
+ readonly ok: Schema.Literal<false>;
320
+ }> | Schema.Struct<{
321
+ readonly correlationId: Schema.String;
322
+ readonly error: Schema.Struct<{
323
+ readonly details: Schema.Struct<{
324
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
325
+ }>;
326
+ } & {
327
+ readonly code: Schema.Literal<"forbidden">;
328
+ readonly message: Schema.String;
329
+ readonly retryable: Schema.Boolean;
330
+ }>;
331
+ readonly ok: Schema.Literal<false>;
332
+ }> | Schema.Struct<{
333
+ readonly correlationId: Schema.String;
334
+ readonly error: Schema.Struct<{
335
+ readonly code: Schema.Literal<"internal">;
336
+ readonly message: Schema.String;
337
+ readonly retryable: Schema.Boolean;
338
+ }>;
339
+ readonly ok: Schema.Literal<false>;
340
+ }> | Schema.Struct<{
341
+ readonly correlationId: Schema.String;
342
+ readonly error: Schema.Struct<{
343
+ readonly details: Schema.optionalKey<Schema.Struct<{
344
+ readonly filename: Schema.optionalKey<Schema.String>;
345
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
346
+ }>>;
347
+ } & {
348
+ readonly code: Schema.Literal<"invalid_request">;
349
+ readonly message: Schema.String;
350
+ readonly retryable: Schema.Boolean;
351
+ }>;
352
+ readonly ok: Schema.Literal<false>;
353
+ }> | Schema.Struct<{
354
+ readonly correlationId: Schema.String;
355
+ readonly error: Schema.Struct<{
356
+ readonly code: Schema.Literal<"not_found">;
357
+ readonly message: Schema.String;
358
+ readonly retryable: Schema.Boolean;
359
+ }>;
360
+ readonly ok: Schema.Literal<false>;
361
+ }> | Schema.Struct<{
362
+ readonly correlationId: Schema.String;
363
+ readonly error: Schema.Struct<{
364
+ readonly code: Schema.Literal<"rate_limited">;
365
+ readonly message: Schema.String;
366
+ readonly retryable: Schema.Boolean;
367
+ }>;
368
+ readonly ok: Schema.Literal<false>;
369
+ }> | Schema.Struct<{
370
+ readonly correlationId: Schema.String;
371
+ readonly error: Schema.Struct<{
372
+ readonly code: Schema.Literal<"unauthenticated">;
373
+ readonly message: Schema.String;
374
+ readonly retryable: Schema.Boolean;
375
+ }>;
376
+ readonly ok: Schema.Literal<false>;
377
+ }> | Schema.Struct<{
378
+ readonly correlationId: Schema.String;
379
+ readonly error: Schema.Struct<{
380
+ readonly code: Schema.Literal<"unavailable">;
381
+ readonly message: Schema.String;
382
+ readonly retryable: Schema.Boolean;
383
+ }>;
384
+ readonly ok: Schema.Literal<false>;
385
+ }>>, never, never>, never, never>;
386
+ readonly getArtifactProgress: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getArtifactProgress", "GET", "/chat/conversations/:conversationId/artifact-progress", Schema.toCodecStringTree<Schema.Struct<{
387
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
388
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
389
+ readonly currentArtifact: Schema.NullOr<Schema.Struct<{
390
+ readonly artifactId: Schema.String;
391
+ readonly contentType: Schema.NullOr<Schema.String>;
392
+ readonly filename: Schema.String;
393
+ readonly role: Schema.String;
394
+ readonly sourceKind: Schema.String;
395
+ }>>;
396
+ readonly failed: Schema.Int;
397
+ readonly leased: Schema.Int;
398
+ readonly pending: Schema.Int;
399
+ readonly processed: Schema.Int;
400
+ readonly skipped: Schema.Int;
401
+ }>>, Schema.toCodecJson<Schema.Struct<{
402
+ readonly correlationId: Schema.String;
403
+ readonly error: Schema.Struct<{
404
+ readonly details: Schema.optionalKey<Schema.Struct<{
405
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
406
+ }>>;
407
+ } & {
408
+ readonly code: Schema.Literal<"conflict">;
409
+ readonly message: Schema.String;
410
+ readonly retryable: Schema.Boolean;
411
+ }>;
412
+ readonly ok: Schema.Literal<false>;
413
+ }> | Schema.Struct<{
414
+ readonly correlationId: Schema.String;
415
+ readonly error: Schema.Struct<{
416
+ readonly details: Schema.Struct<{
417
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
418
+ }>;
419
+ } & {
420
+ readonly code: Schema.Literal<"forbidden">;
421
+ readonly message: Schema.String;
422
+ readonly retryable: Schema.Boolean;
423
+ }>;
424
+ readonly ok: Schema.Literal<false>;
425
+ }> | Schema.Struct<{
426
+ readonly correlationId: Schema.String;
427
+ readonly error: Schema.Struct<{
428
+ readonly code: Schema.Literal<"internal">;
429
+ readonly message: Schema.String;
430
+ readonly retryable: Schema.Boolean;
431
+ }>;
432
+ readonly ok: Schema.Literal<false>;
433
+ }> | Schema.Struct<{
434
+ readonly correlationId: Schema.String;
435
+ readonly error: Schema.Struct<{
436
+ readonly details: Schema.optionalKey<Schema.Struct<{
437
+ readonly filename: Schema.optionalKey<Schema.String>;
438
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
439
+ }>>;
440
+ } & {
441
+ readonly code: Schema.Literal<"invalid_request">;
442
+ readonly message: Schema.String;
443
+ readonly retryable: Schema.Boolean;
444
+ }>;
445
+ readonly ok: Schema.Literal<false>;
446
+ }> | Schema.Struct<{
447
+ readonly correlationId: Schema.String;
448
+ readonly error: Schema.Struct<{
449
+ readonly code: Schema.Literal<"not_found">;
450
+ readonly message: Schema.String;
451
+ readonly retryable: Schema.Boolean;
452
+ }>;
453
+ readonly ok: Schema.Literal<false>;
454
+ }> | Schema.Struct<{
455
+ readonly correlationId: Schema.String;
456
+ readonly error: Schema.Struct<{
457
+ readonly code: Schema.Literal<"rate_limited">;
458
+ readonly message: Schema.String;
459
+ readonly retryable: Schema.Boolean;
460
+ }>;
461
+ readonly ok: Schema.Literal<false>;
462
+ }> | Schema.Struct<{
463
+ readonly correlationId: Schema.String;
464
+ readonly error: Schema.Struct<{
465
+ readonly code: Schema.Literal<"unauthenticated">;
466
+ readonly message: Schema.String;
467
+ readonly retryable: Schema.Boolean;
468
+ }>;
469
+ readonly ok: Schema.Literal<false>;
470
+ }> | Schema.Struct<{
471
+ readonly correlationId: Schema.String;
472
+ readonly error: Schema.Struct<{
473
+ readonly code: Schema.Literal<"unavailable">;
474
+ readonly message: Schema.String;
475
+ readonly retryable: Schema.Boolean;
476
+ }>;
477
+ readonly ok: Schema.Literal<false>;
478
+ }>>, never, never>, never, never>;
479
+ readonly getCompaction: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getCompaction", "GET", "/chat/conversations/:conversationId/compaction", Schema.toCodecStringTree<Schema.Struct<{
480
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
481
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
482
+ readonly compaction: Schema.Struct<{
483
+ readonly active: Schema.Boolean;
484
+ readonly activeSummary: Schema.NullOr<Schema.Struct<{
485
+ readonly id: Schema.String;
486
+ readonly status: Schema.String;
487
+ readonly summary: Schema.String;
488
+ readonly trigger: Schema.String;
489
+ }>>;
490
+ readonly boundary: Schema.NullOr<Schema.Struct<{
491
+ readonly compactedThroughInvocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
492
+ readonly coveredInvocationCount: Schema.Int;
493
+ readonly coveredMessageCount: Schema.Int;
494
+ }>>;
495
+ }>;
496
+ readonly conversation: Schema.Struct<{
497
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
498
+ readonly createdAt: Schema.NullOr<Schema.Date>;
499
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
500
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
501
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
502
+ readonly memoryEnabled: Schema.Boolean;
503
+ readonly organizationId: Schema.String;
504
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
505
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
506
+ readonly subject: Schema.NullOr<Schema.Struct<{
507
+ readonly id: Schema.String;
508
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
509
+ }>>;
510
+ readonly title: Schema.String;
511
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
512
+ readonly userId: Schema.NullOr<Schema.String>;
513
+ }>;
514
+ }>>, Schema.toCodecJson<Schema.Struct<{
515
+ readonly correlationId: Schema.String;
516
+ readonly error: Schema.Struct<{
517
+ readonly details: Schema.optionalKey<Schema.Struct<{
518
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
519
+ }>>;
520
+ } & {
521
+ readonly code: Schema.Literal<"conflict">;
522
+ readonly message: Schema.String;
523
+ readonly retryable: Schema.Boolean;
524
+ }>;
525
+ readonly ok: Schema.Literal<false>;
526
+ }> | Schema.Struct<{
527
+ readonly correlationId: Schema.String;
528
+ readonly error: Schema.Struct<{
529
+ readonly details: Schema.Struct<{
530
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
531
+ }>;
532
+ } & {
533
+ readonly code: Schema.Literal<"forbidden">;
534
+ readonly message: Schema.String;
535
+ readonly retryable: Schema.Boolean;
536
+ }>;
537
+ readonly ok: Schema.Literal<false>;
538
+ }> | Schema.Struct<{
539
+ readonly correlationId: Schema.String;
540
+ readonly error: Schema.Struct<{
541
+ readonly code: Schema.Literal<"internal">;
542
+ readonly message: Schema.String;
543
+ readonly retryable: Schema.Boolean;
544
+ }>;
545
+ readonly ok: Schema.Literal<false>;
546
+ }> | Schema.Struct<{
547
+ readonly correlationId: Schema.String;
548
+ readonly error: Schema.Struct<{
549
+ readonly details: Schema.optionalKey<Schema.Struct<{
550
+ readonly filename: Schema.optionalKey<Schema.String>;
551
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
552
+ }>>;
553
+ } & {
554
+ readonly code: Schema.Literal<"invalid_request">;
555
+ readonly message: Schema.String;
556
+ readonly retryable: Schema.Boolean;
557
+ }>;
558
+ readonly ok: Schema.Literal<false>;
559
+ }> | Schema.Struct<{
560
+ readonly correlationId: Schema.String;
561
+ readonly error: Schema.Struct<{
562
+ readonly code: Schema.Literal<"not_found">;
563
+ readonly message: Schema.String;
564
+ readonly retryable: Schema.Boolean;
565
+ }>;
566
+ readonly ok: Schema.Literal<false>;
567
+ }> | Schema.Struct<{
568
+ readonly correlationId: Schema.String;
569
+ readonly error: Schema.Struct<{
570
+ readonly code: Schema.Literal<"rate_limited">;
571
+ readonly message: Schema.String;
572
+ readonly retryable: Schema.Boolean;
573
+ }>;
574
+ readonly ok: Schema.Literal<false>;
575
+ }> | Schema.Struct<{
576
+ readonly correlationId: Schema.String;
577
+ readonly error: Schema.Struct<{
578
+ readonly code: Schema.Literal<"unauthenticated">;
579
+ readonly message: Schema.String;
580
+ readonly retryable: Schema.Boolean;
581
+ }>;
582
+ readonly ok: Schema.Literal<false>;
583
+ }> | Schema.Struct<{
584
+ readonly correlationId: Schema.String;
585
+ readonly error: Schema.Struct<{
586
+ readonly code: Schema.Literal<"unavailable">;
587
+ readonly message: Schema.String;
588
+ readonly retryable: Schema.Boolean;
589
+ }>;
590
+ readonly ok: Schema.Literal<false>;
591
+ }>>, never, never>, never, never>;
592
+ readonly getConversation: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getConversation", "GET", "/chat/conversations/:conversationId", Schema.toCodecStringTree<Schema.Struct<{
593
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
594
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
595
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
596
+ readonly createdAt: Schema.NullOr<Schema.Date>;
597
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
598
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
599
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
600
+ readonly memoryEnabled: Schema.Boolean;
601
+ readonly organizationId: Schema.String;
602
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
603
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
604
+ readonly subject: Schema.NullOr<Schema.Struct<{
605
+ readonly id: Schema.String;
606
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
607
+ }>>;
608
+ readonly title: Schema.String;
609
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
610
+ readonly userId: Schema.NullOr<Schema.String>;
611
+ }>>, Schema.toCodecJson<Schema.Struct<{
612
+ readonly correlationId: Schema.String;
613
+ readonly error: Schema.Struct<{
614
+ readonly details: Schema.optionalKey<Schema.Struct<{
615
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
616
+ }>>;
617
+ } & {
618
+ readonly code: Schema.Literal<"conflict">;
619
+ readonly message: Schema.String;
620
+ readonly retryable: Schema.Boolean;
621
+ }>;
622
+ readonly ok: Schema.Literal<false>;
623
+ }> | Schema.Struct<{
624
+ readonly correlationId: Schema.String;
625
+ readonly error: Schema.Struct<{
626
+ readonly details: Schema.Struct<{
627
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
628
+ }>;
629
+ } & {
630
+ readonly code: Schema.Literal<"forbidden">;
631
+ readonly message: Schema.String;
632
+ readonly retryable: Schema.Boolean;
633
+ }>;
634
+ readonly ok: Schema.Literal<false>;
635
+ }> | Schema.Struct<{
636
+ readonly correlationId: Schema.String;
637
+ readonly error: Schema.Struct<{
638
+ readonly code: Schema.Literal<"internal">;
639
+ readonly message: Schema.String;
640
+ readonly retryable: Schema.Boolean;
641
+ }>;
642
+ readonly ok: Schema.Literal<false>;
643
+ }> | Schema.Struct<{
644
+ readonly correlationId: Schema.String;
645
+ readonly error: Schema.Struct<{
646
+ readonly details: Schema.optionalKey<Schema.Struct<{
647
+ readonly filename: Schema.optionalKey<Schema.String>;
648
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
649
+ }>>;
650
+ } & {
651
+ readonly code: Schema.Literal<"invalid_request">;
652
+ readonly message: Schema.String;
653
+ readonly retryable: Schema.Boolean;
654
+ }>;
655
+ readonly ok: Schema.Literal<false>;
656
+ }> | Schema.Struct<{
657
+ readonly correlationId: Schema.String;
658
+ readonly error: Schema.Struct<{
659
+ readonly code: Schema.Literal<"not_found">;
660
+ readonly message: Schema.String;
661
+ readonly retryable: Schema.Boolean;
662
+ }>;
663
+ readonly ok: Schema.Literal<false>;
664
+ }> | Schema.Struct<{
665
+ readonly correlationId: Schema.String;
666
+ readonly error: Schema.Struct<{
667
+ readonly code: Schema.Literal<"rate_limited">;
668
+ readonly message: Schema.String;
669
+ readonly retryable: Schema.Boolean;
670
+ }>;
671
+ readonly ok: Schema.Literal<false>;
672
+ }> | Schema.Struct<{
673
+ readonly correlationId: Schema.String;
674
+ readonly error: Schema.Struct<{
675
+ readonly code: Schema.Literal<"unauthenticated">;
676
+ readonly message: Schema.String;
677
+ readonly retryable: Schema.Boolean;
678
+ }>;
679
+ readonly ok: Schema.Literal<false>;
680
+ }> | Schema.Struct<{
681
+ readonly correlationId: Schema.String;
682
+ readonly error: Schema.Struct<{
683
+ readonly code: Schema.Literal<"unavailable">;
684
+ readonly message: Schema.String;
685
+ readonly retryable: Schema.Boolean;
686
+ }>;
687
+ readonly ok: Schema.Literal<false>;
688
+ }>>, never, never>, never, never>;
689
+ readonly getPlaceContext: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getPlaceContext", "GET", "/chat/place-context", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
690
+ readonly contextTrailEnabled: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
691
+ readonly contextTrailVisible: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
692
+ readonly places: Schema.$Array<Schema.Struct<{
693
+ readonly id: Schema.String;
694
+ readonly kind: Schema.Literals<readonly ["studio_app", "external_app", "dashboard"]>;
695
+ readonly name: Schema.NullOr<Schema.String>;
696
+ }>>;
697
+ readonly readAloud: Schema.Boolean;
698
+ readonly voiceInputMode: Schema.optionalKey<Schema.Literals<readonly ["local", "remote"]>>;
699
+ }>>, Schema.toCodecJson<Schema.Struct<{
700
+ readonly correlationId: Schema.String;
701
+ readonly error: Schema.Struct<{
702
+ readonly details: Schema.optionalKey<Schema.Struct<{
703
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
704
+ }>>;
705
+ } & {
706
+ readonly code: Schema.Literal<"conflict">;
707
+ readonly message: Schema.String;
708
+ readonly retryable: Schema.Boolean;
709
+ }>;
710
+ readonly ok: Schema.Literal<false>;
711
+ }> | Schema.Struct<{
712
+ readonly correlationId: Schema.String;
713
+ readonly error: Schema.Struct<{
714
+ readonly details: Schema.Struct<{
715
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
716
+ }>;
717
+ } & {
718
+ readonly code: Schema.Literal<"forbidden">;
719
+ readonly message: Schema.String;
720
+ readonly retryable: Schema.Boolean;
721
+ }>;
722
+ readonly ok: Schema.Literal<false>;
723
+ }> | Schema.Struct<{
724
+ readonly correlationId: Schema.String;
725
+ readonly error: Schema.Struct<{
726
+ readonly code: Schema.Literal<"internal">;
727
+ readonly message: Schema.String;
728
+ readonly retryable: Schema.Boolean;
729
+ }>;
730
+ readonly ok: Schema.Literal<false>;
731
+ }> | Schema.Struct<{
732
+ readonly correlationId: Schema.String;
733
+ readonly error: Schema.Struct<{
734
+ readonly details: Schema.optionalKey<Schema.Struct<{
735
+ readonly filename: Schema.optionalKey<Schema.String>;
736
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
737
+ }>>;
738
+ } & {
739
+ readonly code: Schema.Literal<"invalid_request">;
740
+ readonly message: Schema.String;
741
+ readonly retryable: Schema.Boolean;
742
+ }>;
743
+ readonly ok: Schema.Literal<false>;
744
+ }> | Schema.Struct<{
745
+ readonly correlationId: Schema.String;
746
+ readonly error: Schema.Struct<{
747
+ readonly code: Schema.Literal<"not_found">;
748
+ readonly message: Schema.String;
749
+ readonly retryable: Schema.Boolean;
750
+ }>;
751
+ readonly ok: Schema.Literal<false>;
752
+ }> | Schema.Struct<{
753
+ readonly correlationId: Schema.String;
754
+ readonly error: Schema.Struct<{
755
+ readonly code: Schema.Literal<"rate_limited">;
756
+ readonly message: Schema.String;
757
+ readonly retryable: Schema.Boolean;
758
+ }>;
759
+ readonly ok: Schema.Literal<false>;
760
+ }> | Schema.Struct<{
761
+ readonly correlationId: Schema.String;
762
+ readonly error: Schema.Struct<{
763
+ readonly code: Schema.Literal<"unauthenticated">;
764
+ readonly message: Schema.String;
765
+ readonly retryable: Schema.Boolean;
766
+ }>;
767
+ readonly ok: Schema.Literal<false>;
768
+ }> | Schema.Struct<{
769
+ readonly correlationId: Schema.String;
770
+ readonly error: Schema.Struct<{
771
+ readonly code: Schema.Literal<"unavailable">;
772
+ readonly message: Schema.String;
773
+ readonly retryable: Schema.Boolean;
774
+ }>;
775
+ readonly ok: Schema.Literal<false>;
776
+ }>>, never, never>, never, never>;
777
+ readonly getTranscript: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getTranscript", "GET", "/chat/conversations/:conversationId/transcript", Schema.toCodecStringTree<Schema.Struct<{
778
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
779
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
780
+ readonly agentTurns: Schema.$Array<Schema.Struct<{
781
+ readonly completedAt: Schema.NullOr<Schema.Date>;
782
+ readonly createdAt: Schema.Date;
783
+ readonly input: Schema.String;
784
+ readonly intentCards: Schema.optionalKey<Schema.$Array<import("../domain/data-parts.js").CiStandardSchema<Schema.Union<readonly [Schema.Struct<{
785
+ readonly dispatchId: Schema.String;
786
+ readonly displayName: Schema.optionalKey<Schema.String>;
787
+ readonly fqn: Schema.String;
788
+ readonly state: Schema.Literal<"running">;
789
+ }>, Schema.Struct<{
790
+ readonly dispatchId: Schema.String;
791
+ readonly displayName: Schema.optionalKey<Schema.String>;
792
+ readonly fqn: Schema.String;
793
+ readonly result: Schema.Codec<Schema.Json, Schema.Json, never, never>;
794
+ readonly state: Schema.Literal<"completed">;
795
+ }>, Schema.Struct<{
796
+ readonly dispatchId: Schema.String;
797
+ readonly displayName: Schema.optionalKey<Schema.String>;
798
+ readonly fqn: Schema.String;
799
+ readonly reason: Schema.String;
800
+ readonly state: Schema.Literal<"failed">;
801
+ }>, Schema.Struct<{
802
+ readonly dispatchId: Schema.String;
803
+ readonly displayName: Schema.optionalKey<Schema.String>;
804
+ readonly fqn: Schema.String;
805
+ readonly state: Schema.Literal<"ended">;
806
+ }>]>>>>;
807
+ readonly message: Schema.NullOr<Schema.String>;
808
+ readonly sequence: Schema.Int;
809
+ readonly status: Schema.Literals<readonly ["pending", "completed", "failed", "cancelled"]>;
810
+ readonly turnId: Schema.String;
811
+ }>>;
812
+ readonly conversation: Schema.Struct<{
813
+ readonly agent: Schema.NullOr<Schema.Struct<{
814
+ readonly displayName: Schema.String;
815
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">;
816
+ }>>;
817
+ readonly compaction: Schema.Struct<{
818
+ readonly active: Schema.Boolean;
819
+ readonly activeSummary: Schema.NullOr<Schema.Struct<{
820
+ readonly id: Schema.String;
821
+ readonly status: Schema.String;
822
+ readonly summary: Schema.String;
823
+ readonly trigger: Schema.String;
824
+ }>>;
825
+ readonly boundary: Schema.NullOr<Schema.Struct<{
826
+ readonly compactedThroughInvocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
827
+ readonly coveredInvocationCount: Schema.Int;
828
+ readonly coveredMessageCount: Schema.Int;
829
+ }>>;
830
+ }>;
831
+ readonly contextUsage: Schema.Struct<{
832
+ readonly estimatedCharacters: Schema.Int;
833
+ readonly fillRatio: Schema.Finite;
834
+ readonly thresholdCharacters: Schema.Int;
835
+ }>;
836
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
837
+ readonly title: Schema.String;
838
+ }>;
839
+ readonly messages: Schema.$Array<Schema.Struct<{
840
+ readonly approvalRequestId: Schema.NullOr<Schema.String>;
841
+ readonly attachments: Schema.$Array<Schema.Struct<{
842
+ readonly characterCount: Schema.Int;
843
+ readonly contentType: Schema.NullOr<Schema.String>;
844
+ readonly extension: Schema.NullOr<Schema.String>;
845
+ readonly extractionStatus: Schema.String;
846
+ readonly filename: Schema.String;
847
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/AttachmentId">;
848
+ readonly sizeBytes: Schema.Int;
849
+ readonly truncated: Schema.Boolean;
850
+ readonly unavailableReason: Schema.NullOr<Schema.String>;
851
+ readonly mediaUrl: Schema.NullOr<Schema.String>;
852
+ }>>;
853
+ readonly content: Schema.String;
854
+ readonly contextTrail: Schema.optionalKey<Schema.$Array<import("../domain/data-parts.js").CiStandardSchema<Schema.Union<readonly [Schema.Struct<{
855
+ readonly at: Schema.String;
856
+ readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
857
+ readonly event: Schema.String;
858
+ readonly source: Schema.String;
859
+ }>, Schema.Struct<{
860
+ readonly at: Schema.String;
861
+ readonly data: Schema.StructWithRest<Schema.Struct<{
862
+ readonly "@type": Schema.String;
863
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
864
+ readonly source: Schema.String;
865
+ }>, Schema.Struct<{
866
+ readonly app: Schema.String;
867
+ readonly at: Schema.String;
868
+ readonly page: Schema.String;
869
+ readonly title: Schema.String;
870
+ }>]>>>>;
871
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
872
+ readonly currentUserFeedback: Schema.optionalKey<Schema.Struct<{
873
+ readonly sentiment: Schema.NullOr<Schema.Literals<readonly ["positive", "negative"]>>;
874
+ readonly submitterNote: Schema.NullOr<Schema.String>;
875
+ }>>;
876
+ readonly feedbackTargetId: Schema.optionalKey<Schema.String>;
877
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
878
+ readonly processingEvents: Schema.$Array<Schema.Struct<{
879
+ readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
880
+ readonly event: Schema.String;
881
+ }>>;
882
+ readonly role: Schema.Literals<readonly ["assistant", "user"]>;
883
+ readonly run: Schema.optionalKey<Schema.Struct<{
884
+ readonly approvalRequestId: Schema.NullOr<Schema.String>;
885
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
886
+ readonly durationMs: Schema.Finite;
887
+ readonly inputTokens: Schema.Int;
888
+ readonly intentCards: Schema.optionalKey<Schema.$Array<import("../domain/data-parts.js").CiStandardSchema<Schema.Union<readonly [Schema.Struct<{
889
+ readonly dispatchId: Schema.String;
890
+ readonly displayName: Schema.optionalKey<Schema.String>;
891
+ readonly fqn: Schema.String;
892
+ readonly state: Schema.Literal<"running">;
893
+ }>, Schema.Struct<{
894
+ readonly dispatchId: Schema.String;
895
+ readonly displayName: Schema.optionalKey<Schema.String>;
896
+ readonly fqn: Schema.String;
897
+ readonly result: Schema.Codec<Schema.Json, Schema.Json, never, never>;
898
+ readonly state: Schema.Literal<"completed">;
899
+ }>, Schema.Struct<{
900
+ readonly dispatchId: Schema.String;
901
+ readonly displayName: Schema.optionalKey<Schema.String>;
902
+ readonly fqn: Schema.String;
903
+ readonly reason: Schema.String;
904
+ readonly state: Schema.Literal<"failed">;
905
+ }>, Schema.Struct<{
906
+ readonly dispatchId: Schema.String;
907
+ readonly displayName: Schema.optionalKey<Schema.String>;
908
+ readonly fqn: Schema.String;
909
+ readonly state: Schema.Literal<"ended">;
910
+ }>]>>>>;
911
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
912
+ readonly memoryEvidence: Schema.NullOr<Schema.Struct<{
913
+ readonly events: Schema.$Array<Schema.Struct<{
914
+ readonly category: Schema.NullOr<Schema.String>;
915
+ readonly conversationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">>;
916
+ readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
917
+ readonly kind: Schema.String;
918
+ readonly lifecycleStatus: Schema.NullOr<Schema.String>;
919
+ readonly memoryId: Schema.NullOr<Schema.String>;
920
+ readonly reason: Schema.NullOr<Schema.String>;
921
+ readonly scope: Schema.NullOr<Schema.String>;
922
+ }>>;
923
+ }>>;
924
+ readonly model: Schema.NullOr<Schema.String>;
925
+ readonly output: Schema.String;
926
+ readonly outputTokens: Schema.Int;
927
+ readonly permissionWait: Schema.NullOr<Schema.Struct<{
928
+ readonly capabilityKind: Schema.Literals<readonly ["skill", "tool"]>;
929
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
930
+ readonly subjectId: Schema.String;
931
+ }>>;
932
+ readonly processingEvents: Schema.$Array<Schema.Struct<{
933
+ readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
934
+ readonly event: Schema.String;
935
+ }>>;
936
+ readonly skillOutcome: Schema.NullOr<Schema.String>;
937
+ readonly status: Schema.String;
938
+ readonly toolTrace: Schema.$Array<Schema.Struct<{
939
+ readonly displayName: Schema.NullOr<Schema.String>;
940
+ readonly displayParts: Schema.$Array<Schema.Struct<{
941
+ readonly data: Schema.Unknown;
942
+ readonly description: Schema.NullOr<Schema.String>;
943
+ readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>;
944
+ readonly title: Schema.NullOr<Schema.String>;
945
+ readonly type: Schema.String;
946
+ }>>;
947
+ readonly durationMs: Schema.NullOr<Schema.Finite>;
948
+ readonly error: Schema.NullOr<Schema.String>;
949
+ readonly fqn: Schema.NullOr<Schema.String>;
950
+ readonly toolId: Schema.NullOr<Schema.String>;
951
+ }>>;
952
+ readonly traceLink: Schema.optionalKey<Schema.String>;
953
+ readonly userInteraction: Schema.NullOr<Schema.Struct<{
954
+ readonly allowFreeText: Schema.Boolean;
955
+ readonly id: Schema.String;
956
+ readonly kind: Schema.Literals<readonly ["approval", "question"]>;
957
+ readonly mode: Schema.NullOr<Schema.Literals<readonly ["open", "single_choice"]>>;
958
+ readonly operation: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
959
+ readonly displayName: Schema.String;
960
+ readonly kind: Schema.Literal<"tool">;
961
+ readonly toolFqn: Schema.String;
962
+ readonly toolId: Schema.String;
963
+ }>, Schema.Struct<{
964
+ readonly displayName: Schema.String;
965
+ readonly fqn: Schema.String;
966
+ readonly inputs: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
967
+ readonly kind: Schema.Literal<"intent">;
968
+ }>]>>;
969
+ readonly options: Schema.$Array<Schema.Struct<{
970
+ readonly description: Schema.NullOr<Schema.String>;
971
+ readonly id: Schema.String;
972
+ readonly label: Schema.String;
973
+ }>>;
974
+ readonly preview: Schema.NullOr<Schema.String>;
975
+ readonly prompt: Schema.String;
976
+ readonly safePreview: Schema.NullOr<Schema.String>;
977
+ readonly status: Schema.Literals<readonly ["pending", "responding", "completed", "cancelled", "failed"]>;
978
+ readonly summary: Schema.NullOr<Schema.String>;
979
+ }>>;
980
+ }>>;
981
+ readonly status: Schema.String;
982
+ readonly toolDisplay: Schema.Union<readonly [Schema.Struct<{
983
+ readonly kind: Schema.Literal<"text">;
984
+ readonly text: Schema.String;
985
+ }>, Schema.Struct<{
986
+ readonly kind: Schema.Literal<"unavailable">;
987
+ }>]>;
988
+ }>>;
989
+ readonly steeringMessages: Schema.$Array<Schema.Struct<{
990
+ readonly attachments: Schema.$Array<Schema.Struct<{
991
+ readonly characterCount: Schema.Int;
992
+ readonly contentType: Schema.NullOr<Schema.String>;
993
+ readonly extension: Schema.NullOr<Schema.String>;
994
+ readonly extractionStatus: Schema.String;
995
+ readonly filename: Schema.String;
996
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/AttachmentId">;
997
+ readonly sizeBytes: Schema.Int;
998
+ readonly truncated: Schema.Boolean;
999
+ readonly unavailableReason: Schema.NullOr<Schema.String>;
1000
+ readonly mediaUrl: Schema.NullOr<Schema.String>;
1001
+ }>>;
1002
+ readonly claimedAt: Schema.NullOr<Schema.Date>;
1003
+ readonly content: Schema.String;
1004
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/SteeringMessageId">;
1005
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1006
+ }>>;
1007
+ }>>, Schema.toCodecJson<Schema.Struct<{
1008
+ readonly correlationId: Schema.String;
1009
+ readonly error: Schema.Struct<{
1010
+ readonly details: Schema.optionalKey<Schema.Struct<{
1011
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1012
+ }>>;
1013
+ } & {
1014
+ readonly code: Schema.Literal<"conflict">;
1015
+ readonly message: Schema.String;
1016
+ readonly retryable: Schema.Boolean;
1017
+ }>;
1018
+ readonly ok: Schema.Literal<false>;
1019
+ }> | Schema.Struct<{
1020
+ readonly correlationId: Schema.String;
1021
+ readonly error: Schema.Struct<{
1022
+ readonly details: Schema.Struct<{
1023
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1024
+ }>;
1025
+ } & {
1026
+ readonly code: Schema.Literal<"forbidden">;
1027
+ readonly message: Schema.String;
1028
+ readonly retryable: Schema.Boolean;
1029
+ }>;
1030
+ readonly ok: Schema.Literal<false>;
1031
+ }> | Schema.Struct<{
1032
+ readonly correlationId: Schema.String;
1033
+ readonly error: Schema.Struct<{
1034
+ readonly code: Schema.Literal<"internal">;
1035
+ readonly message: Schema.String;
1036
+ readonly retryable: Schema.Boolean;
1037
+ }>;
1038
+ readonly ok: Schema.Literal<false>;
1039
+ }> | Schema.Struct<{
1040
+ readonly correlationId: Schema.String;
1041
+ readonly error: Schema.Struct<{
1042
+ readonly details: Schema.optionalKey<Schema.Struct<{
1043
+ readonly filename: Schema.optionalKey<Schema.String>;
1044
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1045
+ }>>;
1046
+ } & {
1047
+ readonly code: Schema.Literal<"invalid_request">;
1048
+ readonly message: Schema.String;
1049
+ readonly retryable: Schema.Boolean;
1050
+ }>;
1051
+ readonly ok: Schema.Literal<false>;
1052
+ }> | Schema.Struct<{
1053
+ readonly correlationId: Schema.String;
1054
+ readonly error: Schema.Struct<{
1055
+ readonly code: Schema.Literal<"not_found">;
1056
+ readonly message: Schema.String;
1057
+ readonly retryable: Schema.Boolean;
1058
+ }>;
1059
+ readonly ok: Schema.Literal<false>;
1060
+ }> | Schema.Struct<{
1061
+ readonly correlationId: Schema.String;
1062
+ readonly error: Schema.Struct<{
1063
+ readonly code: Schema.Literal<"rate_limited">;
1064
+ readonly message: Schema.String;
1065
+ readonly retryable: Schema.Boolean;
1066
+ }>;
1067
+ readonly ok: Schema.Literal<false>;
1068
+ }> | Schema.Struct<{
1069
+ readonly correlationId: Schema.String;
1070
+ readonly error: Schema.Struct<{
1071
+ readonly code: Schema.Literal<"unauthenticated">;
1072
+ readonly message: Schema.String;
1073
+ readonly retryable: Schema.Boolean;
1074
+ }>;
1075
+ readonly ok: Schema.Literal<false>;
1076
+ }> | Schema.Struct<{
1077
+ readonly correlationId: Schema.String;
1078
+ readonly error: Schema.Struct<{
1079
+ readonly code: Schema.Literal<"unavailable">;
1080
+ readonly message: Schema.String;
1081
+ readonly retryable: Schema.Boolean;
1082
+ }>;
1083
+ readonly ok: Schema.Literal<false>;
1084
+ }>>, never, never>, never, never>;
1085
+ readonly listConversations: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listConversations", "GET", "/chat/conversations", never, Schema.toCodecStringTree<Schema.Struct<{
1086
+ readonly historyScope: Schema.optionalKey<Schema.$Array<Schema.decodeTo<Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>, Schema.TemplateLiteralParser<readonly [Schema.Literals<readonly ["studio_app", "external_app", "dashboard"]>, ":", Schema.String]>, never, never>>>;
1087
+ readonly subject: Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
1088
+ readonly id: Schema.String;
1089
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
1090
+ }>, Schema.TemplateLiteralParser<readonly [Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>, ":", Schema.String]>, never, never>>;
1091
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1092
+ readonly data: Schema.$Array<Schema.Struct<{
1093
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
1094
+ readonly createdAt: Schema.NullOr<Schema.Date>;
1095
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1096
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
1097
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
1098
+ readonly memoryEnabled: Schema.Boolean;
1099
+ readonly organizationId: Schema.String;
1100
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
1101
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
1102
+ readonly subject: Schema.NullOr<Schema.Struct<{
1103
+ readonly id: Schema.String;
1104
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
1105
+ }>>;
1106
+ readonly title: Schema.String;
1107
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
1108
+ readonly userId: Schema.NullOr<Schema.String>;
1109
+ }>>;
1110
+ }>>, Schema.toCodecJson<Schema.Struct<{
1111
+ readonly correlationId: Schema.String;
1112
+ readonly error: Schema.Struct<{
1113
+ readonly details: Schema.optionalKey<Schema.Struct<{
1114
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1115
+ }>>;
1116
+ } & {
1117
+ readonly code: Schema.Literal<"conflict">;
1118
+ readonly message: Schema.String;
1119
+ readonly retryable: Schema.Boolean;
1120
+ }>;
1121
+ readonly ok: Schema.Literal<false>;
1122
+ }> | Schema.Struct<{
1123
+ readonly correlationId: Schema.String;
1124
+ readonly error: Schema.Struct<{
1125
+ readonly details: Schema.Struct<{
1126
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1127
+ }>;
1128
+ } & {
1129
+ readonly code: Schema.Literal<"forbidden">;
1130
+ readonly message: Schema.String;
1131
+ readonly retryable: Schema.Boolean;
1132
+ }>;
1133
+ readonly ok: Schema.Literal<false>;
1134
+ }> | Schema.Struct<{
1135
+ readonly correlationId: Schema.String;
1136
+ readonly error: Schema.Struct<{
1137
+ readonly code: Schema.Literal<"internal">;
1138
+ readonly message: Schema.String;
1139
+ readonly retryable: Schema.Boolean;
1140
+ }>;
1141
+ readonly ok: Schema.Literal<false>;
1142
+ }> | Schema.Struct<{
1143
+ readonly correlationId: Schema.String;
1144
+ readonly error: Schema.Struct<{
1145
+ readonly details: Schema.optionalKey<Schema.Struct<{
1146
+ readonly filename: Schema.optionalKey<Schema.String>;
1147
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1148
+ }>>;
1149
+ } & {
1150
+ readonly code: Schema.Literal<"invalid_request">;
1151
+ readonly message: Schema.String;
1152
+ readonly retryable: Schema.Boolean;
1153
+ }>;
1154
+ readonly ok: Schema.Literal<false>;
1155
+ }> | Schema.Struct<{
1156
+ readonly correlationId: Schema.String;
1157
+ readonly error: Schema.Struct<{
1158
+ readonly code: Schema.Literal<"not_found">;
1159
+ readonly message: Schema.String;
1160
+ readonly retryable: Schema.Boolean;
1161
+ }>;
1162
+ readonly ok: Schema.Literal<false>;
1163
+ }> | Schema.Struct<{
1164
+ readonly correlationId: Schema.String;
1165
+ readonly error: Schema.Struct<{
1166
+ readonly code: Schema.Literal<"rate_limited">;
1167
+ readonly message: Schema.String;
1168
+ readonly retryable: Schema.Boolean;
1169
+ }>;
1170
+ readonly ok: Schema.Literal<false>;
1171
+ }> | Schema.Struct<{
1172
+ readonly correlationId: Schema.String;
1173
+ readonly error: Schema.Struct<{
1174
+ readonly code: Schema.Literal<"unauthenticated">;
1175
+ readonly message: Schema.String;
1176
+ readonly retryable: Schema.Boolean;
1177
+ }>;
1178
+ readonly ok: Schema.Literal<false>;
1179
+ }> | Schema.Struct<{
1180
+ readonly correlationId: Schema.String;
1181
+ readonly error: Schema.Struct<{
1182
+ readonly code: Schema.Literal<"unavailable">;
1183
+ readonly message: Schema.String;
1184
+ readonly retryable: Schema.Boolean;
1185
+ }>;
1186
+ readonly ok: Schema.Literal<false>;
1187
+ }>>, never, never>, never, never>;
1188
+ readonly listQueuedMessages: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listQueuedMessages", "GET", "/chat/conversations/:conversationId/queued-messages", Schema.toCodecStringTree<Schema.Struct<{
1189
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1190
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1191
+ readonly data: Schema.$Array<Schema.Struct<{
1192
+ readonly content: Schema.String;
1193
+ readonly createdAt: Schema.Date;
1194
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
1195
+ readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
1196
+ readonly position: Schema.Int;
1197
+ readonly revision: Schema.Int;
1198
+ readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
1199
+ }>>;
1200
+ }>>, Schema.toCodecJson<Schema.Struct<{
1201
+ readonly correlationId: Schema.String;
1202
+ readonly error: Schema.Struct<{
1203
+ readonly details: Schema.optionalKey<Schema.Struct<{
1204
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1205
+ }>>;
1206
+ } & {
1207
+ readonly code: Schema.Literal<"conflict">;
1208
+ readonly message: Schema.String;
1209
+ readonly retryable: Schema.Boolean;
1210
+ }>;
1211
+ readonly ok: Schema.Literal<false>;
1212
+ }> | Schema.Struct<{
1213
+ readonly correlationId: Schema.String;
1214
+ readonly error: Schema.Struct<{
1215
+ readonly details: Schema.Struct<{
1216
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1217
+ }>;
1218
+ } & {
1219
+ readonly code: Schema.Literal<"forbidden">;
1220
+ readonly message: Schema.String;
1221
+ readonly retryable: Schema.Boolean;
1222
+ }>;
1223
+ readonly ok: Schema.Literal<false>;
1224
+ }> | Schema.Struct<{
1225
+ readonly correlationId: Schema.String;
1226
+ readonly error: Schema.Struct<{
1227
+ readonly code: Schema.Literal<"internal">;
1228
+ readonly message: Schema.String;
1229
+ readonly retryable: Schema.Boolean;
1230
+ }>;
1231
+ readonly ok: Schema.Literal<false>;
1232
+ }> | Schema.Struct<{
1233
+ readonly correlationId: Schema.String;
1234
+ readonly error: Schema.Struct<{
1235
+ readonly details: Schema.optionalKey<Schema.Struct<{
1236
+ readonly filename: Schema.optionalKey<Schema.String>;
1237
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1238
+ }>>;
1239
+ } & {
1240
+ readonly code: Schema.Literal<"invalid_request">;
1241
+ readonly message: Schema.String;
1242
+ readonly retryable: Schema.Boolean;
1243
+ }>;
1244
+ readonly ok: Schema.Literal<false>;
1245
+ }> | Schema.Struct<{
1246
+ readonly correlationId: Schema.String;
1247
+ readonly error: Schema.Struct<{
1248
+ readonly code: Schema.Literal<"not_found">;
1249
+ readonly message: Schema.String;
1250
+ readonly retryable: Schema.Boolean;
1251
+ }>;
1252
+ readonly ok: Schema.Literal<false>;
1253
+ }> | Schema.Struct<{
1254
+ readonly correlationId: Schema.String;
1255
+ readonly error: Schema.Struct<{
1256
+ readonly code: Schema.Literal<"rate_limited">;
1257
+ readonly message: Schema.String;
1258
+ readonly retryable: Schema.Boolean;
1259
+ }>;
1260
+ readonly ok: Schema.Literal<false>;
1261
+ }> | Schema.Struct<{
1262
+ readonly correlationId: Schema.String;
1263
+ readonly error: Schema.Struct<{
1264
+ readonly code: Schema.Literal<"unauthenticated">;
1265
+ readonly message: Schema.String;
1266
+ readonly retryable: Schema.Boolean;
1267
+ }>;
1268
+ readonly ok: Schema.Literal<false>;
1269
+ }> | Schema.Struct<{
1270
+ readonly correlationId: Schema.String;
1271
+ readonly error: Schema.Struct<{
1272
+ readonly code: Schema.Literal<"unavailable">;
1273
+ readonly message: Schema.String;
1274
+ readonly retryable: Schema.Boolean;
1275
+ }>;
1276
+ readonly ok: Schema.Literal<false>;
1277
+ }>>, never, never>, never, never>;
1278
+ readonly queueMessage: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"queueMessage", "POST", "/chat/conversations/:conversationId/queued-messages", Schema.toCodecStringTree<Schema.Struct<{
1279
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1280
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1281
+ readonly clientMessageId: Schema.String;
1282
+ readonly content: Schema.String;
1283
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
1284
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1285
+ readonly outcome: Schema.Literal<"queued">;
1286
+ readonly queuedMessage: Schema.Struct<{
1287
+ readonly content: Schema.String;
1288
+ readonly createdAt: Schema.Date;
1289
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
1290
+ readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
1291
+ readonly position: Schema.Int;
1292
+ readonly revision: Schema.Int;
1293
+ readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
1294
+ }>;
1295
+ }>, Schema.Struct<{
1296
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1297
+ readonly invocationId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
1298
+ readonly outcome: Schema.Literal<"started">;
1299
+ readonly queuedMessageId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">>;
1300
+ }>, Schema.Struct<{
1301
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1302
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1303
+ readonly outcome: Schema.Literal<"saved">;
1304
+ readonly steeringMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/SteeringMessageId">;
1305
+ }>]>>, Schema.toCodecJson<Schema.Struct<{
1306
+ readonly correlationId: Schema.String;
1307
+ readonly error: Schema.Struct<{
1308
+ readonly details: Schema.optionalKey<Schema.Struct<{
1309
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1310
+ }>>;
1311
+ } & {
1312
+ readonly code: Schema.Literal<"conflict">;
1313
+ readonly message: Schema.String;
1314
+ readonly retryable: Schema.Boolean;
1315
+ }>;
1316
+ readonly ok: Schema.Literal<false>;
1317
+ }> | Schema.Struct<{
1318
+ readonly correlationId: Schema.String;
1319
+ readonly error: Schema.Struct<{
1320
+ readonly details: Schema.Struct<{
1321
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1322
+ }>;
1323
+ } & {
1324
+ readonly code: Schema.Literal<"forbidden">;
1325
+ readonly message: Schema.String;
1326
+ readonly retryable: Schema.Boolean;
1327
+ }>;
1328
+ readonly ok: Schema.Literal<false>;
1329
+ }> | Schema.Struct<{
1330
+ readonly correlationId: Schema.String;
1331
+ readonly error: Schema.Struct<{
1332
+ readonly code: Schema.Literal<"internal">;
1333
+ readonly message: Schema.String;
1334
+ readonly retryable: Schema.Boolean;
1335
+ }>;
1336
+ readonly ok: Schema.Literal<false>;
1337
+ }> | Schema.Struct<{
1338
+ readonly correlationId: Schema.String;
1339
+ readonly error: Schema.Struct<{
1340
+ readonly details: Schema.optionalKey<Schema.Struct<{
1341
+ readonly filename: Schema.optionalKey<Schema.String>;
1342
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1343
+ }>>;
1344
+ } & {
1345
+ readonly code: Schema.Literal<"invalid_request">;
1346
+ readonly message: Schema.String;
1347
+ readonly retryable: Schema.Boolean;
1348
+ }>;
1349
+ readonly ok: Schema.Literal<false>;
1350
+ }> | Schema.Struct<{
1351
+ readonly correlationId: Schema.String;
1352
+ readonly error: Schema.Struct<{
1353
+ readonly code: Schema.Literal<"not_found">;
1354
+ readonly message: Schema.String;
1355
+ readonly retryable: Schema.Boolean;
1356
+ }>;
1357
+ readonly ok: Schema.Literal<false>;
1358
+ }> | Schema.Struct<{
1359
+ readonly correlationId: Schema.String;
1360
+ readonly error: Schema.Struct<{
1361
+ readonly code: Schema.Literal<"rate_limited">;
1362
+ readonly message: Schema.String;
1363
+ readonly retryable: Schema.Boolean;
1364
+ }>;
1365
+ readonly ok: Schema.Literal<false>;
1366
+ }> | Schema.Struct<{
1367
+ readonly correlationId: Schema.String;
1368
+ readonly error: Schema.Struct<{
1369
+ readonly code: Schema.Literal<"unauthenticated">;
1370
+ readonly message: Schema.String;
1371
+ readonly retryable: Schema.Boolean;
1372
+ }>;
1373
+ readonly ok: Schema.Literal<false>;
1374
+ }> | Schema.Struct<{
1375
+ readonly correlationId: Schema.String;
1376
+ readonly error: Schema.Struct<{
1377
+ readonly code: Schema.Literal<"unavailable">;
1378
+ readonly message: Schema.String;
1379
+ readonly retryable: Schema.Boolean;
1380
+ }>;
1381
+ readonly ok: Schema.Literal<false>;
1382
+ }>>, never, never>, never, never>;
1383
+ readonly regenerateCompaction: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"regenerateCompaction", "POST", "/chat/conversations/:conversationId/compactions/regenerate", Schema.toCodecStringTree<Schema.Struct<{
1384
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1385
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1386
+ readonly compaction: Schema.Struct<{
1387
+ readonly active: Schema.Boolean;
1388
+ readonly activeSummary: Schema.NullOr<Schema.Struct<{
1389
+ readonly id: Schema.String;
1390
+ readonly status: Schema.String;
1391
+ readonly summary: Schema.String;
1392
+ readonly trigger: Schema.String;
1393
+ }>>;
1394
+ readonly boundary: Schema.NullOr<Schema.Struct<{
1395
+ readonly compactedThroughInvocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
1396
+ readonly coveredInvocationCount: Schema.Int;
1397
+ readonly coveredMessageCount: Schema.Int;
1398
+ }>>;
1399
+ }>;
1400
+ readonly conversation: Schema.Struct<{
1401
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
1402
+ readonly createdAt: Schema.NullOr<Schema.Date>;
1403
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1404
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
1405
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
1406
+ readonly memoryEnabled: Schema.Boolean;
1407
+ readonly organizationId: Schema.String;
1408
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
1409
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
1410
+ readonly subject: Schema.NullOr<Schema.Struct<{
1411
+ readonly id: Schema.String;
1412
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
1413
+ }>>;
1414
+ readonly title: Schema.String;
1415
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
1416
+ readonly userId: Schema.NullOr<Schema.String>;
1417
+ }>;
1418
+ }>>, Schema.toCodecJson<Schema.Struct<{
1419
+ readonly correlationId: Schema.String;
1420
+ readonly error: Schema.Struct<{
1421
+ readonly details: Schema.optionalKey<Schema.Struct<{
1422
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1423
+ }>>;
1424
+ } & {
1425
+ readonly code: Schema.Literal<"conflict">;
1426
+ readonly message: Schema.String;
1427
+ readonly retryable: Schema.Boolean;
1428
+ }>;
1429
+ readonly ok: Schema.Literal<false>;
1430
+ }> | Schema.Struct<{
1431
+ readonly correlationId: Schema.String;
1432
+ readonly error: Schema.Struct<{
1433
+ readonly details: Schema.Struct<{
1434
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1435
+ }>;
1436
+ } & {
1437
+ readonly code: Schema.Literal<"forbidden">;
1438
+ readonly message: Schema.String;
1439
+ readonly retryable: Schema.Boolean;
1440
+ }>;
1441
+ readonly ok: Schema.Literal<false>;
1442
+ }> | Schema.Struct<{
1443
+ readonly correlationId: Schema.String;
1444
+ readonly error: Schema.Struct<{
1445
+ readonly code: Schema.Literal<"internal">;
1446
+ readonly message: Schema.String;
1447
+ readonly retryable: Schema.Boolean;
1448
+ }>;
1449
+ readonly ok: Schema.Literal<false>;
1450
+ }> | Schema.Struct<{
1451
+ readonly correlationId: Schema.String;
1452
+ readonly error: Schema.Struct<{
1453
+ readonly details: Schema.optionalKey<Schema.Struct<{
1454
+ readonly filename: Schema.optionalKey<Schema.String>;
1455
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1456
+ }>>;
1457
+ } & {
1458
+ readonly code: Schema.Literal<"invalid_request">;
1459
+ readonly message: Schema.String;
1460
+ readonly retryable: Schema.Boolean;
1461
+ }>;
1462
+ readonly ok: Schema.Literal<false>;
1463
+ }> | Schema.Struct<{
1464
+ readonly correlationId: Schema.String;
1465
+ readonly error: Schema.Struct<{
1466
+ readonly code: Schema.Literal<"not_found">;
1467
+ readonly message: Schema.String;
1468
+ readonly retryable: Schema.Boolean;
1469
+ }>;
1470
+ readonly ok: Schema.Literal<false>;
1471
+ }> | Schema.Struct<{
1472
+ readonly correlationId: Schema.String;
1473
+ readonly error: Schema.Struct<{
1474
+ readonly code: Schema.Literal<"rate_limited">;
1475
+ readonly message: Schema.String;
1476
+ readonly retryable: Schema.Boolean;
1477
+ }>;
1478
+ readonly ok: Schema.Literal<false>;
1479
+ }> | Schema.Struct<{
1480
+ readonly correlationId: Schema.String;
1481
+ readonly error: Schema.Struct<{
1482
+ readonly code: Schema.Literal<"unauthenticated">;
1483
+ readonly message: Schema.String;
1484
+ readonly retryable: Schema.Boolean;
1485
+ }>;
1486
+ readonly ok: Schema.Literal<false>;
1487
+ }> | Schema.Struct<{
1488
+ readonly correlationId: Schema.String;
1489
+ readonly error: Schema.Struct<{
1490
+ readonly code: Schema.Literal<"unavailable">;
1491
+ readonly message: Schema.String;
1492
+ readonly retryable: Schema.Boolean;
1493
+ }>;
1494
+ readonly ok: Schema.Literal<false>;
1495
+ }>>, never, never>, never, never>;
1496
+ readonly removeQueuedMessage: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"removeQueuedMessage", "DELETE", "/chat/conversations/:conversationId/queued-messages/:queuedMessageId", Schema.toCodecStringTree<Schema.Struct<{
1497
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1498
+ readonly queuedMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
1499
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
1500
+ readonly revision: Schema.NumberFromString;
1501
+ }>>, never, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, Schema.toCodecJson<Schema.Struct<{
1502
+ readonly correlationId: Schema.String;
1503
+ readonly error: Schema.Struct<{
1504
+ readonly details: Schema.optionalKey<Schema.Struct<{
1505
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1506
+ }>>;
1507
+ } & {
1508
+ readonly code: Schema.Literal<"conflict">;
1509
+ readonly message: Schema.String;
1510
+ readonly retryable: Schema.Boolean;
1511
+ }>;
1512
+ readonly ok: Schema.Literal<false>;
1513
+ }> | Schema.Struct<{
1514
+ readonly correlationId: Schema.String;
1515
+ readonly error: Schema.Struct<{
1516
+ readonly details: Schema.Struct<{
1517
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1518
+ }>;
1519
+ } & {
1520
+ readonly code: Schema.Literal<"forbidden">;
1521
+ readonly message: Schema.String;
1522
+ readonly retryable: Schema.Boolean;
1523
+ }>;
1524
+ readonly ok: Schema.Literal<false>;
1525
+ }> | Schema.Struct<{
1526
+ readonly correlationId: Schema.String;
1527
+ readonly error: Schema.Struct<{
1528
+ readonly code: Schema.Literal<"internal">;
1529
+ readonly message: Schema.String;
1530
+ readonly retryable: Schema.Boolean;
1531
+ }>;
1532
+ readonly ok: Schema.Literal<false>;
1533
+ }> | Schema.Struct<{
1534
+ readonly correlationId: Schema.String;
1535
+ readonly error: Schema.Struct<{
1536
+ readonly details: Schema.optionalKey<Schema.Struct<{
1537
+ readonly filename: Schema.optionalKey<Schema.String>;
1538
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1539
+ }>>;
1540
+ } & {
1541
+ readonly code: Schema.Literal<"invalid_request">;
1542
+ readonly message: Schema.String;
1543
+ readonly retryable: Schema.Boolean;
1544
+ }>;
1545
+ readonly ok: Schema.Literal<false>;
1546
+ }> | Schema.Struct<{
1547
+ readonly correlationId: Schema.String;
1548
+ readonly error: Schema.Struct<{
1549
+ readonly code: Schema.Literal<"not_found">;
1550
+ readonly message: Schema.String;
1551
+ readonly retryable: Schema.Boolean;
1552
+ }>;
1553
+ readonly ok: Schema.Literal<false>;
1554
+ }> | Schema.Struct<{
1555
+ readonly correlationId: Schema.String;
1556
+ readonly error: Schema.Struct<{
1557
+ readonly code: Schema.Literal<"rate_limited">;
1558
+ readonly message: Schema.String;
1559
+ readonly retryable: Schema.Boolean;
1560
+ }>;
1561
+ readonly ok: Schema.Literal<false>;
1562
+ }> | Schema.Struct<{
1563
+ readonly correlationId: Schema.String;
1564
+ readonly error: Schema.Struct<{
1565
+ readonly code: Schema.Literal<"unauthenticated">;
1566
+ readonly message: Schema.String;
1567
+ readonly retryable: Schema.Boolean;
1568
+ }>;
1569
+ readonly ok: Schema.Literal<false>;
1570
+ }> | Schema.Struct<{
1571
+ readonly correlationId: Schema.String;
1572
+ readonly error: Schema.Struct<{
1573
+ readonly code: Schema.Literal<"unavailable">;
1574
+ readonly message: Schema.String;
1575
+ readonly retryable: Schema.Boolean;
1576
+ }>;
1577
+ readonly ok: Schema.Literal<false>;
1578
+ }>>, never, never>, never, never>;
1579
+ readonly resetCompaction: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"resetCompaction", "DELETE", "/chat/conversations/:conversationId/compactions/active", Schema.toCodecStringTree<Schema.Struct<{
1580
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1581
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1582
+ readonly compaction: Schema.Struct<{
1583
+ readonly active: Schema.Boolean;
1584
+ readonly activeSummary: Schema.NullOr<Schema.Struct<{
1585
+ readonly id: Schema.String;
1586
+ readonly status: Schema.String;
1587
+ readonly summary: Schema.String;
1588
+ readonly trigger: Schema.String;
1589
+ }>>;
1590
+ readonly boundary: Schema.NullOr<Schema.Struct<{
1591
+ readonly compactedThroughInvocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
1592
+ readonly coveredInvocationCount: Schema.Int;
1593
+ readonly coveredMessageCount: Schema.Int;
1594
+ }>>;
1595
+ }>;
1596
+ readonly conversation: Schema.Struct<{
1597
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
1598
+ readonly createdAt: Schema.NullOr<Schema.Date>;
1599
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1600
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
1601
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
1602
+ readonly memoryEnabled: Schema.Boolean;
1603
+ readonly organizationId: Schema.String;
1604
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
1605
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
1606
+ readonly subject: Schema.NullOr<Schema.Struct<{
1607
+ readonly id: Schema.String;
1608
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
1609
+ }>>;
1610
+ readonly title: Schema.String;
1611
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
1612
+ readonly userId: Schema.NullOr<Schema.String>;
1613
+ }>;
1614
+ }>>, Schema.toCodecJson<Schema.Struct<{
1615
+ readonly correlationId: Schema.String;
1616
+ readonly error: Schema.Struct<{
1617
+ readonly details: Schema.optionalKey<Schema.Struct<{
1618
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1619
+ }>>;
1620
+ } & {
1621
+ readonly code: Schema.Literal<"conflict">;
1622
+ readonly message: Schema.String;
1623
+ readonly retryable: Schema.Boolean;
1624
+ }>;
1625
+ readonly ok: Schema.Literal<false>;
1626
+ }> | Schema.Struct<{
1627
+ readonly correlationId: Schema.String;
1628
+ readonly error: Schema.Struct<{
1629
+ readonly details: Schema.Struct<{
1630
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1631
+ }>;
1632
+ } & {
1633
+ readonly code: Schema.Literal<"forbidden">;
1634
+ readonly message: Schema.String;
1635
+ readonly retryable: Schema.Boolean;
1636
+ }>;
1637
+ readonly ok: Schema.Literal<false>;
1638
+ }> | Schema.Struct<{
1639
+ readonly correlationId: Schema.String;
1640
+ readonly error: Schema.Struct<{
1641
+ readonly code: Schema.Literal<"internal">;
1642
+ readonly message: Schema.String;
1643
+ readonly retryable: Schema.Boolean;
1644
+ }>;
1645
+ readonly ok: Schema.Literal<false>;
1646
+ }> | Schema.Struct<{
1647
+ readonly correlationId: Schema.String;
1648
+ readonly error: Schema.Struct<{
1649
+ readonly details: Schema.optionalKey<Schema.Struct<{
1650
+ readonly filename: Schema.optionalKey<Schema.String>;
1651
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1652
+ }>>;
1653
+ } & {
1654
+ readonly code: Schema.Literal<"invalid_request">;
1655
+ readonly message: Schema.String;
1656
+ readonly retryable: Schema.Boolean;
1657
+ }>;
1658
+ readonly ok: Schema.Literal<false>;
1659
+ }> | Schema.Struct<{
1660
+ readonly correlationId: Schema.String;
1661
+ readonly error: Schema.Struct<{
1662
+ readonly code: Schema.Literal<"not_found">;
1663
+ readonly message: Schema.String;
1664
+ readonly retryable: Schema.Boolean;
1665
+ }>;
1666
+ readonly ok: Schema.Literal<false>;
1667
+ }> | Schema.Struct<{
1668
+ readonly correlationId: Schema.String;
1669
+ readonly error: Schema.Struct<{
1670
+ readonly code: Schema.Literal<"rate_limited">;
1671
+ readonly message: Schema.String;
1672
+ readonly retryable: Schema.Boolean;
1673
+ }>;
1674
+ readonly ok: Schema.Literal<false>;
1675
+ }> | Schema.Struct<{
1676
+ readonly correlationId: Schema.String;
1677
+ readonly error: Schema.Struct<{
1678
+ readonly code: Schema.Literal<"unauthenticated">;
1679
+ readonly message: Schema.String;
1680
+ readonly retryable: Schema.Boolean;
1681
+ }>;
1682
+ readonly ok: Schema.Literal<false>;
1683
+ }> | Schema.Struct<{
1684
+ readonly correlationId: Schema.String;
1685
+ readonly error: Schema.Struct<{
1686
+ readonly code: Schema.Literal<"unavailable">;
1687
+ readonly message: Schema.String;
1688
+ readonly retryable: Schema.Boolean;
1689
+ }>;
1690
+ readonly ok: Schema.Literal<false>;
1691
+ }>>, never, never>, never, never>;
1692
+ readonly resolveEvidenceNavigation: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"resolveEvidenceNavigation", "POST", "/chat/invocations/:invocationId/evidence-navigation", Schema.toCodecStringTree<Schema.Struct<{
1693
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1694
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1695
+ readonly evidenceId: Schema.NonEmptyString;
1696
+ readonly navigation: Schema.Union<readonly [Schema.Struct<{
1697
+ readonly entityId: Schema.String;
1698
+ readonly kind: Schema.Literal<"entity">;
1699
+ }>, Schema.Struct<{
1700
+ readonly fileId: Schema.String;
1701
+ readonly kind: Schema.Literal<"file">;
1702
+ }>, Schema.Struct<{
1703
+ readonly kind: Schema.Literal<"external_url">;
1704
+ readonly url: Schema.String;
1705
+ }>]>;
1706
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1707
+ readonly target: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
1708
+ readonly entityId: Schema.String;
1709
+ readonly kind: Schema.Literal<"entity">;
1710
+ }>, Schema.Struct<{
1711
+ readonly fileId: Schema.String;
1712
+ readonly kind: Schema.Literal<"file">;
1713
+ readonly mediaUrl: Schema.optionalKey<Schema.String>;
1714
+ }>, Schema.Struct<{
1715
+ readonly kind: Schema.Literal<"external_url">;
1716
+ readonly url: Schema.String;
1717
+ }>]>>;
1718
+ }>>, Schema.toCodecJson<Schema.Struct<{
1719
+ readonly correlationId: Schema.String;
1720
+ readonly error: Schema.Struct<{
1721
+ readonly details: Schema.optionalKey<Schema.Struct<{
1722
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1723
+ }>>;
1724
+ } & {
1725
+ readonly code: Schema.Literal<"conflict">;
1726
+ readonly message: Schema.String;
1727
+ readonly retryable: Schema.Boolean;
1728
+ }>;
1729
+ readonly ok: Schema.Literal<false>;
1730
+ }> | Schema.Struct<{
1731
+ readonly correlationId: Schema.String;
1732
+ readonly error: Schema.Struct<{
1733
+ readonly details: Schema.Struct<{
1734
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1735
+ }>;
1736
+ } & {
1737
+ readonly code: Schema.Literal<"forbidden">;
1738
+ readonly message: Schema.String;
1739
+ readonly retryable: Schema.Boolean;
1740
+ }>;
1741
+ readonly ok: Schema.Literal<false>;
1742
+ }> | Schema.Struct<{
1743
+ readonly correlationId: Schema.String;
1744
+ readonly error: Schema.Struct<{
1745
+ readonly code: Schema.Literal<"internal">;
1746
+ readonly message: Schema.String;
1747
+ readonly retryable: Schema.Boolean;
1748
+ }>;
1749
+ readonly ok: Schema.Literal<false>;
1750
+ }> | Schema.Struct<{
1751
+ readonly correlationId: Schema.String;
1752
+ readonly error: Schema.Struct<{
1753
+ readonly details: Schema.optionalKey<Schema.Struct<{
1754
+ readonly filename: Schema.optionalKey<Schema.String>;
1755
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1756
+ }>>;
1757
+ } & {
1758
+ readonly code: Schema.Literal<"invalid_request">;
1759
+ readonly message: Schema.String;
1760
+ readonly retryable: Schema.Boolean;
1761
+ }>;
1762
+ readonly ok: Schema.Literal<false>;
1763
+ }> | Schema.Struct<{
1764
+ readonly correlationId: Schema.String;
1765
+ readonly error: Schema.Struct<{
1766
+ readonly code: Schema.Literal<"not_found">;
1767
+ readonly message: Schema.String;
1768
+ readonly retryable: Schema.Boolean;
1769
+ }>;
1770
+ readonly ok: Schema.Literal<false>;
1771
+ }> | Schema.Struct<{
1772
+ readonly correlationId: Schema.String;
1773
+ readonly error: Schema.Struct<{
1774
+ readonly code: Schema.Literal<"rate_limited">;
1775
+ readonly message: Schema.String;
1776
+ readonly retryable: Schema.Boolean;
1777
+ }>;
1778
+ readonly ok: Schema.Literal<false>;
1779
+ }> | Schema.Struct<{
1780
+ readonly correlationId: Schema.String;
1781
+ readonly error: Schema.Struct<{
1782
+ readonly code: Schema.Literal<"unauthenticated">;
1783
+ readonly message: Schema.String;
1784
+ readonly retryable: Schema.Boolean;
1785
+ }>;
1786
+ readonly ok: Schema.Literal<false>;
1787
+ }> | Schema.Struct<{
1788
+ readonly correlationId: Schema.String;
1789
+ readonly error: Schema.Struct<{
1790
+ readonly code: Schema.Literal<"unavailable">;
1791
+ readonly message: Schema.String;
1792
+ readonly retryable: Schema.Boolean;
1793
+ }>;
1794
+ readonly ok: Schema.Literal<false>;
1795
+ }>>, never, never>, never, never>;
1796
+ readonly resumeStream: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"resumeStream", "GET", "/chat/:conversationId/stream", Schema.toCodecStringTree<Schema.Struct<{
1797
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1798
+ }>>, never, never, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").NoContent | Schema.String>, Schema.toCodecJson<Schema.Struct<{
1799
+ readonly correlationId: Schema.String;
1800
+ readonly error: Schema.Struct<{
1801
+ readonly details: Schema.optionalKey<Schema.Struct<{
1802
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1803
+ }>>;
1804
+ } & {
1805
+ readonly code: Schema.Literal<"conflict">;
1806
+ readonly message: Schema.String;
1807
+ readonly retryable: Schema.Boolean;
1808
+ }>;
1809
+ readonly ok: Schema.Literal<false>;
1810
+ }> | Schema.Struct<{
1811
+ readonly correlationId: Schema.String;
1812
+ readonly error: Schema.Struct<{
1813
+ readonly details: Schema.Struct<{
1814
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1815
+ }>;
1816
+ } & {
1817
+ readonly code: Schema.Literal<"forbidden">;
1818
+ readonly message: Schema.String;
1819
+ readonly retryable: Schema.Boolean;
1820
+ }>;
1821
+ readonly ok: Schema.Literal<false>;
1822
+ }> | Schema.Struct<{
1823
+ readonly correlationId: Schema.String;
1824
+ readonly error: Schema.Struct<{
1825
+ readonly code: Schema.Literal<"internal">;
1826
+ readonly message: Schema.String;
1827
+ readonly retryable: Schema.Boolean;
1828
+ }>;
1829
+ readonly ok: Schema.Literal<false>;
1830
+ }> | Schema.Struct<{
1831
+ readonly correlationId: Schema.String;
1832
+ readonly error: Schema.Struct<{
1833
+ readonly details: Schema.optionalKey<Schema.Struct<{
1834
+ readonly filename: Schema.optionalKey<Schema.String>;
1835
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1836
+ }>>;
1837
+ } & {
1838
+ readonly code: Schema.Literal<"invalid_request">;
1839
+ readonly message: Schema.String;
1840
+ readonly retryable: Schema.Boolean;
1841
+ }>;
1842
+ readonly ok: Schema.Literal<false>;
1843
+ }> | Schema.Struct<{
1844
+ readonly correlationId: Schema.String;
1845
+ readonly error: Schema.Struct<{
1846
+ readonly code: Schema.Literal<"not_found">;
1847
+ readonly message: Schema.String;
1848
+ readonly retryable: Schema.Boolean;
1849
+ }>;
1850
+ readonly ok: Schema.Literal<false>;
1851
+ }> | Schema.Struct<{
1852
+ readonly correlationId: Schema.String;
1853
+ readonly error: Schema.Struct<{
1854
+ readonly code: Schema.Literal<"rate_limited">;
1855
+ readonly message: Schema.String;
1856
+ readonly retryable: Schema.Boolean;
1857
+ }>;
1858
+ readonly ok: Schema.Literal<false>;
1859
+ }> | Schema.Struct<{
1860
+ readonly correlationId: Schema.String;
1861
+ readonly error: Schema.Struct<{
1862
+ readonly code: Schema.Literal<"unauthenticated">;
1863
+ readonly message: Schema.String;
1864
+ readonly retryable: Schema.Boolean;
1865
+ }>;
1866
+ readonly ok: Schema.Literal<false>;
1867
+ }> | Schema.Struct<{
1868
+ readonly correlationId: Schema.String;
1869
+ readonly error: Schema.Struct<{
1870
+ readonly code: Schema.Literal<"unavailable">;
1871
+ readonly message: Schema.String;
1872
+ readonly retryable: Schema.Boolean;
1873
+ }>;
1874
+ readonly ok: Schema.Literal<false>;
1875
+ }>>, never, never>, never, never>;
1876
+ readonly send: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"send", "POST", "/chat/:conversationId", Schema.toCodecStringTree<Schema.Struct<{
1877
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1878
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1879
+ readonly message: Schema.Struct<{
1880
+ readonly id: Schema.NonEmptyString;
1881
+ readonly metadata: Schema.optionalKey<Schema.Unknown>;
1882
+ readonly parts: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
1883
+ readonly type: Schema.String;
1884
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
1885
+ readonly role: Schema.Literals<readonly ["system", "user", "assistant"]>;
1886
+ }>;
1887
+ readonly messageId: Schema.optionalKey<Schema.String>;
1888
+ readonly trigger: Schema.Literals<readonly ["submit-message", "regenerate-message"]>;
1889
+ }>>, never, Schema.toCodecJson<Schema.String>, Schema.toCodecJson<Schema.Struct<{
1890
+ readonly correlationId: Schema.String;
1891
+ readonly error: Schema.Struct<{
1892
+ readonly details: Schema.optionalKey<Schema.Struct<{
1893
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1894
+ }>>;
1895
+ } & {
1896
+ readonly code: Schema.Literal<"conflict">;
1897
+ readonly message: Schema.String;
1898
+ readonly retryable: Schema.Boolean;
1899
+ }>;
1900
+ readonly ok: Schema.Literal<false>;
1901
+ }> | Schema.Struct<{
1902
+ readonly correlationId: Schema.String;
1903
+ readonly error: Schema.Struct<{
1904
+ readonly details: Schema.Struct<{
1905
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
1906
+ }>;
1907
+ } & {
1908
+ readonly code: Schema.Literal<"forbidden">;
1909
+ readonly message: Schema.String;
1910
+ readonly retryable: Schema.Boolean;
1911
+ }>;
1912
+ readonly ok: Schema.Literal<false>;
1913
+ }> | Schema.Struct<{
1914
+ readonly correlationId: Schema.String;
1915
+ readonly error: Schema.Struct<{
1916
+ readonly code: Schema.Literal<"internal">;
1917
+ readonly message: Schema.String;
1918
+ readonly retryable: Schema.Boolean;
1919
+ }>;
1920
+ readonly ok: Schema.Literal<false>;
1921
+ }> | Schema.Struct<{
1922
+ readonly correlationId: Schema.String;
1923
+ readonly error: Schema.Struct<{
1924
+ readonly details: Schema.optionalKey<Schema.Struct<{
1925
+ readonly filename: Schema.optionalKey<Schema.String>;
1926
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
1927
+ }>>;
1928
+ } & {
1929
+ readonly code: Schema.Literal<"invalid_request">;
1930
+ readonly message: Schema.String;
1931
+ readonly retryable: Schema.Boolean;
1932
+ }>;
1933
+ readonly ok: Schema.Literal<false>;
1934
+ }> | Schema.Struct<{
1935
+ readonly correlationId: Schema.String;
1936
+ readonly error: Schema.Struct<{
1937
+ readonly code: Schema.Literal<"not_found">;
1938
+ readonly message: Schema.String;
1939
+ readonly retryable: Schema.Boolean;
1940
+ }>;
1941
+ readonly ok: Schema.Literal<false>;
1942
+ }> | Schema.Struct<{
1943
+ readonly correlationId: Schema.String;
1944
+ readonly error: Schema.Struct<{
1945
+ readonly code: Schema.Literal<"rate_limited">;
1946
+ readonly message: Schema.String;
1947
+ readonly retryable: Schema.Boolean;
1948
+ }>;
1949
+ readonly ok: Schema.Literal<false>;
1950
+ }> | Schema.Struct<{
1951
+ readonly correlationId: Schema.String;
1952
+ readonly error: Schema.Struct<{
1953
+ readonly code: Schema.Literal<"unauthenticated">;
1954
+ readonly message: Schema.String;
1955
+ readonly retryable: Schema.Boolean;
1956
+ }>;
1957
+ readonly ok: Schema.Literal<false>;
1958
+ }> | Schema.Struct<{
1959
+ readonly correlationId: Schema.String;
1960
+ readonly error: Schema.Struct<{
1961
+ readonly code: Schema.Literal<"unavailable">;
1962
+ readonly message: Schema.String;
1963
+ readonly retryable: Schema.Boolean;
1964
+ }>;
1965
+ readonly ok: Schema.Literal<false>;
1966
+ }>>, never, never>, never, never>;
1967
+ readonly sendSteeringMessage: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"sendSteeringMessage", "POST", "/chat/conversations/:conversationId/steering-messages", Schema.toCodecStringTree<Schema.Struct<{
1968
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1969
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1970
+ readonly clientMessageId: Schema.String;
1971
+ readonly content: Schema.String;
1972
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1973
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
1974
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1975
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1976
+ readonly outcome: Schema.Literal<"started">;
1977
+ readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
1978
+ }>, Schema.Struct<{
1979
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1980
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
1981
+ readonly outcome: Schema.Literal<"saved">;
1982
+ readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
1983
+ readonly steeringMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/SteeringMessageId">;
1984
+ }>, Schema.Struct<{
1985
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
1986
+ readonly outcome: Schema.Literal<"queued">;
1987
+ readonly queuedMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
1988
+ readonly revision: Schema.Int;
1989
+ }>]>>, Schema.toCodecJson<Schema.Struct<{
1990
+ readonly correlationId: Schema.String;
1991
+ readonly error: Schema.Struct<{
1992
+ readonly details: Schema.optionalKey<Schema.Struct<{
1993
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
1994
+ }>>;
1995
+ } & {
1996
+ readonly code: Schema.Literal<"conflict">;
1997
+ readonly message: Schema.String;
1998
+ readonly retryable: Schema.Boolean;
1999
+ }>;
2000
+ readonly ok: Schema.Literal<false>;
2001
+ }> | Schema.Struct<{
2002
+ readonly correlationId: Schema.String;
2003
+ readonly error: Schema.Struct<{
2004
+ readonly details: Schema.Struct<{
2005
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2006
+ }>;
2007
+ } & {
2008
+ readonly code: Schema.Literal<"forbidden">;
2009
+ readonly message: Schema.String;
2010
+ readonly retryable: Schema.Boolean;
2011
+ }>;
2012
+ readonly ok: Schema.Literal<false>;
2013
+ }> | Schema.Struct<{
2014
+ readonly correlationId: Schema.String;
2015
+ readonly error: Schema.Struct<{
2016
+ readonly code: Schema.Literal<"internal">;
2017
+ readonly message: Schema.String;
2018
+ readonly retryable: Schema.Boolean;
2019
+ }>;
2020
+ readonly ok: Schema.Literal<false>;
2021
+ }> | Schema.Struct<{
2022
+ readonly correlationId: Schema.String;
2023
+ readonly error: Schema.Struct<{
2024
+ readonly details: Schema.optionalKey<Schema.Struct<{
2025
+ readonly filename: Schema.optionalKey<Schema.String>;
2026
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2027
+ }>>;
2028
+ } & {
2029
+ readonly code: Schema.Literal<"invalid_request">;
2030
+ readonly message: Schema.String;
2031
+ readonly retryable: Schema.Boolean;
2032
+ }>;
2033
+ readonly ok: Schema.Literal<false>;
2034
+ }> | Schema.Struct<{
2035
+ readonly correlationId: Schema.String;
2036
+ readonly error: Schema.Struct<{
2037
+ readonly code: Schema.Literal<"not_found">;
2038
+ readonly message: Schema.String;
2039
+ readonly retryable: Schema.Boolean;
2040
+ }>;
2041
+ readonly ok: Schema.Literal<false>;
2042
+ }> | Schema.Struct<{
2043
+ readonly correlationId: Schema.String;
2044
+ readonly error: Schema.Struct<{
2045
+ readonly code: Schema.Literal<"rate_limited">;
2046
+ readonly message: Schema.String;
2047
+ readonly retryable: Schema.Boolean;
2048
+ }>;
2049
+ readonly ok: Schema.Literal<false>;
2050
+ }> | Schema.Struct<{
2051
+ readonly correlationId: Schema.String;
2052
+ readonly error: Schema.Struct<{
2053
+ readonly code: Schema.Literal<"unauthenticated">;
2054
+ readonly message: Schema.String;
2055
+ readonly retryable: Schema.Boolean;
2056
+ }>;
2057
+ readonly ok: Schema.Literal<false>;
2058
+ }> | Schema.Struct<{
2059
+ readonly correlationId: Schema.String;
2060
+ readonly error: Schema.Struct<{
2061
+ readonly code: Schema.Literal<"unavailable">;
2062
+ readonly message: Schema.String;
2063
+ readonly retryable: Schema.Boolean;
2064
+ }>;
2065
+ readonly ok: Schema.Literal<false>;
2066
+ }>>, never, never>, never, never>;
2067
+ readonly streamRun: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"streamRun", "GET", "/runs/:runId/stream", Schema.toCodecStringTree<Schema.Struct<{
2068
+ readonly runId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
2069
+ }>>, never, never, never, Schema.toCodecJson<Schema.String>, Schema.toCodecJson<Schema.Struct<{
2070
+ readonly correlationId: Schema.String;
2071
+ readonly error: Schema.Struct<{
2072
+ readonly details: Schema.optionalKey<Schema.Struct<{
2073
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2074
+ }>>;
2075
+ } & {
2076
+ readonly code: Schema.Literal<"conflict">;
2077
+ readonly message: Schema.String;
2078
+ readonly retryable: Schema.Boolean;
2079
+ }>;
2080
+ readonly ok: Schema.Literal<false>;
2081
+ }> | Schema.Struct<{
2082
+ readonly correlationId: Schema.String;
2083
+ readonly error: Schema.Struct<{
2084
+ readonly details: Schema.Struct<{
2085
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2086
+ }>;
2087
+ } & {
2088
+ readonly code: Schema.Literal<"forbidden">;
2089
+ readonly message: Schema.String;
2090
+ readonly retryable: Schema.Boolean;
2091
+ }>;
2092
+ readonly ok: Schema.Literal<false>;
2093
+ }> | Schema.Struct<{
2094
+ readonly correlationId: Schema.String;
2095
+ readonly error: Schema.Struct<{
2096
+ readonly code: Schema.Literal<"internal">;
2097
+ readonly message: Schema.String;
2098
+ readonly retryable: Schema.Boolean;
2099
+ }>;
2100
+ readonly ok: Schema.Literal<false>;
2101
+ }> | Schema.Struct<{
2102
+ readonly correlationId: Schema.String;
2103
+ readonly error: Schema.Struct<{
2104
+ readonly details: Schema.optionalKey<Schema.Struct<{
2105
+ readonly filename: Schema.optionalKey<Schema.String>;
2106
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2107
+ }>>;
2108
+ } & {
2109
+ readonly code: Schema.Literal<"invalid_request">;
2110
+ readonly message: Schema.String;
2111
+ readonly retryable: Schema.Boolean;
2112
+ }>;
2113
+ readonly ok: Schema.Literal<false>;
2114
+ }> | Schema.Struct<{
2115
+ readonly correlationId: Schema.String;
2116
+ readonly error: Schema.Struct<{
2117
+ readonly code: Schema.Literal<"not_found">;
2118
+ readonly message: Schema.String;
2119
+ readonly retryable: Schema.Boolean;
2120
+ }>;
2121
+ readonly ok: Schema.Literal<false>;
2122
+ }> | Schema.Struct<{
2123
+ readonly correlationId: Schema.String;
2124
+ readonly error: Schema.Struct<{
2125
+ readonly code: Schema.Literal<"rate_limited">;
2126
+ readonly message: Schema.String;
2127
+ readonly retryable: Schema.Boolean;
2128
+ }>;
2129
+ readonly ok: Schema.Literal<false>;
2130
+ }> | Schema.Struct<{
2131
+ readonly correlationId: Schema.String;
2132
+ readonly error: Schema.Struct<{
2133
+ readonly code: Schema.Literal<"unauthenticated">;
2134
+ readonly message: Schema.String;
2135
+ readonly retryable: Schema.Boolean;
2136
+ }>;
2137
+ readonly ok: Schema.Literal<false>;
2138
+ }> | Schema.Struct<{
2139
+ readonly correlationId: Schema.String;
2140
+ readonly error: Schema.Struct<{
2141
+ readonly code: Schema.Literal<"unavailable">;
2142
+ readonly message: Schema.String;
2143
+ readonly retryable: Schema.Boolean;
2144
+ }>;
2145
+ readonly ok: Schema.Literal<false>;
2146
+ }>>, never, never>, never, never>;
2147
+ readonly updateConversation: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"updateConversation", "PATCH", "/chat/conversations/:conversationId", Schema.toCodecStringTree<Schema.Struct<{
2148
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2149
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2150
+ readonly memoryEnabled: Schema.optionalKey<Schema.Boolean>;
2151
+ readonly projectId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>>;
2152
+ readonly title: Schema.optionalKey<Schema.String>;
2153
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2154
+ readonly agentId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">>;
2155
+ readonly createdAt: Schema.NullOr<Schema.Date>;
2156
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2157
+ readonly lastActivityAt: Schema.NullOr<Schema.Date>;
2158
+ readonly lastActivityInvocationId: Schema.NullOr<Schema.String>;
2159
+ readonly memoryEnabled: Schema.Boolean;
2160
+ readonly organizationId: Schema.String;
2161
+ readonly origin: Schema.Codec<import("../domain/place.js").Place, import("../domain/place.js").Place, never, never>;
2162
+ readonly projectId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">>;
2163
+ readonly subject: Schema.NullOr<Schema.Struct<{
2164
+ readonly id: Schema.String;
2165
+ readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
2166
+ }>>;
2167
+ readonly title: Schema.String;
2168
+ readonly updatedAt: Schema.NullOr<Schema.Date>;
2169
+ readonly userId: Schema.NullOr<Schema.String>;
2170
+ }>>, Schema.toCodecJson<Schema.Struct<{
2171
+ readonly correlationId: Schema.String;
2172
+ readonly error: Schema.Struct<{
2173
+ readonly details: Schema.optionalKey<Schema.Struct<{
2174
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2175
+ }>>;
2176
+ } & {
2177
+ readonly code: Schema.Literal<"conflict">;
2178
+ readonly message: Schema.String;
2179
+ readonly retryable: Schema.Boolean;
2180
+ }>;
2181
+ readonly ok: Schema.Literal<false>;
2182
+ }> | Schema.Struct<{
2183
+ readonly correlationId: Schema.String;
2184
+ readonly error: Schema.Struct<{
2185
+ readonly details: Schema.Struct<{
2186
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2187
+ }>;
2188
+ } & {
2189
+ readonly code: Schema.Literal<"forbidden">;
2190
+ readonly message: Schema.String;
2191
+ readonly retryable: Schema.Boolean;
2192
+ }>;
2193
+ readonly ok: Schema.Literal<false>;
2194
+ }> | Schema.Struct<{
2195
+ readonly correlationId: Schema.String;
2196
+ readonly error: Schema.Struct<{
2197
+ readonly code: Schema.Literal<"internal">;
2198
+ readonly message: Schema.String;
2199
+ readonly retryable: Schema.Boolean;
2200
+ }>;
2201
+ readonly ok: Schema.Literal<false>;
2202
+ }> | Schema.Struct<{
2203
+ readonly correlationId: Schema.String;
2204
+ readonly error: Schema.Struct<{
2205
+ readonly details: Schema.optionalKey<Schema.Struct<{
2206
+ readonly filename: Schema.optionalKey<Schema.String>;
2207
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2208
+ }>>;
2209
+ } & {
2210
+ readonly code: Schema.Literal<"invalid_request">;
2211
+ readonly message: Schema.String;
2212
+ readonly retryable: Schema.Boolean;
2213
+ }>;
2214
+ readonly ok: Schema.Literal<false>;
2215
+ }> | Schema.Struct<{
2216
+ readonly correlationId: Schema.String;
2217
+ readonly error: Schema.Struct<{
2218
+ readonly code: Schema.Literal<"not_found">;
2219
+ readonly message: Schema.String;
2220
+ readonly retryable: Schema.Boolean;
2221
+ }>;
2222
+ readonly ok: Schema.Literal<false>;
2223
+ }> | Schema.Struct<{
2224
+ readonly correlationId: Schema.String;
2225
+ readonly error: Schema.Struct<{
2226
+ readonly code: Schema.Literal<"rate_limited">;
2227
+ readonly message: Schema.String;
2228
+ readonly retryable: Schema.Boolean;
2229
+ }>;
2230
+ readonly ok: Schema.Literal<false>;
2231
+ }> | Schema.Struct<{
2232
+ readonly correlationId: Schema.String;
2233
+ readonly error: Schema.Struct<{
2234
+ readonly code: Schema.Literal<"unauthenticated">;
2235
+ readonly message: Schema.String;
2236
+ readonly retryable: Schema.Boolean;
2237
+ }>;
2238
+ readonly ok: Schema.Literal<false>;
2239
+ }> | Schema.Struct<{
2240
+ readonly correlationId: Schema.String;
2241
+ readonly error: Schema.Struct<{
2242
+ readonly code: Schema.Literal<"unavailable">;
2243
+ readonly message: Schema.String;
2244
+ readonly retryable: Schema.Boolean;
2245
+ }>;
2246
+ readonly ok: Schema.Literal<false>;
2247
+ }>>, never, never>, never, never>;
2248
+ readonly updateQueuedMessage: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"updateQueuedMessage", "PATCH", "/chat/conversations/:conversationId/queued-messages/:queuedMessageId", Schema.toCodecStringTree<Schema.Struct<{
2249
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2250
+ readonly queuedMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
2251
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2252
+ readonly content: Schema.String;
2253
+ readonly revision: Schema.Int;
2254
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2255
+ readonly content: Schema.String;
2256
+ readonly createdAt: Schema.Date;
2257
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
2258
+ readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
2259
+ readonly position: Schema.Int;
2260
+ readonly revision: Schema.Int;
2261
+ readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
2262
+ }>>, Schema.toCodecJson<Schema.Struct<{
2263
+ readonly correlationId: Schema.String;
2264
+ readonly error: Schema.Struct<{
2265
+ readonly details: Schema.optionalKey<Schema.Struct<{
2266
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2267
+ }>>;
2268
+ } & {
2269
+ readonly code: Schema.Literal<"conflict">;
2270
+ readonly message: Schema.String;
2271
+ readonly retryable: Schema.Boolean;
2272
+ }>;
2273
+ readonly ok: Schema.Literal<false>;
2274
+ }> | Schema.Struct<{
2275
+ readonly correlationId: Schema.String;
2276
+ readonly error: Schema.Struct<{
2277
+ readonly details: Schema.Struct<{
2278
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2279
+ }>;
2280
+ } & {
2281
+ readonly code: Schema.Literal<"forbidden">;
2282
+ readonly message: Schema.String;
2283
+ readonly retryable: Schema.Boolean;
2284
+ }>;
2285
+ readonly ok: Schema.Literal<false>;
2286
+ }> | Schema.Struct<{
2287
+ readonly correlationId: Schema.String;
2288
+ readonly error: Schema.Struct<{
2289
+ readonly code: Schema.Literal<"internal">;
2290
+ readonly message: Schema.String;
2291
+ readonly retryable: Schema.Boolean;
2292
+ }>;
2293
+ readonly ok: Schema.Literal<false>;
2294
+ }> | Schema.Struct<{
2295
+ readonly correlationId: Schema.String;
2296
+ readonly error: Schema.Struct<{
2297
+ readonly details: Schema.optionalKey<Schema.Struct<{
2298
+ readonly filename: Schema.optionalKey<Schema.String>;
2299
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2300
+ }>>;
2301
+ } & {
2302
+ readonly code: Schema.Literal<"invalid_request">;
2303
+ readonly message: Schema.String;
2304
+ readonly retryable: Schema.Boolean;
2305
+ }>;
2306
+ readonly ok: Schema.Literal<false>;
2307
+ }> | Schema.Struct<{
2308
+ readonly correlationId: Schema.String;
2309
+ readonly error: Schema.Struct<{
2310
+ readonly code: Schema.Literal<"not_found">;
2311
+ readonly message: Schema.String;
2312
+ readonly retryable: Schema.Boolean;
2313
+ }>;
2314
+ readonly ok: Schema.Literal<false>;
2315
+ }> | Schema.Struct<{
2316
+ readonly correlationId: Schema.String;
2317
+ readonly error: Schema.Struct<{
2318
+ readonly code: Schema.Literal<"rate_limited">;
2319
+ readonly message: Schema.String;
2320
+ readonly retryable: Schema.Boolean;
2321
+ }>;
2322
+ readonly ok: Schema.Literal<false>;
2323
+ }> | Schema.Struct<{
2324
+ readonly correlationId: Schema.String;
2325
+ readonly error: Schema.Struct<{
2326
+ readonly code: Schema.Literal<"unauthenticated">;
2327
+ readonly message: Schema.String;
2328
+ readonly retryable: Schema.Boolean;
2329
+ }>;
2330
+ readonly ok: Schema.Literal<false>;
2331
+ }> | Schema.Struct<{
2332
+ readonly correlationId: Schema.String;
2333
+ readonly error: Schema.Struct<{
2334
+ readonly code: Schema.Literal<"unavailable">;
2335
+ readonly message: Schema.String;
2336
+ readonly retryable: Schema.Boolean;
2337
+ }>;
2338
+ readonly ok: Schema.Literal<false>;
2339
+ }>>, never, never>, never, never>;
2340
+ readonly watchTurnWait: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"watchTurnWait", "GET", "/chat/conversations/:conversationId/turns/:invocationId/wait", Schema.toCodecStringTree<Schema.Struct<{
2341
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2342
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
2343
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2344
+ readonly waiting: Schema.Boolean;
2345
+ }>>, Schema.toCodecJson<Schema.Struct<{
2346
+ readonly correlationId: Schema.String;
2347
+ readonly error: Schema.Struct<{
2348
+ readonly details: Schema.optionalKey<Schema.Struct<{
2349
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2350
+ }>>;
2351
+ } & {
2352
+ readonly code: Schema.Literal<"conflict">;
2353
+ readonly message: Schema.String;
2354
+ readonly retryable: Schema.Boolean;
2355
+ }>;
2356
+ readonly ok: Schema.Literal<false>;
2357
+ }> | Schema.Struct<{
2358
+ readonly correlationId: Schema.String;
2359
+ readonly error: Schema.Struct<{
2360
+ readonly details: Schema.Struct<{
2361
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2362
+ }>;
2363
+ } & {
2364
+ readonly code: Schema.Literal<"forbidden">;
2365
+ readonly message: Schema.String;
2366
+ readonly retryable: Schema.Boolean;
2367
+ }>;
2368
+ readonly ok: Schema.Literal<false>;
2369
+ }> | Schema.Struct<{
2370
+ readonly correlationId: Schema.String;
2371
+ readonly error: Schema.Struct<{
2372
+ readonly code: Schema.Literal<"internal">;
2373
+ readonly message: Schema.String;
2374
+ readonly retryable: Schema.Boolean;
2375
+ }>;
2376
+ readonly ok: Schema.Literal<false>;
2377
+ }> | Schema.Struct<{
2378
+ readonly correlationId: Schema.String;
2379
+ readonly error: Schema.Struct<{
2380
+ readonly details: Schema.optionalKey<Schema.Struct<{
2381
+ readonly filename: Schema.optionalKey<Schema.String>;
2382
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2383
+ }>>;
2384
+ } & {
2385
+ readonly code: Schema.Literal<"invalid_request">;
2386
+ readonly message: Schema.String;
2387
+ readonly retryable: Schema.Boolean;
2388
+ }>;
2389
+ readonly ok: Schema.Literal<false>;
2390
+ }> | Schema.Struct<{
2391
+ readonly correlationId: Schema.String;
2392
+ readonly error: Schema.Struct<{
2393
+ readonly code: Schema.Literal<"not_found">;
2394
+ readonly message: Schema.String;
2395
+ readonly retryable: Schema.Boolean;
2396
+ }>;
2397
+ readonly ok: Schema.Literal<false>;
2398
+ }> | Schema.Struct<{
2399
+ readonly correlationId: Schema.String;
2400
+ readonly error: Schema.Struct<{
2401
+ readonly code: Schema.Literal<"rate_limited">;
2402
+ readonly message: Schema.String;
2403
+ readonly retryable: Schema.Boolean;
2404
+ }>;
2405
+ readonly ok: Schema.Literal<false>;
2406
+ }> | Schema.Struct<{
2407
+ readonly correlationId: Schema.String;
2408
+ readonly error: Schema.Struct<{
2409
+ readonly code: Schema.Literal<"unauthenticated">;
2410
+ readonly message: Schema.String;
2411
+ readonly retryable: Schema.Boolean;
2412
+ }>;
2413
+ readonly ok: Schema.Literal<false>;
2414
+ }> | Schema.Struct<{
2415
+ readonly correlationId: Schema.String;
2416
+ readonly error: Schema.Struct<{
2417
+ readonly code: Schema.Literal<"unavailable">;
2418
+ readonly message: Schema.String;
2419
+ readonly retryable: Schema.Boolean;
2420
+ }>;
2421
+ readonly ok: Schema.Literal<false>;
2422
+ }>>, never, never>, never, never>;
2423
+ };
2424
+ readonly chatAttachments: {
2425
+ readonly getAttachmentDownloadUrl: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getAttachmentDownloadUrl", "GET", "/chat/conversations/:conversationId/attachments/:attachmentId/download-url", Schema.toCodecStringTree<Schema.Struct<{
2426
+ readonly attachmentId: Schema.brand<Schema.String, "@collective-intelligence/ai/AttachmentId">;
2427
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2428
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2429
+ readonly expiresIn: Schema.Int;
2430
+ readonly url: Schema.String;
2431
+ }>>, Schema.toCodecJson<Schema.Struct<{
2432
+ readonly correlationId: Schema.String;
2433
+ readonly error: Schema.Struct<{
2434
+ readonly details: Schema.optionalKey<Schema.Struct<{
2435
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2436
+ }>>;
2437
+ } & {
2438
+ readonly code: Schema.Literal<"conflict">;
2439
+ readonly message: Schema.String;
2440
+ readonly retryable: Schema.Boolean;
2441
+ }>;
2442
+ readonly ok: Schema.Literal<false>;
2443
+ }> | Schema.Struct<{
2444
+ readonly correlationId: Schema.String;
2445
+ readonly error: Schema.Struct<{
2446
+ readonly details: Schema.Struct<{
2447
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2448
+ }>;
2449
+ } & {
2450
+ readonly code: Schema.Literal<"forbidden">;
2451
+ readonly message: Schema.String;
2452
+ readonly retryable: Schema.Boolean;
2453
+ }>;
2454
+ readonly ok: Schema.Literal<false>;
2455
+ }> | Schema.Struct<{
2456
+ readonly correlationId: Schema.String;
2457
+ readonly error: Schema.Struct<{
2458
+ readonly code: Schema.Literal<"internal">;
2459
+ readonly message: Schema.String;
2460
+ readonly retryable: Schema.Boolean;
2461
+ }>;
2462
+ readonly ok: Schema.Literal<false>;
2463
+ }> | Schema.Struct<{
2464
+ readonly correlationId: Schema.String;
2465
+ readonly error: Schema.Struct<{
2466
+ readonly details: Schema.optionalKey<Schema.Struct<{
2467
+ readonly filename: Schema.optionalKey<Schema.String>;
2468
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2469
+ }>>;
2470
+ } & {
2471
+ readonly code: Schema.Literal<"invalid_request">;
2472
+ readonly message: Schema.String;
2473
+ readonly retryable: Schema.Boolean;
2474
+ }>;
2475
+ readonly ok: Schema.Literal<false>;
2476
+ }> | Schema.Struct<{
2477
+ readonly correlationId: Schema.String;
2478
+ readonly error: Schema.Struct<{
2479
+ readonly code: Schema.Literal<"not_found">;
2480
+ readonly message: Schema.String;
2481
+ readonly retryable: Schema.Boolean;
2482
+ }>;
2483
+ readonly ok: Schema.Literal<false>;
2484
+ }> | Schema.Struct<{
2485
+ readonly correlationId: Schema.String;
2486
+ readonly error: Schema.Struct<{
2487
+ readonly code: Schema.Literal<"rate_limited">;
2488
+ readonly message: Schema.String;
2489
+ readonly retryable: Schema.Boolean;
2490
+ }>;
2491
+ readonly ok: Schema.Literal<false>;
2492
+ }> | Schema.Struct<{
2493
+ readonly correlationId: Schema.String;
2494
+ readonly error: Schema.Struct<{
2495
+ readonly code: Schema.Literal<"unauthenticated">;
2496
+ readonly message: Schema.String;
2497
+ readonly retryable: Schema.Boolean;
2498
+ }>;
2499
+ readonly ok: Schema.Literal<false>;
2500
+ }> | Schema.Struct<{
2501
+ readonly correlationId: Schema.String;
2502
+ readonly error: Schema.Struct<{
2503
+ readonly code: Schema.Literal<"unavailable">;
2504
+ readonly message: Schema.String;
2505
+ readonly retryable: Schema.Boolean;
2506
+ }>;
2507
+ readonly ok: Schema.Literal<false>;
2508
+ }>>, never, never>, never, never>;
2509
+ readonly uploadAttachments: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"uploadAttachments", "POST", "/chat/conversations/:conversationId/attachments", Schema.toCodecStringTree<Schema.Struct<{
2510
+ readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
2511
+ }>>, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").asMultipart<Schema.Struct<{
2512
+ readonly files: Schema.$Array<import("effect/http/Multipart").PersistedFileSchema>;
2513
+ }>>>, never, Schema.toCodecJson<Schema.Struct<{
2514
+ readonly attachments: Schema.$Array<Schema.Struct<{
2515
+ characterCount: Schema.Int;
2516
+ contentType: Schema.NullOr<Schema.String>;
2517
+ extension: Schema.NullOr<Schema.String>;
2518
+ extractionStatus: Schema.String;
2519
+ filename: Schema.String;
2520
+ id: Schema.brand<Schema.String, "@collective-intelligence/ai/AttachmentId">;
2521
+ sizeBytes: Schema.Int;
2522
+ truncated: Schema.Boolean;
2523
+ unavailableReason: Schema.NullOr<Schema.String>;
2524
+ }>>;
2525
+ }>>, Schema.toCodecJson<Schema.Struct<{
2526
+ readonly correlationId: Schema.String;
2527
+ readonly error: Schema.Struct<{
2528
+ readonly details: Schema.optionalKey<Schema.Struct<{
2529
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2530
+ }>>;
2531
+ } & {
2532
+ readonly code: Schema.Literal<"conflict">;
2533
+ readonly message: Schema.String;
2534
+ readonly retryable: Schema.Boolean;
2535
+ }>;
2536
+ readonly ok: Schema.Literal<false>;
2537
+ }> | Schema.Struct<{
2538
+ readonly correlationId: Schema.String;
2539
+ readonly error: Schema.Struct<{
2540
+ readonly details: Schema.Struct<{
2541
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2542
+ }>;
2543
+ } & {
2544
+ readonly code: Schema.Literal<"forbidden">;
2545
+ readonly message: Schema.String;
2546
+ readonly retryable: Schema.Boolean;
2547
+ }>;
2548
+ readonly ok: Schema.Literal<false>;
2549
+ }> | Schema.Struct<{
2550
+ readonly correlationId: Schema.String;
2551
+ readonly error: Schema.Struct<{
2552
+ readonly code: Schema.Literal<"internal">;
2553
+ readonly message: Schema.String;
2554
+ readonly retryable: Schema.Boolean;
2555
+ }>;
2556
+ readonly ok: Schema.Literal<false>;
2557
+ }> | Schema.Struct<{
2558
+ readonly correlationId: Schema.String;
2559
+ readonly error: Schema.Struct<{
2560
+ readonly details: Schema.optionalKey<Schema.Struct<{
2561
+ readonly filename: Schema.optionalKey<Schema.String>;
2562
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2563
+ }>>;
2564
+ } & {
2565
+ readonly code: Schema.Literal<"invalid_request">;
2566
+ readonly message: Schema.String;
2567
+ readonly retryable: Schema.Boolean;
2568
+ }>;
2569
+ readonly ok: Schema.Literal<false>;
2570
+ }> | Schema.Struct<{
2571
+ readonly correlationId: Schema.String;
2572
+ readonly error: Schema.Struct<{
2573
+ readonly code: Schema.Literal<"not_found">;
2574
+ readonly message: Schema.String;
2575
+ readonly retryable: Schema.Boolean;
2576
+ }>;
2577
+ readonly ok: Schema.Literal<false>;
2578
+ }> | Schema.Struct<{
2579
+ readonly correlationId: Schema.String;
2580
+ readonly error: Schema.Struct<{
2581
+ readonly code: Schema.Literal<"rate_limited">;
2582
+ readonly message: Schema.String;
2583
+ readonly retryable: Schema.Boolean;
2584
+ }>;
2585
+ readonly ok: Schema.Literal<false>;
2586
+ }> | Schema.Struct<{
2587
+ readonly correlationId: Schema.String;
2588
+ readonly error: Schema.Struct<{
2589
+ readonly code: Schema.Literal<"unauthenticated">;
2590
+ readonly message: Schema.String;
2591
+ readonly retryable: Schema.Boolean;
2592
+ }>;
2593
+ readonly ok: Schema.Literal<false>;
2594
+ }> | Schema.Struct<{
2595
+ readonly correlationId: Schema.String;
2596
+ readonly error: Schema.Struct<{
2597
+ readonly code: Schema.Literal<"unavailable">;
2598
+ readonly message: Schema.String;
2599
+ readonly retryable: Schema.Boolean;
2600
+ }>;
2601
+ readonly ok: Schema.Literal<false>;
2602
+ }>>, never, never>, never, never>;
2603
+ };
2604
+ readonly chatCatalog: {
2605
+ readonly getAttachmentCapabilities: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getAttachmentCapabilities", "GET", "/chat/attachment-capabilities", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
2606
+ readonly fileTypes: Schema.$Array<Schema.Struct<{
2607
+ readonly extension: Schema.String;
2608
+ readonly mediaTypes: Schema.$Array<Schema.String>;
2609
+ }>>;
2610
+ readonly projectFileTypes: Schema.$Array<Schema.Struct<{
2611
+ readonly extension: Schema.String;
2612
+ readonly mediaTypes: Schema.$Array<Schema.String>;
2613
+ }>>;
2614
+ }>>, Schema.toCodecJson<Schema.Struct<{
2615
+ readonly correlationId: Schema.String;
2616
+ readonly error: Schema.Struct<{
2617
+ readonly details: Schema.optionalKey<Schema.Struct<{
2618
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2619
+ }>>;
2620
+ } & {
2621
+ readonly code: Schema.Literal<"conflict">;
2622
+ readonly message: Schema.String;
2623
+ readonly retryable: Schema.Boolean;
2624
+ }>;
2625
+ readonly ok: Schema.Literal<false>;
2626
+ }> | Schema.Struct<{
2627
+ readonly correlationId: Schema.String;
2628
+ readonly error: Schema.Struct<{
2629
+ readonly details: Schema.Struct<{
2630
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2631
+ }>;
2632
+ } & {
2633
+ readonly code: Schema.Literal<"forbidden">;
2634
+ readonly message: Schema.String;
2635
+ readonly retryable: Schema.Boolean;
2636
+ }>;
2637
+ readonly ok: Schema.Literal<false>;
2638
+ }> | Schema.Struct<{
2639
+ readonly correlationId: Schema.String;
2640
+ readonly error: Schema.Struct<{
2641
+ readonly code: Schema.Literal<"internal">;
2642
+ readonly message: Schema.String;
2643
+ readonly retryable: Schema.Boolean;
2644
+ }>;
2645
+ readonly ok: Schema.Literal<false>;
2646
+ }> | Schema.Struct<{
2647
+ readonly correlationId: Schema.String;
2648
+ readonly error: Schema.Struct<{
2649
+ readonly details: Schema.optionalKey<Schema.Struct<{
2650
+ readonly filename: Schema.optionalKey<Schema.String>;
2651
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2652
+ }>>;
2653
+ } & {
2654
+ readonly code: Schema.Literal<"invalid_request">;
2655
+ readonly message: Schema.String;
2656
+ readonly retryable: Schema.Boolean;
2657
+ }>;
2658
+ readonly ok: Schema.Literal<false>;
2659
+ }> | Schema.Struct<{
2660
+ readonly correlationId: Schema.String;
2661
+ readonly error: Schema.Struct<{
2662
+ readonly code: Schema.Literal<"not_found">;
2663
+ readonly message: Schema.String;
2664
+ readonly retryable: Schema.Boolean;
2665
+ }>;
2666
+ readonly ok: Schema.Literal<false>;
2667
+ }> | Schema.Struct<{
2668
+ readonly correlationId: Schema.String;
2669
+ readonly error: Schema.Struct<{
2670
+ readonly code: Schema.Literal<"rate_limited">;
2671
+ readonly message: Schema.String;
2672
+ readonly retryable: Schema.Boolean;
2673
+ }>;
2674
+ readonly ok: Schema.Literal<false>;
2675
+ }> | Schema.Struct<{
2676
+ readonly correlationId: Schema.String;
2677
+ readonly error: Schema.Struct<{
2678
+ readonly code: Schema.Literal<"unauthenticated">;
2679
+ readonly message: Schema.String;
2680
+ readonly retryable: Schema.Boolean;
2681
+ }>;
2682
+ readonly ok: Schema.Literal<false>;
2683
+ }> | Schema.Struct<{
2684
+ readonly correlationId: Schema.String;
2685
+ readonly error: Schema.Struct<{
2686
+ readonly code: Schema.Literal<"unavailable">;
2687
+ readonly message: Schema.String;
2688
+ readonly retryable: Schema.Boolean;
2689
+ }>;
2690
+ readonly ok: Schema.Literal<false>;
2691
+ }>>, never, never>, never, never>;
2692
+ readonly listAgents: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listAgents", "GET", "/chat/agents", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
2693
+ readonly data: Schema.$Array<Schema.Struct<{
2694
+ readonly agentType: Schema.Literals<readonly ["organization", "personal"]>;
2695
+ readonly degraded: Schema.Boolean;
2696
+ readonly displayName: Schema.String;
2697
+ readonly fqn: Schema.String;
2698
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/AgentId">;
2699
+ readonly paused: Schema.Boolean;
2700
+ readonly responsibility: Schema.String;
2701
+ }>>;
2702
+ }>>, Schema.toCodecJson<Schema.Struct<{
2703
+ readonly correlationId: Schema.String;
2704
+ readonly error: Schema.Struct<{
2705
+ readonly details: Schema.optionalKey<Schema.Struct<{
2706
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2707
+ }>>;
2708
+ } & {
2709
+ readonly code: Schema.Literal<"conflict">;
2710
+ readonly message: Schema.String;
2711
+ readonly retryable: Schema.Boolean;
2712
+ }>;
2713
+ readonly ok: Schema.Literal<false>;
2714
+ }> | Schema.Struct<{
2715
+ readonly correlationId: Schema.String;
2716
+ readonly error: Schema.Struct<{
2717
+ readonly details: Schema.Struct<{
2718
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2719
+ }>;
2720
+ } & {
2721
+ readonly code: Schema.Literal<"forbidden">;
2722
+ readonly message: Schema.String;
2723
+ readonly retryable: Schema.Boolean;
2724
+ }>;
2725
+ readonly ok: Schema.Literal<false>;
2726
+ }> | Schema.Struct<{
2727
+ readonly correlationId: Schema.String;
2728
+ readonly error: Schema.Struct<{
2729
+ readonly code: Schema.Literal<"internal">;
2730
+ readonly message: Schema.String;
2731
+ readonly retryable: Schema.Boolean;
2732
+ }>;
2733
+ readonly ok: Schema.Literal<false>;
2734
+ }> | Schema.Struct<{
2735
+ readonly correlationId: Schema.String;
2736
+ readonly error: Schema.Struct<{
2737
+ readonly details: Schema.optionalKey<Schema.Struct<{
2738
+ readonly filename: Schema.optionalKey<Schema.String>;
2739
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2740
+ }>>;
2741
+ } & {
2742
+ readonly code: Schema.Literal<"invalid_request">;
2743
+ readonly message: Schema.String;
2744
+ readonly retryable: Schema.Boolean;
2745
+ }>;
2746
+ readonly ok: Schema.Literal<false>;
2747
+ }> | Schema.Struct<{
2748
+ readonly correlationId: Schema.String;
2749
+ readonly error: Schema.Struct<{
2750
+ readonly code: Schema.Literal<"not_found">;
2751
+ readonly message: Schema.String;
2752
+ readonly retryable: Schema.Boolean;
2753
+ }>;
2754
+ readonly ok: Schema.Literal<false>;
2755
+ }> | Schema.Struct<{
2756
+ readonly correlationId: Schema.String;
2757
+ readonly error: Schema.Struct<{
2758
+ readonly code: Schema.Literal<"rate_limited">;
2759
+ readonly message: Schema.String;
2760
+ readonly retryable: Schema.Boolean;
2761
+ }>;
2762
+ readonly ok: Schema.Literal<false>;
2763
+ }> | Schema.Struct<{
2764
+ readonly correlationId: Schema.String;
2765
+ readonly error: Schema.Struct<{
2766
+ readonly code: Schema.Literal<"unauthenticated">;
2767
+ readonly message: Schema.String;
2768
+ readonly retryable: Schema.Boolean;
2769
+ }>;
2770
+ readonly ok: Schema.Literal<false>;
2771
+ }> | Schema.Struct<{
2772
+ readonly correlationId: Schema.String;
2773
+ readonly error: Schema.Struct<{
2774
+ readonly code: Schema.Literal<"unavailable">;
2775
+ readonly message: Schema.String;
2776
+ readonly retryable: Schema.Boolean;
2777
+ }>;
2778
+ readonly ok: Schema.Literal<false>;
2779
+ }>>, never, never>, never, never>;
2780
+ readonly listSkills: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listSkills", "GET", "/chat/skills", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
2781
+ readonly data: Schema.$Array<Schema.Struct<{
2782
+ readonly dataAccess: Schema.NullOr<Schema.Struct<{
2783
+ readonly datasets: Schema.optionalKey<Schema.Literals<readonly ["user", "skill"]>>;
2784
+ readonly documents: Schema.optionalKey<Schema.Literals<readonly ["user", "skill"]>>;
2785
+ readonly knowledge: Schema.optionalKey<Schema.Literals<readonly ["user", "skill"]>>;
2786
+ }>>;
2787
+ readonly description: Schema.NullOr<Schema.String>;
2788
+ readonly fqn: Schema.String;
2789
+ readonly id: Schema.String;
2790
+ readonly name: Schema.String;
2791
+ readonly slug: Schema.String;
2792
+ }>>;
2793
+ }>>, Schema.toCodecJson<Schema.Struct<{
2794
+ readonly correlationId: Schema.String;
2795
+ readonly error: Schema.Struct<{
2796
+ readonly details: Schema.optionalKey<Schema.Struct<{
2797
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2798
+ }>>;
2799
+ } & {
2800
+ readonly code: Schema.Literal<"conflict">;
2801
+ readonly message: Schema.String;
2802
+ readonly retryable: Schema.Boolean;
2803
+ }>;
2804
+ readonly ok: Schema.Literal<false>;
2805
+ }> | Schema.Struct<{
2806
+ readonly correlationId: Schema.String;
2807
+ readonly error: Schema.Struct<{
2808
+ readonly details: Schema.Struct<{
2809
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2810
+ }>;
2811
+ } & {
2812
+ readonly code: Schema.Literal<"forbidden">;
2813
+ readonly message: Schema.String;
2814
+ readonly retryable: Schema.Boolean;
2815
+ }>;
2816
+ readonly ok: Schema.Literal<false>;
2817
+ }> | Schema.Struct<{
2818
+ readonly correlationId: Schema.String;
2819
+ readonly error: Schema.Struct<{
2820
+ readonly code: Schema.Literal<"internal">;
2821
+ readonly message: Schema.String;
2822
+ readonly retryable: Schema.Boolean;
2823
+ }>;
2824
+ readonly ok: Schema.Literal<false>;
2825
+ }> | Schema.Struct<{
2826
+ readonly correlationId: Schema.String;
2827
+ readonly error: Schema.Struct<{
2828
+ readonly details: Schema.optionalKey<Schema.Struct<{
2829
+ readonly filename: Schema.optionalKey<Schema.String>;
2830
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2831
+ }>>;
2832
+ } & {
2833
+ readonly code: Schema.Literal<"invalid_request">;
2834
+ readonly message: Schema.String;
2835
+ readonly retryable: Schema.Boolean;
2836
+ }>;
2837
+ readonly ok: Schema.Literal<false>;
2838
+ }> | Schema.Struct<{
2839
+ readonly correlationId: Schema.String;
2840
+ readonly error: Schema.Struct<{
2841
+ readonly code: Schema.Literal<"not_found">;
2842
+ readonly message: Schema.String;
2843
+ readonly retryable: Schema.Boolean;
2844
+ }>;
2845
+ readonly ok: Schema.Literal<false>;
2846
+ }> | Schema.Struct<{
2847
+ readonly correlationId: Schema.String;
2848
+ readonly error: Schema.Struct<{
2849
+ readonly code: Schema.Literal<"rate_limited">;
2850
+ readonly message: Schema.String;
2851
+ readonly retryable: Schema.Boolean;
2852
+ }>;
2853
+ readonly ok: Schema.Literal<false>;
2854
+ }> | Schema.Struct<{
2855
+ readonly correlationId: Schema.String;
2856
+ readonly error: Schema.Struct<{
2857
+ readonly code: Schema.Literal<"unauthenticated">;
2858
+ readonly message: Schema.String;
2859
+ readonly retryable: Schema.Boolean;
2860
+ }>;
2861
+ readonly ok: Schema.Literal<false>;
2862
+ }> | Schema.Struct<{
2863
+ readonly correlationId: Schema.String;
2864
+ readonly error: Schema.Struct<{
2865
+ readonly code: Schema.Literal<"unavailable">;
2866
+ readonly message: Schema.String;
2867
+ readonly retryable: Schema.Boolean;
2868
+ }>;
2869
+ readonly ok: Schema.Literal<false>;
2870
+ }>>, never, never>, never, never>;
2871
+ readonly listTools: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listTools", "GET", "/chat/tools", never, Schema.toCodecStringTree<Schema.Struct<{
2872
+ readonly conversationId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">>;
2873
+ readonly usageScope: Schema.optionalKey<Schema.Literals<readonly ["chat", "skill", "automation"]>>;
2874
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2875
+ readonly data: Schema.$Array<Schema.Struct<{
2876
+ readonly collectionId: Schema.NullOr<Schema.String>;
2877
+ readonly description: Schema.String;
2878
+ readonly displayName: Schema.String;
2879
+ readonly fqn: Schema.String;
2880
+ readonly id: Schema.String;
2881
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2882
+ }>>;
2883
+ }>>, Schema.toCodecJson<Schema.Struct<{
2884
+ readonly correlationId: Schema.String;
2885
+ readonly error: Schema.Struct<{
2886
+ readonly details: Schema.optionalKey<Schema.Struct<{
2887
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2888
+ }>>;
2889
+ } & {
2890
+ readonly code: Schema.Literal<"conflict">;
2891
+ readonly message: Schema.String;
2892
+ readonly retryable: Schema.Boolean;
2893
+ }>;
2894
+ readonly ok: Schema.Literal<false>;
2895
+ }> | Schema.Struct<{
2896
+ readonly correlationId: Schema.String;
2897
+ readonly error: Schema.Struct<{
2898
+ readonly details: Schema.Struct<{
2899
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2900
+ }>;
2901
+ } & {
2902
+ readonly code: Schema.Literal<"forbidden">;
2903
+ readonly message: Schema.String;
2904
+ readonly retryable: Schema.Boolean;
2905
+ }>;
2906
+ readonly ok: Schema.Literal<false>;
2907
+ }> | Schema.Struct<{
2908
+ readonly correlationId: Schema.String;
2909
+ readonly error: Schema.Struct<{
2910
+ readonly code: Schema.Literal<"internal">;
2911
+ readonly message: Schema.String;
2912
+ readonly retryable: Schema.Boolean;
2913
+ }>;
2914
+ readonly ok: Schema.Literal<false>;
2915
+ }> | Schema.Struct<{
2916
+ readonly correlationId: Schema.String;
2917
+ readonly error: Schema.Struct<{
2918
+ readonly details: Schema.optionalKey<Schema.Struct<{
2919
+ readonly filename: Schema.optionalKey<Schema.String>;
2920
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
2921
+ }>>;
2922
+ } & {
2923
+ readonly code: Schema.Literal<"invalid_request">;
2924
+ readonly message: Schema.String;
2925
+ readonly retryable: Schema.Boolean;
2926
+ }>;
2927
+ readonly ok: Schema.Literal<false>;
2928
+ }> | Schema.Struct<{
2929
+ readonly correlationId: Schema.String;
2930
+ readonly error: Schema.Struct<{
2931
+ readonly code: Schema.Literal<"not_found">;
2932
+ readonly message: Schema.String;
2933
+ readonly retryable: Schema.Boolean;
2934
+ }>;
2935
+ readonly ok: Schema.Literal<false>;
2936
+ }> | Schema.Struct<{
2937
+ readonly correlationId: Schema.String;
2938
+ readonly error: Schema.Struct<{
2939
+ readonly code: Schema.Literal<"rate_limited">;
2940
+ readonly message: Schema.String;
2941
+ readonly retryable: Schema.Boolean;
2942
+ }>;
2943
+ readonly ok: Schema.Literal<false>;
2944
+ }> | Schema.Struct<{
2945
+ readonly correlationId: Schema.String;
2946
+ readonly error: Schema.Struct<{
2947
+ readonly code: Schema.Literal<"unauthenticated">;
2948
+ readonly message: Schema.String;
2949
+ readonly retryable: Schema.Boolean;
2950
+ }>;
2951
+ readonly ok: Schema.Literal<false>;
2952
+ }> | Schema.Struct<{
2953
+ readonly correlationId: Schema.String;
2954
+ readonly error: Schema.Struct<{
2955
+ readonly code: Schema.Literal<"unavailable">;
2956
+ readonly message: Schema.String;
2957
+ readonly retryable: Schema.Boolean;
2958
+ }>;
2959
+ readonly ok: Schema.Literal<false>;
2960
+ }>>, never, never>, never, never>;
2961
+ };
2962
+ readonly chatFeedback: {
2963
+ readonly clearAnswerFeedback: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"clearAnswerFeedback", "DELETE", "/chat/answers/:invocationId/feedback", Schema.toCodecStringTree<Schema.Struct<{
2964
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
2965
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2966
+ readonly currentUserFeedback: Schema.Struct<{
2967
+ readonly sentiment: Schema.NullOr<Schema.Literals<readonly ["positive", "negative"]>>;
2968
+ readonly submitterNote: Schema.NullOr<Schema.String>;
2969
+ }>;
2970
+ readonly feedbackTargetId: Schema.String;
2971
+ }>>, Schema.toCodecJson<Schema.Struct<{
2972
+ readonly correlationId: Schema.String;
2973
+ readonly error: Schema.Struct<{
2974
+ readonly details: Schema.optionalKey<Schema.Struct<{
2975
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
2976
+ }>>;
2977
+ } & {
2978
+ readonly code: Schema.Literal<"conflict">;
2979
+ readonly message: Schema.String;
2980
+ readonly retryable: Schema.Boolean;
2981
+ }>;
2982
+ readonly ok: Schema.Literal<false>;
2983
+ }> | Schema.Struct<{
2984
+ readonly correlationId: Schema.String;
2985
+ readonly error: Schema.Struct<{
2986
+ readonly details: Schema.Struct<{
2987
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
2988
+ }>;
2989
+ } & {
2990
+ readonly code: Schema.Literal<"forbidden">;
2991
+ readonly message: Schema.String;
2992
+ readonly retryable: Schema.Boolean;
2993
+ }>;
2994
+ readonly ok: Schema.Literal<false>;
2995
+ }> | Schema.Struct<{
2996
+ readonly correlationId: Schema.String;
2997
+ readonly error: Schema.Struct<{
2998
+ readonly code: Schema.Literal<"internal">;
2999
+ readonly message: Schema.String;
3000
+ readonly retryable: Schema.Boolean;
3001
+ }>;
3002
+ readonly ok: Schema.Literal<false>;
3003
+ }> | Schema.Struct<{
3004
+ readonly correlationId: Schema.String;
3005
+ readonly error: Schema.Struct<{
3006
+ readonly details: Schema.optionalKey<Schema.Struct<{
3007
+ readonly filename: Schema.optionalKey<Schema.String>;
3008
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3009
+ }>>;
3010
+ } & {
3011
+ readonly code: Schema.Literal<"invalid_request">;
3012
+ readonly message: Schema.String;
3013
+ readonly retryable: Schema.Boolean;
3014
+ }>;
3015
+ readonly ok: Schema.Literal<false>;
3016
+ }> | Schema.Struct<{
3017
+ readonly correlationId: Schema.String;
3018
+ readonly error: Schema.Struct<{
3019
+ readonly code: Schema.Literal<"not_found">;
3020
+ readonly message: Schema.String;
3021
+ readonly retryable: Schema.Boolean;
3022
+ }>;
3023
+ readonly ok: Schema.Literal<false>;
3024
+ }> | Schema.Struct<{
3025
+ readonly correlationId: Schema.String;
3026
+ readonly error: Schema.Struct<{
3027
+ readonly code: Schema.Literal<"rate_limited">;
3028
+ readonly message: Schema.String;
3029
+ readonly retryable: Schema.Boolean;
3030
+ }>;
3031
+ readonly ok: Schema.Literal<false>;
3032
+ }> | Schema.Struct<{
3033
+ readonly correlationId: Schema.String;
3034
+ readonly error: Schema.Struct<{
3035
+ readonly code: Schema.Literal<"unauthenticated">;
3036
+ readonly message: Schema.String;
3037
+ readonly retryable: Schema.Boolean;
3038
+ }>;
3039
+ readonly ok: Schema.Literal<false>;
3040
+ }> | Schema.Struct<{
3041
+ readonly correlationId: Schema.String;
3042
+ readonly error: Schema.Struct<{
3043
+ readonly code: Schema.Literal<"unavailable">;
3044
+ readonly message: Schema.String;
3045
+ readonly retryable: Schema.Boolean;
3046
+ }>;
3047
+ readonly ok: Schema.Literal<false>;
3048
+ }>>, never, never>, never, never>;
3049
+ readonly putAnswerFeedback: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"putAnswerFeedback", "PUT", "/chat/answers/:invocationId/feedback", Schema.toCodecStringTree<Schema.Struct<{
3050
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
3051
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3052
+ readonly sentiment: Schema.Literals<readonly ["positive", "negative"]>;
3053
+ readonly submitterNote: Schema.optionalKey<Schema.String>;
3054
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3055
+ readonly currentUserFeedback: Schema.Struct<{
3056
+ readonly sentiment: Schema.NullOr<Schema.Literals<readonly ["positive", "negative"]>>;
3057
+ readonly submitterNote: Schema.NullOr<Schema.String>;
3058
+ }>;
3059
+ readonly feedbackTargetId: Schema.String;
3060
+ }>>, Schema.toCodecJson<Schema.Struct<{
3061
+ readonly correlationId: Schema.String;
3062
+ readonly error: Schema.Struct<{
3063
+ readonly details: Schema.optionalKey<Schema.Struct<{
3064
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3065
+ }>>;
3066
+ } & {
3067
+ readonly code: Schema.Literal<"conflict">;
3068
+ readonly message: Schema.String;
3069
+ readonly retryable: Schema.Boolean;
3070
+ }>;
3071
+ readonly ok: Schema.Literal<false>;
3072
+ }> | Schema.Struct<{
3073
+ readonly correlationId: Schema.String;
3074
+ readonly error: Schema.Struct<{
3075
+ readonly details: Schema.Struct<{
3076
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3077
+ }>;
3078
+ } & {
3079
+ readonly code: Schema.Literal<"forbidden">;
3080
+ readonly message: Schema.String;
3081
+ readonly retryable: Schema.Boolean;
3082
+ }>;
3083
+ readonly ok: Schema.Literal<false>;
3084
+ }> | Schema.Struct<{
3085
+ readonly correlationId: Schema.String;
3086
+ readonly error: Schema.Struct<{
3087
+ readonly code: Schema.Literal<"internal">;
3088
+ readonly message: Schema.String;
3089
+ readonly retryable: Schema.Boolean;
3090
+ }>;
3091
+ readonly ok: Schema.Literal<false>;
3092
+ }> | Schema.Struct<{
3093
+ readonly correlationId: Schema.String;
3094
+ readonly error: Schema.Struct<{
3095
+ readonly details: Schema.optionalKey<Schema.Struct<{
3096
+ readonly filename: Schema.optionalKey<Schema.String>;
3097
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3098
+ }>>;
3099
+ } & {
3100
+ readonly code: Schema.Literal<"invalid_request">;
3101
+ readonly message: Schema.String;
3102
+ readonly retryable: Schema.Boolean;
3103
+ }>;
3104
+ readonly ok: Schema.Literal<false>;
3105
+ }> | Schema.Struct<{
3106
+ readonly correlationId: Schema.String;
3107
+ readonly error: Schema.Struct<{
3108
+ readonly code: Schema.Literal<"not_found">;
3109
+ readonly message: Schema.String;
3110
+ readonly retryable: Schema.Boolean;
3111
+ }>;
3112
+ readonly ok: Schema.Literal<false>;
3113
+ }> | Schema.Struct<{
3114
+ readonly correlationId: Schema.String;
3115
+ readonly error: Schema.Struct<{
3116
+ readonly code: Schema.Literal<"rate_limited">;
3117
+ readonly message: Schema.String;
3118
+ readonly retryable: Schema.Boolean;
3119
+ }>;
3120
+ readonly ok: Schema.Literal<false>;
3121
+ }> | Schema.Struct<{
3122
+ readonly correlationId: Schema.String;
3123
+ readonly error: Schema.Struct<{
3124
+ readonly code: Schema.Literal<"unauthenticated">;
3125
+ readonly message: Schema.String;
3126
+ readonly retryable: Schema.Boolean;
3127
+ }>;
3128
+ readonly ok: Schema.Literal<false>;
3129
+ }> | Schema.Struct<{
3130
+ readonly correlationId: Schema.String;
3131
+ readonly error: Schema.Struct<{
3132
+ readonly code: Schema.Literal<"unavailable">;
3133
+ readonly message: Schema.String;
3134
+ readonly retryable: Schema.Boolean;
3135
+ }>;
3136
+ readonly ok: Schema.Literal<false>;
3137
+ }>>, never, never>, never, never>;
3138
+ };
3139
+ readonly chatProjects: {
3140
+ readonly createProject: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"createProject", "POST", "/chat/projects", never, never, Schema.toCodecJson<Schema.Struct<{
3141
+ readonly name: Schema.Trim;
3142
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3143
+ readonly createdAt: Schema.Date;
3144
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3145
+ readonly instructions: Schema.NullOr<Schema.String>;
3146
+ readonly name: Schema.String;
3147
+ readonly updatedAt: Schema.Date;
3148
+ }>>, Schema.toCodecJson<Schema.Struct<{
3149
+ readonly correlationId: Schema.String;
3150
+ readonly error: Schema.Struct<{
3151
+ readonly details: Schema.optionalKey<Schema.Struct<{
3152
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3153
+ }>>;
3154
+ } & {
3155
+ readonly code: Schema.Literal<"conflict">;
3156
+ readonly message: Schema.String;
3157
+ readonly retryable: Schema.Boolean;
3158
+ }>;
3159
+ readonly ok: Schema.Literal<false>;
3160
+ }> | Schema.Struct<{
3161
+ readonly correlationId: Schema.String;
3162
+ readonly error: Schema.Struct<{
3163
+ readonly details: Schema.Struct<{
3164
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3165
+ }>;
3166
+ } & {
3167
+ readonly code: Schema.Literal<"forbidden">;
3168
+ readonly message: Schema.String;
3169
+ readonly retryable: Schema.Boolean;
3170
+ }>;
3171
+ readonly ok: Schema.Literal<false>;
3172
+ }> | Schema.Struct<{
3173
+ readonly correlationId: Schema.String;
3174
+ readonly error: Schema.Struct<{
3175
+ readonly code: Schema.Literal<"internal">;
3176
+ readonly message: Schema.String;
3177
+ readonly retryable: Schema.Boolean;
3178
+ }>;
3179
+ readonly ok: Schema.Literal<false>;
3180
+ }> | Schema.Struct<{
3181
+ readonly correlationId: Schema.String;
3182
+ readonly error: Schema.Struct<{
3183
+ readonly details: Schema.optionalKey<Schema.Struct<{
3184
+ readonly filename: Schema.optionalKey<Schema.String>;
3185
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3186
+ }>>;
3187
+ } & {
3188
+ readonly code: Schema.Literal<"invalid_request">;
3189
+ readonly message: Schema.String;
3190
+ readonly retryable: Schema.Boolean;
3191
+ }>;
3192
+ readonly ok: Schema.Literal<false>;
3193
+ }> | Schema.Struct<{
3194
+ readonly correlationId: Schema.String;
3195
+ readonly error: Schema.Struct<{
3196
+ readonly code: Schema.Literal<"not_found">;
3197
+ readonly message: Schema.String;
3198
+ readonly retryable: Schema.Boolean;
3199
+ }>;
3200
+ readonly ok: Schema.Literal<false>;
3201
+ }> | Schema.Struct<{
3202
+ readonly correlationId: Schema.String;
3203
+ readonly error: Schema.Struct<{
3204
+ readonly code: Schema.Literal<"rate_limited">;
3205
+ readonly message: Schema.String;
3206
+ readonly retryable: Schema.Boolean;
3207
+ }>;
3208
+ readonly ok: Schema.Literal<false>;
3209
+ }> | Schema.Struct<{
3210
+ readonly correlationId: Schema.String;
3211
+ readonly error: Schema.Struct<{
3212
+ readonly code: Schema.Literal<"unauthenticated">;
3213
+ readonly message: Schema.String;
3214
+ readonly retryable: Schema.Boolean;
3215
+ }>;
3216
+ readonly ok: Schema.Literal<false>;
3217
+ }> | Schema.Struct<{
3218
+ readonly correlationId: Schema.String;
3219
+ readonly error: Schema.Struct<{
3220
+ readonly code: Schema.Literal<"unavailable">;
3221
+ readonly message: Schema.String;
3222
+ readonly retryable: Schema.Boolean;
3223
+ }>;
3224
+ readonly ok: Schema.Literal<false>;
3225
+ }>>, never, never>, never, never>;
3226
+ readonly deleteProject: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteProject", "DELETE", "/chat/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
3227
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3228
+ }>>, never, never, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, Schema.toCodecJson<Schema.Struct<{
3229
+ readonly correlationId: Schema.String;
3230
+ readonly error: Schema.Struct<{
3231
+ readonly details: Schema.optionalKey<Schema.Struct<{
3232
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3233
+ }>>;
3234
+ } & {
3235
+ readonly code: Schema.Literal<"conflict">;
3236
+ readonly message: Schema.String;
3237
+ readonly retryable: Schema.Boolean;
3238
+ }>;
3239
+ readonly ok: Schema.Literal<false>;
3240
+ }> | Schema.Struct<{
3241
+ readonly correlationId: Schema.String;
3242
+ readonly error: Schema.Struct<{
3243
+ readonly details: Schema.Struct<{
3244
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3245
+ }>;
3246
+ } & {
3247
+ readonly code: Schema.Literal<"forbidden">;
3248
+ readonly message: Schema.String;
3249
+ readonly retryable: Schema.Boolean;
3250
+ }>;
3251
+ readonly ok: Schema.Literal<false>;
3252
+ }> | Schema.Struct<{
3253
+ readonly correlationId: Schema.String;
3254
+ readonly error: Schema.Struct<{
3255
+ readonly code: Schema.Literal<"internal">;
3256
+ readonly message: Schema.String;
3257
+ readonly retryable: Schema.Boolean;
3258
+ }>;
3259
+ readonly ok: Schema.Literal<false>;
3260
+ }> | Schema.Struct<{
3261
+ readonly correlationId: Schema.String;
3262
+ readonly error: Schema.Struct<{
3263
+ readonly details: Schema.optionalKey<Schema.Struct<{
3264
+ readonly filename: Schema.optionalKey<Schema.String>;
3265
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3266
+ }>>;
3267
+ } & {
3268
+ readonly code: Schema.Literal<"invalid_request">;
3269
+ readonly message: Schema.String;
3270
+ readonly retryable: Schema.Boolean;
3271
+ }>;
3272
+ readonly ok: Schema.Literal<false>;
3273
+ }> | Schema.Struct<{
3274
+ readonly correlationId: Schema.String;
3275
+ readonly error: Schema.Struct<{
3276
+ readonly code: Schema.Literal<"not_found">;
3277
+ readonly message: Schema.String;
3278
+ readonly retryable: Schema.Boolean;
3279
+ }>;
3280
+ readonly ok: Schema.Literal<false>;
3281
+ }> | Schema.Struct<{
3282
+ readonly correlationId: Schema.String;
3283
+ readonly error: Schema.Struct<{
3284
+ readonly code: Schema.Literal<"rate_limited">;
3285
+ readonly message: Schema.String;
3286
+ readonly retryable: Schema.Boolean;
3287
+ }>;
3288
+ readonly ok: Schema.Literal<false>;
3289
+ }> | Schema.Struct<{
3290
+ readonly correlationId: Schema.String;
3291
+ readonly error: Schema.Struct<{
3292
+ readonly code: Schema.Literal<"unauthenticated">;
3293
+ readonly message: Schema.String;
3294
+ readonly retryable: Schema.Boolean;
3295
+ }>;
3296
+ readonly ok: Schema.Literal<false>;
3297
+ }> | Schema.Struct<{
3298
+ readonly correlationId: Schema.String;
3299
+ readonly error: Schema.Struct<{
3300
+ readonly code: Schema.Literal<"unavailable">;
3301
+ readonly message: Schema.String;
3302
+ readonly retryable: Schema.Boolean;
3303
+ }>;
3304
+ readonly ok: Schema.Literal<false>;
3305
+ }>>, never, never>, never, never>;
3306
+ readonly deleteProjectFile: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteProjectFile", "DELETE", "/chat/projects/:projectId/files/:fileId", Schema.toCodecStringTree<Schema.Struct<{
3307
+ readonly fileId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
3308
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3309
+ }>>, never, never, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, Schema.toCodecJson<Schema.Struct<{
3310
+ readonly correlationId: Schema.String;
3311
+ readonly error: Schema.Struct<{
3312
+ readonly details: Schema.optionalKey<Schema.Struct<{
3313
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3314
+ }>>;
3315
+ } & {
3316
+ readonly code: Schema.Literal<"conflict">;
3317
+ readonly message: Schema.String;
3318
+ readonly retryable: Schema.Boolean;
3319
+ }>;
3320
+ readonly ok: Schema.Literal<false>;
3321
+ }> | Schema.Struct<{
3322
+ readonly correlationId: Schema.String;
3323
+ readonly error: Schema.Struct<{
3324
+ readonly details: Schema.Struct<{
3325
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3326
+ }>;
3327
+ } & {
3328
+ readonly code: Schema.Literal<"forbidden">;
3329
+ readonly message: Schema.String;
3330
+ readonly retryable: Schema.Boolean;
3331
+ }>;
3332
+ readonly ok: Schema.Literal<false>;
3333
+ }> | Schema.Struct<{
3334
+ readonly correlationId: Schema.String;
3335
+ readonly error: Schema.Struct<{
3336
+ readonly code: Schema.Literal<"internal">;
3337
+ readonly message: Schema.String;
3338
+ readonly retryable: Schema.Boolean;
3339
+ }>;
3340
+ readonly ok: Schema.Literal<false>;
3341
+ }> | Schema.Struct<{
3342
+ readonly correlationId: Schema.String;
3343
+ readonly error: Schema.Struct<{
3344
+ readonly details: Schema.optionalKey<Schema.Struct<{
3345
+ readonly filename: Schema.optionalKey<Schema.String>;
3346
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3347
+ }>>;
3348
+ } & {
3349
+ readonly code: Schema.Literal<"invalid_request">;
3350
+ readonly message: Schema.String;
3351
+ readonly retryable: Schema.Boolean;
3352
+ }>;
3353
+ readonly ok: Schema.Literal<false>;
3354
+ }> | Schema.Struct<{
3355
+ readonly correlationId: Schema.String;
3356
+ readonly error: Schema.Struct<{
3357
+ readonly code: Schema.Literal<"not_found">;
3358
+ readonly message: Schema.String;
3359
+ readonly retryable: Schema.Boolean;
3360
+ }>;
3361
+ readonly ok: Schema.Literal<false>;
3362
+ }> | Schema.Struct<{
3363
+ readonly correlationId: Schema.String;
3364
+ readonly error: Schema.Struct<{
3365
+ readonly code: Schema.Literal<"rate_limited">;
3366
+ readonly message: Schema.String;
3367
+ readonly retryable: Schema.Boolean;
3368
+ }>;
3369
+ readonly ok: Schema.Literal<false>;
3370
+ }> | Schema.Struct<{
3371
+ readonly correlationId: Schema.String;
3372
+ readonly error: Schema.Struct<{
3373
+ readonly code: Schema.Literal<"unauthenticated">;
3374
+ readonly message: Schema.String;
3375
+ readonly retryable: Schema.Boolean;
3376
+ }>;
3377
+ readonly ok: Schema.Literal<false>;
3378
+ }> | Schema.Struct<{
3379
+ readonly correlationId: Schema.String;
3380
+ readonly error: Schema.Struct<{
3381
+ readonly code: Schema.Literal<"unavailable">;
3382
+ readonly message: Schema.String;
3383
+ readonly retryable: Schema.Boolean;
3384
+ }>;
3385
+ readonly ok: Schema.Literal<false>;
3386
+ }>>, never, never>, never, never>;
3387
+ readonly getProjectFileDownloadUrl: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getProjectFileDownloadUrl", "GET", "/chat/projects/:projectId/files/:fileId/download-url", Schema.toCodecStringTree<Schema.Struct<{
3388
+ readonly fileId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
3389
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3390
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
3391
+ readonly expiresIn: Schema.Int;
3392
+ readonly url: Schema.String;
3393
+ }>>, Schema.toCodecJson<Schema.Struct<{
3394
+ readonly correlationId: Schema.String;
3395
+ readonly error: Schema.Struct<{
3396
+ readonly details: Schema.optionalKey<Schema.Struct<{
3397
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3398
+ }>>;
3399
+ } & {
3400
+ readonly code: Schema.Literal<"conflict">;
3401
+ readonly message: Schema.String;
3402
+ readonly retryable: Schema.Boolean;
3403
+ }>;
3404
+ readonly ok: Schema.Literal<false>;
3405
+ }> | Schema.Struct<{
3406
+ readonly correlationId: Schema.String;
3407
+ readonly error: Schema.Struct<{
3408
+ readonly details: Schema.Struct<{
3409
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3410
+ }>;
3411
+ } & {
3412
+ readonly code: Schema.Literal<"forbidden">;
3413
+ readonly message: Schema.String;
3414
+ readonly retryable: Schema.Boolean;
3415
+ }>;
3416
+ readonly ok: Schema.Literal<false>;
3417
+ }> | Schema.Struct<{
3418
+ readonly correlationId: Schema.String;
3419
+ readonly error: Schema.Struct<{
3420
+ readonly code: Schema.Literal<"internal">;
3421
+ readonly message: Schema.String;
3422
+ readonly retryable: Schema.Boolean;
3423
+ }>;
3424
+ readonly ok: Schema.Literal<false>;
3425
+ }> | Schema.Struct<{
3426
+ readonly correlationId: Schema.String;
3427
+ readonly error: Schema.Struct<{
3428
+ readonly details: Schema.optionalKey<Schema.Struct<{
3429
+ readonly filename: Schema.optionalKey<Schema.String>;
3430
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3431
+ }>>;
3432
+ } & {
3433
+ readonly code: Schema.Literal<"invalid_request">;
3434
+ readonly message: Schema.String;
3435
+ readonly retryable: Schema.Boolean;
3436
+ }>;
3437
+ readonly ok: Schema.Literal<false>;
3438
+ }> | Schema.Struct<{
3439
+ readonly correlationId: Schema.String;
3440
+ readonly error: Schema.Struct<{
3441
+ readonly code: Schema.Literal<"not_found">;
3442
+ readonly message: Schema.String;
3443
+ readonly retryable: Schema.Boolean;
3444
+ }>;
3445
+ readonly ok: Schema.Literal<false>;
3446
+ }> | Schema.Struct<{
3447
+ readonly correlationId: Schema.String;
3448
+ readonly error: Schema.Struct<{
3449
+ readonly code: Schema.Literal<"rate_limited">;
3450
+ readonly message: Schema.String;
3451
+ readonly retryable: Schema.Boolean;
3452
+ }>;
3453
+ readonly ok: Schema.Literal<false>;
3454
+ }> | Schema.Struct<{
3455
+ readonly correlationId: Schema.String;
3456
+ readonly error: Schema.Struct<{
3457
+ readonly code: Schema.Literal<"unauthenticated">;
3458
+ readonly message: Schema.String;
3459
+ readonly retryable: Schema.Boolean;
3460
+ }>;
3461
+ readonly ok: Schema.Literal<false>;
3462
+ }> | Schema.Struct<{
3463
+ readonly correlationId: Schema.String;
3464
+ readonly error: Schema.Struct<{
3465
+ readonly code: Schema.Literal<"unavailable">;
3466
+ readonly message: Schema.String;
3467
+ readonly retryable: Schema.Boolean;
3468
+ }>;
3469
+ readonly ok: Schema.Literal<false>;
3470
+ }>>, never, never>, never, never>;
3471
+ readonly listProjectFiles: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listProjectFiles", "GET", "/chat/projects/:projectId/files", Schema.toCodecStringTree<Schema.Struct<{
3472
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3473
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
3474
+ readonly files: Schema.$Array<Schema.Struct<{
3475
+ readonly contentType: Schema.NullOr<Schema.String>;
3476
+ readonly createdAt: Schema.Date;
3477
+ readonly extractionState: Schema.Literals<readonly ["available", "truncated", "failed"]>;
3478
+ readonly filename: Schema.String;
3479
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
3480
+ readonly inContext: Schema.Boolean;
3481
+ readonly sizeBytes: Schema.Int;
3482
+ }>>;
3483
+ readonly maxCharacters: Schema.Int;
3484
+ readonly usedCharacters: Schema.Int;
3485
+ }>>, Schema.toCodecJson<Schema.Struct<{
3486
+ readonly correlationId: Schema.String;
3487
+ readonly error: Schema.Struct<{
3488
+ readonly details: Schema.optionalKey<Schema.Struct<{
3489
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3490
+ }>>;
3491
+ } & {
3492
+ readonly code: Schema.Literal<"conflict">;
3493
+ readonly message: Schema.String;
3494
+ readonly retryable: Schema.Boolean;
3495
+ }>;
3496
+ readonly ok: Schema.Literal<false>;
3497
+ }> | Schema.Struct<{
3498
+ readonly correlationId: Schema.String;
3499
+ readonly error: Schema.Struct<{
3500
+ readonly details: Schema.Struct<{
3501
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3502
+ }>;
3503
+ } & {
3504
+ readonly code: Schema.Literal<"forbidden">;
3505
+ readonly message: Schema.String;
3506
+ readonly retryable: Schema.Boolean;
3507
+ }>;
3508
+ readonly ok: Schema.Literal<false>;
3509
+ }> | Schema.Struct<{
3510
+ readonly correlationId: Schema.String;
3511
+ readonly error: Schema.Struct<{
3512
+ readonly code: Schema.Literal<"internal">;
3513
+ readonly message: Schema.String;
3514
+ readonly retryable: Schema.Boolean;
3515
+ }>;
3516
+ readonly ok: Schema.Literal<false>;
3517
+ }> | Schema.Struct<{
3518
+ readonly correlationId: Schema.String;
3519
+ readonly error: Schema.Struct<{
3520
+ readonly details: Schema.optionalKey<Schema.Struct<{
3521
+ readonly filename: Schema.optionalKey<Schema.String>;
3522
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3523
+ }>>;
3524
+ } & {
3525
+ readonly code: Schema.Literal<"invalid_request">;
3526
+ readonly message: Schema.String;
3527
+ readonly retryable: Schema.Boolean;
3528
+ }>;
3529
+ readonly ok: Schema.Literal<false>;
3530
+ }> | Schema.Struct<{
3531
+ readonly correlationId: Schema.String;
3532
+ readonly error: Schema.Struct<{
3533
+ readonly code: Schema.Literal<"not_found">;
3534
+ readonly message: Schema.String;
3535
+ readonly retryable: Schema.Boolean;
3536
+ }>;
3537
+ readonly ok: Schema.Literal<false>;
3538
+ }> | Schema.Struct<{
3539
+ readonly correlationId: Schema.String;
3540
+ readonly error: Schema.Struct<{
3541
+ readonly code: Schema.Literal<"rate_limited">;
3542
+ readonly message: Schema.String;
3543
+ readonly retryable: Schema.Boolean;
3544
+ }>;
3545
+ readonly ok: Schema.Literal<false>;
3546
+ }> | Schema.Struct<{
3547
+ readonly correlationId: Schema.String;
3548
+ readonly error: Schema.Struct<{
3549
+ readonly code: Schema.Literal<"unauthenticated">;
3550
+ readonly message: Schema.String;
3551
+ readonly retryable: Schema.Boolean;
3552
+ }>;
3553
+ readonly ok: Schema.Literal<false>;
3554
+ }> | Schema.Struct<{
3555
+ readonly correlationId: Schema.String;
3556
+ readonly error: Schema.Struct<{
3557
+ readonly code: Schema.Literal<"unavailable">;
3558
+ readonly message: Schema.String;
3559
+ readonly retryable: Schema.Boolean;
3560
+ }>;
3561
+ readonly ok: Schema.Literal<false>;
3562
+ }>>, never, never>, never, never>;
3563
+ readonly listProjects: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listProjects", "GET", "/chat/projects", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
3564
+ readonly data: Schema.$Array<Schema.Struct<{
3565
+ readonly createdAt: Schema.Date;
3566
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3567
+ readonly instructions: Schema.NullOr<Schema.String>;
3568
+ readonly name: Schema.String;
3569
+ readonly updatedAt: Schema.Date;
3570
+ }>>;
3571
+ }>>, Schema.toCodecJson<Schema.Struct<{
3572
+ readonly correlationId: Schema.String;
3573
+ readonly error: Schema.Struct<{
3574
+ readonly details: Schema.optionalKey<Schema.Struct<{
3575
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3576
+ }>>;
3577
+ } & {
3578
+ readonly code: Schema.Literal<"conflict">;
3579
+ readonly message: Schema.String;
3580
+ readonly retryable: Schema.Boolean;
3581
+ }>;
3582
+ readonly ok: Schema.Literal<false>;
3583
+ }> | Schema.Struct<{
3584
+ readonly correlationId: Schema.String;
3585
+ readonly error: Schema.Struct<{
3586
+ readonly details: Schema.Struct<{
3587
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3588
+ }>;
3589
+ } & {
3590
+ readonly code: Schema.Literal<"forbidden">;
3591
+ readonly message: Schema.String;
3592
+ readonly retryable: Schema.Boolean;
3593
+ }>;
3594
+ readonly ok: Schema.Literal<false>;
3595
+ }> | Schema.Struct<{
3596
+ readonly correlationId: Schema.String;
3597
+ readonly error: Schema.Struct<{
3598
+ readonly code: Schema.Literal<"internal">;
3599
+ readonly message: Schema.String;
3600
+ readonly retryable: Schema.Boolean;
3601
+ }>;
3602
+ readonly ok: Schema.Literal<false>;
3603
+ }> | Schema.Struct<{
3604
+ readonly correlationId: Schema.String;
3605
+ readonly error: Schema.Struct<{
3606
+ readonly details: Schema.optionalKey<Schema.Struct<{
3607
+ readonly filename: Schema.optionalKey<Schema.String>;
3608
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3609
+ }>>;
3610
+ } & {
3611
+ readonly code: Schema.Literal<"invalid_request">;
3612
+ readonly message: Schema.String;
3613
+ readonly retryable: Schema.Boolean;
3614
+ }>;
3615
+ readonly ok: Schema.Literal<false>;
3616
+ }> | Schema.Struct<{
3617
+ readonly correlationId: Schema.String;
3618
+ readonly error: Schema.Struct<{
3619
+ readonly code: Schema.Literal<"not_found">;
3620
+ readonly message: Schema.String;
3621
+ readonly retryable: Schema.Boolean;
3622
+ }>;
3623
+ readonly ok: Schema.Literal<false>;
3624
+ }> | Schema.Struct<{
3625
+ readonly correlationId: Schema.String;
3626
+ readonly error: Schema.Struct<{
3627
+ readonly code: Schema.Literal<"rate_limited">;
3628
+ readonly message: Schema.String;
3629
+ readonly retryable: Schema.Boolean;
3630
+ }>;
3631
+ readonly ok: Schema.Literal<false>;
3632
+ }> | Schema.Struct<{
3633
+ readonly correlationId: Schema.String;
3634
+ readonly error: Schema.Struct<{
3635
+ readonly code: Schema.Literal<"unauthenticated">;
3636
+ readonly message: Schema.String;
3637
+ readonly retryable: Schema.Boolean;
3638
+ }>;
3639
+ readonly ok: Schema.Literal<false>;
3640
+ }> | Schema.Struct<{
3641
+ readonly correlationId: Schema.String;
3642
+ readonly error: Schema.Struct<{
3643
+ readonly code: Schema.Literal<"unavailable">;
3644
+ readonly message: Schema.String;
3645
+ readonly retryable: Schema.Boolean;
3646
+ }>;
3647
+ readonly ok: Schema.Literal<false>;
3648
+ }>>, never, never>, never, never>;
3649
+ readonly updateProject: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"updateProject", "PATCH", "/chat/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
3650
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3651
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3652
+ readonly instructions: Schema.optionalKey<Schema.NullOr<Schema.String>>;
3653
+ readonly name: Schema.optionalKey<Schema.Trim>;
3654
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3655
+ readonly createdAt: Schema.Date;
3656
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3657
+ readonly instructions: Schema.NullOr<Schema.String>;
3658
+ readonly name: Schema.String;
3659
+ readonly updatedAt: Schema.Date;
3660
+ }>>, Schema.toCodecJson<Schema.Struct<{
3661
+ readonly correlationId: Schema.String;
3662
+ readonly error: Schema.Struct<{
3663
+ readonly details: Schema.optionalKey<Schema.Struct<{
3664
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3665
+ }>>;
3666
+ } & {
3667
+ readonly code: Schema.Literal<"conflict">;
3668
+ readonly message: Schema.String;
3669
+ readonly retryable: Schema.Boolean;
3670
+ }>;
3671
+ readonly ok: Schema.Literal<false>;
3672
+ }> | Schema.Struct<{
3673
+ readonly correlationId: Schema.String;
3674
+ readonly error: Schema.Struct<{
3675
+ readonly details: Schema.Struct<{
3676
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3677
+ }>;
3678
+ } & {
3679
+ readonly code: Schema.Literal<"forbidden">;
3680
+ readonly message: Schema.String;
3681
+ readonly retryable: Schema.Boolean;
3682
+ }>;
3683
+ readonly ok: Schema.Literal<false>;
3684
+ }> | Schema.Struct<{
3685
+ readonly correlationId: Schema.String;
3686
+ readonly error: Schema.Struct<{
3687
+ readonly code: Schema.Literal<"internal">;
3688
+ readonly message: Schema.String;
3689
+ readonly retryable: Schema.Boolean;
3690
+ }>;
3691
+ readonly ok: Schema.Literal<false>;
3692
+ }> | Schema.Struct<{
3693
+ readonly correlationId: Schema.String;
3694
+ readonly error: Schema.Struct<{
3695
+ readonly details: Schema.optionalKey<Schema.Struct<{
3696
+ readonly filename: Schema.optionalKey<Schema.String>;
3697
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3698
+ }>>;
3699
+ } & {
3700
+ readonly code: Schema.Literal<"invalid_request">;
3701
+ readonly message: Schema.String;
3702
+ readonly retryable: Schema.Boolean;
3703
+ }>;
3704
+ readonly ok: Schema.Literal<false>;
3705
+ }> | Schema.Struct<{
3706
+ readonly correlationId: Schema.String;
3707
+ readonly error: Schema.Struct<{
3708
+ readonly code: Schema.Literal<"not_found">;
3709
+ readonly message: Schema.String;
3710
+ readonly retryable: Schema.Boolean;
3711
+ }>;
3712
+ readonly ok: Schema.Literal<false>;
3713
+ }> | Schema.Struct<{
3714
+ readonly correlationId: Schema.String;
3715
+ readonly error: Schema.Struct<{
3716
+ readonly code: Schema.Literal<"rate_limited">;
3717
+ readonly message: Schema.String;
3718
+ readonly retryable: Schema.Boolean;
3719
+ }>;
3720
+ readonly ok: Schema.Literal<false>;
3721
+ }> | Schema.Struct<{
3722
+ readonly correlationId: Schema.String;
3723
+ readonly error: Schema.Struct<{
3724
+ readonly code: Schema.Literal<"unauthenticated">;
3725
+ readonly message: Schema.String;
3726
+ readonly retryable: Schema.Boolean;
3727
+ }>;
3728
+ readonly ok: Schema.Literal<false>;
3729
+ }> | Schema.Struct<{
3730
+ readonly correlationId: Schema.String;
3731
+ readonly error: Schema.Struct<{
3732
+ readonly code: Schema.Literal<"unavailable">;
3733
+ readonly message: Schema.String;
3734
+ readonly retryable: Schema.Boolean;
3735
+ }>;
3736
+ readonly ok: Schema.Literal<false>;
3737
+ }>>, never, never>, never, never>;
3738
+ readonly uploadProjectFile: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"uploadProjectFile", "POST", "/chat/projects/:projectId/files", Schema.toCodecStringTree<Schema.Struct<{
3739
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
3740
+ }>>, never, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").asMultipart<Schema.Struct<{
3741
+ readonly file: Schema.decodeTo<import("effect/http/Multipart").PersistedFileSchema, Schema.$Array<import("effect/http/Multipart").PersistedFileSchema>, never, never>;
3742
+ }>>>, never, Schema.toCodecJson<Schema.Struct<{
3743
+ readonly contentType: Schema.NullOr<Schema.String>;
3744
+ readonly createdAt: Schema.Date;
3745
+ readonly extractionState: Schema.Literals<readonly ["available", "truncated", "failed"]>;
3746
+ readonly filename: Schema.String;
3747
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
3748
+ readonly inContext: Schema.Boolean;
3749
+ readonly sizeBytes: Schema.Int;
3750
+ }>>, Schema.toCodecJson<Schema.Struct<{
3751
+ readonly correlationId: Schema.String;
3752
+ readonly error: Schema.Struct<{
3753
+ readonly details: Schema.optionalKey<Schema.Struct<{
3754
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3755
+ }>>;
3756
+ } & {
3757
+ readonly code: Schema.Literal<"conflict">;
3758
+ readonly message: Schema.String;
3759
+ readonly retryable: Schema.Boolean;
3760
+ }>;
3761
+ readonly ok: Schema.Literal<false>;
3762
+ }> | Schema.Struct<{
3763
+ readonly correlationId: Schema.String;
3764
+ readonly error: Schema.Struct<{
3765
+ readonly details: Schema.Struct<{
3766
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3767
+ }>;
3768
+ } & {
3769
+ readonly code: Schema.Literal<"forbidden">;
3770
+ readonly message: Schema.String;
3771
+ readonly retryable: Schema.Boolean;
3772
+ }>;
3773
+ readonly ok: Schema.Literal<false>;
3774
+ }> | Schema.Struct<{
3775
+ readonly correlationId: Schema.String;
3776
+ readonly error: Schema.Struct<{
3777
+ readonly code: Schema.Literal<"internal">;
3778
+ readonly message: Schema.String;
3779
+ readonly retryable: Schema.Boolean;
3780
+ }>;
3781
+ readonly ok: Schema.Literal<false>;
3782
+ }> | Schema.Struct<{
3783
+ readonly correlationId: Schema.String;
3784
+ readonly error: Schema.Struct<{
3785
+ readonly details: Schema.optionalKey<Schema.Struct<{
3786
+ readonly filename: Schema.optionalKey<Schema.String>;
3787
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3788
+ }>>;
3789
+ } & {
3790
+ readonly code: Schema.Literal<"invalid_request">;
3791
+ readonly message: Schema.String;
3792
+ readonly retryable: Schema.Boolean;
3793
+ }>;
3794
+ readonly ok: Schema.Literal<false>;
3795
+ }> | Schema.Struct<{
3796
+ readonly correlationId: Schema.String;
3797
+ readonly error: Schema.Struct<{
3798
+ readonly code: Schema.Literal<"not_found">;
3799
+ readonly message: Schema.String;
3800
+ readonly retryable: Schema.Boolean;
3801
+ }>;
3802
+ readonly ok: Schema.Literal<false>;
3803
+ }> | Schema.Struct<{
3804
+ readonly correlationId: Schema.String;
3805
+ readonly error: Schema.Struct<{
3806
+ readonly code: Schema.Literal<"rate_limited">;
3807
+ readonly message: Schema.String;
3808
+ readonly retryable: Schema.Boolean;
3809
+ }>;
3810
+ readonly ok: Schema.Literal<false>;
3811
+ }> | Schema.Struct<{
3812
+ readonly correlationId: Schema.String;
3813
+ readonly error: Schema.Struct<{
3814
+ readonly code: Schema.Literal<"unauthenticated">;
3815
+ readonly message: Schema.String;
3816
+ readonly retryable: Schema.Boolean;
3817
+ }>;
3818
+ readonly ok: Schema.Literal<false>;
3819
+ }> | Schema.Struct<{
3820
+ readonly correlationId: Schema.String;
3821
+ readonly error: Schema.Struct<{
3822
+ readonly code: Schema.Literal<"unavailable">;
3823
+ readonly message: Schema.String;
3824
+ readonly retryable: Schema.Boolean;
3825
+ }>;
3826
+ readonly ok: Schema.Literal<false>;
3827
+ }>>, never, never>, never, never>;
3828
+ };
3829
+ readonly chatSpeech: {
3830
+ readonly createSpeechClip: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"createSpeechClip", "POST", "/chat/speech/clips", never, never, Schema.toCodecJson<Schema.Struct<{
3831
+ readonly contentType: Schema.String;
3832
+ readonly size: Schema.Int;
3833
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3834
+ readonly clipId: Schema.brand<Schema.String, "@collective-intelligence/ai/SpeechClipId">;
3835
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
3836
+ readonly method: Schema.Literal<"PUT">;
3837
+ readonly url: Schema.String;
3838
+ }>>, Schema.toCodecJson<Schema.Struct<{
3839
+ readonly correlationId: Schema.String;
3840
+ readonly error: Schema.Struct<{
3841
+ readonly details: Schema.optionalKey<Schema.Struct<{
3842
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3843
+ }>>;
3844
+ } & {
3845
+ readonly code: Schema.Literal<"conflict">;
3846
+ readonly message: Schema.String;
3847
+ readonly retryable: Schema.Boolean;
3848
+ }>;
3849
+ readonly ok: Schema.Literal<false>;
3850
+ }> | Schema.Struct<{
3851
+ readonly correlationId: Schema.String;
3852
+ readonly error: Schema.Struct<{
3853
+ readonly details: Schema.Struct<{
3854
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3855
+ }>;
3856
+ } & {
3857
+ readonly code: Schema.Literal<"forbidden">;
3858
+ readonly message: Schema.String;
3859
+ readonly retryable: Schema.Boolean;
3860
+ }>;
3861
+ readonly ok: Schema.Literal<false>;
3862
+ }> | Schema.Struct<{
3863
+ readonly correlationId: Schema.String;
3864
+ readonly error: Schema.Struct<{
3865
+ readonly code: Schema.Literal<"internal">;
3866
+ readonly message: Schema.String;
3867
+ readonly retryable: Schema.Boolean;
3868
+ }>;
3869
+ readonly ok: Schema.Literal<false>;
3870
+ }> | Schema.Struct<{
3871
+ readonly correlationId: Schema.String;
3872
+ readonly error: Schema.Struct<{
3873
+ readonly details: Schema.optionalKey<Schema.Struct<{
3874
+ readonly filename: Schema.optionalKey<Schema.String>;
3875
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3876
+ }>>;
3877
+ } & {
3878
+ readonly code: Schema.Literal<"invalid_request">;
3879
+ readonly message: Schema.String;
3880
+ readonly retryable: Schema.Boolean;
3881
+ }>;
3882
+ readonly ok: Schema.Literal<false>;
3883
+ }> | Schema.Struct<{
3884
+ readonly correlationId: Schema.String;
3885
+ readonly error: Schema.Struct<{
3886
+ readonly code: Schema.Literal<"not_found">;
3887
+ readonly message: Schema.String;
3888
+ readonly retryable: Schema.Boolean;
3889
+ }>;
3890
+ readonly ok: Schema.Literal<false>;
3891
+ }> | Schema.Struct<{
3892
+ readonly correlationId: Schema.String;
3893
+ readonly error: Schema.Struct<{
3894
+ readonly code: Schema.Literal<"rate_limited">;
3895
+ readonly message: Schema.String;
3896
+ readonly retryable: Schema.Boolean;
3897
+ }>;
3898
+ readonly ok: Schema.Literal<false>;
3899
+ }> | Schema.Struct<{
3900
+ readonly correlationId: Schema.String;
3901
+ readonly error: Schema.Struct<{
3902
+ readonly code: Schema.Literal<"unauthenticated">;
3903
+ readonly message: Schema.String;
3904
+ readonly retryable: Schema.Boolean;
3905
+ }>;
3906
+ readonly ok: Schema.Literal<false>;
3907
+ }> | Schema.Struct<{
3908
+ readonly correlationId: Schema.String;
3909
+ readonly error: Schema.Struct<{
3910
+ readonly code: Schema.Literal<"unavailable">;
3911
+ readonly message: Schema.String;
3912
+ readonly retryable: Schema.Boolean;
3913
+ }>;
3914
+ readonly ok: Schema.Literal<false>;
3915
+ }>>, never, never>, never, never>;
3916
+ readonly getReadAloudPart: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getReadAloudPart", "GET", "/chat/speech/read-aloud/:invocationId/parts/:partIndex", Schema.toCodecStringTree<Schema.Struct<{
3917
+ readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
3918
+ readonly partIndex: Schema.NumberFromString;
3919
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
3920
+ readonly partCount: Schema.Int;
3921
+ readonly url: Schema.String;
3922
+ }>>, Schema.toCodecJson<Schema.Struct<{
3923
+ readonly correlationId: Schema.String;
3924
+ readonly error: Schema.Struct<{
3925
+ readonly details: Schema.optionalKey<Schema.Struct<{
3926
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
3927
+ }>>;
3928
+ } & {
3929
+ readonly code: Schema.Literal<"conflict">;
3930
+ readonly message: Schema.String;
3931
+ readonly retryable: Schema.Boolean;
3932
+ }>;
3933
+ readonly ok: Schema.Literal<false>;
3934
+ }> | Schema.Struct<{
3935
+ readonly correlationId: Schema.String;
3936
+ readonly error: Schema.Struct<{
3937
+ readonly details: Schema.Struct<{
3938
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
3939
+ }>;
3940
+ } & {
3941
+ readonly code: Schema.Literal<"forbidden">;
3942
+ readonly message: Schema.String;
3943
+ readonly retryable: Schema.Boolean;
3944
+ }>;
3945
+ readonly ok: Schema.Literal<false>;
3946
+ }> | Schema.Struct<{
3947
+ readonly correlationId: Schema.String;
3948
+ readonly error: Schema.Struct<{
3949
+ readonly code: Schema.Literal<"internal">;
3950
+ readonly message: Schema.String;
3951
+ readonly retryable: Schema.Boolean;
3952
+ }>;
3953
+ readonly ok: Schema.Literal<false>;
3954
+ }> | Schema.Struct<{
3955
+ readonly correlationId: Schema.String;
3956
+ readonly error: Schema.Struct<{
3957
+ readonly details: Schema.optionalKey<Schema.Struct<{
3958
+ readonly filename: Schema.optionalKey<Schema.String>;
3959
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
3960
+ }>>;
3961
+ } & {
3962
+ readonly code: Schema.Literal<"invalid_request">;
3963
+ readonly message: Schema.String;
3964
+ readonly retryable: Schema.Boolean;
3965
+ }>;
3966
+ readonly ok: Schema.Literal<false>;
3967
+ }> | Schema.Struct<{
3968
+ readonly correlationId: Schema.String;
3969
+ readonly error: Schema.Struct<{
3970
+ readonly code: Schema.Literal<"not_found">;
3971
+ readonly message: Schema.String;
3972
+ readonly retryable: Schema.Boolean;
3973
+ }>;
3974
+ readonly ok: Schema.Literal<false>;
3975
+ }> | Schema.Struct<{
3976
+ readonly correlationId: Schema.String;
3977
+ readonly error: Schema.Struct<{
3978
+ readonly code: Schema.Literal<"rate_limited">;
3979
+ readonly message: Schema.String;
3980
+ readonly retryable: Schema.Boolean;
3981
+ }>;
3982
+ readonly ok: Schema.Literal<false>;
3983
+ }> | Schema.Struct<{
3984
+ readonly correlationId: Schema.String;
3985
+ readonly error: Schema.Struct<{
3986
+ readonly code: Schema.Literal<"unauthenticated">;
3987
+ readonly message: Schema.String;
3988
+ readonly retryable: Schema.Boolean;
3989
+ }>;
3990
+ readonly ok: Schema.Literal<false>;
3991
+ }> | Schema.Struct<{
3992
+ readonly correlationId: Schema.String;
3993
+ readonly error: Schema.Struct<{
3994
+ readonly code: Schema.Literal<"unavailable">;
3995
+ readonly message: Schema.String;
3996
+ readonly retryable: Schema.Boolean;
3997
+ }>;
3998
+ readonly ok: Schema.Literal<false>;
3999
+ }>>, never, never>, never, never>;
4000
+ readonly getSpeechAvailability: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSpeechAvailability", "GET", "/chat/speech/availability", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
4001
+ readonly readAloud: Schema.Boolean;
4002
+ readonly remoteTranscription: Schema.Boolean;
4003
+ }>>, Schema.toCodecJson<Schema.Struct<{
4004
+ readonly correlationId: Schema.String;
4005
+ readonly error: Schema.Struct<{
4006
+ readonly details: Schema.optionalKey<Schema.Struct<{
4007
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
4008
+ }>>;
4009
+ } & {
4010
+ readonly code: Schema.Literal<"conflict">;
4011
+ readonly message: Schema.String;
4012
+ readonly retryable: Schema.Boolean;
4013
+ }>;
4014
+ readonly ok: Schema.Literal<false>;
4015
+ }> | Schema.Struct<{
4016
+ readonly correlationId: Schema.String;
4017
+ readonly error: Schema.Struct<{
4018
+ readonly details: Schema.Struct<{
4019
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
4020
+ }>;
4021
+ } & {
4022
+ readonly code: Schema.Literal<"forbidden">;
4023
+ readonly message: Schema.String;
4024
+ readonly retryable: Schema.Boolean;
4025
+ }>;
4026
+ readonly ok: Schema.Literal<false>;
4027
+ }> | Schema.Struct<{
4028
+ readonly correlationId: Schema.String;
4029
+ readonly error: Schema.Struct<{
4030
+ readonly code: Schema.Literal<"internal">;
4031
+ readonly message: Schema.String;
4032
+ readonly retryable: Schema.Boolean;
4033
+ }>;
4034
+ readonly ok: Schema.Literal<false>;
4035
+ }> | Schema.Struct<{
4036
+ readonly correlationId: Schema.String;
4037
+ readonly error: Schema.Struct<{
4038
+ readonly details: Schema.optionalKey<Schema.Struct<{
4039
+ readonly filename: Schema.optionalKey<Schema.String>;
4040
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
4041
+ }>>;
4042
+ } & {
4043
+ readonly code: Schema.Literal<"invalid_request">;
4044
+ readonly message: Schema.String;
4045
+ readonly retryable: Schema.Boolean;
4046
+ }>;
4047
+ readonly ok: Schema.Literal<false>;
4048
+ }> | Schema.Struct<{
4049
+ readonly correlationId: Schema.String;
4050
+ readonly error: Schema.Struct<{
4051
+ readonly code: Schema.Literal<"not_found">;
4052
+ readonly message: Schema.String;
4053
+ readonly retryable: Schema.Boolean;
4054
+ }>;
4055
+ readonly ok: Schema.Literal<false>;
4056
+ }> | Schema.Struct<{
4057
+ readonly correlationId: Schema.String;
4058
+ readonly error: Schema.Struct<{
4059
+ readonly code: Schema.Literal<"rate_limited">;
4060
+ readonly message: Schema.String;
4061
+ readonly retryable: Schema.Boolean;
4062
+ }>;
4063
+ readonly ok: Schema.Literal<false>;
4064
+ }> | Schema.Struct<{
4065
+ readonly correlationId: Schema.String;
4066
+ readonly error: Schema.Struct<{
4067
+ readonly code: Schema.Literal<"unauthenticated">;
4068
+ readonly message: Schema.String;
4069
+ readonly retryable: Schema.Boolean;
4070
+ }>;
4071
+ readonly ok: Schema.Literal<false>;
4072
+ }> | Schema.Struct<{
4073
+ readonly correlationId: Schema.String;
4074
+ readonly error: Schema.Struct<{
4075
+ readonly code: Schema.Literal<"unavailable">;
4076
+ readonly message: Schema.String;
4077
+ readonly retryable: Schema.Boolean;
4078
+ }>;
4079
+ readonly ok: Schema.Literal<false>;
4080
+ }>>, never, never>, never, never>;
4081
+ readonly transcribeSpeechClip: import("effect/http-api/HttpApiClient").Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"transcribeSpeechClip", "POST", "/chat/speech/transcriptions", never, never, Schema.toCodecJson<Schema.Struct<{
4082
+ readonly clipId: Schema.brand<Schema.String, "@collective-intelligence/ai/SpeechClipId">;
4083
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
4084
+ readonly text: Schema.String;
4085
+ }>>, Schema.toCodecJson<Schema.Struct<{
4086
+ readonly correlationId: Schema.String;
4087
+ readonly error: Schema.Struct<{
4088
+ readonly details: Schema.optionalKey<Schema.Struct<{
4089
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
4090
+ }>>;
4091
+ } & {
4092
+ readonly code: Schema.Literal<"conflict">;
4093
+ readonly message: Schema.String;
4094
+ readonly retryable: Schema.Boolean;
4095
+ }>;
4096
+ readonly ok: Schema.Literal<false>;
4097
+ }> | Schema.Struct<{
4098
+ readonly correlationId: Schema.String;
4099
+ readonly error: Schema.Struct<{
4100
+ readonly details: Schema.Struct<{
4101
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
4102
+ }>;
4103
+ } & {
4104
+ readonly code: Schema.Literal<"forbidden">;
4105
+ readonly message: Schema.String;
4106
+ readonly retryable: Schema.Boolean;
4107
+ }>;
4108
+ readonly ok: Schema.Literal<false>;
4109
+ }> | Schema.Struct<{
4110
+ readonly correlationId: Schema.String;
4111
+ readonly error: Schema.Struct<{
4112
+ readonly code: Schema.Literal<"internal">;
4113
+ readonly message: Schema.String;
4114
+ readonly retryable: Schema.Boolean;
4115
+ }>;
4116
+ readonly ok: Schema.Literal<false>;
4117
+ }> | Schema.Struct<{
4118
+ readonly correlationId: Schema.String;
4119
+ readonly error: Schema.Struct<{
4120
+ readonly details: Schema.optionalKey<Schema.Struct<{
4121
+ readonly filename: Schema.optionalKey<Schema.String>;
4122
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
4123
+ }>>;
4124
+ } & {
4125
+ readonly code: Schema.Literal<"invalid_request">;
4126
+ readonly message: Schema.String;
4127
+ readonly retryable: Schema.Boolean;
4128
+ }>;
4129
+ readonly ok: Schema.Literal<false>;
4130
+ }> | Schema.Struct<{
4131
+ readonly correlationId: Schema.String;
4132
+ readonly error: Schema.Struct<{
4133
+ readonly code: Schema.Literal<"not_found">;
4134
+ readonly message: Schema.String;
4135
+ readonly retryable: Schema.Boolean;
4136
+ }>;
4137
+ readonly ok: Schema.Literal<false>;
4138
+ }> | Schema.Struct<{
4139
+ readonly correlationId: Schema.String;
4140
+ readonly error: Schema.Struct<{
4141
+ readonly code: Schema.Literal<"rate_limited">;
4142
+ readonly message: Schema.String;
4143
+ readonly retryable: Schema.Boolean;
4144
+ }>;
4145
+ readonly ok: Schema.Literal<false>;
4146
+ }> | Schema.Struct<{
4147
+ readonly correlationId: Schema.String;
4148
+ readonly error: Schema.Struct<{
4149
+ readonly code: Schema.Literal<"unauthenticated">;
4150
+ readonly message: Schema.String;
4151
+ readonly retryable: Schema.Boolean;
4152
+ }>;
4153
+ readonly ok: Schema.Literal<false>;
4154
+ }> | Schema.Struct<{
4155
+ readonly correlationId: Schema.String;
4156
+ readonly error: Schema.Struct<{
4157
+ readonly code: Schema.Literal<"unavailable">;
4158
+ readonly message: Schema.String;
4159
+ readonly retryable: Schema.Boolean;
4160
+ }>;
4161
+ readonly ok: Schema.Literal<false>;
4162
+ }>>, never, never>, never, never>;
4163
+ };
4164
+ }>;
4165
+ /**
4166
+ * The one typed client of `ChatSurfaceApi` (AC-290): the headless layer
4167
+ * calls every chat operation besides the chat stream through it.
4168
+ */
4169
+ export declare class ChatSurface extends ChatSurface_base {
4170
+ }
4171
+ /** The mount that the typed client calls, as for `createChatTransport`. */
4172
+ export type ChatSurfaceOptions = ChatSurfaceClientOptions & Readonly<{
4173
+ /** The fetch of every request, for example one that adds the session or the app's credentials. */
4174
+ fetch?: ChatFetch;
4175
+ }>;
4176
+ /** The runtime that runs the actors of a Chat Session. */
4177
+ export type ChatSessionRuntime = EffectRunner<ChatSurface>;
4178
+ /** The layer of the typed client on one mount. */
4179
+ export declare const chatSurfaceLayer: ({ fetch, ...client }: ChatSurfaceOptions) => Layer.Layer<ChatSurface>;
4180
+ /**
4181
+ * The runtime of one Chat Session over the typed client of `options`. It
4182
+ * holds the client and nothing to release, so the session never disposes
4183
+ * it.
4184
+ */
4185
+ export declare const makeChatSessionRuntime: (options: ChatSurfaceOptions) => ChatSessionRuntime;
4186
+ /**
4187
+ * The `AiFailureError` of a failed chat operation: the envelope of a refusal
4188
+ * (with its `reason`), a request that reached no server (`unavailable`), or
4189
+ * an answer the client could not read (`internal`).
4190
+ */
4191
+ export declare const toSessionFailure: (cause: unknown) => AiFailureError;
4192
+ /**
4193
+ * Runs one chat operation on the typed client; every failure is an
4194
+ * `AiFailureError`, a defect too (`internal`), so a caller always gets an
4195
+ * outcome to show.
4196
+ */
4197
+ export declare const callChatSurface: <A, E>(operation: (client: ChatSurfaceClient) => Effect.Effect<A, E>) => Effect.Effect<A, AiFailureError, ChatSurface>;
4198
+ /**
4199
+ * A read that the chat retries while its failure is retryable, at most three
4200
+ * times, as the chat retries its first reads before it shows "service not
4201
+ * available" (D16).
4202
+ */
4203
+ export declare const retryRead: <A, R>(read: Effect.Effect<A, AiFailureError, R>) => Effect.Effect<A, AiFailureError, R>;
4204
+ /**
4205
+ * A watch that the chat asks again while its failure is retryable, such as
4206
+ * a request that a network change dropped (T58-D F2): from 100 ms, at most
4207
+ * 5 s apart, until it answers or the chat stops it.
4208
+ */
4209
+ export declare const retryWatch: <A, R>(watch: Effect.Effect<A, AiFailureError, R>) => Effect.Effect<A, AiFailureError, R>;
4210
+ export {};