@vxnus/siduri 0.1.6 → 0.1.8

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.
Files changed (98) hide show
  1. package/package.json +1 -1
  2. package/dist/builtin-manifests.d.ts +0 -2
  3. package/dist/builtin-manifests.js +0 -464
  4. package/dist/clean-machine-e2e.test.d.ts +0 -1
  5. package/dist/clean-machine-e2e.test.js +0 -230
  6. package/dist/configurators/behavior.d.ts +0 -2
  7. package/dist/configurators/behavior.js +0 -36
  8. package/dist/configurators/body.d.ts +0 -2
  9. package/dist/configurators/body.js +0 -60
  10. package/dist/configurators/brain.d.ts +0 -6
  11. package/dist/configurators/brain.js +0 -80
  12. package/dist/configurators/ear.d.ts +0 -2
  13. package/dist/configurators/ear.js +0 -28
  14. package/dist/configurators/hands.d.ts +0 -2
  15. package/dist/configurators/hands.js +0 -27
  16. package/dist/configurators/index.d.ts +0 -23
  17. package/dist/configurators/index.js +0 -74
  18. package/dist/configurators/knowledge.d.ts +0 -6
  19. package/dist/configurators/knowledge.js +0 -100
  20. package/dist/configurators/memory.d.ts +0 -2
  21. package/dist/configurators/memory.js +0 -44
  22. package/dist/configurators/observation.d.ts +0 -2
  23. package/dist/configurators/observation.js +0 -12
  24. package/dist/configurators/types.d.ts +0 -12
  25. package/dist/configurators/types.js +0 -2
  26. package/dist/configurators/vision.d.ts +0 -2
  27. package/dist/configurators/vision.js +0 -39
  28. package/dist/configurators/voice.d.ts +0 -2
  29. package/dist/configurators/voice.js +0 -363
  30. package/dist/configurators.test.d.ts +0 -1
  31. package/dist/configurators.test.js +0 -299
  32. package/dist/db.d.ts +0 -25
  33. package/dist/db.js +0 -152
  34. package/dist/discovery.d.ts +0 -13
  35. package/dist/discovery.js +0 -87
  36. package/dist/discovery.test.d.ts +0 -1
  37. package/dist/discovery.test.js +0 -67
  38. package/dist/doctor-db.test.d.ts +0 -1
  39. package/dist/doctor-db.test.js +0 -141
  40. package/dist/doctor.d.ts +0 -19
  41. package/dist/doctor.js +0 -225
  42. package/dist/generator.d.ts +0 -21
  43. package/dist/generator.js +0 -542
  44. package/dist/generator.test.d.ts +0 -1
  45. package/dist/generator.test.js +0 -197
  46. package/dist/index.d.ts +0 -20
  47. package/dist/index.js +0 -401
  48. package/dist/manifest.d.ts +0 -33
  49. package/dist/manifest.js +0 -40
  50. package/dist/providers/knowledge-hub.d.ts +0 -37
  51. package/dist/providers/knowledge-hub.js +0 -141
  52. package/dist/providers/openrouter.d.ts +0 -32
  53. package/dist/providers/openrouter.js +0 -201
  54. package/dist/release-check.d.ts +0 -9
  55. package/dist/release-check.js +0 -131
  56. package/dist/runtime-parity.test.d.ts +0 -1
  57. package/dist/runtime-parity.test.js +0 -140
  58. package/dist/web-dist/404/index.html +0 -1
  59. package/dist/web-dist/404.html +0 -1
  60. package/dist/web-dist/__next.__PAGE__.txt +0 -34
  61. package/dist/web-dist/__next._full.txt +0 -31
  62. package/dist/web-dist/__next._tree.txt +0 -3
  63. package/dist/web-dist/_next/static/D38KTbM_PIeZqLpHvixAH/_buildManifest.js +0 -11
  64. package/dist/web-dist/_next/static/D38KTbM_PIeZqLpHvixAH/_clientMiddlewareManifest.js +0 -1
  65. package/dist/web-dist/_next/static/D38KTbM_PIeZqLpHvixAH/_ssgManifest.js +0 -1
  66. package/dist/web-dist/_next/static/chunks/0cz1d0mv5g_q7.js +0 -1
  67. package/dist/web-dist/_next/static/chunks/0uwih7sydv413.js +0 -1
  68. package/dist/web-dist/_next/static/chunks/10rmct1ax-opq.js +0 -1
  69. package/dist/web-dist/_next/static/chunks/1_yae15ffa5f6.js +0 -1
  70. package/dist/web-dist/_next/static/chunks/1eusi7dzngpy3.js +0 -30
  71. package/dist/web-dist/_next/static/chunks/2kcqevsmv6kh2.js +0 -31
  72. package/dist/web-dist/_next/static/chunks/2s3d1bfr0l4b0.js +0 -1
  73. package/dist/web-dist/_next/static/chunks/2vh8hinyh9xfg.css +0 -1
  74. package/dist/web-dist/_next/static/chunks/32z87id9k6i2z.js +0 -22
  75. package/dist/web-dist/_next/static/chunks/3bx2gs3idjmo1.js +0 -1
  76. package/dist/web-dist/_next/static/chunks/turbopack-3eipe4c-imn5l.js +0 -1
  77. package/dist/web-dist/_next/static/media/favicon.2vob68tjqpejf.ico +0 -0
  78. package/dist/web-dist/_not-found/__next._full.txt +0 -17
  79. package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +0 -23
  80. package/dist/web-dist/_not-found/__next._tree.txt +0 -3
  81. package/dist/web-dist/_not-found/index.html +0 -1
  82. package/dist/web-dist/_not-found/index.txt +0 -17
  83. package/dist/web-dist/chat/__next._full.txt +0 -18
  84. package/dist/web-dist/chat/__next._tree.txt +0 -3
  85. package/dist/web-dist/chat/__next.chat.__PAGE__.txt +0 -24
  86. package/dist/web-dist/chat/index.html +0 -1
  87. package/dist/web-dist/chat/index.txt +0 -18
  88. package/dist/web-dist/favicon.ico +0 -0
  89. package/dist/web-dist/index.html +0 -1
  90. package/dist/web-dist/index.txt +0 -31
  91. package/dist/web-dist/live2d/live2dcubismcore.min.js +0 -9
  92. package/dist/web-dist/operator/__next._full.txt +0 -18
  93. package/dist/web-dist/operator/__next._tree.txt +0 -3
  94. package/dist/web-dist/operator/__next.operator.__PAGE__.txt +0 -24
  95. package/dist/web-dist/operator/index.html +0 -1
  96. package/dist/web-dist/operator/index.txt +0 -18
  97. package/dist/web-template.d.ts +0 -2
  98. package/dist/web-template.js +0 -556
