@rimori/client 2.5.41 → 2.5.42
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/bin/rimori-init.mjs +2 -0
- package/bin/rimori-release.mjs +2 -0
- package/dist/cli/scripts/init/main.js +0 -0
- package/dist/cli/scripts/release/release.js +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/plugin/module/AIModule.d.ts +4 -0
- package/dist/plugin/module/AIModule.js +7 -2
- package/package.json +5 -3
|
File without changes
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { Translator } from './controller/TranslationController';
|
|
|
16
16
|
export type { TriggerAction } from './plugin/module/ExerciseModule';
|
|
17
17
|
export type { Message, ToolInvocation } from './plugin/module/AIModule';
|
|
18
18
|
export type { Theme, ApplicationMode } from './plugin/module/PluginModule';
|
|
19
|
-
export type { UserInfo, Language, UserRole, SubscriptionTier, ExplicitUndefined, BasePluginSettings } from './plugin/module/PluginModule';
|
|
19
|
+
export type { UserInfo, Language, UserRole, SubscriptionTier, ExplicitUndefined, BasePluginSettings, Buddy } from './plugin/module/PluginModule';
|
|
20
20
|
export { TIER_ORDER, ROLE_ORDER } from './plugin/module/PluginModule';
|
|
21
21
|
export type { SharedContent, BasicSharedContent, ContentStatus } from './plugin/module/SharedContentController';
|
|
22
22
|
export type { MacroAccomplishmentPayload, MicroAccomplishmentPayload } from './controller/AccomplishmentController';
|
|
@@ -151,6 +151,9 @@ export declare class AIModule {
|
|
|
151
151
|
* @param request.tools The tools to use for generation.
|
|
152
152
|
* @param request.prompt Server-side prompt name (e.g. 'writing.analysis').
|
|
153
153
|
* @param request.variables Variables for the server-side prompt template.
|
|
154
|
+
* @param request.settledOnly When true, each `onResult` snapshot contains only leaves
|
|
155
|
+
* that have finished generating; in-progress leaves are omitted until complete. Use
|
|
156
|
+
* this when the UI should reveal a field atomically rather than token-by-token.
|
|
154
157
|
*/
|
|
155
158
|
getStreamedObject<T = any>(params: {
|
|
156
159
|
onResult: OnStreamedObjectResult<T>;
|
|
@@ -158,6 +161,7 @@ export declare class AIModule {
|
|
|
158
161
|
tools?: Tool[];
|
|
159
162
|
prompt?: string;
|
|
160
163
|
variables?: Record<string, any>;
|
|
164
|
+
settledOnly?: boolean;
|
|
161
165
|
}): Promise<T>;
|
|
162
166
|
private streamObject;
|
|
163
167
|
private sendToolResult;
|
|
@@ -186,9 +186,12 @@ export class AIModule {
|
|
|
186
186
|
* @param request.tools The tools to use for generation.
|
|
187
187
|
* @param request.prompt Server-side prompt name (e.g. 'writing.analysis').
|
|
188
188
|
* @param request.variables Variables for the server-side prompt template.
|
|
189
|
+
* @param request.settledOnly When true, each `onResult` snapshot contains only leaves
|
|
190
|
+
* that have finished generating; in-progress leaves are omitted until complete. Use
|
|
191
|
+
* this when the UI should reveal a field atomically rather than token-by-token.
|
|
189
192
|
*/
|
|
190
193
|
async getStreamedObject(params) {
|
|
191
|
-
const { onResult, cache = false, tools = [], prompt, variables } = params;
|
|
194
|
+
const { onResult, cache = false, tools = [], prompt, variables, settledOnly = false } = params;
|
|
192
195
|
return await this.streamObject({
|
|
193
196
|
messages: [],
|
|
194
197
|
onResult,
|
|
@@ -196,10 +199,11 @@ export class AIModule {
|
|
|
196
199
|
tools,
|
|
197
200
|
prompt,
|
|
198
201
|
variables,
|
|
202
|
+
settledOnly,
|
|
199
203
|
});
|
|
200
204
|
}
|
|
201
205
|
async streamObject(params) {
|
|
202
|
-
const { messages, onResult = () => null, cache = false, tools = [], prompt, variables, } = params;
|
|
206
|
+
const { messages, onResult = () => null, cache = false, tools = [], prompt, variables, settledOnly = false, } = params;
|
|
203
207
|
const chatMessages = messages.map((message, index) => ({
|
|
204
208
|
...message,
|
|
205
209
|
id: `${index + 1}`,
|
|
@@ -208,6 +212,7 @@ export class AIModule {
|
|
|
208
212
|
cache,
|
|
209
213
|
tools,
|
|
210
214
|
stream: true,
|
|
215
|
+
settled_only: settledOnly,
|
|
211
216
|
messages: chatMessages,
|
|
212
217
|
session_token_id: this.sessionTokenId ?? undefined,
|
|
213
218
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimori/client",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.42",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"bin": {
|
|
13
|
-
"rimori-release": "./
|
|
14
|
-
"rimori-init": "./
|
|
13
|
+
"rimori-release": "./bin/rimori-release.mjs",
|
|
14
|
+
"rimori-init": "./bin/rimori-init.mjs"
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
|
+
"bin",
|
|
19
20
|
"README.md"
|
|
20
21
|
],
|
|
21
22
|
"exports": {
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/node": "^25.0.1",
|
|
41
|
+
"eslint": "^10.0.0",
|
|
40
42
|
"eslint-config-prettier": "^10.1.8",
|
|
41
43
|
"globals": "^16.4.0",
|
|
42
44
|
"prettier": "^3.6.2",
|