signetai 0.160.0 → 0.161.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
@@ -53750,6 +53750,27 @@ function getDreamingAttentionScoped(accessor, agentId, options3) {
53750
53750
  }));
53751
53751
  });
53752
53752
  }
53753
+ function getDreamingAttentionAcrossScopes(accessor, options3) {
53754
+ const boundedLimit = Math.max(1, Math.min(Math.floor(options3.limit ?? 50), 200));
53755
+ const kindFilter = typeof options3.kind === "string" && options3.kind.length > 0 ? "AND kind = ?" : "";
53756
+ const statusFilter = options3.status === "resolved" ? "AND resolved_at IS NOT NULL" : "AND resolved_at IS NULL";
53757
+ const params = [];
53758
+ if (kindFilter)
53759
+ params.push(options3.kind);
53760
+ params.push(boundedLimit);
53761
+ return accessor.withReadDb((db) => {
53762
+ const rows = db.prepare(`SELECT agent_id AS agentId, id, kind, subject_ref AS subjectRef, details_json AS detailsJson,
53763
+ priority, created_at AS createdAt
53764
+ FROM dreaming_attention
53765
+ WHERE 1=1 ${kindFilter} ${statusFilter}
53766
+ ORDER BY priority DESC, created_at ASC, id ASC
53767
+ LIMIT ?`).all(...params);
53768
+ return rows.map(({ detailsJson, ...attention }) => ({
53769
+ ...attention,
53770
+ details: parseDetails(detailsJson)
53771
+ }));
53772
+ });
53773
+ }
53753
53774
  function getDreamingAttentionById(accessor, input) {
53754
53775
  return accessor.withReadDb((db) => {
53755
53776
  const row = db.prepare(`SELECT id, kind, subject_ref AS subjectRef, details_json AS detailsJson, priority, created_at AS createdAt
@@ -54651,7 +54672,7 @@ var auditMutationQueues = new Map;
54651
54672
  var DEFAULT_DREAMING = {
54652
54673
  tokenThreshold: 1e5,
54653
54674
  maxInterval: 6 * 60 * 60 * 1000,
54654
- timeout: 300000,
54675
+ timeout: 600000,
54655
54676
  maxInputTokens: 128000,
54656
54677
  maxOutputTokens: 16000,
54657
54678
  backfillOnFirstRun: true
@@ -57042,7 +57063,7 @@ var DREAMING_OPERATION_IDS = [
57042
57063
  ];
57043
57064
  var operationBase = {
57044
57065
  reason: exports_external.string().optional(),
57045
- evidence: exports_external.array(exports_external.unknown()).describe("Content-bearing ops only: exact-quote citations from canonical episodic evidence, each {quote, source_ref}.").optional(),
57066
+ evidence: exports_external.array(exports_external.unknown()).describe('Content-bearing ops only: exact-quote citations from canonical episodic evidence, each {quote, source_ref} where source_ref is "kind:id" (e.g. transcript:abc) as returned by search_evidence.').optional(),
57046
57067
  provenance: exports_external.string().min(1).describe('Hygiene ops only: "attention:$<index>" referencing a flag op earlier in the same batch, or "attention:<uuid>" from a prior batch.').optional(),
57047
57068
  confidence: exports_external.number().finite().min(0).max(1).optional(),
57048
57069
  risk: exports_external.string().nullable().optional()
@@ -57089,7 +57110,16 @@ function citationRecord(value) {
57089
57110
  const sourceId = typeof citation.source_id === "string" ? citation.source_id.trim() : "";
57090
57111
  const sourcePath = typeof citation.source_path === "string" ? citation.source_path.trim() : null;
57091
57112
  const quote = typeof citation.quote === "string" ? citation.quote.trim() : "";
57092
- return sourceRef && sourceKind && sourceId && quote ? { sourceRef, sourceKind, sourceId, sourcePath, quote } : null;
57113
+ let kind = sourceKind;
57114
+ let id = sourceId;
57115
+ const colon = sourceRef.indexOf(":");
57116
+ if (colon > 0) {
57117
+ if (!kind)
57118
+ kind = sourceRef.slice(0, colon);
57119
+ if (!id)
57120
+ id = sourceRef.slice(colon + 1);
57121
+ }
57122
+ return sourceRef && kind && id && quote ? { sourceRef, sourceKind: kind, sourceId: id, sourcePath, quote } : null;
57093
57123
  }
57094
57124
  function citeEvidence(accessor, agentId, citation) {
57095
57125
  const requested = citationRecord(citation);
@@ -57603,10 +57633,15 @@ function capability(id, title, description, readOnly, inputSchema, run) {
57603
57633
  function createDreamingCapabilities(params) {
57604
57634
  const { accessor, agentId, actor } = params;
57605
57635
  return [
57606
- capability("search_entities", "Search entities", "Search the scoped knowledge graph by entity name fragment and optional type.", true, exports_external.object({ query: exports_external.string().optional(), type: exports_external.string().optional(), ...pagination }), async ({ query, type, limit, offset }) => ({
57636
+ capability("search_entities", "Search entities", "Search the knowledge graph for one agent scope by entity name fragment and optional type. Pass the agentId of the scope you are addressing.", true, exports_external.object({
57637
+ agentId: exports_external.string().min(1),
57638
+ query: exports_external.string().optional(),
57639
+ type: exports_external.string().optional(),
57640
+ ...pagination
57641
+ }), async ({ agentId: scopeId, query, type, limit, offset }) => ({
57607
57642
  ok: true,
57608
57643
  items: listKnowledgeEntities(accessor, {
57609
- agentId,
57644
+ agentId: scopeId,
57610
57645
  query,
57611
57646
  type,
57612
57647
  limit: bounded(limit, 20, 100),
@@ -57622,12 +57657,13 @@ function createDreamingCapabilities(params) {
57622
57657
  dependencyCount: item.dependencyCount
57623
57658
  }))
57624
57659
  })),
57625
- capability("get_entity", "Get entity detail", "Fetch one scoped entity with attribute/constraint counts and pinned status, optionally hydrated with its aspect claims and/or dependency links in the same call.", true, exports_external.object({
57660
+ capability("get_entity", "Get entity detail", "Fetch one entity in one agent scope with attribute/constraint counts and pinned status, optionally hydrated with its aspect claims and/or dependency links in the same call.", true, exports_external.object({
57661
+ agentId: exports_external.string().min(1),
57626
57662
  entityId: exports_external.string().min(1),
57627
57663
  include: exports_external.array(exports_external.enum(["aspects", "links"])).optional(),
57628
57664
  direction: exports_external.enum(["incoming", "outgoing", "both"]).optional()
57629
- }), async ({ entityId: entityId2, include, direction }) => {
57630
- const detail = getKnowledgeEntityDetail(accessor, entityId2, agentId);
57665
+ }), async ({ agentId: scopeId, entityId: entityId2, include, direction }) => {
57666
+ const detail = getKnowledgeEntityDetail(accessor, entityId2, scopeId);
57631
57667
  if (!detail)
57632
57668
  return { ok: false, error: "Entity not found" };
57633
57669
  const result = {
@@ -57640,7 +57676,7 @@ function createDreamingCapabilities(params) {
57640
57676
  dependencyCount: detail.dependencyCount
57641
57677
  };
57642
57678
  if (include?.includes("aspects")) {
57643
- result.aspects = getEntityAspectsWithCounts(accessor, entityId2, agentId).map((aspect) => ({
57679
+ result.aspects = getEntityAspectsWithCounts(accessor, entityId2, scopeId).map((aspect) => ({
57644
57680
  id: aspect.aspect.id,
57645
57681
  name: aspect.aspect.name,
57646
57682
  attributeCount: aspect.attributeCount,
@@ -57650,29 +57686,34 @@ function createDreamingCapabilities(params) {
57650
57686
  if (include?.includes("links")) {
57651
57687
  result.links = getEntityDependenciesDetailed(accessor, {
57652
57688
  entityId: entityId2,
57653
- agentId,
57689
+ agentId: scopeId,
57654
57690
  direction: direction ?? "both"
57655
57691
  });
57656
57692
  }
57657
57693
  return result;
57658
57694
  }),
57659
- capability("list_aspect_claims", "List aspect claims", "List active claim attributes for one scoped entity aspect by stable ids.", true, exports_external.object({ entityId: exports_external.string().min(1), aspectId: exports_external.string().min(1), ...pagination }), async ({ entityId: entityId2, aspectId: aspectId2, limit, offset }) => ({
57695
+ capability("list_aspect_claims", "List aspect claims", "List active claim attributes for one entity aspect in one agent scope by stable ids.", true, exports_external.object({ agentId: exports_external.string().min(1), entityId: exports_external.string().min(1), aspectId: exports_external.string().min(1), ...pagination }), async ({ agentId: scopeId, entityId: entityId2, aspectId: aspectId2, limit, offset }) => ({
57660
57696
  ok: true,
57661
57697
  items: getAttributesForAspectFiltered(accessor, {
57662
57698
  entityId: entityId2,
57663
57699
  aspectId: aspectId2,
57664
- agentId,
57700
+ agentId: scopeId,
57665
57701
  kind: "attribute",
57666
57702
  status: "active",
57667
57703
  limit: bounded(limit, 50, 200),
57668
57704
  offset: Math.max(0, Math.floor(offset ?? 0))
57669
57705
  })
57670
57706
  })),
57671
- capability("walk_links", "Walk dependency links", "Walk incoming and/or outgoing scoped dependency links for an entity.", true, exports_external.object({ entityId: exports_external.string().min(1), direction: exports_external.enum(["incoming", "outgoing", "both"]).optional() }), async ({ entityId: entityId2, direction }) => ({
57707
+ capability("walk_links", "Walk dependency links", "Walk incoming and/or outgoing dependency links for an entity in one agent scope.", true, exports_external.object({
57708
+ agentId: exports_external.string().min(1),
57709
+ entityId: exports_external.string().min(1),
57710
+ direction: exports_external.enum(["incoming", "outgoing", "both"]).optional()
57711
+ }), async ({ agentId: scopeId, entityId: entityId2, direction }) => ({
57672
57712
  ok: true,
57673
- items: getEntityDependenciesDetailed(accessor, { entityId: entityId2, agentId, direction: direction ?? "both" })
57713
+ items: getEntityDependenciesDetailed(accessor, { entityId: entityId2, agentId: scopeId, direction: direction ?? "both" })
57674
57714
  })),
57675
- capability("get_evidence", "Get evidence", "Resolve provenance for a scoped claim path or a scoped dependency link by stable id.", true, exports_external.object({
57715
+ capability("get_evidence", "Get evidence", "Resolve provenance for a claim path in one agent scope (entity/aspect by stable id or name) or a dependency link by stable id.", true, exports_external.object({
57716
+ agentId: exports_external.string().min(1),
57676
57717
  ref: exports_external.union([
57677
57718
  exports_external.object({
57678
57719
  type: exports_external.literal("claim"),
@@ -57684,14 +57725,23 @@ function createDreamingCapabilities(params) {
57684
57725
  exports_external.object({ type: exports_external.literal("link"), id: exports_external.string().min(1) })
57685
57726
  ]),
57686
57727
  ...pagination
57687
- }), async ({ ref: ref3, limit, offset }) => {
57728
+ }), async ({ agentId: scopeId, ref: ref3, limit, offset }) => {
57688
57729
  if (ref3.type === "claim") {
57730
+ let entityName2 = ref3.entity;
57731
+ let aspectName2 = ref3.aspect;
57732
+ const detail = getKnowledgeEntityDetail(accessor, ref3.entity, scopeId);
57733
+ if (detail) {
57734
+ entityName2 = detail.entity.name;
57735
+ const aspect = getEntityAspectsWithCounts(accessor, ref3.entity, scopeId).find((candidate) => candidate.aspect.id === ref3.aspect || candidate.aspect.name === ref3.aspect);
57736
+ if (aspect)
57737
+ aspectName2 = aspect.aspect.name;
57738
+ }
57689
57739
  return {
57690
57740
  ok: true,
57691
57741
  result: getOntologyClaimEvidence(accessor, {
57692
- agentId,
57693
- entity: ref3.entity,
57694
- aspect: ref3.aspect,
57742
+ agentId: scopeId,
57743
+ entity: entityName2,
57744
+ aspect: aspectName2,
57695
57745
  group: ref3.group,
57696
57746
  claim: ref3.claim,
57697
57747
  limit,
@@ -57699,35 +57749,37 @@ function createDreamingCapabilities(params) {
57699
57749
  })
57700
57750
  };
57701
57751
  }
57702
- return { ok: true, result: getOntologyLinkEvidence(accessor, { agentId, id: ref3.id }) };
57752
+ return { ok: true, result: getOntologyLinkEvidence(accessor, { agentId: scopeId, id: ref3.id }) };
57703
57753
  }),
57704
- capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, transcripts, and summaries in this scope. Artifacts are deduped by content hash: content-identical files across vault paths collapse to one canonical entry.", true, exports_external.object({
57754
+ capability("search_evidence", "Search episodic evidence", "Full-text search immutable episodic memories, artifacts, transcripts, and summaries in one agent scope. Artifacts are deduped by content hash: content-identical files across vault paths collapse to one canonical entry.", true, exports_external.object({
57755
+ agentId: exports_external.string().min(1),
57705
57756
  query: exports_external.string().optional(),
57706
57757
  since: exports_external.string().optional(),
57707
57758
  before: exports_external.string().optional(),
57708
57759
  kind: exports_external.enum(["memory", "artifact", "transcript", "summary"]).optional(),
57709
57760
  limit: exports_external.number().finite().optional()
57710
- }), async ({ query, since, before, kind, limit }) => ({
57761
+ }), async ({ agentId: scopeId, query, since, before, kind, limit }) => ({
57711
57762
  ok: true,
57712
- items: accessor.withReadDb((db) => searchEpisodicSources(db, { agentId, query: query ?? "", since, before, kind, limit }))
57763
+ items: accessor.withReadDb((db) => searchEpisodicSources(db, { agentId: scopeId, query: query ?? "", since, before, kind, limit }))
57713
57764
  })),
57714
- capability("validate_proposal", "Validate proposal", "Run the daemon's deterministic pre-write guards in one pass: entity-label gate, duplicate-entity check, and/or contradiction check against active aspect values.", true, exports_external.object({
57765
+ 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({
57766
+ agentId: exports_external.string().min(1),
57715
57767
  name: exports_external.string().optional(),
57716
57768
  type: exports_external.string().optional(),
57717
57769
  entityId: exports_external.string().optional(),
57718
57770
  aspectId: exports_external.string().optional(),
57719
57771
  value: exports_external.string().optional()
57720
- }), async ({ name, type, entityId: entityId2, aspectId: aspectId2, value }) => {
57772
+ }), async ({ agentId: scopeId, name, type, entityId: entityId2, aspectId: aspectId2, value }) => {
57721
57773
  const result = { ok: true };
57722
57774
  if (name !== undefined) {
57723
57775
  result.label = classifyEntityQuality(name, type);
57724
- result.duplicates = findDuplicateEntityMerges(accessor, { agentId, name });
57776
+ result.duplicates = findDuplicateEntityMerges(accessor, { agentId: scopeId, name });
57725
57777
  }
57726
57778
  if (entityId2 !== undefined && aspectId2 !== undefined && value !== undefined) {
57727
57779
  result.contradiction = getAttributesForAspectFiltered(accessor, {
57728
57780
  entityId: entityId2,
57729
57781
  aspectId: aspectId2,
57730
- agentId,
57782
+ agentId: scopeId,
57731
57783
  kind: "attribute",
57732
57784
  status: "active",
57733
57785
  limit: 200,
@@ -57753,22 +57805,30 @@ function createDreamingCapabilities(params) {
57753
57805
  }
57754
57806
  return { ok: true, passId: params.passId };
57755
57807
  }),
57756
- capability("attention_list", "List attention", "List scoped attention records (the hygiene queue) by kind and resolution status.", true, exports_external.object({
57808
+ capability("attention_list", "List attention", "List attention records (the hygiene queue) by kind and resolution status. Omit agentId to see the whole install's queue (each record carries its owning agentId); pass agentId to narrow to one scope.", true, exports_external.object({
57809
+ agentId: exports_external.string().optional(),
57757
57810
  kind: exports_external.string().optional(),
57758
57811
  status: exports_external.enum(["pending", "resolved"]).optional(),
57759
57812
  limit: exports_external.number().finite().optional()
57760
- }), async ({ kind, status, limit }) => ({
57813
+ }), async ({ agentId: scopeId, kind, status, limit }) => ({
57761
57814
  ok: true,
57762
- items: getDreamingAttentionScoped(accessor, agentId, {
57815
+ items: scopeId !== undefined ? getDreamingAttentionScoped(accessor, scopeId, {
57763
57816
  kind,
57764
57817
  status: status ?? "pending",
57765
57818
  limit: bounded(limit, 20, 100)
57819
+ }) : getDreamingAttentionAcrossScopes(accessor, {
57820
+ kind,
57821
+ status: status ?? "pending",
57822
+ limit: bounded(limit, 50, 200)
57766
57823
  })
57767
57824
  })),
57768
- capability("apply_ontology_ops", "Apply ontology operations", 'Apply every semantic write through the daemon audit seam in one batch. Ops are processed in array order. Hygiene ops (flag, archive_*, merge_entities) cite provenance: "attention:$<index>" for a flag earlier in the same batch, or "attention:<uuid>" from a prior batch. Content-bearing ops cite evidence with exact quotes from canonical episodic evidence.', false, exports_external.object({ operations: exports_external.array(DREAMING_ONTOLOGY_OPERATION_SCHEMA).min(1).max(100) }), async ({ operations }) => {
57825
+ capability("apply_ontology_ops", "Apply ontology operations", 'Apply every semantic write through the daemon audit seam in one batch, in one agent scope (pass the agentId whose graph you are maintaining — hygiene attention records belong to the agent that flagged them). Ops are processed in array order. Hygiene ops (flag, archive_*, merge_entities) cite provenance: "attention:$<index>" for a flag earlier in the same batch, or "attention:<uuid>" from a prior batch. Content-bearing ops cite evidence with exact quotes from canonical episodic evidence in that scope.', false, exports_external.object({
57826
+ agentId: exports_external.string().min(1),
57827
+ operations: exports_external.array(DREAMING_ONTOLOGY_OPERATION_SCHEMA).min(1).max(100)
57828
+ }), async ({ agentId: scopeId, operations }) => {
57769
57829
  const result = applyDreamingOperations({
57770
57830
  accessor,
57771
- agentId,
57831
+ agentId: scopeId,
57772
57832
  actor,
57773
57833
  operations,
57774
57834
  passId: params.passId
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.160.0",
3
+ "version": "0.161.0",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "aa65aca8003becc4d19d32b1b9b2341209a5fad9db2a68ecbf3a81588e699fc5",
8
+ "sha256": "5fd37eec948611a3f993624381f76dbcd0c2a53744756403df157e4461b4a1c4",
9
9
  "size": 125267872
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "036dbd84293c90d531f18ad13d343fa458a47f551fd43ec948575f7f7ad8de52",
14
+ "sha256": "5831c148f9c2e819dfba66e3ea07f6d692aad62d9dd0dd110af81bbc90fa9962",
15
15
  "size": 129829440
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "778a294508fa9ec3f0173415970bc9b291dc8080bb9ad8e5a9b0012329f5dbf5",
21
- "size": 162441818
20
+ "sha256": "f337417aba628e1a0d1a68836aaaddb9399470c18bcdff8b749cc15ee0a78187",
21
+ "size": 162445609
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "1e7519493884c73cd99c9025182de2fb0dd67cddd05ad4f5523c0d454429538f",
27
- "size": 163000807
26
+ "sha256": "13294b879a6865486b5d9881425653d9529502cc965ec69d76b16e46358c75d0",
27
+ "size": 163004606
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "e7d037b1a6ba4e9685566f4e634e28144f6540e30c156aea9888c13367f216de",
33
- "size": 179132416
32
+ "sha256": "faab95688939c913938c56aff90fd89089bac6b42e9b92355befb8c596468e65",
33
+ "size": 179136512
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.160.0.tar.gz",
39
- "sha256": "678ffad5f21ce143dd42d1fb3bd270222476e6176f11e29d14528abbc9499172",
40
- "size": 15996
38
+ "url": "signet-connectors-0.161.0.tar.gz",
39
+ "sha256": "137d331643dfa21d59d2a85c9936d4c4ac6db9be91900feb2b6e25bd1d7b1b44",
40
+ "size": 15992
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.160.0",
3
+ "version": "0.161.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.160.0/signetai-darwin-arm64-0.160.0.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.160.0/signetai-darwin-x64-0.160.0.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.160.0/signetai-linux-arm64-0.160.0.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.160.0/signetai-linux-x64-0.160.0.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.160.0/signetai-win32-x64-0.160.0.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.161.0/signetai-darwin-arm64-0.161.0.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.161.0/signetai-darwin-x64-0.161.0.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.161.0/signetai-linux-arm64-0.161.0.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.161.0/signetai-linux-x64-0.161.0.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.161.0/signetai-win32-x64-0.161.0.tgz"
73
73
  }
74
74
  }