rice-node-sdk 1.0.2 → 1.0.3
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/dist/Client.js +4 -1
- package/dist/index.d.ts +839 -0
- package/dist/state/index.d.ts +90 -1
- package/dist/state/index.js +322 -1
- package/dist/state/proto/state.proto +198 -4
- package/dist/state/tools.d.ts +839 -0
- package/dist/storage/client/BaseClient.d.ts +1 -0
- package/dist/storage/client/GrpcClient.js +15 -6
- package/dist/storage/client/HttpClient.js +13 -3
- package/dist/tools/anthropic.d.ts +271 -0
- package/dist/tools/anthropic.js +148 -0
- package/dist/tools/execute.d.ts +1 -1
- package/dist/tools/execute.js +22 -0
- package/dist/tools/google.d.ts +273 -0
- package/dist/tools/google.js +150 -0
- package/dist/tools/openai.d.ts +295 -0
- package/dist/tools/openai.js +175 -0
- package/package.json +1 -1
package/dist/tools/openai.d.ts
CHANGED
|
@@ -11,6 +11,20 @@ export declare const state: ({
|
|
|
11
11
|
description: string;
|
|
12
12
|
};
|
|
13
13
|
query?: undefined;
|
|
14
|
+
name?: undefined;
|
|
15
|
+
value?: undefined;
|
|
16
|
+
source?: undefined;
|
|
17
|
+
description?: undefined;
|
|
18
|
+
priority?: undefined;
|
|
19
|
+
parentId?: undefined;
|
|
20
|
+
goalId?: undefined;
|
|
21
|
+
status?: undefined;
|
|
22
|
+
statusFilter?: undefined;
|
|
23
|
+
agentId?: undefined;
|
|
24
|
+
actionType?: undefined;
|
|
25
|
+
actionDetails?: undefined;
|
|
26
|
+
limit?: undefined;
|
|
27
|
+
actionTypeFilter?: undefined;
|
|
14
28
|
};
|
|
15
29
|
required: string[];
|
|
16
30
|
};
|
|
@@ -28,8 +42,289 @@ export declare const state: ({
|
|
|
28
42
|
description: string;
|
|
29
43
|
};
|
|
30
44
|
content?: undefined;
|
|
45
|
+
name?: undefined;
|
|
46
|
+
value?: undefined;
|
|
47
|
+
source?: undefined;
|
|
48
|
+
description?: undefined;
|
|
49
|
+
priority?: undefined;
|
|
50
|
+
parentId?: undefined;
|
|
51
|
+
goalId?: undefined;
|
|
52
|
+
status?: undefined;
|
|
53
|
+
statusFilter?: undefined;
|
|
54
|
+
agentId?: undefined;
|
|
55
|
+
actionType?: undefined;
|
|
56
|
+
actionDetails?: undefined;
|
|
57
|
+
limit?: undefined;
|
|
58
|
+
actionTypeFilter?: undefined;
|
|
31
59
|
};
|
|
32
60
|
required: string[];
|
|
33
61
|
};
|
|
34
62
|
};
|
|
63
|
+
} | {
|
|
64
|
+
type: string;
|
|
65
|
+
function: {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
parameters: {
|
|
69
|
+
type: string;
|
|
70
|
+
properties: {
|
|
71
|
+
name: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
};
|
|
75
|
+
value: {
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
source: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
content?: undefined;
|
|
83
|
+
query?: undefined;
|
|
84
|
+
description?: undefined;
|
|
85
|
+
priority?: undefined;
|
|
86
|
+
parentId?: undefined;
|
|
87
|
+
goalId?: undefined;
|
|
88
|
+
status?: undefined;
|
|
89
|
+
statusFilter?: undefined;
|
|
90
|
+
agentId?: undefined;
|
|
91
|
+
actionType?: undefined;
|
|
92
|
+
actionDetails?: undefined;
|
|
93
|
+
limit?: undefined;
|
|
94
|
+
actionTypeFilter?: undefined;
|
|
95
|
+
};
|
|
96
|
+
required: string[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
} | {
|
|
100
|
+
type: string;
|
|
101
|
+
function: {
|
|
102
|
+
name: string;
|
|
103
|
+
description: string;
|
|
104
|
+
parameters: {
|
|
105
|
+
type: string;
|
|
106
|
+
properties: {
|
|
107
|
+
name: {
|
|
108
|
+
type: string;
|
|
109
|
+
description: string;
|
|
110
|
+
};
|
|
111
|
+
content?: undefined;
|
|
112
|
+
query?: undefined;
|
|
113
|
+
value?: undefined;
|
|
114
|
+
source?: undefined;
|
|
115
|
+
description?: undefined;
|
|
116
|
+
priority?: undefined;
|
|
117
|
+
parentId?: undefined;
|
|
118
|
+
goalId?: undefined;
|
|
119
|
+
status?: undefined;
|
|
120
|
+
statusFilter?: undefined;
|
|
121
|
+
agentId?: undefined;
|
|
122
|
+
actionType?: undefined;
|
|
123
|
+
actionDetails?: undefined;
|
|
124
|
+
limit?: undefined;
|
|
125
|
+
actionTypeFilter?: undefined;
|
|
126
|
+
};
|
|
127
|
+
required: string[];
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
type: string;
|
|
132
|
+
function: {
|
|
133
|
+
name: string;
|
|
134
|
+
description: string;
|
|
135
|
+
parameters: {
|
|
136
|
+
type: string;
|
|
137
|
+
properties: {
|
|
138
|
+
content?: undefined;
|
|
139
|
+
query?: undefined;
|
|
140
|
+
name?: undefined;
|
|
141
|
+
value?: undefined;
|
|
142
|
+
source?: undefined;
|
|
143
|
+
description?: undefined;
|
|
144
|
+
priority?: undefined;
|
|
145
|
+
parentId?: undefined;
|
|
146
|
+
goalId?: undefined;
|
|
147
|
+
status?: undefined;
|
|
148
|
+
statusFilter?: undefined;
|
|
149
|
+
agentId?: undefined;
|
|
150
|
+
actionType?: undefined;
|
|
151
|
+
actionDetails?: undefined;
|
|
152
|
+
limit?: undefined;
|
|
153
|
+
actionTypeFilter?: undefined;
|
|
154
|
+
};
|
|
155
|
+
required?: undefined;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
} | {
|
|
159
|
+
type: string;
|
|
160
|
+
function: {
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
parameters: {
|
|
164
|
+
type: string;
|
|
165
|
+
properties: {
|
|
166
|
+
description: {
|
|
167
|
+
type: string;
|
|
168
|
+
description: string;
|
|
169
|
+
};
|
|
170
|
+
priority: {
|
|
171
|
+
type: string;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
parentId: {
|
|
175
|
+
type: string;
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
content?: undefined;
|
|
179
|
+
query?: undefined;
|
|
180
|
+
name?: undefined;
|
|
181
|
+
value?: undefined;
|
|
182
|
+
source?: undefined;
|
|
183
|
+
goalId?: undefined;
|
|
184
|
+
status?: undefined;
|
|
185
|
+
statusFilter?: undefined;
|
|
186
|
+
agentId?: undefined;
|
|
187
|
+
actionType?: undefined;
|
|
188
|
+
actionDetails?: undefined;
|
|
189
|
+
limit?: undefined;
|
|
190
|
+
actionTypeFilter?: undefined;
|
|
191
|
+
};
|
|
192
|
+
required: string[];
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
type: string;
|
|
197
|
+
function: {
|
|
198
|
+
name: string;
|
|
199
|
+
description: string;
|
|
200
|
+
parameters: {
|
|
201
|
+
type: string;
|
|
202
|
+
properties: {
|
|
203
|
+
goalId: {
|
|
204
|
+
type: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
status: {
|
|
208
|
+
type: string;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
content?: undefined;
|
|
212
|
+
query?: undefined;
|
|
213
|
+
name?: undefined;
|
|
214
|
+
value?: undefined;
|
|
215
|
+
source?: undefined;
|
|
216
|
+
description?: undefined;
|
|
217
|
+
priority?: undefined;
|
|
218
|
+
parentId?: undefined;
|
|
219
|
+
statusFilter?: undefined;
|
|
220
|
+
agentId?: undefined;
|
|
221
|
+
actionType?: undefined;
|
|
222
|
+
actionDetails?: undefined;
|
|
223
|
+
limit?: undefined;
|
|
224
|
+
actionTypeFilter?: undefined;
|
|
225
|
+
};
|
|
226
|
+
required: string[];
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
} | {
|
|
230
|
+
type: string;
|
|
231
|
+
function: {
|
|
232
|
+
name: string;
|
|
233
|
+
description: string;
|
|
234
|
+
parameters: {
|
|
235
|
+
type: string;
|
|
236
|
+
properties: {
|
|
237
|
+
statusFilter: {
|
|
238
|
+
type: string;
|
|
239
|
+
description: string;
|
|
240
|
+
};
|
|
241
|
+
content?: undefined;
|
|
242
|
+
query?: undefined;
|
|
243
|
+
name?: undefined;
|
|
244
|
+
value?: undefined;
|
|
245
|
+
source?: undefined;
|
|
246
|
+
description?: undefined;
|
|
247
|
+
priority?: undefined;
|
|
248
|
+
parentId?: undefined;
|
|
249
|
+
goalId?: undefined;
|
|
250
|
+
status?: undefined;
|
|
251
|
+
agentId?: undefined;
|
|
252
|
+
actionType?: undefined;
|
|
253
|
+
actionDetails?: undefined;
|
|
254
|
+
limit?: undefined;
|
|
255
|
+
actionTypeFilter?: undefined;
|
|
256
|
+
};
|
|
257
|
+
required?: undefined;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
} | {
|
|
261
|
+
type: string;
|
|
262
|
+
function: {
|
|
263
|
+
name: string;
|
|
264
|
+
description: string;
|
|
265
|
+
parameters: {
|
|
266
|
+
type: string;
|
|
267
|
+
properties: {
|
|
268
|
+
agentId: {
|
|
269
|
+
type: string;
|
|
270
|
+
description: string;
|
|
271
|
+
};
|
|
272
|
+
actionType: {
|
|
273
|
+
type: string;
|
|
274
|
+
description: string;
|
|
275
|
+
};
|
|
276
|
+
actionDetails: {
|
|
277
|
+
description: string;
|
|
278
|
+
};
|
|
279
|
+
content?: undefined;
|
|
280
|
+
query?: undefined;
|
|
281
|
+
name?: undefined;
|
|
282
|
+
value?: undefined;
|
|
283
|
+
source?: undefined;
|
|
284
|
+
description?: undefined;
|
|
285
|
+
priority?: undefined;
|
|
286
|
+
parentId?: undefined;
|
|
287
|
+
goalId?: undefined;
|
|
288
|
+
status?: undefined;
|
|
289
|
+
statusFilter?: undefined;
|
|
290
|
+
limit?: undefined;
|
|
291
|
+
actionTypeFilter?: undefined;
|
|
292
|
+
};
|
|
293
|
+
required: string[];
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
} | {
|
|
297
|
+
type: string;
|
|
298
|
+
function: {
|
|
299
|
+
name: string;
|
|
300
|
+
description: string;
|
|
301
|
+
parameters: {
|
|
302
|
+
type: string;
|
|
303
|
+
properties: {
|
|
304
|
+
limit: {
|
|
305
|
+
type: string;
|
|
306
|
+
description: string;
|
|
307
|
+
};
|
|
308
|
+
actionTypeFilter: {
|
|
309
|
+
type: string;
|
|
310
|
+
description: string;
|
|
311
|
+
};
|
|
312
|
+
content?: undefined;
|
|
313
|
+
query?: undefined;
|
|
314
|
+
name?: undefined;
|
|
315
|
+
value?: undefined;
|
|
316
|
+
source?: undefined;
|
|
317
|
+
description?: undefined;
|
|
318
|
+
priority?: undefined;
|
|
319
|
+
parentId?: undefined;
|
|
320
|
+
goalId?: undefined;
|
|
321
|
+
status?: undefined;
|
|
322
|
+
statusFilter?: undefined;
|
|
323
|
+
agentId?: undefined;
|
|
324
|
+
actionType?: undefined;
|
|
325
|
+
actionDetails?: undefined;
|
|
326
|
+
};
|
|
327
|
+
required?: undefined;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
35
330
|
})[];
|
package/dist/tools/openai.js
CHANGED
|
@@ -50,4 +50,179 @@ exports.state = [
|
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
+
// Working Memory (Structured Variables)
|
|
54
|
+
{
|
|
55
|
+
type: "function",
|
|
56
|
+
function: {
|
|
57
|
+
name: "setVariable",
|
|
58
|
+
description: "Sets a structured variable in working memory.",
|
|
59
|
+
parameters: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
name: { type: "string", description: "The name of the variable." },
|
|
63
|
+
value: {
|
|
64
|
+
description: "The value to store (any JSON-serializable type).",
|
|
65
|
+
},
|
|
66
|
+
source: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Source of the variable: 'system', 'reasoning', 'retrieval', 'perception', or 'explicit'.",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ["name", "value"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: "function",
|
|
77
|
+
function: {
|
|
78
|
+
name: "getVariable",
|
|
79
|
+
description: "Gets a structured variable from working memory.",
|
|
80
|
+
parameters: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
name: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "The name of the variable to retrieve.",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
required: ["name"],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "function",
|
|
94
|
+
function: {
|
|
95
|
+
name: "listVariables",
|
|
96
|
+
description: "Lists all variables in working memory.",
|
|
97
|
+
parameters: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "function",
|
|
105
|
+
function: {
|
|
106
|
+
name: "deleteVariable",
|
|
107
|
+
description: "Deletes a variable from working memory.",
|
|
108
|
+
parameters: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
name: {
|
|
112
|
+
type: "string",
|
|
113
|
+
description: "The name of the variable to delete.",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ["name"],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
// Goals
|
|
121
|
+
{
|
|
122
|
+
type: "function",
|
|
123
|
+
function: {
|
|
124
|
+
name: "addGoal",
|
|
125
|
+
description: "Adds a new goal to the agent's goal stack.",
|
|
126
|
+
parameters: {
|
|
127
|
+
type: "object",
|
|
128
|
+
properties: {
|
|
129
|
+
description: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "The description of the goal.",
|
|
132
|
+
},
|
|
133
|
+
priority: {
|
|
134
|
+
type: "string",
|
|
135
|
+
description: "Priority level: 'low', 'medium', 'high', or 'critical'.",
|
|
136
|
+
},
|
|
137
|
+
parentId: {
|
|
138
|
+
type: "string",
|
|
139
|
+
description: "Optional parent goal ID for hierarchical goals.",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: ["description"],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: "function",
|
|
148
|
+
function: {
|
|
149
|
+
name: "updateGoal",
|
|
150
|
+
description: "Updates the status of an existing goal.",
|
|
151
|
+
parameters: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
goalId: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "The ID of the goal to update.",
|
|
157
|
+
},
|
|
158
|
+
status: {
|
|
159
|
+
type: "string",
|
|
160
|
+
description: "New status: 'active', 'suspended', 'achieved', 'abandoned', or 'failed'.",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
required: ["goalId", "status"],
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: "function",
|
|
169
|
+
function: {
|
|
170
|
+
name: "listGoals",
|
|
171
|
+
description: "Lists all goals, optionally filtered by status.",
|
|
172
|
+
parameters: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
statusFilter: {
|
|
176
|
+
type: "string",
|
|
177
|
+
description: "Optional status to filter by.",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
// Actions
|
|
184
|
+
{
|
|
185
|
+
type: "function",
|
|
186
|
+
function: {
|
|
187
|
+
name: "submitAction",
|
|
188
|
+
description: "Submits an action for execution and logging.",
|
|
189
|
+
parameters: {
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: {
|
|
192
|
+
agentId: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "The ID of the agent submitting the action.",
|
|
195
|
+
},
|
|
196
|
+
actionType: {
|
|
197
|
+
type: "string",
|
|
198
|
+
description: "Type of action: 'reason', 'retrieve', 'learn', or 'ground'.",
|
|
199
|
+
},
|
|
200
|
+
actionDetails: {
|
|
201
|
+
description: "The action details (any JSON-serializable object).",
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
required: ["agentId", "actionType", "actionDetails"],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "function",
|
|
210
|
+
function: {
|
|
211
|
+
name: "getActionLog",
|
|
212
|
+
description: "Gets the action log for the current run.",
|
|
213
|
+
parameters: {
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
limit: {
|
|
217
|
+
type: "number",
|
|
218
|
+
description: "Maximum number of entries to retrieve.",
|
|
219
|
+
},
|
|
220
|
+
actionTypeFilter: {
|
|
221
|
+
type: "string",
|
|
222
|
+
description: "Optional action type to filter by.",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
53
228
|
];
|