siduri 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +6 -0
- package/README.md +84 -0
- package/dist/builtin-manifests.d.ts +2 -0
- package/dist/builtin-manifests.js +524 -0
- package/dist/clean-machine-e2e.test.d.ts +1 -0
- package/dist/clean-machine-e2e.test.js +160 -0
- package/dist/clean-machine-smoke.test.d.ts +1 -0
- package/dist/clean-machine-smoke.test.js +165 -0
- package/dist/colors.d.ts +8 -0
- package/dist/colors.js +11 -0
- package/dist/configurators/behavior.d.ts +2 -0
- package/dist/configurators/behavior.js +77 -0
- package/dist/configurators/body.d.ts +2 -0
- package/dist/configurators/body.js +107 -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 +43 -0
- package/dist/configurators/hands.d.ts +2 -0
- package/dist/configurators/hands.js +43 -0
- package/dist/configurators/index.d.ts +24 -0
- package/dist/configurators/index.js +78 -0
- package/dist/configurators/knowledge.d.ts +6 -0
- package/dist/configurators/knowledge.js +146 -0
- package/dist/configurators/memory.d.ts +2 -0
- package/dist/configurators/memory.js +26 -0
- package/dist/configurators/mouth.d.ts +2 -0
- package/dist/configurators/mouth.js +35 -0
- package/dist/configurators/observation.d.ts +2 -0
- package/dist/configurators/observation.js +38 -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 +47 -0
- package/dist/configurators/voice.d.ts +2 -0
- package/dist/configurators/voice.js +373 -0
- package/dist/configurators.test.d.ts +1 -0
- package/dist/configurators.test.js +464 -0
- package/dist/db.d.ts +13 -0
- package/dist/db.js +15 -0
- package/dist/discovery.d.ts +13 -0
- package/dist/discovery.js +85 -0
- package/dist/discovery.test.d.ts +1 -0
- package/dist/discovery.test.js +69 -0
- package/dist/doctor-db.test.d.ts +1 -0
- package/dist/doctor-db.test.js +52 -0
- package/dist/doctor.d.ts +19 -0
- package/dist/doctor.js +266 -0
- package/dist/generator.d.ts +23 -0
- package/dist/generator.js +1094 -0
- package/dist/generator.test.d.ts +1 -0
- package/dist/generator.test.js +252 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +607 -0
- package/dist/manifest.d.ts +33 -0
- package/dist/manifest.js +40 -0
- package/dist/project-dir.test.d.ts +1 -0
- package/dist/project-dir.test.js +37 -0
- package/dist/providers/knowledge-hub.d.ts +44 -0
- package/dist/providers/knowledge-hub.js +162 -0
- package/dist/providers/openrouter.d.ts +32 -0
- package/dist/providers/openrouter.js +201 -0
- package/dist/release-check.d.ts +9 -0
- package/dist/release-check.js +128 -0
- package/dist/runtime-parity.test.d.ts +1 -0
- package/dist/runtime-parity.test.js +141 -0
- package/dist/schema-validator.d.ts +9 -0
- package/dist/schema-validator.js +107 -0
- 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 +32 -0
- package/dist/web-dist/__next._tree.txt +4 -0
- package/dist/web-dist/_next/static/4aL_iP3FHsLSyHzCnRQYD/_buildManifest.js +1 -0
- package/dist/web-dist/_next/static/4aL_iP3FHsLSyHzCnRQYD/_ssgManifest.js +1 -0
- package/dist/web-dist/_next/static/chunks/136-1d10af93b770a1c8.js +52 -0
- package/dist/web-dist/_next/static/chunks/1629039a.f535b3ff45566416.js +1 -0
- package/dist/web-dist/_next/static/chunks/202.59b8eb8a8c45f711.js +1 -0
- package/dist/web-dist/_next/static/chunks/2be4ccb0.ab2975eb50b4e166.js +1 -0
- package/dist/web-dist/_next/static/chunks/411.d68b2e48424f1e47.js +1 -0
- package/dist/web-dist/_next/static/chunks/426-9f7f6e7fffd4c3c3.js +1 -0
- package/dist/web-dist/_next/static/chunks/563b947f-8e2871a2ab7cd91e.js +1 -0
- package/dist/web-dist/_next/static/chunks/92e71660.11f182d50bce2be0.js +342 -0
- package/dist/web-dist/_next/static/chunks/app/_global-error/page-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/_not-found/page-74658f4988eabcc7.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/chat/page-ab56048b707a3ddd.js +34 -0
- package/dist/web-dist/_next/static/chunks/app/layout-14f1a3f31e58be17.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/operator/page-6b2d0ba884183ad7.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/page-fc4bf56cf33ae27b.js +1 -0
- package/dist/web-dist/_next/static/chunks/framework-7afb7035d9872ea0.js +1 -0
- package/dist/web-dist/_next/static/chunks/main-8553b996986f1210.js +5 -0
- package/dist/web-dist/_next/static/chunks/main-app-9e6a144626e5a5b9.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/app-error-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/forbidden-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/global-error-68ea4ac05dcaf701.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/not-found-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/unauthorized-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/web-dist/_next/static/chunks/webpack-9073f434bc17ce16.js +1 -0
- package/dist/web-dist/_next/static/css/ceeb8e5596664b11.css +1 -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/apple-icon.png +0 -0
- package/dist/web-dist/apple-touch-icon.png +0 -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/favicon.svg +4 -0
- package/dist/web-dist/icon.svg +4 -0
- package/dist/web-dist/index.html +1 -0
- package/dist/web-dist/index.txt +32 -0
- package/dist/web-dist/live2d/live2dcubismcore.min.js +9 -0
- package/dist/web-dist/logo-circle.png +0 -0
- package/dist/web-dist/logo-circle.svg +4 -0
- package/dist/web-dist/logo-white.svg +3 -0
- package/dist/web-dist/logo.png +0 -0
- package/dist/web-dist/logo.svg +3 -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 +589 -0
- package/package.json +44 -0
|
@@ -0,0 +1,43 @@
|
|
|
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 { choice } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'choice',
|
|
12
|
+
message: 'Ear (Sensory Input & Perception Ingress):',
|
|
13
|
+
choices: [
|
|
14
|
+
{
|
|
15
|
+
name: 'Enabled (Recommended: Active sensory bounds & audio/text ingress validation)',
|
|
16
|
+
value: 'enabled',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'None (Skip / Disable sensory ingress)',
|
|
20
|
+
value: 'none',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
default: 'enabled',
|
|
24
|
+
});
|
|
25
|
+
if (choice === 'none') {
|
|
26
|
+
return {
|
|
27
|
+
config: { provider: 'none' },
|
|
28
|
+
summary: { Provider: 'None (Ear disabled)' },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
config: {
|
|
33
|
+
defaultSource: 'text_chat',
|
|
34
|
+
maxTextLength: 4000,
|
|
35
|
+
maxAudioBytes: 10485760,
|
|
36
|
+
},
|
|
37
|
+
summary: {
|
|
38
|
+
Status: 'Enabled (Active sensory guard & audio/text ingress)',
|
|
39
|
+
'Max Text': '4,000 characters',
|
|
40
|
+
'Max Audio': '10 MB',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { provider } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'provider',
|
|
12
|
+
message: 'Hands tool execution engine?',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'MCP Client (Model Context Protocol & signed capability tokens)', value: 'mcp' },
|
|
15
|
+
{ name: 'None (Skip / No external tool execution)', value: 'none' },
|
|
16
|
+
],
|
|
17
|
+
default: 'none',
|
|
18
|
+
});
|
|
19
|
+
if (provider === 'none') {
|
|
20
|
+
return {
|
|
21
|
+
config: { provider: 'none' },
|
|
22
|
+
summary: { Provider: 'None (Hands disabled)' },
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const { timeoutSeconds } = await inquirer_1.default.prompt({
|
|
26
|
+
type: 'input',
|
|
27
|
+
name: 'timeoutSeconds',
|
|
28
|
+
message: 'MCP Tool execution timeout (seconds):',
|
|
29
|
+
default: '10',
|
|
30
|
+
validate: (v) => (!isNaN(Number(v)) && Number(v) > 0) || 'Timeout must be a positive number.',
|
|
31
|
+
});
|
|
32
|
+
const timeoutMs = Math.round(Number(timeoutSeconds) * 1000);
|
|
33
|
+
return {
|
|
34
|
+
config: {
|
|
35
|
+
defaultTimeoutMs: timeoutMs,
|
|
36
|
+
providers: [],
|
|
37
|
+
},
|
|
38
|
+
summary: {
|
|
39
|
+
'Default Timeout': `${timeoutSeconds}s`,
|
|
40
|
+
'MCP Execution': 'Active Policy HMAC Protected',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 * from './mouth';
|
|
17
|
+
export interface ConfigureOrganOptions {
|
|
18
|
+
brainOptions?: BrainConfiguratorOptions;
|
|
19
|
+
knowledgeOptions?: KnowledgeConfiguratorOptions;
|
|
20
|
+
}
|
|
21
|
+
export declare function configureOrgan(manifest: OrganManifest, context: {
|
|
22
|
+
companionName: string;
|
|
23
|
+
existingConfig?: Record<string, unknown>;
|
|
24
|
+
}, options?: ConfigureOrganOptions): Promise<OrganConfigurationResult>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
const mouth_1 = require("./mouth");
|
|
29
|
+
__exportStar(require("./types"), exports);
|
|
30
|
+
__exportStar(require("./brain"), exports);
|
|
31
|
+
__exportStar(require("./knowledge"), exports);
|
|
32
|
+
__exportStar(require("./memory"), exports);
|
|
33
|
+
__exportStar(require("./voice"), exports);
|
|
34
|
+
__exportStar(require("./body"), exports);
|
|
35
|
+
__exportStar(require("./hands"), exports);
|
|
36
|
+
__exportStar(require("./behavior"), exports);
|
|
37
|
+
__exportStar(require("./vision"), exports);
|
|
38
|
+
__exportStar(require("./ear"), exports);
|
|
39
|
+
__exportStar(require("./observation"), exports);
|
|
40
|
+
__exportStar(require("./mouth"), exports);
|
|
41
|
+
async function configureOrgan(manifest, context, options = {}) {
|
|
42
|
+
const ctx = {
|
|
43
|
+
companionName: context.companionName,
|
|
44
|
+
manifest,
|
|
45
|
+
existingConfig: context.existingConfig,
|
|
46
|
+
};
|
|
47
|
+
switch (manifest.organType) {
|
|
48
|
+
case 'brain':
|
|
49
|
+
return (0, brain_1.configureBrain)(ctx, options.brainOptions);
|
|
50
|
+
case 'knowledge':
|
|
51
|
+
return (0, knowledge_1.configureKnowledge)(ctx, options.knowledgeOptions);
|
|
52
|
+
case 'archive':
|
|
53
|
+
return (0, memory_1.configureMemory)(ctx);
|
|
54
|
+
case 'voice':
|
|
55
|
+
return (0, voice_1.configureVoice)(ctx);
|
|
56
|
+
case 'body':
|
|
57
|
+
return (0, body_1.configureBody)(ctx);
|
|
58
|
+
case 'hands':
|
|
59
|
+
return (0, hands_1.configureHands)(ctx);
|
|
60
|
+
case 'behavior':
|
|
61
|
+
return (0, behavior_1.configureBehavior)(ctx);
|
|
62
|
+
case 'vision':
|
|
63
|
+
return (0, vision_1.configureVision)(ctx);
|
|
64
|
+
case 'ear':
|
|
65
|
+
return (0, ear_1.configureEar)(ctx);
|
|
66
|
+
case 'observation':
|
|
67
|
+
return (0, observation_1.configureObservation)(ctx);
|
|
68
|
+
case 'mouth':
|
|
69
|
+
return (0, mouth_1.configureMouth)(ctx);
|
|
70
|
+
default:
|
|
71
|
+
return {
|
|
72
|
+
config: ctx.existingConfig || {},
|
|
73
|
+
summary: {
|
|
74
|
+
Provider: manifest.displayName,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -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,146 @@
|
|
|
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 config = {
|
|
12
|
+
provider: 'unified',
|
|
13
|
+
dbPath: 'siduri.sqlite',
|
|
14
|
+
lifeDatabase: true,
|
|
15
|
+
};
|
|
16
|
+
const summary = {
|
|
17
|
+
'Life Database': 'Enabled (siduri.sqlite)',
|
|
18
|
+
};
|
|
19
|
+
// 1. Life Database is the sovereign default. Ask whether to attach an external knowledge pack
|
|
20
|
+
const { useExternalPack } = await inquirer_1.default.prompt({
|
|
21
|
+
type: 'confirm',
|
|
22
|
+
name: 'useExternalPack',
|
|
23
|
+
message: 'Attach an external knowledge pack from E Knowledge Hub?',
|
|
24
|
+
default: false,
|
|
25
|
+
});
|
|
26
|
+
if (!useExternalPack) {
|
|
27
|
+
summary['E-Pack'] = 'None';
|
|
28
|
+
return { config, summary };
|
|
29
|
+
}
|
|
30
|
+
// 2. Discover and resolve E Knowledge Hub package
|
|
31
|
+
while (true) {
|
|
32
|
+
const promptRes = await inquirer_1.default.prompt({
|
|
33
|
+
type: 'input',
|
|
34
|
+
name: 'packId',
|
|
35
|
+
message: 'Enter package ID (@publisher/name):',
|
|
36
|
+
default: '@vxnus/e-teyvat',
|
|
37
|
+
validate: (val) => val.trim().length > 0 || 'Please enter a package ID.',
|
|
38
|
+
});
|
|
39
|
+
const target = (promptRes.packId || promptRes.query || '').trim();
|
|
40
|
+
let manifest;
|
|
41
|
+
try {
|
|
42
|
+
process.stdout.write('\x1b[2mResolving knowledge metadata...\x1b[0m');
|
|
43
|
+
manifest = await client.resolveProvider(target);
|
|
44
|
+
process.stdout.write('\r\x1b[32m✓\x1b[0m Knowledge metadata resolved\n');
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
process.stdout.write('\r\x1b[33m!\x1b[0m Knowledge resolution failed\n');
|
|
48
|
+
console.log(`\x1b[33mReason:\x1b[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 / Enter another package ID', value: 'retry' },
|
|
55
|
+
{ name: 'Continue without external pack (Life DB only)', value: 'skip' },
|
|
56
|
+
{ name: 'Cancel', value: 'cancel' },
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
if (failureAction === 'retry')
|
|
60
|
+
continue;
|
|
61
|
+
if (failureAction === 'skip') {
|
|
62
|
+
summary['E-Pack'] = 'None';
|
|
63
|
+
return { config, summary };
|
|
64
|
+
}
|
|
65
|
+
throw new Error('Knowledge configuration cancelled.');
|
|
66
|
+
}
|
|
67
|
+
// Display provider summary
|
|
68
|
+
(0, knowledge_hub_1.displayKnowledgeProviderSummary)(manifest, target);
|
|
69
|
+
// Determine connection type: User selects strictly 1 mode (Remote OR Local)
|
|
70
|
+
let connectionType;
|
|
71
|
+
const isHybrid = manifest.distributionType === 'both';
|
|
72
|
+
const isLocalOnly = manifest.distributionType === 'local' || manifest.distribution?.kind === 'archive';
|
|
73
|
+
if (isHybrid) {
|
|
74
|
+
const { selectedMode } = await inquirer_1.default.prompt({
|
|
75
|
+
type: 'list',
|
|
76
|
+
name: 'selectedMode',
|
|
77
|
+
message: 'This pack offers both remote and local options. Select connection type:',
|
|
78
|
+
choices: [
|
|
79
|
+
{
|
|
80
|
+
name: `Remote (Stream directly from ${manifest.distribution?.url || 'provider'} without local storage)`,
|
|
81
|
+
value: 'remote',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'Local (Download archive and run offline on this machine)',
|
|
85
|
+
value: 'local',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
});
|
|
89
|
+
connectionType = selectedMode;
|
|
90
|
+
}
|
|
91
|
+
else if (isLocalOnly) {
|
|
92
|
+
connectionType = 'local';
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
connectionType = 'remote';
|
|
96
|
+
}
|
|
97
|
+
if (connectionType === 'remote') {
|
|
98
|
+
config.provider = 'e-hub';
|
|
99
|
+
config.registryUrl = 'https://e.vxnus.xyz/api/v1/knowledge';
|
|
100
|
+
config.packId = target;
|
|
101
|
+
config.pack = {
|
|
102
|
+
provider: 'e-hub',
|
|
103
|
+
mode: 'remote',
|
|
104
|
+
packId: target,
|
|
105
|
+
registryUrl: 'https://e.vxnus.xyz/api/v1/knowledge',
|
|
106
|
+
baseUrl: manifest.distribution?.url,
|
|
107
|
+
preferredMode: 'lexical',
|
|
108
|
+
};
|
|
109
|
+
if (manifest.distribution?.url) {
|
|
110
|
+
config.baseUrl = manifest.distribution.url;
|
|
111
|
+
}
|
|
112
|
+
summary.Source = 'E Knowledge Hub';
|
|
113
|
+
summary.Provider = manifest.displayName || manifest.name;
|
|
114
|
+
summary.Package = target;
|
|
115
|
+
summary.Version = manifest.version;
|
|
116
|
+
summary['E-Pack'] = `${manifest.displayName || manifest.name} (Remote)`;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// Local archive: stored in our defined path inside companion assets (user doesn't type path)
|
|
120
|
+
const packSlug = target.replace(/^@/, '').replace(/[/_]/g, '-');
|
|
121
|
+
const packDir = `./assets/knowledge/${packSlug}`;
|
|
122
|
+
config.provider = 'e-knowledge';
|
|
123
|
+
config.packPath = packDir;
|
|
124
|
+
config.packId = target;
|
|
125
|
+
config.pack = {
|
|
126
|
+
provider: 'e-knowledge',
|
|
127
|
+
mode: 'local',
|
|
128
|
+
packId: target,
|
|
129
|
+
packPath: packDir,
|
|
130
|
+
archiveUrl: manifest.distribution?.url,
|
|
131
|
+
checksum: manifest.distribution?.checksum,
|
|
132
|
+
preferredMode: 'lexical',
|
|
133
|
+
};
|
|
134
|
+
summary.Source = 'E Knowledge Hub';
|
|
135
|
+
summary.Provider = manifest.displayName || manifest.name;
|
|
136
|
+
summary.Package = target;
|
|
137
|
+
summary.Version = manifest.version;
|
|
138
|
+
summary['E-Pack'] = `${manifest.displayName || manifest.name} (Local @ ${packDir})`;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
config,
|
|
142
|
+
summary,
|
|
143
|
+
metadata: { manifest },
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.configureMemory = configureMemory;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureMemory(_context) {
|
|
9
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'provider',
|
|
12
|
+
message: 'Memory storage engine?',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'SQLite (Unified zero-config WAL + FTS5 full-text indexing)', value: 'sqlite' },
|
|
15
|
+
],
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
config: {
|
|
19
|
+
provider,
|
|
20
|
+
},
|
|
21
|
+
summary: {
|
|
22
|
+
Database: 'SQLite (WAL + FTS5)',
|
|
23
|
+
Storage: 'siduri.sqlite',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.configureMouth = configureMouth;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureMouth(_context) {
|
|
9
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'provider',
|
|
12
|
+
message: 'Mouth output delivery channel?',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'Web Streaming (Server-Sent Events, Live2D visemes & SSML)', value: 'web' },
|
|
15
|
+
{ name: 'None (Silent / Disable speech streaming output)', value: 'none' },
|
|
16
|
+
],
|
|
17
|
+
default: 'web',
|
|
18
|
+
});
|
|
19
|
+
if (provider === 'none') {
|
|
20
|
+
return {
|
|
21
|
+
config: { provider: 'none' },
|
|
22
|
+
summary: { Provider: 'None (Mouth disabled)' },
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
config: {
|
|
27
|
+
defaultMedium: 'web',
|
|
28
|
+
maxTextLength: 8000,
|
|
29
|
+
},
|
|
30
|
+
summary: {
|
|
31
|
+
'Delivery Medium': 'Web SSE Streaming',
|
|
32
|
+
'Max Text Length': '8000 chars',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.configureObservation = configureObservation;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureObservation(_context) {
|
|
9
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'provider',
|
|
12
|
+
message: 'Screen observation & continuous frame ingest:',
|
|
13
|
+
choices: [
|
|
14
|
+
{
|
|
15
|
+
name: 'None (Disabled as default - Work in progress)',
|
|
16
|
+
value: 'none',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Experimental Frame Ingest (Prototype - requires active vision)',
|
|
20
|
+
value: 'fixture',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
default: 'none',
|
|
24
|
+
});
|
|
25
|
+
if (provider === 'none') {
|
|
26
|
+
return {
|
|
27
|
+
config: { provider: 'none' },
|
|
28
|
+
summary: { Provider: 'Disabled (Work in progress)' },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
config: {},
|
|
33
|
+
summary: {
|
|
34
|
+
Provider: 'Experimental Frame Ingest (Work in progress)',
|
|
35
|
+
Deduplication: 'Cryptographic SHA-256 Hashing',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OrganManifest } from '../manifest';
|
|
2
|
+
export interface OrganConfigurationResult {
|
|
3
|
+
config: Record<string, unknown>;
|
|
4
|
+
summary?: Record<string, unknown>;
|
|
5
|
+
metadata?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export interface OrganConfiguratorContext {
|
|
8
|
+
companionName: string;
|
|
9
|
+
manifest: OrganManifest;
|
|
10
|
+
existingConfig?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export type OrganConfigurator = (context: OrganConfiguratorContext) => Promise<OrganConfigurationResult>;
|
|
@@ -0,0 +1,47 @@
|
|
|
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.configureVision = configureVision;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
async function configureVision(_context) {
|
|
9
|
+
const { model } = await inquirer_1.default.prompt({
|
|
10
|
+
type: 'list',
|
|
11
|
+
name: 'model',
|
|
12
|
+
message: 'Vision model:',
|
|
13
|
+
choices: [
|
|
14
|
+
{ name: 'GPT-4 Vision / GPT-4o (Multimodal OCR & Object Inspection)', value: 'gpt-4-vision' },
|
|
15
|
+
{ name: 'Claude 3.5 Sonnet Vision', value: 'anthropic/claude-3.5-sonnet' },
|
|
16
|
+
{ name: 'Custom Vision Model', value: 'custom' },
|
|
17
|
+
{ name: 'None (Skip / Disable visual perception)', value: 'none' },
|
|
18
|
+
],
|
|
19
|
+
default: 'none',
|
|
20
|
+
});
|
|
21
|
+
if (model === 'none') {
|
|
22
|
+
return {
|
|
23
|
+
config: { provider: 'none' },
|
|
24
|
+
summary: { Provider: 'None (Vision disabled)' },
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
let selectedModel = model;
|
|
28
|
+
if (model === 'custom') {
|
|
29
|
+
const { customModel } = await inquirer_1.default.prompt({
|
|
30
|
+
type: 'input',
|
|
31
|
+
name: 'customModel',
|
|
32
|
+
message: 'Vision Model ID:',
|
|
33
|
+
default: 'gpt-4-vision',
|
|
34
|
+
});
|
|
35
|
+
selectedModel = customModel.trim();
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
config: {
|
|
39
|
+
provider: 'openrouter',
|
|
40
|
+
model: selectedModel,
|
|
41
|
+
},
|
|
42
|
+
summary: {
|
|
43
|
+
Provider: 'OpenRouter Vision',
|
|
44
|
+
Model: selectedModel,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|