@object-ui/plugin-chatbot 17.6.0 → 17.7.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.
@@ -1,4 +1,4 @@
1
- import { ChatMessage, ChatToolInvocation, ChatBuildProgress } from './ChatbotEnhanced';
1
+ import { ChatMessage, ChatToolInvocation, ChatBuildProgress } from './ChatbotEnhanced.js';
2
2
  interface AnyPart {
3
3
  type?: string;
4
4
  text?: string;
@@ -10,7 +10,29 @@ interface AnyPart {
10
10
  args?: unknown;
11
11
  result?: unknown;
12
12
  errorText?: string;
13
- state?: ChatToolInvocation['state'];
13
+ /**
14
+ * Free-form on purpose. `AnyPart` absorbs whatever a producer hands the
15
+ * mapper, and `state` is NOT one namespace: a tool part carries the
16
+ * tool-invocation lifecycle, while `@ai-sdk/react`'s text and reasoning
17
+ * parts carry `'streaming' | 'done'`. Typing this member against the
18
+ * OUTPUT contract made the deliberately-permissive input interface
19
+ * stricter than the union it exists to absorb, so the SDK's own
20
+ * `UIMessage[]` — the documented input of the exported mappers — was
21
+ * refused outright (objectui#8214). `isToolState` below is what keeps the
22
+ * output checked; this stays open.
23
+ */
24
+ state?: string;
25
+ /**
26
+ * The chat runtime's approval envelope, as it arrives on a tool part.
27
+ *
28
+ * `unknown`, like every other absorbing member here, and deliberately NOT
29
+ * the envelope's declared shape: this interface exists to take whatever a
30
+ * producer hands the mapper, and the one time a member was typed against the
31
+ * OUTPUT contract it made the permissive input interface stricter than the
32
+ * union it absorbs (objectui#8214, the `state` member). {@link liftApproval}
33
+ * is what keeps the OUTPUT checked; this stays open.
34
+ */
35
+ approval?: unknown;
14
36
  url?: string;
15
37
  href?: string;
16
38
  title?: string;
@@ -45,13 +67,29 @@ interface AnyUIMessage {
45
67
  * still-pending proposal as "Completed" (#787 finding B / #2362).
46
68
  */
47
69
  export declare function parseResultEnvelope(result: unknown): Record<string, unknown> | undefined;
70
+ /**
71
+ * The ObjectStack HITL envelope a tool result carries when the framework's
72
+ * `action-tools.ts` proposes a destructive action:
73
+ * `{ status: 'pending_approval', pendingActionId: 'pa_…', … }`.
74
+ *
75
+ * Exported (objectui#8442) so the app-shell's HYDRATION mapper derives the id
76
+ * from the same parse the live mapper uses. The id is never persisted as a part
77
+ * key — it exists in rehydrated history only inside this envelope — so a second
78
+ * hand-rolled reader there would be a second dialect of one contract, which is
79
+ * exactly what AGENTS.md Commandment #0.1 refuses.
80
+ */
81
+ export declare function detectPendingApproval(result: unknown): {
82
+ pendingActionId: string;
83
+ raw: Record<string, unknown>;
84
+ } | undefined;
48
85
  /**
49
86
  * Best-effort detector for the framework's ADR-0033 draft envelopes. Metadata
50
87
  * authoring tools stage changes as DRAFTS and return one of:
51
88
  * • single — `{ status:'drafted', type, name, summary, changedKeys }`
52
89
  * (create_object / add_field / create_metadata / update_metadata / …)
53
90
  * • batch — `{ status:'drafted', drafted:[{type,name}], failed, summary }`
54
- * (apply_blueprint)
91
+ * (apply_blueprint), or the same batch with `kind:'edit'` (apply_edit,
92
+ * an INCREMENTAL edit — objectui#10109)
55
93
  * We lift the reviewable `{ type, name }` targets so the chat can render a
56
94
  * "Review N change(s)" affordance that opens the designer's review/diff.
57
95
  * `blueprint_proposed` (propose_blueprint) has no draft yet → not surfaced here.
@@ -63,9 +101,25 @@ export interface DraftReview {
63
101
  }>;
64
102
  summary?: string;
65
103
  packageId?: string;
104
+ /**
105
+ * Backend lifecycle intent (from the tool result). `true` for whole-app
106
+ * builds (apply_blueprint) — eligible for the auto-publish "magic moment".
107
+ * Omitted for incremental edits, which stay drafts for explicit review.
108
+ */
66
109
  autoPublishable?: boolean;
110
+ /** Count of artifacts that failed in a partial build, surfaced not hidden. */
67
111
  failedCount?: number;
112
+ /**
113
+ * ADR-0045: the build was MATERIALIZED in-turn — real tables and seed
114
+ * rows exist; the app is live but `hidden` (unlisted). Preview should
115
+ * open the REAL app URL, not the draft overlay.
116
+ */
68
117
  materialized?: boolean;
118
+ /**
119
+ * ADR-0038 L1 graph-lint verdict for the staged build. Rendered as a
120
+ * verified/issues chip so "drafted" and "verified" read as the two
121
+ * separate statements they are. Absent on older tool output.
122
+ */
69
123
  verification?: {
70
124
  errors: number;
71
125
  warnings: number;
@@ -90,6 +144,18 @@ export interface DraftReview {
90
144
  * status panel, never asserted as done).
91
145
  */
92
146
  nextSteps?: string[];
147
+ /**
148
+ * objectui#10109 — the producer's marker for an INCREMENTAL edit, lifted
149
+ * from the envelope's own `kind`: `apply_edit` answers `kind: 'edit'`, and a
150
+ * whole-app `apply_blueprint` build carries no `kind`. An edit's `items` may
151
+ * honestly include the `app` artifact it re-staged (an `add_object` op
152
+ * merges the nav), so the readers that infer a whole-app build from a draft
153
+ * review's staged artifact types check this first: `buildProgressFromDraftReview`
154
+ * here, and app-shell's built-moment transition (`detectBuiltAppPackage` reads
155
+ * the envelope's own `kind` instead). Only the value those readers act on is
156
+ * declared: an envelope that does not say `'edit'` lifts nothing here.
157
+ */
158
+ kind?: 'edit';
93
159
  }
94
160
  /**
95
161
  * The lifecycle stage BEFORE a draft. `propose_blueprint` returns
@@ -161,6 +227,23 @@ export interface BuilderHandoff {
161
227
  packageId?: string;
162
228
  }
163
229
  export declare function detectBuilderHandoff(result: unknown): BuilderHandoff | undefined;
230
+ /**
231
+ * cloud#1658 — the ask agent's `open_record` structured hand-off: the OTHER
232
+ * ending of a write request. Envelope
233
+ * `{ status:'record_handoff', handoff:'record', objectName, recordId, label?, reason? }`.
234
+ * Lifted so the chat renders an explicit "打开这条记录 →" action landing on the
235
+ * record the agent already resolved — the whole point is that the user never
236
+ * re-finds a record the agent has in hand. Both ids are REQUIRED: a hand-off
237
+ * with either missing is dropped here exactly as the server refuses to emit
238
+ * one, because a card pointing nowhere is worse than the prose it replaces.
239
+ */
240
+ export interface RecordHandoff {
241
+ objectName: string;
242
+ recordId: string;
243
+ label?: string;
244
+ reason?: string;
245
+ }
246
+ export declare function detectRecordHandoff(result: unknown): RecordHandoff | undefined;
164
247
  export declare function detectProposedChanges(result: unknown): ProposedChanges | undefined;
165
248
  /**
166
249
  * objectui#5695 — the terminal verdict of a confirm-replay.
@@ -213,6 +296,12 @@ export declare function detectAuthoringVerdict(result: unknown): {
213
296
  * `drafted[]` + `packageId`), so keying the built-moment transition on
214
297
  * `draftReview` (drafted-only) missed every staging/cloud build — measured
215
298
  * live: reopening a built conversation stayed on the full page.
299
+ *
300
+ * objectui#10109 — an envelope that says `kind: 'edit'` is an INCREMENTAL
301
+ * edit (`apply_edit`), never a whole-app build, even when its `drafted[]`
302
+ * honestly lists the `app` artifact it re-staged (an `add_object` op merges
303
+ * the nav). The producer declares the difference on the envelope, so it is
304
+ * read here rather than inferred from which artifact types were staged.
216
305
  */
217
306
  export declare function detectBuiltAppPackage(result: unknown): string | undefined;
218
307
  export declare function detectDraftResult(result: unknown): DraftReview | undefined;
@@ -224,7 +313,9 @@ export declare function detectDraftResult(result: unknown): DraftReview | undefi
224
313
  * reconstruct the done-state from the draft result, which IS persisted, so the
225
314
  * summary + its preview/open affordances survive a refresh. Only whole-app
226
315
  * builds (a draft set that includes an `app`) get a panel — incremental edits
227
- * keep their draft card but no build tree, matching the live behaviour.
316
+ * keep their draft card but no build tree, matching the live behaviour. An
317
+ * edit is known by the producer's `kind: 'edit'`, not by its staged types: it
318
+ * can re-stage the `app` artifact too (objectui#10109).
228
319
  */
229
320
  export declare function buildProgressFromDraftReview(draft: DraftReview | undefined): ChatBuildProgress | undefined;
230
321
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mapMessages.d.ts","sourceRoot":"","sources":["../src/mapMessages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAc,iBAAiB,EAAoC,MAAM,mBAAmB,CAAC;AAE1I,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAA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E,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,CAgF1E;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,WAAW,GAAG,SAAS,GAC7B,iBAAiB,GAAG,SAAS,CAY/B;AAmPD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,YAAY,EACjB,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,WAAW,CAiCb;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,YAAY,EAAE,EACxB,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,WAAW,EAAE,CASf"}
@@ -9,15 +9,39 @@
9
9
  * peel the envelope, parse the inner JSON when possible, and produce a
10
10
  * human-friendly title for snake_case tool names.
11
11
  */
12
+ /**
13
+ * A translator for tool titles. Takes the i18n key and the English fallback
14
+ * this module would otherwise have produced, and returns whatever the active
15
+ * locale has — or the fallback when that locale carries no entry.
16
+ *
17
+ * Shaped to accept `useSafeTranslate()` directly, so a caller passes the hook's
18
+ * result and nothing else changes.
19
+ */
20
+ export type ToolTitleTranslator = (key: string, fallback: string) => string;
21
+ /** The i18n key a tool title is looked up under. */
22
+ export declare function toolTitleKey(name: string): string;
12
23
  /**
13
24
  * Convert a snake_case / kebab-case tool name into a human-readable title.
14
25
  *
26
+ * With no translator this is what it always was: an ENGLISH title-caser. That
27
+ * is why a fully Chinese conversation still read
28
+ * `Describe object 已完成 / Visualize data 已完成` (cloud#1658) — every other
29
+ * string on the card was localized and the tool name could not be, because the
30
+ * name never passed through i18n at all. The step the user most needs to read
31
+ * ("what is it doing right now?") was the one left in a foreign language.
32
+ *
33
+ * Pass `translate` (e.g. `useSafeTranslate()`) to look the title up as
34
+ * `chatbot.tool.<tool_name>`; a locale with no entry for that tool falls back
35
+ * to the same English title as before, so packs can be filled in gradually and
36
+ * an unknown//custom tool is never worse off than today.
37
+ *
15
38
  * @example
16
- * humanizeToolName('list_objects') // → 'List objects'
17
- * humanizeToolName('query_records') // → 'Query records'
18
- * humanizeToolName('describe-api-tool') // → 'Describe API tool'
39
+ * humanizeToolName('list_objects') // → 'List objects'
40
+ * humanizeToolName('query_records') // → 'Query records'
41
+ * humanizeToolName('describe-api-tool') // → 'Describe API tool'
42
+ * humanizeToolName('describe_object', tt) // → '查看对象结构' (zh)
19
43
  */
20
- export declare function humanizeToolName(name: string | undefined | null): string;
44
+ export declare function humanizeToolName(name: string | undefined | null, translate?: ToolTitleTranslator): string;
21
45
  /**
22
46
  * Detect the MCP-style `{ type: 'text', value: '<json|text>' }` envelope used
23
47
  * by `@objectstack/service-ai` tool outputs and peel it. When the inner value
@@ -38,8 +62,17 @@ export declare function summarizeChatError(err: unknown): {
38
62
  summary: string;
39
63
  details?: string;
40
64
  };
41
- /** AI quota refusal codes emitted by the cloud token guardrail (HTTP 429). */
42
- export type AiQuotaCode = 'ai_design_quota_exhausted' | 'ai_data_chat_trial_exhausted' | 'ai_allowance_exhausted';
65
+ /**
66
+ * AI quota refusal codes emitted by the cloud token guardrail (HTTP 429).
67
+ *
68
+ * TWO vocabularies, both live. cloud#1238 (the cloud#1168 convergence) landed
69
+ * the SCREAMING_SNAKE ledger codes — which is what a spec-conformant
70
+ * `error.code` must be, an `ErrorCode` ledger member. The lowercase trio is
71
+ * the legacy vocabulary that transition-period producers still emit, so it is
72
+ * KEPT rather than swapped out: dropping it would silently stop parsing every
73
+ * producer that has not converged yet (objectui#3804).
74
+ */
75
+ export type AiQuotaCode = 'AI_DESIGN_QUOTA_EXHAUSTED' | 'AI_DATA_CHAT_TRIAL_EXHAUSTED' | 'AI_ALLOWANCE_EXHAUSTED' | 'ai_design_quota_exhausted' | 'ai_data_chat_trial_exhausted' | 'ai_allowance_exhausted';
43
76
  export interface AiQuotaError {
44
77
  code: AiQuotaCode;
45
78
  /** Localized (zh) message from the backend. */
@@ -50,6 +83,31 @@ export interface AiQuotaError {
50
83
  upgrade: boolean;
51
84
  /** Paid tier -> buy a credit top-up pack. */
52
85
  topUp: boolean;
86
+ /**
87
+ * The allowance replenishes at the next daily reset, so "wait" is a real
88
+ * option alongside the CTA. Only set when the producer sends an actual
89
+ * boolean: the landed envelope carries this inside `error.details`
90
+ * (cloud#1238) and that POSITION is measured, but an absent or
91
+ * otherwise-typed value stays `undefined` rather than being coerced to a
92
+ * `false` no producer declared.
93
+ *
94
+ * ⚠️ objectui#7587 — measured on this tree: NOTHING reads this field once the
95
+ * parse fills it in. `useAiQuotaCopy` (ChatbotEnhanced), the only consumer of
96
+ * the parsed shape's fields, builds the banner from `message` / `messageEn` /
97
+ * `topUp`; the other two `parseAiQuotaError` call sites use the parse as a
98
+ * yes/no predicate. So cloud PR #1852's free-plan inversion (`true` ->
99
+ * `false`, the rolling 7-day window) changes nothing on screen, and the ISO
100
+ * `resetsAt` that producer now sends beside this flag is deliberately NOT
101
+ * read here: with no renderer for it, a read would pin a wire position this
102
+ * repo cannot measure (`objectstack-ai/cloud` is out of scope) and would add
103
+ * a second unread field rather than answer anyone's question. Both halves are
104
+ * pinned — the flag's inertness by
105
+ * `__tests__/ChatbotEnhanced.quotaResetPromise-7587.test.tsx`, the parse's
106
+ * silence about the instant by `tool-display.test.ts`. Wiring reset copy to
107
+ * this BOOLEAN is the one move to avoid: it is `false` for exactly the plan
108
+ * that needs the answer.
109
+ */
110
+ resetsTonight?: boolean;
53
111
  }
54
112
  /**
55
113
  * Recognize the cloud AI token guardrail's 429 quota refusals so the chat UI can
@@ -60,26 +118,39 @@ export interface AiQuotaError {
60
118
  * strip the same retry/format prefixes summarizeChatError handles, locate the
61
119
  * JSON object, and find the code in it. Returns null for anything else.
62
120
  *
63
- * ## Three dialects, one code set
64
- *
65
- * The two cloud 429 producers fill the same `error` key in OPPOSITE ways, and
66
- * ADR-0112 declares a third shape they are converging on (objectui#3491,
67
- * cloud#944). All three are read here so the consumer is ready BEFORE the
68
- * producers move (cloud#1168) — the alternative is a silent misfit at the
69
- * moment they converge:
70
- *
71
- * | dialect | shape |
72
- * |------------------------------|------------------------------------------------|
73
- * | declared envelope (ADR-0112) | `{ success: false, error: { code, message } }` |
74
- * | flat guardrail | `{ error: CODE, message, upgrade, topUp }` |
75
- * | service-ai sibling key | `{ error: PROSE, code: CODE }` |
76
- *
77
- * Only the code's LOCATION widens; the recognized code set is unchanged, so an
78
- * unknown shape still degrades to today's behavior (null). Note that a
79
- * spec-conformant `error.code` must be an `ErrorCode` ledger member
80
- * (SCREAMING_SNAKE) and none of these three codes is registered today, so the
81
- * nested branch matches the legacy vocabulary only — aligning the vocabulary is
82
- * cloud#1168's call and needs a follow-up here, not a guess now.
121
+ * ## Four dialects, two vocabularies
122
+ *
123
+ * The two cloud 429 producers fill the same `error` key in OPPOSITE ways
124
+ * (objectui#3491, cloud#944), and ADR-0112's declared envelope has now LANDED
125
+ * on the producer side (cloud#1168 -> cloud PR #1238), adding a fourth
126
+ * dialect: the declared envelope carrying the SCREAMING_SNAKE ledger
127
+ * vocabulary with its companion fields inside `error.details`. All four are
128
+ * read here, because the producers converge asymmetrically and the legacy
129
+ * dialects are still live (objectui#3804):
130
+ *
131
+ * | dialect | shape |
132
+ * |-------------------------------|-------------------------------------------------|
133
+ * | declared envelope + ledger | `{ error: { code: AI_*, message, details } }` |
134
+ * | declared envelope + legacy | `{ success: false, error: { code, message } }` |
135
+ * | flat guardrail | `{ error: CODE, message, upgrade, topUp }` |
136
+ * | service-ai sibling key | `{ error: PROSE, code: CODE }` |
137
+ *
138
+ * Both the code's LOCATION and the recognized code SET widen; an unknown shape
139
+ * still degrades to today's behavior (null).
140
+ *
141
+ * ## What this deliberately does NOT recognize: generic `QUOTA_EXCEEDED`
142
+ *
143
+ * `POST /api/v1/ai/agents/:name/chat`'s per-turn message cap keeps emitting the
144
+ * standard `QUOTA_EXCEEDED` (`error.details.resetAt`, `category: 'rate_limit'`)
145
+ * and did NOT move to the three `AI_*` codes — it has no upgrade / top-up /
146
+ * trial next step, which is exactly the distinction the 2026-08-11 Option A
147
+ * ruling drew when it admitted the three codes to the closed ledger.
148
+ *
149
+ * It is NOT dropped, it is handled one branch along: `isUnsentSendError` +
150
+ * `isRateLimitError` route it to the "you're sending too quickly" notice, with
151
+ * the user's text restored. Returning an `AiQuotaError` for it here would put
152
+ * an "Upgrade plan" CTA in front of a user whose cap resets in a minute.
153
+ * `tool-display.test.ts` pins that routing so the split cannot close silently.
83
154
  *
84
155
  * ## Parse priority (a total order, deliberately)
85
156
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tool-display.d.ts","sourceRoot":"","sources":["../src/tool-display.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAoBxE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAqCxD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAiCA;AAED,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GACnB,2BAA2B,GAC3B,8BAA8B,GAC9B,wBAAwB,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,SAAS,CAAC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AAW,GAEnB,2BAA2B,GAC3B,8BAA8B,GAC9B,wBAAwB,GAExB,2BAA2B,GAC3B,8BAA8B,GAC9B,wBAAwB,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,KAAK,EAAE,OAAO,CAAC;IACf;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA+CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAuDnE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAIvD;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIhE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAItD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * Locale wiring for `AiPendingActionsInbox` — objectui#7173.
10
+ *
11
+ * A module of its own, the shape `plugin-detail`'s `useDetailTranslation.ts`
12
+ * already uses: the defaults map has to be importable by the test that compares
13
+ * it against the `en` pack, and exporting a non-component from the component
14
+ * file trips `react-refresh/only-export-components`.
15
+ *
16
+ * @module
17
+ */
18
+ /**
19
+ * English fallbacks for every key the inbox reads.
20
+ *
21
+ * `createSafeTranslation` serves these when no `I18nProvider` is mounted — a
22
+ * standalone Studio panel, a host that embeds the inbox without the provider,
23
+ * this package's own tests — so a provider-less render shows English rather
24
+ * than raw keys. Every row here is byte-identical to its `en` pack value: the
25
+ * pack is what the console renders and this map is its stand-in, so the two
26
+ * must not disagree.
27
+ *
28
+ * The four relative-time rows are BORROWED from `detail.*` rather than minted
29
+ * under this namespace. They already existed, translated, in all ten packs, and
30
+ * cross-package borrowing is this repo's settled convention — `ObjectGrid`,
31
+ * `ObjectKanban`, `ObjectTree`, `ListView`, `ObjectView`, `NavigationOverlay`
32
+ * and `RecordAttachmentsPanel` all resolve `detail.*` from outside
33
+ * `plugin-detail`. One phrase on one kind of control should not get a second
34
+ * translation that can drift from the first.
35
+ *
36
+ * ⛔ The five relative-time helpers in this repo are NOT unified (objectui#7173's
37
+ * triage ruling): they differ in real behaviour — `Math.round` in this inbox vs
38
+ * `Math.floor` in `plugin-detail`, 45s/30d vs 60s/7d, different tails — and
39
+ * normalising them is a behaviour change that needs its own card. Only the
40
+ * OUTPUT is translated; `AiPendingActionsInbox.formatRelative` keeps its own
41
+ * arithmetic, pinned by `__tests__/AiPendingActionsInbox.i18n.test.tsx`.
42
+ *
43
+ * Exported from this MODULE, not from the package barrel (`src/index.tsx`
44
+ * names its exports one by one), so it stays off the published API surface
45
+ * while `__tests__/AiPendingActionsInbox.i18n.test.tsx` can compare it row by
46
+ * row against the `en` pack — the invariant
47
+ * `app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx` holds the
48
+ * detail / list / designer maps to. A row that disagrees with the pack renders
49
+ * two different labels for one control and nothing else would see it.
50
+ */
51
+ export declare const AI_APPROVALS_DEFAULT_TRANSLATIONS: Record<string, string>;
52
+ /**
53
+ * Safe wrapper for `useObjectTranslation` that falls back to the map above when
54
+ * no `I18nProvider` is mounted. Delegates to `@object-ui/i18n`'s
55
+ * `createSafeTranslation` — the factory form, not the per-call
56
+ * `useSafeTranslate(key, fallback)`: the inbox interpolates `{{count}}`,
57
+ * `{{id}}`, `{{message}}`, `{{tool}}` and `{{object}}`, and `useSafeTranslate`
58
+ * has no options argument, so those holes would reach the DOM raw. No inline
59
+ * `defaultValue` anywhere either (objectui#3517).
60
+ */
61
+ export declare const useAiApprovalsTranslation: () => {
62
+ t: (key: string, options?: Record<string, unknown>) => string;
63
+ language: string;
64
+ } | {
65
+ t: import('i18next').TFunction<string, undefined>;
66
+ language: string;
67
+ };
68
+ /**
69
+ * The `t` the inbox's module-level helpers take.
70
+ *
71
+ * `formatRelative` and `statusLabel` are plain functions, not hooks, so the
72
+ * component reads the hook once and passes `t` down — the same shape
73
+ * `ActivityTimeline` uses for its own formatter.
74
+ */
75
+ export type InboxTranslate = (key: string, options?: Record<string, unknown>) => string;
76
+ //# sourceMappingURL=useAiApprovalsTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAiApprovalsTranslation.d.ts","sourceRoot":"","sources":["../src/useAiApprovalsTranslation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqDpE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;4BAjHrC,CAAC;;;;;CAoHD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ChatbotModelOption } from './ChatbotEnhanced';
1
+ import { ChatbotModelOption } from './ChatbotEnhanced.js';
2
2
  export interface UseAiModelsOptions {
3
3
  /** Base URL of the AI service, e.g. "http://localhost:3000/api/v1/ai". */
4
4
  apiBase?: string;
@@ -1,5 +1,5 @@
1
- import { ChatMessage, ToolDecisionState } from './ChatbotEnhanced';
2
- import { ApproveOutcome, RejectOutcome } from './usePendingActions';
1
+ import { ChatMessage, ToolDecisionState } from './ChatbotEnhanced.js';
2
+ import { ApproveOutcome, RejectOutcome } from './usePendingActions.js';
3
3
  export type { ToolDecisionState };
4
4
  export interface UseHitlInChatOptions {
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { ChatMessage as OuiChatMessage } from '@object-ui/types';
2
- import { SeamChatMessage } from './chatMessageAdapter';
1
+ import { useChat } from '@ai-sdk/react';
2
+ import { SeamChatMessage } from './chatMessageAdapter.js';
3
3
  /**
4
4
  * What `useObjectChat` actually emits — from `messages` and from the
5
5
  * `onSend(content, messages)` callback fed from it (objectui#4424).
@@ -20,6 +20,11 @@ import { SeamChatMessage } from './chatMessageAdapter';
20
20
  * surface unchanged and are folded only at the render seam, which is the
21
21
  * decision `chatMessageAdapter.ts` records. So the runtime type would have
22
22
  * been a lie about local mode.
23
+ * - **wide where API mode is wide.** The AI SDK's three approval states
24
+ * (`approval-requested`, `approval-responded`, `output-denied`) are
25
+ * runtime-only — the authoring contract refuses them (objectui#10018) —
26
+ * but API mode produces them, so its tool invocations carry them. So the
27
+ * authoring type would have been a lie about API mode.
23
28
  * - **narrow where BOTH modes are narrow.** `timestamp` is `string`, never
24
29
  * `Date`: API mode never produces one and local mode absorbs it in
25
30
  * `normalizeMessages` before it is ever handed out. Declaring `Date` here
@@ -29,10 +34,15 @@ import { SeamChatMessage } from './chatMessageAdapter';
29
34
  * draft-review / proposed-plan / builder-handoff extensions on each tool
30
35
  * invocation.
31
36
  *
32
- * It is a SUBTYPE of `@object-ui/types`' `ChatMessage`, which is what makes the
33
- * change invisible to correct consumers: anything that accepted the authoring
34
- * type still accepts these values, including a host `onSend` callback that
35
- * declares its parameter as `ChatMessage[]`.
37
+ * ⚠️ It is NOT a subtype of `@object-ui/types`' `ChatMessage` (objectui#10018).
38
+ * It was one until the authoring `state` union shed the three runtime-only
39
+ * approval states; the values did not change, the authoring contract did. So a
40
+ * host `onSend` callback that declares its parameter as the authoring
41
+ * `ChatMessage[]` no longer type-checks — it was being handed states that
42
+ * contract refuses. Declare it as `ObjectChatMessage[]`. `ChatbotSchema.onSend`
43
+ * (the schema's runtime slot, forwarded here by the three renderers) is typed
44
+ * with the authoring shape widened by exactly those three states, and this type
45
+ * is assignable to it.
36
46
  */
37
47
  export type ObjectChatMessage = Omit<SeamChatMessage, 'timestamp'> & {
38
48
  /**
@@ -109,10 +119,35 @@ export declare function withTurnId(req: {
109
119
  * first turn to seed the ask thread as context. Exported for unit testing.
110
120
  */
111
121
  export declare function withHandoffContext(body: Record<string, unknown>, parentConversationId: string): Record<string, unknown>;
112
- /** Test seam: forget that the inert-`maxToolRoundtrips` notice has been given. */
113
- export declare function resetMaxToolRoundtripsWarning(): void;
114
- type InitialMessage = OuiChatMessage & {
115
- parts?: Array<Record<string, unknown>>;
122
+ /**
123
+ * One initial message — the seam's INPUT shape ({@link SeamChatMessage}), not
124
+ * the authoring one (objectui#10018).
125
+ *
126
+ * The two callers hand in different things: the schema renderer passes
127
+ * `schema.messages` (authored), and app-shell passes the output of
128
+ * `hydratedMessagesToChatMessages` — RUNTIME values restored from server
129
+ * history, which carry the AI SDK's approval states and the render-only keys.
130
+ * The authoring `ChatMessage` refuses those approval states, so it cannot type
131
+ * the second caller; the seam's input admits both, and the authoring shape is
132
+ * assignable to it, so no authored caller is affected.
133
+ */
134
+ type InitialMessage = SeamChatMessage & {
135
+ /**
136
+ * Pre-built chat-runtime parts, handed through to the store untouched when
137
+ * present. Declared as {@link SdkChatMessage}'s own part array — DERIVED, so
138
+ * a runtime bump moves it — rather than as the `Array<Record<string,
139
+ * unknown>>` it used to be (objectui#8426).
140
+ *
141
+ * ⚠️ **BREAKING for a host that passes `parts`.** `Record<string, unknown>`
142
+ * admitted every object, including the ones the store cannot hold, and the
143
+ * mismatch was absorbed by a cast at the `useChat` call instead of being
144
+ * reported here. Nothing in this repository sets this member (the schema
145
+ * renderer passes `schema.messages`, and app-shell passes the output of
146
+ * `hydratedMessagesToChatMessages`, whose literal declares no `parts`), so
147
+ * the narrowing is visible only to external hosts — which is exactly the
148
+ * population it protects.
149
+ */
150
+ parts?: SdkChatMessage['parts'];
116
151
  reasoning?: string;
117
152
  };
118
153
  /**
@@ -162,18 +197,6 @@ export interface UseObjectChatOptions {
162
197
  * Additional body parameters for each API request.
163
198
  */
164
199
  body?: Record<string, unknown>;
165
- /**
166
- * Maximum tool-calling round-trips per message.
167
- *
168
- * @deprecated objectui#5605 — INERT. Nothing reads this value: the installed
169
- * chat runtime exposes no client-side round-trip cap, and ObjectUI does not
170
- * own the server loop. Setting it has never had an effect, and it does not
171
- * acquire one by being set. Cap tool-calling loops on the agent instead
172
- * (`planning.maxIterations`). Still accepted so existing documents keep
173
- * parsing; authoring it now logs a one-time notice, and it is slated for
174
- * removal in a future major. See {@link warnMaxToolRoundtripsInert}.
175
- */
176
- maxToolRoundtrips?: number;
177
200
  /**
178
201
  * Error callback.
179
202
  */
@@ -199,10 +222,12 @@ export interface UseObjectChatOptions {
199
222
  * External send callback (fires for both modes).
200
223
  *
201
224
  * `messages` is the thread as it will be after this send, in the same shape
202
- * the hook's own `messages` uses — see {@link ObjectChatMessage}. A callback
203
- * that declares the parameter as `@object-ui/types`' `ChatMessage[]` still
204
- * type-checks (the emitted shape is a subtype); declaring it as
205
- * `ObjectChatMessage[]` is what lets you READ the render-only keys.
225
+ * the hook's own `messages` uses — see {@link ObjectChatMessage}. Declare the
226
+ * parameter as `ObjectChatMessage[]`: that is also what lets you READ the
227
+ * render-only keys. ⚠️ A callback that declares it as `@object-ui/types`'
228
+ * authoring `ChatMessage[]` no longer type-checks (objectui#10018) — the
229
+ * emitted shape can carry the three runtime-only approval states that the
230
+ * authoring contract refuses, so it is not a subtype of it.
206
231
  */
207
232
  onSend?: (content: string, messages: ObjectChatMessage[]) => void;
208
233
  }
@@ -227,7 +252,41 @@ export interface UseObjectChatReturn {
227
252
  reload: () => void;
228
253
  /** Clear all messages */
229
254
  clear: () => void;
230
- /** ADR-0013 D2: re-hydrate the thread (API mode only); undefined in local mode. */
255
+ /**
256
+ * ADR-0013 D2: re-hydrate the thread (API mode only); undefined in local mode.
257
+ *
258
+ * Deliberately loose, and — since objectui#8342 — honest about it. The
259
+ * parameter stays `unknown[]` because this package will not republish
260
+ * `@ai-sdk/react`'s pinned `UIMessage` on its own surface; that is the same
261
+ * call objectui#8214 made one file over for `AnyPart.state`. Parameters are
262
+ * CONTRAVARIANT, so this declaration used to be a lie: the value handed out
263
+ * was the SDK's own `setMessages`, which accepts only its `UIMessage[]`, and
264
+ * the only thing stopping `tsc` from saying so was a `chatResult as any`
265
+ * inside the hook.
266
+ *
267
+ * What the implementation now guarantees, which is what makes the
268
+ * declaration a promise it keeps: the hook wraps the SDK function and CHECKS
269
+ * every element before handing the array on. A value that is not a chat
270
+ * message — not an object, or missing a string `id`, a
271
+ * `'user' | 'assistant' | 'system'` role, or a `parts` array — is REFUSED
272
+ * LOUDLY: the call throws a `TypeError` naming the offending index, and the
273
+ * SDK's store is left untouched, because the whole array is checked before
274
+ * anything is written.
275
+ *
276
+ * Refusing rather than FILTERING is the contract, on purpose. This is a
277
+ * re-hydration path: the caller's statement is "the thread is now exactly
278
+ * these messages". Dropping the elements that failed would install a SHORTER
279
+ * thread with no way for the caller to notice — the return type is `void` —
280
+ * which is the same silent-deletion failure objectui#4424 was graded on. The
281
+ * one in-repo consumer, `@object-ui/app-shell`'s `useReconcileOnError`,
282
+ * already calls this inside a `try`/`catch` that falls through to the
283
+ * ordinary error banner, so a refusal degrades to "show the error" instead of
284
+ * to a quietly-truncated transcript.
285
+ *
286
+ * Note the surface accepts an ARRAY only. The SDK's own `setMessages` also
287
+ * takes an updater callback; this member never advertised one and still
288
+ * does not.
289
+ */
231
290
  setMessages?: (messages: unknown[]) => void;
232
291
  /** Whether the hook is operating in API (streaming) mode */
233
292
  isApiMode: boolean;
@@ -238,6 +297,14 @@ export interface UseObjectChatReturn {
238
297
  /** Handle input change event */
239
298
  handleInputChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
240
299
  }
300
+ /**
301
+ * The message element the PINNED `@ai-sdk/react` `setMessages` accepts,
302
+ * DERIVED from that function rather than restated. No SDK type is named here,
303
+ * so a version bump that moves `UIMessage` moves this alias with it and the
304
+ * published `UseObjectChatReturn['setMessages']` never has to move at all —
305
+ * which is precisely why objectui#8342 was ruled option B and not option A.
306
+ */
307
+ type SdkChatMessage = Extract<Parameters<ReturnType<typeof useChat>['setMessages']>[0], readonly unknown[]>[number];
241
308
  /**
242
309
  * useObjectChat – Composable hook for ObjectUI Chatbot.
243
310
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useObjectChat.d.ts","sourceRoot":"","sources":["../src/useObjectChat.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG;IACnE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAElE,6EAA6E;AAC7E,wBAAgB,kBAAkB,IAAI,IAAI,CAOzC;AAED,mFAAmF;AACnF,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,WAAW,GAAG,GAAG,EACxB,IAAI,CAAC,EA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