@vxnus/siduri 2.0.36 → 2.0.37
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/configurators/behavior.js +1 -3
- package/dist/configurators/body.js +7 -4
- package/dist/configurators/voice.js +5 -6
- package/dist/configurators.test.js +13 -1
- package/dist/generator.js +9 -10
- package/dist/generator.test.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.configureBehavior = configureBehavior;
|
|
7
7
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
8
|
async function configureBehavior(_context) {
|
|
9
|
-
const companionName = _context.companionName || 'Companion';
|
|
10
|
-
const companionSlug = companionName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
|
|
11
9
|
const { personaMode } = await inquirer_1.default.prompt({
|
|
12
10
|
type: 'list',
|
|
13
11
|
name: 'personaMode',
|
|
@@ -59,7 +57,7 @@ async function configureBehavior(_context) {
|
|
|
59
57
|
const archetype = personaAnswers.archetype.trim() || 'Knowledge Assistant & Research Partner';
|
|
60
58
|
const ethos = personaAnswers.ethos.trim() || 'Direct technical candor, thoughtful, concise, and loyal';
|
|
61
59
|
const directive = personaAnswers.directive.trim() || 'Speak concisely and stay in character without sycophantic filler';
|
|
62
|
-
const selfPath =
|
|
60
|
+
const selfPath = './assets/self/default.self';
|
|
63
61
|
return {
|
|
64
62
|
config: {
|
|
65
63
|
provider: 'active_self',
|
|
@@ -21,18 +21,21 @@ async function configureBody(_context) {
|
|
|
21
21
|
summary: { Provider: 'None (Headless)' },
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const companionSlug = _context.companionName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
|
|
25
24
|
const { modelSource } = await inquirer_1.default.prompt([
|
|
26
25
|
{
|
|
27
26
|
type: 'input',
|
|
28
27
|
name: 'modelSource',
|
|
29
28
|
message: 'Live2D Model path / URL (.model3.json):',
|
|
30
|
-
default:
|
|
29
|
+
default: './assets/body/default/model.model3.json',
|
|
31
30
|
},
|
|
32
31
|
]);
|
|
33
|
-
const modelPath = modelSource.trim() ||
|
|
32
|
+
const modelPath = modelSource.trim() || './assets/body/default/model.model3.json';
|
|
34
33
|
const isHttpOrAbsolute = modelPath.startsWith('http://') || modelPath.startsWith('https://') || modelPath.startsWith('/');
|
|
35
|
-
const webModelUrl = isHttpOrAbsolute
|
|
34
|
+
const webModelUrl = isHttpOrAbsolute
|
|
35
|
+
? modelPath
|
|
36
|
+
: modelPath.startsWith('./')
|
|
37
|
+
? modelPath.slice(1)
|
|
38
|
+
: `/${modelPath}`;
|
|
36
39
|
return {
|
|
37
40
|
config: {
|
|
38
41
|
provider: 'live2d',
|
|
@@ -7,7 +7,6 @@ exports.configureVoice = configureVoice;
|
|
|
7
7
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
8
|
const colors_1 = require("../colors");
|
|
9
9
|
async function configureVoice(_context) {
|
|
10
|
-
const companionSlug = _context.companionName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
|
|
11
10
|
const { provider } = await inquirer_1.default.prompt({
|
|
12
11
|
type: 'list',
|
|
13
12
|
name: 'provider',
|
|
@@ -35,21 +34,21 @@ async function configureVoice(_context) {
|
|
|
35
34
|
}
|
|
36
35
|
if (provider === 'rvc') {
|
|
37
36
|
console.log(`\n ${colors_1.colors.cyan}ℹ RVC Voice Model Setup:${colors_1.colors.reset}`);
|
|
38
|
-
console.log(` • ${colors_1.colors.dim}Voice Weights:${colors_1.colors.reset} Place your trained weights (.pth) in: ${colors_1.colors.green}./assets/voice
|
|
39
|
-
console.log(` • ${colors_1.colors.dim}Feature Index:${colors_1.colors.reset} Place optional .index in: ${colors_1.colors.green}./assets/voice
|
|
37
|
+
console.log(` • ${colors_1.colors.dim}Voice Weights:${colors_1.colors.reset} Place your trained weights (.pth) in: ${colors_1.colors.green}./assets/voice/default/default.pth${colors_1.colors.reset}`);
|
|
38
|
+
console.log(` • ${colors_1.colors.dim}Feature Index:${colors_1.colors.reset} Place optional .index in: ${colors_1.colors.green}./assets/voice/default/default.index${colors_1.colors.reset}`);
|
|
40
39
|
console.log(` • ${colors_1.colors.dim}RVC Service:${colors_1.colors.reset} Ensure your headless RVC microservice is running before voice inference.\n`);
|
|
41
40
|
const rvcAnswers = await inquirer_1.default.prompt([
|
|
42
41
|
{
|
|
43
42
|
type: 'input',
|
|
44
43
|
name: 'modelPath',
|
|
45
44
|
message: 'RVC Model Path (.pth weights):',
|
|
46
|
-
default:
|
|
45
|
+
default: './assets/voice/default/default.pth',
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
48
|
type: 'input',
|
|
50
49
|
name: 'indexPath',
|
|
51
50
|
message: 'RVC Feature Index Path (.index, optional):',
|
|
52
|
-
default:
|
|
51
|
+
default: './assets/voice/default/default.index',
|
|
53
52
|
},
|
|
54
53
|
{
|
|
55
54
|
type: 'input',
|
|
@@ -90,7 +89,7 @@ async function configureVoice(_context) {
|
|
|
90
89
|
rvc: {
|
|
91
90
|
enabled: true,
|
|
92
91
|
serviceUrl: rvcAnswers.serviceUrl.trim(),
|
|
93
|
-
modelName:
|
|
92
|
+
modelName: 'default',
|
|
94
93
|
modelPath: rvcAnswers.modelPath.trim(),
|
|
95
94
|
indexPath: rvcAnswers.indexPath.trim() || undefined,
|
|
96
95
|
pitchShift,
|
|
@@ -304,6 +304,18 @@ describe('Guided Manifest-Driven Configuration UX Specification Tests', () => {
|
|
|
304
304
|
expect(result.config.initialExpression).toBe('neutral');
|
|
305
305
|
expect(result.summary?.['Model Path']).toBe('./assets/body/sparkle/model.model3.json');
|
|
306
306
|
});
|
|
307
|
+
test('Body configurator defaults model path to assets/body/default', async () => {
|
|
308
|
+
inquirer_1.default.prompt
|
|
309
|
+
.mockResolvedValueOnce({ provider: 'live2d' })
|
|
310
|
+
.mockResolvedValueOnce({
|
|
311
|
+
modelSource: '',
|
|
312
|
+
});
|
|
313
|
+
const result = await (0, body_1.configureBody)({ companionName: 'MyCompanion', manifest: bodyManifest });
|
|
314
|
+
expect(result.config.provider).toBe('live2d');
|
|
315
|
+
expect(result.config.modelPath).toBe('./assets/body/default/model.model3.json');
|
|
316
|
+
expect(result.config.modelUrl).toBe('/assets/body/default/model.model3.json');
|
|
317
|
+
expect(result.summary?.['Model Path']).toBe('./assets/body/default/model.model3.json');
|
|
318
|
+
});
|
|
307
319
|
test('Hands configurator configures MCP tool execution timeout', async () => {
|
|
308
320
|
inquirer_1.default.prompt
|
|
309
321
|
.mockResolvedValueOnce({ provider: 'mcp' })
|
|
@@ -337,7 +349,7 @@ describe('Guided Manifest-Driven Configuration UX Specification Tests', () => {
|
|
|
337
349
|
expect(result.config.provider).toBe('active_self');
|
|
338
350
|
expect(result.config.mode).toBe('custom');
|
|
339
351
|
expect(result.config.archetype).toBe('System Sentinel');
|
|
340
|
-
expect(result.config.selfPath).toBe('./assets/self/
|
|
352
|
+
expect(result.config.selfPath).toBe('./assets/self/default.self');
|
|
341
353
|
});
|
|
342
354
|
test('Vision configurator configures OpenRouter vision model', async () => {
|
|
343
355
|
inquirer_1.default.prompt.mockResolvedValueOnce({ model: 'gpt-4-vision' });
|
package/dist/generator.js
CHANGED
|
@@ -73,10 +73,9 @@ function getDefaultConfigForManifest(manifest) {
|
|
|
73
73
|
}
|
|
74
74
|
function generateInstanceFiles(options) {
|
|
75
75
|
const instanceName = options.name || 'my-siduri';
|
|
76
|
-
const companionSlug = instanceName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
|
|
77
76
|
const instanceId = options.id || 'default';
|
|
78
77
|
const coreVersion = options.coreVersion || '^2.0.15';
|
|
79
|
-
const cliVersion = options.cliVersion || '^2.0.
|
|
78
|
+
const cliVersion = options.cliVersion || '^2.0.37';
|
|
80
79
|
const canonicalOrder = ['brain', 'memory', 'knowledge', 'behavior', 'voice', 'body', 'mouth', 'hands', 'vision', 'ear', 'observation'];
|
|
81
80
|
const manifests = [...options.selectedManifests].sort((a, b) => {
|
|
82
81
|
const idxA = canonicalOrder.indexOf(a.organType);
|
|
@@ -204,7 +203,7 @@ function generateInstanceFiles(options) {
|
|
|
204
203
|
if (m.name === '@siduri-x/self') {
|
|
205
204
|
instantiationLines.push(`const self = new SqliteSelfRepository({ dbPath: path.resolve(rootDir, 'siduri.sqlite') });`);
|
|
206
205
|
instantiationLines.push(`const behavior = new ActiveSelfCompiler(config.organs.behavior);`);
|
|
207
|
-
instantiationLines.push(`const selfFile = path.resolve(rootDir, config.organs.behavior?.selfPath || 'assets/self
|
|
206
|
+
instantiationLines.push(`const selfFile = path.resolve(rootDir, config.organs.behavior?.selfPath || 'assets/self/default.self');`);
|
|
208
207
|
instantiationLines.push(`try {`);
|
|
209
208
|
instantiationLines.push(` const selfRaw = await readFile(selfFile, 'utf8').catch(() => null);`);
|
|
210
209
|
instantiationLines.push(` if (selfRaw) {`);
|
|
@@ -849,12 +848,12 @@ function generateInstanceFiles(options) {
|
|
|
849
848
|
readmeLines.push('', '### 3. Diagnostics & Health Probe', 'Verify all environment variables, schema conformance, services, and organ connections:', '```bash', 'npm run doctor', '```', '', '### 4. Start Companion & Web Console', 'Launch your companion runtime and Web UI / Memory Control Panel:', '```bash', 'npm start', '```', 'Then open `http://localhost:3000` in your browser.');
|
|
850
849
|
const createAssetsDirs = [];
|
|
851
850
|
if (hasBody) {
|
|
852
|
-
createAssetsDirs.push(
|
|
853
|
-
readmeLines.push('', '### Body & Avatar Models',
|
|
851
|
+
createAssetsDirs.push('assets/body/default');
|
|
852
|
+
readmeLines.push('', '### Body & Avatar Models', 'Place your Live2D Cubism model assets into `./assets/body/default/`:', '- `model.model3.json`', '- `model.moc3`', '- textures directory');
|
|
854
853
|
}
|
|
855
854
|
if (hasVoice) {
|
|
856
|
-
createAssetsDirs.push(
|
|
857
|
-
readmeLines.push('', '### Voice & RVC Models',
|
|
855
|
+
createAssetsDirs.push('assets/voice/default');
|
|
856
|
+
readmeLines.push('', '### Voice & RVC Models', 'Place your character RVC voice models into `./assets/voice/default/`:', '- `default.pth` (Target voice weights)', '- `default.index` (Feature index file)');
|
|
858
857
|
}
|
|
859
858
|
const knowledgeConfig = options.organConfigs?.knowledge || options.organConfigs?.['@siduri-x/knowledge'];
|
|
860
859
|
if (manifests.some((m) => m.organType === 'knowledge') && knowledgeConfig?.packPath) {
|
|
@@ -867,12 +866,12 @@ function generateInstanceFiles(options) {
|
|
|
867
866
|
if (manifests.some((m) => m.organType === 'behavior')) {
|
|
868
867
|
createAssetsDirs.push('assets/self');
|
|
869
868
|
if (behaviorConfig?.mode === 'custom' || behaviorConfig?.archetype) {
|
|
870
|
-
const selfRelPath =
|
|
869
|
+
const selfRelPath = 'assets/self/default.self';
|
|
871
870
|
const selfContent = [
|
|
872
871
|
`specVersion: "2.0.0"`,
|
|
873
872
|
`kind: "self"`,
|
|
874
|
-
`id: "
|
|
875
|
-
`name: "
|
|
873
|
+
`id: "default-self"`,
|
|
874
|
+
`name: "Default Persona"`,
|
|
876
875
|
`version: "1.0.0"`,
|
|
877
876
|
`author:`,
|
|
878
877
|
` name: "Operator"`,
|
package/dist/generator.test.js
CHANGED
|
@@ -154,11 +154,11 @@ describe('Instance Generator Composition Invariants (Phase 3)', () => {
|
|
|
154
154
|
expect(pkg.dependencies['@siduri-x/voice']).toBeDefined();
|
|
155
155
|
// Body & voice asset directories requested
|
|
156
156
|
expect(files.createAssetsBodyDir).toBe(true);
|
|
157
|
-
expect(files.createAssetsDirs).toContain('assets/body/
|
|
158
|
-
expect(files.createAssetsDirs).toContain('assets/voice/
|
|
157
|
+
expect(files.createAssetsDirs).toContain('assets/body/default');
|
|
158
|
+
expect(files.createAssetsDirs).toContain('assets/voice/default');
|
|
159
159
|
// README mentions Live2D model assets & prerequisites
|
|
160
|
-
expect(files['README.md']).toContain('assets/body/
|
|
161
|
-
expect(files['README.md']).toContain('assets/voice/
|
|
160
|
+
expect(files['README.md']).toContain('assets/body/default');
|
|
161
|
+
expect(files['README.md']).toContain('assets/voice/default');
|
|
162
162
|
expect(files['README.md']).toContain('Prerequisites');
|
|
163
163
|
// No docker compose generated (Docker completely removed, host-native runtime)
|
|
164
164
|
expect(files['docker-compose.yml']).toBeUndefined();
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ const doctor_1 = require("./doctor");
|
|
|
61
61
|
const db_1 = require("./db");
|
|
62
62
|
const configurators_1 = require("./configurators");
|
|
63
63
|
const execFile = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
64
|
-
exports.CLI_VERSION = '2.0.
|
|
64
|
+
exports.CLI_VERSION = '2.0.37';
|
|
65
65
|
const colors_1 = require("./colors");
|
|
66
66
|
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return colors_1.colors; } });
|
|
67
67
|
function printHeader() {
|