@vxnus/siduri 0.0.5 → 0.0.7

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 CHANGED
@@ -1,47 +1,66 @@
1
1
  # @vxnus/siduri
2
2
 
3
- Experimental CLI for creating and configuring Siduri companions.
3
+ Experimental CLI for creating, diagnosing, and managing standalone Siduri companions powered by the `@siduri-x/*` organ ecosystem.
4
4
 
5
5
  Requires Node.js 20 or newer.
6
6
 
7
7
  ```bash
8
- npx @vxnus/siduri@0.0.5 create
8
+ npx @vxnus/siduri create my-companion
9
9
  ```
10
10
 
11
- The companion name becomes the project directory. For example, answering
12
- `My Companion` creates `./my-companion/siduri.config.json` from the current
13
- directory.
11
+ ## Features
14
12
 
15
- The wizard configures the required Brain and Memory organs, then lets you
16
- enable or disable Voice, Knowledge, Behavior, Body, and Vision. Knowledge can
17
- come from an installed E pack, an E Hub distribution, or a hosted provider.
13
+ - **Manifest-Driven Organ Discovery**: Dynamically discovers installed `@siduri-x/*` organs and generates custom, standalone ESM instance code.
14
+ - **Zero Monolithic Bundling**: Scaffolds standard Node.js ESM projects with explicit dependency trees.
15
+ - **Diagnostics (`siduri doctor`)**: Runs environment variable validation, external service checks, database health probes, and organ-specific assertions.
16
+ - **Database Migrations (`siduri db push`)**: Inspects database-owning organs (such as `@siduri-x/memory`) and executes SQL migrations with SHA-256 integrity checksums.
18
17
 
19
- Brain providers:
18
+ ## CLI Usage
20
19
 
21
- - **OpenRouter** managed model routing using `OPENROUTER_API_KEY`.
22
- - **OpenAI-compatible API** — a custom `baseUrl`, model ID, and API-key
23
- environment variable.
20
+ ### 1. Create a Standalone Companion
24
21
 
25
- Memory currently uses PostgreSQL. The wizard lets you choose Local PostgreSQL,
26
- Neon, Supabase, or another PostgreSQL provider; all use `DATABASE_URL`. SQLite
27
- is shown as a future option but is not selectable in this release.
22
+ ```bash
23
+ npx @vxnus/siduri create [directory]
24
+ ```
25
+
26
+ The interactive wizard allows you to name your companion and select any combination of available `@siduri-x/*` organs. It generates:
27
+
28
+ ```text
29
+ my-companion/
30
+ ├── package.json # ESM package referencing only selected @siduri-x/* organs
31
+ ├── siduri.config.json # Selected organ configurations
32
+ ├── siduri.schema.json # Composed JSON Schema from organ manifests
33
+ ├── .env.example # Only environment variables required by selected organs
34
+ ├── README.md # Instance-specific guide
35
+ └── src/
36
+ └── index.js # Direct runtime bootstrapping with explicit organ factories
37
+ ```
38
+
39
+ ### 2. Run Diagnostics
40
+
41
+ ```bash
42
+ npx @vxnus/siduri doctor [directory]
43
+ ```
44
+
45
+ Inspects active configuration, checks required/optional environment variables, and executes health probes.
46
+
47
+ ### 3. Apply Migrations
48
+
49
+ ```bash
50
+ npx @vxnus/siduri db push [directory]
51
+ ```
52
+
53
+ Runs database migrations exclusively for configured database organs. If no database organs are selected (e.g. Brain + Hands), reports that no migrations are needed.
28
54
 
29
- The wizard creates a project directory from the companion name, writes
30
- `siduri.config.json`, copies the Siduri runtime, and installs the runtime
31
- dependencies. API keys are never written to the configuration file. Optional
32
- organs can be configured as `{ "provider": "none" }`; Brain and Memory remain
33
- required.
55
+ ## Local Development
34
56
 
35
- After setup, start the generated instance with:
57
+ From the repository root:
36
58
 
37
59
  ```bash
38
- cd my-companion
39
- npm run start
60
+ pnpm --filter @vxnus/siduri build
61
+ pnpm --filter @vxnus/siduri test
40
62
  ```
41
63
 
42
- For local development, build the CLI from the repository root with
43
- `pnpm --filter @vxnus/siduri build`. For the full architecture, see the
44
- [CLI documentation](../docs/cli.md) and
45
- [configuration reference](../docs/configuration.md).
64
+ ## License
46
65
 
