signetai 0.199.0 → 0.199.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/dist/mcp-stdio.js +179 -16
- package/native-manifest.json +14 -14
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -40896,6 +40896,29 @@ function up130(db) {
|
|
|
40896
40896
|
END;
|
|
40897
40897
|
`);
|
|
40898
40898
|
}
|
|
40899
|
+
function up131(db) {
|
|
40900
|
+
db.exec(`
|
|
40901
|
+
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
40902
|
+
agent_id TEXT NOT NULL,
|
|
40903
|
+
source_kind TEXT NOT NULL CHECK (source_kind IN ('memory', 'artifact', 'transcript', 'summary')),
|
|
40904
|
+
source_id TEXT NOT NULL,
|
|
40905
|
+
source_captured_at TEXT NOT NULL,
|
|
40906
|
+
source_entry_id TEXT NOT NULL DEFAULT '',
|
|
40907
|
+
source_revision TEXT NOT NULL,
|
|
40908
|
+
delivered_offset INTEGER NOT NULL CHECK (delivered_offset >= 0),
|
|
40909
|
+
source_length INTEGER NOT NULL CHECK (source_length >= 0),
|
|
40910
|
+
pass_id TEXT NOT NULL,
|
|
40911
|
+
updated_at TEXT NOT NULL,
|
|
40912
|
+
PRIMARY KEY (agent_id, source_kind, source_id, source_captured_at, source_entry_id, source_revision)
|
|
40913
|
+
);
|
|
40914
|
+
CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_consumption_source
|
|
40915
|
+
ON dreaming_evidence_consumption(agent_id, source_entry_id, source_kind, source_revision);
|
|
40916
|
+
CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_consumption_pending
|
|
40917
|
+
ON dreaming_evidence_consumption(agent_id, source_kind, source_id, source_captured_at, source_revision, delivered_offset, source_length);
|
|
40918
|
+
CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_consumption_continuation
|
|
40919
|
+
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
40920
|
+
`);
|
|
40921
|
+
}
|
|
40899
40922
|
var MIGRATIONS = [
|
|
40900
40923
|
{
|
|
40901
40924
|
version: 1,
|
|
@@ -41938,6 +41961,12 @@ var MIGRATIONS = [
|
|
|
41938
41961
|
name: "embedding-repair-state",
|
|
41939
41962
|
up: up130,
|
|
41940
41963
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
41964
|
+
},
|
|
41965
|
+
{
|
|
41966
|
+
version: 131,
|
|
41967
|
+
name: "dreaming-evidence-consumption",
|
|
41968
|
+
up: up131,
|
|
41969
|
+
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
41941
41970
|
}
|
|
41942
41971
|
];
|
|
41943
41972
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -43268,7 +43297,7 @@ function readEpisodicMemory(db, agentId, id) {
|
|
|
43268
43297
|
function readEpisodicArtifact(db, agentId, id) {
|
|
43269
43298
|
const ids = sourceIdCandidates(id);
|
|
43270
43299
|
const placeholders = ids.map(() => "?").join(", ");
|
|
43271
|
-
const row = db.prepare(`SELECT source_path, source_kind, source_id, source_node_id, session_id, session_key, session_token,
|
|
43300
|
+
const row = db.prepare(`SELECT source_path, source_sha256, source_kind, source_id, source_node_id, session_id, session_key, session_token,
|
|
43272
43301
|
project, harness, content, captured_at, updated_at
|
|
43273
43302
|
FROM memory_artifacts
|
|
43274
43303
|
WHERE agent_id = ?
|
|
@@ -43294,6 +43323,7 @@ function readEpisodicArtifact(db, agentId, id) {
|
|
|
43294
43323
|
sourceKind: row.source_kind,
|
|
43295
43324
|
sourceId: row.source_node_id ?? row.session_key ?? row.session_id ?? row.session_token,
|
|
43296
43325
|
sourceEntryId: readNonEmptyTrimmed(row.source_id),
|
|
43326
|
+
sourceRevision: readNonEmptyTrimmed(row.source_sha256) ?? row.captured_at ?? row.updated_at,
|
|
43297
43327
|
sourcePath: row.source_path,
|
|
43298
43328
|
project: row.project,
|
|
43299
43329
|
harness: row.harness,
|
|
@@ -43463,6 +43493,15 @@ function searchEpisodicSources(db, params) {
|
|
|
43463
43493
|
const like = `%${query}%`;
|
|
43464
43494
|
const sinceArgs = params.since !== undefined ? [params.since, EPISODIC_CAPTURED_AT_FLOOR] : [];
|
|
43465
43495
|
const beforeArgs = params.before !== undefined ? [params.before] : [];
|
|
43496
|
+
const deliveredFilterEnabled = params.excludeDelivered === true && db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_evidence_consumption'").get() != null;
|
|
43497
|
+
const deliveredPredicate = (kind, id, capturedAt, sourceEntryId, sourceRevision) => deliveredFilterEnabled ? `AND NOT EXISTS (
|
|
43498
|
+
SELECT 1 FROM dreaming_evidence_consumption dec
|
|
43499
|
+
WHERE dec.agent_id = ? AND dec.source_kind = '${kind}' AND dec.source_id = ${id}
|
|
43500
|
+
AND dec.source_captured_at = ${capturedAt} AND dec.source_entry_id = ${sourceEntryId}
|
|
43501
|
+
AND dec.source_revision = ${sourceRevision}
|
|
43502
|
+
AND dec.delivered_offset >= dec.source_length
|
|
43503
|
+
)` : "";
|
|
43504
|
+
const deliveredArgs = deliveredFilterEnabled ? [params.agentId] : [];
|
|
43466
43505
|
const transcriptSearchTime = tableHasColumn(db, "session_transcripts", "updated_at") ? "COALESCE(updated_at, created_at)" : "created_at";
|
|
43467
43506
|
const transcriptCompleted = tableHasColumn(db, "session_transcripts", "completed_at") ? "completed_at IS NOT NULL" : "0";
|
|
43468
43507
|
const branches = [];
|
|
@@ -43474,8 +43513,9 @@ function searchEpisodicSources(db, params) {
|
|
|
43474
43513
|
AND COALESCE(is_deleted, 0) = 0 AND visibility != 'archived' AND scope IS NULL
|
|
43475
43514
|
AND COALESCE(type, '') != 'session_summary' AND content LIKE ?
|
|
43476
43515
|
${params.since ? "AND (julianday(created_at) >= julianday(?) OR julianday(created_at) < julianday(?))" : ""}
|
|
43477
|
-
${params.before ? "AND julianday(created_at) <= julianday(?)" : ""}
|
|
43478
|
-
|
|
43516
|
+
${params.before ? "AND julianday(created_at) <= julianday(?)" : ""}
|
|
43517
|
+
${deliveredPredicate("memory", "id", "created_at", "''", "created_at")}`,
|
|
43518
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs, ...deliveredArgs]
|
|
43479
43519
|
});
|
|
43480
43520
|
}
|
|
43481
43521
|
if (params.kind === undefined || params.kind === "artifact") {
|
|
@@ -43486,15 +43526,17 @@ function searchEpisodicSources(db, params) {
|
|
|
43486
43526
|
AND length(ma.content) > 0 AND ma.content LIKE ?
|
|
43487
43527
|
${params.since ? "AND (julianday(ma.captured_at) >= julianday(?) OR julianday(ma.captured_at) < julianday(?))" : ""}
|
|
43488
43528
|
${params.before ? "AND julianday(ma.captured_at) <= julianday(?)" : ""}
|
|
43529
|
+
${deliveredPredicate("artifact", "ma.source_path", "ma.captured_at", "COALESCE(ma.source_id, '')", "CASE WHEN ma.source_sha256 IS NULL OR ma.source_sha256 = '' THEN ma.captured_at ELSE ma.source_sha256 END")}
|
|
43489
43530
|
AND (ma.source_sha256 IS NULL OR ma.source_sha256 = ''
|
|
43490
43531
|
OR (ma.agent_id, ma.source_path) = (
|
|
43491
43532
|
SELECT ma2.agent_id, ma2.source_path FROM memory_artifacts ma2
|
|
43492
43533
|
WHERE ma2.agent_id = ma.agent_id AND COALESCE(ma2.is_deleted, 0) = 0
|
|
43493
43534
|
AND ma2.source_sha256 = ma.source_sha256
|
|
43535
|
+
AND COALESCE(ma2.source_id, '') = COALESCE(ma.source_id, '')
|
|
43494
43536
|
ORDER BY ma2.captured_at DESC, ma2.source_path ASC
|
|
43495
43537
|
LIMIT 1
|
|
43496
43538
|
))`,
|
|
43497
|
-
args: [params.agentId, like, ...sinceArgs, ...beforeArgs]
|
|
43539
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs, ...deliveredArgs]
|
|
43498
43540
|
});
|
|
43499
43541
|
}
|
|
43500
43542
|
if (params.kind === undefined || params.kind === "transcript") {
|
|
@@ -43503,8 +43545,9 @@ function searchEpisodicSources(db, params) {
|
|
|
43503
43545
|
FROM session_transcripts
|
|
43504
43546
|
WHERE agent_id = ? AND ${transcriptCompleted} AND content LIKE ?
|
|
43505
43547
|
${params.since ? `AND (julianday(${transcriptSearchTime}) >= julianday(?) OR julianday(${transcriptSearchTime}) < julianday(?))` : ""}
|
|
43506
|
-
${params.before ? `AND julianday(${transcriptSearchTime}) <= julianday(?)` : ""}
|
|
43507
|
-
|
|
43548
|
+
${params.before ? `AND julianday(${transcriptSearchTime}) <= julianday(?)` : ""}
|
|
43549
|
+
${deliveredPredicate("transcript", "session_key", transcriptSearchTime, "''", transcriptSearchTime)}`,
|
|
43550
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs, ...deliveredArgs]
|
|
43508
43551
|
});
|
|
43509
43552
|
}
|
|
43510
43553
|
if (params.kind === "summary") {
|
|
@@ -43515,8 +43558,9 @@ function searchEpisodicSources(db, params) {
|
|
|
43515
43558
|
AND COALESCE(source_type, 'summary') IN ('summary', 'compaction', 'checkpoint')
|
|
43516
43559
|
AND content LIKE ?
|
|
43517
43560
|
${params.since ? "AND (julianday(latest_at) >= julianday(?) OR julianday(latest_at) < julianday(?))" : ""}
|
|
43518
|
-
${params.before ? "AND julianday(latest_at) <= julianday(?)" : ""}
|
|
43519
|
-
|
|
43561
|
+
${params.before ? "AND julianday(latest_at) <= julianday(?)" : ""}
|
|
43562
|
+
${deliveredPredicate("summary", "id", "latest_at", "''", "latest_at")}`,
|
|
43563
|
+
args: [params.agentId, like, ...sinceArgs, ...beforeArgs, ...deliveredArgs]
|
|
43520
43564
|
});
|
|
43521
43565
|
}
|
|
43522
43566
|
const union3 = branches.map((branch) => branch.sql).join(`
|
|
@@ -44100,6 +44144,91 @@ function createDreamingAgentEvidence(evidence) {
|
|
|
44100
44144
|
});
|
|
44101
44145
|
}
|
|
44102
44146
|
|
|
44147
|
+
// ../../platform/daemon/src/pipeline/dreaming-evidence-consumption.ts
|
|
44148
|
+
function tableExists6(db, table) {
|
|
44149
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
44150
|
+
}
|
|
44151
|
+
function tableHasColumn2(db, table, column) {
|
|
44152
|
+
try {
|
|
44153
|
+
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
44154
|
+
return rows.some((row) => row.name === column);
|
|
44155
|
+
} catch {
|
|
44156
|
+
return false;
|
|
44157
|
+
}
|
|
44158
|
+
}
|
|
44159
|
+
function sourceIdentity(source) {
|
|
44160
|
+
return source.sourceEntryId ?? "";
|
|
44161
|
+
}
|
|
44162
|
+
function sourceRevision(source) {
|
|
44163
|
+
return source.sourceRevision ?? source.capturedAt;
|
|
44164
|
+
}
|
|
44165
|
+
function deliveredOffsetForSource(db, agentId, source) {
|
|
44166
|
+
if (!tableExists6(db, "dreaming_evidence_consumption"))
|
|
44167
|
+
return 0;
|
|
44168
|
+
const row = db.prepare(`SELECT delivered_offset AS deliveredOffset FROM dreaming_evidence_consumption
|
|
44169
|
+
WHERE agent_id = ? AND source_kind = ? AND source_id = ? AND source_captured_at = ? AND source_entry_id = ? AND source_revision = ?`).get(agentId, source.kind, source.id, source.capturedAt, sourceIdentity(source), sourceRevision(source));
|
|
44170
|
+
return Math.max(0, row?.deliveredOffset ?? 0);
|
|
44171
|
+
}
|
|
44172
|
+
function pendingDreamingEvidenceContinuations(db, agentId, limit, kind) {
|
|
44173
|
+
if (!tableExists6(db, "dreaming_evidence_consumption"))
|
|
44174
|
+
return [];
|
|
44175
|
+
const boundedLimit = Math.min(Math.max(Math.floor(limit), 1), 50);
|
|
44176
|
+
const transcriptUpdatedAt = tableHasColumn2(db, "session_transcripts", "updated_at") ? "st.updated_at" : "NULL";
|
|
44177
|
+
const transcriptCompletedAt = tableHasColumn2(db, "session_transcripts", "completed_at") ? "st.completed_at" : "NULL";
|
|
44178
|
+
const transcriptRevision = `COALESCE(${transcriptCompletedAt}, ${transcriptUpdatedAt}, st.created_at)`;
|
|
44179
|
+
const rows = db.prepare(`SELECT dec.source_kind AS kind, dec.source_id AS id, dec.source_captured_at AS capturedAt,
|
|
44180
|
+
dec.source_entry_id AS sourceEntryId, dec.source_revision AS sourceRevision
|
|
44181
|
+
FROM dreaming_evidence_consumption dec
|
|
44182
|
+
INNER JOIN dreaming_passes pass ON pass.id = dec.pass_id AND pass.agent_id = dec.agent_id
|
|
44183
|
+
WHERE dec.agent_id = ?
|
|
44184
|
+
AND dec.delivered_offset > 0 AND dec.delivered_offset < dec.source_length
|
|
44185
|
+
AND (? IS NULL OR dec.source_kind = ?)
|
|
44186
|
+
AND (
|
|
44187
|
+
(dec.source_kind = 'memory' AND EXISTS (
|
|
44188
|
+
SELECT 1 FROM memories m
|
|
44189
|
+
WHERE m.agent_id = dec.agent_id AND m.id = dec.source_id
|
|
44190
|
+
AND m.memory_kind = 'episodic' AND COALESCE(m.is_deleted, 0) = 0
|
|
44191
|
+
AND m.visibility != 'archived' AND m.scope IS NULL
|
|
44192
|
+
AND COALESCE(m.type, '') != 'session_summary'
|
|
44193
|
+
AND dec.source_captured_at = m.created_at AND dec.source_entry_id = ''
|
|
44194
|
+
AND dec.source_revision = m.created_at
|
|
44195
|
+
))
|
|
44196
|
+
OR (dec.source_kind = 'artifact' AND EXISTS (
|
|
44197
|
+
SELECT 1 FROM memory_artifacts ma
|
|
44198
|
+
WHERE ma.agent_id = dec.agent_id AND ma.source_path = dec.source_id
|
|
44199
|
+
AND COALESCE(ma.is_deleted, 0) = 0 AND length(ma.content) > 0
|
|
44200
|
+
AND dec.source_captured_at = ma.captured_at
|
|
44201
|
+
AND dec.source_entry_id = COALESCE(ma.source_id, '')
|
|
44202
|
+
AND dec.source_revision = CASE
|
|
44203
|
+
WHEN ma.source_sha256 IS NULL OR ma.source_sha256 = '' THEN ma.captured_at
|
|
44204
|
+
ELSE ma.source_sha256
|
|
44205
|
+
END
|
|
44206
|
+
))
|
|
44207
|
+
OR (dec.source_kind = 'transcript' AND EXISTS (
|
|
44208
|
+
SELECT 1 FROM session_transcripts st
|
|
44209
|
+
WHERE st.agent_id = dec.agent_id AND st.session_key = dec.source_id
|
|
44210
|
+
AND dec.source_captured_at = ${transcriptRevision}
|
|
44211
|
+
AND dec.source_entry_id = '' AND dec.source_revision = ${transcriptRevision}
|
|
44212
|
+
))
|
|
44213
|
+
OR (dec.source_kind = 'summary' AND EXISTS (
|
|
44214
|
+
SELECT 1 FROM session_summaries ss
|
|
44215
|
+
WHERE ss.agent_id = dec.agent_id AND ss.id = dec.source_id
|
|
44216
|
+
AND ss.depth = 0
|
|
44217
|
+
AND COALESCE(ss.source_type, 'summary') IN ('summary', 'compaction', 'checkpoint')
|
|
44218
|
+
AND dec.source_captured_at = ss.latest_at
|
|
44219
|
+
AND dec.source_entry_id = '' AND dec.source_revision = ss.latest_at
|
|
44220
|
+
))
|
|
44221
|
+
)
|
|
44222
|
+
ORDER BY pass.rowid ASC, dec.source_kind ASC, dec.source_id ASC, dec.source_captured_at ASC
|
|
44223
|
+
LIMIT ?`).all(agentId, kind ?? null, kind ?? null, boundedLimit);
|
|
44224
|
+
return rows.flatMap((row) => {
|
|
44225
|
+
const source = readEpisodicSource(db, { agentId, from: `${row.kind}:${row.id}` });
|
|
44226
|
+
if (source === null || source.capturedAt !== row.capturedAt || sourceIdentity(source) !== row.sourceEntryId || sourceRevision(source) !== row.sourceRevision)
|
|
44227
|
+
return [];
|
|
44228
|
+
return [source];
|
|
44229
|
+
});
|
|
44230
|
+
}
|
|
44231
|
+
|
|
44103
44232
|
// ../../node_modules/.bun/js-tiktoken@1.0.21/node_modules/js-tiktoken/dist/chunk-VL2OQCWN.js
|
|
44104
44233
|
var import_base64_js = __toESM(require_base64_js(), 1);
|
|
44105
44234
|
var __defProp3 = Object.defineProperty;
|
|
@@ -48116,6 +48245,24 @@ function parseRecord(value) {
|
|
|
48116
48245
|
function parseTextList(value) {
|
|
48117
48246
|
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
48118
48247
|
}
|
|
48248
|
+
function parseDeferredEvidenceList(value) {
|
|
48249
|
+
if (!Array.isArray(value))
|
|
48250
|
+
return [];
|
|
48251
|
+
const entries = [];
|
|
48252
|
+
for (const item of value) {
|
|
48253
|
+
if (typeof item === "string") {
|
|
48254
|
+
entries.push(item);
|
|
48255
|
+
continue;
|
|
48256
|
+
}
|
|
48257
|
+
if (typeof item !== "object" || item === null || Array.isArray(item))
|
|
48258
|
+
continue;
|
|
48259
|
+
const entry = item;
|
|
48260
|
+
if (typeof entry.agentId === "string" && typeof entry.sourceRef === "string") {
|
|
48261
|
+
entries.push({ agentId: entry.agentId, sourceRef: entry.sourceRef });
|
|
48262
|
+
}
|
|
48263
|
+
}
|
|
48264
|
+
return entries;
|
|
48265
|
+
}
|
|
48119
48266
|
function parseRunbook(value) {
|
|
48120
48267
|
const row = parseRecord(value);
|
|
48121
48268
|
if (!row || typeof row.summary !== "string")
|
|
@@ -48123,7 +48270,8 @@ function parseRunbook(value) {
|
|
|
48123
48270
|
return {
|
|
48124
48271
|
summary: row.summary,
|
|
48125
48272
|
openQuestions: parseTextList(row.openQuestions),
|
|
48126
|
-
deferred: parseTextList(row.deferred)
|
|
48273
|
+
deferred: parseTextList(row.deferred),
|
|
48274
|
+
deferredEvidence: parseDeferredEvidenceList(row.deferredEvidence)
|
|
48127
48275
|
};
|
|
48128
48276
|
}
|
|
48129
48277
|
function parseEvidenceWindow(value) {
|
|
@@ -48362,6 +48510,7 @@ function projectEvidenceItem(source, content, contentOffset, contentLength) {
|
|
|
48362
48510
|
sourceId: source.sourceId,
|
|
48363
48511
|
sourcePath: source.sourcePath,
|
|
48364
48512
|
sourceEntryId: source.sourceEntryId,
|
|
48513
|
+
sourceRevision: source.sourceRevision ?? source.capturedAt,
|
|
48365
48514
|
project: source.project,
|
|
48366
48515
|
harness: source.harness,
|
|
48367
48516
|
capturedAt: source.capturedAt
|
|
@@ -48570,7 +48719,7 @@ function createDreamingCapabilities(params) {
|
|
|
48570
48719
|
}
|
|
48571
48720
|
return { ok: true, result: getOntologyLinkEvidence(accessor, { agentId: scopeId, id: ref3.id }) };
|
|
48572
48721
|
}),
|
|
48573
|
-
capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, and transcripts in one agent scope. Historical summary records can be requested explicitly with kind=summary, but are not part of the default Dreaming delivery path. 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 only after the session-end machinery writes its completion marker, 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
|
|
48722
|
+
capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, and transcripts in one agent scope. Historical summary records can be requested explicitly with kind=summary, but are not part of the default Dreaming delivery path. 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 only after the session-end machinery writes its completion marker, 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 query, since, and before to drain the durable delivery queue: it lists every incomplete source revision and resumes at its delivered offset, regardless of time watermark. 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({
|
|
48574
48723
|
agentId: exports_external.string().min(1),
|
|
48575
48724
|
query: exports_external.string().optional(),
|
|
48576
48725
|
since: exports_external.string().optional(),
|
|
@@ -48591,16 +48740,23 @@ function createDreamingCapabilities(params) {
|
|
|
48591
48740
|
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));
|
|
48592
48741
|
return fragment === null ? { ok: false, error: "Evidence fragment offset is outside the source" } : { ok: true, items: [fragment] };
|
|
48593
48742
|
}
|
|
48594
|
-
const
|
|
48595
|
-
const
|
|
48743
|
+
const scanFirst = query === undefined && since === undefined && before === undefined;
|
|
48744
|
+
const effectiveSince = scanFirst ? undefined : since ?? readEvidenceWatermark(db, scopeId) ?? undefined;
|
|
48745
|
+
const continuations = scanFirst ? pendingDreamingEvidenceContinuations(db, scopeId, limit ?? 20, kind) : [];
|
|
48746
|
+
const sources = continuations.length > 0 ? continuations : searchEpisodicSources(db, {
|
|
48596
48747
|
agentId: scopeId,
|
|
48597
48748
|
query: query ?? "",
|
|
48598
|
-
since: effectiveSince
|
|
48749
|
+
since: effectiveSince,
|
|
48599
48750
|
before,
|
|
48600
48751
|
kind,
|
|
48752
|
+
excludeDelivered: scanFirst,
|
|
48601
48753
|
limit
|
|
48602
48754
|
});
|
|
48603
|
-
|
|
48755
|
+
const items = scanFirst ? sources.flatMap((source) => {
|
|
48756
|
+
const fragment = projectEvidenceFragment(source, deliveredOffsetForSource(db, scopeId, source), MAX_EVIDENCE_EXCERPT_CHARS);
|
|
48757
|
+
return fragment === null ? [] : [fragment];
|
|
48758
|
+
}) : projectEvidence(sources, query ?? "");
|
|
48759
|
+
return { ok: true, items };
|
|
48604
48760
|
})),
|
|
48605
48761
|
capability("validate_proposal", "Validate proposal", "Run the daemon's deterministic pre-write guards in one pass for one agent scope: entity-label gate, duplicate-entity check, and/or contradiction check against active aspect values.", true, exports_external.object({
|
|
48606
48762
|
agentId: exports_external.string().min(1),
|
|
@@ -48656,10 +48812,17 @@ function createDreamingCapabilities(params) {
|
|
|
48656
48812
|
})
|
|
48657
48813
|
})),
|
|
48658
48814
|
capability("runbook_read", "Read Dreaming runbook", "Read recent scoped pass outcomes, evidence windows, quarantines, and structured runbook notes.", true, exports_external.object({ limit: exports_external.number().finite().optional() }), async ({ limit }) => ({ ok: true, items: readDreamingRunbook(accessor, agentId, bounded(limit, 5, 20)) })),
|
|
48659
|
-
capability("runbook_write", "Write Dreaming runbook", "Before finishing a Dreaming pass, store one short structured note for future passes to review.", false, exports_external.object({
|
|
48815
|
+
capability("runbook_write", "Write Dreaming runbook", "Before finishing a Dreaming pass, store one short structured note for future passes to review. Deferred evidence in another scope must include its agentId.", false, exports_external.object({
|
|
48660
48816
|
summary: exports_external.string().trim().min(1).max(2000),
|
|
48661
48817
|
openQuestions: exports_external.array(exports_external.string().trim().min(1).max(500)).max(20).default([]),
|
|
48662
|
-
deferred: exports_external.array(exports_external.string().trim().min(1).max(500)).max(20).default([])
|
|
48818
|
+
deferred: exports_external.array(exports_external.string().trim().min(1).max(500)).max(20).default([]),
|
|
48819
|
+
deferredEvidence: exports_external.array(exports_external.union([
|
|
48820
|
+
exports_external.string().regex(/^(memory|artifact|transcript|summary):.+$/),
|
|
48821
|
+
exports_external.object({
|
|
48822
|
+
agentId: exports_external.string().trim().min(1),
|
|
48823
|
+
sourceRef: exports_external.string().regex(/^(memory|artifact|transcript|summary):.+$/)
|
|
48824
|
+
})
|
|
48825
|
+
])).max(20).default([])
|
|
48663
48826
|
}), async (entry) => {
|
|
48664
48827
|
if (!params.passId)
|
|
48665
48828
|
return { ok: false, error: "Runbook writes require a live Dreaming pass" };
|
package/native-manifest.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.199.
|
|
3
|
+
"version": "0.199.1",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
9
|
-
"size":
|
|
8
|
+
"sha256": "3318cdc47c5c2b7ab0c383fba202133ef2245526c8c177cf7331019083bcb170",
|
|
9
|
+
"size": 125218336
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
15
|
-
"size":
|
|
14
|
+
"sha256": "6c869689f7c48db42622ff7328928d08f13ff65b87d3e8be4e8e81e755c4d718",
|
|
15
|
+
"size": 130206272
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "cf12e274b871e2091449163b63f0998353f4fcbb856a496d93f9ae0bb78f7526",
|
|
21
|
+
"size": 169772708
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "ebf7c3ab73c46b6aa186e8d510b68d97df671f345e7e6cfe548e405477763ada",
|
|
27
|
+
"size": 172147290
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "ac6486fea32dc1391b11300c0957a1d8ea44fac32c0eabb7c2b4fd4a796726db",
|
|
33
|
+
"size": 180273664
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.199.
|
|
39
|
-
"sha256": "
|
|
40
|
-
"size":
|
|
38
|
+
"url": "signet-connectors-0.199.1.tar.gz",
|
|
39
|
+
"sha256": "79348a9f0e1f35b37f2ddf3759b2f110edda1f630f5d8bfbf6327725bf210bd6",
|
|
40
|
+
"size": 21672
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.199.
|
|
3
|
+
"version": "0.199.1",
|
|
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.199.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.1/signetai-darwin-arm64-0.199.1.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.1/signetai-darwin-x64-0.199.1.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.1/signetai-linux-arm64-0.199.1.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.1/signetai-linux-x64-0.199.1.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.199.1/signetai-win32-x64-0.199.1.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|