signetai 0.166.0 → 0.167.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 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 timeArgs = [];
36703
- if (params.since !== undefined)
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 >= ?" : ""} ${params.before ? "AND created_at <= ?" : ""}`,
36716
- args: [params.agentId, like, ...timeArgs]
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 >= ?" : ""} ${params.before ? "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, ...timeArgs]
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, ...timeArgs]
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 >= ?" : ""} ${params.before ? "AND latest_at <= ?" : ""}`,
36755
- args: [params.agentId, like, ...timeArgs]
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(`
@@ -49359,6 +49360,7 @@ function truncateToTokens(text, limit) {
49359
49360
  }
49360
49361
 
49361
49362
  // ../../platform/daemon/src/pipeline/dreaming.ts
49363
+ var EVIDENCE_WATERMARK_FLOOR_MS = Date.parse(EPISODIC_CAPTURED_AT_FLOOR);
49362
49364
  var FAILURE_BACKOFF_BASE_MS = 5 * 60 * 1000;
49363
49365
  var DREAMING_HALT_COOLDOWN_MS = 24 * 60 * 60 * 1000;
49364
49366
 
@@ -53193,6 +53195,14 @@ function boundedText(value, maxChars) {
53193
53195
  return value;
53194
53196
  return value.slice(0, maxChars);
53195
53197
  }
53198
+ function readEvidenceWatermark(db, agentId) {
53199
+ try {
53200
+ const row = db.prepare("SELECT last_pass_at AS lastPassAt FROM dreaming_state WHERE agent_id = ?").get(agentId);
53201
+ return row?.lastPassAt ?? null;
53202
+ } catch {
53203
+ return null;
53204
+ }
53205
+ }
53196
53206
  function evidenceExcerptStart(content, query, maxChars) {
53197
53207
  const terms = query.toLowerCase().split(/\W+/).filter((term) => term.length >= 3).slice(0, 8);
53198
53208
  const lower = content.toLowerCase();
@@ -53425,7 +53435,7 @@ function createDreamingCapabilities(params) {
53425
53435
  }
53426
53436
  return { ok: true, result: getOntologyLinkEvidence(accessor, { agentId: scopeId, id: ref3.id }) };
53427
53437
  }),
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 most recent sources (e.g. with since as a cutoff). Artifacts are deduped by content hash: content-identical files across vault paths collapse to one canonical entry.", true, exports_external.object({
53438
+ 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
53439
  agentId: exports_external.string().min(1),
53430
53440
  query: exports_external.string().optional(),
53431
53441
  since: exports_external.string().optional(),
@@ -53443,10 +53453,11 @@ function createDreamingCapabilities(params) {
53443
53453
  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
53454
  return fragment === null ? { ok: false, error: "Evidence fragment offset is outside the source" } : { ok: true, items: [fragment] };
53445
53455
  }
53456
+ const effectiveSince = since ?? readEvidenceWatermark(db, scopeId);
53446
53457
  const sources = searchEpisodicSources(db, {
53447
53458
  agentId: scopeId,
53448
53459
  query: query ?? "",
53449
- since,
53460
+ since: effectiveSince ?? undefined,
53450
53461
  before,
53451
53462
  kind,
53452
53463
  limit
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.166.0",
3
+ "version": "0.167.0",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "155b6a8c4d9af1904f3593cb30e9325aeffc6274f45cac63ba31e6a31d1f5205",
9
- "size": 116945824
8
+ "sha256": "9873f32416ca55b9759d8470cfe5a074f4d91084bdd927f71be47f6c442611ba",
9
+ "size": 116962336
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "106507b237601bf0e55c682756ac16c686c693e452f5642457f96b8464a59a4b",
15
- "size": 121571904
14
+ "sha256": "1d48388b93a7c87d042176c0671240b7e0782e54e98c9c0eed1301e55c0e94c8",
15
+ "size": 121588288
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "ce016781de96917962c4388fd278f21125e8ec27faac8cd0bbe746c1577bf891",
21
- "size": 154190762
20
+ "sha256": "5b226210a175550fa16f929e1cd488563460092e1799e90d8a2cfec19478dfc1",
21
+ "size": 154208710
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "259426f4e14fffd27d296ecbb40779d85909bc77b4feed11af2fd95f5799c2d7",
27
- "size": 154749747
26
+ "sha256": "fde3e639c5c5e2a8c4b059d1792641ab9853a4d76340a24f9b391a1bf194abf4",
27
+ "size": 154767695
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "16f90b1a518e3f9a0631eb0bd722ed69f37a80d4a916e51cefc157aeb19215bf",
33
- "size": 170883072
32
+ "sha256": "1b29614c6ab3f35cb0c5d8b582a68d7da15ce9371b93a0c1b796d41e48d6f616",
33
+ "size": 170900992
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.166.0.tar.gz",
39
- "sha256": "e2050e9c1d4078a715b144762cfe50dfeb719311c07812ec489eeab7f9bc7ed9",
40
- "size": 16093
38
+ "url": "signet-connectors-0.167.0.tar.gz",
39
+ "sha256": "ad0d2bba53e73dde4705fb5150ccc87a8b75bcdf8f71ab19bad2db45f373cdf9",
40
+ "size": 16250
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.166.0",
3
+ "version": "0.167.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.166.0/signetai-darwin-arm64-0.166.0.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.166.0/signetai-darwin-x64-0.166.0.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.166.0/signetai-linux-arm64-0.166.0.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.166.0/signetai-linux-x64-0.166.0.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.166.0/signetai-win32-x64-0.166.0.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.167.0/signetai-darwin-arm64-0.167.0.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.167.0/signetai-darwin-x64-0.167.0.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.167.0/signetai-linux-arm64-0.167.0.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.167.0/signetai-linux-x64-0.167.0.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.167.0/signetai-win32-x64-0.167.0.tgz"
73
73
  }
74
74
  }