@vxnus/siduri 0.0.7 → 0.0.9
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 +11 -1
- package/dist/builtin-manifests.js +12 -12
- package/dist/clean-machine-e2e.test.js +12 -12
- package/dist/configurators/behavior.d.ts +2 -0
- package/dist/configurators/behavior.js +36 -0
- package/dist/configurators/body.d.ts +2 -0
- package/dist/configurators/body.js +44 -0
- package/dist/configurators/brain.d.ts +6 -0
- package/dist/configurators/brain.js +80 -0
- package/dist/configurators/ear.d.ts +2 -0
- package/dist/configurators/ear.js +28 -0
- package/dist/configurators/hands.d.ts +2 -0
- package/dist/configurators/hands.js +27 -0
- package/dist/configurators/index.d.ts +23 -0
- package/dist/configurators/index.js +74 -0
- package/dist/configurators/knowledge.d.ts +6 -0
- package/dist/configurators/knowledge.js +100 -0
- package/dist/configurators/memory.d.ts +2 -0
- package/dist/configurators/memory.js +44 -0
- package/dist/configurators/observation.d.ts +2 -0
- package/dist/configurators/observation.js +12 -0
- package/dist/configurators/types.d.ts +12 -0
- package/dist/configurators/types.js +2 -0
- package/dist/configurators/vision.d.ts +2 -0
- package/dist/configurators/vision.js +39 -0
- package/dist/configurators/voice.d.ts +2 -0
- package/dist/configurators/voice.js +53 -0
- package/dist/configurators.test.d.ts +1 -0
- package/dist/configurators.test.js +275 -0
- package/dist/doctor-db.test.js +9 -3
- package/dist/generator.d.ts +2 -0
- package/dist/generator.js +289 -33
- package/dist/generator.test.js +20 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +165 -54
- package/dist/providers/knowledge-hub.d.ts +37 -0
- package/dist/providers/knowledge-hub.js +141 -0
- package/dist/providers/openrouter.d.ts +32 -0
- package/dist/providers/openrouter.js +201 -0
- package/dist/release-check.js +12 -12
- package/dist/web-dist/404/index.html +1 -0
- package/dist/web-dist/404.html +1 -0
- package/dist/web-dist/__next.__PAGE__.txt +34 -0
- package/dist/web-dist/__next._full.txt +27 -0
- package/dist/web-dist/__next._tree.txt +3 -0
- package/dist/web-dist/_next/static/_zOqKpMPc6RDqk04fUScI/_buildManifest.js +11 -0
- package/dist/web-dist/_next/static/_zOqKpMPc6RDqk04fUScI/_clientMiddlewareManifest.js +1 -0
- package/dist/web-dist/_next/static/_zOqKpMPc6RDqk04fUScI/_ssgManifest.js +1 -0
- package/dist/web-dist/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/dist/web-dist/_next/static/chunks/0uwih7sydv413.js +1 -0
- package/dist/web-dist/_next/static/chunks/1_yae15ffa5f6.js +1 -0
- package/dist/web-dist/_next/static/chunks/1hz3jco387c-k.js +1 -0
- package/dist/web-dist/_next/static/chunks/2bu5_paf4sm3x.css +1 -0
- package/dist/web-dist/_next/static/chunks/2kcqevsmv6kh2.js +31 -0
- package/dist/web-dist/_next/static/chunks/2s3d1bfr0l4b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/32z87id9k6i2z.js +22 -0
- package/dist/web-dist/_next/static/chunks/39nefv-hczfy7.js +30 -0
- package/dist/web-dist/_next/static/chunks/3bx2gs3idjmo1.js +1 -0
- package/dist/web-dist/_next/static/chunks/turbopack-3eipe4c-imn5l.js +1 -0
- package/dist/web-dist/_next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- package/dist/web-dist/_not-found/__next._full.txt +17 -0
- package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +23 -0
- package/dist/web-dist/_not-found/__next._tree.txt +3 -0
- package/dist/web-dist/_not-found/index.html +1 -0
- package/dist/web-dist/_not-found/index.txt +17 -0
- package/dist/web-dist/chat/__next._full.txt +18 -0
- package/dist/web-dist/chat/__next._tree.txt +3 -0
- package/dist/web-dist/chat/__next.chat.__PAGE__.txt +24 -0
- package/dist/web-dist/chat/index.html +1 -0
- package/dist/web-dist/chat/index.txt +18 -0
- package/dist/web-dist/favicon.ico +0 -0
- package/dist/web-dist/index.html +1 -0
- package/dist/web-dist/index.txt +27 -0
- package/dist/web-dist/live2d/akaituno/akaituno.8192/texture_00.png +0 -0
- package/dist/web-dist/live2d/akaituno/akaituno.cdi3.json +296 -0
- package/dist/web-dist/live2d/akaituno/akaituno.moc3 +0 -0
- package/dist/web-dist/live2d/akaituno/akaituno.model3.json +42 -0
- package/dist/web-dist/live2d/akaituno/akaituno.physics3.json +839 -0
- package/dist/web-dist/live2d/akaituno/eye_color.exp3.json +12 -0
- package/dist/web-dist/live2d/akaituno/eyes_zetubou.exp3.json +12 -0
- package/dist/web-dist/live2d/akaituno/face_aozame.exp3.json +12 -0
- package/dist/web-dist/live2d/akaituno/hair_open.exp3.json +12 -0
- package/dist/web-dist/live2d/live2dcubismcore.min.js +9 -0
- package/dist/web-dist/operator/__next._full.txt +18 -0
- package/dist/web-dist/operator/__next._tree.txt +3 -0
- package/dist/web-dist/operator/__next.operator.__PAGE__.txt +24 -0
- package/dist/web-dist/operator/index.html +1 -0
- package/dist/web-dist/operator/index.txt +18 -0
- package/dist/web-template.d.ts +2 -0
- package/dist/web-template.js +547 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -8,9 +8,18 @@ Requires Node.js 20 or newer.
|
|
|
8
8
|
npx @vxnus/siduri create my-companion
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
- **Node.js**: `v20.0.0` or newer
|
|
14
|
+
- **LLM API Key**: e.g. `OPENROUTER_API_KEY` for Brain organ
|
|
15
|
+
- **Optional Local Services**:
|
|
16
|
+
- **Docker**: For running local PostgreSQL database (`docker compose up -d` / `npm run services:up`) and/or VOICEVOX engine.
|
|
17
|
+
- *Non-Docker Alternatives*: Cloud databases (Supabase, Neon) or standalone [VOICEVOX Desktop App](https://voicevox.hiroshiba.jp/).
|
|
18
|
+
|
|
11
19
|
## Features
|
|
12
20
|
|
|
13
21
|
- **Manifest-Driven Organ Discovery**: Dynamically discovers installed `@siduri-x/*` organs and generates custom, standalone ESM instance code.
|
|
22
|
+
- **Interactive Configuration Wizard**: Model catalog discovery for OpenRouter, manifest inspection for E Knowledge Hub, and guided organ parameters.
|
|
14
23
|
- **Zero Monolithic Bundling**: Scaffolds standard Node.js ESM projects with explicit dependency trees.
|
|
15
24
|
- **Diagnostics (`siduri doctor`)**: Runs environment variable validation, external service checks, database health probes, and organ-specific assertions.
|
|
16
25
|
- **Database Migrations (`siduri db push`)**: Inspects database-owning organs (such as `@siduri-x/memory`) and executes SQL migrations with SHA-256 integrity checksums.
|
|
@@ -23,7 +32,7 @@ npx @vxnus/siduri create my-companion
|
|
|
23
32
|
npx @vxnus/siduri create [directory]
|
|
24
33
|
```
|
|
25
34
|
|
|
26
|
-
The interactive wizard allows you to name your companion
|
|
35
|
+
The interactive wizard allows you to name your companion, configure organ providers and models, and inspect Knowledge manifests. It generates:
|
|
27
36
|
|
|
28
37
|
```text
|
|
29
38
|
my-companion/
|
|
@@ -32,6 +41,7 @@ my-companion/
|
|
|
32
41
|
├── siduri.schema.json # Composed JSON Schema from organ manifests
|
|
33
42
|
├── .env.example # Only environment variables required by selected organs
|
|
34
43
|
├── README.md # Instance-specific guide
|
|
44
|
+
├── docker-compose.yml # Scaffolds PostgreSQL / VOICEVOX when selected
|
|
35
45
|
└── src/
|
|
36
46
|
└── index.js # Direct runtime bootstrapping with explicit organ factories
|
|
37
47
|
```
|
|
@@ -5,7 +5,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
5
5
|
{
|
|
6
6
|
name: '@siduri-x/behavior',
|
|
7
7
|
organType: 'behavior',
|
|
8
|
-
version: '1.0.
|
|
8
|
+
version: '1.0.1',
|
|
9
9
|
displayName: 'Behavior (Active Self Directives)',
|
|
10
10
|
description: 'Atomic directive state machine and personality projection compiler',
|
|
11
11
|
entrypoint: './dist/index.js',
|
|
@@ -32,7 +32,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
32
32
|
{
|
|
33
33
|
name: '@siduri-x/body',
|
|
34
34
|
organType: 'body',
|
|
35
|
-
version: '1.0.
|
|
35
|
+
version: '1.0.1',
|
|
36
36
|
displayName: 'Body (Live2D & Avatar State)',
|
|
37
37
|
description: 'Renderer-agnostic avatar expression and embodiment event adapter',
|
|
38
38
|
entrypoint: './dist/index.js',
|
|
@@ -60,7 +60,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
60
60
|
{
|
|
61
61
|
name: '@siduri-x/brain',
|
|
62
62
|
organType: 'brain',
|
|
63
|
-
version: '1.0.
|
|
63
|
+
version: '1.0.1',
|
|
64
64
|
displayName: 'Brain (Cognition & Planning)',
|
|
65
65
|
description: 'Provider-neutral LLM reasoning, response planning, and proposal generation',
|
|
66
66
|
entrypoint: './dist/index.js',
|
|
@@ -116,7 +116,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
116
116
|
{
|
|
117
117
|
name: '@siduri-x/ear',
|
|
118
118
|
organType: 'ear',
|
|
119
|
-
version: '1.0.
|
|
119
|
+
version: '1.0.1',
|
|
120
120
|
displayName: 'Ear (Perception Ingress)',
|
|
121
121
|
description: 'Multi-modal sensory input ingestion, transcription bounds, and mime validation',
|
|
122
122
|
entrypoint: './dist/index.js',
|
|
@@ -147,7 +147,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
147
147
|
{
|
|
148
148
|
name: '@siduri-x/hands',
|
|
149
149
|
organType: 'hands',
|
|
150
|
-
version: '1.0.
|
|
150
|
+
version: '1.0.1',
|
|
151
151
|
displayName: 'Hands (MCP Tool Execution)',
|
|
152
152
|
description: 'Model Context Protocol tool management and cryptographically authorized action execution',
|
|
153
153
|
entrypoint: './dist/index.js',
|
|
@@ -201,7 +201,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
201
201
|
{
|
|
202
202
|
name: '@siduri-x/knowledge',
|
|
203
203
|
organType: 'knowledge',
|
|
204
|
-
version: '1.0.
|
|
204
|
+
version: '1.0.1',
|
|
205
205
|
displayName: 'Knowledge (E-Compatible Cited Facts)',
|
|
206
206
|
description: 'Factual context retrieval from local or hosted E Knowledge packs',
|
|
207
207
|
entrypoint: './dist/index.js',
|
|
@@ -266,7 +266,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
266
266
|
{
|
|
267
267
|
name: '@siduri-x/memory',
|
|
268
268
|
organType: 'memory',
|
|
269
|
-
version: '1.0.
|
|
269
|
+
version: '1.0.1',
|
|
270
270
|
displayName: 'Memory (PostgreSQL FTS Claims)',
|
|
271
271
|
description: 'Relational semantic claims with Full-Text Search and companion isolation',
|
|
272
272
|
entrypoint: './dist/index.js',
|
|
@@ -318,9 +318,9 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
318
318
|
{
|
|
319
319
|
name: '@siduri-x/observation',
|
|
320
320
|
organType: 'observation',
|
|
321
|
-
version: '1.0.
|
|
322
|
-
displayName: 'Observation (
|
|
323
|
-
description: '
|
|
321
|
+
version: '1.0.1',
|
|
322
|
+
displayName: 'Observation (Screen Perception & Frame Ingest)',
|
|
323
|
+
description: 'Screen capture frame ingest, SHA-256 deduplication, and visual grounding for Eyes/Vision',
|
|
324
324
|
entrypoint: './dist/index.js',
|
|
325
325
|
factory: 'FixtureObservationOrgan',
|
|
326
326
|
configKey: 'observation',
|
|
@@ -336,7 +336,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
336
336
|
{
|
|
337
337
|
name: '@siduri-x/vision',
|
|
338
338
|
organType: 'vision',
|
|
339
|
-
version: '1.0.
|
|
339
|
+
version: '1.0.1',
|
|
340
340
|
displayName: 'Vision (Visual Perception & OCR)',
|
|
341
341
|
description: 'Image inspection, cropping, and multi-pass OCR perception adapter',
|
|
342
342
|
entrypoint: './dist/index.js',
|
|
@@ -383,7 +383,7 @@ exports.BUILTIN_ORGAN_MANIFESTS = [
|
|
|
383
383
|
{
|
|
384
384
|
name: '@siduri-x/voice',
|
|
385
385
|
organType: 'voice',
|
|
386
|
-
version: '1.0.
|
|
386
|
+
version: '1.0.1',
|
|
387
387
|
displayName: 'Voice (VOICEVOX Speech Synthesis)',
|
|
388
388
|
description: 'Queued speech synthesis and audio rendering lifecycle adapter',
|
|
389
389
|
entrypoint: './dist/index.js',
|
|
@@ -13,18 +13,18 @@ describe('Phase 5: Clean-Machine Distribution & E2E Integration Suite', () => {
|
|
|
13
13
|
const tempPackDir = node_path_1.default.resolve(__dirname, '../temp-packs-e2e');
|
|
14
14
|
const cleanMachineRoot = node_path_1.default.resolve(__dirname, '../temp-clean-machine-e2e');
|
|
15
15
|
const ALL_CANONICAL_PACKAGES = [
|
|
16
|
-
{ filter: '@siduri-x/core', tarName: 'siduri-x-core-1.0.
|
|
17
|
-
{ filter: '@siduri-x/brain', tarName: 'siduri-x-brain-1.0.
|
|
18
|
-
{ filter: '@siduri-x/memory', tarName: 'siduri-x-memory-1.0.
|
|
19
|
-
{ filter: '@siduri-x/knowledge', tarName: 'siduri-x-knowledge-1.0.
|
|
20
|
-
{ filter: '@siduri-x/behavior', tarName: 'siduri-x-behavior-1.0.
|
|
21
|
-
{ filter: '@siduri-x/ear', tarName: 'siduri-x-ear-1.0.
|
|
22
|
-
{ filter: '@siduri-x/vision', tarName: 'siduri-x-vision-1.0.
|
|
23
|
-
{ filter: '@siduri-x/hands', tarName: 'siduri-x-hands-1.0.
|
|
24
|
-
{ filter: '@siduri-x/body', tarName: 'siduri-x-body-1.0.
|
|
25
|
-
{ filter: '@siduri-x/voice', tarName: 'siduri-x-voice-1.0.
|
|
26
|
-
{ filter: '@siduri-x/observation', tarName: 'siduri-x-observation-1.0.
|
|
27
|
-
{ filter: '@vxnus/siduri', tarName: 'vxnus-siduri-0.0.
|
|
16
|
+
{ filter: '@siduri-x/core', tarName: 'siduri-x-core-1.0.1.tgz', isOrgan: false },
|
|
17
|
+
{ filter: '@siduri-x/brain', tarName: 'siduri-x-brain-1.0.1.tgz', isOrgan: true },
|
|
18
|
+
{ filter: '@siduri-x/memory', tarName: 'siduri-x-memory-1.0.1.tgz', isOrgan: true },
|
|
19
|
+
{ filter: '@siduri-x/knowledge', tarName: 'siduri-x-knowledge-1.0.1.tgz', isOrgan: true },
|
|
20
|
+
{ filter: '@siduri-x/behavior', tarName: 'siduri-x-behavior-1.0.1.tgz', isOrgan: true },
|
|
21
|
+
{ filter: '@siduri-x/ear', tarName: 'siduri-x-ear-1.0.1.tgz', isOrgan: true },
|
|
22
|
+
{ filter: '@siduri-x/vision', tarName: 'siduri-x-vision-1.0.1.tgz', isOrgan: true },
|
|
23
|
+
{ filter: '@siduri-x/hands', tarName: 'siduri-x-hands-1.0.1.tgz', isOrgan: true },
|
|
24
|
+
{ filter: '@siduri-x/body', tarName: 'siduri-x-body-1.0.1.tgz', isOrgan: true },
|
|
25
|
+
{ filter: '@siduri-x/voice', tarName: 'siduri-x-voice-1.0.1.tgz', isOrgan: true },
|
|
26
|
+
{ filter: '@siduri-x/observation', tarName: 'siduri-x-observation-1.0.1.tgz', isOrgan: true },
|
|
27
|
+
{ filter: '@vxnus/siduri', tarName: 'vxnus-siduri-0.0.9.tgz', isOrgan: false },
|
|
28
28
|
];
|
|
29
29
|
beforeAll(() => {
|
|
30
30
|
// 1. Prepare clean directories
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureBehavior = configureBehavior;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureBehavior(_context) {
|
|
9
|
+
const { preset } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'preset',
|
|
12
|
+
message: 'Personality projection preset:',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'Calm & Precise (Default)', value: 'calm_precise' },
|
|
15
|
+
{ name: 'Cheerful & Enthusiastic', value: 'cheerful' },
|
|
16
|
+
{ name: 'Analytical & Methodical', value: 'analytical' },
|
|
17
|
+
{ name: 'Custom Directive State Machine', value: 'custom' },
|
|
18
|
+
],
|
|
19
|
+
});
|
|
20
|
+
const presetLabels = {
|
|
21
|
+
calm_precise: 'Calm & Precise',
|
|
22
|
+
cheerful: 'Cheerful & Enthusiastic',
|
|
23
|
+
analytical: 'Analytical & Methodical',
|
|
24
|
+
custom: 'Custom Directives',
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
config: {
|
|
28
|
+
provider: 'active_self',
|
|
29
|
+
preset,
|
|
30
|
+
},
|
|
31
|
+
summary: {
|
|
32
|
+
Provider: 'Active Self Directives',
|
|
33
|
+
Preset: presetLabels[preset] || preset,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureBody = configureBody;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureBody(_context) {
|
|
9
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'provider',
|
|
12
|
+
message: 'Body avatar provider?',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'Live2D Cubism (Interactive avatar motion & expression state)', value: 'live2d' },
|
|
15
|
+
{ name: 'None (Headless / No visual body)', value: 'none' },
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
if (provider === 'none') {
|
|
19
|
+
return {
|
|
20
|
+
config: { provider: 'none' },
|
|
21
|
+
summary: { Provider: 'None (Headless)' },
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const { initialExpression } = await inquirer_1.default.prompt({
|
|
25
|
+
type: 'list',
|
|
26
|
+
name: 'initialExpression',
|
|
27
|
+
message: 'Initial avatar expression:',
|
|
28
|
+
choices: [
|
|
29
|
+
{ name: 'Neutral', value: 'neutral' },
|
|
30
|
+
{ name: 'Happy / Cheerful', value: 'happy' },
|
|
31
|
+
{ name: 'Calm', value: 'calm' },
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
config: {
|
|
36
|
+
provider: 'live2d',
|
|
37
|
+
initialExpression,
|
|
38
|
+
},
|
|
39
|
+
summary: {
|
|
40
|
+
Provider: 'Live2D',
|
|
41
|
+
Expression: initialExpression,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
|
|
2
|
+
import { ModelProvider } from '../providers/openrouter';
|
|
3
|
+
export interface BrainConfiguratorOptions {
|
|
4
|
+
modelProvider?: ModelProvider;
|
|
5
|
+
}
|
|
6
|
+
export declare function configureBrain(_context: OrganConfiguratorContext, options?: BrainConfiguratorOptions): Promise<OrganConfigurationResult>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureBrain = configureBrain;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
const openrouter_1 = require("../providers/openrouter");
|
|
9
|
+
async function configureBrain(_context, options = {}) {
|
|
10
|
+
const modelProvider = options.modelProvider || new openrouter_1.OpenRouterModelProvider();
|
|
11
|
+
while (true) {
|
|
12
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
13
|
+
type: 'list',
|
|
14
|
+
name: 'provider',
|
|
15
|
+
message: 'Brain provider?',
|
|
16
|
+
choices: [
|
|
17
|
+
{ name: 'OpenRouter (Managed Routing & Broad Model Access)', value: 'openrouter' },
|
|
18
|
+
{ name: 'OpenAI-compatible / Custom endpoint (Ollama, vLLM, Azure, OpenAI)', value: 'openai-compatible' },
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
if (provider === 'openrouter') {
|
|
22
|
+
const selection = await (0, openrouter_1.promptOpenRouterModelSelection)(modelProvider);
|
|
23
|
+
if (selection.type === 'switch_provider') {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (selection.type === 'cancel') {
|
|
27
|
+
throw new Error('Brain configuration cancelled.');
|
|
28
|
+
}
|
|
29
|
+
const modelId = selection.modelId;
|
|
30
|
+
return {
|
|
31
|
+
config: {
|
|
32
|
+
provider: 'openrouter',
|
|
33
|
+
model: modelId,
|
|
34
|
+
apiKeyEnv: 'OPENROUTER_API_KEY',
|
|
35
|
+
},
|
|
36
|
+
summary: {
|
|
37
|
+
Provider: 'OpenRouter',
|
|
38
|
+
Model: modelId,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (provider === 'openai-compatible') {
|
|
43
|
+
const answers = await inquirer_1.default.prompt([
|
|
44
|
+
{
|
|
45
|
+
type: 'input',
|
|
46
|
+
name: 'baseUrl',
|
|
47
|
+
message: 'Endpoint Base URL:',
|
|
48
|
+
default: 'https://api.openai.com/v1',
|
|
49
|
+
validate: (v) => v.trim().length > 0 || 'Base URL is required.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: 'input',
|
|
53
|
+
name: 'model',
|
|
54
|
+
message: 'Model ID (e.g. gpt-4o, llama3, mistral):',
|
|
55
|
+
default: 'gpt-4o',
|
|
56
|
+
validate: (v) => v.trim().length > 0 || 'Model ID is required.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'input',
|
|
60
|
+
name: 'apiKeyEnv',
|
|
61
|
+
message: 'API Key environment variable name:',
|
|
62
|
+
default: 'OPENAI_COMPATIBLE_API_KEY',
|
|
63
|
+
},
|
|
64
|
+
]);
|
|
65
|
+
return {
|
|
66
|
+
config: {
|
|
67
|
+
provider: 'openai-compatible',
|
|
68
|
+
model: answers.model.trim(),
|
|
69
|
+
baseUrl: answers.baseUrl.trim(),
|
|
70
|
+
apiKeyEnv: answers.apiKeyEnv.trim() || 'OPENAI_COMPATIBLE_API_KEY',
|
|
71
|
+
},
|
|
72
|
+
summary: {
|
|
73
|
+
Provider: 'OpenAI-compatible',
|
|
74
|
+
Model: answers.model.trim(),
|
|
75
|
+
'Base URL': answers.baseUrl.trim(),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureEar = configureEar;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureEar(_context) {
|
|
9
|
+
const { defaultSource } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'defaultSource',
|
|
12
|
+
message: 'Perception ingress channel:',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'Text Chat (Standard multimodal chat ingress)', value: 'text_chat' },
|
|
15
|
+
{ name: 'Audio Streaming Ingress', value: 'audio_stream' },
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
config: {
|
|
20
|
+
defaultSource,
|
|
21
|
+
maxTextLength: 4000,
|
|
22
|
+
maxAudioBytes: 10485760,
|
|
23
|
+
},
|
|
24
|
+
summary: {
|
|
25
|
+
'Default Ingress': defaultSource === 'text_chat' ? 'Text Chat' : 'Audio Stream',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureHands = configureHands;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureHands(_context) {
|
|
9
|
+
const { timeoutSeconds } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'input',
|
|
11
|
+
name: 'timeoutSeconds',
|
|
12
|
+
message: 'MCP Tool execution timeout (seconds):',
|
|
13
|
+
default: '10',
|
|
14
|
+
validate: (v) => (!isNaN(Number(v)) && Number(v) > 0) || 'Timeout must be a positive number.',
|
|
15
|
+
});
|
|
16
|
+
const timeoutMs = Math.round(Number(timeoutSeconds) * 1000);
|
|
17
|
+
return {
|
|
18
|
+
config: {
|
|
19
|
+
defaultTimeoutMs: timeoutMs,
|
|
20
|
+
providers: [],
|
|
21
|
+
},
|
|
22
|
+
summary: {
|
|
23
|
+
'Default Timeout': `${timeoutSeconds}s`,
|
|
24
|
+
'MCP Execution': 'Active Policy HMAC Protected',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OrganManifest } from '../manifest';
|
|
2
|
+
import { OrganConfigurationResult } from './types';
|
|
3
|
+
import { BrainConfiguratorOptions } from './brain';
|
|
4
|
+
import { KnowledgeConfiguratorOptions } from './knowledge';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './brain';
|
|
7
|
+
export * from './knowledge';
|
|
8
|
+
export * from './memory';
|
|
9
|
+
export * from './voice';
|
|
10
|
+
export * from './body';
|
|
11
|
+
export * from './hands';
|
|
12
|
+
export * from './behavior';
|
|
13
|
+
export * from './vision';
|
|
14
|
+
export * from './ear';
|
|
15
|
+
export * from './observation';
|
|
16
|
+
export interface ConfigureOrganOptions {
|
|
17
|
+
brainOptions?: BrainConfiguratorOptions;
|
|
18
|
+
knowledgeOptions?: KnowledgeConfiguratorOptions;
|
|
19
|
+
}
|
|
20
|
+
export declare function configureOrgan(manifest: OrganManifest, context: {
|
|
21
|
+
companionName: string;
|
|
22
|
+
existingConfig?: Record<string, unknown>;
|
|
23
|
+
}, options?: ConfigureOrganOptions): Promise<OrganConfigurationResult>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.configureOrgan = configureOrgan;
|
|
18
|
+
const brain_1 = require("./brain");
|
|
19
|
+
const knowledge_1 = require("./knowledge");
|
|
20
|
+
const memory_1 = require("./memory");
|
|
21
|
+
const voice_1 = require("./voice");
|
|
22
|
+
const body_1 = require("./body");
|
|
23
|
+
const hands_1 = require("./hands");
|
|
24
|
+
const behavior_1 = require("./behavior");
|
|
25
|
+
const vision_1 = require("./vision");
|
|
26
|
+
const ear_1 = require("./ear");
|
|
27
|
+
const observation_1 = require("./observation");
|
|
28
|
+
__exportStar(require("./types"), exports);
|
|
29
|
+
__exportStar(require("./brain"), exports);
|
|
30
|
+
__exportStar(require("./knowledge"), exports);
|
|
31
|
+
__exportStar(require("./memory"), exports);
|
|
32
|
+
__exportStar(require("./voice"), exports);
|
|
33
|
+
__exportStar(require("./body"), exports);
|
|
34
|
+
__exportStar(require("./hands"), exports);
|
|
35
|
+
__exportStar(require("./behavior"), exports);
|
|
36
|
+
__exportStar(require("./vision"), exports);
|
|
37
|
+
__exportStar(require("./ear"), exports);
|
|
38
|
+
__exportStar(require("./observation"), exports);
|
|
39
|
+
async function configureOrgan(manifest, context, options = {}) {
|
|
40
|
+
const ctx = {
|
|
41
|
+
companionName: context.companionName,
|
|
42
|
+
manifest,
|
|
43
|
+
existingConfig: context.existingConfig,
|
|
44
|
+
};
|
|
45
|
+
switch (manifest.organType) {
|
|
46
|
+
case 'brain':
|
|
47
|
+
return (0, brain_1.configureBrain)(ctx, options.brainOptions);
|
|
48
|
+
case 'knowledge':
|
|
49
|
+
return (0, knowledge_1.configureKnowledge)(ctx, options.knowledgeOptions);
|
|
50
|
+
case 'memory':
|
|
51
|
+
return (0, memory_1.configureMemory)(ctx);
|
|
52
|
+
case 'voice':
|
|
53
|
+
return (0, voice_1.configureVoice)(ctx);
|
|
54
|
+
case 'body':
|
|
55
|
+
return (0, body_1.configureBody)(ctx);
|
|
56
|
+
case 'hands':
|
|
57
|
+
return (0, hands_1.configureHands)(ctx);
|
|
58
|
+
case 'behavior':
|
|
59
|
+
return (0, behavior_1.configureBehavior)(ctx);
|
|
60
|
+
case 'vision':
|
|
61
|
+
return (0, vision_1.configureVision)(ctx);
|
|
62
|
+
case 'ear':
|
|
63
|
+
return (0, ear_1.configureEar)(ctx);
|
|
64
|
+
case 'observation':
|
|
65
|
+
return (0, observation_1.configureObservation)(ctx);
|
|
66
|
+
default:
|
|
67
|
+
return {
|
|
68
|
+
config: ctx.existingConfig || {},
|
|
69
|
+
summary: {
|
|
70
|
+
Provider: manifest.displayName,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
|
|
2
|
+
import { KnowledgeHubClient } from '../providers/knowledge-hub';
|
|
3
|
+
export interface KnowledgeConfiguratorOptions {
|
|
4
|
+
client?: KnowledgeHubClient;
|
|
5
|
+
}
|
|
6
|
+
export declare function configureKnowledge(_context: OrganConfiguratorContext, options?: KnowledgeConfiguratorOptions): Promise<OrganConfigurationResult>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureKnowledge = configureKnowledge;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
const knowledge_hub_1 = require("../providers/knowledge-hub");
|
|
9
|
+
async function configureKnowledge(_context, options = {}) {
|
|
10
|
+
const client = options.client || new knowledge_hub_1.KnowledgeHubClient();
|
|
11
|
+
const { source } = await inquirer_1.default.prompt({
|
|
12
|
+
type: 'list',
|
|
13
|
+
name: 'source',
|
|
14
|
+
message: 'Knowledge source?',
|
|
15
|
+
choices: [
|
|
16
|
+
{ name: 'E Knowledge Hub (Search and attach remote factual pack)', value: 'e-hub' },
|
|
17
|
+
{ name: 'Do not use knowledge', value: 'none' },
|
|
18
|
+
],
|
|
19
|
+
});
|
|
20
|
+
if (source === 'none') {
|
|
21
|
+
return {
|
|
22
|
+
config: {
|
|
23
|
+
provider: 'none',
|
|
24
|
+
},
|
|
25
|
+
summary: {
|
|
26
|
+
Source: 'Do not use knowledge',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// E Knowledge Hub flow
|
|
31
|
+
while (true) {
|
|
32
|
+
const { packId } = await inquirer_1.default.prompt({
|
|
33
|
+
type: 'input',
|
|
34
|
+
name: 'packId',
|
|
35
|
+
message: 'Search E Knowledge Hub or enter package ID:',
|
|
36
|
+
default: '@vxnus/e-teyvat',
|
|
37
|
+
validate: (val) => val.trim().length > 0 || 'Please enter a package ID.',
|
|
38
|
+
});
|
|
39
|
+
const trimmedPackId = packId.trim();
|
|
40
|
+
let manifest;
|
|
41
|
+
try {
|
|
42
|
+
process.stdout.write('\u001b[2mSearching E Knowledge Hub...\u001b[0m');
|
|
43
|
+
manifest = await client.resolveProvider(trimmedPackId);
|
|
44
|
+
process.stdout.write('\r\u001b[32m✓\u001b[0m Checking provider manifest\n');
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
process.stdout.write('\r\u001b[33m!\u001b[0m Provider resolution failed\n');
|
|
48
|
+
console.log(`\u001b[33mReason:\u001b[0m ${err.message}\n`);
|
|
49
|
+
const { failureAction } = await inquirer_1.default.prompt({
|
|
50
|
+
type: 'list',
|
|
51
|
+
name: 'failureAction',
|
|
52
|
+
message: 'What would you like to do?',
|
|
53
|
+
choices: [
|
|
54
|
+
{ name: 'Try again / Search another provider', value: 'retry' },
|
|
55
|
+
{ name: 'Do not use knowledge', value: 'skip' },
|
|
56
|
+
{ name: 'Cancel', value: 'cancel' },
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
if (failureAction === 'retry') {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (failureAction === 'skip') {
|
|
63
|
+
return {
|
|
64
|
+
config: { provider: 'none' },
|
|
65
|
+
summary: { Source: 'Do not use knowledge' },
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
throw new Error('Knowledge configuration cancelled.');
|
|
69
|
+
}
|
|
70
|
+
// Display provider summary
|
|
71
|
+
(0, knowledge_hub_1.displayKnowledgeProviderSummary)(manifest, trimmedPackId);
|
|
72
|
+
const { confirmProvider } = await inquirer_1.default.prompt({
|
|
73
|
+
type: 'list',
|
|
74
|
+
name: 'confirmProvider',
|
|
75
|
+
message: 'Use this knowledge provider?',
|
|
76
|
+
choices: [
|
|
77
|
+
{ name: 'Yes, use this provider', value: 'yes' },
|
|
78
|
+
{ name: 'Choose another provider', value: 'retry' },
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
if (confirmProvider === 'yes') {
|
|
82
|
+
return {
|
|
83
|
+
config: {
|
|
84
|
+
provider: 'e-hub',
|
|
85
|
+
registryUrl: 'https://e.vxnus.xyz/api/v1/knowledge',
|
|
86
|
+
packId: trimmedPackId,
|
|
87
|
+
},
|
|
88
|
+
summary: {
|
|
89
|
+
Source: 'E Knowledge Hub',
|
|
90
|
+
Provider: manifest.displayName || manifest.name,
|
|
91
|
+
Package: trimmedPackId,
|
|
92
|
+
Version: manifest.version,
|
|
93
|
+
},
|
|
94
|
+
metadata: {
|
|
95
|
+
manifest,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|