47
- This release is experimental and is not intended for production use.
66
+ Licensed under the [Apache License, Version 2.0](./LICENSE).
@@ -0,0 +1,2 @@
1
+ import { OrganManifest } from './manifest';
2
+ export declare const BUILTIN_ORGAN_MANIFESTS: OrganManifest[];
@@ -0,0 +1,433 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BUILTIN_ORGAN_MANIFESTS = void 0;
4
+ exports.BUILTIN_ORGAN_MANIFESTS = [
5
+ {
6
+ name: '@siduri-x/behavior',
7
+ organType: 'behavior',
8
+ version: '1.0.0',
9
+ displayName: 'Behavior (Active Self Directives)',
10
+ description: 'Atomic directive state machine and personality projection compiler',
11
+ entrypoint: './dist/index.js',
12
+ factory: 'ActiveSelfCompiler',
13
+ configKey: 'behavior',
14
+ configSchema: {
15
+ type: 'object',
16
+ required: ['provider'],
17
+ properties: {
18
+ provider: {
19
+ type: 'string',
20
+ enum: ['active_self', 'none']
21
+ },
22
+ preset: {
23
+ type: 'string'
24
+ }
25
+ }
26
+ },
27
+ environment: [],
28
+ services: [],
29
+ database: null,
30
+ healthCheck: null
31
+ },
32
+ {
33
+ name: '@siduri-x/body',
34
+ organType: 'body',
35
+ version: '1.0.0',
36
+ displayName: 'Body (Live2D & Avatar State)',
37
+ description: 'Renderer-agnostic avatar expression and embodiment event adapter',
38
+ entrypoint: './dist/index.js',
39
+ factory: 'NeutralBodyOrgan',
40
+ configKey: 'body',
41
+ configSchema: {
42
+ type: 'object',
43
+ required: ['provider'],
44
+ properties: {
45
+ provider: {
46
+ type: 'string',
47
+ enum: ['live2d', 'none']
48
+ },
49
+ initialExpression: {
50
+ type: 'string',
51
+ default: 'neutral'
52
+ }
53
+ }
54
+ },
55
+ environment: [],
56
+ services: [],
57
+ database: null,
58
+ healthCheck: null
59
+ },
60
+ {
61
+ name: '@siduri-x/brain',
62
+ organType: 'brain',
63
+ version: '1.0.0',
64
+ displayName: 'Brain (Cognition & Planning)',
65
+ description: 'Provider-neutral LLM reasoning, response planning, and proposal generation',
66
+ entrypoint: './dist/index.js',
67
+ factory: 'OpenRouterBrain',
68
+ configKey: 'brain',
69
+ configSchema: {
70
+ type: 'object',
71
+ required: ['provider', 'model'],
72
+ properties: {
73
+ provider: {
74
+ type: 'string',
75
+ enum: ['openrouter', 'openai-compatible']
76
+ },
77
+ model: {
78
+ type: 'string'
79
+ },
80
+ apiKey: {
81
+ type: 'string'
82
+ },
83
+ apiKeyEnv: {
84
+ type: 'string',
85
+ default: 'OPENROUTER_API_KEY'
86
+ },
87
+ baseUrl: {
88
+ type: 'string'
89
+ }
90
+ }
91
+ },
92
+ environment: [
93
+ {
94
+ name: 'OPENROUTER_API_KEY',
95
+ required: false,
96
+ secret: true,
97
+ description: 'API key for OpenRouter managed routing'
98
+ },
99
+ {
100
+ name: 'OPENAI_COMPATIBLE_API_KEY',
101
+ required: false,
102
+ secret: true,
103
+ description: 'API key for OpenAI-compatible endpoint'
104
+ }
105
+ ],
106
+ services: [
107
+ {
108
+ name: 'LLM Inference API',
109
+ kind: 'http_service',
110
+ optional: false
111
+ }
112
+ ],
113
+ database: null,
114
+ healthCheck: 'probeBrainHealth'
115
+ },
116
+ {
117
+ name: '@siduri-x/ear',
118
+ organType: 'ear',
119
+ version: '1.0.0',
120
+ displayName: 'Ear (Perception Ingress)',
121
+ description: 'Multi-modal sensory input ingestion, transcription bounds, and mime validation',
122
+ entrypoint: './dist/index.js',
123
+ factory: 'DefaultEarOrgan',
124
+ configKey: 'ear',
125
+ configSchema: {
126
+ type: 'object',
127
+ properties: {
128
+ defaultSource: {
129
+ type: 'string',
130
+ default: 'text_chat'
131
+ },
132
+ maxTextLength: {
133
+ type: 'number',
134
+ default: 4000
135
+ },
136
+ maxAudioBytes: {
137
+ type: 'number',
138
+ default: 10485760
139
+ }
140
+ }
141
+ },
142
+ environment: [],
143
+ services: [],
144
+ database: null,
145
+ healthCheck: null
146
+ },
147
+ {
148
+ name: '@siduri-x/hands',
149
+ organType: 'hands',
150
+ version: '1.0.0',
151
+ displayName: 'Hands (MCP Tool Execution)',
152
+ description: 'Model Context Protocol tool management and cryptographically authorized action execution',
153
+ entrypoint: './dist/index.js',
154
+ factory: 'DefaultHandsOrgan',
155
+ configKey: 'hands',
156
+ configSchema: {
157
+ type: 'object',
158
+ properties: {
159
+ defaultTimeoutMs: {
160
+ type: 'number',
161
+ default: 10000
162
+ },
163
+ providers: {
164
+ type: 'array',
165
+ items: {
166
+ type: 'object',
167
+ required: ['serverName'],
168
+ properties: {
169
+ serverName: {
170
+ type: 'string'
171
+ },
172
+ baseUrl: {
173
+ type: 'string'
174
+ },
175
+ command: {
176
+ type: 'string'
177
+ },
178
+ args: {
179
+ type: 'array',
180
+ items: {
181
+ type: 'string'
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ environment: [
190
+ {
191
+ name: 'ACTION_POLICY_SECRET',
192
+ required: false,
193
+ secret: true,
194
+ description: 'HMAC secret key for signing and verifying action execution capabilities (required in production)'
195
+ }
196
+ ],
197
+ services: [],
198
+ database: null,
199
+ healthCheck: 'probeHandsHealth'
200
+ },
201
+ {
202
+ name: '@siduri-x/knowledge',
203
+ organType: 'knowledge',
204
+ version: '1.0.0',
205
+ displayName: 'Knowledge (E-Compatible Cited Facts)',
206
+ description: 'Factual context retrieval from local or hosted E Knowledge packs',
207
+ entrypoint: './dist/index.js',
208
+ factory: 'EKnowledgeAdapter',
209
+ configKey: 'knowledge',
210
+ configSchema: {
211
+ type: 'object',
212
+ required: ['provider'],
213
+ properties: {
214
+ provider: {
215
+ type: 'string',
216
+ enum: ['e-knowledge', 'e-remote', 'e-hub', 'none']
217
+ },
218
+ packPath: {
219
+ type: 'string'
220
+ },
221
+ baseUrl: {
222
+ type: 'string'
223
+ },
224
+ registryUrl: {
225
+ type: 'string'
226
+ },
227
+ packId: {
228
+ type: 'string'
229
+ },
230
+ timeoutMs: {
231
+ type: 'number',
232
+ default: 5000
233
+ },
234
+ preferredMode: {
235
+ type: 'string',
236
+ enum: ['lexical', 'semantic', 'hybrid'],
237
+ default: 'lexical'
238
+ }
239
+ }
240
+ },
241
+ environment: [
242
+ {
243
+ name: 'SIDURI_KNOWLEDGE_PACK',
244
+ required: false,
245
+ secret: false,
246
+ description: 'Path to local E knowledge pack'
247
+ },
248
+ {
249
+ name: 'SIDURI_KNOWLEDGE_REGISTRY_URL',
250
+ required: false,
251
+ secret: false,
252
+ default: 'https://e.vxnus.xyz/api/v1/knowledge',
253
+ description: 'URL of the E Knowledge Hub registry'
254
+ }
255
+ ],
256
+ services: [
257
+ {
258
+ name: 'E Knowledge Hub',
259
+ kind: 'http_service',
260
+ optional: true
261
+ }
262
+ ],
263
+ database: null,
264
+ healthCheck: null
265
+ },
266
+ {
267
+ name: '@siduri-x/memory',
268
+ organType: 'memory',
269
+ version: '1.0.0',
270
+ displayName: 'Memory (PostgreSQL FTS Claims)',
271
+ description: 'Relational semantic claims with Full-Text Search and companion isolation',
272
+ entrypoint: './dist/index.js',
273
+ factory: 'PostgresMemoryOrgan',
274
+ configKey: 'memory',
275
+ configSchema: {
276
+ type: 'object',
277
+ required: ['provider'],
278
+ properties: {
279
+ provider: {
280
+ type: 'string',
281
+ enum: ['postgres']
282
+ },
283
+ deployment: {
284
+ type: 'string',
285
+ enum: ['local', 'neon', 'supabase', 'other']
286
+ },
287
+ connectionString: {
288
+ type: 'string'
289
+ },
290
+ maxConnections: {
291
+ type: 'number',
292
+ default: 10
293
+ }
294
+ }
295
+ },
296
+ environment: [
297
+ {
298
+ name: 'DATABASE_URL',
299
+ required: true,
300
+ secret: true,
301
+ default: 'postgresql://postgres:postgres@localhost:5432/siduri',
302
+ description: 'PostgreSQL connection string'
303
+ }
304
+ ],
305
+ services: [
306
+ {
307
+ name: 'PostgreSQL Database',
308
+ kind: 'database',
309
+ optional: false
310
+ }
311
+ ],
312
+ database: {
313
+ engine: 'postgres',
314
+ migrationsDir: './migrations'
315
+ },
316
+ healthCheck: 'probeMemoryHealth'
317
+ },
318
+ {
319
+ name: '@siduri-x/observation',
320
+ organType: 'observation',
321
+ version: '1.0.0',
322
+ displayName: 'Observation (Grounded Observation Ingestion)',
323
+ description: 'Cryptographically hashed video/image observation ingest and duplicate detection',
324
+ entrypoint: './dist/index.js',
325
+ factory: 'FixtureObservationOrgan',
326
+ configKey: 'observation',
327
+ configSchema: {
328
+ type: 'object',
329
+ properties: {}
330
+ },
331
+ environment: [],
332
+ services: [],
333
+ database: null,
334
+ healthCheck: null
335
+ },
336
+ {
337
+ name: '@siduri-x/vision',
338
+ organType: 'vision',
339
+ version: '1.0.0',
340
+ displayName: 'Vision (Visual Perception & OCR)',
341
+ description: 'Image inspection, cropping, and multi-pass OCR perception adapter',
342
+ entrypoint: './dist/index.js',
343
+ factory: 'OpenRouterVisionAdapter',
344
+ configKey: 'vision',
345
+ configSchema: {
346
+ type: 'object',
347
+ required: ['provider'],
348
+ properties: {
349
+ provider: {
350
+ type: 'string',
351
+ enum: ['openrouter', 'none']
352
+ },
353
+ model: {
354
+ type: 'string',
355
+ default: 'gpt-4-vision'
356
+ },
357
+ apiKey: {
358
+ type: 'string'
359
+ },
360
+ baseUrl: {
361
+ type: 'string'
362
+ }
363
+ }
364
+ },
365
+ environment: [
366
+ {
367
+ name: 'OPENROUTER_API_KEY',
368
+ required: false,
369
+ secret: true,
370
+ description: 'API key for vision model inference'
371
+ }
372
+ ],
373
+ services: [
374
+ {
375
+ name: 'Vision Inference API',
376
+ kind: 'http_service',
377
+ optional: false
378
+ }
379
+ ],
380
+ database: null,
381
+ healthCheck: null
382
+ },
383
+ {
384
+ name: '@siduri-x/voice',
385
+ organType: 'voice',
386
+ version: '1.0.0',
387
+ displayName: 'Voice (VOICEVOX Speech Synthesis)',
388
+ description: 'Queued speech synthesis and audio rendering lifecycle adapter',
389
+ entrypoint: './dist/index.js',
390
+ factory: 'VoicevoxAdapter',
391
+ configKey: 'voice',
392
+ configSchema: {
393
+ type: 'object',
394
+ required: ['provider'],
395
+ properties: {
396
+ provider: {
397
+ type: 'string',
398
+ enum: ['voicevox', 'none']
399
+ },
400
+ speakerId: {
401
+ type: 'number',
402
+ default: 1
403
+ },
404
+ baseUrl: {
405
+ type: 'string',
406
+ default: 'http://localhost:50021'
407
+ },
408
+ maxQueueDepth: {
409
+ type: 'number',
410
+ default: 50
411
+ }
412
+ }
413
+ },
414
+ environment: [
415
+ {
416
+ name: 'VOICEVOX_URL',
417
+ required: false,
418
+ secret: false,
419
+ default: 'http://localhost:50021',
420
+ description: 'Base URL of the running VOICEVOX engine'
421
+ }
422
+ ],
423
+ services: [
424
+ {
425
+ name: 'VOICEVOX Engine',
426
+ kind: 'http_service',
427
+ optional: false
428
+ }
429
+ ],
430
+ database: null,
431
+ healthCheck: null
432
+ }
433
+ ];
@@ -0,0 +1 @@
1
+ export {};