@framers/agentos-extensions-registry 0.1.1 → 0.1.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/README.md +48 -9
- package/dist/channel-registry.d.ts.map +1 -1
- package/dist/channel-registry.js +193 -10
- package/dist/channel-registry.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest-builder.d.ts.map +1 -1
- package/dist/manifest-builder.js +78 -145
- package/dist/manifest-builder.js.map +1 -1
- package/dist/provider-registry.d.ts +66 -0
- package/dist/provider-registry.d.ts.map +1 -0
- package/dist/provider-registry.js +386 -0
- package/dist/provider-registry.js.map +1 -0
- package/dist/tool-registry.d.ts +24 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +329 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/types.d.ts +25 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +25 -8
package/dist/manifest-builder.js
CHANGED
|
@@ -9,102 +9,23 @@
|
|
|
9
9
|
* @module @framers/agentos-extensions-registry/manifest-builder
|
|
10
10
|
*/
|
|
11
11
|
import { CHANNEL_CATALOG, getChannelEntries } from './channel-registry.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
name: 'web-search',
|
|
30
|
-
category: 'tool',
|
|
31
|
-
displayName: 'Web Search',
|
|
32
|
-
description: 'Web search via Serper.dev or similar providers.',
|
|
33
|
-
requiredSecrets: ['serper.apiKey'],
|
|
34
|
-
defaultPriority: 20,
|
|
35
|
-
available: false,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
packageName: '@framers/agentos-ext-web-browser',
|
|
39
|
-
name: 'web-browser',
|
|
40
|
-
category: 'tool',
|
|
41
|
-
displayName: 'Web Browser',
|
|
42
|
-
description: 'Headless browser for page fetching and scraping.',
|
|
43
|
-
requiredSecrets: [],
|
|
44
|
-
defaultPriority: 20,
|
|
45
|
-
available: false,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
packageName: '@framers/agentos-ext-telegram',
|
|
49
|
-
name: 'telegram',
|
|
50
|
-
category: 'integration',
|
|
51
|
-
displayName: 'Telegram (Legacy)',
|
|
52
|
-
description: 'Legacy Telegram bot integration (tool-based, pre-channel system).',
|
|
53
|
-
requiredSecrets: ['telegram.botToken'],
|
|
54
|
-
defaultPriority: 50,
|
|
55
|
-
available: false,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
packageName: '@framers/agentos-ext-cli-executor',
|
|
59
|
-
name: 'cli-executor',
|
|
60
|
-
category: 'tool',
|
|
61
|
-
displayName: 'CLI Executor',
|
|
62
|
-
description: 'Execute shell commands in a sandboxed environment.',
|
|
63
|
-
requiredSecrets: [],
|
|
64
|
-
defaultPriority: 20,
|
|
65
|
-
available: false,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
packageName: '@framers/agentos-ext-giphy',
|
|
69
|
-
name: 'giphy',
|
|
70
|
-
category: 'tool',
|
|
71
|
-
displayName: 'Giphy',
|
|
72
|
-
description: 'Search and share GIFs via the Giphy API.',
|
|
73
|
-
requiredSecrets: [],
|
|
74
|
-
defaultPriority: 30,
|
|
75
|
-
available: false,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
packageName: '@framers/agentos-ext-image-search',
|
|
79
|
-
name: 'image-search',
|
|
80
|
-
category: 'tool',
|
|
81
|
-
displayName: 'Image Search',
|
|
82
|
-
description: 'Search for images via web APIs.',
|
|
83
|
-
requiredSecrets: [],
|
|
84
|
-
defaultPriority: 30,
|
|
85
|
-
available: false,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
packageName: '@framers/agentos-ext-voice-synthesis',
|
|
89
|
-
name: 'voice-synthesis',
|
|
90
|
-
category: 'tool',
|
|
91
|
-
displayName: 'Voice Synthesis',
|
|
92
|
-
description: 'Text-to-speech synthesis via ElevenLabs or similar.',
|
|
93
|
-
requiredSecrets: [],
|
|
94
|
-
defaultPriority: 30,
|
|
95
|
-
available: false,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
packageName: '@framers/agentos-ext-news-search',
|
|
99
|
-
name: 'news-search',
|
|
100
|
-
category: 'tool',
|
|
101
|
-
displayName: 'News Search',
|
|
102
|
-
description: 'Search recent news articles.',
|
|
103
|
-
requiredSecrets: [],
|
|
104
|
-
defaultPriority: 30,
|
|
105
|
-
available: false,
|
|
106
|
-
},
|
|
107
|
-
];
|
|
12
|
+
import { PROVIDER_CATALOG } from './provider-registry.js';
|
|
13
|
+
import { TOOL_CATALOG } from './tool-registry.js';
|
|
14
|
+
function isPackageInstalled(packageName) {
|
|
15
|
+
if (!packageName)
|
|
16
|
+
return false;
|
|
17
|
+
// Use import.meta.resolve (sync in Node 20.6+) for ESM-native resolution.
|
|
18
|
+
// This correctly handles packages that only export "import" conditions.
|
|
19
|
+
try {
|
|
20
|
+
import.meta.resolve(packageName);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// Not resolvable from this module's context (e.g. pnpm strict isolation).
|
|
25
|
+
// Defer to dynamic import at load time — tryImport() will catch actual failures.
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
108
29
|
/**
|
|
109
30
|
* Attempt to dynamically import a package. Returns the module if available,
|
|
110
31
|
* or `null` if the package is not installed.
|
|
@@ -122,24 +43,16 @@ async function tryImport(packageName) {
|
|
|
122
43
|
* and mark them as available.
|
|
123
44
|
*/
|
|
124
45
|
export async function getAvailableExtensions() {
|
|
125
|
-
const allEntries = [...TOOL_CATALOG, ...CHANNEL_CATALOG];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
results.push({ ...entry, available: mod !== null });
|
|
130
|
-
}
|
|
131
|
-
return results;
|
|
46
|
+
const allEntries = [...TOOL_CATALOG, ...CHANNEL_CATALOG, ...PROVIDER_CATALOG];
|
|
47
|
+
// Prefer pure resolution checks. Dynamic-importing every optional dependency
|
|
48
|
+
// can be very slow in bundler/test runtimes that shim `import.meta`.
|
|
49
|
+
return allEntries.map((entry) => ({ ...entry, available: isPackageInstalled(entry.packageName) }));
|
|
132
50
|
}
|
|
133
51
|
/**
|
|
134
52
|
* Get available channel extensions.
|
|
135
53
|
*/
|
|
136
54
|
export async function getAvailableChannels() {
|
|
137
|
-
|
|
138
|
-
for (const entry of CHANNEL_CATALOG) {
|
|
139
|
-
const mod = await tryImport(entry.packageName);
|
|
140
|
-
results.push({ ...entry, available: mod !== null });
|
|
141
|
-
}
|
|
142
|
-
return results;
|
|
55
|
+
return CHANNEL_CATALOG.map((entry) => ({ ...entry, available: isPackageInstalled(entry.packageName) }));
|
|
143
56
|
}
|
|
144
57
|
/**
|
|
145
58
|
* Creates a pre-configured `ExtensionManifest` with all available curated
|
|
@@ -168,59 +81,79 @@ export async function getAvailableChannels() {
|
|
|
168
81
|
*/
|
|
169
82
|
export async function createCuratedManifest(options) {
|
|
170
83
|
const basePriority = options?.basePriority ?? 0;
|
|
84
|
+
const secrets = options?.secrets;
|
|
85
|
+
const logger = options?.logger ?? console;
|
|
171
86
|
const packs = [];
|
|
172
|
-
//
|
|
173
|
-
const
|
|
174
|
-
const toolEntries = toolFilter === 'none'
|
|
175
|
-
? []
|
|
176
|
-
: toolFilter === 'all'
|
|
177
|
-
? TOOL_CATALOG
|
|
178
|
-
: TOOL_CATALOG.filter((t) => toolFilter.includes(t.name));
|
|
179
|
-
for (const entry of toolEntries) {
|
|
87
|
+
// Helper to load and push a catalog entry
|
|
88
|
+
const loadEntry = async (entry) => {
|
|
180
89
|
const override = options?.overrides?.[entry.name];
|
|
181
90
|
if (override?.enabled === false)
|
|
182
|
-
|
|
91
|
+
return;
|
|
183
92
|
const mod = await tryImport(entry.packageName);
|
|
184
93
|
if (!mod)
|
|
185
|
-
|
|
94
|
+
return;
|
|
186
95
|
const factory = mod.createExtensionPack ?? mod.default?.createExtensionPack ?? mod.default;
|
|
187
96
|
if (typeof factory !== 'function')
|
|
188
|
-
|
|
97
|
+
return;
|
|
98
|
+
const effectivePriority = override?.priority ?? basePriority + entry.defaultPriority;
|
|
99
|
+
const effectiveOptions = {
|
|
100
|
+
...override?.options,
|
|
101
|
+
secrets,
|
|
102
|
+
// Most curated packs accept `options.priority` and map it onto descriptor priorities.
|
|
103
|
+
priority: override?.options?.priority ?? effectivePriority,
|
|
104
|
+
};
|
|
189
105
|
packs.push({
|
|
190
106
|
factory: () => factory({
|
|
191
|
-
options:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
107
|
+
options: effectiveOptions,
|
|
108
|
+
getSecret: (secretId) => secrets?.[secretId],
|
|
109
|
+
logger,
|
|
195
110
|
}),
|
|
196
|
-
|
|
111
|
+
// Priority applied to descriptors unless they override it individually.
|
|
112
|
+
priority: effectivePriority,
|
|
197
113
|
enabled: true,
|
|
198
114
|
identifier: `registry:${entry.name}`,
|
|
115
|
+
// Populate manifest entry options so AgentOS can evaluate `requiredSecrets` gating.
|
|
116
|
+
options: effectiveOptions,
|
|
199
117
|
});
|
|
118
|
+
};
|
|
119
|
+
// Split TOOL_CATALOG by category
|
|
120
|
+
const toolOnlyEntries = TOOL_CATALOG.filter((t) => t.category === 'tool' || t.category === 'integration');
|
|
121
|
+
const voiceEntries = TOOL_CATALOG.filter((t) => t.category === 'voice');
|
|
122
|
+
const productivityEntries = TOOL_CATALOG.filter((t) => t.category === 'productivity');
|
|
123
|
+
// ── Tool Extensions ──
|
|
124
|
+
const toolFilter = options?.tools ?? 'all';
|
|
125
|
+
const filteredTools = toolFilter === 'none'
|
|
126
|
+
? []
|
|
127
|
+
: toolFilter === 'all'
|
|
128
|
+
? toolOnlyEntries
|
|
129
|
+
: toolOnlyEntries.filter((t) => toolFilter.includes(t.name));
|
|
130
|
+
for (const entry of filteredTools) {
|
|
131
|
+
await loadEntry(entry);
|
|
132
|
+
}
|
|
133
|
+
// ── Voice Provider Extensions ──
|
|
134
|
+
const voiceFilter = options?.voice ?? 'all';
|
|
135
|
+
const filteredVoice = voiceFilter === 'none'
|
|
136
|
+
? []
|
|
137
|
+
: voiceFilter === 'all'
|
|
138
|
+
? voiceEntries
|
|
139
|
+
: voiceEntries.filter((t) => voiceFilter.includes(t.name));
|
|
140
|
+
for (const entry of filteredVoice) {
|
|
141
|
+
await loadEntry(entry);
|
|
142
|
+
}
|
|
143
|
+
// ── Productivity Extensions ──
|
|
144
|
+
const prodFilter = options?.productivity ?? 'all';
|
|
145
|
+
const filteredProd = prodFilter === 'none'
|
|
146
|
+
? []
|
|
147
|
+
: prodFilter === 'all'
|
|
148
|
+
? productivityEntries
|
|
149
|
+
: productivityEntries.filter((t) => prodFilter.includes(t.name));
|
|
150
|
+
for (const entry of filteredProd) {
|
|
151
|
+
await loadEntry(entry);
|
|
200
152
|
}
|
|
201
153
|
// ── Channel Extensions ──
|
|
202
154
|
const channelEntries = getChannelEntries(options?.channels);
|
|
203
155
|
for (const entry of channelEntries) {
|
|
204
|
-
|
|
205
|
-
if (override?.enabled === false)
|
|
206
|
-
continue;
|
|
207
|
-
const mod = await tryImport(entry.packageName);
|
|
208
|
-
if (!mod)
|
|
209
|
-
continue;
|
|
210
|
-
const factory = mod.createExtensionPack ?? mod.default?.createExtensionPack ?? mod.default;
|
|
211
|
-
if (typeof factory !== 'function')
|
|
212
|
-
continue;
|
|
213
|
-
packs.push({
|
|
214
|
-
factory: () => factory({
|
|
215
|
-
options: {
|
|
216
|
-
...override?.options,
|
|
217
|
-
secrets: options?.secrets,
|
|
218
|
-
},
|
|
219
|
-
}),
|
|
220
|
-
priority: override?.priority ?? basePriority + entry.defaultPriority,
|
|
221
|
-
enabled: true,
|
|
222
|
-
identifier: `registry:${entry.name}`,
|
|
223
|
-
});
|
|
156
|
+
await loadEntry(entry);
|
|
224
157
|
}
|
|
225
158
|
// ── Build Overrides ──
|
|
226
159
|
const manifestOverrides = options?.overrides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-builder.js","sourceRoot":"","sources":["../src/manifest-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-builder.js","sourceRoot":"","sources":["../src/manifest-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAsB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,SAAS,kBAAkB,CAAC,WAAmB;IAC7C,IAAI,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IAE/B,0EAA0E;IAC1E,wEAAwE;IACxE,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,0EAA0E;QAC1E,iFAAiF;QACjF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,SAAS,CAAC,WAAmB;IAC1C,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,MAAM,UAAU,GAAoB,CAAC,GAAG,YAAY,EAAE,GAAG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AAG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE5D,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,wBAAwB;IACxB,MAAM,iBAAiB,GAAG,OAAO,EAAE,SAAS;QAC1C,CAAC,CAAC;YACE,KAAK,EAAE,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;iBAC9B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC;iBACtE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CACtE;SACF;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,KAAK;QACL,SAAS,EAAE,iBAAiB;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Provider registry — metadata catalog for all supported
|
|
3
|
+
* LLM / model provider extensions.
|
|
4
|
+
*
|
|
5
|
+
* Each entry defines the provider's metadata, default models, API base URL,
|
|
6
|
+
* and secret requirements. This catalog enables OpenClaw feature parity by
|
|
7
|
+
* enumerating every supported model provider in one place.
|
|
8
|
+
*
|
|
9
|
+
* @module @framers/agentos-extensions-registry/provider-registry
|
|
10
|
+
*/
|
|
11
|
+
import type { ExtensionInfo } from './types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Registry entry for a model provider extension.
|
|
14
|
+
* Extends the base ExtensionInfo with provider-specific fields.
|
|
15
|
+
*/
|
|
16
|
+
export interface ProviderRegistryEntry extends ExtensionInfo {
|
|
17
|
+
/** Unique provider identifier (e.g. 'openai', 'anthropic'). */
|
|
18
|
+
providerId: string;
|
|
19
|
+
/** Default model ID used for general-purpose completions. */
|
|
20
|
+
defaultModel: string;
|
|
21
|
+
/** Cheapest / fastest model for lightweight tasks like sentiment analysis. */
|
|
22
|
+
smallModel: string;
|
|
23
|
+
/** Optional default API base URL. Omitted for SDK-based providers or user-specific endpoints. */
|
|
24
|
+
apiBaseUrl?: string;
|
|
25
|
+
/** Whether this provider supports OAuth-based authentication (e.g. consumer subscription tokens). */
|
|
26
|
+
supportsOAuth?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Full catalog of model provider extensions.
|
|
30
|
+
* Ordered to match OpenClaw's models-config.providers layout.
|
|
31
|
+
*/
|
|
32
|
+
export declare const PROVIDER_CATALOG: ProviderRegistryEntry[];
|
|
33
|
+
/**
|
|
34
|
+
* Get provider entries filtered by provider IDs.
|
|
35
|
+
*
|
|
36
|
+
* @param providerIds - Array of provider IDs to include, `'all'` for every
|
|
37
|
+
* provider, or `'none'` for an empty list. Defaults to `'all'`.
|
|
38
|
+
* @returns Matching provider registry entries.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* // Get all providers
|
|
43
|
+
* const all = getProviderEntries();
|
|
44
|
+
*
|
|
45
|
+
* // Get specific providers
|
|
46
|
+
* const subset = getProviderEntries(['openai', 'anthropic', 'ollama']);
|
|
47
|
+
*
|
|
48
|
+
* // Disable providers
|
|
49
|
+
* const none = getProviderEntries('none');
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function getProviderEntries(providerIds?: string[] | 'all' | 'none'): ProviderRegistryEntry[];
|
|
53
|
+
/**
|
|
54
|
+
* Get a single provider entry by its provider ID.
|
|
55
|
+
*
|
|
56
|
+
* @param providerId - The provider identifier (e.g. 'openai', 'anthropic').
|
|
57
|
+
* @returns The matching entry, or `undefined` if not found.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const openai = getProviderEntry('openai');
|
|
62
|
+
* console.log(openai?.defaultModel); // 'gpt-4o'
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare function getProviderEntry(providerId: string): ProviderRegistryEntry | undefined;
|
|
66
|
+
//# sourceMappingURL=provider-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-registry.d.ts","sourceRoot":"","sources":["../src/provider-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,EAmVnD,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,MAAM,GACtC,qBAAqB,EAAE,CAIzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAEtF"}
|