@object-ui/plugin-chatbot 17.1.0 → 17.2.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 +94 -0
- package/dist/usePendingActions.d.ts +25 -32
- package/dist/usePendingActions.d.ts.map +1 -1
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
# @object-ui/plugin-chatbot
|
|
2
2
|
|
|
3
|
+
## 17.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c5ccbd5: Stop declaring 12 `@object-ui/data-objectstack` / `@object-ui/plugin-chatbot` /
|
|
8
|
+
`@object-ui/plugin-list` symbols under names `@objectstack/spec` owns
|
|
9
|
+
(objectui#3160, objectstack#4115 batch 6). All three packages leave the ledger.
|
|
10
|
+
|
|
11
|
+
**Breaking for importers of `@object-ui/data-objectstack`** — four exported
|
|
12
|
+
names changed, because the spec exports the same name for a _different_ thing:
|
|
13
|
+
|
|
14
|
+
| was | now | what the spec's same-named export actually is |
|
|
15
|
+
| :-------------------- | :-------------------------- | :--------------------------------------------------------------------------------------- |
|
|
16
|
+
| `CacheStats` | `MetadataCacheStats` | the platform `ICacheService` counters (`keyCount`, `memoryUsage`) |
|
|
17
|
+
| `MetadataSaveOptions` | `MetadataClientSaveOptions` | options for writing a metadata item to a **file** (`format`, `path`, `indent`, `atomic`) |
|
|
18
|
+
| `SecurityPolicy` | `SecurityManagerPolicy` | the package supply-chain policy (`autoScan`, licences, code signing, sandbox) |
|
|
19
|
+
| `ValidationError` | `DataApiValidationError` | a plain `{ field, message, code? }` entry in a validation report |
|
|
20
|
+
|
|
21
|
+
Each pair is disjoint or nearly so — `MetadataSaveOptions` and `SecurityPolicy`
|
|
22
|
+
share not one key with the spec type whose name they wore — so none of them was
|
|
23
|
+
a dialect to reconcile; they were four unrelated concepts squatting on spec
|
|
24
|
+
names. `DataApiValidationError` follows the `<what was validated>Validation<Error|Result>`
|
|
25
|
+
convention registered on objectstack#4115 (`@object-ui/core` took
|
|
26
|
+
`SchemaNodeValidationError` in batch 4). Its **runtime** `name` deliberately
|
|
27
|
+
stays `'ValidationError'`: `normaliseClientError` and `@object-ui/react`'s
|
|
28
|
+
error-message helper both sniff `err.name`, so that string is a wire contract,
|
|
29
|
+
not a symbol.
|
|
30
|
+
|
|
31
|
+
**Breaking for importers of `@object-ui/plugin-chatbot`** — `PendingActionRow`
|
|
32
|
+
and `PendingActionStatus` are now re-exported from `@objectstack/spec/contracts`
|
|
33
|
+
instead of hand-transcribed, which narrows them. The copies had drifted three
|
|
34
|
+
ways, and each drift had **disabled a compile-time check** rather than merely
|
|
35
|
+
differed from one:
|
|
36
|
+
|
|
37
|
+
- `status: PendingActionStatus | string` — a union with `string` absorbs the
|
|
38
|
+
literals, so that annotation carried no information at all;
|
|
39
|
+
- `[key: string]: unknown` — the objectstack#4075 mechanism: an index signature
|
|
40
|
+
makes every structural comparison against the spec answer "identical", however
|
|
41
|
+
far the copy has drifted;
|
|
42
|
+
- `created_at` / `updated_at`, which the service contract does not carry and no
|
|
43
|
+
consumer in this repo reads.
|
|
44
|
+
|
|
45
|
+
**Breaking for importers of `@object-ui/plugin-list`** — `ViewTab` is derived from the spec's `ViewTabSchema`
|
|
46
|
+
— from its **input** side, because `pinned` / `isDefault` / `visible` carry
|
|
47
|
+
`.default()`s and this component is handed authored metadata, not parsed output.
|
|
48
|
+
That removes a renderer-side tolerance the copy carried: `visible` accepted
|
|
49
|
+
`string | boolean` and the tab bar compared it against the literal `'false'`, a
|
|
50
|
+
spelling no producer emits. `label` also stops being required (the spec makes it
|
|
51
|
+
optional; `name` is the identifier) and `filter` stops being `any`.
|
|
52
|
+
|
|
53
|
+
`ListView` and `UserFilters` keep their names as declared dialects: both are the
|
|
54
|
+
React **renderers** of the spec types whose names they share, and each takes that
|
|
55
|
+
spec type as a prop (`ListViewProps.schema`, `UserFiltersProps.config`) rather
|
|
56
|
+
than restating its shape. `Tool` and `MessageContent` in `plugin-chatbot` are
|
|
57
|
+
vendored Vercel AI Elements / Shadcn primitives — upstream's component API, not
|
|
58
|
+
objectui's authored surface — so the guard now skips that directory the same way
|
|
59
|
+
it already skips `components/src/ui/`, with a test that fails if any file there
|
|
60
|
+
stops carrying its vendor banner.
|
|
61
|
+
|
|
62
|
+
Scored `minor`, not `major`, per this repo's fixed-group rule — objectui's major
|
|
63
|
+
tracks `@objectstack`, so breaking changes of our own ship as minor with the
|
|
64
|
+
semantics spelled out above (see AGENTS.md §版本号策略). A `major` here would carry
|
|
65
|
+
all 39 packages of the fixed group to `18.0.0` and off objectstack's 17.x line.
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [4ae0ac4]
|
|
70
|
+
- Updated dependencies [696e3c1]
|
|
71
|
+
- Updated dependencies [bca45cc]
|
|
72
|
+
- Updated dependencies [a889e31]
|
|
73
|
+
- Updated dependencies [09d30a4]
|
|
74
|
+
- Updated dependencies [4bf612c]
|
|
75
|
+
- Updated dependencies [335041c]
|
|
76
|
+
- Updated dependencies [b414983]
|
|
77
|
+
- Updated dependencies [256f8cc]
|
|
78
|
+
- Updated dependencies [d9668a7]
|
|
79
|
+
- Updated dependencies [4b470b9]
|
|
80
|
+
- Updated dependencies [cb82705]
|
|
81
|
+
- Updated dependencies [f572849]
|
|
82
|
+
- Updated dependencies [f6e8d78]
|
|
83
|
+
- Updated dependencies [ea96284]
|
|
84
|
+
- Updated dependencies [d3584c6]
|
|
85
|
+
- Updated dependencies [a8ad6c0]
|
|
86
|
+
- Updated dependencies [444457c]
|
|
87
|
+
- Updated dependencies [850033c]
|
|
88
|
+
- Updated dependencies [022e4c3]
|
|
89
|
+
- Updated dependencies [009e25d]
|
|
90
|
+
- Updated dependencies [726b89c]
|
|
91
|
+
- @object-ui/types@17.2.0
|
|
92
|
+
- @object-ui/components@17.2.0
|
|
93
|
+
- @object-ui/core@17.2.0
|
|
94
|
+
- @object-ui/react@17.2.0
|
|
95
|
+
- @object-ui/i18n@17.2.0
|
|
96
|
+
|
|
3
97
|
## 17.1.0
|
|
4
98
|
|
|
5
99
|
### Patch Changes
|
|
@@ -1,38 +1,31 @@
|
|
|
1
|
+
import { PendingActionRow, PendingActionStatus } from '@objectstack/spec/contracts';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Lifecycle of a pending action proposal, and the row `GET
|
|
4
|
+
* /api/v1/ai/pending-actions` returns — THE spec types, re-exported
|
|
5
|
+
* (objectui#3160, objectstack#4115 ledger batch 6).
|
|
4
6
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
* `@objectstack/spec/contracts` declares both as the contract of
|
|
8
|
+
* `IAIService.proposePendingAction` / `.listPendingActions`, which is exactly
|
|
9
|
+
* what the REST route serialises; the copies that used to live here were a
|
|
10
|
+
* hand transcription of the same rows and had drifted in three ways, each of
|
|
11
|
+
* which silently disabled a compile-time check:
|
|
12
|
+
*
|
|
13
|
+
* - `status: PendingActionStatus | string` — a union with `string` ABSORBS the
|
|
14
|
+
* literals, so the type conveyed nothing at all and `statusesForTab` could
|
|
15
|
+
* have returned a status the server has never heard of;
|
|
16
|
+
* - `[k: string]: unknown` — the objectstack#4075 mechanism: an index
|
|
17
|
+
* signature makes any structural comparison against the spec answer
|
|
18
|
+
* "identical" no matter how far the copy drifts;
|
|
19
|
+
* - `created_at` / `updated_at`, which the contract does not carry and no
|
|
20
|
+
* consumer in this repo reads. If the inbox ever needs them, the fix is to
|
|
21
|
+
* model them in the spec, not to re-widen the row here.
|
|
22
|
+
*
|
|
23
|
+
* `| null` was dropped with the copy for the same reason: it described what a
|
|
24
|
+
* nullable SQL column might serialise to, not what the contract promises, and
|
|
25
|
+
* every reader here (`formatRelative`, `safeParseJson`) already accepts
|
|
26
|
+
* `null | undefined` on its own parameter.
|
|
14
27
|
*/
|
|
15
|
-
export
|
|
16
|
-
id: string;
|
|
17
|
-
conversation_id?: string | null;
|
|
18
|
-
message_id?: string | null;
|
|
19
|
-
object_name: string;
|
|
20
|
-
action_name: string;
|
|
21
|
-
tool_name: string;
|
|
22
|
-
/** JSON-encoded string. Consumers typically `JSON.parse` to render. */
|
|
23
|
-
tool_input: string;
|
|
24
|
-
status: PendingActionStatus | string;
|
|
25
|
-
result?: string | null;
|
|
26
|
-
error?: string | null;
|
|
27
|
-
rejection_reason?: string | null;
|
|
28
|
-
proposed_by?: string | null;
|
|
29
|
-
decided_by?: string | null;
|
|
30
|
-
proposed_at?: string;
|
|
31
|
-
decided_at?: string | null;
|
|
32
|
-
created_at?: string;
|
|
33
|
-
updated_at?: string;
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
}
|
|
28
|
+
export type { PendingActionRow, PendingActionStatus };
|
|
36
29
|
/**
|
|
37
30
|
* Successful approval outcome returned by
|
|
38
31
|
* `POST /api/v1/ai/pending-actions/:id/approve`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePendingActions.d.ts","sourceRoot":"","sources":["../src/usePendingActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH,
|
|
1
|
+
{"version":3,"file":"usePendingActions.d.ts","sourceRoot":"","sources":["../src/usePendingActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,MAAM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@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-chatbot",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Chatbot interface plugin for Object UI",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ai-sdk/react": "^4.0.40",
|
|
28
28
|
"@radix-ui/react-slot": "^1.3.3",
|
|
29
|
+
"@objectstack/spec": "^17.0.0-rc.1",
|
|
29
30
|
"@radix-ui/react-use-controllable-state": "^1.2.6",
|
|
30
31
|
"ai": "^7.0.37",
|
|
31
32
|
"class-variance-authority": "^0.7.1",
|
|
@@ -38,11 +39,11 @@
|
|
|
38
39
|
"shiki": "^4.3.1",
|
|
39
40
|
"streamdown": "^2.5.0",
|
|
40
41
|
"use-stick-to-bottom": "^1.1.6",
|
|
41
|
-
"@object-ui/components": "17.
|
|
42
|
-
"@object-ui/core": "17.
|
|
43
|
-
"@object-ui/i18n": "17.
|
|
44
|
-
"@object-ui/react": "17.
|
|
45
|
-
"@object-ui/types": "17.
|
|
42
|
+
"@object-ui/components": "17.2.0",
|
|
43
|
+
"@object-ui/core": "17.2.0",
|
|
44
|
+
"@object-ui/i18n": "17.2.0",
|
|
45
|
+
"@object-ui/react": "17.2.0",
|
|
46
|
+
"@object-ui/types": "17.2.0"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"build": "vite build",
|
|
86
87
|
"test": "vitest run",
|
|
87
88
|
"test:watch": "vitest",
|
|
88
|
-
"type-check": "tsc --noEmit",
|
|
89
|
+
"type-check": "tsc --noEmit && tsc -p tsconfig.typetests.json",
|
|
89
90
|
"lint": "eslint ."
|
|
90
91
|
}
|
|
91
92
|
}
|