@siduri-x/api 1.0.4 → 2.0.1
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/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test.log +40 -0
- package/dist/app.d.ts +43 -0
- package/dist/app.js +704 -0
- package/dist/auth.d.ts +34 -0
- package/dist/auth.js +84 -0
- package/dist/auth.test.d.ts +1 -0
- package/dist/auth.test.js +74 -0
- package/dist/b0-b6.test.d.ts +1 -0
- package/dist/b0-b6.test.js +121 -0
- package/dist/context-mapper.d.ts +18 -0
- package/dist/context-mapper.js +173 -0
- package/dist/context-mapper.test.d.ts +1 -0
- package/dist/context-mapper.test.js +161 -0
- package/dist/cors.d.ts +3 -0
- package/dist/cors.js +42 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +28 -8
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +137 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +17 -0
- package/dist/runtime.test.d.ts +1 -0
- package/dist/runtime.test.js +282 -0
- package/dist/smoke.test.d.ts +0 -0
- package/dist/smoke.test.js +6 -0
- package/dist/t4-gating.test.d.ts +1 -0
- package/dist/t4-gating.test.js +193 -0
- package/dist/t5-experience.test.d.ts +1 -0
- package/dist/t5-experience.test.js +155 -0
- package/dist/t6-security.test.d.ts +1 -0
- package/dist/t6-security.test.js +486 -0
- package/dist/t7-release.test.d.ts +1 -0
- package/dist/t7-release.test.js +119 -0
- package/dist/teach-mode.test.d.ts +1 -0
- package/dist/teach-mode.test.js +136 -0
- package/package.json +27 -23
- package/src/app.ts +86 -14
- package/src/b0-b6.test.ts +1 -1
- package/src/context-mapper.test.ts +27 -0
- package/src/context-mapper.ts +28 -12
- package/src/index.ts +28 -7
- package/src/t4-gating.test.ts +1 -1
- package/src/t5-experience.test.ts +1 -1
- package/src/t6-security.test.ts +73 -2
- package/src/t7-release.test.ts +1 -1
- package/src/teach-mode.test.ts +152 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
> @siduri-x/api@2.0.1 test /home/zagin/Projects/vxnus-studio/projects/siduri-x/apps/api
|
|
3
|
+
> jest --config jest.config.json
|
|
4
|
+
|
|
5
|
+
PASS src/context-mapper.test.ts (10.14 s)
|
|
6
|
+
PASS src/runtime.test.ts (10.545 s)
|
|
7
|
+
● Console
|
|
8
|
+
|
|
9
|
+
console.error
|
|
10
|
+
[SiduriRuntime] Knowledge search failed: E-Teyvat is down
|
|
11
|
+
|
|
12
|
+
21 | extKnowledge && shouldQueryKnowledge && typeof extKnowledge.search === 'function'
|
|
13
|
+
22 | ? extKnowledge.search(perceivedText).catch((e) => {
|
|
14
|
+
> 23 | console.error('[SiduriRuntime] Knowledge search failed:', e.message);
|
|
15
|
+
| ^
|
|
16
|
+
24 | subsystemDiagnostics['knowledge'] = `UNAVAILABLE: ${e.message}`;
|
|
17
|
+
25 | return [];
|
|
18
|
+
26 | })
|
|
19
|
+
|
|
20
|
+
at ../../packages/core/dist/context-retriever.js:23:25
|
|
21
|
+
at async Promise.all (index 0)
|
|
22
|
+
at retrieveRuntimeContext (../../packages/core/dist/context-retriever.js:19:78)
|
|
23
|
+
at SiduriRuntime.processPerception (../../packages/core/dist/runtime.js:253:34)
|
|
24
|
+
at Object.<anonymous> (src/runtime.test.ts:74:22)
|
|
25
|
+
|
|
26
|
+
PASS src/index.test.ts (10.888 s)
|
|
27
|
+
PASS src/auth.test.ts
|
|
28
|
+
PASS src/smoke.test.ts
|
|
29
|
+
PASS src/t4-gating.test.ts (11.522 s)
|
|
30
|
+
PASS src/b0-b6.test.ts
|
|
31
|
+
PASS src/t5-experience.test.ts (11.592 s)
|
|
32
|
+
PASS src/t7-release.test.ts (11.335 s)
|
|
33
|
+
PASS src/teach-mode.test.ts
|
|
34
|
+
PASS src/t6-security.test.ts (12.22 s)
|
|
35
|
+
[999D[K
|
|
36
|
+
Test Suites: 11 passed, 11 total
|
|
37
|
+
Tests: 72 passed, 72 total
|
|
38
|
+
Snapshots: 0 total
|
|
39
|
+
Time: 15.203 s, estimated 16 s
|
|
40
|
+
Ran all test suites.
|
package/dist/app.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Express } from 'express';
|
|
2
|
+
import { SiduriRuntime } from './runtime';
|
|
3
|
+
import { VoiceConfig } from '@siduri-x/voice';
|
|
4
|
+
import { EKnowledgeConfig } from '@siduri-x/eknowledge';
|
|
5
|
+
import { OpenRouterVisionConfig } from '@siduri-x/vision';
|
|
6
|
+
import { Live2DAdapterConfig } from '@siduri-x/body';
|
|
7
|
+
import { FixtureObservationOrgan } from '@siduri-x/observation';
|
|
8
|
+
import { DefaultHandsOrganConfig } from '@siduri-x/hands';
|
|
9
|
+
import { EarOrganConfig } from '@siduri-x/ear';
|
|
10
|
+
import { DefaultMouthOrganConfig } from '@siduri-x/mouth';
|
|
11
|
+
export interface AppBrainConfig {
|
|
12
|
+
provider?: 'openrouter' | 'openai-compatible' | string;
|
|
13
|
+
model?: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
apiKeyEnv?: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
timeoutMs?: number;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface AppBehaviorConfig {
|
|
21
|
+
provider?: 'active_self' | 'none' | string;
|
|
22
|
+
preset?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface AppBootCompanionConfig {
|
|
26
|
+
name: string;
|
|
27
|
+
brain?: AppBrainConfig;
|
|
28
|
+
voice?: VoiceConfig;
|
|
29
|
+
knowledge?: EKnowledgeConfig;
|
|
30
|
+
vision?: OpenRouterVisionConfig;
|
|
31
|
+
behavior?: AppBehaviorConfig;
|
|
32
|
+
body?: Live2DAdapterConfig;
|
|
33
|
+
hands?: DefaultHandsOrganConfig;
|
|
34
|
+
ear?: EarOrganConfig;
|
|
35
|
+
mouth?: DefaultMouthOrganConfig;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
export interface AppInstance {
|
|
39
|
+
app: Express;
|
|
40
|
+
runtimes: Map<string, SiduriRuntime>;
|
|
41
|
+
setObservationOrgan: (org: FixtureObservationOrgan) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function createApp(runtimes?: Map<string, SiduriRuntime>): AppInstance;
|