roboport 0.0.1 → 0.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/README.md +3 -2
- package/core/agent.d.ts +2 -1
- package/gateways/core.d.ts +27 -0
- package/gateways/index.d.ts +5 -0
- package/gateways/index.js +575 -0
- package/gateways/serve.d.ts +19 -0
- package/gateways/sources/telegram.d.ts +28 -0
- package/gateways/store.d.ts +9 -0
- package/harness/index.js +15 -6
- package/index.js +15 -6
- package/mcp/auth.d.ts +2 -0
- package/mcp/index.d.ts +4 -1
- package/mcp/index.js +814 -795
- package/models/index.js +15 -6
- package/package.json +9 -5
- package/skills/index.js +15 -6
- package/triggers/core.d.ts +1 -1
- package/triggers/index.js +10 -2
- package/triggers/sources/telegram.d.ts +9 -1
package/harness/index.js
CHANGED
|
@@ -210,7 +210,7 @@ class Agent {
|
|
|
210
210
|
this.unsubs = [];
|
|
211
211
|
await Promise.all(unsubs.map((u) => u()));
|
|
212
212
|
}
|
|
213
|
-
buildSystem(allTools) {
|
|
213
|
+
buildSystem(allTools, systemExtension) {
|
|
214
214
|
let system = this.system;
|
|
215
215
|
if (this.skills.length > 0) {
|
|
216
216
|
const skillsList = this.skills.map((skill) => `- ${skill.name}: ${skill.description}`).join(`
|
|
@@ -231,6 +231,11 @@ ${skillsList}`;
|
|
|
231
231
|
# Deferred tools
|
|
232
232
|
These tools are available but their schemas are not loaded. Use ToolSearch to load them before calling.
|
|
233
233
|
${list}`;
|
|
234
|
+
}
|
|
235
|
+
if (systemExtension) {
|
|
236
|
+
system = `${system}
|
|
237
|
+
|
|
238
|
+
${systemExtension}`;
|
|
234
239
|
}
|
|
235
240
|
return system;
|
|
236
241
|
}
|
|
@@ -257,6 +262,7 @@ ${found.content}
|
|
|
257
262
|
session(init) {
|
|
258
263
|
const initialMessages = init?.messages ? [...init.messages] : [];
|
|
259
264
|
const sessionCwd = init?.cwd ?? this.cwd ?? process.cwd();
|
|
265
|
+
const systemExtension = init?.systemExtension;
|
|
260
266
|
const state = {
|
|
261
267
|
messages: initialMessages,
|
|
262
268
|
store: new Map
|
|
@@ -289,11 +295,14 @@ ${found.content}
|
|
|
289
295
|
tools: registry,
|
|
290
296
|
cwd: sessionCwd
|
|
291
297
|
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
298
|
+
const systemMessage = {
|
|
299
|
+
role: "system",
|
|
300
|
+
content: this.buildSystem(allTools, systemExtension)
|
|
301
|
+
};
|
|
302
|
+
if (state.messages[0]?.role === "system") {
|
|
303
|
+
state.messages[0] = systemMessage;
|
|
304
|
+
} else {
|
|
305
|
+
state.messages.unshift(systemMessage);
|
|
297
306
|
}
|
|
298
307
|
}
|
|
299
308
|
return { tools: allTools, registry, ctx };
|
package/index.js
CHANGED
|
@@ -205,7 +205,7 @@ class Agent {
|
|
|
205
205
|
this.unsubs = [];
|
|
206
206
|
await Promise.all(unsubs.map((u) => u()));
|
|
207
207
|
}
|
|
208
|
-
buildSystem(allTools) {
|
|
208
|
+
buildSystem(allTools, systemExtension) {
|
|
209
209
|
let system = this.system;
|
|
210
210
|
if (this.skills.length > 0) {
|
|
211
211
|
const skillsList = this.skills.map((skill) => `- ${skill.name}: ${skill.description}`).join(`
|
|
@@ -226,6 +226,11 @@ ${skillsList}`;
|
|
|
226
226
|
# Deferred tools
|
|
227
227
|
These tools are available but their schemas are not loaded. Use ToolSearch to load them before calling.
|
|
228
228
|
${list}`;
|
|
229
|
+
}
|
|
230
|
+
if (systemExtension) {
|
|
231
|
+
system = `${system}
|
|
232
|
+
|
|
233
|
+
${systemExtension}`;
|
|
229
234
|
}
|
|
230
235
|
return system;
|
|
231
236
|
}
|
|
@@ -252,6 +257,7 @@ ${found.content}
|
|
|
252
257
|
session(init) {
|
|
253
258
|
const initialMessages = init?.messages ? [...init.messages] : [];
|
|
254
259
|
const sessionCwd = init?.cwd ?? this.cwd ?? process.cwd();
|
|
260
|
+
const systemExtension = init?.systemExtension;
|
|
255
261
|
const state = {
|
|
256
262
|
messages: initialMessages,
|
|
257
263
|
store: new Map
|
|
@@ -284,11 +290,14 @@ ${found.content}
|
|
|
284
290
|
tools: registry,
|
|
285
291
|
cwd: sessionCwd
|
|
286
292
|
};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
293
|
+
const systemMessage = {
|
|
294
|
+
role: "system",
|
|
295
|
+
content: this.buildSystem(allTools, systemExtension)
|
|
296
|
+
};
|
|
297
|
+
if (state.messages[0]?.role === "system") {
|
|
298
|
+
state.messages[0] = systemMessage;
|
|
299
|
+
} else {
|
|
300
|
+
state.messages.unshift(systemMessage);
|
|
292
301
|
}
|
|
293
302
|
}
|
|
294
303
|
return { tools: allTools, registry, ctx };
|
package/mcp/auth.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ type OAuthAuthOptions = {
|
|
|
15
15
|
redirectPort?: number;
|
|
16
16
|
scopes?: string[];
|
|
17
17
|
flowTimeoutMs?: number;
|
|
18
|
+
clientId?: string;
|
|
18
19
|
};
|
|
19
20
|
declare class OAuthAuth implements AuthProvider {
|
|
20
21
|
private serverUrl;
|
|
@@ -23,6 +24,7 @@ declare class OAuthAuth implements AuthProvider {
|
|
|
23
24
|
private redirectPort;
|
|
24
25
|
private scopes?;
|
|
25
26
|
private flowTimeoutMs;
|
|
27
|
+
private clientId?;
|
|
26
28
|
private tokens?;
|
|
27
29
|
private loaded;
|
|
28
30
|
private metadata?;
|
package/mcp/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { BearerAuth, OAuthAuth, type AuthProvider, type OAuthAuthOptions } from './auth';
|
|
1
2
|
import Grafana from './clients/grafana';
|
|
2
3
|
import Linear from './clients/linear';
|
|
3
4
|
import Tenderly from './clients/tenderly';
|
|
4
|
-
|
|
5
|
+
import { Mcp, type HttpTransportConfig, type McpTransportConfig, type StdioTransportConfig } from './core';
|
|
6
|
+
import { FileStorage, MemoryStorage, type OAuthStorage, type TokenSet } from './storage';
|
|
7
|
+
export { BearerAuth, FileStorage, Grafana, Linear, Mcp, MemoryStorage, OAuthAuth, Tenderly, type AuthProvider, type HttpTransportConfig, type McpTransportConfig, type OAuthAuthOptions, type OAuthStorage, type StdioTransportConfig, type TokenSet, };
|