opc-agent 4.0.43 → 4.1.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/dist/cli.js +2 -2
- package/dist/core/runtime.js +18 -0
- package/dist/providers/index.d.ts +6 -0
- package/dist/providers/index.js +100 -10
- package/dist/schema/oad.d.ts +34 -34
- package/dist/studio/server.js +181 -19
- package/dist/studio-ui/index.html +49 -14
- package/package.json +1 -1
- package/src/cli.ts +2 -2
- package/src/core/runtime.ts +18 -0
- package/src/providers/index.ts +95 -10
- package/src/studio/server.ts +178 -21
- package/src/studio-ui/index.html +49 -14
package/dist/cli.js
CHANGED
|
@@ -680,7 +680,7 @@ program
|
|
|
680
680
|
let model;
|
|
681
681
|
let agentName = 'Agent';
|
|
682
682
|
let agentVersion = '1.0.0';
|
|
683
|
-
let providerName = '
|
|
683
|
+
let providerName = 'auto';
|
|
684
684
|
let skillNames = [];
|
|
685
685
|
// Try loading SOUL.md and CONTEXT.md for enriched system prompt
|
|
686
686
|
const soulPath = path.resolve('SOUL.md');
|
|
@@ -708,7 +708,7 @@ program
|
|
|
708
708
|
}
|
|
709
709
|
// Prepend SOUL.md and CONTEXT.md to system prompt
|
|
710
710
|
systemPrompt = [soulContent, contextContent, systemPrompt].filter(Boolean).join('\n\n');
|
|
711
|
-
const provider = (0, providers_1.createProvider)(
|
|
711
|
+
const provider = (0, providers_1.createProvider)(providerName, model);
|
|
712
712
|
const history = [];
|
|
713
713
|
// Print startup banner
|
|
714
714
|
const bannerLines = [
|
package/dist/core/runtime.js
CHANGED
|
@@ -73,6 +73,24 @@ class AgentRuntime {
|
|
|
73
73
|
agentBrain = null;
|
|
74
74
|
evolveScheduler = null;
|
|
75
75
|
async loadConfig(filePath) {
|
|
76
|
+
const fs = require('fs');
|
|
77
|
+
if (!fs.existsSync(filePath)) {
|
|
78
|
+
// Auto-create a minimal oad.yaml with auto-detect provider
|
|
79
|
+
const yaml = require('js-yaml');
|
|
80
|
+
const defaultOAD = {
|
|
81
|
+
apiVersion: 'opc/v1',
|
|
82
|
+
kind: 'Agent',
|
|
83
|
+
metadata: { name: 'my-agent', version: '1.0.0', description: 'OPC Agent' },
|
|
84
|
+
spec: {
|
|
85
|
+
model: 'auto',
|
|
86
|
+
provider: { default: 'auto' },
|
|
87
|
+
systemPrompt: 'You are a helpful AI assistant.',
|
|
88
|
+
channels: [{ type: 'web', config: { port: 3000 } }],
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
fs.writeFileSync(filePath, yaml.dump(defaultOAD, { lineWidth: 120 }));
|
|
92
|
+
this.logger.info('Created default oad.yaml (no config file found)');
|
|
93
|
+
}
|
|
76
94
|
this.config = (0, config_1.loadOAD)(filePath);
|
|
77
95
|
this.logger.info('Config loaded', { name: this.config.metadata.name });
|
|
78
96
|
return this.config;
|
|
@@ -8,6 +8,12 @@ export interface LLMProvider {
|
|
|
8
8
|
chat(messages: Message[], systemPrompt?: string, options?: ChatOptions): Promise<string>;
|
|
9
9
|
chatStream(messages: Message[], systemPrompt?: string): AsyncIterable<string>;
|
|
10
10
|
}
|
|
11
|
+
export declare function autoDetectProvider(): {
|
|
12
|
+
name: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
};
|
|
11
17
|
export declare function createProvider(name?: string, model?: string, baseUrl?: string, apiKey?: string): LLMProvider;
|
|
12
18
|
export declare const SUPPORTED_PROVIDERS: readonly ["openai", "ollama", "claude-cli", "deepseek", "qwen", "gemini", "dashscope", "zhipu", "moonshot"];
|
|
13
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/providers/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.SUPPORTED_PROVIDERS = void 0;
|
|
37
|
+
exports.autoDetectProvider = autoDetectProvider;
|
|
37
38
|
exports.createProvider = createProvider;
|
|
38
39
|
const https = __importStar(require("https"));
|
|
39
40
|
const http = __importStar(require("http"));
|
|
@@ -327,7 +328,21 @@ class ClaudeCLIProvider {
|
|
|
327
328
|
name = 'claude-cli';
|
|
328
329
|
model;
|
|
329
330
|
constructor(model) {
|
|
330
|
-
|
|
331
|
+
// Claude CLI uses short model names; don't pass API-style model names
|
|
332
|
+
// Let Claude CLI use its default model unless explicitly set to a known CLI model
|
|
333
|
+
const cliModels = ['sonnet', 'opus', 'haiku', 'claude-sonnet-4-20250514', 'claude-opus-4-20250514'];
|
|
334
|
+
if (model && !cliModels.includes(model)) {
|
|
335
|
+
// Map common patterns
|
|
336
|
+
if (model.includes('opus'))
|
|
337
|
+
this.model = 'opus';
|
|
338
|
+
else if (model.includes('haiku'))
|
|
339
|
+
this.model = 'haiku';
|
|
340
|
+
else
|
|
341
|
+
this.model = ''; // let CLI choose default
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this.model = model || '';
|
|
345
|
+
}
|
|
331
346
|
}
|
|
332
347
|
async chat(messages, systemPrompt, options) {
|
|
333
348
|
const { writeFileSync, unlinkSync, mkdtempSync } = await Promise.resolve().then(() => __importStar(require('fs')));
|
|
@@ -342,7 +357,7 @@ class ClaudeCLIProvider {
|
|
|
342
357
|
if (options?.tools && options.tools.length > 0) {
|
|
343
358
|
prompt += buildToolPrompt(options.tools);
|
|
344
359
|
}
|
|
345
|
-
const args = ['-p'
|
|
360
|
+
const args = ['-p'];
|
|
346
361
|
// Write system prompt to temp file to avoid shell escaping issues
|
|
347
362
|
let tmpFile;
|
|
348
363
|
if (systemPrompt) {
|
|
@@ -406,7 +421,7 @@ class ClaudeCLIProvider {
|
|
|
406
421
|
}
|
|
407
422
|
}
|
|
408
423
|
async *chatStream(messages, systemPrompt) {
|
|
409
|
-
const args = ['-p', '--
|
|
424
|
+
const args = ['-p', '--verbose', '--output-format', 'stream-json'];
|
|
410
425
|
if (this.model) {
|
|
411
426
|
args.push('--model', this.model);
|
|
412
427
|
}
|
|
@@ -441,14 +456,25 @@ class ClaudeCLIProvider {
|
|
|
441
456
|
continue;
|
|
442
457
|
try {
|
|
443
458
|
const event = JSON.parse(trimmed);
|
|
444
|
-
//
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
459
|
+
// Claude CLI stream-json format:
|
|
460
|
+
// {"type":"assistant","message":{"content":[{"type":"text","text":"..."}]}}
|
|
461
|
+
if (event.type === 'assistant' && event.message?.content) {
|
|
462
|
+
for (const block of event.message.content) {
|
|
463
|
+
if (block.type === 'text' && block.text) {
|
|
464
|
+
const newContent = block.text;
|
|
465
|
+
if (newContent.length > lastContent.length) {
|
|
466
|
+
yield newContent.slice(lastContent.length);
|
|
467
|
+
lastContent = newContent;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
450
470
|
}
|
|
451
471
|
}
|
|
472
|
+
// Also handle result type for final content
|
|
473
|
+
if (event.type === 'result' && event.result) {
|
|
474
|
+
const remaining = event.result.slice(lastContent.length);
|
|
475
|
+
if (remaining)
|
|
476
|
+
yield remaining;
|
|
477
|
+
}
|
|
452
478
|
// Handle assistant message with content array
|
|
453
479
|
if (event.type === 'assistant' && event.message?.content) {
|
|
454
480
|
for (const block of event.message.content) {
|
|
@@ -507,7 +533,71 @@ class ClaudeCLIProvider {
|
|
|
507
533
|
}
|
|
508
534
|
}
|
|
509
535
|
}
|
|
510
|
-
|
|
536
|
+
const child_process_1 = require("child_process");
|
|
537
|
+
function detectClaudeCLI() {
|
|
538
|
+
try {
|
|
539
|
+
(0, child_process_1.execSync)('claude --version', { stdio: 'pipe', timeout: 3000 });
|
|
540
|
+
return true;
|
|
541
|
+
}
|
|
542
|
+
catch {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
function detectOllama() {
|
|
547
|
+
try {
|
|
548
|
+
// Use node http instead of curl for Windows compatibility
|
|
549
|
+
const { execSync: es } = require('child_process');
|
|
550
|
+
// Quick check: try to connect to Ollama API via node
|
|
551
|
+
const result = es(`node -e "const h=require('http');const r=h.get('http://localhost:11434/api/tags',{timeout:2000},s=>{let d='';s.on('data',c=>d+=c);s.on('end',()=>{process.stdout.write(d.includes('models')?'1':'0')})});r.on('error',()=>process.stdout.write('0'));r.on('timeout',()=>{r.destroy();process.stdout.write('0')})"`, { stdio: 'pipe', timeout: 5000 });
|
|
552
|
+
return result.toString().trim() === '1';
|
|
553
|
+
}
|
|
554
|
+
catch {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
function detectApiKeys() {
|
|
559
|
+
if (process.env.ANTHROPIC_API_KEY)
|
|
560
|
+
return { provider: 'anthropic', key: process.env.ANTHROPIC_API_KEY };
|
|
561
|
+
if (process.env.OPENAI_API_KEY && process.env.OPENAI_API_KEY !== 'your-api-key-here')
|
|
562
|
+
return { provider: 'openai', key: process.env.OPENAI_API_KEY };
|
|
563
|
+
if (process.env.DEEPSEEK_API_KEY)
|
|
564
|
+
return { provider: 'deepseek', key: process.env.DEEPSEEK_API_KEY, baseUrl: 'https://api.deepseek.com/v1' };
|
|
565
|
+
if (process.env.DASHSCOPE_API_KEY)
|
|
566
|
+
return { provider: 'qwen', key: process.env.DASHSCOPE_API_KEY, baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1' };
|
|
567
|
+
if (process.env.GEMINI_API_KEY)
|
|
568
|
+
return { provider: 'gemini', key: process.env.GEMINI_API_KEY };
|
|
569
|
+
return null;
|
|
570
|
+
}
|
|
571
|
+
function autoDetectProvider() {
|
|
572
|
+
// 1. Claude CLI (zero config, Claude Max/Pro subscription)
|
|
573
|
+
if (detectClaudeCLI()) {
|
|
574
|
+
return { name: 'claude-cli' };
|
|
575
|
+
}
|
|
576
|
+
// 2. API keys from environment
|
|
577
|
+
const apiKey = detectApiKeys();
|
|
578
|
+
if (apiKey) {
|
|
579
|
+
return { name: apiKey.provider, apiKey: apiKey.key, baseUrl: apiKey.baseUrl };
|
|
580
|
+
}
|
|
581
|
+
// 3. Ollama (local, free)
|
|
582
|
+
if (detectOllama()) {
|
|
583
|
+
return { name: 'ollama', model: 'qwen2.5:7b' };
|
|
584
|
+
}
|
|
585
|
+
// 4. Nothing found
|
|
586
|
+
return { name: 'none' };
|
|
587
|
+
}
|
|
588
|
+
function createProvider(name = 'auto', model, baseUrl, apiKey) {
|
|
589
|
+
// Auto-detect if name is 'auto' or default openai with no real key
|
|
590
|
+
const needsAutoDetect = name === 'auto' || (name === 'openai' && !apiKey && (!process.env.OPENAI_API_KEY || process.env.OPENAI_API_KEY === 'your-api-key-here'));
|
|
591
|
+
if (needsAutoDetect) {
|
|
592
|
+
const detected = autoDetectProvider();
|
|
593
|
+
if (detected.name !== 'none') {
|
|
594
|
+
console.log(`[provider] Auto-detected: ${detected.name}`);
|
|
595
|
+
name = detected.name;
|
|
596
|
+
model = model || detected.model;
|
|
597
|
+
baseUrl = baseUrl || detected.baseUrl;
|
|
598
|
+
apiKey = apiKey || detected.apiKey;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
511
601
|
const finalModel = model || process.env.OPC_LLM_MODEL || 'gpt-4o-mini';
|
|
512
602
|
// Claude CLI mode: use local claude command (Claude Max/Pro subscription)
|
|
513
603
|
if (name === 'claude-cli' || process.env.OPC_LLM_PROVIDER === 'claude-cli') {
|
package/dist/schema/oad.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ export declare const LongTermMemorySchema: z.ZodObject<{
|
|
|
146
146
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
147
147
|
collection?: string | undefined;
|
|
148
148
|
}, {
|
|
149
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
149
150
|
config?: z.objectInputType<{
|
|
150
151
|
database: z.ZodOptional<z.ZodString>;
|
|
151
152
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -153,7 +154,6 @@ export declare const LongTermMemorySchema: z.ZodObject<{
|
|
|
153
154
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
154
155
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
155
156
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
156
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
157
157
|
collection?: string | undefined;
|
|
158
158
|
}>;
|
|
159
159
|
export declare const MemorySchema: z.ZodObject<{
|
|
@@ -191,6 +191,7 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
191
191
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
192
192
|
collection?: string | undefined;
|
|
193
193
|
}, {
|
|
194
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
194
195
|
config?: z.objectInputType<{
|
|
195
196
|
database: z.ZodOptional<z.ZodString>;
|
|
196
197
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -198,7 +199,6 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
198
199
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
199
200
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
200
201
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
201
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
202
202
|
collection?: string | undefined;
|
|
203
203
|
}>]>>;
|
|
204
204
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -220,6 +220,7 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
220
220
|
provider?: string | undefined;
|
|
221
221
|
shortTerm?: boolean | undefined;
|
|
222
222
|
longTerm?: boolean | {
|
|
223
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
223
224
|
config?: z.objectInputType<{
|
|
224
225
|
database: z.ZodOptional<z.ZodString>;
|
|
225
226
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -227,7 +228,6 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
227
228
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
228
229
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
229
230
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
230
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
231
231
|
collection?: string | undefined;
|
|
232
232
|
} | undefined;
|
|
233
233
|
}>;
|
|
@@ -672,6 +672,7 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
672
672
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
673
673
|
collection?: string | undefined;
|
|
674
674
|
}, {
|
|
675
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
675
676
|
config?: z.objectInputType<{
|
|
676
677
|
database: z.ZodOptional<z.ZodString>;
|
|
677
678
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -679,7 +680,6 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
679
680
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
680
681
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
681
682
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
682
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
683
683
|
collection?: string | undefined;
|
|
684
684
|
}>]>>;
|
|
685
685
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -701,6 +701,7 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
701
701
|
provider?: string | undefined;
|
|
702
702
|
shortTerm?: boolean | undefined;
|
|
703
703
|
longTerm?: boolean | {
|
|
704
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
704
705
|
config?: z.objectInputType<{
|
|
705
706
|
database: z.ZodOptional<z.ZodString>;
|
|
706
707
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -708,7 +709,6 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
708
709
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
709
710
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
710
711
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
711
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
712
712
|
collection?: string | undefined;
|
|
713
713
|
} | undefined;
|
|
714
714
|
}>>;
|
|
@@ -1064,6 +1064,10 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1064
1064
|
env?: Record<string, string> | undefined;
|
|
1065
1065
|
}[] | undefined;
|
|
1066
1066
|
} | undefined;
|
|
1067
|
+
provider?: {
|
|
1068
|
+
default: string;
|
|
1069
|
+
allowed: string[];
|
|
1070
|
+
} | undefined;
|
|
1067
1071
|
auth?: {
|
|
1068
1072
|
enabled: boolean;
|
|
1069
1073
|
apiKeys: string[];
|
|
@@ -1080,10 +1084,6 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1080
1084
|
secret?: string | undefined;
|
|
1081
1085
|
retryAttempts?: number | undefined;
|
|
1082
1086
|
} | undefined;
|
|
1083
|
-
provider?: {
|
|
1084
|
-
default: string;
|
|
1085
|
-
allowed: string[];
|
|
1086
|
-
} | undefined;
|
|
1087
1087
|
systemPrompt?: string | undefined;
|
|
1088
1088
|
memory?: {
|
|
1089
1089
|
shortTerm: boolean;
|
|
@@ -1179,6 +1179,10 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1179
1179
|
}[] | undefined;
|
|
1180
1180
|
} | undefined;
|
|
1181
1181
|
model?: string | undefined;
|
|
1182
|
+
provider?: {
|
|
1183
|
+
default?: string | undefined;
|
|
1184
|
+
allowed?: string[] | undefined;
|
|
1185
|
+
} | undefined;
|
|
1182
1186
|
auth?: {
|
|
1183
1187
|
enabled?: boolean | undefined;
|
|
1184
1188
|
apiKeys?: string[] | undefined;
|
|
@@ -1195,10 +1199,6 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1195
1199
|
secret?: string | undefined;
|
|
1196
1200
|
retryAttempts?: number | undefined;
|
|
1197
1201
|
} | undefined;
|
|
1198
|
-
provider?: {
|
|
1199
|
-
default?: string | undefined;
|
|
1200
|
-
allowed?: string[] | undefined;
|
|
1201
|
-
} | undefined;
|
|
1202
1202
|
systemPrompt?: string | undefined;
|
|
1203
1203
|
skills?: {
|
|
1204
1204
|
name: string;
|
|
@@ -1214,6 +1214,7 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1214
1214
|
provider?: string | undefined;
|
|
1215
1215
|
shortTerm?: boolean | undefined;
|
|
1216
1216
|
longTerm?: boolean | {
|
|
1217
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1217
1218
|
config?: z.objectInputType<{
|
|
1218
1219
|
database: z.ZodOptional<z.ZodString>;
|
|
1219
1220
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -1221,7 +1222,6 @@ export declare const SpecSchema: z.ZodObject<{
|
|
|
1221
1222
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
1222
1223
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
1223
1224
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1224
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1225
1225
|
collection?: string | undefined;
|
|
1226
1226
|
} | undefined;
|
|
1227
1227
|
} | undefined;
|
|
@@ -1418,6 +1418,7 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1418
1418
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1419
1419
|
collection?: string | undefined;
|
|
1420
1420
|
}, {
|
|
1421
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1421
1422
|
config?: z.objectInputType<{
|
|
1422
1423
|
database: z.ZodOptional<z.ZodString>;
|
|
1423
1424
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -1425,7 +1426,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1425
1426
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
1426
1427
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
1427
1428
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1428
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1429
1429
|
collection?: string | undefined;
|
|
1430
1430
|
}>]>>;
|
|
1431
1431
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -1447,6 +1447,7 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1447
1447
|
provider?: string | undefined;
|
|
1448
1448
|
shortTerm?: boolean | undefined;
|
|
1449
1449
|
longTerm?: boolean | {
|
|
1450
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1450
1451
|
config?: z.objectInputType<{
|
|
1451
1452
|
database: z.ZodOptional<z.ZodString>;
|
|
1452
1453
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -1454,7 +1455,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1454
1455
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
1455
1456
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
1456
1457
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1457
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1458
1458
|
collection?: string | undefined;
|
|
1459
1459
|
} | undefined;
|
|
1460
1460
|
}>>;
|
|
@@ -1810,6 +1810,10 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1810
1810
|
env?: Record<string, string> | undefined;
|
|
1811
1811
|
}[] | undefined;
|
|
1812
1812
|
} | undefined;
|
|
1813
|
+
provider?: {
|
|
1814
|
+
default: string;
|
|
1815
|
+
allowed: string[];
|
|
1816
|
+
} | undefined;
|
|
1813
1817
|
auth?: {
|
|
1814
1818
|
enabled: boolean;
|
|
1815
1819
|
apiKeys: string[];
|
|
@@ -1826,10 +1830,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1826
1830
|
secret?: string | undefined;
|
|
1827
1831
|
retryAttempts?: number | undefined;
|
|
1828
1832
|
} | undefined;
|
|
1829
|
-
provider?: {
|
|
1830
|
-
default: string;
|
|
1831
|
-
allowed: string[];
|
|
1832
|
-
} | undefined;
|
|
1833
1833
|
systemPrompt?: string | undefined;
|
|
1834
1834
|
memory?: {
|
|
1835
1835
|
shortTerm: boolean;
|
|
@@ -1925,6 +1925,10 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1925
1925
|
}[] | undefined;
|
|
1926
1926
|
} | undefined;
|
|
1927
1927
|
model?: string | undefined;
|
|
1928
|
+
provider?: {
|
|
1929
|
+
default?: string | undefined;
|
|
1930
|
+
allowed?: string[] | undefined;
|
|
1931
|
+
} | undefined;
|
|
1928
1932
|
auth?: {
|
|
1929
1933
|
enabled?: boolean | undefined;
|
|
1930
1934
|
apiKeys?: string[] | undefined;
|
|
@@ -1941,10 +1945,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1941
1945
|
secret?: string | undefined;
|
|
1942
1946
|
retryAttempts?: number | undefined;
|
|
1943
1947
|
} | undefined;
|
|
1944
|
-
provider?: {
|
|
1945
|
-
default?: string | undefined;
|
|
1946
|
-
allowed?: string[] | undefined;
|
|
1947
|
-
} | undefined;
|
|
1948
1948
|
systemPrompt?: string | undefined;
|
|
1949
1949
|
skills?: {
|
|
1950
1950
|
name: string;
|
|
@@ -1960,6 +1960,7 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1960
1960
|
provider?: string | undefined;
|
|
1961
1961
|
shortTerm?: boolean | undefined;
|
|
1962
1962
|
longTerm?: boolean | {
|
|
1963
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1963
1964
|
config?: z.objectInputType<{
|
|
1964
1965
|
database: z.ZodOptional<z.ZodString>;
|
|
1965
1966
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -1967,7 +1968,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
1967
1968
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
1968
1969
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
1969
1970
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1970
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
1971
1971
|
collection?: string | undefined;
|
|
1972
1972
|
} | undefined;
|
|
1973
1973
|
} | undefined;
|
|
@@ -2085,6 +2085,10 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2085
2085
|
env?: Record<string, string> | undefined;
|
|
2086
2086
|
}[] | undefined;
|
|
2087
2087
|
} | undefined;
|
|
2088
|
+
provider?: {
|
|
2089
|
+
default: string;
|
|
2090
|
+
allowed: string[];
|
|
2091
|
+
} | undefined;
|
|
2088
2092
|
auth?: {
|
|
2089
2093
|
enabled: boolean;
|
|
2090
2094
|
apiKeys: string[];
|
|
@@ -2101,10 +2105,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2101
2105
|
secret?: string | undefined;
|
|
2102
2106
|
retryAttempts?: number | undefined;
|
|
2103
2107
|
} | undefined;
|
|
2104
|
-
provider?: {
|
|
2105
|
-
default: string;
|
|
2106
|
-
allowed: string[];
|
|
2107
|
-
} | undefined;
|
|
2108
2108
|
systemPrompt?: string | undefined;
|
|
2109
2109
|
memory?: {
|
|
2110
2110
|
shortTerm: boolean;
|
|
@@ -2217,6 +2217,10 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2217
2217
|
}[] | undefined;
|
|
2218
2218
|
} | undefined;
|
|
2219
2219
|
model?: string | undefined;
|
|
2220
|
+
provider?: {
|
|
2221
|
+
default?: string | undefined;
|
|
2222
|
+
allowed?: string[] | undefined;
|
|
2223
|
+
} | undefined;
|
|
2220
2224
|
auth?: {
|
|
2221
2225
|
enabled?: boolean | undefined;
|
|
2222
2226
|
apiKeys?: string[] | undefined;
|
|
@@ -2233,10 +2237,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2233
2237
|
secret?: string | undefined;
|
|
2234
2238
|
retryAttempts?: number | undefined;
|
|
2235
2239
|
} | undefined;
|
|
2236
|
-
provider?: {
|
|
2237
|
-
default?: string | undefined;
|
|
2238
|
-
allowed?: string[] | undefined;
|
|
2239
|
-
} | undefined;
|
|
2240
2240
|
systemPrompt?: string | undefined;
|
|
2241
2241
|
skills?: {
|
|
2242
2242
|
name: string;
|
|
@@ -2252,6 +2252,7 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2252
2252
|
provider?: string | undefined;
|
|
2253
2253
|
shortTerm?: boolean | undefined;
|
|
2254
2254
|
longTerm?: boolean | {
|
|
2255
|
+
provider?: "in-memory" | "deepbrain" | undefined;
|
|
2255
2256
|
config?: z.objectInputType<{
|
|
2256
2257
|
database: z.ZodOptional<z.ZodString>;
|
|
2257
2258
|
embeddingProvider: z.ZodOptional<z.ZodString>;
|
|
@@ -2259,7 +2260,6 @@ export declare const OADSchema: z.ZodObject<{
|
|
|
2259
2260
|
autoRecall: z.ZodOptional<z.ZodBoolean>;
|
|
2260
2261
|
evolveInterval: z.ZodOptional<z.ZodNumber>;
|
|
2261
2262
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2262
|
-
provider?: "in-memory" | "deepbrain" | undefined;
|
|
2263
2263
|
collection?: string | undefined;
|
|
2264
2264
|
} | undefined;
|
|
2265
2265
|
} | undefined;
|