@object-ui/plugin-chatbot 17.7.0 → 18.0.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/CHANGELOG.md +499 -0
- package/README.md +55 -24
- package/dist/AiPendingActionsInbox.d.ts.map +1 -1
- package/dist/ChatbotEnhanced.d.ts +143 -54
- package/dist/ChatbotEnhanced.d.ts.map +1 -1
- package/dist/chatMessageAdapter.d.ts +2 -2
- package/dist/chatMessageAdapter.d.ts.map +1 -1
- package/dist/elements/conversation.d.ts +1 -1
- package/dist/elements/conversation.d.ts.map +1 -1
- package/dist/elements/message.d.ts +1 -1
- package/dist/elements/message.d.ts.map +1 -1
- package/dist/elements/prompt-input.d.ts +9 -1
- package/dist/elements/prompt-input.d.ts.map +1 -1
- package/dist/index.d.ts +17 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2620 -1580
- package/dist/index.umd.cjs +2 -2
- package/dist/mapMessages.d.ts +215 -3
- package/dist/mapMessages.d.ts.map +1 -1
- package/dist/recordLink.d.ts +34 -0
- package/dist/recordLink.d.ts.map +1 -0
- package/dist/useAgents.d.ts +5 -0
- package/dist/useAgents.d.ts.map +1 -1
- package/dist/useAiModels.d.ts +2 -0
- package/dist/useAiModels.d.ts.map +1 -1
- package/dist/useHitlInChat.d.ts +1 -1
- package/dist/useHitlInChat.d.ts.map +1 -1
- package/dist/usePendingActions.d.ts +5 -0
- package/dist/usePendingActions.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/mapMessages.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMessage, ChatToolInvocation, ChatBuildProgress } from './ChatbotEnhanced.js';
|
|
1
|
+
import { ChatbotEnhancedMessage as ChatMessage, ChatbotEnhancedToolInvocation as ChatToolInvocation, ChatBuildProgress } from './ChatbotEnhanced.js';
|
|
2
2
|
interface AnyPart {
|
|
3
3
|
type?: string;
|
|
4
4
|
text?: string;
|
|
@@ -168,11 +168,37 @@ export interface DraftReview {
|
|
|
168
168
|
*/
|
|
169
169
|
export interface ProposedPlan {
|
|
170
170
|
summary?: string;
|
|
171
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* objectui#12724 — the app's display label (`blueprint.app.label`, the
|
|
173
|
+
* spec's `BlueprintAppSchema`), for the card's 「方案 · APP」 header. Absent
|
|
174
|
+
* when the blueprint names no app label.
|
|
175
|
+
*/
|
|
176
|
+
appLabel?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Objects (tables) the build will create — machine name, label, field count.
|
|
179
|
+
* objectui#12724 — `fields` lifts the name and label of each declared field
|
|
180
|
+
* (`blueprint.objects[].fields`, the spec's `BlueprintFieldSchema`) so the
|
|
181
|
+
* card can draw one chip per field. Absent when no entry carries a name (a
|
|
182
|
+
* cache-fallback reload keeps only the count), and the card then draws the
|
|
183
|
+
* object chip with its count, as before.
|
|
184
|
+
*/
|
|
172
185
|
objects: Array<{
|
|
173
186
|
name: string;
|
|
174
187
|
label?: string;
|
|
175
188
|
fieldCount: number;
|
|
189
|
+
fields?: Array<{
|
|
190
|
+
name: string;
|
|
191
|
+
label?: string;
|
|
192
|
+
}>;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* objectui#12724 — the views the build will create (`blueprint.views`, the
|
|
196
|
+
* spec's `BlueprintViewSchema`), by name and label. Absent when the
|
|
197
|
+
* blueprint declares none.
|
|
198
|
+
*/
|
|
199
|
+
views?: Array<{
|
|
200
|
+
name: string;
|
|
201
|
+
label?: string;
|
|
176
202
|
}>;
|
|
177
203
|
/** Totals for a compact "N objects · N views · …" line. */
|
|
178
204
|
counts: {
|
|
@@ -193,17 +219,142 @@ export interface ProposedPlan {
|
|
|
193
219
|
text: string;
|
|
194
220
|
options: string[];
|
|
195
221
|
}>;
|
|
196
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* Assumptions the agent made from an underspecified goal (may be empty).
|
|
224
|
+
* objectui#12724 — read from `planCard.assumptions` when the envelope
|
|
225
|
+
* carries a plan card, else from `blueprint.assumptions` as before.
|
|
226
|
+
*/
|
|
197
227
|
assumptions: string[];
|
|
198
228
|
/** Extend mode: the existing app the new objects would be added into. */
|
|
199
229
|
targetApp?: string;
|
|
230
|
+
/**
|
|
231
|
+
* objectui#12724 — the plan card's v2 rows, from the envelope's `planCard`.
|
|
232
|
+
* Absent on a producer that predates it, and the card then draws the rows
|
|
233
|
+
* above as before.
|
|
234
|
+
*/
|
|
235
|
+
planCard?: ProposedPlanCard;
|
|
236
|
+
/**
|
|
237
|
+
* objectui#12724 — one line per view (the envelope's `viewIntents`). The card
|
|
238
|
+
* reads it only when there is no `planCard`, whose views carry the same line.
|
|
239
|
+
*/
|
|
240
|
+
viewIntents?: ProposedPlanViewLine[];
|
|
241
|
+
}
|
|
242
|
+
/** One view's intent line: `viewIntents[]` and `planCard.views[]` both carry it. */
|
|
243
|
+
export interface ProposedPlanViewLine {
|
|
244
|
+
view: string;
|
|
245
|
+
object: string;
|
|
246
|
+
label?: string;
|
|
247
|
+
line: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* objectui#12724 — the keys of `propose_blueprint`'s `planCard` that the plan
|
|
251
|
+
* card draws. The producer's contract is objectstack-ai/cloud's
|
|
252
|
+
* `ProposeBlueprintCardPayload` (`packages/service-ai-studio/schema/build-cards.schema.json`,
|
|
253
|
+
* vendored beside this package's tests); keys this card does not draw are not
|
|
254
|
+
* lifted.
|
|
255
|
+
*/
|
|
256
|
+
export interface ProposedPlanCard {
|
|
257
|
+
objects: Array<{
|
|
258
|
+
name: string;
|
|
259
|
+
label: string;
|
|
260
|
+
fields: Array<{
|
|
261
|
+
name: string;
|
|
262
|
+
label: string;
|
|
263
|
+
/** The format the sample data is held to, as the chip's words (`format.label`). */
|
|
264
|
+
format?: {
|
|
265
|
+
label: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* objectui#12994 — the stage field's lifecycle, as the chip's words
|
|
269
|
+
* (`lifecycle.label`, e.g. 「借出 · 已还 ✓完成 · 逾期 ⚠」). The producer's
|
|
270
|
+
* `options` are not drawn, so they are not lifted.
|
|
271
|
+
*/
|
|
272
|
+
lifecycle?: {
|
|
273
|
+
label: string;
|
|
274
|
+
};
|
|
275
|
+
/** The model added this field; the user's words did not name it. */
|
|
276
|
+
suggested?: true;
|
|
277
|
+
}>;
|
|
278
|
+
/**
|
|
279
|
+
* The record's name field, when the plan declares one. `generated`
|
|
280
|
+
* (objectui#13004) is present when the title is composed for the user, not
|
|
281
|
+
* typed: the card draws its `line` (e.g. 「名称:自动生成「{图书} · {读者} ·
|
|
282
|
+
* {借出日期}」,表单里不出现」) in place of 「名称:LABEL」. The producer's
|
|
283
|
+
* `template` is not drawn, so it is not lifted.
|
|
284
|
+
*/
|
|
285
|
+
nameField?: {
|
|
286
|
+
name: string;
|
|
287
|
+
label: string;
|
|
288
|
+
generated?: {
|
|
289
|
+
line: string;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
}>;
|
|
293
|
+
views: ProposedPlanViewLine[];
|
|
294
|
+
assumptions: string[];
|
|
295
|
+
/** The sample data the build stages, as one line. Absent when it stages none. */
|
|
296
|
+
sampleData?: {
|
|
297
|
+
line: string;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* objectui#12724 — the keys of the result card's `checklist` that the card
|
|
302
|
+
* draws, from `apply_blueprint`'s and `verify_build`'s envelopes
|
|
303
|
+
* (objectstack-ai/cloud's `BuildResultCardPayload`).
|
|
304
|
+
*/
|
|
305
|
+
export interface BuildResultChecklist {
|
|
306
|
+
status: 'passed' | 'failed';
|
|
307
|
+
passed: number;
|
|
308
|
+
total: number;
|
|
309
|
+
/** Objects, then views, then the sample data, each measured on the build. */
|
|
310
|
+
lines: Array<{
|
|
311
|
+
kind: 'object' | 'view' | 'sampleData';
|
|
312
|
+
status: 'passed' | 'failed';
|
|
313
|
+
line: string;
|
|
314
|
+
}>;
|
|
315
|
+
/** The app 打开应用 opens. */
|
|
316
|
+
app?: {
|
|
317
|
+
name: string;
|
|
318
|
+
label?: string;
|
|
319
|
+
};
|
|
320
|
+
/** The package 在 Studio 中查看 opens. */
|
|
321
|
+
packageId?: string;
|
|
200
322
|
}
|
|
201
323
|
export declare function detectProposedPlan(result: unknown): ProposedPlan | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* objectui#12724 — the result card's `checklist`, on `apply_blueprint`'s
|
|
326
|
+
* envelope (drafted, or published in-turn) and on `verify_build`'s, which
|
|
327
|
+
* re-measures it after a repair. The schema requires `status`, `passed`,
|
|
328
|
+
* `total` and `lines`; without all four there is no checklist, and the card
|
|
329
|
+
* keeps its earlier rows.
|
|
330
|
+
*/
|
|
331
|
+
export declare function detectBuildChecklist(result: unknown): BuildResultChecklist | undefined;
|
|
332
|
+
/**
|
|
333
|
+
* cloud#2924 — how a copilot change to a package lands, as the change envelopes
|
|
334
|
+
* carry it (cloud `postureEnvelope`): `draft` when the app is live and its
|
|
335
|
+
* tables hold `liveRecords` records, so the change is saved as a Studio draft;
|
|
336
|
+
* `publish` when it goes live in the turn (a first build, an app holding no
|
|
337
|
+
* records, a platform package).
|
|
338
|
+
*/
|
|
339
|
+
export interface ChangePosture {
|
|
340
|
+
mode: 'draft' | 'publish';
|
|
341
|
+
/** Records the package's live tables hold. */
|
|
342
|
+
liveRecords: number;
|
|
343
|
+
/** The package is a platform package; the posture by state is not read there. */
|
|
344
|
+
platformPackage?: true;
|
|
345
|
+
/** In the turn that applied a blueprint: the rows that build seeded, left out of `liveRecords`. */
|
|
346
|
+
buildTurnRows?: number;
|
|
347
|
+
}
|
|
202
348
|
/**
|
|
203
349
|
* A granular metadata-change preview (confirm-before-change). A mutating tool
|
|
204
350
|
* that has NOT been approved this turn returns
|
|
205
351
|
* { status: 'changes_proposed', changes: [...], summary? } instead of
|
|
206
352
|
* committing, so the chat renders a "确认修改" card. Mirrors detectProposedPlan.
|
|
353
|
+
*
|
|
354
|
+
* objectui#12894 — cloud#2924 adds `posture` and `primaryAction`, read before
|
|
355
|
+
* the card is shown. Both are absent from an older cloud, and from an
|
|
356
|
+
* environment that does not publish AI changes in the turn; the card then
|
|
357
|
+
* draws as it did before.
|
|
207
358
|
*/
|
|
208
359
|
export interface ProposedChanges {
|
|
209
360
|
summary?: string;
|
|
@@ -213,8 +364,48 @@ export interface ProposedChanges {
|
|
|
213
364
|
field?: string;
|
|
214
365
|
type?: string;
|
|
215
366
|
name?: string;
|
|
367
|
+
/** cloud#2924 — the row's parameters in small type (label · default · required), in the user's language. */
|
|
216
368
|
details?: string;
|
|
217
369
|
}>;
|
|
370
|
+
/** cloud#2924 — how the change will land once confirmed. */
|
|
371
|
+
posture?: ChangePosture;
|
|
372
|
+
/** cloud#2924 — the card's primary action: `save_draft` reads 存为草稿, `confirm` keeps the host's label. */
|
|
373
|
+
primaryAction?: 'save_draft' | 'confirm';
|
|
374
|
+
}
|
|
375
|
+
/** One pending draft, as Studio's 变更 list names it (cloud `PendingDraft`). */
|
|
376
|
+
export interface PendingDraftItem {
|
|
377
|
+
type: string;
|
|
378
|
+
name: string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* cloud#2924 — the package's pending drafts, read after the change landed
|
|
382
|
+
* through `listDrafts`, the read Studio's 变更 badge makes (cloud `DraftState`).
|
|
383
|
+
*/
|
|
384
|
+
export interface ChangeDraftState {
|
|
385
|
+
/** Pending drafts in the package — the number Studio's 变更 badge shows. */
|
|
386
|
+
pending: number;
|
|
387
|
+
items: PendingDraftItem[];
|
|
388
|
+
/** Pending drafts this change did not stage (an earlier edit, the user's own). */
|
|
389
|
+
others: number;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* cloud#2924 — a field the change added to a table that already holds records:
|
|
393
|
+
* every one of those `rows` has no value for it (cloud `ExistingRowsLine`).
|
|
394
|
+
*/
|
|
395
|
+
export interface ExistingRowsLine {
|
|
396
|
+
object: string;
|
|
397
|
+
field: string;
|
|
398
|
+
label: string;
|
|
399
|
+
rows: number;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* cloud#2924 — the applied card of a change saved as a draft, in the user's
|
|
403
|
+
* language: its title (「已存为草稿 · 2 项未发布」) and its lines
|
|
404
|
+
* (「已有 12 条记录的续借次数为空」, 「核对:结构 ✓」).
|
|
405
|
+
*/
|
|
406
|
+
export interface AppliedCard {
|
|
407
|
+
title: string;
|
|
408
|
+
lines: string[];
|
|
218
409
|
}
|
|
219
410
|
/**
|
|
220
411
|
* ADR-0057 P4 — the `ask` agent's `suggest_builder` structured decline. Result
|
|
@@ -276,6 +467,27 @@ export interface ReplayOutcome {
|
|
|
276
467
|
* so the card never says 未生效 over a change that actually landed.
|
|
277
468
|
*/
|
|
278
469
|
dispatchError?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* objectui#12894 — on a `drafted` outcome only, what cloud#2924's
|
|
472
|
+
* `describeLandedChange` stamps after the change landed: the package's
|
|
473
|
+
* pending drafts, the existing rows a new field leaves empty, and the
|
|
474
|
+
* applied card's title and lines. Each is absent from an older cloud, and
|
|
475
|
+
* the card then draws the drafted badge as before.
|
|
476
|
+
*/
|
|
477
|
+
draftState?: ChangeDraftState;
|
|
478
|
+
existingRows?: ExistingRowsLine[];
|
|
479
|
+
appliedCard?: AppliedCard;
|
|
480
|
+
/**
|
|
481
|
+
* objectui#12968 — on a `drafted` outcome only, the items THIS replay
|
|
482
|
+
* drafted (the envelope's `drafted[]`, lifted as {@link detectDraftResult}
|
|
483
|
+
* lifts it), so the applied card can preview them. Not `draftState.items`,
|
|
484
|
+
* which lists every pending draft of the package. Absent when the envelope
|
|
485
|
+
* names none.
|
|
486
|
+
*/
|
|
487
|
+
items?: Array<{
|
|
488
|
+
type: string;
|
|
489
|
+
name: string;
|
|
490
|
+
}>;
|
|
279
491
|
}
|
|
280
492
|
export declare function detectReplayOutcome(toolCallId: string | undefined, result: unknown): ReplayOutcome | undefined;
|
|
281
493
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapMessages.d.ts","sourceRoot":"","sources":["../src/mapMessages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapMessages.d.ts","sourceRoot":"","sources":["../src/mapMessages.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,sBAAsB,IAAI,WAAW,EAAE,6BAA6B,IAAI,kBAAkB,EAAc,iBAAiB,EAAoC,MAAM,mBAAmB,CAAC;AAErM,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgDD;;;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AAC,EAAE,WAAW,CAAC;IAC1B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C;AAqBD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,OAAO,GACd,aAAa,GAAG,SAAS,CAyC3B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,GACd;IAAE,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAS9E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAczE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAsE1E;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,WAAW,GAAG,SAAS,GAC7B,iBAAiB,GAAG,SAAS,CAY/B;AA0SD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,YAAY,EACjB,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,WAAW,CAoCb;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,YAAY,EAAE,EACxB,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,WAAW,EAAE,CASf"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LinkSafetyConfig } from 'streamdown';
|
|
2
|
+
/** The record a record link names. */
|
|
3
|
+
export type RecordLinkTarget = {
|
|
4
|
+
objectName: string;
|
|
5
|
+
recordId: string;
|
|
6
|
+
};
|
|
7
|
+
/** The host's way to open a record (the chat's `onOpenRecord`). */
|
|
8
|
+
export type OpenRecordLink = (target: RecordLinkTarget) => void;
|
|
9
|
+
/**
|
|
10
|
+
* The one record-link form, as streamdown hands the href to `onLinkCheck`.
|
|
11
|
+
* (rehype-harden normalises `./record/...` to `/record/...` before that, and
|
|
12
|
+
* drops a bare `record/...`.)
|
|
13
|
+
*/
|
|
14
|
+
export declare const RECORD_LINK_PATTERN: RegExp;
|
|
15
|
+
/** The record a link names, or `null` when the href is not the record form. */
|
|
16
|
+
export declare function parseRecordLink(href: string | null | undefined): RecordLinkTarget | null;
|
|
17
|
+
/**
|
|
18
|
+
* The host's record opener for the answers rendered below it. `null` (no
|
|
19
|
+
* host handler) leaves every link, the record form included, on streamdown's
|
|
20
|
+
* default link safety.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RecordLinkContext: import('react').Context<OpenRecordLink | null>;
|
|
23
|
+
/**
|
|
24
|
+
* `linkSafety` for an answer: the caller's config, with the record form routed
|
|
25
|
+
* to `open`.
|
|
26
|
+
*
|
|
27
|
+
* streamdown's link click awaits `onLinkCheck(url)`: `true` opens the url in a
|
|
28
|
+
* new tab, anything else opens the confirmation dialog. A record link wants
|
|
29
|
+
* neither, so after handing the record to `open` the check returns a promise
|
|
30
|
+
* that never settles, and the click ends there (a fresh promise per click, so
|
|
31
|
+
* nothing accumulates once the click's continuation is dropped).
|
|
32
|
+
*/
|
|
33
|
+
export declare function withRecordLinks(base: LinkSafetyConfig | undefined, open: OpenRecordLink | null): LinkSafetyConfig | undefined;
|
|
34
|
+
//# sourceMappingURL=recordLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordLink.d.ts","sourceRoot":"","sources":["../src/recordLink.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiCH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,sCAAsC;AACtC,MAAM,MAAM,gBAAgB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAC0B,CAAC;AAE3D,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,gBAAgB,GAAG,IAAI,CAMxF;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gDAA6C,CAAC;AAE5E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,gBAAgB,GAAG,SAAS,EAClC,IAAI,EAAE,cAAc,GAAG,IAAI,GAC1B,gBAAgB,GAAG,SAAS,CAiB9B"}
|
package/dist/useAgents.d.ts
CHANGED
|
@@ -138,9 +138,14 @@ export declare function resolveDefaultAgentName(agents: AgentDescriptor[], prefe
|
|
|
138
138
|
* to land in lockstep with a console release.
|
|
139
139
|
*/
|
|
140
140
|
export declare function extractAgentList(payload: unknown): RawAgent[];
|
|
141
|
+
/** Test seam: forget the painted frame and the cached catalog. Not public. */
|
|
142
|
+
export declare function __resetAgentsCatalog(): void;
|
|
141
143
|
/**
|
|
142
144
|
* Fetches the active agent catalog from the backend.
|
|
143
145
|
*
|
|
146
|
+
* The request leaves after the first frame has painted (objectui#12980), not
|
|
147
|
+
* in the mounting commit — see {@link afterCatalogFrame}.
|
|
148
|
+
*
|
|
144
149
|
* @example
|
|
145
150
|
* const { agents } = useAgents({ apiBase: '/api/v1/ai' });
|
|
146
151
|
*/
|
package/dist/useAgents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgents.d.ts","sourceRoot":"","sources":["../src/useAgents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH;;;;;;GAMG;AACH,MAAM,W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E,OAAO,GAAG,QAAQ,EAAE,CAU7D;AA+GD,8EAA8E;AAC9E,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAgDzE"}
|
package/dist/useAiModels.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface UseAiModelsReturn {
|
|
|
16
16
|
error: Error | undefined;
|
|
17
17
|
refetch: () => void;
|
|
18
18
|
}
|
|
19
|
+
/** Test-only: forget the session's 501 answers. Not exported from the package. */
|
|
20
|
+
export declare function resetAiModelsSession(): void;
|
|
19
21
|
/**
|
|
20
22
|
* Fetch the AI-model allowlist for the current environment.
|
|
21
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAiModels.d.ts","sourceRoot":"","sources":["../src/useAiModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,+DAA+D;IAC/D,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"useAiModels.d.ts","sourceRoot":"","sources":["../src/useAiModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,+DAA+D;IAC/D,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAmBD,kFAAkF;AAClF,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAQD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,iBAAiB,CAyF/E"}
|
package/dist/useHitlInChat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMessage, ToolDecisionState } from './ChatbotEnhanced.js';
|
|
1
|
+
import { ChatbotEnhancedMessage as ChatMessage, ToolDecisionState } from './ChatbotEnhanced.js';
|
|
2
2
|
import { ApproveOutcome, RejectOutcome } from './usePendingActions.js';
|
|
3
3
|
export type { ToolDecisionState };
|
|
4
4
|
export interface UseHitlInChatOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHitlInChat.d.ts","sourceRoot":"","sources":["../src/useHitlInChat.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useHitlInChat.d.ts","sourceRoot":"","sources":["../src/useHitlInChat.ts"],"names":[],"mappings":"AAsCA,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AAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAyJhF"}
|
|
@@ -121,6 +121,11 @@ export interface UsePendingActionsReturn {
|
|
|
121
121
|
/**
|
|
122
122
|
* Hook that drives the HITL pending-actions inbox.
|
|
123
123
|
*
|
|
124
|
+
* Polls every `pollInterval` while the endpoint answers. A refused read
|
|
125
|
+
* (`501`, `403`, `404`, any `4xx` other than `408` / `429`) stops the poll. A
|
|
126
|
+
* transient failure backs it off, doubling up to a ceiling. A read that
|
|
127
|
+
* succeeds resumes the normal cadence (objectui#11736; see `ListReadOutcome`).
|
|
128
|
+
*
|
|
124
129
|
* @example
|
|
125
130
|
* ```tsx
|
|
126
131
|
* const { items, isLoading, error, approve, reject, refresh } =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePendingActions.d.ts","sourceRoot":"","sources":["../src/usePendingActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"usePendingActions.d.ts","sourceRoot":"","sources":["../src/usePendingActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,MAAM,cAAc,GAAG,8BAA8B,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,6BAA6B,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,oCAAoC;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B;;;;OAIG;IACH,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACjD;;;OAGG;IACH,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;CACjE;AAsID;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,uBAAuB,CA+GzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-chatbot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Chatbot interface plugin for Object UI",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ai-sdk/react": "^4.0.68",
|
|
28
28
|
"@radix-ui/react-slot": "^1.3.3",
|
|
29
|
-
"@objectstack/spec": "^
|
|
29
|
+
"@objectstack/spec": "^18.0.0",
|
|
30
30
|
"@radix-ui/react-use-controllable-state": "^1.2.6",
|
|
31
31
|
"ai": "^7.0.65",
|
|
32
32
|
"class-variance-authority": "^0.7.1",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"shiki": "^4.4.2",
|
|
37
37
|
"streamdown": "^2.5.0",
|
|
38
38
|
"use-stick-to-bottom": "^1.1.6",
|
|
39
|
-
"@object-ui/components": "
|
|
40
|
-
"@object-ui/core": "
|
|
41
|
-
"@object-ui/i18n": "
|
|
42
|
-
"@object-ui/react": "
|
|
43
|
-
"@object-ui/types": "
|
|
39
|
+
"@object-ui/components": "18.0.0",
|
|
40
|
+
"@object-ui/core": "18.0.0",
|
|
41
|
+
"@object-ui/i18n": "18.0.0",
|
|
42
|
+
"@object-ui/react": "18.0.0",
|
|
43
|
+
"@object-ui/types": "18.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^18.0.0 || ^19.0.0",
|