signetai 0.166.0 → 0.168.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/dist/mcp-stdio.js +58 -16
- package/native-manifest.json +14 -14
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -36494,6 +36494,7 @@ function classifyEntityQuality(name, type) {
|
|
|
36494
36494
|
}
|
|
36495
36495
|
|
|
36496
36496
|
// ../../platform/daemon/src/episodic-sources.ts
|
|
36497
|
+
var EPISODIC_CAPTURED_AT_FLOOR = "2000-01-01T00:00:00.000Z";
|
|
36497
36498
|
function readNonEmptyTrimmed(value) {
|
|
36498
36499
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
36499
36500
|
}
|
|
@@ -36699,11 +36700,8 @@ function searchEpisodicSources(db, params) {
|
|
|
36699
36700
|
const query = params.query.trim();
|
|
36700
36701
|
const limit = Math.max(1, Math.min(Math.floor(params.limit ?? 20), 50));
|
|
36701
36702
|
const like = `%${query}%`;
|
|
36702
|
-
const
|
|
36703
|
-
|
|
36704
|
-
timeArgs.push(params.since);
|
|
36705
|
-
if (params.before !== undefined)
|
|
36706
|
-
timeArgs.push(params.before);
|
|
36703
|
+
const sinceArgs = params.since !== undefined ? [params.since, EPISODIC_CAPTURED_AT_FLOOR] : [];
|
|
36704
|
+
const beforeArgs = params.before !== undefined ? [params.before] : [];
|
|
36707
36705
|
const branches = [];
|
|
36708
36706
|
if (params.kind === undefined || params.kind === "memory") {
|
|
36709
36707
|
branches.push({
|
|
@@ -36712,8 +36710,9 @@ function searchEpisodicSources(db, params) {
|
|
|
36712
36710
|
WHERE agent_id = ? AND memory_kind = 'episodic'
|
|
36713
36711
|
AND COALESCE(is_deleted, 0) = 0 AND visibility != 'archived' AND scope IS NULL
|
|
36714
36712
|
AND COALESCE(type, '') != 'session_summary' AND content LIKE ?
|
|
36715
|
-
${params.since ? "AND created_at >= ?
|
|
36716
|
-
|
|
36713
|
+
${params.since ? "AND (julianday(created_at) >= julianday(?) OR julianday(created_at) < julianday(?))" : ""}
|
|
36714
|
+
${params.before ? "AND julianday(created_at) <= julianday(?)" : ""}`,
|
|
36715
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs]
|
|
36717
36716
|
});
|
|
36718
36717
|
}
|
|
36719
36718
|
if (params.kind === undefined || params.kind === "artifact") {
|
|
@@ -36722,7 +36721,8 @@ function searchEpisodicSources(db, params) {
|
|
|
36722
36721
|
FROM memory_artifacts ma
|
|
36723
36722
|
WHERE ma.agent_id = ? AND COALESCE(ma.is_deleted, 0) = 0
|
|
36724
36723
|
AND length(ma.content) > 0 AND ma.content LIKE ?
|
|
36725
|
-
${params.since ? "AND ma.captured_at >= ?
|
|
36724
|
+
${params.since ? "AND (julianday(ma.captured_at) >= julianday(?) OR julianday(ma.captured_at) < julianday(?))" : ""}
|
|
36725
|
+
${params.before ? "AND julianday(ma.captured_at) <= julianday(?)" : ""}
|
|
36726
36726
|
AND (ma.source_sha256 IS NULL OR ma.source_sha256 = ''
|
|
36727
36727
|
OR (ma.agent_id, ma.source_path) = (
|
|
36728
36728
|
SELECT ma2.agent_id, ma2.source_path FROM memory_artifacts ma2
|
|
@@ -36731,7 +36731,7 @@ function searchEpisodicSources(db, params) {
|
|
|
36731
36731
|
ORDER BY ma2.captured_at DESC, ma2.source_path ASC
|
|
36732
36732
|
LIMIT 1
|
|
36733
36733
|
))`,
|
|
36734
|
-
args: [params.agentId, like, ...
|
|
36734
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs]
|
|
36735
36735
|
});
|
|
36736
36736
|
}
|
|
36737
36737
|
if (params.kind === undefined || params.kind === "transcript") {
|
|
@@ -36739,9 +36739,9 @@ function searchEpisodicSources(db, params) {
|
|
|
36739
36739
|
sql: `SELECT 'transcript' AS kind, session_key AS id, COALESCE(updated_at, created_at) AS captured_at
|
|
36740
36740
|
FROM session_transcripts
|
|
36741
36741
|
WHERE agent_id = ? AND content LIKE ?
|
|
36742
|
-
${params.since ? "AND COALESCE(updated_at, created_at) >= ?" : ""}
|
|
36743
|
-
${params.before ? "AND COALESCE(updated_at, created_at) <= ?" : ""}`,
|
|
36744
|
-
args: [params.agentId, like, ...
|
|
36742
|
+
${params.since ? "AND (julianday(COALESCE(updated_at, created_at)) >= julianday(?) OR julianday(COALESCE(updated_at, created_at)) < julianday(?))" : ""}
|
|
36743
|
+
${params.before ? "AND julianday(COALESCE(updated_at, created_at)) <= julianday(?)" : ""}`,
|
|
36744
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs]
|
|
36745
36745
|
});
|
|
36746
36746
|
}
|
|
36747
36747
|
if (params.kind === undefined || params.kind === "summary") {
|
|
@@ -36751,8 +36751,9 @@ function searchEpisodicSources(db, params) {
|
|
|
36751
36751
|
WHERE agent_id = ? AND depth = 0
|
|
36752
36752
|
AND COALESCE(source_type, 'summary') IN ('summary', 'compaction', 'checkpoint')
|
|
36753
36753
|
AND content LIKE ?
|
|
36754
|
-
${params.since ? "AND latest_at >= ?
|
|
36755
|
-
|
|
36754
|
+
${params.since ? "AND (julianday(latest_at) >= julianday(?) OR julianday(latest_at) < julianday(?))" : ""}
|
|
36755
|
+
${params.before ? "AND julianday(latest_at) <= julianday(?)" : ""}`,
|
|
36756
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs]
|
|
36756
36757
|
});
|
|
36757
36758
|
}
|
|
36758
36759
|
const union3 = branches.map((branch) => branch.sql).join(`
|
|
@@ -47369,6 +47370,23 @@ function up106(db) {
|
|
|
47369
47370
|
}
|
|
47370
47371
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_review_after ON memories(review_after);");
|
|
47371
47372
|
}
|
|
47373
|
+
function hasColumn18(db, table, column) {
|
|
47374
|
+
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
47375
|
+
}
|
|
47376
|
+
var TOKEN_COLUMNS = [
|
|
47377
|
+
["tokens_input", "INTEGER"],
|
|
47378
|
+
["tokens_output", "INTEGER"],
|
|
47379
|
+
["tokens_cache_read", "INTEGER"],
|
|
47380
|
+
["tokens_cache_write", "INTEGER"],
|
|
47381
|
+
["tokens_cost", "REAL"]
|
|
47382
|
+
];
|
|
47383
|
+
function up107(db) {
|
|
47384
|
+
for (const [column, type] of TOKEN_COLUMNS) {
|
|
47385
|
+
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
47386
|
+
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
47387
|
+
}
|
|
47388
|
+
}
|
|
47389
|
+
}
|
|
47372
47390
|
var MIGRATIONS = [
|
|
47373
47391
|
{
|
|
47374
47392
|
version: 1,
|
|
@@ -48209,6 +48227,20 @@ var MIGRATIONS = [
|
|
|
48209
48227
|
artifacts: {
|
|
48210
48228
|
columns: [{ table: "memories", column: "review_after" }]
|
|
48211
48229
|
}
|
|
48230
|
+
},
|
|
48231
|
+
{
|
|
48232
|
+
version: 107,
|
|
48233
|
+
name: "dreaming-pass-usage",
|
|
48234
|
+
up: up107,
|
|
48235
|
+
artifacts: {
|
|
48236
|
+
columns: [
|
|
48237
|
+
{ table: "dreaming_passes", column: "tokens_input" },
|
|
48238
|
+
{ table: "dreaming_passes", column: "tokens_output" },
|
|
48239
|
+
{ table: "dreaming_passes", column: "tokens_cache_read" },
|
|
48240
|
+
{ table: "dreaming_passes", column: "tokens_cache_write" },
|
|
48241
|
+
{ table: "dreaming_passes", column: "tokens_cost" }
|
|
48242
|
+
]
|
|
48243
|
+
}
|
|
48212
48244
|
}
|
|
48213
48245
|
];
|
|
48214
48246
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -49359,6 +49391,7 @@ function truncateToTokens(text, limit) {
|
|
|
49359
49391
|
}
|
|
49360
49392
|
|
|
49361
49393
|
// ../../platform/daemon/src/pipeline/dreaming.ts
|
|
49394
|
+
var EVIDENCE_WATERMARK_FLOOR_MS = Date.parse(EPISODIC_CAPTURED_AT_FLOOR);
|
|
49362
49395
|
var FAILURE_BACKOFF_BASE_MS = 5 * 60 * 1000;
|
|
49363
49396
|
var DREAMING_HALT_COOLDOWN_MS = 24 * 60 * 60 * 1000;
|
|
49364
49397
|
|
|
@@ -53193,6 +53226,14 @@ function boundedText(value, maxChars) {
|
|
|
53193
53226
|
return value;
|
|
53194
53227
|
return value.slice(0, maxChars);
|
|
53195
53228
|
}
|
|
53229
|
+
function readEvidenceWatermark(db, agentId) {
|
|
53230
|
+
try {
|
|
53231
|
+
const row = db.prepare("SELECT last_pass_at AS lastPassAt FROM dreaming_state WHERE agent_id = ?").get(agentId);
|
|
53232
|
+
return row?.lastPassAt ?? null;
|
|
53233
|
+
} catch {
|
|
53234
|
+
return null;
|
|
53235
|
+
}
|
|
53236
|
+
}
|
|
53196
53237
|
function evidenceExcerptStart(content, query, maxChars) {
|
|
53197
53238
|
const terms = query.toLowerCase().split(/\W+/).filter((term) => term.length >= 3).slice(0, 8);
|
|
53198
53239
|
const lower = content.toLowerCase();
|
|
@@ -53425,7 +53466,7 @@ function createDreamingCapabilities(params) {
|
|
|
53425
53466
|
}
|
|
53426
53467
|
return { ok: true, result: getOntologyLinkEvidence(accessor, { agentId: scopeId, id: ref3.id }) };
|
|
53427
53468
|
}),
|
|
53428
|
-
capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, transcripts, and summaries in one agent scope. Results contain exact bounded excerpts of the rendered evidence with contentOffset/contentLength; use sourceRef for citations, which are validated against the complete canonical source. Each record carries completed: memory, artifact, and summary records are settled captures (true); a transcript is true once a session-end summary job has been triggered for its session (the session ended), whether or not the summary itself landed, and false while the session is still running — do not file claims from a still-growing transcript, since its states may be contradicted by the session's end. If contentTruncated is true, page exact fragments with the same sourceRef and chunkSize: start at offset=0 when contentHasPrevious is true, then use offset=contentOffset+content.length from the fragment just returned until contentHasNext is false. Omit the query to list the
|
|
53469
|
+
capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, transcripts, and summaries in one agent scope. Results contain exact bounded excerpts of the rendered evidence with contentOffset/contentLength; use sourceRef for citations, which are validated against the complete canonical source. Each record carries completed: memory, artifact, and summary records are settled captures (true); a transcript is true once a session-end summary job has been triggered for its session (the session ended), whether or not the summary itself landed, and false while the session is still running — do not file claims from a still-growing transcript, since its states may be contradicted by the session's end. If contentTruncated is true, page exact fragments with the same sourceRef and chunkSize: start at offset=0 when contentHasPrevious is true, then use offset=contentOffset+content.length from the fragment just returned until contentHasNext is false. Omit the query AND since to list the unprocessed window: the listing starts at the scope's evidence watermark (the last pass's surfaced frontier), so the newest unseen sources come first. Narrow with a query if the list is large; pass an explicit earlier since only when you need older history. Artifacts are deduped by content hash: content-identical files across vault paths collapse to one canonical entry.", true, exports_external.object({
|
|
53429
53470
|
agentId: exports_external.string().min(1),
|
|
53430
53471
|
query: exports_external.string().optional(),
|
|
53431
53472
|
since: exports_external.string().optional(),
|
|
@@ -53443,10 +53484,11 @@ function createDreamingCapabilities(params) {
|
|
|
53443
53484
|
const fragment = projectEvidenceFragment(source, Math.max(0, Math.floor(offset ?? 0)), Math.min(Math.max(Math.floor(chunkSize ?? MAX_EVIDENCE_EXCERPT_CHARS), 1), MAX_EVIDENCE_EXCERPT_CHARS));
|
|
53444
53485
|
return fragment === null ? { ok: false, error: "Evidence fragment offset is outside the source" } : { ok: true, items: [fragment] };
|
|
53445
53486
|
}
|
|
53487
|
+
const effectiveSince = since ?? readEvidenceWatermark(db, scopeId);
|
|
53446
53488
|
const sources = searchEpisodicSources(db, {
|
|
53447
53489
|
agentId: scopeId,
|
|
53448
53490
|
query: query ?? "",
|
|
53449
|
-
since,
|
|
53491
|
+
since: effectiveSince ?? undefined,
|
|
53450
53492
|
before,
|
|
53451
53493
|
kind,
|
|
53452
53494
|
limit
|
package/native-manifest.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.168.0",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
9
|
-
"size":
|
|
8
|
+
"sha256": "736f1afe8024274127409fc99f12b912e138b2b869aae7fff7ce3fe35b26d0cd",
|
|
9
|
+
"size": 116995360
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
15
|
-
"size":
|
|
14
|
+
"sha256": "10c1502f4ccfbc959bc403b709ef1f4fbda23c207e48fd987b8b5282cc12bb70",
|
|
15
|
+
"size": 121621056
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "1a3c0301b616d145c87a0c52c9ccd1b393e02f01075b3fd5d796b2964217fd42",
|
|
21
|
+
"size": 154234480
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "6908c39caa7d3a752a50bbb61f6500d784848c27268193ea5cf0ea65ee5b93de",
|
|
27
|
+
"size": 154793465
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "bfe5abdbd9e0f8fb166a60a905fee897d48d8812c1594f0284d25755bf85b9bb",
|
|
33
|
+
"size": 170926592
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.
|
|
39
|
-
"sha256": "
|
|
40
|
-
"size":
|
|
38
|
+
"url": "signet-connectors-0.168.0.tar.gz",
|
|
39
|
+
"sha256": "4c7b7ff1cd7de1d51e3131cd73e7d6ca3e635814a6810d21ffdd8dd32dac1789",
|
|
40
|
+
"size": 16242
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.168.0",
|
|
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.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.168.0/signetai-darwin-arm64-0.168.0.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.168.0/signetai-darwin-x64-0.168.0.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.168.0/signetai-linux-arm64-0.168.0.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.168.0/signetai-linux-x64-0.168.0.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.168.0/signetai-win32-x64-0.168.0.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|