@collective-intelligence/ai 0.0.0-stage → 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.
- package/AGENTS.md +52 -0
- package/README.md +462 -2
- package/dist/api/access-check.d.ts +18 -0
- package/dist/api/answer-sources.d.ts +48 -0
- package/dist/api/attachments-api.d.ts +187 -0
- package/dist/api/catalog-api.d.ts +408 -0
- package/dist/api/chat-api.d.ts +2401 -0
- package/dist/api/chat-surface-api.d.ts +4186 -0
- package/dist/api/compaction.d.ts +52 -0
- package/dist/api/conversations.d.ts +107 -0
- package/dist/api/errors.d.ts +117 -0
- package/dist/api/feedback-api.d.ts +185 -0
- package/dist/api/files.d.ts +22 -0
- package/dist/api/ids.d.ts +33 -0
- package/dist/api/index.d.ts +21 -0
- package/dist/api/intents-api.d.ts +65 -0
- package/dist/api/place-context.d.ts +34 -0
- package/dist/api/projects-api.d.ts +718 -0
- package/dist/api/speech-api.d.ts +345 -0
- package/dist/api/transcript.d.ts +260 -0
- package/dist/api/turns.d.ts +196 -0
- package/dist/api.d.ts +21 -0
- package/dist/api.js +1 -0
- package/dist/domain/access.d.ts +29 -0
- package/dist/domain/context-trail.d.ts +65 -0
- package/dist/domain/data-parts.d.ts +247 -0
- package/dist/domain/errors.d.ts +28 -0
- package/dist/domain/index.d.ts +14 -0
- package/dist/domain/intents.d.ts +101 -0
- package/dist/domain/message.d.ts +173 -0
- package/dist/domain/place.d.ts +17 -0
- package/dist/domain/runtime-value.d.ts +16 -0
- package/dist/domain-50vzrrp9.js +2 -0
- package/dist/domain-5fpd4fte.js +1 -0
- package/dist/domain-9wzbv87n.js +2 -0
- package/dist/domain-g97xs965.js +2 -0
- package/dist/domain-hk3yw2m7.js +1 -0
- package/dist/domain-qyts6dgz.js +0 -0
- package/dist/domain-s07s1ry1.js +2 -0
- package/dist/domain.d.ts +14 -0
- package/dist/domain.js +1 -0
- package/dist/headless/access/access-store.d.ts +28 -0
- package/dist/headless/access/visibility.d.ts +24 -0
- package/dist/headless/blocked-state.d.ts +21 -0
- package/dist/headless/chat-registry.d.ts +63 -0
- package/dist/headless/chat-session-provider.d.ts +109 -0
- package/dist/headless/chat-surface.d.ts +4210 -0
- package/dist/headless/host-ports.d.ts +146 -0
- package/dist/headless/index.d.ts +33 -0
- package/dist/headless/intents/card-ends.d.ts +22 -0
- package/dist/headless/intents/intent-call.d.ts +28 -0
- package/dist/headless/intents/intents-provider.d.ts +108 -0
- package/dist/headless/intents/page-registry.d.ts +129 -0
- package/dist/headless/intents/use-intent-dispatch.d.ts +60 -0
- package/dist/headless/intents/use-intents.d.ts +11 -0
- package/dist/headless/intents/use-returned-intent-handle.d.ts +11 -0
- package/dist/headless/launch/chat-launch.d.ts +42 -0
- package/dist/headless/launch/launch-target.d.ts +25 -0
- package/dist/headless/launch/submit.d.ts +29 -0
- package/dist/headless/run-state.d.ts +16 -0
- package/dist/headless/sent-files.d.ts +20 -0
- package/dist/headless/server-started-turn-follow.proof.d.ts +26 -0
- package/dist/headless/session-machine.d.ts +745 -0
- package/dist/headless/trail/buffer.d.ts +48 -0
- package/dist/headless/trail/json-ld.d.ts +10 -0
- package/dist/headless/trail/switches.d.ts +10 -0
- package/dist/headless/trail/trail-provider.d.ts +53 -0
- package/dist/headless/transcript-messages.d.ts +26 -0
- package/dist/headless.d.ts +33 -0
- package/dist/headless.js +2 -0
- package/dist/transport/chat-client.d.ts +25 -0
- package/dist/transport/chat-transport.d.ts +57 -0
- package/dist/transport/index.d.ts +6 -0
- package/dist/transport/simulated-chat-transport.d.ts +39 -0
- package/dist/transport.d.ts +6 -0
- package/dist/transport.js +1 -0
- package/dist/views/assistant-sidebar/assistant-sidebar.d.ts +15 -0
- package/dist/views/assistant-sidebar/layout.d.ts +47 -0
- package/dist/views/assistant-sidebar/toggle.d.ts +14 -0
- package/dist/views/assistant-sidebar/use-shortcut.d.ts +11 -0
- package/dist/views/blocked/chat-blocked-state.d.ts +15 -0
- package/dist/views/chat-operations.d.ts +46 -0
- package/dist/views/chat-root.d.ts +14 -0
- package/dist/views/chat.d.ts +51 -0
- package/dist/views/composer/capability-picker.d.ts +77 -0
- package/dist/views/composer/capability-pickers.d.ts +24 -0
- package/dist/views/composer/chat-composer.d.ts +15 -0
- package/dist/views/composer/composer-picks.d.ts +31 -0
- package/dist/views/composer/composer-trail.d.ts +21 -0
- package/dist/views/composer/draft-attachments.d.ts +36 -0
- package/dist/views/composer/queued-messages.d.ts +9 -0
- package/dist/views/composer/send-menu.d.ts +11 -0
- package/dist/views/composer/slash-suggestions.d.ts +37 -0
- package/dist/views/composer/trail-chips.d.ts +15 -0
- package/dist/views/composer/voice-input/microphone.d.ts +14 -0
- package/dist/views/composer/voice-input/remote-transcription.d.ts +12 -0
- package/dist/views/composer/voice-input/use-voice-input.d.ts +30 -0
- package/dist/views/composer/voice-input/voice-input.d.ts +15 -0
- package/dist/views/dock/chat-dock.d.ts +57 -0
- package/dist/views/dock/dock-session.d.ts +22 -0
- package/dist/views/header/chat-header.d.ts +10 -0
- package/dist/views/header/compaction-controls.d.ts +17 -0
- package/dist/views/header/memory-switch.d.ts +16 -0
- package/dist/views/index.d.ts +58 -0
- package/dist/views/intents/form-fields.d.ts +38 -0
- package/dist/views/intents/intent-card.d.ts +61 -0
- package/dist/views/intents/intent-form.d.ts +23 -0
- package/dist/views/intents/intent-notices.d.ts +39 -0
- package/dist/views/intents/intent-trigger.d.ts +46 -0
- package/dist/views/intents/labels.d.ts +23 -0
- package/dist/views/labels/en.d.ts +3 -0
- package/dist/views/labels/index.d.ts +13 -0
- package/dist/views/labels/it.d.ts +3 -0
- package/dist/views/labels/types.d.ts +7 -0
- package/dist/views/launch/chat-launch-button.d.ts +21 -0
- package/dist/views/parts/answer-feedback.d.ts +26 -0
- package/dist/views/parts/evidence-part.d.ts +8 -0
- package/dist/views/parts/file-part.d.ts +8 -0
- package/dist/views/parts/image-generation-part.d.ts +9 -0
- package/dist/views/parts/image-generation.d.ts +84 -0
- package/dist/views/parts/intent-card-part.d.ts +8 -0
- package/dist/views/parts/memory-evidence-part.d.ts +7 -0
- package/dist/views/parts/message-parts.d.ts +21 -0
- package/dist/views/parts/question-part.d.ts +8 -0
- package/dist/views/parts/read-aloud.d.ts +23 -0
- package/dist/views/parts/reasoning-part.d.ts +8 -0
- package/dist/views/parts/steering-message-part.d.ts +7 -0
- package/dist/views/parts/text-part.d.ts +4 -0
- package/dist/views/parts/tool-part.d.ts +11 -0
- package/dist/views/parts/types.d.ts +103 -0
- package/dist/views/parts/use-read-aloud.d.ts +13 -0
- package/dist/views/run-trace/message-run.d.ts +17 -0
- package/dist/views/run-trace/run-stream.d.ts +128 -0
- package/dist/views/run-trace/run-trace-parts.d.ts +26 -0
- package/dist/views/run-trace/run-trace.d.ts +31 -0
- package/dist/views/sidebar/conversation-dialogs.d.ts +38 -0
- package/dist/views/sidebar/conversation-row.d.ts +23 -0
- package/dist/views/sidebar/conversation-sidebar.d.ts +10 -0
- package/dist/views/sidebar/date-groups.d.ts +12 -0
- package/dist/views/sidebar/history-filter.d.ts +57 -0
- package/dist/views/sidebar/projects/project-dialogs.d.ts +40 -0
- package/dist/views/sidebar/projects/project-files.d.ts +16 -0
- package/dist/views/sidebar/projects/project-groups.d.ts +19 -0
- package/dist/views/sidebar/projects/project-view.d.ts +21 -0
- package/dist/views/sidebar/projects/projects-section.d.ts +21 -0
- package/dist/views/sidebar/projects/use-chat-projects.d.ts +32 -0
- package/dist/views/slots.d.ts +148 -0
- package/dist/views/transcript/chat-transcript.d.ts +13 -0
- package/dist/views/transcript/sent-trail.d.ts +13 -0
- package/dist/views/transcript/use-image-reload.d.ts +16 -0
- package/dist/views.d.ts +58 -0
- package/dist/views.js +3 -0
- package/docs/guide/ai/index.md +377 -0
- package/docs/guide/ai/studio.md +245 -0
- package/docs/guide/data/connectors.md +267 -0
- package/docs/guide/data/datasets.md +145 -0
- package/docs/guide/data/documents.md +235 -0
- package/docs/guide/data/index.md +62 -0
- package/docs/guide/data/knowledge.md +214 -0
- package/docs/guide/develop/extensions.md +299 -0
- package/docs/guide/develop/external-apps.md +279 -0
- package/docs/guide/develop/infrastructure.md +135 -0
- package/docs/guide/develop/sdks.md +233 -0
- package/docs/guide/index.md +83 -0
- package/docs/guide/platform/access.md +311 -0
- package/docs/guide/platform/architecture.md +166 -0
- package/docs/guide/platform/built-ins.md +225 -0
- package/docs/guide/platform/entrypoints.md +318 -0
- package/docs/guide/scenarios/index.md +130 -0
- package/docs/guide/template/index.md +295 -0
- package/docs/guide/template/state-machines.md +294 -0
- package/package.json +123 -4
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/**
|
|
3
|
+
* An AI SDK UI message stream (`UI_MESSAGE_STREAM_HEADERS`): the answer of
|
|
4
|
+
* the chat send, of its resume and of the run stream.
|
|
5
|
+
*/
|
|
6
|
+
export declare const UIMessageEventStream: Schema.String;
|
|
7
|
+
/**
|
|
8
|
+
* The body of `POST /chat/:conversationId`: only the last message and the
|
|
9
|
+
* AI SDK trigger. The server reads no earlier message.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ChatSendRequestSchema: Schema.Struct<{
|
|
12
|
+
readonly message: Schema.Struct<{
|
|
13
|
+
readonly id: Schema.NonEmptyString;
|
|
14
|
+
readonly metadata: Schema.optionalKey<Schema.Unknown>;
|
|
15
|
+
readonly parts: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
16
|
+
readonly type: Schema.String;
|
|
17
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
18
|
+
readonly role: Schema.Literals<readonly ["system", "user", "assistant"]>;
|
|
19
|
+
}>;
|
|
20
|
+
/** The message that a `regenerate-message` trigger replaces. */
|
|
21
|
+
readonly messageId: Schema.optionalKey<Schema.String>;
|
|
22
|
+
readonly trigger: Schema.Literals<readonly ["submit-message", "regenerate-message"]>;
|
|
23
|
+
}>;
|
|
24
|
+
export type ChatSendRequest = typeof ChatSendRequestSchema.Type;
|
|
25
|
+
/** The run that a run stream follows: its root invocation. */
|
|
26
|
+
export declare const RunPath: Schema.Struct<{
|
|
27
|
+
readonly runId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
28
|
+
}>;
|
|
29
|
+
/** The state of a turn. */
|
|
30
|
+
export declare const TurnStatus: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
|
|
31
|
+
/** The turn that a stop names. */
|
|
32
|
+
export declare const TurnPath: Schema.Struct<{
|
|
33
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
34
|
+
}>;
|
|
35
|
+
/** A turn of a Conversation that the chat shows waiting for the user. */
|
|
36
|
+
export declare const ConversationTurnPath: Schema.Struct<{
|
|
37
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
38
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the turn still waits for the user (T58-C D2): `false` once the
|
|
42
|
+
* turn waits on no approval or answer any more, because someone answered it
|
|
43
|
+
* elsewhere (such as the approvals inbox) or the turn ended, so the chat
|
|
44
|
+
* resumes it. The server holds the request while the turn waits, a while at
|
|
45
|
+
* most, then answers `true`, and the chat asks again.
|
|
46
|
+
*/
|
|
47
|
+
export declare const TurnWaitResponse: Schema.Struct<{
|
|
48
|
+
readonly waiting: Schema.Boolean;
|
|
49
|
+
}>;
|
|
50
|
+
export type TurnWait = typeof TurnWaitResponse.Type;
|
|
51
|
+
/** The turn after the stop. */
|
|
52
|
+
export declare const CancelTurnResponse: Schema.Struct<{
|
|
53
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
54
|
+
readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
|
|
55
|
+
}>;
|
|
56
|
+
/** A Queued Message of a Conversation, as every device reads it. */
|
|
57
|
+
export declare const QueuedMessageSchema: Schema.Struct<{
|
|
58
|
+
readonly content: Schema.String;
|
|
59
|
+
readonly createdAt: Schema.Date;
|
|
60
|
+
readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
|
|
61
|
+
/**
|
|
62
|
+
* The plain turn that the message started; null while it waits, after its
|
|
63
|
+
* removal, and for an agent turn, whose invocation starts with its run.
|
|
64
|
+
*/
|
|
65
|
+
readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
|
|
66
|
+
/** The order of the message in the queue, from 1. */
|
|
67
|
+
readonly position: Schema.Int;
|
|
68
|
+
readonly revision: Schema.Int;
|
|
69
|
+
readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
|
|
70
|
+
}>;
|
|
71
|
+
export type QueuedMessage = typeof QueuedMessageSchema.Type;
|
|
72
|
+
/**
|
|
73
|
+
* The send of a Steering Message. While a turn of the Conversation runs,
|
|
74
|
+
* the message is saved under that turn before the send returns; when none
|
|
75
|
+
* runs, it starts a turn at once.
|
|
76
|
+
*/
|
|
77
|
+
export declare const SendSteeringMessageRequest: Schema.Struct<{
|
|
78
|
+
readonly clientMessageId: Schema.String;
|
|
79
|
+
readonly content: Schema.String;
|
|
80
|
+
/**
|
|
81
|
+
* The turn that the client saw running. The message goes to the turn that
|
|
82
|
+
* runs when it arrives; when that turn ended and none runs, it starts the
|
|
83
|
+
* next turn.
|
|
84
|
+
*/
|
|
85
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Where the message went: `saved` under the running turn `invocationId`, or
|
|
89
|
+
* `started` as the input of the turn `invocationId`. `queued`: a retry
|
|
90
|
+
* whose client message id the Queued Message `queuedMessageId` holds, which
|
|
91
|
+
* started no plain turn; read the queue for its state.
|
|
92
|
+
*/
|
|
93
|
+
export declare const SendSteeringMessageResponseSchema: Schema.Union<readonly [Schema.Struct<{
|
|
94
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
95
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
96
|
+
readonly outcome: Schema.Literal<"started">;
|
|
97
|
+
readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
|
|
98
|
+
}>, Schema.Struct<{
|
|
99
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
100
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
101
|
+
readonly outcome: Schema.Literal<"saved">;
|
|
102
|
+
readonly status: Schema.Literals<readonly ["cancelled", "completed", "error", "running", "waiting_for_approval"]>;
|
|
103
|
+
readonly steeringMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/SteeringMessageId">;
|
|
104
|
+
}>, Schema.Struct<{
|
|
105
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
106
|
+
readonly outcome: Schema.Literal<"queued">;
|
|
107
|
+
readonly queuedMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
|
|
108
|
+
/** The revision that an edit or a remove of the message names now. */
|
|
109
|
+
readonly revision: Schema.Int;
|
|
110
|
+
}>]>;
|
|
111
|
+
export type SendSteeringMessageResponse = typeof SendSteeringMessageResponseSchema.Type;
|
|
112
|
+
/**
|
|
113
|
+
* "Send after this answer": while a turn of the Conversation runs, the
|
|
114
|
+
* message waits and runs after the answer; when none runs, it starts a turn
|
|
115
|
+
* at once.
|
|
116
|
+
*/
|
|
117
|
+
export declare const QueueMessageRequest: Schema.Struct<{
|
|
118
|
+
readonly clientMessageId: Schema.String;
|
|
119
|
+
readonly content: Schema.String;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Where the message went: `queued`, it waits (on a retry, also after its
|
|
123
|
+
* removal); `started`, it started the turn `invocationId` (absent for an
|
|
124
|
+
* agent turn, whose run has not started); `saved`, a retry whose client
|
|
125
|
+
* message id a Steering Message holds.
|
|
126
|
+
*/
|
|
127
|
+
export declare const QueueMessageResponseSchema: Schema.Union<readonly [Schema.Struct<{
|
|
128
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
129
|
+
readonly outcome: Schema.Literal<"queued">;
|
|
130
|
+
readonly queuedMessage: Schema.Struct<{
|
|
131
|
+
readonly content: Schema.String;
|
|
132
|
+
readonly createdAt: Schema.Date;
|
|
133
|
+
readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
|
|
134
|
+
/**
|
|
135
|
+
* The plain turn that the message started; null while it waits, after its
|
|
136
|
+
* removal, and for an agent turn, whose invocation starts with its run.
|
|
137
|
+
*/
|
|
138
|
+
readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
|
|
139
|
+
/** The order of the message in the queue, from 1. */
|
|
140
|
+
readonly position: Schema.Int;
|
|
141
|
+
readonly revision: Schema.Int;
|
|
142
|
+
readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
|
|
143
|
+
}>;
|
|
144
|
+
}>, Schema.Struct<{
|
|
145
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
146
|
+
readonly invocationId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
|
|
147
|
+
readonly outcome: Schema.Literal<"started">;
|
|
148
|
+
/** Absent when a turn input holds the client message id. */
|
|
149
|
+
readonly queuedMessageId: Schema.optionalKey<Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">>;
|
|
150
|
+
}>, Schema.Struct<{
|
|
151
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
152
|
+
readonly invocationId: Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">;
|
|
153
|
+
readonly outcome: Schema.Literal<"saved">;
|
|
154
|
+
readonly steeringMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/SteeringMessageId">;
|
|
155
|
+
}>]>;
|
|
156
|
+
export type QueueMessageResponse = typeof QueueMessageResponseSchema.Type;
|
|
157
|
+
/** The waiting Queued Messages of a Conversation, in the order they run. */
|
|
158
|
+
export declare const ListQueuedMessagesResponse: Schema.Struct<{
|
|
159
|
+
readonly data: Schema.$Array<Schema.Struct<{
|
|
160
|
+
readonly content: Schema.String;
|
|
161
|
+
readonly createdAt: Schema.Date;
|
|
162
|
+
readonly id: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
|
|
163
|
+
/**
|
|
164
|
+
* The plain turn that the message started; null while it waits, after its
|
|
165
|
+
* removal, and for an agent turn, whose invocation starts with its run.
|
|
166
|
+
*/
|
|
167
|
+
readonly invocationId: Schema.NullOr<Schema.brand<Schema.String, "@collective-intelligence/ai/InvocationId">>;
|
|
168
|
+
/** The order of the message in the queue, from 1. */
|
|
169
|
+
readonly position: Schema.Int;
|
|
170
|
+
readonly revision: Schema.Int;
|
|
171
|
+
readonly status: Schema.Literals<readonly ["waiting", "claimed", "removed"]>;
|
|
172
|
+
}>>;
|
|
173
|
+
}>;
|
|
174
|
+
/** The Queued Message that an edit or a remove names. */
|
|
175
|
+
export declare const QueuedMessagePath: Schema.Struct<{
|
|
176
|
+
readonly conversationId: Schema.brand<Schema.String, "@collective-intelligence/ai/ConversationId">;
|
|
177
|
+
readonly queuedMessageId: Schema.brand<Schema.String, "@collective-intelligence/ai/QueuedMessageId">;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* The edit of a waiting Queued Message: it applies only with the current
|
|
181
|
+
* revision while the message waits; else `conflict` and nothing changes.
|
|
182
|
+
*/
|
|
183
|
+
export declare const UpdateQueuedMessageRequest: Schema.Struct<{
|
|
184
|
+
readonly content: Schema.String;
|
|
185
|
+
/** The revision that the client read. */
|
|
186
|
+
readonly revision: Schema.Int;
|
|
187
|
+
}>;
|
|
188
|
+
/**
|
|
189
|
+
* The removal of a waiting Queued Message, `?revision=N`: it applies only
|
|
190
|
+
* with the current revision while the message waits; else `conflict` and
|
|
191
|
+
* nothing changes.
|
|
192
|
+
*/
|
|
193
|
+
export declare const RemoveQueuedMessageQuery: Schema.Struct<{
|
|
194
|
+
/** The revision that the client read. */
|
|
195
|
+
readonly revision: Schema.NumberFromString;
|
|
196
|
+
}>;
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type { AccessCheckOptions, AccessCheckPort, AccessCheckResponse } from "./api/access-check.js";
|
|
2
|
+
export { ChatAttachmentsApi } from "./api/attachments-api.js";
|
|
3
|
+
export { ChatCatalogApi } from "./api/catalog-api.js";
|
|
4
|
+
export type { CatalogAgent, CatalogSkill, CatalogTool } from "./api/catalog-api.js";
|
|
5
|
+
export { ChatApi } from "./api/chat-api.js";
|
|
6
|
+
export { ChatSurfaceApi, makeChatSurfaceClient } from "./api/chat-surface-api.js";
|
|
7
|
+
export type { ChatSurfaceClient, ChatSurfaceClientOptions } from "./api/chat-surface-api.js";
|
|
8
|
+
export type { Conversation, ConversationSubject } from "./api/conversations.js";
|
|
9
|
+
export { chatConflictReasons, chatRefusalReasons, uploadRejectionReasons } from "./api/errors.js";
|
|
10
|
+
export type { ChatConflictReason, ChatFailure, ChatRefusalReason, UploadRejectionReason } from "./api/errors.js";
|
|
11
|
+
export { ChatFeedbackApi } from "./api/feedback-api.js";
|
|
12
|
+
export { intentOperationIds } from "./api/intents-api.js";
|
|
13
|
+
export type { IntentCallOptions, IntentInput, IntentOperationId, IntentOperations, IntentOutput, IntentsApi } from "./api/intents-api.js";
|
|
14
|
+
export { AgentId, AttachmentId, ConversationId, InvocationId, ProjectFileId, ProjectId, QueuedMessageId, SpeechClipId, SteeringMessageId } from "./api/ids.js";
|
|
15
|
+
export type { PlaceContext } from "./api/place-context.js";
|
|
16
|
+
export { ChatProjectsApi } from "./api/projects-api.js";
|
|
17
|
+
export type { Project, ProjectFile } from "./api/projects-api.js";
|
|
18
|
+
export { ChatSpeechApi } from "./api/speech-api.js";
|
|
19
|
+
export { TranscriptSchema } from "./api/transcript.js";
|
|
20
|
+
export type { Transcript } from "./api/transcript.js";
|
|
21
|
+
export type { ChatSendRequest, QueuedMessage, QueueMessageResponse, SendSteeringMessageResponse, TurnWait } from "./api/turns.js";
|
package/dist/api.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{chatRefusalReasons2,chatConflictReasons2,uploadRejectionReasons2,ChatAttachmentsApi2,ChatCatalogApi2,ChatFeedbackApi2,TranscriptSchema2,ChatApi2,ChatProjectsApi2,ChatSpeechApi2,ChatSurfaceApi2,makeChatSurfaceClient2}from"./domain-g97xs965.js";import{ConversationId2,InvocationId2,AgentId2,ProjectId2,ProjectFileId2,AttachmentId2,QueuedMessageId2,SteeringMessageId2,SpeechClipId2}from"./domain-5fpd4fte.js";import"./domain-50vzrrp9.js";var everyOperation=(ids)=>ids;var intentOperationIds=everyOperation(["dispatch","list","read","wait"]);export{AgentId2 as AgentId,AttachmentId2 as AttachmentId,ChatApi2 as ChatApi,ChatAttachmentsApi2 as ChatAttachmentsApi,ChatCatalogApi2 as ChatCatalogApi,ChatFeedbackApi2 as ChatFeedbackApi,ChatProjectsApi2 as ChatProjectsApi,ChatSpeechApi2 as ChatSpeechApi,ChatSurfaceApi2 as ChatSurfaceApi,ConversationId2 as ConversationId,InvocationId2 as InvocationId,ProjectFileId2 as ProjectFileId,ProjectId2 as ProjectId,QueuedMessageId2 as QueuedMessageId,SpeechClipId2 as SpeechClipId,SteeringMessageId2 as SteeringMessageId,TranscriptSchema2 as TranscriptSchema,chatConflictReasons2 as chatConflictReasons,chatRefusalReasons2 as chatRefusalReasons,intentOperationIds,makeChatSurfaceClient2 as makeChatSurfaceClient,uploadRejectionReasons2 as uploadRejectionReasons};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A platform thing that the Visibility Gate asks about: may the current user
|
|
3
|
+
* use it? Package things go by FQN, so a widget can name its needs before
|
|
4
|
+
* install; a dataset belongs to its Organization and goes by id. An Intent is
|
|
5
|
+
* allowed when its audience admits the user and the Automation run check
|
|
6
|
+
* passes.
|
|
7
|
+
*/
|
|
8
|
+
export type AccessTarget = {
|
|
9
|
+
readonly kind: "capability";
|
|
10
|
+
readonly code: string;
|
|
11
|
+
/** The holder of the capability at this mode or higher is allowed. */
|
|
12
|
+
readonly mode: "manage" | "on" | "read";
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: "entity_schema";
|
|
15
|
+
readonly fqn: string;
|
|
16
|
+
readonly access: "read" | "write";
|
|
17
|
+
} | {
|
|
18
|
+
/**
|
|
19
|
+
* May read its records. Members cannot write dataset records, so a
|
|
20
|
+
* dataset target has no write access.
|
|
21
|
+
*/
|
|
22
|
+
readonly kind: "dataset";
|
|
23
|
+
readonly id: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: "agent" | "intent" | "skill" | "workflow";
|
|
26
|
+
readonly fqn: string;
|
|
27
|
+
};
|
|
28
|
+
/** The Access Check answer for one target. */
|
|
29
|
+
export type AccessCheckAnswer = "allowed" | "denied";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import type { CiStandardSchema } from "./data-parts.js";
|
|
3
|
+
/** A Page Visit: a page that the user opened. */
|
|
4
|
+
declare const PageVisitSchema: Schema.Struct<{
|
|
5
|
+
readonly app: Schema.String;
|
|
6
|
+
readonly at: Schema.String;
|
|
7
|
+
readonly page: Schema.String;
|
|
8
|
+
readonly title: Schema.String;
|
|
9
|
+
}>;
|
|
10
|
+
export type PageVisit = typeof PageVisitSchema.Type;
|
|
11
|
+
/** What a piece on screen shows, shaped like JSON-LD: the app names its own `@type`. */
|
|
12
|
+
declare const TrailMetadataDataSchema: Schema.StructWithRest<Schema.Struct<{
|
|
13
|
+
readonly "@type": Schema.String;
|
|
14
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
15
|
+
export type TrailMetadataData = typeof TrailMetadataDataSchema.Type;
|
|
16
|
+
/** Trail Metadata: what a piece on screen shows now. */
|
|
17
|
+
declare const TrailMetadataSchema: Schema.Struct<{
|
|
18
|
+
readonly at: Schema.String;
|
|
19
|
+
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
20
|
+
readonly "@type": Schema.String;
|
|
21
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
22
|
+
/** The piece that set the entry. */
|
|
23
|
+
readonly source: Schema.String;
|
|
24
|
+
}>;
|
|
25
|
+
export type TrailMetadata = typeof TrailMetadataSchema.Type;
|
|
26
|
+
/** A Trail Event: what the user did, shaped like a data layer event. */
|
|
27
|
+
declare const TrailEventSchema: Schema.Struct<{
|
|
28
|
+
readonly at: Schema.String;
|
|
29
|
+
readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
30
|
+
readonly event: Schema.String;
|
|
31
|
+
/** The piece that pushed the entry. */
|
|
32
|
+
readonly source: Schema.String;
|
|
33
|
+
}>;
|
|
34
|
+
export type TrailEvent = typeof TrailEventSchema.Type;
|
|
35
|
+
/**
|
|
36
|
+
* One Context Trail Entry. Only a Trail Event has `event`, so it is tried
|
|
37
|
+
* first; only a Page Visit has no `source`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ContextTrailEntrySchema: Schema.Union<readonly [Schema.Struct<{
|
|
40
|
+
readonly at: Schema.String;
|
|
41
|
+
readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
42
|
+
readonly event: Schema.String;
|
|
43
|
+
/** The piece that pushed the entry. */
|
|
44
|
+
readonly source: Schema.String;
|
|
45
|
+
}>, Schema.Struct<{
|
|
46
|
+
readonly at: Schema.String;
|
|
47
|
+
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
48
|
+
readonly "@type": Schema.String;
|
|
49
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
50
|
+
/** The piece that set the entry. */
|
|
51
|
+
readonly source: Schema.String;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
readonly app: Schema.String;
|
|
54
|
+
readonly at: Schema.String;
|
|
55
|
+
readonly page: Schema.String;
|
|
56
|
+
readonly title: Schema.String;
|
|
57
|
+
}>]>;
|
|
58
|
+
export type ContextTrailEntry = typeof ContextTrailEntrySchema.Type;
|
|
59
|
+
/** One Context Trail Entry as Standard Schema, for the transcript of a sent turn (AC-219). */
|
|
60
|
+
export declare const contextTrailEntrySchema: CiStandardSchema<typeof ContextTrailEntrySchema>;
|
|
61
|
+
/** A push like a data layer push: the event name, and its data beside it. */
|
|
62
|
+
export type TrailEventPush = Readonly<Record<string, Schema.Json>> & Readonly<{
|
|
63
|
+
event: string;
|
|
64
|
+
}>;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { StandardSchemaV1 } from "effect/StandardSchema";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
/**
|
|
4
|
+
* An Effect schema that is also a Standard Schema, as `Schema.toStandardSchemaV1`
|
|
5
|
+
* returns it. The name keeps the declarations short and lets each consumer
|
|
6
|
+
* read the optional keys with its own compiler options.
|
|
7
|
+
*/
|
|
8
|
+
export type CiStandardSchema<Self extends Schema.Top> = StandardSchemaV1<Self["Encoded"], Self["Type"]> & Self;
|
|
9
|
+
declare const TableEvidenceSchema: Schema.Struct<{
|
|
10
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
11
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
12
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
13
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
14
|
+
readonly key: Schema.String;
|
|
15
|
+
readonly label: Schema.String;
|
|
16
|
+
/** The row keys that hold a link URL and, optionally, its label. */
|
|
17
|
+
readonly link: Schema.NullOr<Schema.Struct<{
|
|
18
|
+
readonly labelKey: Schema.NullOr<Schema.String>;
|
|
19
|
+
readonly urlKey: Schema.String;
|
|
20
|
+
}>>;
|
|
21
|
+
readonly valueKind: Schema.NullOr<Schema.String>;
|
|
22
|
+
}>>;
|
|
23
|
+
readonly kind: Schema.Literal<"table">;
|
|
24
|
+
readonly rows: Schema.$Array<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
25
|
+
}>;
|
|
26
|
+
/** Where the user can open one source. */
|
|
27
|
+
declare const SourceNavigationSchema: Schema.Union<readonly [Schema.Struct<{
|
|
28
|
+
readonly entityId: Schema.String;
|
|
29
|
+
readonly kind: Schema.Literal<"entity">;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
readonly fileId: Schema.String;
|
|
32
|
+
readonly kind: Schema.Literal<"file">;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
readonly kind: Schema.Literal<"external_url">;
|
|
35
|
+
readonly url: Schema.String;
|
|
36
|
+
}>]>;
|
|
37
|
+
declare const SourcesEvidenceSchema: Schema.Struct<{
|
|
38
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
39
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
40
|
+
readonly groups: Schema.$Array<Schema.Struct<{
|
|
41
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
42
|
+
readonly contradictionStatus: Schema.String;
|
|
43
|
+
/** The opaque id that a navigation request sends back; null when the source has none. */
|
|
44
|
+
readonly evidenceId: Schema.NullOr<Schema.String>;
|
|
45
|
+
readonly excerpt: Schema.String;
|
|
46
|
+
readonly matchClassification: Schema.String;
|
|
47
|
+
readonly navigation: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
48
|
+
readonly entityId: Schema.String;
|
|
49
|
+
readonly kind: Schema.Literal<"entity">;
|
|
50
|
+
}>, Schema.Struct<{
|
|
51
|
+
readonly fileId: Schema.String;
|
|
52
|
+
readonly kind: Schema.Literal<"file">;
|
|
53
|
+
}>, Schema.Struct<{
|
|
54
|
+
readonly kind: Schema.Literal<"external_url">;
|
|
55
|
+
readonly url: Schema.String;
|
|
56
|
+
}>]>>;
|
|
57
|
+
readonly provenanceLabel: Schema.String;
|
|
58
|
+
readonly relevanceScore: Schema.Finite;
|
|
59
|
+
readonly title: Schema.String;
|
|
60
|
+
}>>;
|
|
61
|
+
readonly label: Schema.String;
|
|
62
|
+
readonly sourceKind: Schema.String;
|
|
63
|
+
}>>;
|
|
64
|
+
readonly kind: Schema.Literal<"sources">;
|
|
65
|
+
/** The sources that the tool found but the part leaves out. */
|
|
66
|
+
readonly omittedCount: Schema.Int;
|
|
67
|
+
}>;
|
|
68
|
+
/** The `data-evidence` Data Part: the evidence of one tool result, one of seven kinds. */
|
|
69
|
+
declare const EvidenceSchema: Schema.Union<readonly [Schema.Struct<{
|
|
70
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
71
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
72
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
73
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
74
|
+
readonly key: Schema.String;
|
|
75
|
+
readonly label: Schema.String;
|
|
76
|
+
/** The row keys that hold a link URL and, optionally, its label. */
|
|
77
|
+
readonly link: Schema.NullOr<Schema.Struct<{
|
|
78
|
+
readonly labelKey: Schema.NullOr<Schema.String>;
|
|
79
|
+
readonly urlKey: Schema.String;
|
|
80
|
+
}>>;
|
|
81
|
+
readonly valueKind: Schema.NullOr<Schema.String>;
|
|
82
|
+
}>>;
|
|
83
|
+
readonly kind: Schema.Literal<"table">;
|
|
84
|
+
readonly rows: Schema.$Array<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
85
|
+
}>, Schema.Struct<{
|
|
86
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
87
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
88
|
+
readonly groups: Schema.$Array<Schema.Struct<{
|
|
89
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
90
|
+
readonly contradictionStatus: Schema.String;
|
|
91
|
+
/** The opaque id that a navigation request sends back; null when the source has none. */
|
|
92
|
+
readonly evidenceId: Schema.NullOr<Schema.String>;
|
|
93
|
+
readonly excerpt: Schema.String;
|
|
94
|
+
readonly matchClassification: Schema.String;
|
|
95
|
+
readonly navigation: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
96
|
+
readonly entityId: Schema.String;
|
|
97
|
+
readonly kind: Schema.Literal<"entity">;
|
|
98
|
+
}>, Schema.Struct<{
|
|
99
|
+
readonly fileId: Schema.String;
|
|
100
|
+
readonly kind: Schema.Literal<"file">;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly kind: Schema.Literal<"external_url">;
|
|
103
|
+
readonly url: Schema.String;
|
|
104
|
+
}>]>>;
|
|
105
|
+
readonly provenanceLabel: Schema.String;
|
|
106
|
+
readonly relevanceScore: Schema.Finite;
|
|
107
|
+
readonly title: Schema.String;
|
|
108
|
+
}>>;
|
|
109
|
+
readonly label: Schema.String;
|
|
110
|
+
readonly sourceKind: Schema.String;
|
|
111
|
+
}>>;
|
|
112
|
+
readonly kind: Schema.Literal<"sources">;
|
|
113
|
+
/** The sources that the tool found but the part leaves out. */
|
|
114
|
+
readonly omittedCount: Schema.Int;
|
|
115
|
+
}>, Schema.Struct<{
|
|
116
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
117
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
118
|
+
readonly kind: Schema.Literal<"links">;
|
|
119
|
+
readonly links: Schema.$Array<Schema.Struct<{
|
|
120
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
121
|
+
readonly label: Schema.String;
|
|
122
|
+
readonly url: Schema.String;
|
|
123
|
+
}>>;
|
|
124
|
+
}>, Schema.Struct<{
|
|
125
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
126
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
127
|
+
readonly kind: Schema.Literal<"summary">;
|
|
128
|
+
readonly text: Schema.String;
|
|
129
|
+
}>, Schema.Struct<{
|
|
130
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
131
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
132
|
+
readonly kind: Schema.Literal<"warnings">;
|
|
133
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
134
|
+
}>, Schema.Struct<{
|
|
135
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
136
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
137
|
+
readonly kind: Schema.Literal<"json">;
|
|
138
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
139
|
+
}>, Schema.Struct<{
|
|
140
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
141
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
142
|
+
readonly images: Schema.$Array<Schema.Struct<{
|
|
143
|
+
readonly alt: Schema.NullOr<Schema.String>;
|
|
144
|
+
readonly filename: Schema.String;
|
|
145
|
+
readonly mediaType: Schema.String;
|
|
146
|
+
readonly url: Schema.String;
|
|
147
|
+
}>>;
|
|
148
|
+
readonly kind: Schema.Literal<"image">;
|
|
149
|
+
}>]>;
|
|
150
|
+
export type Evidence = typeof EvidenceSchema.Type;
|
|
151
|
+
export type EvidenceKind = Evidence["kind"];
|
|
152
|
+
export type TableEvidence = typeof TableEvidenceSchema.Type;
|
|
153
|
+
export type SourcesEvidence = typeof SourcesEvidenceSchema.Type;
|
|
154
|
+
export type SourceNavigation = typeof SourceNavigationSchema.Type;
|
|
155
|
+
/** The `data-memory-evidence` Data Part: what the turn did with memories. */
|
|
156
|
+
declare const MemoryEvidenceSchema: Schema.Struct<{
|
|
157
|
+
readonly events: Schema.$Array<Schema.Struct<{
|
|
158
|
+
readonly category: Schema.NullOr<Schema.String>;
|
|
159
|
+
readonly kind: Schema.Literals<readonly ["retrieved", "selected", "used", "created", "suggested", "merged", "superseded", "rejected", "skipped"]>;
|
|
160
|
+
readonly lifecycleStatus: Schema.NullOr<Schema.String>;
|
|
161
|
+
readonly memoryId: Schema.NullOr<Schema.String>;
|
|
162
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
163
|
+
readonly scope: Schema.NullOr<Schema.String>;
|
|
164
|
+
}>>;
|
|
165
|
+
}>;
|
|
166
|
+
export type MemoryEvidence = typeof MemoryEvidenceSchema.Type;
|
|
167
|
+
/** The kinds of draft that a Dashboard assistant Conversation can point at. */
|
|
168
|
+
export declare const draftSubjectKinds: readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"];
|
|
169
|
+
/** The `data-draft-update` Data Part: new values for fields of one Dashboard draft. */
|
|
170
|
+
declare const DraftUpdateSchema: Schema.Struct<{
|
|
171
|
+
/** The changed fields of the draft, each with its new value. */
|
|
172
|
+
readonly changes: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
173
|
+
readonly subject: Schema.Struct<{
|
|
174
|
+
readonly id: Schema.String;
|
|
175
|
+
readonly kind: Schema.Literals<readonly ["skill_draft", "report_draft", "entity_schema_draft", "organization_identity", "workflow_working_copy"]>;
|
|
176
|
+
}>;
|
|
177
|
+
}>;
|
|
178
|
+
export type DraftUpdate = typeof DraftUpdateSchema.Type;
|
|
179
|
+
export type DraftSubjectKind = DraftUpdate["subject"]["kind"];
|
|
180
|
+
/**
|
|
181
|
+
* The `data-run-status` Data Part: names the turn that the chat follows next,
|
|
182
|
+
* either the next turn that the ending turn started, with its user message, or
|
|
183
|
+
* the turn that already runs when a chat send arrives.
|
|
184
|
+
*/
|
|
185
|
+
declare const RunStatusSchema: Schema.Union<readonly [Schema.Struct<{
|
|
186
|
+
readonly invocationId: Schema.String;
|
|
187
|
+
readonly kind: Schema.Literal<"next_turn">;
|
|
188
|
+
readonly userMessage: Schema.Struct<{
|
|
189
|
+
readonly id: Schema.String;
|
|
190
|
+
readonly text: Schema.String;
|
|
191
|
+
}>;
|
|
192
|
+
}>, Schema.Struct<{
|
|
193
|
+
readonly invocationId: Schema.String;
|
|
194
|
+
readonly kind: Schema.Literal<"running_turn">;
|
|
195
|
+
}>]>;
|
|
196
|
+
export type RunStatus = typeof RunStatusSchema.Type;
|
|
197
|
+
/**
|
|
198
|
+
* The `data-intent-card` Data Part (Q25): one Intent run that a
|
|
199
|
+
* `dispatch_intent` call or a Chat Launch started, with the state of its
|
|
200
|
+
* Dispatch Record. The stream sends the state that the dispatch answered;
|
|
201
|
+
* each transcript read joins the latest state, so a reload shows the
|
|
202
|
+
* Intent Result of a run that ended after the turn. `running` while the
|
|
203
|
+
* record holds no end, `ended` when the caller can no longer read it.
|
|
204
|
+
*/
|
|
205
|
+
declare const IntentCardSchema: Schema.Union<readonly [Schema.Struct<{
|
|
206
|
+
readonly dispatchId: Schema.String;
|
|
207
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
208
|
+
readonly fqn: Schema.String;
|
|
209
|
+
readonly state: Schema.Literal<"running">;
|
|
210
|
+
}>, Schema.Struct<{
|
|
211
|
+
readonly dispatchId: Schema.String;
|
|
212
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
213
|
+
readonly fqn: Schema.String;
|
|
214
|
+
readonly result: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
215
|
+
readonly state: Schema.Literal<"completed">;
|
|
216
|
+
}>, Schema.Struct<{
|
|
217
|
+
readonly dispatchId: Schema.String;
|
|
218
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
219
|
+
readonly fqn: Schema.String;
|
|
220
|
+
readonly reason: Schema.String;
|
|
221
|
+
readonly state: Schema.Literal<"failed">;
|
|
222
|
+
}>, Schema.Struct<{
|
|
223
|
+
readonly dispatchId: Schema.String;
|
|
224
|
+
readonly displayName: Schema.optionalKey<Schema.String>;
|
|
225
|
+
readonly fqn: Schema.String;
|
|
226
|
+
readonly state: Schema.Literal<"ended">;
|
|
227
|
+
}>]>;
|
|
228
|
+
export type IntentCardPart = typeof IntentCardSchema.Type;
|
|
229
|
+
/** The Data Parts of a CI message, by name without the `data-` prefix. */
|
|
230
|
+
export type CiDataParts = Readonly<{
|
|
231
|
+
"draft-update": DraftUpdate;
|
|
232
|
+
evidence: Evidence;
|
|
233
|
+
"intent-card": IntentCardPart;
|
|
234
|
+
"memory-evidence": MemoryEvidence;
|
|
235
|
+
"run-status": RunStatus;
|
|
236
|
+
}>;
|
|
237
|
+
/** The Data Part schemas, each an Effect schema and a Standard Schema. */
|
|
238
|
+
export type CiDataPartSchemas = Readonly<{
|
|
239
|
+
"draft-update": CiStandardSchema<typeof DraftUpdateSchema>;
|
|
240
|
+
evidence: CiStandardSchema<typeof EvidenceSchema>;
|
|
241
|
+
"intent-card": CiStandardSchema<typeof IntentCardSchema>;
|
|
242
|
+
"memory-evidence": CiStandardSchema<typeof MemoryEvidenceSchema>;
|
|
243
|
+
"run-status": CiStandardSchema<typeof RunStatusSchema>;
|
|
244
|
+
}>;
|
|
245
|
+
/** The Data Part schemas as Standard Schema, for `dataPartSchemas` of an AI SDK `Chat`. */
|
|
246
|
+
export declare const ciDataPartSchemas: CiDataPartSchemas;
|
|
247
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The eight failure codes of the External App client SDK (`ciErrorCodes`).
|
|
3
|
+
* Every AI transport reports a failure with one of them.
|
|
4
|
+
*/
|
|
5
|
+
export declare const aiErrorCodes: readonly ["unauthenticated", "forbidden", "not_found", "conflict", "invalid_request", "rate_limited", "unavailable", "internal"];
|
|
6
|
+
export type AiErrorCode = (typeof aiErrorCodes)[number];
|
|
7
|
+
/** A failed AI operation. `reason` is the machine reason of a refusal, for example `app_disabled`. */
|
|
8
|
+
export interface AiError {
|
|
9
|
+
readonly code: AiErrorCode;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
readonly reason?: string;
|
|
12
|
+
/** True when the same request can succeed later without a change. */
|
|
13
|
+
readonly retryable: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** The outcome of one AI operation: its value, or the typed failure. */
|
|
16
|
+
export type AiResult<Value> = Readonly<{
|
|
17
|
+
error: AiError;
|
|
18
|
+
ok: false;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
ok: true;
|
|
21
|
+
value: Value;
|
|
22
|
+
}>;
|
|
23
|
+
/** An {@link AiError} thrown where a result cannot be returned, such as inside a stream. */
|
|
24
|
+
export declare class AiFailureError extends Error {
|
|
25
|
+
readonly name = "AiFailureError";
|
|
26
|
+
readonly error: AiError;
|
|
27
|
+
constructor(error: AiError, options?: ErrorOptions);
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { ciDataPartSchemas, draftSubjectKinds } from "./data-parts.js";
|
|
2
|
+
export type { CiDataPartSchemas, CiDataParts, CiStandardSchema, DraftSubjectKind, DraftUpdate, Evidence, EvidenceKind, IntentCardPart, MemoryEvidence, RunStatus, SourceNavigation, SourcesEvidence, TableEvidence } from "./data-parts.js";
|
|
3
|
+
export type { AccessCheckAnswer, AccessTarget } from "./access.js";
|
|
4
|
+
export { contextTrailEntrySchema } from "./context-trail.js";
|
|
5
|
+
export type { ContextTrailEntry, PageVisit, TrailEvent, TrailEventPush, TrailMetadata, TrailMetadataData } from "./context-trail.js";
|
|
6
|
+
export { AiFailureError, aiErrorCodes } from "./errors.js";
|
|
7
|
+
export type { AiError, AiErrorCode, AiResult } from "./errors.js";
|
|
8
|
+
export type { IntentCatalogEntry, IntentDispatchEnd, IntentDispatchOutcome, IntentDispatchRecordState, IntentFieldProblem, IntentHandle, IntentResult, IntentResultTarget, IntentReturnPage, JsonObject, JsonValue, PreparedTurn } from "./intents.js";
|
|
9
|
+
export { ciAskUserSchemas, ciAskUserToolName, ciMessageMetadataSchema } from "./message.js";
|
|
10
|
+
export type { CiAnswerSentiment, CiAskUserInput, CiAskUserOutput, CiAskUserSchemas, CiMessageMetadata, CiTools, CiTurnOptions, CiUIMessage } from "./message.js";
|
|
11
|
+
export { placeKinds } from "./place.js";
|
|
12
|
+
export type { Place, PlaceKind } from "./place.js";
|
|
13
|
+
export { asRuntimeValue, hasBigIntRuntimeKind, hasBooleanRuntimeKind, hasFunctionRuntimeKind, hasNullRuntimeKind, hasNumberRuntimeKind, hasObjectRuntimeKind, hasStringRuntimeKind, hasSymbolRuntimeKind, hasUndefinedRuntimeKind, isNullish, requireValue } from "./runtime-value.js";
|
|
14
|
+
export type { RuntimeRecord, RuntimeValue } from "./runtime-value.js";
|