@openlegion/platform 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +1189 -2
- package/dist/body.d.ts +9 -0
- package/dist/body.js +28 -0
- package/dist/chat-history.d.ts +53 -0
- package/dist/chat-history.js +11 -0
- package/dist/client.d.ts +217 -0
- package/dist/client.js +367 -0
- package/dist/core.d.ts +47 -0
- package/dist/core.js +1 -0
- package/dist/crypto.d.ts +25 -0
- package/dist/crypto.js +81 -0
- package/dist/errors.d.ts +111 -0
- package/dist/errors.js +134 -0
- package/dist/events.d.ts +131 -0
- package/dist/events.js +5 -0
- package/dist/generated/api.d.ts +5505 -0
- package/dist/generated/api.js +446 -0
- package/dist/handler.d.ts +201 -0
- package/dist/handler.js +682 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +12 -0
- package/dist/kit-agents.d.ts +95 -0
- package/dist/kit-agents.js +280 -0
- package/dist/kit-codes.d.ts +279 -0
- package/dist/kit-codes.js +44 -0
- package/dist/kit-connections.d.ts +21 -0
- package/dist/kit-connections.js +189 -0
- package/dist/kit-files.d.ts +8 -0
- package/dist/kit-files.js +117 -0
- package/dist/kit-model-keys.d.ts +8 -0
- package/dist/kit-model-keys.js +86 -0
- package/dist/kit-threads.d.ts +3 -0
- package/dist/kit-threads.js +92 -0
- package/dist/kit-tools.d.ts +21 -0
- package/dist/kit-tools.js +47 -0
- package/dist/kit.d.ts +130 -0
- package/dist/kit.js +155 -0
- package/dist/mcp-server.d.ts +27 -0
- package/dist/mcp-server.js +166 -0
- package/dist/next.d.ts +24 -0
- package/dist/next.js +6 -0
- package/dist/ol-signed.d.ts +82 -0
- package/dist/ol-signed.js +115 -0
- package/dist/react/add-server.d.ts +90 -0
- package/dist/react/add-server.js +183 -0
- package/dist/react/agent-chat.d.ts +925 -0
- package/dist/react/agent-chat.js +1917 -0
- package/dist/react/agent-editor.d.ts +133 -0
- package/dist/react/agent-editor.js +222 -0
- package/dist/react/agent-kit.d.ts +160 -0
- package/dist/react/agent-kit.js +279 -0
- package/dist/react/agent-list.d.ts +247 -0
- package/dist/react/agent-list.js +248 -0
- package/dist/react/approval-card.d.ts +272 -0
- package/dist/react/approval-card.js +372 -0
- package/dist/react/artifact-card.d.ts +38 -0
- package/dist/react/artifact-card.js +39 -0
- package/dist/react/avatar.d.ts +21 -0
- package/dist/react/avatar.js +33 -0
- package/dist/react/card-ledger.d.ts +30 -0
- package/dist/react/card-ledger.js +49 -0
- package/dist/react/chat-timing.d.ts +121 -0
- package/dist/react/chat-timing.js +229 -0
- package/dist/react/computer-view.d.ts +309 -0
- package/dist/react/computer-view.js +543 -0
- package/dist/react/computer-viewer.d.ts +175 -0
- package/dist/react/computer-viewer.js +555 -0
- package/dist/react/computer-wire.d.ts +178 -0
- package/dist/react/computer-wire.js +244 -0
- package/dist/react/connect-button.d.ts +145 -0
- package/dist/react/connect-button.js +212 -0
- package/dist/react/connection-request.d.ts +16 -0
- package/dist/react/connection-request.js +18 -0
- package/dist/react/connections-list.d.ts +90 -0
- package/dist/react/connections-list.js +76 -0
- package/dist/react/errors.d.ts +250 -0
- package/dist/react/errors.js +146 -0
- package/dist/react/files.d.ts +41 -0
- package/dist/react/files.js +78 -0
- package/dist/react/index.d.ts +35 -0
- package/dist/react/index.js +26 -0
- package/dist/react/limit-words.d.ts +80 -0
- package/dist/react/limit-words.js +53 -0
- package/dist/react/markdown.d.ts +42 -0
- package/dist/react/markdown.js +56 -0
- package/dist/react/md-parse.d.ts +106 -0
- package/dist/react/md-parse.js +638 -0
- package/dist/react/model-keys-card.d.ts +94 -0
- package/dist/react/model-keys-card.js +123 -0
- package/dist/react/reload.d.ts +211 -0
- package/dist/react/reload.js +339 -0
- package/dist/react/reveal.d.ts +17 -0
- package/dist/react/reveal.js +22 -0
- package/dist/react/schedule-editor.d.ts +107 -0
- package/dist/react/schedule-editor.js +172 -0
- package/dist/react/schedule-time.d.ts +66 -0
- package/dist/react/schedule-time.js +90 -0
- package/dist/react/styles.css +1274 -0
- package/dist/react/transport.d.ts +49 -0
- package/dist/react/transport.js +380 -0
- package/dist/react/use-connections.d.ts +155 -0
- package/dist/react/use-connections.js +231 -0
- package/dist/react/use-model-keys.d.ts +47 -0
- package/dist/react/use-model-keys.js +57 -0
- package/dist/react/use-threads.d.ts +63 -0
- package/dist/react/use-threads.js +73 -0
- package/dist/react/vault-form.d.ts +92 -0
- package/dist/react/vault-form.js +151 -0
- package/dist/schema.d.ts +47 -0
- package/dist/schema.js +16 -0
- package/dist/secrets.d.ts +15 -0
- package/dist/secrets.js +18 -0
- package/dist/stream.d.ts +129 -0
- package/dist/stream.js +192 -0
- package/dist/testing.d.ts +33 -0
- package/dist/testing.js +40 -0
- package/dist/webhooks.d.ts +31 -0
- package/dist/webhooks.js +72 -0
- package/package.json +85 -3
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT AN END USER IS TOLD. `agentChatErrorText` is the only path from an error to the page: a refusal's
|
|
3
|
+
* own message (written to be shown), or one of OUR sentences. A server's message, a stack,
|
|
4
|
+
* a stream's `errorText`: never. Those go to `onError`, for the builder's logs.
|
|
5
|
+
*/
|
|
6
|
+
import { type KitLimit, type LimitLabelsInput } from "./limit-words.ts";
|
|
7
|
+
import type { QueuedReason } from "../stream.ts";
|
|
8
|
+
/** Every string `<AgentChat>` shows. Pass any of them to translate it, or to say it in your product's voice. */
|
|
9
|
+
export interface AgentChatLabels {
|
|
10
|
+
you: string;
|
|
11
|
+
agent: string;
|
|
12
|
+
/** The message box's accessible name. */
|
|
13
|
+
input: string;
|
|
14
|
+
placeholder: string;
|
|
15
|
+
send: string;
|
|
16
|
+
/** While the message waits to start, when there is no sentence for its reason (`queuedReasons`). */
|
|
17
|
+
queued: string;
|
|
18
|
+
/**
|
|
19
|
+
* While the message waits to start, by why it waits (`thread_busy`, `agent_busy`, `workspace_busy`,
|
|
20
|
+
* `agent_paused`, `credit_wait`). A reason you leave out shows your `queued` if you set one, else ours.
|
|
21
|
+
*/
|
|
22
|
+
queuedReasons?: Partial<Record<QueuedReason, string>>;
|
|
23
|
+
/** While a reply is on its way and has no words yet (a status line). */
|
|
24
|
+
thinking: string;
|
|
25
|
+
/** The transcript with no messages yet. */
|
|
26
|
+
empty: string;
|
|
27
|
+
reconnect: string;
|
|
28
|
+
/** The button that stops the reply, while the agent works. */
|
|
29
|
+
stop: string;
|
|
30
|
+
/** From the tap on Stop until the run ends (it lets the model call in flight finish): where "Stopped." then goes. */
|
|
31
|
+
stopping: string;
|
|
32
|
+
/** After a reply was stopped. */
|
|
33
|
+
stopped: string;
|
|
34
|
+
/** The quiet line above a reply a schedule started (the history's `trigger`). */
|
|
35
|
+
fromSchedule: string;
|
|
36
|
+
/**
|
|
37
|
+
* Under a reply that ran on the agent's usual model instead of the one the person chose (the stream's
|
|
38
|
+
* `data-model-note`): used only when the platform's part carries no sentence. `modelNotes` comes first.
|
|
39
|
+
*/
|
|
40
|
+
modelNote: string;
|
|
41
|
+
/** At the top of the transcript while it reads older messages (the person scrolled up to the top). */
|
|
42
|
+
earlierLoading: string;
|
|
43
|
+
/** At the top of the transcript once there are no older messages: said once. */
|
|
44
|
+
earlierStart: string;
|
|
45
|
+
/** At the top of the transcript when older messages could not be read, beside `earlierRetry`. */
|
|
46
|
+
earlierFailed: string;
|
|
47
|
+
/** The button that reads them again. */
|
|
48
|
+
earlierRetry: string;
|
|
49
|
+
/** The button at the top that reads older messages, where the transcript does not scroll in its own box (no stylesheet). */
|
|
50
|
+
earlierShow: string;
|
|
51
|
+
/** A reply that could not be stopped: it carries on, and so can the person. */
|
|
52
|
+
stopFailed: string;
|
|
53
|
+
/** `{tool}` is replaced by the tool's label: yours (`tools`), else its name in words (`refund_order` → "Refund order"). */
|
|
54
|
+
toolCalling: string;
|
|
55
|
+
toolDone: string;
|
|
56
|
+
/**
|
|
57
|
+
* A call that did not work, in a reply that failed, and came with no sentence. The platform's stream sends one,
|
|
58
|
+
* which is shown instead.
|
|
59
|
+
*/
|
|
60
|
+
toolFailed: string;
|
|
61
|
+
/**
|
|
62
|
+
* A call that did not work (refused, or failed) in a reply that went on: a quiet step, not an alarm. One of
|
|
63
|
+
* OpenLegion's own tools has its own words ("Couldn't open a page").
|
|
64
|
+
*/
|
|
65
|
+
toolSkipped: string;
|
|
66
|
+
toolDenied: string;
|
|
67
|
+
/** A call waiting for a person's approval. */
|
|
68
|
+
toolWaiting: string;
|
|
69
|
+
/** A call whose approval card is further down: the agent asked for the same thing again, and the card is there. */
|
|
70
|
+
toolApprovalBelow: string;
|
|
71
|
+
/**
|
|
72
|
+
* Right above the message box, while an approval card the person can decide is out of sight (the reply went on
|
|
73
|
+
* under it): one card, then two or more (`{count}`). `approvalReview` is its button, which brings the card into view.
|
|
74
|
+
*/
|
|
75
|
+
approvalBar: string;
|
|
76
|
+
approvalBarMany: string;
|
|
77
|
+
/** Said (not shown) when a card turns up waiting for the person: `{title}` is the card's. */
|
|
78
|
+
approvalAnnounce: string;
|
|
79
|
+
approvalReview: string;
|
|
80
|
+
/** The approval card, in place of a held call: its buttons, and what it shows once decided. */
|
|
81
|
+
approve: string;
|
|
82
|
+
reject: string;
|
|
83
|
+
approved: string;
|
|
84
|
+
rejected: string;
|
|
85
|
+
/** A card already decided when it was drawn (after a reload): what it shows in place of the buttons. */
|
|
86
|
+
wasApproved: string;
|
|
87
|
+
wasRejected: string;
|
|
88
|
+
/** From the tap until the platform answers: in place of the card's buttons. */
|
|
89
|
+
approving: string;
|
|
90
|
+
rejecting: string;
|
|
91
|
+
/**
|
|
92
|
+
* An approved action that then did not work (it failed, was refused, or its outcome is unknown), when the platform
|
|
93
|
+
* gives no sentence for the person. With one, the card says `actionFailedWith`.
|
|
94
|
+
*/
|
|
95
|
+
actionFailed: string;
|
|
96
|
+
/**
|
|
97
|
+
* An approved action that then did not work, with the platform's sentence for the person in `{message}`:
|
|
98
|
+
* "Approved. The connected service could not be reached." The sentence says what went wrong, so this says only
|
|
99
|
+
* that it was approved.
|
|
100
|
+
*/
|
|
101
|
+
actionFailedWith: string;
|
|
102
|
+
approvalExpired: string;
|
|
103
|
+
/** The request changed after the card was drawn: the card is read again. */
|
|
104
|
+
approvalChanged: string;
|
|
105
|
+
/** On the approval card: what opens the facts after the first two, and what closes them again. */
|
|
106
|
+
details: string;
|
|
107
|
+
hideDetails: string;
|
|
108
|
+
/** Under a long value on the approval card, clamped to its first lines: what opens it in place, and closes it again. */
|
|
109
|
+
showAll: string;
|
|
110
|
+
showLess: string;
|
|
111
|
+
/**
|
|
112
|
+
* Before the approval card's buttons, for a value longer than the card shows (over 20,000 characters): `{field}` is
|
|
113
|
+
* the fact's label, `{shown}` how many characters the card holds.
|
|
114
|
+
*/
|
|
115
|
+
approvalValueCut: string;
|
|
116
|
+
/** On the approval card, read before a value a web page wrote (drawn in quotes), and not drawn. */
|
|
117
|
+
pageWords: string;
|
|
118
|
+
/**
|
|
119
|
+
* On a browser act's card while the person holds control of that browser in a view open here: Approve is held back
|
|
120
|
+
* (disabled, this line is its description) until they give control back, since the act cannot run while they hold
|
|
121
|
+
* it. Optional.
|
|
122
|
+
*/
|
|
123
|
+
approveHeldBack?: string;
|
|
124
|
+
/** A finished reply's steps, as the one line that opens to the list. `{count}` is how many (two or more). */
|
|
125
|
+
steps: string;
|
|
126
|
+
/** In place of the buttons, for a person who may not decide (only an owner or admin may): at once, or after they tried. */
|
|
127
|
+
approvalNotAllowed: string;
|
|
128
|
+
/** In place of the card, when it could not be read. A Retry button (`retry`) follows it. */
|
|
129
|
+
approvalUnavailable: string;
|
|
130
|
+
/** The button that tries again: an approval card that could not be read. */
|
|
131
|
+
retry: string;
|
|
132
|
+
/** Under a person's message that was refused or did not go: its words are kept. */
|
|
133
|
+
notSent: string;
|
|
134
|
+
/** The button beside `notSent` that sends the same message again. */
|
|
135
|
+
sendAgain: string;
|
|
136
|
+
/**
|
|
137
|
+
* The message `<AgentChat>` sends for the person after `<VaultSecretForm>` saves, so the agent carries
|
|
138
|
+
* on. It has no slot, and nothing is put in it: this message runs with the person's own trust, so it never carries
|
|
139
|
+
* words the agent wrote (the form's label, the handle). Which item was saved is data (`onVaultSaved(handle, request)`).
|
|
140
|
+
*/
|
|
141
|
+
vaultSaved: string;
|
|
142
|
+
/** The button that picks files to send with the message (at most 5, each at most 4 MB). */
|
|
143
|
+
attach: string;
|
|
144
|
+
/** While a picked file uploads. */
|
|
145
|
+
uploading: string;
|
|
146
|
+
/** A send asked while a file still uploads: it goes when the upload ends (Escape lets it go). */
|
|
147
|
+
sendWhenUploaded: string;
|
|
148
|
+
/** The accessible name of the button that takes a picked file off the message. `{file}` is replaced by its name. */
|
|
149
|
+
removeFile: string;
|
|
150
|
+
fileTooLarge: string;
|
|
151
|
+
uploadFailed: string;
|
|
152
|
+
/** The workspace has uploaded its 500 files for the day. */
|
|
153
|
+
uploadLimit: string;
|
|
154
|
+
/** The heading over the files the agent delivered in this conversation. */
|
|
155
|
+
files: string;
|
|
156
|
+
/** Beside a delivered file the agent wrote after reading untrusted content. */
|
|
157
|
+
fileUntrusted: string;
|
|
158
|
+
/** On a delivered file's card: the button that shows a PDF or a text file in place, and the one that hides it. */
|
|
159
|
+
preview: string;
|
|
160
|
+
hidePreview: string;
|
|
161
|
+
/** While a text file's words are read. */
|
|
162
|
+
previewLoading: string;
|
|
163
|
+
/** A preview that can't be shown: the download link is beside it. */
|
|
164
|
+
previewFailed: string;
|
|
165
|
+
signIn: string;
|
|
166
|
+
unavailable: string;
|
|
167
|
+
rateLimited: string;
|
|
168
|
+
interrupted: string;
|
|
169
|
+
generic: string;
|
|
170
|
+
/**
|
|
171
|
+
* Your words for a refusal, by its code (`cap_reached`, `credits_exhausted`, `workspace_suspended`,
|
|
172
|
+
* `workspace_archived`, `agent_paused`, `run_budget_exhausted`, …), in place of OpenLegion's end-user
|
|
173
|
+
* sentence: for a refused message and for a reply stopped mid-stream. A code you leave out keeps ours.
|
|
174
|
+
*/
|
|
175
|
+
refusals?: Partial<Record<string, string>>;
|
|
176
|
+
/**
|
|
177
|
+
* Your words for a refusal under a card the person approved when no run could follow it (decide's `run_refused`),
|
|
178
|
+
* by its code, read before `refusals`. A refused message is dropped and has to be sent again; a decision is kept,
|
|
179
|
+
* and the agent acts on it once it can run. Ours covers `agent_paused` only (`DEFAULT_DECISION_REFUSALS`), so
|
|
180
|
+
* `refusals.agent_paused` is never shown there. Any other code you leave out reads as a refused message's.
|
|
181
|
+
*/
|
|
182
|
+
decisionRefusals?: Partial<Record<string, string>>;
|
|
183
|
+
/**
|
|
184
|
+
* Your words for the note under a reply that ran on the agent's usual model, by its reason (`run_budget`: the
|
|
185
|
+
* run's budget couldn't cover the model the person chose), in place of the platform's sentence. A reason you
|
|
186
|
+
* leave out keeps the platform's.
|
|
187
|
+
*/
|
|
188
|
+
modelNotes?: Partial<Record<string, string>>;
|
|
189
|
+
/**
|
|
190
|
+
* RUN16 (A): the words for a spending limit that refused a message (`cap_reached` with its `limit`), in the
|
|
191
|
+
* person's own time zone: "You've used today's limit. It resets at 7:00 PM." Any of them; the rest stay ours.
|
|
192
|
+
* `raise` is your link under it ("You can raise your limit in Settings."), only if you give it.
|
|
193
|
+
* `refusals.cap_reached`, when given, replaces the whole sentence.
|
|
194
|
+
*/
|
|
195
|
+
limits?: LimitLabelsInput;
|
|
196
|
+
/**
|
|
197
|
+
* Your words for a tool, by its name: your tool's own (`refund_order`) or a built-in's (`web_search`). A string
|
|
198
|
+
* is its label, in your `toolCalling`/`toolDone`/… sentences ("Done: Email you"). `{ running, done }` is its two
|
|
199
|
+
* lines as they read ("Emailing you", then "Emailed you"); the running words are its label in the other
|
|
200
|
+
* sentences (waiting for approval, did not work). A tool you leave out shows its name in words.
|
|
201
|
+
*/
|
|
202
|
+
tools?: Partial<Record<string, string | ToolWords>>;
|
|
203
|
+
}
|
|
204
|
+
/** A tool's two lines, as they read: while it runs, and once it is done (`labels.tools`). */
|
|
205
|
+
export interface ToolWords {
|
|
206
|
+
running: string;
|
|
207
|
+
done: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Our words under a card approved while no run could follow it, by the refusal's code (`labels.decisionRefusals`
|
|
211
|
+
* comes first). One code only: what a paused agent does with a kept decision.
|
|
212
|
+
*/
|
|
213
|
+
export declare const DEFAULT_DECISION_REFUSALS: Readonly<Partial<Record<string, string>>>;
|
|
214
|
+
/** The words under an approved card for this refusal code: yours, else ours, else undefined (read as a refused send's). */
|
|
215
|
+
export declare function decisionRefusalWords(code: string, labels: Pick<AgentChatLabels, "decisionRefusals">): string | undefined;
|
|
216
|
+
export declare const DEFAULT_LABELS: AgentChatLabels;
|
|
217
|
+
/** A failure of the chat transport, typed. `message` is for your logs; the page shows `agentChatErrorText`. */
|
|
218
|
+
export declare class AgentChatError extends Error {
|
|
219
|
+
name: string;
|
|
220
|
+
readonly code: string;
|
|
221
|
+
/** The HTTP status, when a response said it. */
|
|
222
|
+
readonly status: number | null;
|
|
223
|
+
/** The error envelope's `type` (`refusal`, `rate_limit_error`, …), when it had one. */
|
|
224
|
+
readonly type: string | null;
|
|
225
|
+
/** The run a stream was following when it was cut: Reconnect replays it. */
|
|
226
|
+
readonly run: string | null;
|
|
227
|
+
/** Only a refusal's message: the one server text that is written for an end user. */
|
|
228
|
+
readonly displayMessage: string | null;
|
|
229
|
+
/** A cap refusal's limit (RUN16 (A)): which, why, when it resets. Null for any other error. */
|
|
230
|
+
readonly limit: KitLimit | null;
|
|
231
|
+
constructor(code: string, message: string, opts?: {
|
|
232
|
+
status?: number | null;
|
|
233
|
+
type?: string | null;
|
|
234
|
+
run?: string | null;
|
|
235
|
+
displayMessage?: string | null;
|
|
236
|
+
limit?: KitLimit | null;
|
|
237
|
+
cause?: unknown;
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/** True for the cut that Reconnect is for. */
|
|
241
|
+
export declare function isInterrupted(err: unknown): err is AgentChatError;
|
|
242
|
+
/** The words when an attach fails: too large (413), the workspace's daily limit (429), else a plain failure. */
|
|
243
|
+
export declare function attachErrorText(err: unknown, l: AgentChatLabels): string;
|
|
244
|
+
/** The words for an error: a refusal's own message, or ours. Never `err.message`. */
|
|
245
|
+
/**
|
|
246
|
+
* The line `<AgentChat>` shows while a message waits to start: your sentence for its reason, else your
|
|
247
|
+
* `queued`, else ours for the reason, else our `queued` (a server too old to say why sends no reason).
|
|
248
|
+
*/
|
|
249
|
+
export declare function queuedText(reason: QueuedReason | null, labels?: Partial<AgentChatLabels>): string;
|
|
250
|
+
export declare function agentChatErrorText(err: unknown, labels?: Partial<AgentChatLabels>): string;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { refusalWords } from "./limit-words.js";
|
|
2
|
+
export const DEFAULT_DECISION_REFUSALS = {
|
|
3
|
+
agent_paused: "This agent is paused. It will act on this when you resume it.",
|
|
4
|
+
};
|
|
5
|
+
export function decisionRefusalWords(code, labels) {
|
|
6
|
+
return labels.decisionRefusals?.[code] ?? DEFAULT_DECISION_REFUSALS[code];
|
|
7
|
+
}
|
|
8
|
+
export const DEFAULT_LABELS = {
|
|
9
|
+
you: "You",
|
|
10
|
+
agent: "Agent",
|
|
11
|
+
input: "Message",
|
|
12
|
+
placeholder: "Message the agent",
|
|
13
|
+
send: "Send",
|
|
14
|
+
queued: "Waiting for the agent to finish its current task",
|
|
15
|
+
queuedReasons: {
|
|
16
|
+
thread_busy: "Your message will be answered after the current reply.",
|
|
17
|
+
agent_busy: "The agent is busy. Your message will start shortly.",
|
|
18
|
+
workspace_busy: "Your message is waiting to start. It will begin shortly.",
|
|
19
|
+
credit_wait: "Your message is waiting to start. It will begin shortly.",
|
|
20
|
+
agent_paused: "This agent is paused. Your message will be answered when it resumes.",
|
|
21
|
+
},
|
|
22
|
+
thinking: "Thinking…",
|
|
23
|
+
empty: "No messages yet. Send one to start.",
|
|
24
|
+
reconnect: "Reconnect",
|
|
25
|
+
stop: "Stop",
|
|
26
|
+
stopping: "Stopping…",
|
|
27
|
+
stopped: "Stopped.",
|
|
28
|
+
fromSchedule: "From your schedule",
|
|
29
|
+
modelNote: "This reply used your agent's usual model. The budget for this run couldn't cover the one you chose.",
|
|
30
|
+
earlierLoading: "Loading earlier messages…",
|
|
31
|
+
earlierStart: "This is the start of the conversation.",
|
|
32
|
+
earlierFailed: "Earlier messages didn't load.",
|
|
33
|
+
earlierRetry: "Try again",
|
|
34
|
+
earlierShow: "Show earlier messages",
|
|
35
|
+
stopFailed: "This reply can't be stopped yet. Your next message will be answered after it.",
|
|
36
|
+
toolCalling: "Working on: {tool}",
|
|
37
|
+
toolDone: "Done: {tool}",
|
|
38
|
+
toolFailed: "{tool} did not work",
|
|
39
|
+
toolSkipped: "Couldn't finish: {tool}",
|
|
40
|
+
toolDenied: "Not allowed: {tool}",
|
|
41
|
+
toolWaiting: "Waiting for approval: {tool}",
|
|
42
|
+
toolApprovalBelow: "Asked again in a later reply: {tool}",
|
|
43
|
+
approvalBar: "Waiting for your OK",
|
|
44
|
+
approvalBarMany: "{count} waiting for your OK",
|
|
45
|
+
approvalAnnounce: "Waiting for your OK: {title}",
|
|
46
|
+
approvalReview: "Review",
|
|
47
|
+
approve: "Approve",
|
|
48
|
+
reject: "Reject",
|
|
49
|
+
approved: "Approved. The agent carries on.",
|
|
50
|
+
rejected: "Rejected. The agent won't do this.",
|
|
51
|
+
wasApproved: "Approved.",
|
|
52
|
+
wasRejected: "Rejected.",
|
|
53
|
+
approving: "Approving…",
|
|
54
|
+
rejecting: "Rejecting…",
|
|
55
|
+
actionFailed: "Approved, but it didn't work.",
|
|
56
|
+
actionFailedWith: "Approved. {message}",
|
|
57
|
+
approvalExpired: "This request expired, so it didn't run.",
|
|
58
|
+
approvalChanged: "This request changed. Look at it again.",
|
|
59
|
+
details: "Details",
|
|
60
|
+
hideDetails: "Hide details",
|
|
61
|
+
showAll: "Show all",
|
|
62
|
+
showLess: "Show less",
|
|
63
|
+
approvalValueCut: "{field} is longer than the card shows: you see its first {shown} characters, and Approve allows all of it.",
|
|
64
|
+
pageWords: "The page's words",
|
|
65
|
+
approveHeldBack: "You have control of this browser. Give control back first, then approve.",
|
|
66
|
+
steps: "{count} steps",
|
|
67
|
+
approvalNotAllowed: "Waiting for an admin to decide this.",
|
|
68
|
+
approvalUnavailable: "This request couldn't be loaded.",
|
|
69
|
+
retry: "Try again",
|
|
70
|
+
notSent: "Not sent.",
|
|
71
|
+
sendAgain: "Send again",
|
|
72
|
+
vaultSaved: "I saved it.",
|
|
73
|
+
attach: "Attach",
|
|
74
|
+
uploading: "Uploading…",
|
|
75
|
+
sendWhenUploaded: "Sending when the upload finishes…",
|
|
76
|
+
removeFile: "Remove {file}",
|
|
77
|
+
fileTooLarge: "A file can be at most 4 MB.",
|
|
78
|
+
uploadFailed: "That file didn't upload. Try again.",
|
|
79
|
+
uploadLimit: "Today's limit for attachments is reached. Try again tomorrow.",
|
|
80
|
+
files: "Files",
|
|
81
|
+
fileUntrusted: "Made after reading content from outside. Check it before you rely on it.",
|
|
82
|
+
preview: "Preview",
|
|
83
|
+
hidePreview: "Hide preview",
|
|
84
|
+
previewLoading: "Loading preview…",
|
|
85
|
+
previewFailed: "This file can't be previewed here. Download it instead.",
|
|
86
|
+
signIn: "Sign in to chat.",
|
|
87
|
+
unavailable: "The agent isn't available right now. Try again in a moment.",
|
|
88
|
+
rateLimited: "Too many messages. Wait a moment.",
|
|
89
|
+
interrupted: "The reply was interrupted.",
|
|
90
|
+
generic: "Something went wrong. Please try again.",
|
|
91
|
+
};
|
|
92
|
+
export class AgentChatError extends Error {
|
|
93
|
+
name = "AgentChatError";
|
|
94
|
+
code;
|
|
95
|
+
status;
|
|
96
|
+
type;
|
|
97
|
+
run;
|
|
98
|
+
displayMessage;
|
|
99
|
+
limit;
|
|
100
|
+
constructor(code, message, opts = {}) {
|
|
101
|
+
super(message, opts.cause === undefined ? undefined : { cause: opts.cause });
|
|
102
|
+
this.code = code;
|
|
103
|
+
this.status = opts.status ?? null;
|
|
104
|
+
this.type = opts.type ?? null;
|
|
105
|
+
this.run = opts.run ?? null;
|
|
106
|
+
this.displayMessage = opts.displayMessage ?? null;
|
|
107
|
+
this.limit = opts.limit ?? null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export function isInterrupted(err) {
|
|
111
|
+
return err instanceof AgentChatError && err.code === "stream_interrupted";
|
|
112
|
+
}
|
|
113
|
+
export function attachErrorText(err, l) {
|
|
114
|
+
const status = err?.status;
|
|
115
|
+
return status === 413 ? l.fileTooLarge : status === 429 ? l.uploadLimit : l.uploadFailed;
|
|
116
|
+
}
|
|
117
|
+
export function queuedText(reason, labels = {}) {
|
|
118
|
+
const yours = reason ? labels.queuedReasons?.[reason] : undefined;
|
|
119
|
+
if (yours)
|
|
120
|
+
return yours;
|
|
121
|
+
if (labels.queued)
|
|
122
|
+
return labels.queued;
|
|
123
|
+
return (reason ? DEFAULT_LABELS.queuedReasons?.[reason] : undefined) ?? DEFAULT_LABELS.queued;
|
|
124
|
+
}
|
|
125
|
+
export function agentChatErrorText(err, labels = {}) {
|
|
126
|
+
const l = { ...DEFAULT_LABELS, ...labels };
|
|
127
|
+
if (err instanceof AgentChatError) {
|
|
128
|
+
if (err.type === "refusal") {
|
|
129
|
+
const text = refusalWords({ code: err.code, message: err.displayMessage, limit: err.limit }, l, true);
|
|
130
|
+
if (text)
|
|
131
|
+
return text.slice(0, 500);
|
|
132
|
+
}
|
|
133
|
+
if (err.code === "stream_interrupted")
|
|
134
|
+
return l.interrupted;
|
|
135
|
+
if (err.code === "unauthorized" || err.status === 401)
|
|
136
|
+
return l.signIn;
|
|
137
|
+
if (err.code === "rate_limit_error" || err.code === "rate_limited" || err.type === "rate_limit_error" || err.status === 429)
|
|
138
|
+
return l.rateLimited;
|
|
139
|
+
if (err.code === "network" || err.code === "agent_unavailable" || (err.status ?? 0) >= 500)
|
|
140
|
+
return l.unavailable;
|
|
141
|
+
return l.generic;
|
|
142
|
+
}
|
|
143
|
+
if (err instanceof TypeError && /fetch|network/i.test(err.message))
|
|
144
|
+
return l.unavailable;
|
|
145
|
+
return l.generic;
|
|
146
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** The most a file may be, and how many one message may carry: the API's own limits. */
|
|
2
|
+
export declare const MAX_ATTACHMENT_BYTES: number;
|
|
3
|
+
export declare const MAX_ATTACHMENTS = 5;
|
|
4
|
+
/** What the file picker offers: the API's nine types, plus the text extensions a browser may not type. */
|
|
5
|
+
export declare const ATTACHMENT_ACCEPT = "image/png,image/jpeg,image/webp,image/gif,application/pdf,text/plain,text/markdown,text/csv,application/json,.md,.csv,.txt,.json";
|
|
6
|
+
/** A file the person attached: what its chip shows, and the id the message carries. */
|
|
7
|
+
export interface KitFile {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
mime: string;
|
|
11
|
+
size_bytes: number;
|
|
12
|
+
}
|
|
13
|
+
/** A file the agent delivered in this conversation. `tainted`: it read untrusted content before it wrote this. */
|
|
14
|
+
export interface KitArtifact extends KitFile {
|
|
15
|
+
/** When it was delivered (RFC 3339). */
|
|
16
|
+
created: string;
|
|
17
|
+
tainted: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** A file the agent delivered, as the part where it delivered it says: what its card shows. */
|
|
20
|
+
export interface KitArtifactRef extends KitFile {
|
|
21
|
+
tainted: boolean;
|
|
22
|
+
}
|
|
23
|
+
type Fetch = typeof fetch;
|
|
24
|
+
/** The files a person's message carries (its `data-attachments` part), else []. */
|
|
25
|
+
export declare function attachmentsOf(data: unknown): KitFile[];
|
|
26
|
+
/** Upload one file for this thread. A file over 4 MB is refused here, before any upload. */
|
|
27
|
+
export declare function uploadKitFile(base: string, thread: string, file: Blob & {
|
|
28
|
+
name: string;
|
|
29
|
+
}, doFetch?: Fetch): Promise<KitFile>;
|
|
30
|
+
/** What the agent delivered in this thread, newest first. A read that fails answers null (the list stays as it was). */
|
|
31
|
+
export declare function listKitArtifacts(base: string, thread: string, doFetch?: Fetch): Promise<KitArtifact[] | null>;
|
|
32
|
+
/** The file a `data-artifact` part names, else null. A taint it does not say counts as tainted. Nothing else of the part is kept. */
|
|
33
|
+
export declare function artifactOf(data: unknown): KitArtifactRef | null;
|
|
34
|
+
/** A file's size in words: "12 KB", "1.4 MB". */
|
|
35
|
+
export declare function sizeText(bytes: number): string;
|
|
36
|
+
/** The kit route that answers a delivered text file's words. */
|
|
37
|
+
export declare function artifactTextHref(base: string, thread: string, id: string): string;
|
|
38
|
+
/** A delivered Markdown or plain-text file's words (at most 256 KB), for its preview; null when they can't be read. Never throws. */
|
|
39
|
+
export declare function readKitArtifactText(base: string, thread: string, id: string, doFetch?: Fetch): Promise<string | null>;
|
|
40
|
+
export declare function artifactDownloadHref(base: string, thread: string, id: string): string;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { AgentChatError } from "./errors.js";
|
|
2
|
+
export const MAX_ATTACHMENT_BYTES = 4 * 1024 * 1024;
|
|
3
|
+
export const MAX_ATTACHMENTS = 5;
|
|
4
|
+
export const ATTACHMENT_ACCEPT = "image/png,image/jpeg,image/webp,image/gif,application/pdf,text/plain,text/markdown,text/csv,application/json,.md,.csv,.txt,.json";
|
|
5
|
+
const FILE_RE = /^file_[0-9A-Za-z]{1,64}$/;
|
|
6
|
+
const ARTIFACT_RE = /^art_[0-9A-Za-z]{1,64}$/;
|
|
7
|
+
const defaultFetch = (input, init) => globalThis.fetch(input, init);
|
|
8
|
+
function isFile(v, re) {
|
|
9
|
+
const f = v;
|
|
10
|
+
return typeof f?.id === "string" && re.test(f.id) && typeof f.name === "string" && typeof f.mime === "string" && typeof f.size_bytes === "number";
|
|
11
|
+
}
|
|
12
|
+
export function attachmentsOf(data) {
|
|
13
|
+
const files = data?.files;
|
|
14
|
+
return Array.isArray(files) ? files.filter((f) => isFile(f, FILE_RE)).slice(0, MAX_ATTACHMENTS) : [];
|
|
15
|
+
}
|
|
16
|
+
export async function uploadKitFile(base, thread, file, doFetch = defaultFetch) {
|
|
17
|
+
if (file.size > MAX_ATTACHMENT_BYTES)
|
|
18
|
+
throw new AgentChatError("body_too_large", "A file can be at most 4 MB.", { status: 413 });
|
|
19
|
+
const q = new URLSearchParams({ thread, name: file.name });
|
|
20
|
+
let res;
|
|
21
|
+
try {
|
|
22
|
+
res = await doFetch(`${base}/files?${q}`, { method: "POST", headers: { "content-type": file.type || "application/octet-stream" }, body: file });
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
throw new AgentChatError("network", "Could not reach the files route.", { cause: err });
|
|
26
|
+
}
|
|
27
|
+
const body = await res.json().catch(() => null);
|
|
28
|
+
if (!res.ok) {
|
|
29
|
+
const e = body?.error;
|
|
30
|
+
throw new AgentChatError(typeof e?.code === "string" ? e.code : `http_${res.status}`, typeof e?.message === "string" ? e.message : `HTTP ${res.status}`, { status: res.status });
|
|
31
|
+
}
|
|
32
|
+
if (!isFile(body, FILE_RE))
|
|
33
|
+
throw new AgentChatError("invalid_response", "The files route answered something else.");
|
|
34
|
+
return { id: body.id, name: body.name, mime: body.mime, size_bytes: body.size_bytes };
|
|
35
|
+
}
|
|
36
|
+
export async function listKitArtifacts(base, thread, doFetch = defaultFetch) {
|
|
37
|
+
try {
|
|
38
|
+
const res = await doFetch(`${base}/artifacts?${new URLSearchParams({ thread })}`, { headers: { accept: "application/json" } });
|
|
39
|
+
if (!res.ok)
|
|
40
|
+
return null;
|
|
41
|
+
const data = (await res.json())?.data;
|
|
42
|
+
if (!Array.isArray(data))
|
|
43
|
+
return null;
|
|
44
|
+
return data
|
|
45
|
+
.filter((a) => isFile(a, ARTIFACT_RE) && typeof a.created === "string")
|
|
46
|
+
.map((a) => ({ id: a.id, name: a.name, mime: a.mime, size_bytes: a.size_bytes, created: a.created, tainted: a.tainted !== false }));
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function artifactOf(data) {
|
|
53
|
+
if (!data || typeof data !== "object" || data.object !== "artifact" || !isFile(data, ARTIFACT_RE))
|
|
54
|
+
return null;
|
|
55
|
+
return { id: data.id, name: data.name, mime: data.mime, size_bytes: data.size_bytes, tainted: data.tainted !== false };
|
|
56
|
+
}
|
|
57
|
+
export function sizeText(bytes) {
|
|
58
|
+
if (bytes < 1024)
|
|
59
|
+
return `${bytes} B`;
|
|
60
|
+
if (bytes < 1024 * 1024)
|
|
61
|
+
return `${Math.round(bytes / 1024)} KB`;
|
|
62
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
63
|
+
}
|
|
64
|
+
export function artifactTextHref(base, thread, id) {
|
|
65
|
+
return `${base}/artifacts/${encodeURIComponent(id)}/text?${new URLSearchParams({ thread })}`;
|
|
66
|
+
}
|
|
67
|
+
export async function readKitArtifactText(base, thread, id, doFetch = defaultFetch) {
|
|
68
|
+
try {
|
|
69
|
+
const res = await doFetch(artifactTextHref(base, thread, id), { headers: { accept: "text/plain" } });
|
|
70
|
+
return res.ok ? await res.text() : null;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function artifactDownloadHref(base, thread, id) {
|
|
77
|
+
return `${base}/artifacts/${encodeURIComponent(id)}/download?${new URLSearchParams({ thread })}`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@openlegion/platform/react`: the chat UI for a partner's page, on the kit's chat route; and the
|
|
3
|
+
* agent and schedule editors, on the kit's agent routes.
|
|
4
|
+
*
|
|
5
|
+
* Its peers are optional for the package and required here: `react` (19), `@ai-sdk/react` (4) and `ai`
|
|
6
|
+
* (7). The server entries (`@openlegion/platform`, `@openlegion/platform/next`) never import this module or
|
|
7
|
+
* any of the three, so a server-only partner installs none of them.
|
|
8
|
+
*/
|
|
9
|
+
export { AgentChat, AgentChatView, agentChatViewProps, isMessageStopped, isMessageTainted, replyFailed, stopAlreadySaid, useAgentChat, type AgentChatFinish, type AgentChatHandle, type AgentChatProps, type AgentChatState, type AgentChatViewProps, type ComposerOff, type RenderTextInfo, type SeenMessage, type StopState, type UnsentReason, type UseAgentChatOptions, unsentReason } from "./agent-chat.tsx";
|
|
10
|
+
export { AgentChatError, agentChatErrorText, DEFAULT_LABELS, type AgentChatLabels, type ToolWords } from "./errors.ts";
|
|
11
|
+
export { ApprovalCard, type ApprovalCardProps, type ApprovalLabels, type ApprovalRunRefused } from "./approval-card.tsx";
|
|
12
|
+
export { artifactDownloadHref, artifactOf, artifactTextHref, attachmentsOf, listKitArtifacts, MAX_ATTACHMENT_BYTES, MAX_ATTACHMENTS, readKitArtifactText, uploadKitFile, type KitArtifact, type KitArtifactRef, type KitFile } from "./files.ts";
|
|
13
|
+
export { ArtifactCard, previewKindOf, type ArtifactCardProps } from "./artifact-card.tsx";
|
|
14
|
+
export { MarkdownText, renderMarkdown, type MarkdownLinkOptions } from "./markdown.tsx";
|
|
15
|
+
export { parseMarkdown, type MdAlign, type MdBlock, type MdInline } from "./md-parse.ts";
|
|
16
|
+
export { createAgentChatTransport, type AgentChatTransport, type AgentChatTransportOptions } from "./transport.ts";
|
|
17
|
+
export { DEFAULT_VAULT_LABELS, vaultRequestOf, VaultSecretForm, type VaultFormLabels, type VaultRequest, type VaultSecretFormProps } from "./vault-form.tsx";
|
|
18
|
+
export { AgentKitError, agentKitErrorText, DEFAULT_KIT_BASE, DEFAULT_KIT_ERROR_LABELS, DEFAULT_MODEL_TIER_LABELS, kitRequest, newIdempotencyKey, readModelPresets, useAgents, useModelPresets, useSchedules, useTemplateAgents, type AgentInput, type AgentKitErrorLabels, type AgentLimit, type KitAgent, type KitModelPreset, type KitSchedule, type ScheduleInput, type TemplateAgent, type UseAgentKitOptions, } from "./agent-kit.ts";
|
|
19
|
+
export { AgentEditor, AgentEditorView, DEFAULT_AGENT_EDITOR_LABELS, humanizeTool, modelChoices, type AgentDraft, type ModelChoice, type AgentEditorLabels, type AgentEditorProps, type AgentEditorViewProps } from "./agent-editor.tsx";
|
|
20
|
+
export { DEFAULT_SCHEDULE_EDITOR_LABELS, describeWeekly, inZone, ScheduleEditor, ScheduleEditorView, scheduleWhen, zoneName, type ScheduleDraft, type ScheduleEditorLabels, type ScheduleEditorProps, type ScheduleEditorViewProps } from "./schedule-editor.tsx";
|
|
21
|
+
export { clock, cronToWeekly, timeOfDay, weeklyOutsideBounds, weeklyToCron, type ScheduleBounds, type Weekday, type WeeklyTime } from "./schedule-time.ts";
|
|
22
|
+
export { connectChannelName, filterCatalog, useCatalog, useConnections, watchConnectSession, type ConnectSessionStatus, type KitCatalogApp, type KitConnection, type KitConnectSession, type KitCustomServers } from "./use-connections.ts";
|
|
23
|
+
export { ConnectButton, ConnectButtonView, connectViewOf, DEFAULT_CONNECT_LABELS, type ConnectButtonLabels, type ConnectButtonProps, type ConnectButtonViewProps, type ConnectViewState } from "./connect-button.tsx";
|
|
24
|
+
export { AppCatalog, AppCatalogView, connectionName, ConnectionsList, ConnectionsListView, DEFAULT_CONNECTIONS_LIST_LABELS, type AppCatalogProps, type AppCatalogViewProps, type ConnectionsListLabels, type ConnectionsListViewProps } from "./connections-list.tsx";
|
|
25
|
+
export { DEFAULT_LIMIT_LABELS, limitOf, limitWords, type KitLimit, type KitLimitCap, type LimitLabels, type LimitLabelsInput } from "./limit-words.ts";
|
|
26
|
+
export { AddServerForm, AddServerFormView, addServerViewOf, DEFAULT_ADD_SERVER_LABELS, serverNameOf, type AddServerFormProps, type AddServerFormViewProps, type AddServerLabels, type AddServerNote, type AddServerView } from "./add-server.tsx";
|
|
27
|
+
export { connectionRequestOf, type ConnectionRequest } from "./connection-request.ts";
|
|
28
|
+
export { MODEL_KEY_VENDORS, useModelKeys, type KitModelKey, type KitModelKeys, type KitSavedModelKey, type ModelKeyVendor } from "./use-model-keys.ts";
|
|
29
|
+
export { mergeThreadPage, putThreadFirst, useThreads, type KitThread, type UseThreadsOptions } from "./use-threads.ts";
|
|
30
|
+
export { type AvatarFor } from "./avatar.tsx";
|
|
31
|
+
export { AgentList, agentRowName, DEFAULT_AGENT_LIST_LABELS, markSeen, unseenBadge, useAgentList, type AgentListLabels, type AgentListLastRow, type AgentListProps, type AgentListState, type KitAgentSummary, type UseAgentListOptions } from "./agent-list.tsx";
|
|
32
|
+
export { ComputerView, DEFAULT_COMPUTER_VIEW_LABELS, type AgentChatComputer, type ComputerViewLabels, type ComputerViewProps } from "./computer-view.tsx";
|
|
33
|
+
export { ComputerViewRefused, readViewerGrant, type FetchViewer, type ViewerGrant, type ViewerTimingStep } from "./computer-viewer.ts";
|
|
34
|
+
export { computerSessionOf, type ComputerSession } from "./computer-wire.ts";
|
|
35
|
+
export { DEFAULT_MODEL_KEYS_CARD_LABELS, modelKeyErrorText, ModelKeysCard, ModelKeysCardView, modelKeysReadState, type ModelKeysCardLabels, type ModelKeysCardProps, type ModelKeysCardViewProps } from "./model-keys-card.tsx";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { AgentChat, AgentChatView, agentChatViewProps, isMessageStopped, isMessageTainted, replyFailed, stopAlreadySaid, useAgentChat, unsentReason } from "./agent-chat.js";
|
|
2
|
+
export { AgentChatError, agentChatErrorText, DEFAULT_LABELS } from "./errors.js";
|
|
3
|
+
export { ApprovalCard } from "./approval-card.js";
|
|
4
|
+
export { artifactDownloadHref, artifactOf, artifactTextHref, attachmentsOf, listKitArtifacts, MAX_ATTACHMENT_BYTES, MAX_ATTACHMENTS, readKitArtifactText, uploadKitFile } from "./files.js";
|
|
5
|
+
export { ArtifactCard, previewKindOf } from "./artifact-card.js";
|
|
6
|
+
export { MarkdownText, renderMarkdown } from "./markdown.js";
|
|
7
|
+
export { parseMarkdown } from "./md-parse.js";
|
|
8
|
+
export { createAgentChatTransport } from "./transport.js";
|
|
9
|
+
export { DEFAULT_VAULT_LABELS, vaultRequestOf, VaultSecretForm } from "./vault-form.js";
|
|
10
|
+
export { AgentKitError, agentKitErrorText, DEFAULT_KIT_BASE, DEFAULT_KIT_ERROR_LABELS, DEFAULT_MODEL_TIER_LABELS, kitRequest, newIdempotencyKey, readModelPresets, useAgents, useModelPresets, useSchedules, useTemplateAgents, } from "./agent-kit.js";
|
|
11
|
+
export { AgentEditor, AgentEditorView, DEFAULT_AGENT_EDITOR_LABELS, humanizeTool, modelChoices } from "./agent-editor.js";
|
|
12
|
+
export { DEFAULT_SCHEDULE_EDITOR_LABELS, describeWeekly, inZone, ScheduleEditor, ScheduleEditorView, scheduleWhen, zoneName } from "./schedule-editor.js";
|
|
13
|
+
export { clock, cronToWeekly, timeOfDay, weeklyOutsideBounds, weeklyToCron } from "./schedule-time.js";
|
|
14
|
+
export { connectChannelName, filterCatalog, useCatalog, useConnections, watchConnectSession } from "./use-connections.js";
|
|
15
|
+
export { ConnectButton, ConnectButtonView, connectViewOf, DEFAULT_CONNECT_LABELS } from "./connect-button.js";
|
|
16
|
+
export { AppCatalog, AppCatalogView, connectionName, ConnectionsList, ConnectionsListView, DEFAULT_CONNECTIONS_LIST_LABELS } from "./connections-list.js";
|
|
17
|
+
export { DEFAULT_LIMIT_LABELS, limitOf, limitWords } from "./limit-words.js";
|
|
18
|
+
export { AddServerForm, AddServerFormView, addServerViewOf, DEFAULT_ADD_SERVER_LABELS, serverNameOf } from "./add-server.js";
|
|
19
|
+
export { connectionRequestOf } from "./connection-request.js";
|
|
20
|
+
export { MODEL_KEY_VENDORS, useModelKeys } from "./use-model-keys.js";
|
|
21
|
+
export { mergeThreadPage, putThreadFirst, useThreads } from "./use-threads.js";
|
|
22
|
+
export { AgentList, agentRowName, DEFAULT_AGENT_LIST_LABELS, markSeen, unseenBadge, useAgentList } from "./agent-list.js";
|
|
23
|
+
export { ComputerView, DEFAULT_COMPUTER_VIEW_LABELS } from "./computer-view.js";
|
|
24
|
+
export { ComputerViewRefused, readViewerGrant } from "./computer-viewer.js";
|
|
25
|
+
export { computerSessionOf } from "./computer-wire.js";
|
|
26
|
+
export { DEFAULT_MODEL_KEYS_CARD_LABELS, modelKeyErrorText, ModelKeysCard, ModelKeysCardView, modelKeysReadState } from "./model-keys-card.js";
|