signetai 0.204.4 → 0.204.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/dist/mcp-stdio.js +45 -26
- package/native-manifest.json +13 -13
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -49501,8 +49501,8 @@ async function listKnowledgeEntities(accessor, params) {
|
|
|
49501
49501
|
});
|
|
49502
49502
|
}
|
|
49503
49503
|
async function getKnowledgeEntityDetail(accessor, entityId, agentId) {
|
|
49504
|
-
|
|
49505
|
-
|
|
49504
|
+
const row = await accessor.withReadDbAsync((db) => {
|
|
49505
|
+
return db.prepare(`SELECT
|
|
49506
49506
|
e.*,
|
|
49507
49507
|
(
|
|
49508
49508
|
SELECT COUNT(*) FROM entity_aspects asp
|
|
@@ -49548,22 +49548,22 @@ async function getKnowledgeEntityDetail(accessor, entityId, agentId) {
|
|
|
49548
49548
|
FROM entities e
|
|
49549
49549
|
WHERE e.id = ? AND e.agent_id = ?
|
|
49550
49550
|
AND COALESCE(e.status, 'active') = 'active'`).get(entityId, agentId);
|
|
49551
|
-
if (!row)
|
|
49552
|
-
return null;
|
|
49553
|
-
const structuralDensity = await getStructuralDensity(accessor, entityId, agentId);
|
|
49554
|
-
const incomingDependencyCount = Number(row.incoming_dependency_count ?? 0);
|
|
49555
|
-
const outgoingDependencyCount = Number(row.outgoing_dependency_count ?? 0);
|
|
49556
|
-
return {
|
|
49557
|
-
entity: rowToEntity(row),
|
|
49558
|
-
aspectCount: Number(row.aspect_count ?? 0),
|
|
49559
|
-
attributeCount: Number(row.attribute_count ?? 0),
|
|
49560
|
-
constraintCount: Number(row.constraint_count ?? 0),
|
|
49561
|
-
dependencyCount: incomingDependencyCount + outgoingDependencyCount,
|
|
49562
|
-
structuralDensity,
|
|
49563
|
-
incomingDependencyCount,
|
|
49564
|
-
outgoingDependencyCount
|
|
49565
|
-
};
|
|
49566
49551
|
});
|
|
49552
|
+
if (!row)
|
|
49553
|
+
return null;
|
|
49554
|
+
const structuralDensity = await getStructuralDensity(accessor, entityId, agentId);
|
|
49555
|
+
const incomingDependencyCount = Number(row.incoming_dependency_count ?? 0);
|
|
49556
|
+
const outgoingDependencyCount = Number(row.outgoing_dependency_count ?? 0);
|
|
49557
|
+
return {
|
|
49558
|
+
entity: rowToEntity(row),
|
|
49559
|
+
aspectCount: Number(row.aspect_count ?? 0),
|
|
49560
|
+
attributeCount: Number(row.attribute_count ?? 0),
|
|
49561
|
+
constraintCount: Number(row.constraint_count ?? 0),
|
|
49562
|
+
dependencyCount: incomingDependencyCount + outgoingDependencyCount,
|
|
49563
|
+
structuralDensity,
|
|
49564
|
+
incomingDependencyCount,
|
|
49565
|
+
outgoingDependencyCount
|
|
49566
|
+
};
|
|
49567
49567
|
}
|
|
49568
49568
|
function readEntityAspectsWithCounts(db, entityId, agentId) {
|
|
49569
49569
|
const rows = db.prepare(`SELECT
|
|
@@ -49658,7 +49658,7 @@ async function getEntityDependenciesDetailed(accessor, params) {
|
|
|
49658
49658
|
});
|
|
49659
49659
|
}
|
|
49660
49660
|
async function getStructuralDensity(accessor, entityId, agentId) {
|
|
49661
|
-
return await accessor.withReadDbAsync(
|
|
49661
|
+
return await accessor.withReadDbAsync((db) => {
|
|
49662
49662
|
const aspects = db.prepare(`SELECT COUNT(*) as n FROM entity_aspects
|
|
49663
49663
|
WHERE entity_id = ? AND agent_id = ?`).get(entityId, agentId);
|
|
49664
49664
|
const attributes = db.prepare(`SELECT COUNT(*) as n FROM entity_attributes ea
|
|
@@ -52636,14 +52636,16 @@ async function awaitPressureClear(timeoutMs = 30000) {
|
|
|
52636
52636
|
|
|
52637
52637
|
// ../../platform/daemon/src/yielding-writes.ts
|
|
52638
52638
|
var yieldToEventLoop = () => new Promise((resolve) => setTimeout(resolve, 0));
|
|
52639
|
-
async function writeBatch(accessor, processBatch) {
|
|
52639
|
+
async function writeBatch(accessor, processBatch, label, estimatedWorkUnits) {
|
|
52640
52640
|
if (accessor.withWriteTxAsync) {
|
|
52641
|
-
return accessor.withWriteTxAsync(processBatch);
|
|
52641
|
+
return accessor.withWriteTxAsync(processBatch, { operation: `db.batch.${label}`, estimatedWorkUnits });
|
|
52642
52642
|
}
|
|
52643
52643
|
return accessor.withWriteTx(processBatch);
|
|
52644
52644
|
}
|
|
52645
52645
|
async function runWriteBatches(accessor, items, processItem, options) {
|
|
52646
52646
|
const maxPerTx = typeof options.maxPerTx === "number" && Number.isFinite(options.maxPerTx) ? Math.max(1, Math.floor(options.maxPerTx)) : 50;
|
|
52647
|
+
const maxRows = typeof options.maxRows === "number" && Number.isFinite(options.maxRows) ? Math.max(1, Math.floor(options.maxRows)) : maxPerTx;
|
|
52648
|
+
const maxBytes = typeof options.maxBytes === "number" && Number.isFinite(options.maxBytes) ? Math.max(1, options.maxBytes) : Number.POSITIVE_INFINITY;
|
|
52647
52649
|
const maxTxDurationMs = typeof options.maxTxDurationMs === "number" && Number.isFinite(options.maxTxDurationMs) ? Math.max(1, options.maxTxDurationMs) : Number.POSITIVE_INFINITY;
|
|
52648
52650
|
const yieldEvery = typeof options.yieldEvery === "number" && Number.isFinite(options.yieldEvery) ? Math.max(1, Math.floor(options.yieldEvery)) : 1;
|
|
52649
52651
|
const maxTotal = Math.min(items.length, typeof options.maxTotal === "number" && Number.isFinite(options.maxTotal) ? Math.max(0, Math.floor(options.maxTotal)) : items.length);
|
|
@@ -52651,25 +52653,35 @@ async function runWriteBatches(accessor, items, processItem, options) {
|
|
|
52651
52653
|
let processed = 0;
|
|
52652
52654
|
let batches = 0;
|
|
52653
52655
|
let paused = 0;
|
|
52656
|
+
const startedAt = performance.now();
|
|
52654
52657
|
while (processed < maxTotal) {
|
|
52655
52658
|
if (!options.skipPressure && isSystemPressureHigh()) {
|
|
52656
52659
|
paused++;
|
|
52657
52660
|
await awaitPressureClear();
|
|
52658
52661
|
}
|
|
52659
52662
|
let batch;
|
|
52663
|
+
let batchBytes = 0;
|
|
52660
52664
|
try {
|
|
52661
|
-
|
|
52662
|
-
const
|
|
52665
|
+
const committed = await writeBatch(accessor, (db) => {
|
|
52666
|
+
const startedAt2 = performance.now();
|
|
52663
52667
|
const batchResults = [];
|
|
52668
|
+
let bytes = 0;
|
|
52664
52669
|
for (const item of items.slice(processed, maxTotal)) {
|
|
52670
|
+
const estimatedBytes = options.estimateBytes?.(item) ?? 0;
|
|
52671
|
+
const itemBytes = Number.isFinite(estimatedBytes) ? Math.max(0, estimatedBytes) : 0;
|
|
52672
|
+
if (batchResults.length > 0 && bytes + itemBytes > maxBytes)
|
|
52673
|
+
break;
|
|
52665
52674
|
batchResults.push(processItem(db, item));
|
|
52666
|
-
|
|
52675
|
+
bytes += itemBytes;
|
|
52676
|
+
if (batchResults.length >= Math.min(maxPerTx, maxRows))
|
|
52667
52677
|
break;
|
|
52668
|
-
if (performance.now() -
|
|
52678
|
+
if (performance.now() - startedAt2 >= maxTxDurationMs)
|
|
52669
52679
|
break;
|
|
52670
52680
|
}
|
|
52671
|
-
return batchResults;
|
|
52672
|
-
});
|
|
52681
|
+
return { results: batchResults, bytes };
|
|
52682
|
+
}, options.label, Math.min(maxPerTx, maxRows));
|
|
52683
|
+
batch = committed.results;
|
|
52684
|
+
batchBytes = committed.bytes;
|
|
52673
52685
|
} catch (error51) {
|
|
52674
52686
|
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
52675
52687
|
logger.warn("yielding-writes", `${options.label}: write batch failed after ${processed} committed items`, {
|
|
@@ -52684,6 +52696,13 @@ async function runWriteBatches(accessor, items, processItem, options) {
|
|
|
52684
52696
|
results.push(...batch);
|
|
52685
52697
|
processed += batch.length;
|
|
52686
52698
|
batches++;
|
|
52699
|
+
options.checkpoint?.({
|
|
52700
|
+
processed,
|
|
52701
|
+
batches,
|
|
52702
|
+
rows: batch.length,
|
|
52703
|
+
bytes: batchBytes,
|
|
52704
|
+
elapsedMs: performance.now() - startedAt
|
|
52705
|
+
});
|
|
52687
52706
|
if (batches % yieldEvery === 0)
|
|
52688
52707
|
await yieldToEventLoop();
|
|
52689
52708
|
}
|
package/native-manifest.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.204.
|
|
3
|
+
"version": "0.204.5",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
9
|
-
"size":
|
|
8
|
+
"sha256": "e5043117edd929228aef331293d3e8cb9fb370c9f27162f0f9787ebe6acfcdc4",
|
|
9
|
+
"size": 140013088
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
15
|
-
"size":
|
|
14
|
+
"sha256": "e169bbde63261ad68b9e4fb67b01a46522fd9a3255d89faca6cd967030018b58",
|
|
15
|
+
"size": 144869952
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "381cffba0e803d3640f711499178ba24b61dd907129c1f6fdff7c4cee9ac30c5",
|
|
21
|
+
"size": 184465846
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "6ff1e08f4ffa9585fcc3edfa308a9d51ba314ef681a62a3559ef8049855d0149",
|
|
27
|
+
"size": 186839213
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "ea4eddc12a38298d1dbc2ecd7c589cb1d3e92118584d51cee5980a9853a6ae96",
|
|
33
|
+
"size": 194911744
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.204.
|
|
39
|
-
"sha256": "
|
|
38
|
+
"url": "signet-connectors-0.204.5.tar.gz",
|
|
39
|
+
"sha256": "ff7041466138922ea9be222f8651f32be720692a7aad8286aea65c357e3c29fe",
|
|
40
40
|
"size": 21945
|
|
41
41
|
}
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.204.
|
|
3
|
+
"version": "0.204.5",
|
|
4
4
|
"description": "Signet native CLI installer wrapper",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.5/signetai-darwin-arm64-0.204.5.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.5/signetai-darwin-x64-0.204.5.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.5/signetai-linux-arm64-0.204.5.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.5/signetai-linux-x64-0.204.5.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.204.5/signetai-win32-x64-0.204.5.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|