@siduri-x/api 2.0.4 → 2.0.5
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 +1 -1
- package/.turbo/turbo-test.log +12 -12
- package/dist/app.js +30 -5
- package/package.json +4 -4
- package/siduri.sqlite +0 -0
- package/src/app.ts +25 -5
package/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @siduri-x/api@2.0.
|
|
2
|
+
> @siduri-x/api@2.0.5 test /home/zagin/Projects/vxnus-studio/projects/siduri-x/apps/api
|
|
3
3
|
> jest --config jest.config.json
|
|
4
4
|
|
|
5
|
-
PASS src/
|
|
6
|
-
PASS src/
|
|
7
|
-
PASS src/t5-experience.test.ts (11.412 s)
|
|
8
|
-
PASS src/runtime.test.ts (10.411 s)
|
|
5
|
+
PASS src/t5-experience.test.ts (11.413 s)
|
|
6
|
+
PASS src/runtime.test.ts (11.982 s)
|
|
9
7
|
● Console
|
|
10
8
|
|
|
11
9
|
console.error
|
|
@@ -21,23 +19,25 @@ PASS src/runtime.test.ts (10.411 s)
|
|
|
21
19
|
|
|
22
20
|
at ../../packages/core/dist/context-retriever.js:23:25
|
|
23
21
|
at async Promise.all (index 0)
|
|
24
|
-
at retrieveRuntimeContext (../../packages/core/dist/context-retriever.js:19:
|
|
22
|
+
at retrieveRuntimeContext (../../packages/core/dist/context-retriever.js:19:124)
|
|
25
23
|
at contextRetrievalStage (../../packages/core/dist/perception-pipeline.js:66:30)
|
|
26
24
|
at PerceptionPipeline.execute (../../packages/core/dist/perception-pipeline.js:21:34)
|
|
27
25
|
at Object.<anonymous> (src/runtime.test.ts:74:22)
|
|
28
26
|
|
|
29
|
-
PASS src/
|
|
27
|
+
PASS src/knowledge.test.ts
|
|
28
|
+
PASS src/boot.test.ts
|
|
29
|
+
PASS src/context-mapper.test.ts (12.608 s)
|
|
30
30
|
PASS src/auth.test.ts
|
|
31
31
|
PASS src/smoke.test.ts
|
|
32
32
|
PASS src/b0-b6.test.ts
|
|
33
33
|
PASS src/t7-release.test.ts
|
|
34
|
-
PASS src/
|
|
35
|
-
PASS src/
|
|
36
|
-
PASS src/
|
|
37
|
-
PASS src/
|
|
34
|
+
PASS src/index.test.ts (14.286 s)
|
|
35
|
+
PASS src/teach-mode.test.ts (14.196 s)
|
|
36
|
+
PASS src/t4-gating.test.ts (13.791 s)
|
|
37
|
+
PASS src/t6-security.test.ts (14.999 s)
|
|
38
38
|
[999D[K
|
|
39
39
|
Test Suites: 13 passed, 13 total
|
|
40
40
|
Tests: 90 passed, 90 total
|
|
41
41
|
Snapshots: 0 total
|
|
42
|
-
Time:
|
|
42
|
+
Time: 18.45 s
|
|
43
43
|
Ran all test suites.
|
package/dist/app.js
CHANGED
|
@@ -510,7 +510,12 @@ function createApp(runtimes = new Map()) {
|
|
|
510
510
|
if (!runtime.memory)
|
|
511
511
|
return res.status(400).json({ error: "Memory organ not configured" });
|
|
512
512
|
try {
|
|
513
|
-
|
|
513
|
+
if (typeof runtime.approveProposal === 'function') {
|
|
514
|
+
await runtime.approveProposal(req.body.id, { companionId: id });
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
await runtime.memory.approveClaim(req.body.id);
|
|
518
|
+
}
|
|
514
519
|
res.json({ approved: true, status: 'approved' });
|
|
515
520
|
}
|
|
516
521
|
catch (e) {
|
|
@@ -525,7 +530,12 @@ function createApp(runtimes = new Map()) {
|
|
|
525
530
|
if (!runtime.memory)
|
|
526
531
|
return res.status(400).json({ error: "Memory organ not configured" });
|
|
527
532
|
try {
|
|
528
|
-
|
|
533
|
+
if (typeof runtime.rejectProposal === 'function') {
|
|
534
|
+
await runtime.rejectProposal(req.body.id, { companionId: id });
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
await runtime.memory.rejectClaim(req.body.id);
|
|
538
|
+
}
|
|
529
539
|
res.json({ rejected: true, status: 'rejected' });
|
|
530
540
|
}
|
|
531
541
|
catch (e) {
|
|
@@ -541,7 +551,12 @@ function createApp(runtimes = new Map()) {
|
|
|
541
551
|
if (!runtime.memory)
|
|
542
552
|
return res.status(400).json({ error: "Memory organ not configured" });
|
|
543
553
|
try {
|
|
544
|
-
|
|
554
|
+
if (typeof runtime.approveDirective === 'function') {
|
|
555
|
+
await runtime.approveDirective(req.body.id, { companionId: id });
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
await runtime.memory.approveDirective(req.body.id);
|
|
559
|
+
}
|
|
545
560
|
res.json({ approved: true, status: 'active' });
|
|
546
561
|
}
|
|
547
562
|
catch (e) {
|
|
@@ -556,7 +571,12 @@ function createApp(runtimes = new Map()) {
|
|
|
556
571
|
if (!runtime.memory)
|
|
557
572
|
return res.status(400).json({ error: "Memory organ not configured" });
|
|
558
573
|
try {
|
|
559
|
-
|
|
574
|
+
if (typeof runtime.rejectDirective === 'function') {
|
|
575
|
+
await runtime.rejectDirective(req.body.id, { companionId: id });
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
await runtime.memory.rejectDirective(req.body.id);
|
|
579
|
+
}
|
|
560
580
|
res.json({ rejected: true, status: 'rejected' });
|
|
561
581
|
}
|
|
562
582
|
catch (e) {
|
|
@@ -571,7 +591,12 @@ function createApp(runtimes = new Map()) {
|
|
|
571
591
|
if (!runtime.memory)
|
|
572
592
|
return res.status(400).json({ error: "Memory organ not configured" });
|
|
573
593
|
try {
|
|
574
|
-
|
|
594
|
+
if (typeof runtime.revokeDirective === 'function') {
|
|
595
|
+
await runtime.revokeDirective(req.body.id, { companionId: id });
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
await runtime.memory.revokeDirective(req.body.id);
|
|
599
|
+
}
|
|
575
600
|
res.json({ revoked: true, status: 'revoked' });
|
|
576
601
|
}
|
|
577
602
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siduri-x/api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"@siduri-x/body": "2.0.1",
|
|
16
16
|
"@siduri-x/brain": "2.0.2",
|
|
17
17
|
"@siduri-x/ear": "2.0.1",
|
|
18
|
-
"@siduri-x/core": "2.0.
|
|
18
|
+
"@siduri-x/core": "2.0.5",
|
|
19
19
|
"@siduri-x/eknowledge": "2.0.1",
|
|
20
20
|
"@siduri-x/hands": "2.0.1",
|
|
21
21
|
"@siduri-x/knowledge": "2.0.3",
|
|
22
|
-
"@siduri-x/memory": "2.0.2",
|
|
23
22
|
"@siduri-x/mouth": "2.0.2",
|
|
24
23
|
"@siduri-x/observation": "2.0.1",
|
|
25
|
-
"@siduri-x/
|
|
24
|
+
"@siduri-x/memory": "2.0.3",
|
|
25
|
+
"@siduri-x/self": "2.0.3",
|
|
26
26
|
"@siduri-x/vision": "2.0.1",
|
|
27
27
|
"@siduri-x/voice": "2.0.2"
|
|
28
28
|
},
|
package/siduri.sqlite
CHANGED
|
Binary file
|
package/src/app.ts
CHANGED
|
@@ -540,7 +540,11 @@ export function createApp(runtimes: Map<string, SiduriRuntime> = new Map()): App
|
|
|
540
540
|
if (!runtime) return res.status(404).json({ error: "Companion not found" });
|
|
541
541
|
if (!runtime.memory) return res.status(400).json({ error: "Memory organ not configured" });
|
|
542
542
|
try {
|
|
543
|
-
|
|
543
|
+
if (typeof (runtime as any).approveProposal === 'function') {
|
|
544
|
+
await (runtime as any).approveProposal(req.body.id, { companionId: id });
|
|
545
|
+
} else {
|
|
546
|
+
await runtime.memory.approveClaim(req.body.id);
|
|
547
|
+
}
|
|
544
548
|
res.json({ approved: true, status: 'approved' });
|
|
545
549
|
} catch (e: any) {
|
|
546
550
|
res.status(500).json({ error: e.message });
|
|
@@ -553,7 +557,11 @@ export function createApp(runtimes: Map<string, SiduriRuntime> = new Map()): App
|
|
|
553
557
|
if (!runtime) return res.status(404).json({ error: "Companion not found" });
|
|
554
558
|
if (!runtime.memory) return res.status(400).json({ error: "Memory organ not configured" });
|
|
555
559
|
try {
|
|
556
|
-
|
|
560
|
+
if (typeof (runtime as any).rejectProposal === 'function') {
|
|
561
|
+
await (runtime as any).rejectProposal(req.body.id, { companionId: id });
|
|
562
|
+
} else {
|
|
563
|
+
await runtime.memory.rejectClaim(req.body.id);
|
|
564
|
+
}
|
|
557
565
|
res.json({ rejected: true, status: 'rejected' });
|
|
558
566
|
} catch (e: any) {
|
|
559
567
|
res.status(500).json({ error: e.message });
|
|
@@ -567,7 +575,11 @@ export function createApp(runtimes: Map<string, SiduriRuntime> = new Map()): App
|
|
|
567
575
|
if (!runtime) return res.status(404).json({ error: "Companion not found" });
|
|
568
576
|
if (!runtime.memory) return res.status(400).json({ error: "Memory organ not configured" });
|
|
569
577
|
try {
|
|
570
|
-
|
|
578
|
+
if (typeof (runtime as any).approveDirective === 'function') {
|
|
579
|
+
await (runtime as any).approveDirective(req.body.id, { companionId: id });
|
|
580
|
+
} else {
|
|
581
|
+
await runtime.memory.approveDirective(req.body.id);
|
|
582
|
+
}
|
|
571
583
|
res.json({ approved: true, status: 'active' });
|
|
572
584
|
} catch (e: any) {
|
|
573
585
|
res.status(500).json({ error: e.message });
|
|
@@ -580,7 +592,11 @@ export function createApp(runtimes: Map<string, SiduriRuntime> = new Map()): App
|
|
|
580
592
|
if (!runtime) return res.status(404).json({ error: "Companion not found" });
|
|
581
593
|
if (!runtime.memory) return res.status(400).json({ error: "Memory organ not configured" });
|
|
582
594
|
try {
|
|
583
|
-
|
|
595
|
+
if (typeof (runtime as any).rejectDirective === 'function') {
|
|
596
|
+
await (runtime as any).rejectDirective(req.body.id, { companionId: id });
|
|
597
|
+
} else {
|
|
598
|
+
await runtime.memory.rejectDirective(req.body.id);
|
|
599
|
+
}
|
|
584
600
|
res.json({ rejected: true, status: 'rejected' });
|
|
585
601
|
} catch (e: any) {
|
|
586
602
|
res.status(500).json({ error: e.message });
|
|
@@ -593,7 +609,11 @@ export function createApp(runtimes: Map<string, SiduriRuntime> = new Map()): App
|
|
|
593
609
|
if (!runtime) return res.status(404).json({ error: "Companion not found" });
|
|
594
610
|
if (!runtime.memory) return res.status(400).json({ error: "Memory organ not configured" });
|
|
595
611
|
try {
|
|
596
|
-
|
|
612
|
+
if (typeof (runtime as any).revokeDirective === 'function') {
|
|
613
|
+
await (runtime as any).revokeDirective(req.body.id, { companionId: id });
|
|
614
|
+
} else {
|
|
615
|
+
await runtime.memory.revokeDirective(req.body.id);
|
|
616
|
+
}
|
|
597
617
|
res.json({ revoked: true, status: 'revoked' });
|
|
598
618
|
} catch (e: any) {
|
|
599
619
|
res.status(500).json({ error: e.message });
|