roboport 0.1.0 → 0.3.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/LICENSE +21 -0
- package/mcp/auth.d.ts +2 -0
- package/mcp/index.d.ts +4 -1
- package/mcp/index.js +811 -801
- package/models/anthropic.d.ts +2 -2
- package/models/google.d.ts +3 -3
- package/models/index.d.ts +6 -6
- package/models/index.js +10 -10
- package/models/moonshot.d.ts +3 -3
- package/models/openai-compatible.d.ts +2 -2
- package/models/openai.d.ts +7 -7
- package/package.json +2 -2
package/models/anthropic.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model, type CreateMessageParams, type LiteralUnion, type ModelStreamEvent, type SearchHit, type SearchOptions, type ThinkingLevel } from '../core';
|
|
2
2
|
declare const ANTHROPIC_MODELS: readonly ["claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-haiku-4-5"];
|
|
3
3
|
type AnthropicModelName = LiteralUnion<(typeof ANTHROPIC_MODELS)[number]>;
|
|
4
|
-
declare class
|
|
4
|
+
declare class Anthropic extends Model {
|
|
5
5
|
modelName: string;
|
|
6
6
|
apiKey: string;
|
|
7
7
|
thinking: ThinkingLevel;
|
|
@@ -12,4 +12,4 @@ declare class AnthropicModel extends Model {
|
|
|
12
12
|
streamMessage(params: CreateMessageParams): AsyncIterable<ModelStreamEvent>;
|
|
13
13
|
searchWeb(query: string, opts?: SearchOptions): Promise<SearchHit[]>;
|
|
14
14
|
}
|
|
15
|
-
export {
|
|
15
|
+
export { Anthropic, ANTHROPIC_MODELS };
|
package/models/google.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LiteralUnion, SearchHit, SearchOptions, ThinkingLevel } from '../core';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenAICompatible } from './openai-compatible';
|
|
3
3
|
declare const GEMINI_MODELS: readonly ["gemini-3.5-flash", "gemini-3.1-pro", "gemini-3.1-flash-lite", "gemini-3-flash"];
|
|
4
4
|
type GeminiModelName = LiteralUnion<(typeof GEMINI_MODELS)[number]>;
|
|
5
|
-
declare class
|
|
5
|
+
declare class Gemini extends OpenAICompatible {
|
|
6
6
|
constructor(modelName: GeminiModelName, options?: {
|
|
7
7
|
apiKey?: string;
|
|
8
8
|
baseUrl?: string;
|
|
@@ -11,4 +11,4 @@ declare class GeminiModel extends OpenAICompatibleModel {
|
|
|
11
11
|
protected applyThinking(body: Record<string, unknown>): void;
|
|
12
12
|
searchWeb(query: string, opts?: SearchOptions): Promise<SearchHit[]>;
|
|
13
13
|
}
|
|
14
|
-
export {
|
|
14
|
+
export { Gemini, GEMINI_MODELS };
|
package/models/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ANTHROPIC_MODELS,
|
|
2
|
-
import { GEMINI_MODELS,
|
|
3
|
-
import { MOONSHOT_MODELS,
|
|
4
|
-
import { OPENAI_MODELS,
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
1
|
+
import { ANTHROPIC_MODELS, Anthropic } from './anthropic';
|
|
2
|
+
import { GEMINI_MODELS, Gemini } from './google';
|
|
3
|
+
import { MOONSHOT_MODELS, Moonshot } from './moonshot';
|
|
4
|
+
import { OPENAI_MODELS, OpenAI } from './openai';
|
|
5
|
+
import { OpenAICompatible } from './openai-compatible';
|
|
6
|
+
export { Anthropic, Gemini, Moonshot, OpenAI, OpenAICompatible, ANTHROPIC_MODELS, GEMINI_MODELS, MOONSHOT_MODELS, OPENAI_MODELS, };
|
package/models/index.js
CHANGED
|
@@ -742,7 +742,7 @@ function toWire(messages) {
|
|
|
742
742
|
return { system, wireMessages };
|
|
743
743
|
}
|
|
744
744
|
|
|
745
|
-
class
|
|
745
|
+
class Anthropic extends Model {
|
|
746
746
|
modelName;
|
|
747
747
|
apiKey;
|
|
748
748
|
thinking;
|
|
@@ -1009,7 +1009,7 @@ function parseToolArguments(raw) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
|
|
1012
|
-
class
|
|
1012
|
+
class OpenAICompatible extends Model {
|
|
1013
1013
|
modelName;
|
|
1014
1014
|
apiKey;
|
|
1015
1015
|
baseUrl;
|
|
@@ -1220,7 +1220,7 @@ var GEMINI_MODELS = [
|
|
|
1220
1220
|
"gemini-3-flash"
|
|
1221
1221
|
];
|
|
1222
1222
|
|
|
1223
|
-
class
|
|
1223
|
+
class Gemini extends OpenAICompatible {
|
|
1224
1224
|
constructor(modelName, options) {
|
|
1225
1225
|
const key = options?.apiKey ?? env.geminiApiKey;
|
|
1226
1226
|
if (!key) {
|
|
@@ -1276,7 +1276,7 @@ class GeminiModel extends OpenAICompatibleModel {
|
|
|
1276
1276
|
// src/models/moonshot.ts
|
|
1277
1277
|
var MOONSHOT_MODELS = ["kimi-k2.6", "kimi-k2.5"];
|
|
1278
1278
|
|
|
1279
|
-
class
|
|
1279
|
+
class Moonshot extends OpenAICompatible {
|
|
1280
1280
|
constructor(modelName, options) {
|
|
1281
1281
|
const key = options?.apiKey ?? env.moonshotApiKey;
|
|
1282
1282
|
if (!key) {
|
|
@@ -1672,7 +1672,7 @@ function mapResponsesStatus(status) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
|
|
1675
|
-
class
|
|
1675
|
+
class OpenAI extends OpenAICompatible {
|
|
1676
1676
|
codexAuth;
|
|
1677
1677
|
constructor(modelName, options) {
|
|
1678
1678
|
const auth = options?.auth ?? { type: "apiKey" };
|
|
@@ -2036,13 +2036,13 @@ function extractSearchHits(json) {
|
|
|
2036
2036
|
return hits;
|
|
2037
2037
|
}
|
|
2038
2038
|
export {
|
|
2039
|
-
|
|
2040
|
-
|
|
2039
|
+
OpenAICompatible,
|
|
2040
|
+
OpenAI,
|
|
2041
2041
|
OPENAI_MODELS,
|
|
2042
|
-
|
|
2042
|
+
Moonshot,
|
|
2043
2043
|
MOONSHOT_MODELS,
|
|
2044
|
-
|
|
2044
|
+
Gemini,
|
|
2045
2045
|
GEMINI_MODELS,
|
|
2046
|
-
|
|
2046
|
+
Anthropic,
|
|
2047
2047
|
ANTHROPIC_MODELS
|
|
2048
2048
|
};
|
package/models/moonshot.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LiteralUnion, SearchHit, SearchOptions, ThinkingLevel } from '../core';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenAICompatible, type OpenAIAssistantWireMessage } from './openai-compatible';
|
|
3
3
|
declare const MOONSHOT_MODELS: readonly ["kimi-k2.6", "kimi-k2.5"];
|
|
4
4
|
type MoonshotModelName = LiteralUnion<(typeof MOONSHOT_MODELS)[number]>;
|
|
5
|
-
declare class
|
|
5
|
+
declare class Moonshot extends OpenAICompatible {
|
|
6
6
|
constructor(modelName: MoonshotModelName, options?: {
|
|
7
7
|
apiKey?: string;
|
|
8
8
|
baseUrl?: string;
|
|
@@ -13,4 +13,4 @@ declare class MoonshotModel extends OpenAICompatibleModel {
|
|
|
13
13
|
searchWeb(query: string, opts?: SearchOptions): Promise<SearchHit[]>;
|
|
14
14
|
private chat;
|
|
15
15
|
}
|
|
16
|
-
export {
|
|
16
|
+
export { Moonshot, MOONSHOT_MODELS };
|
|
@@ -23,7 +23,7 @@ type OpenAIWireMessage = {
|
|
|
23
23
|
tool_call_id: string;
|
|
24
24
|
content: string;
|
|
25
25
|
};
|
|
26
|
-
declare abstract class
|
|
26
|
+
declare abstract class OpenAICompatible extends Model {
|
|
27
27
|
modelName: string;
|
|
28
28
|
apiKey: string;
|
|
29
29
|
baseUrl: string;
|
|
@@ -38,4 +38,4 @@ declare abstract class OpenAICompatibleModel extends Model {
|
|
|
38
38
|
protected adaptAssistantWire(msg: OpenAIAssistantWireMessage): OpenAIAssistantWireMessage;
|
|
39
39
|
protected applyThinking(body: Record<string, unknown>): void;
|
|
40
40
|
}
|
|
41
|
-
export {
|
|
41
|
+
export { OpenAICompatible, type OpenAIAssistantWireMessage };
|
package/models/openai.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { CreateMessageParams, LiteralUnion, ModelStreamEvent, SearchHit, SearchOptions, ThinkingLevel } from '../core';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenAICompatible } from './openai-compatible';
|
|
3
3
|
declare const OPENAI_MODELS: readonly ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.3-codex"];
|
|
4
4
|
type OpenAIModelName = LiteralUnion<(typeof OPENAI_MODELS)[number]>;
|
|
5
5
|
type OpenAIApiKeyAuthOptions = {
|
|
6
6
|
type: 'apiKey';
|
|
7
7
|
apiKey?: string;
|
|
8
8
|
};
|
|
9
|
-
type
|
|
9
|
+
type OpenAICodexAuthOptions = {
|
|
10
10
|
type: 'codex';
|
|
11
11
|
authFile?: string;
|
|
12
12
|
};
|
|
13
|
-
type OpenAIAuthOptions = OpenAIApiKeyAuthOptions |
|
|
14
|
-
type
|
|
13
|
+
type OpenAIAuthOptions = OpenAIApiKeyAuthOptions | OpenAICodexAuthOptions;
|
|
14
|
+
type OpenAIOptions = {
|
|
15
15
|
auth?: OpenAIAuthOptions;
|
|
16
16
|
baseUrl?: string;
|
|
17
17
|
thinking?: ThinkingLevel;
|
|
18
18
|
};
|
|
19
|
-
declare class
|
|
19
|
+
declare class OpenAI extends OpenAICompatible {
|
|
20
20
|
private codexAuth?;
|
|
21
|
-
constructor(modelName: OpenAIModelName, options?:
|
|
21
|
+
constructor(modelName: OpenAIModelName, options?: OpenAIOptions);
|
|
22
22
|
streamMessage(params: CreateMessageParams): AsyncIterable<ModelStreamEvent>;
|
|
23
23
|
protected applyThinking(body: Record<string, unknown>): void;
|
|
24
24
|
searchWeb(query: string, opts?: SearchOptions): Promise<SearchHit[]>;
|
|
@@ -26,4 +26,4 @@ declare class OpenAIModel extends OpenAICompatibleModel {
|
|
|
26
26
|
private fetchResponsesBuffered;
|
|
27
27
|
private responsesEndpoint;
|
|
28
28
|
}
|
|
29
|
-
export {
|
|
29
|
+
export { OpenAI, OPENAI_MODELS, type OpenAIAuthOptions, type OpenAIOptions };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roboport",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Minimal TypeScript framework for building LLM agents.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Timur Badretdinov",
|
|
7
7
|
"url": "https://github.com/Destiner"
|
|
8
8
|
},
|
|
9
|
-
"license": "
|
|
9
|
+
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/Destiner/roboport.git",
|