@collective-intelligence/ai 0.0.0-stage → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/AGENTS.md +52 -0
  2. package/README.md +462 -2
  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 +123 -4
@@ -0,0 +1,718 @@
1
+ import { Multipart } from "effect/http";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
+ import * as Schema from "effect/Schema";
4
+ /** A Project as its owner reads it. */
5
+ declare const ProjectSchema: Schema.Struct<{
6
+ readonly createdAt: Schema.Date;
7
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
8
+ /** The Project Instructions; null when the Project has none. */
9
+ readonly instructions: Schema.NullOr<Schema.String>;
10
+ readonly name: Schema.String;
11
+ readonly updatedAt: Schema.Date;
12
+ }>;
13
+ export type Project = typeof ProjectSchema.Type;
14
+ /** A Project File. The extracted text stays on the server; the bytes come from the download URL. */
15
+ declare const ProjectFileSchema: Schema.Struct<{
16
+ readonly contentType: Schema.NullOr<Schema.String>;
17
+ readonly createdAt: Schema.Date;
18
+ /** `failed`: the file gave no text, so no turn gets it. */
19
+ readonly extractionState: Schema.Literals<readonly ["available", "truncated", "failed"]>;
20
+ readonly filename: Schema.String;
21
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
22
+ /** Whether a turn that starts now gets the text of the file. */
23
+ readonly inContext: Schema.Boolean;
24
+ readonly sizeBytes: Schema.Int;
25
+ }>;
26
+ export type ProjectFile = typeof ProjectFileSchema.Type;
27
+ declare const ChatProjectsApi_base: HttpApiGroup.HttpApiGroup<"chatProjects", HttpApiEndpoint.HttpApiEndpoint<"createProject", "POST", "/chat/projects", never, never, Schema.toCodecJson<Schema.Struct<{
28
+ readonly name: Schema.Trim;
29
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
30
+ readonly createdAt: Schema.Date;
31
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
32
+ /** The Project Instructions; null when the Project has none. */
33
+ readonly instructions: Schema.NullOr<Schema.String>;
34
+ readonly name: Schema.String;
35
+ readonly updatedAt: Schema.Date;
36
+ }>>, Schema.toCodecJson<Schema.Struct<{
37
+ readonly correlationId: Schema.String;
38
+ readonly error: Schema.Struct<{
39
+ readonly details: Schema.optionalKey<Schema.Struct<{
40
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
41
+ }>>;
42
+ } & {
43
+ readonly code: Schema.Literal<"conflict">;
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.Struct<{
52
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
53
+ }>;
54
+ } & {
55
+ readonly code: Schema.Literal<"forbidden">;
56
+ readonly message: Schema.String;
57
+ readonly retryable: Schema.Boolean;
58
+ }>;
59
+ readonly ok: Schema.Literal<false>;
60
+ }> | Schema.Struct<{
61
+ readonly correlationId: Schema.String;
62
+ readonly error: Schema.Struct<{
63
+ readonly code: Schema.Literal<"internal">;
64
+ readonly message: Schema.String;
65
+ readonly retryable: Schema.Boolean;
66
+ }>;
67
+ readonly ok: Schema.Literal<false>;
68
+ }> | Schema.Struct<{
69
+ readonly correlationId: Schema.String;
70
+ readonly error: Schema.Struct<{
71
+ readonly details: Schema.optionalKey<Schema.Struct<{
72
+ readonly filename: Schema.optionalKey<Schema.String>;
73
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
74
+ }>>;
75
+ } & {
76
+ readonly code: Schema.Literal<"invalid_request">;
77
+ readonly message: Schema.String;
78
+ readonly retryable: Schema.Boolean;
79
+ }>;
80
+ readonly ok: Schema.Literal<false>;
81
+ }> | Schema.Struct<{
82
+ readonly correlationId: Schema.String;
83
+ readonly error: Schema.Struct<{
84
+ readonly code: Schema.Literal<"not_found">;
85
+ readonly message: Schema.String;
86
+ readonly retryable: Schema.Boolean;
87
+ }>;
88
+ readonly ok: Schema.Literal<false>;
89
+ }> | Schema.Struct<{
90
+ readonly correlationId: Schema.String;
91
+ readonly error: Schema.Struct<{
92
+ readonly code: Schema.Literal<"rate_limited">;
93
+ readonly message: Schema.String;
94
+ readonly retryable: Schema.Boolean;
95
+ }>;
96
+ readonly ok: Schema.Literal<false>;
97
+ }> | Schema.Struct<{
98
+ readonly correlationId: Schema.String;
99
+ readonly error: Schema.Struct<{
100
+ readonly code: Schema.Literal<"unauthenticated">;
101
+ readonly message: Schema.String;
102
+ readonly retryable: Schema.Boolean;
103
+ }>;
104
+ readonly ok: Schema.Literal<false>;
105
+ }> | Schema.Struct<{
106
+ readonly correlationId: Schema.String;
107
+ readonly error: Schema.Struct<{
108
+ readonly code: Schema.Literal<"unavailable">;
109
+ readonly message: Schema.String;
110
+ readonly retryable: Schema.Boolean;
111
+ }>;
112
+ readonly ok: Schema.Literal<false>;
113
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteProject", "DELETE", "/chat/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
114
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
115
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<Schema.Struct<{
116
+ readonly correlationId: Schema.String;
117
+ readonly error: Schema.Struct<{
118
+ readonly details: Schema.optionalKey<Schema.Struct<{
119
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
120
+ }>>;
121
+ } & {
122
+ readonly code: Schema.Literal<"conflict">;
123
+ readonly message: Schema.String;
124
+ readonly retryable: Schema.Boolean;
125
+ }>;
126
+ readonly ok: Schema.Literal<false>;
127
+ }> | Schema.Struct<{
128
+ readonly correlationId: Schema.String;
129
+ readonly error: Schema.Struct<{
130
+ readonly details: Schema.Struct<{
131
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
132
+ }>;
133
+ } & {
134
+ readonly code: Schema.Literal<"forbidden">;
135
+ readonly message: Schema.String;
136
+ readonly retryable: Schema.Boolean;
137
+ }>;
138
+ readonly ok: Schema.Literal<false>;
139
+ }> | Schema.Struct<{
140
+ readonly correlationId: Schema.String;
141
+ readonly error: Schema.Struct<{
142
+ readonly code: Schema.Literal<"internal">;
143
+ readonly message: Schema.String;
144
+ readonly retryable: Schema.Boolean;
145
+ }>;
146
+ readonly ok: Schema.Literal<false>;
147
+ }> | Schema.Struct<{
148
+ readonly correlationId: Schema.String;
149
+ readonly error: Schema.Struct<{
150
+ readonly details: Schema.optionalKey<Schema.Struct<{
151
+ readonly filename: Schema.optionalKey<Schema.String>;
152
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
153
+ }>>;
154
+ } & {
155
+ readonly code: Schema.Literal<"invalid_request">;
156
+ readonly message: Schema.String;
157
+ readonly retryable: Schema.Boolean;
158
+ }>;
159
+ readonly ok: Schema.Literal<false>;
160
+ }> | Schema.Struct<{
161
+ readonly correlationId: Schema.String;
162
+ readonly error: Schema.Struct<{
163
+ readonly code: Schema.Literal<"not_found">;
164
+ readonly message: Schema.String;
165
+ readonly retryable: Schema.Boolean;
166
+ }>;
167
+ readonly ok: Schema.Literal<false>;
168
+ }> | Schema.Struct<{
169
+ readonly correlationId: Schema.String;
170
+ readonly error: Schema.Struct<{
171
+ readonly code: Schema.Literal<"rate_limited">;
172
+ readonly message: Schema.String;
173
+ readonly retryable: Schema.Boolean;
174
+ }>;
175
+ readonly ok: Schema.Literal<false>;
176
+ }> | Schema.Struct<{
177
+ readonly correlationId: Schema.String;
178
+ readonly error: Schema.Struct<{
179
+ readonly code: Schema.Literal<"unauthenticated">;
180
+ readonly message: Schema.String;
181
+ readonly retryable: Schema.Boolean;
182
+ }>;
183
+ readonly ok: Schema.Literal<false>;
184
+ }> | Schema.Struct<{
185
+ readonly correlationId: Schema.String;
186
+ readonly error: Schema.Struct<{
187
+ readonly code: Schema.Literal<"unavailable">;
188
+ readonly message: Schema.String;
189
+ readonly retryable: Schema.Boolean;
190
+ }>;
191
+ readonly ok: Schema.Literal<false>;
192
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteProjectFile", "DELETE", "/chat/projects/:projectId/files/:fileId", Schema.toCodecStringTree<Schema.Struct<{
193
+ readonly fileId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
194
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
195
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<Schema.Struct<{
196
+ readonly correlationId: Schema.String;
197
+ readonly error: Schema.Struct<{
198
+ readonly details: Schema.optionalKey<Schema.Struct<{
199
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
200
+ }>>;
201
+ } & {
202
+ readonly code: Schema.Literal<"conflict">;
203
+ readonly message: Schema.String;
204
+ readonly retryable: Schema.Boolean;
205
+ }>;
206
+ readonly ok: Schema.Literal<false>;
207
+ }> | Schema.Struct<{
208
+ readonly correlationId: Schema.String;
209
+ readonly error: Schema.Struct<{
210
+ readonly details: Schema.Struct<{
211
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
212
+ }>;
213
+ } & {
214
+ readonly code: Schema.Literal<"forbidden">;
215
+ readonly message: Schema.String;
216
+ readonly retryable: Schema.Boolean;
217
+ }>;
218
+ readonly ok: Schema.Literal<false>;
219
+ }> | Schema.Struct<{
220
+ readonly correlationId: Schema.String;
221
+ readonly error: Schema.Struct<{
222
+ readonly code: Schema.Literal<"internal">;
223
+ readonly message: Schema.String;
224
+ readonly retryable: Schema.Boolean;
225
+ }>;
226
+ readonly ok: Schema.Literal<false>;
227
+ }> | Schema.Struct<{
228
+ readonly correlationId: Schema.String;
229
+ readonly error: Schema.Struct<{
230
+ readonly details: Schema.optionalKey<Schema.Struct<{
231
+ readonly filename: Schema.optionalKey<Schema.String>;
232
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
233
+ }>>;
234
+ } & {
235
+ readonly code: Schema.Literal<"invalid_request">;
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 code: Schema.Literal<"not_found">;
244
+ readonly message: Schema.String;
245
+ readonly retryable: Schema.Boolean;
246
+ }>;
247
+ readonly ok: Schema.Literal<false>;
248
+ }> | Schema.Struct<{
249
+ readonly correlationId: Schema.String;
250
+ readonly error: Schema.Struct<{
251
+ readonly code: Schema.Literal<"rate_limited">;
252
+ readonly message: Schema.String;
253
+ readonly retryable: Schema.Boolean;
254
+ }>;
255
+ readonly ok: Schema.Literal<false>;
256
+ }> | Schema.Struct<{
257
+ readonly correlationId: Schema.String;
258
+ readonly error: Schema.Struct<{
259
+ readonly code: Schema.Literal<"unauthenticated">;
260
+ readonly message: Schema.String;
261
+ readonly retryable: Schema.Boolean;
262
+ }>;
263
+ readonly ok: Schema.Literal<false>;
264
+ }> | Schema.Struct<{
265
+ readonly correlationId: Schema.String;
266
+ readonly error: Schema.Struct<{
267
+ readonly code: Schema.Literal<"unavailable">;
268
+ readonly message: Schema.String;
269
+ readonly retryable: Schema.Boolean;
270
+ }>;
271
+ readonly ok: Schema.Literal<false>;
272
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getProjectFileDownloadUrl", "GET", "/chat/projects/:projectId/files/:fileId/download-url", Schema.toCodecStringTree<Schema.Struct<{
273
+ readonly fileId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
274
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
275
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
276
+ readonly expiresIn: Schema.Int;
277
+ readonly url: Schema.String;
278
+ }>>, Schema.toCodecJson<Schema.Struct<{
279
+ readonly correlationId: Schema.String;
280
+ readonly error: Schema.Struct<{
281
+ readonly details: Schema.optionalKey<Schema.Struct<{
282
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
283
+ }>>;
284
+ } & {
285
+ readonly code: Schema.Literal<"conflict">;
286
+ readonly message: Schema.String;
287
+ readonly retryable: Schema.Boolean;
288
+ }>;
289
+ readonly ok: Schema.Literal<false>;
290
+ }> | Schema.Struct<{
291
+ readonly correlationId: Schema.String;
292
+ readonly error: Schema.Struct<{
293
+ readonly details: Schema.Struct<{
294
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
295
+ }>;
296
+ } & {
297
+ readonly code: Schema.Literal<"forbidden">;
298
+ readonly message: Schema.String;
299
+ readonly retryable: Schema.Boolean;
300
+ }>;
301
+ readonly ok: Schema.Literal<false>;
302
+ }> | Schema.Struct<{
303
+ readonly correlationId: Schema.String;
304
+ readonly error: Schema.Struct<{
305
+ readonly code: Schema.Literal<"internal">;
306
+ readonly message: Schema.String;
307
+ readonly retryable: Schema.Boolean;
308
+ }>;
309
+ readonly ok: Schema.Literal<false>;
310
+ }> | Schema.Struct<{
311
+ readonly correlationId: Schema.String;
312
+ readonly error: Schema.Struct<{
313
+ readonly details: Schema.optionalKey<Schema.Struct<{
314
+ readonly filename: Schema.optionalKey<Schema.String>;
315
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
316
+ }>>;
317
+ } & {
318
+ readonly code: Schema.Literal<"invalid_request">;
319
+ readonly message: Schema.String;
320
+ readonly retryable: Schema.Boolean;
321
+ }>;
322
+ readonly ok: Schema.Literal<false>;
323
+ }> | Schema.Struct<{
324
+ readonly correlationId: Schema.String;
325
+ readonly error: Schema.Struct<{
326
+ readonly code: Schema.Literal<"not_found">;
327
+ readonly message: Schema.String;
328
+ readonly retryable: Schema.Boolean;
329
+ }>;
330
+ readonly ok: Schema.Literal<false>;
331
+ }> | Schema.Struct<{
332
+ readonly correlationId: Schema.String;
333
+ readonly error: Schema.Struct<{
334
+ readonly code: Schema.Literal<"rate_limited">;
335
+ readonly message: Schema.String;
336
+ readonly retryable: Schema.Boolean;
337
+ }>;
338
+ readonly ok: Schema.Literal<false>;
339
+ }> | Schema.Struct<{
340
+ readonly correlationId: Schema.String;
341
+ readonly error: Schema.Struct<{
342
+ readonly code: Schema.Literal<"unauthenticated">;
343
+ readonly message: Schema.String;
344
+ readonly retryable: Schema.Boolean;
345
+ }>;
346
+ readonly ok: Schema.Literal<false>;
347
+ }> | Schema.Struct<{
348
+ readonly correlationId: Schema.String;
349
+ readonly error: Schema.Struct<{
350
+ readonly code: Schema.Literal<"unavailable">;
351
+ readonly message: Schema.String;
352
+ readonly retryable: Schema.Boolean;
353
+ }>;
354
+ readonly ok: Schema.Literal<false>;
355
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listProjectFiles", "GET", "/chat/projects/:projectId/files", Schema.toCodecStringTree<Schema.Struct<{
356
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
357
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
358
+ readonly files: Schema.$Array<Schema.Struct<{
359
+ readonly contentType: Schema.NullOr<Schema.String>;
360
+ readonly createdAt: Schema.Date;
361
+ /** `failed`: the file gave no text, so no turn gets it. */
362
+ readonly extractionState: Schema.Literals<readonly ["available", "truncated", "failed"]>;
363
+ readonly filename: Schema.String;
364
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
365
+ /** Whether a turn that starts now gets the text of the file. */
366
+ readonly inContext: Schema.Boolean;
367
+ readonly sizeBytes: Schema.Int;
368
+ }>>;
369
+ readonly maxCharacters: Schema.Int;
370
+ readonly usedCharacters: Schema.Int;
371
+ }>>, Schema.toCodecJson<Schema.Struct<{
372
+ readonly correlationId: Schema.String;
373
+ readonly error: Schema.Struct<{
374
+ readonly details: Schema.optionalKey<Schema.Struct<{
375
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
376
+ }>>;
377
+ } & {
378
+ readonly code: Schema.Literal<"conflict">;
379
+ readonly message: Schema.String;
380
+ readonly retryable: Schema.Boolean;
381
+ }>;
382
+ readonly ok: Schema.Literal<false>;
383
+ }> | Schema.Struct<{
384
+ readonly correlationId: Schema.String;
385
+ readonly error: Schema.Struct<{
386
+ readonly details: Schema.Struct<{
387
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
388
+ }>;
389
+ } & {
390
+ readonly code: Schema.Literal<"forbidden">;
391
+ readonly message: Schema.String;
392
+ readonly retryable: Schema.Boolean;
393
+ }>;
394
+ readonly ok: Schema.Literal<false>;
395
+ }> | Schema.Struct<{
396
+ readonly correlationId: Schema.String;
397
+ readonly error: Schema.Struct<{
398
+ readonly code: Schema.Literal<"internal">;
399
+ readonly message: Schema.String;
400
+ readonly retryable: Schema.Boolean;
401
+ }>;
402
+ readonly ok: Schema.Literal<false>;
403
+ }> | Schema.Struct<{
404
+ readonly correlationId: Schema.String;
405
+ readonly error: Schema.Struct<{
406
+ readonly details: Schema.optionalKey<Schema.Struct<{
407
+ readonly filename: Schema.optionalKey<Schema.String>;
408
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
409
+ }>>;
410
+ } & {
411
+ readonly code: Schema.Literal<"invalid_request">;
412
+ readonly message: Schema.String;
413
+ readonly retryable: Schema.Boolean;
414
+ }>;
415
+ readonly ok: Schema.Literal<false>;
416
+ }> | Schema.Struct<{
417
+ readonly correlationId: Schema.String;
418
+ readonly error: Schema.Struct<{
419
+ readonly code: Schema.Literal<"not_found">;
420
+ readonly message: Schema.String;
421
+ readonly retryable: Schema.Boolean;
422
+ }>;
423
+ readonly ok: Schema.Literal<false>;
424
+ }> | Schema.Struct<{
425
+ readonly correlationId: Schema.String;
426
+ readonly error: Schema.Struct<{
427
+ readonly code: Schema.Literal<"rate_limited">;
428
+ readonly message: Schema.String;
429
+ readonly retryable: Schema.Boolean;
430
+ }>;
431
+ readonly ok: Schema.Literal<false>;
432
+ }> | Schema.Struct<{
433
+ readonly correlationId: Schema.String;
434
+ readonly error: Schema.Struct<{
435
+ readonly code: Schema.Literal<"unauthenticated">;
436
+ readonly message: Schema.String;
437
+ readonly retryable: Schema.Boolean;
438
+ }>;
439
+ readonly ok: Schema.Literal<false>;
440
+ }> | Schema.Struct<{
441
+ readonly correlationId: Schema.String;
442
+ readonly error: Schema.Struct<{
443
+ readonly code: Schema.Literal<"unavailable">;
444
+ readonly message: Schema.String;
445
+ readonly retryable: Schema.Boolean;
446
+ }>;
447
+ readonly ok: Schema.Literal<false>;
448
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listProjects", "GET", "/chat/projects", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
449
+ readonly data: Schema.$Array<Schema.Struct<{
450
+ readonly createdAt: Schema.Date;
451
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
452
+ /** The Project Instructions; null when the Project has none. */
453
+ readonly instructions: Schema.NullOr<Schema.String>;
454
+ readonly name: Schema.String;
455
+ readonly updatedAt: Schema.Date;
456
+ }>>;
457
+ }>>, Schema.toCodecJson<Schema.Struct<{
458
+ readonly correlationId: Schema.String;
459
+ readonly error: Schema.Struct<{
460
+ readonly details: Schema.optionalKey<Schema.Struct<{
461
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
462
+ }>>;
463
+ } & {
464
+ readonly code: Schema.Literal<"conflict">;
465
+ readonly message: Schema.String;
466
+ readonly retryable: Schema.Boolean;
467
+ }>;
468
+ readonly ok: Schema.Literal<false>;
469
+ }> | Schema.Struct<{
470
+ readonly correlationId: Schema.String;
471
+ readonly error: Schema.Struct<{
472
+ readonly details: Schema.Struct<{
473
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
474
+ }>;
475
+ } & {
476
+ readonly code: Schema.Literal<"forbidden">;
477
+ readonly message: Schema.String;
478
+ readonly retryable: Schema.Boolean;
479
+ }>;
480
+ readonly ok: Schema.Literal<false>;
481
+ }> | Schema.Struct<{
482
+ readonly correlationId: Schema.String;
483
+ readonly error: Schema.Struct<{
484
+ readonly code: Schema.Literal<"internal">;
485
+ readonly message: Schema.String;
486
+ readonly retryable: Schema.Boolean;
487
+ }>;
488
+ readonly ok: Schema.Literal<false>;
489
+ }> | Schema.Struct<{
490
+ readonly correlationId: Schema.String;
491
+ readonly error: Schema.Struct<{
492
+ readonly details: Schema.optionalKey<Schema.Struct<{
493
+ readonly filename: Schema.optionalKey<Schema.String>;
494
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
495
+ }>>;
496
+ } & {
497
+ readonly code: Schema.Literal<"invalid_request">;
498
+ readonly message: Schema.String;
499
+ readonly retryable: Schema.Boolean;
500
+ }>;
501
+ readonly ok: Schema.Literal<false>;
502
+ }> | Schema.Struct<{
503
+ readonly correlationId: Schema.String;
504
+ readonly error: Schema.Struct<{
505
+ readonly code: Schema.Literal<"not_found">;
506
+ readonly message: Schema.String;
507
+ readonly retryable: Schema.Boolean;
508
+ }>;
509
+ readonly ok: Schema.Literal<false>;
510
+ }> | Schema.Struct<{
511
+ readonly correlationId: Schema.String;
512
+ readonly error: Schema.Struct<{
513
+ readonly code: Schema.Literal<"rate_limited">;
514
+ readonly message: Schema.String;
515
+ readonly retryable: Schema.Boolean;
516
+ }>;
517
+ readonly ok: Schema.Literal<false>;
518
+ }> | Schema.Struct<{
519
+ readonly correlationId: Schema.String;
520
+ readonly error: Schema.Struct<{
521
+ readonly code: Schema.Literal<"unauthenticated">;
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 code: Schema.Literal<"unavailable">;
530
+ readonly message: Schema.String;
531
+ readonly retryable: Schema.Boolean;
532
+ }>;
533
+ readonly ok: Schema.Literal<false>;
534
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateProject", "PATCH", "/chat/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
535
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
536
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
537
+ readonly instructions: Schema.optionalKey<Schema.NullOr<Schema.String>>;
538
+ readonly name: Schema.optionalKey<Schema.Trim>;
539
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
540
+ readonly createdAt: Schema.Date;
541
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
542
+ /** The Project Instructions; null when the Project has none. */
543
+ readonly instructions: Schema.NullOr<Schema.String>;
544
+ readonly name: Schema.String;
545
+ readonly updatedAt: Schema.Date;
546
+ }>>, Schema.toCodecJson<Schema.Struct<{
547
+ readonly correlationId: Schema.String;
548
+ readonly error: Schema.Struct<{
549
+ readonly details: Schema.optionalKey<Schema.Struct<{
550
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
551
+ }>>;
552
+ } & {
553
+ readonly code: Schema.Literal<"conflict">;
554
+ readonly message: Schema.String;
555
+ readonly retryable: Schema.Boolean;
556
+ }>;
557
+ readonly ok: Schema.Literal<false>;
558
+ }> | Schema.Struct<{
559
+ readonly correlationId: Schema.String;
560
+ readonly error: Schema.Struct<{
561
+ readonly details: Schema.Struct<{
562
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
563
+ }>;
564
+ } & {
565
+ readonly code: Schema.Literal<"forbidden">;
566
+ readonly message: Schema.String;
567
+ readonly retryable: Schema.Boolean;
568
+ }>;
569
+ readonly ok: Schema.Literal<false>;
570
+ }> | Schema.Struct<{
571
+ readonly correlationId: Schema.String;
572
+ readonly error: Schema.Struct<{
573
+ readonly code: Schema.Literal<"internal">;
574
+ readonly message: Schema.String;
575
+ readonly retryable: Schema.Boolean;
576
+ }>;
577
+ readonly ok: Schema.Literal<false>;
578
+ }> | Schema.Struct<{
579
+ readonly correlationId: Schema.String;
580
+ readonly error: Schema.Struct<{
581
+ readonly details: Schema.optionalKey<Schema.Struct<{
582
+ readonly filename: Schema.optionalKey<Schema.String>;
583
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
584
+ }>>;
585
+ } & {
586
+ readonly code: Schema.Literal<"invalid_request">;
587
+ readonly message: Schema.String;
588
+ readonly retryable: Schema.Boolean;
589
+ }>;
590
+ readonly ok: Schema.Literal<false>;
591
+ }> | Schema.Struct<{
592
+ readonly correlationId: Schema.String;
593
+ readonly error: Schema.Struct<{
594
+ readonly code: Schema.Literal<"not_found">;
595
+ readonly message: Schema.String;
596
+ readonly retryable: Schema.Boolean;
597
+ }>;
598
+ readonly ok: Schema.Literal<false>;
599
+ }> | Schema.Struct<{
600
+ readonly correlationId: Schema.String;
601
+ readonly error: Schema.Struct<{
602
+ readonly code: Schema.Literal<"rate_limited">;
603
+ readonly message: Schema.String;
604
+ readonly retryable: Schema.Boolean;
605
+ }>;
606
+ readonly ok: Schema.Literal<false>;
607
+ }> | Schema.Struct<{
608
+ readonly correlationId: Schema.String;
609
+ readonly error: Schema.Struct<{
610
+ readonly code: Schema.Literal<"unauthenticated">;
611
+ readonly message: Schema.String;
612
+ readonly retryable: Schema.Boolean;
613
+ }>;
614
+ readonly ok: Schema.Literal<false>;
615
+ }> | Schema.Struct<{
616
+ readonly correlationId: Schema.String;
617
+ readonly error: Schema.Struct<{
618
+ readonly code: Schema.Literal<"unavailable">;
619
+ readonly message: Schema.String;
620
+ readonly retryable: Schema.Boolean;
621
+ }>;
622
+ readonly ok: Schema.Literal<false>;
623
+ }>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadProjectFile", "POST", "/chat/projects/:projectId/files", Schema.toCodecStringTree<Schema.Struct<{
624
+ readonly projectId: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectId">;
625
+ }>>, never, Schema.toCodecJson<HttpApiSchema.asMultipart<Schema.Struct<{
626
+ readonly file: Schema.decodeTo<Multipart.PersistedFileSchema, Schema.$Array<Multipart.PersistedFileSchema>, never, never>;
627
+ }>>>, never, Schema.toCodecJson<Schema.Struct<{
628
+ readonly contentType: Schema.NullOr<Schema.String>;
629
+ readonly createdAt: Schema.Date;
630
+ /** `failed`: the file gave no text, so no turn gets it. */
631
+ readonly extractionState: Schema.Literals<readonly ["available", "truncated", "failed"]>;
632
+ readonly filename: Schema.String;
633
+ readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/ProjectFileId">;
634
+ /** Whether a turn that starts now gets the text of the file. */
635
+ readonly inContext: Schema.Boolean;
636
+ readonly sizeBytes: Schema.Int;
637
+ }>>, Schema.toCodecJson<Schema.Struct<{
638
+ readonly correlationId: Schema.String;
639
+ readonly error: Schema.Struct<{
640
+ readonly details: Schema.optionalKey<Schema.Struct<{
641
+ readonly reason: Schema.Literals<readonly ["turn_ended", "intent_turn_busy", "intent_turn_agent"]>;
642
+ }>>;
643
+ } & {
644
+ readonly code: Schema.Literal<"conflict">;
645
+ readonly message: Schema.String;
646
+ readonly retryable: Schema.Boolean;
647
+ }>;
648
+ readonly ok: Schema.Literal<false>;
649
+ }> | Schema.Struct<{
650
+ readonly correlationId: Schema.String;
651
+ readonly error: Schema.Struct<{
652
+ readonly details: Schema.Struct<{
653
+ readonly reason: Schema.Literals<readonly ["capability_missing", "app_disabled", "principal_not_allowed", "not_available_here", "approval_not_allowed"]>;
654
+ }>;
655
+ } & {
656
+ readonly code: Schema.Literal<"forbidden">;
657
+ readonly message: Schema.String;
658
+ readonly retryable: Schema.Boolean;
659
+ }>;
660
+ readonly ok: Schema.Literal<false>;
661
+ }> | Schema.Struct<{
662
+ readonly correlationId: Schema.String;
663
+ readonly error: Schema.Struct<{
664
+ readonly code: Schema.Literal<"internal">;
665
+ readonly message: Schema.String;
666
+ readonly retryable: Schema.Boolean;
667
+ }>;
668
+ readonly ok: Schema.Literal<false>;
669
+ }> | Schema.Struct<{
670
+ readonly correlationId: Schema.String;
671
+ readonly error: Schema.Struct<{
672
+ readonly details: Schema.optionalKey<Schema.Struct<{
673
+ readonly filename: Schema.optionalKey<Schema.String>;
674
+ readonly reason: Schema.Literals<readonly ["unsupported", "oversized", "malformed", "too_many_files"]>;
675
+ }>>;
676
+ } & {
677
+ readonly code: Schema.Literal<"invalid_request">;
678
+ readonly message: Schema.String;
679
+ readonly retryable: Schema.Boolean;
680
+ }>;
681
+ readonly ok: Schema.Literal<false>;
682
+ }> | Schema.Struct<{
683
+ readonly correlationId: Schema.String;
684
+ readonly error: Schema.Struct<{
685
+ readonly code: Schema.Literal<"not_found">;
686
+ readonly message: Schema.String;
687
+ readonly retryable: Schema.Boolean;
688
+ }>;
689
+ readonly ok: Schema.Literal<false>;
690
+ }> | Schema.Struct<{
691
+ readonly correlationId: Schema.String;
692
+ readonly error: Schema.Struct<{
693
+ readonly code: Schema.Literal<"rate_limited">;
694
+ readonly message: Schema.String;
695
+ readonly retryable: Schema.Boolean;
696
+ }>;
697
+ readonly ok: Schema.Literal<false>;
698
+ }> | Schema.Struct<{
699
+ readonly correlationId: Schema.String;
700
+ readonly error: Schema.Struct<{
701
+ readonly code: Schema.Literal<"unauthenticated">;
702
+ readonly message: Schema.String;
703
+ readonly retryable: Schema.Boolean;
704
+ }>;
705
+ readonly ok: Schema.Literal<false>;
706
+ }> | Schema.Struct<{
707
+ readonly correlationId: Schema.String;
708
+ readonly error: Schema.Struct<{
709
+ readonly code: Schema.Literal<"unavailable">;
710
+ readonly message: Schema.String;
711
+ readonly retryable: Schema.Boolean;
712
+ }>;
713
+ readonly ok: Schema.Literal<false>;
714
+ }>>, never, never>, false>;
715
+ /** The caller's Projects that the Project Visibility of the caller Place shows, and their Project Files. */
716
+ export declare class ChatProjectsApi extends ChatProjectsApi_base {
717
+ }
718
+ export {};