@@ -1,230 +0,0 @@
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
- const node_child_process_1 = require("node:child_process");
7
- const node_fs_1 = __importDefault(require("node:fs"));
8
- const node_path_1 = __importDefault(require("node:path"));
9
- const generator_1 = require("./generator");
10
- const discovery_1 = require("./discovery");
11
- describe('Phase 5: Clean-Machine Distribution & E2E Integration Suite', () => {
12
- const repoRoot = node_path_1.default.resolve(__dirname, '../..');
13
- const tempPackDir = node_path_1.default.resolve(__dirname, '../temp-packs-e2e');
14
- const cleanMachineRoot = node_path_1.default.resolve(__dirname, '../temp-clean-machine-e2e');
15
- const ALL_CANONICAL_PACKAGES = [
16
- { filter: '@siduri-x/core', tarName: 'siduri-x-core-1.0.3.tgz', isOrgan: false },
17
- { filter: '@siduri-x/brain', tarName: 'siduri-x-brain-1.0.3.tgz', isOrgan: true },
18
- { filter: '@siduri-x/memory', tarName: 'siduri-x-memory-1.0.3.tgz', isOrgan: true },
19
- { filter: '@siduri-x/knowledge', tarName: 'siduri-x-knowledge-1.0.2.tgz', isOrgan: true },
20
- { filter: '@siduri-x/behavior', tarName: 'siduri-x-behavior-1.0.3.tgz', isOrgan: true },
21
- { filter: '@siduri-x/ear', tarName: 'siduri-x-ear-1.0.2.tgz', isOrgan: true },
22
- { filter: '@siduri-x/vision', tarName: 'siduri-x-vision-1.0.2.tgz', isOrgan: true },
23
- { filter: '@siduri-x/hands', tarName: 'siduri-x-hands-1.0.2.tgz', isOrgan: true },
24
- { filter: '@siduri-x/body', tarName: 'siduri-x-body-1.0.4.tgz', isOrgan: true },
25
- { filter: '@siduri-x/voice', tarName: 'siduri-x-voice-1.0.4.tgz', isOrgan: true },
26
- { filter: '@siduri-x/observation', tarName: 'siduri-x-observation-1.0.2.tgz', isOrgan: true },
27
- { filter: '@vxnus/siduri', tarName: 'vxnus-siduri-0.1.6.tgz', isOrgan: false },
28
- ];
29
- beforeAll(() => {
30
- // 1. Prepare clean directories
31
- if (node_fs_1.default.existsSync(tempPackDir))
32
- node_fs_1.default.rmSync(tempPackDir, { recursive: true, force: true });
33
- if (node_fs_1.default.existsSync(cleanMachineRoot))
34
- node_fs_1.default.rmSync(cleanMachineRoot, { recursive: true, force: true });
35
- node_fs_1.default.mkdirSync(tempPackDir, { recursive: true });
36
- node_fs_1.default.mkdirSync(cleanMachineRoot, { recursive: true });
37
- // 2. Build all packages in repo
38
- (0, node_child_process_1.execSync)('pnpm build', { cwd: repoRoot, stdio: 'pipe' });
39
- // 3. Pack each canonical package into tempPackDir
40
- for (const pkg of ALL_CANONICAL_PACKAGES) {
41
- (0, node_child_process_1.execSync)(`pnpm --filter ${pkg.filter} pack --pack-destination ${tempPackDir}`, {
42
- cwd: repoRoot,
43
- stdio: 'pipe',
44
- });
45
- }
46
- }, 90000);
47
- afterAll(() => {
48
- if (node_fs_1.default.existsSync(tempPackDir))
49
- node_fs_1.default.rmSync(tempPackDir, { recursive: true, force: true });
50
- if (node_fs_1.default.existsSync(cleanMachineRoot))
51
- node_fs_1.default.rmSync(cleanMachineRoot, { recursive: true, force: true });
52
- });
53
- describe('Phase 5A: Package Artifact Verification', () => {
54
- test('all 12 packages produce valid tarballs', () => {
55
- for (const pkg of ALL_CANONICAL_PACKAGES) {
56
- const tarPath = node_path_1.default.join(tempPackDir, pkg.tarName);
57
- expect(node_fs_1.default.existsSync(tarPath)).toBe(true);
58
- }
59
- });
60
- test('packed package.json files have zero workspace:* or link: dependencies', () => {
61
- for (const pkg of ALL_CANONICAL_PACKAGES) {
62
- const tarPath = node_path_1.default.join(tempPackDir, pkg.tarName);
63
- const pkgJsonRaw = (0, node_child_process_1.execSync)(`tar -xzf ${tarPath} -O package/package.json`, { encoding: 'utf8' });
64
- const pkgJson = JSON.parse(pkgJsonRaw);
65
- const allDeps = {
66
- ...(pkgJson.dependencies || {}),
67
- ...(pkgJson.peerDependencies || {}),
68
- };
69
- for (const [depName, version] of Object.entries(allDeps)) {
70
- if (typeof version === 'string') {
71
- expect(version.startsWith('workspace:')).toBe(false);
72
- expect(version.startsWith('link:')).toBe(false);
73
- expect(version.includes('../')).toBe(false);
74
- }
75
- }
76
- }
77
- });
78
- test('every organ package tarball contains organ-manifest.json and dist files', () => {
79
- const organPackages = ALL_CANONICAL_PACKAGES.filter((p) => p.isOrgan);
80
- for (const pkg of organPackages) {
81
- const tarPath = node_path_1.default.join(tempPackDir, pkg.tarName);
82
- const listing = (0, node_child_process_1.execSync)(`tar -tzf ${tarPath}`, { encoding: 'utf8' }).split('\n');
83
- expect(listing.some((line) => line.includes('package/organ-manifest.json'))).toBe(true);
84
- expect(listing.some((line) => line.includes('package/dist/index.js'))).toBe(true);
85
- expect(listing.some((line) => line.includes('package/dist/index.d.ts'))).toBe(true);
86
- }
87
- });
88
- test('memory organ tarball packages migrations/001_initial_schema.sql', () => {
89
- const memoryTarPath = node_path_1.default.join(tempPackDir, 'siduri-x-memory-1.0.3.tgz');
90
- const listing = (0, node_child_process_1.execSync)(`tar -tzf ${memoryTarPath}`, { encoding: 'utf8' });
91
- expect(listing).toContain('package/migrations/001_initial_schema.sql');
92
- });
93
- });
94
- describe('Phase 5B & 5C & 5G: Clean-Machine Installation & Isolation Acceptance', () => {
95
- const registry = discovery_1.OrganRegistry.discover([node_path_1.default.resolve(repoRoot, 'packages/organs')]);
96
- const brain = registry.get('brain');
97
- const hands = registry.get('hands');
98
- const memory = registry.get('memory');
99
- test('Clean Composition 1: Brain only instance installs, starts, runs doctor and db push', () => {
100
- const instanceDir = node_path_1.default.join(cleanMachineRoot, 'inst-brain-only');
101
- node_fs_1.default.mkdirSync(node_path_1.default.join(instanceDir, 'src'), { recursive: true });
102
- const files = (0, generator_1.generateInstanceFiles)({
103
- name: 'CleanBrainOnly',
104
- selectedManifests: [brain],
105
- });
106
- // Write instance files referencing packed tarballs directly for true clean machine install
107
- const pkgObj = JSON.parse(files['package.json']);
108
- pkgObj.dependencies = {
109
- '@siduri-x/core': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-core-1.0.3.tgz')}`,
110
- '@siduri-x/brain': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-brain-1.0.3.tgz')}`,
111
- };
112
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'package.json'), JSON.stringify(pkgObj, null, 2) + '\n');
113
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.config.json'), files['siduri.config.json']);
114
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.schema.json'), files['siduri.schema.json']);
115
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, '.env.example'), files['.env.example']);
116
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'README.md'), files['README.md']);
117
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'src/index.js'), files['src/index.js']);
118
- // 1. Run npm install in isolated directory
119
- (0, node_child_process_1.execSync)('npm install --no-audit --no-fund', { cwd: instanceDir, stdio: 'pipe' });
120
- // 2. Assert unselected organs are NOT in node_modules
121
- expect(node_fs_1.default.existsSync(node_path_1.default.join(instanceDir, 'node_modules/@siduri-x/memory'))).toBe(false);
122
- expect(node_fs_1.default.existsSync(node_path_1.default.join(instanceDir, 'node_modules/@siduri-x/hands'))).toBe(false);
123
- expect(node_fs_1.default.existsSync(node_path_1.default.join(instanceDir, 'node_modules/@siduri-x/voice'))).toBe(false);
124
- expect(node_fs_1.default.existsSync(node_path_1.default.join(instanceDir, 'siduri-x-runtime.js'))).toBe(false);
125
- // 3. Run node src/index.js (starts cleanly without PostgreSQL or unselected organs)
126
- const startOutput = (0, node_child_process_1.execSync)('node src/index.js', {
127
- cwd: instanceDir,
128
- env: { ...process.env, PORT: '0' },
129
- encoding: 'utf8',
130
- });
131
- expect(startOutput).toContain('✓ Siduri [CleanBrainOnly] initialized with [Brain].');
132
- // 4. Verify doctor from standalone directory
133
- const doctorPass = (0, node_child_process_1.execSync)(`node ${node_path_1.default.resolve(repoRoot, 'cli/dist/index.js')} doctor`, {
134
- cwd: instanceDir,
135
- env: { ...process.env, OPENROUTER_API_KEY: 'test-key-clean' },
136
- encoding: 'utf8',
137
- });
138
- expect(doctorPass).toContain('Result: PASS');
139
- expect(doctorPass).toContain('Database');
140
- expect(doctorPass).toContain('Not required by current composition');
141
- // 5. Verify db push from standalone directory
142
- const dbPushOutput = (0, node_child_process_1.execSync)(`node ${node_path_1.default.resolve(repoRoot, 'cli/dist/index.js')} db push`, {
143
- cwd: instanceDir,
144
- encoding: 'utf8',
145
- });
146
- expect(dbPushOutput).toContain('No database migrations are required by this instance.');
147
- }, 60000);
148
- test('Clean Composition 2: Brain + Hands installs and runs doctor verifying ACTION_POLICY_SECRET', () => {
149
- const instanceDir = node_path_1.default.join(cleanMachineRoot, 'inst-brain-hands');
150
- node_fs_1.default.mkdirSync(node_path_1.default.join(instanceDir, 'src'), { recursive: true });
151
- const files = (0, generator_1.generateInstanceFiles)({
152
- name: 'CleanBrainHands',
153
- selectedManifests: [brain, hands],
154
- });
155
- const pkgObj = JSON.parse(files['package.json']);
156
- pkgObj.dependencies = {
157
- '@siduri-x/core': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-core-1.0.3.tgz')}`,
158
- '@siduri-x/brain': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-brain-1.0.3.tgz')}`,
159
- '@siduri-x/hands': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-hands-1.0.2.tgz')}`,
160
- };
161
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'package.json'), JSON.stringify(pkgObj, null, 2) + '\n');
162
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.config.json'), files['siduri.config.json']);
163
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.schema.json'), files['siduri.schema.json']);
164
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, '.env.example'), files['.env.example']);
165
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'README.md'), files['README.md']);
166
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'src/index.js'), files['src/index.js']);
167
- (0, node_child_process_1.execSync)('npm install --no-audit --no-fund', { cwd: instanceDir, stdio: 'pipe' });
168
- expect(node_fs_1.default.existsSync(node_path_1.default.join(instanceDir, 'node_modules/@siduri-x/memory'))).toBe(false);
169
- const startOutput = (0, node_child_process_1.execSync)('node src/index.js', {
170
- cwd: instanceDir,
171
- env: { ...process.env, PORT: '0' },
172
- encoding: 'utf8',
173
- });
174
- expect(startOutput).toContain('✓ Siduri [CleanBrainHands] initialized with [Brain, Hands].');
175
- const doctorOutput = (0, node_child_process_1.execSync)(`node ${node_path_1.default.resolve(repoRoot, 'cli/dist/index.js')} doctor`, {
176
- cwd: instanceDir,
177
- env: {
178
- ...process.env,
179
- OPENROUTER_API_KEY: 'test-key-clean',
180
- ACTION_POLICY_SECRET: 'test-secret-clean',
181
- },
182
- encoding: 'utf8',
183
- });
184
- expect(doctorOutput).toContain('ACTION_POLICY_SECRET');
185
- expect(doctorOutput).toContain('Result: PASS');
186
- }, 60000);
187
- test('Clean Composition 3: Brain + Memory discovers packaged migrations and detects DATABASE_URL', () => {
188
- const instanceDir = node_path_1.default.join(cleanMachineRoot, 'inst-brain-memory');
189
- node_fs_1.default.mkdirSync(node_path_1.default.join(instanceDir, 'src'), { recursive: true });
190
- const files = (0, generator_1.generateInstanceFiles)({
191
- name: 'CleanBrainMemory',
192
- selectedManifests: [brain, memory],
193
- });
194
- const pkgObj = JSON.parse(files['package.json']);
195
- pkgObj.dependencies = {
196
- '@siduri-x/core': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-core-1.0.3.tgz')}`,
197
- '@siduri-x/brain': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-brain-1.0.3.tgz')}`,
198
- '@siduri-x/memory': `file:${node_path_1.default.join(tempPackDir, 'siduri-x-memory-1.0.3.tgz')}`,
199
- };
200
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'package.json'), JSON.stringify(pkgObj, null, 2) + '\n');
201
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.config.json'), files['siduri.config.json']);
202
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'siduri.schema.json'), files['siduri.schema.json']);
203
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, '.env.example'), files['.env.example']);
204
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'README.md'), files['README.md']);
205
- node_fs_1.default.writeFileSync(node_path_1.default.join(instanceDir, 'src/index.js'), files['src/index.js']);
206
- (0, node_child_process_1.execSync)('npm install --no-audit --no-fund', { cwd: instanceDir, stdio: 'pipe' });
207
- // Verify migrations exist inside node_modules/@siduri-x/memory/migrations
208
- const installedMigrationsPath = node_path_1.default.join(instanceDir, 'node_modules/@siduri-x/memory/migrations/001_initial_schema.sql');
209
- expect(node_fs_1.default.existsSync(installedMigrationsPath)).toBe(true);
210
- // Doctor detects database requirement
211
- let doctorOutput = '';
212
- try {
213
- doctorOutput = (0, node_child_process_1.execSync)(`node ${node_path_1.default.resolve(repoRoot, 'cli/dist/index.js')} doctor`, {
214
- cwd: instanceDir,
215
- env: {
216
- ...process.env,
217
- OPENROUTER_API_KEY: 'test-key-clean',
218
- DATABASE_URL: '', // deliberately empty to test requirement detection
219
- },
220
- encoding: 'utf8',
221
- });
222
- }
223
- catch (err) {
224
- doctorOutput = (err.stdout || '') + (err.stderr || '');
225
- }
226
- expect(doctorOutput).toContain('DATABASE_URL is not configured');
227
- expect(doctorOutput).toContain('Result: FAIL');
228
- }, 60000);
229
- });
230
- });
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureBehavior(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,36 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureBody(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,60 +0,0 @@
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 companionSlug = _context.companionName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
25
- const { modelSource, initialExpression } = await inquirer_1.default.prompt([
26
- {
27
- type: 'input',
28
- name: 'modelSource',
29
- message: 'Live2D Model path / URL (.model3.json):',
30
- default: `./assets/body/${companionSlug}/model.model3.json`,
31
- },
32
- {
33
- type: 'list',
34
- name: 'initialExpression',
35
- message: 'Initial avatar expression:',
36
- choices: [
37
- { name: 'Neutral', value: 'neutral' },
38
- { name: 'Happy / Cheerful', value: 'happy' },
39
- { name: 'Calm', value: 'calm' },
40
- ],
41
- default: 'neutral',
42
- },
43
- ]);
44
- const modelPath = modelSource.trim() || `./assets/body/${companionSlug}/model.model3.json`;
45
- const isHttpOrAbsolute = modelPath.startsWith('http://') || modelPath.startsWith('https://') || modelPath.startsWith('/');
46
- const webModelUrl = isHttpOrAbsolute ? modelPath : `/assets/body/${companionSlug}/model.model3.json`;
47
- return {
48
- config: {
49
- provider: 'live2d',
50
- modelPath,
51
- modelUrl: webModelUrl,
52
- initialExpression,
53
- },
54
- summary: {
55
- Provider: 'Live2D',
56
- 'Model Path': modelPath,
57
- Expression: initialExpression,
58
- },
59
- };
60
- }
@@ -1,6 +0,0 @@
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>;
@@ -1,80 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureEar(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,28 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureHands(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,27 +0,0 @@
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
- }
@@ -1,23 +0,0 @@
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>;
@@ -1,74 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
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>;