signetai 0.147.22 → 0.148.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 +248 -249
- package/native-manifest.json +14 -14
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -35384,6 +35384,248 @@ var PIPELINE_PROVIDER_CHOICES = [
|
|
|
35384
35384
|
var SYNTHESIS_PROVIDER_CHOICES = PIPELINE_PROVIDER_CHOICES.filter((provider) => provider !== "command");
|
|
35385
35385
|
var PIPELINE_PROVIDER_SET = new Set(PIPELINE_PROVIDER_CHOICES);
|
|
35386
35386
|
var SYNTHESIS_PROVIDER_SET = new Set(SYNTHESIS_PROVIDER_CHOICES);
|
|
35387
|
+
function isRecord(value) {
|
|
35388
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
35389
|
+
}
|
|
35390
|
+
function withDefined(value) {
|
|
35391
|
+
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
|
|
35392
|
+
}
|
|
35393
|
+
function normalizeRememberTags(tags) {
|
|
35394
|
+
if (typeof tags === "string") {
|
|
35395
|
+
const value = tags.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0).join(",");
|
|
35396
|
+
return value.length > 0 ? value : undefined;
|
|
35397
|
+
}
|
|
35398
|
+
if (Array.isArray(tags)) {
|
|
35399
|
+
const value = tags.map((tag) => tag.trim()).filter((tag) => tag.length > 0).join(",");
|
|
35400
|
+
return value.length > 0 ? value : undefined;
|
|
35401
|
+
}
|
|
35402
|
+
return;
|
|
35403
|
+
}
|
|
35404
|
+
function normalizeRecallLimit(limit) {
|
|
35405
|
+
if (typeof limit !== "number" || !Number.isFinite(limit))
|
|
35406
|
+
return 10;
|
|
35407
|
+
return Math.min(100, Math.max(1, Math.trunc(limit)));
|
|
35408
|
+
}
|
|
35409
|
+
function partitionRecallRows(rows) {
|
|
35410
|
+
return {
|
|
35411
|
+
primary: rows.filter((row) => row.supplementary !== true),
|
|
35412
|
+
supporting: rows.filter((row) => row.supplementary === true)
|
|
35413
|
+
};
|
|
35414
|
+
}
|
|
35415
|
+
function parseRecallMeta(raw, fallbackCount) {
|
|
35416
|
+
if (!isRecord(raw)) {
|
|
35417
|
+
return {
|
|
35418
|
+
totalReturned: fallbackCount,
|
|
35419
|
+
hasSupplementary: false,
|
|
35420
|
+
noHits: fallbackCount === 0
|
|
35421
|
+
};
|
|
35422
|
+
}
|
|
35423
|
+
const totalReturned = typeof raw.totalReturned === "number" ? raw.totalReturned : fallbackCount;
|
|
35424
|
+
const hasSupplementary = raw.hasSupplementary === true;
|
|
35425
|
+
const noHits = "noHits" in raw ? raw.noHits === true : totalReturned === 0;
|
|
35426
|
+
const dedupe = isRecord(raw.dedupe) ? {
|
|
35427
|
+
enabled: raw.dedupe.enabled === true,
|
|
35428
|
+
contextEpoch: typeof raw.dedupe.contextEpoch === "number" ? raw.dedupe.contextEpoch : undefined,
|
|
35429
|
+
suppressed: typeof raw.dedupe.suppressed === "number" ? raw.dedupe.suppressed : 0,
|
|
35430
|
+
repeatedReturned: typeof raw.dedupe.repeatedReturned === "number" ? raw.dedupe.repeatedReturned : 0
|
|
35431
|
+
} : undefined;
|
|
35432
|
+
const temporal = isRecord(raw.temporal) ? raw.temporal : undefined;
|
|
35433
|
+
return { totalReturned, hasSupplementary, noHits, ...dedupe ? { dedupe } : {}, ...temporal ? { temporal } : {} };
|
|
35434
|
+
}
|
|
35435
|
+
function parseRecallPayload(raw) {
|
|
35436
|
+
const payload = isRecord(raw) ? raw : {};
|
|
35437
|
+
const results = Array.isArray(payload.results) ? payload.results : Array.isArray(payload.memories) ? payload.memories : [];
|
|
35438
|
+
const rows = results.filter(isRecord);
|
|
35439
|
+
return {
|
|
35440
|
+
query: typeof payload.query === "string" ? payload.query : undefined,
|
|
35441
|
+
method: typeof payload.method === "string" ? payload.method : undefined,
|
|
35442
|
+
rows,
|
|
35443
|
+
meta: parseRecallMeta(payload.meta, rows.length),
|
|
35444
|
+
message: typeof payload.message === "string" ? payload.message : undefined
|
|
35445
|
+
};
|
|
35446
|
+
}
|
|
35447
|
+
function applyRecallScoreThreshold(raw, minScore) {
|
|
35448
|
+
if (typeof minScore !== "number" || !Number.isFinite(minScore) || typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
35449
|
+
return raw;
|
|
35450
|
+
}
|
|
35451
|
+
const payload = raw;
|
|
35452
|
+
const rows = Array.isArray(payload.results) ? payload.results : [];
|
|
35453
|
+
const filtered = rows.filter((row) => typeof row.score !== "number" || row.score >= minScore);
|
|
35454
|
+
return {
|
|
35455
|
+
...payload,
|
|
35456
|
+
results: filtered,
|
|
35457
|
+
meta: {
|
|
35458
|
+
...isRecord(payload.meta) ? payload.meta : {},
|
|
35459
|
+
totalReturned: filtered.length,
|
|
35460
|
+
hasSupplementary: filtered.some((row) => row.supplementary === true),
|
|
35461
|
+
noHits: filtered.length === 0
|
|
35462
|
+
}
|
|
35463
|
+
};
|
|
35464
|
+
}
|
|
35465
|
+
function formatDate(value) {
|
|
35466
|
+
return typeof value === "string" && value.length > 0 ? value.slice(0, 10) : "unknown";
|
|
35467
|
+
}
|
|
35468
|
+
function formatRecallRow(row, options) {
|
|
35469
|
+
const score = typeof row.score === "number" ? `[${(row.score * 100).toFixed(0)}%] ` : "";
|
|
35470
|
+
const source = typeof row.source === "string" ? row.source : "unknown";
|
|
35471
|
+
const type = typeof row.type === "string" ? row.type : "memory";
|
|
35472
|
+
const who = typeof row.who === "string" && row.who.length > 0 ? `, by ${row.who}` : "";
|
|
35473
|
+
const createdAt = formatDate(row.created_at);
|
|
35474
|
+
const id = typeof row.id === "string" && row.id.length > 0 ? `id: ${row.id}; ` : "";
|
|
35475
|
+
const prefix = options?.includeIndex ? `${options.includeIndex}. ` : "- ";
|
|
35476
|
+
return `${prefix}${score}${id}${row.content ?? ""} (${type}, ${source}, ${createdAt}${who})`;
|
|
35477
|
+
}
|
|
35478
|
+
function temporalGroupLabel(row) {
|
|
35479
|
+
if (row.temporal_facet === "session")
|
|
35480
|
+
return "Sessions";
|
|
35481
|
+
if (row.temporal_facet === "source")
|
|
35482
|
+
return "Source Activity";
|
|
35483
|
+
if (row.temporal_facet === "occurred" || row.temporal_facet === "observed" || row.temporal_facet === "valid") {
|
|
35484
|
+
return "Events";
|
|
35485
|
+
}
|
|
35486
|
+
return "Memories Captured";
|
|
35487
|
+
}
|
|
35488
|
+
function formatTemporalDate(value) {
|
|
35489
|
+
const parsed = new Date(value);
|
|
35490
|
+
if (Number.isNaN(parsed.getTime()))
|
|
35491
|
+
return value.slice(0, 10);
|
|
35492
|
+
return parsed.toLocaleDateString("en-US", {
|
|
35493
|
+
month: "long",
|
|
35494
|
+
day: "numeric",
|
|
35495
|
+
year: "numeric",
|
|
35496
|
+
timeZone: "UTC"
|
|
35497
|
+
});
|
|
35498
|
+
}
|
|
35499
|
+
function formatTemporalRecallText(rows, meta3) {
|
|
35500
|
+
const parts = [formatTemporalDate(meta3.start)];
|
|
35501
|
+
const groups = new Map;
|
|
35502
|
+
for (const row of rows) {
|
|
35503
|
+
const label = temporalGroupLabel(row);
|
|
35504
|
+
groups.set(label, [...groups.get(label) ?? [], row]);
|
|
35505
|
+
}
|
|
35506
|
+
for (const label of ["Sessions", "Source Activity", "Events", "Memories Captured"]) {
|
|
35507
|
+
const group = groups.get(label);
|
|
35508
|
+
if (!group || group.length === 0)
|
|
35509
|
+
continue;
|
|
35510
|
+
parts.push("", label, ...group.map((row) => formatRecallRow(row)));
|
|
35511
|
+
}
|
|
35512
|
+
return parts.join(`
|
|
35513
|
+
`);
|
|
35514
|
+
}
|
|
35515
|
+
function formatRecallText(raw) {
|
|
35516
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
35517
|
+
return typeof raw === "string" ? raw : JSON.stringify(raw, null, 2);
|
|
35518
|
+
}
|
|
35519
|
+
const payload = raw;
|
|
35520
|
+
const parsed = parseRecallPayload(payload);
|
|
35521
|
+
if (parsed.message && parsed.rows.length === 0)
|
|
35522
|
+
return parsed.message;
|
|
35523
|
+
if (parsed.meta.noHits || parsed.rows.length === 0)
|
|
35524
|
+
return "No matching memories found.";
|
|
35525
|
+
const { primary, supporting } = partitionRecallRows(parsed.rows);
|
|
35526
|
+
if (parsed.meta.temporal?.mode === "timeline")
|
|
35527
|
+
return formatTemporalRecallText(primary, parsed.meta.temporal);
|
|
35528
|
+
const noun = parsed.meta.totalReturned === 1 ? "memory" : "memories";
|
|
35529
|
+
const parts = payload.aggregate?.partial === true && typeof payload.aggregate.message === "string" ? [
|
|
35530
|
+
payload.aggregate.message,
|
|
35531
|
+
"",
|
|
35532
|
+
`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`
|
|
35533
|
+
] : [`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`];
|
|
35534
|
+
if (primary.length > 0) {
|
|
35535
|
+
parts.push("", "Primary matches:", ...primary.map((row) => formatRecallRow(row)));
|
|
35536
|
+
}
|
|
35537
|
+
if (supporting.length > 0) {
|
|
35538
|
+
parts.push("", "Supporting context:", ...supporting.map((row) => formatRecallRow(row)));
|
|
35539
|
+
}
|
|
35540
|
+
return parts.join(`
|
|
35541
|
+
`);
|
|
35542
|
+
}
|
|
35543
|
+
function buildRecallRequestBody(query, options = {}) {
|
|
35544
|
+
return withDefined({
|
|
35545
|
+
query,
|
|
35546
|
+
keywordQuery: options.keywordQuery ?? options.keyword_query,
|
|
35547
|
+
limit: normalizeRecallLimit(options.limit),
|
|
35548
|
+
project: options.project,
|
|
35549
|
+
type: options.type,
|
|
35550
|
+
tags: options.tags,
|
|
35551
|
+
who: options.who,
|
|
35552
|
+
pinned: options.pinned === true ? true : undefined,
|
|
35553
|
+
importance_min: options.importance_min,
|
|
35554
|
+
since: options.since,
|
|
35555
|
+
until: options.until,
|
|
35556
|
+
time: options.time,
|
|
35557
|
+
expand: options.expand === true ? true : undefined,
|
|
35558
|
+
agentId: options.agentId ?? options.agent_id ?? options.contextAgentId,
|
|
35559
|
+
sessionKey: options.sessionKey ?? options.session_key,
|
|
35560
|
+
includeRecalled: options.includeRecalled === true || options.include_recalled === true ? true : undefined,
|
|
35561
|
+
scope: options.scope,
|
|
35562
|
+
sourceOnly: options.sourceOnly === true || options.source_only === true ? true : undefined,
|
|
35563
|
+
aggregate: options.aggregate === true ? true : undefined,
|
|
35564
|
+
aggregateBudget: options.aggregateBudget ?? options.aggregate_budget,
|
|
35565
|
+
saveAggregate: options.saveAggregate === false || options.save_aggregate === false ? false : options.saveAggregate === true || options.save_aggregate === true ? true : undefined
|
|
35566
|
+
});
|
|
35567
|
+
}
|
|
35568
|
+
function normalizeStructuredMemoryPayload(value) {
|
|
35569
|
+
if (!isRecord(value))
|
|
35570
|
+
return value;
|
|
35571
|
+
const aspects = value.aspects;
|
|
35572
|
+
if (!Array.isArray(aspects))
|
|
35573
|
+
return value;
|
|
35574
|
+
return {
|
|
35575
|
+
...value,
|
|
35576
|
+
aspects: aspects.map((aspect) => {
|
|
35577
|
+
if (!isRecord(aspect))
|
|
35578
|
+
return aspect;
|
|
35579
|
+
if (typeof aspect.entityName === "string" && Array.isArray(aspect.attributes))
|
|
35580
|
+
return aspect;
|
|
35581
|
+
if (typeof aspect.entity === "string" && typeof aspect.aspect === "string" && typeof aspect.value === "string") {
|
|
35582
|
+
return {
|
|
35583
|
+
entityName: aspect.entity,
|
|
35584
|
+
aspect: aspect.aspect,
|
|
35585
|
+
attributes: [
|
|
35586
|
+
withDefined({
|
|
35587
|
+
content: aspect.value,
|
|
35588
|
+
groupKey: typeof aspect.groupKey === "string" ? aspect.groupKey : undefined,
|
|
35589
|
+
claimKey: typeof aspect.claimKey === "string" ? aspect.claimKey : undefined,
|
|
35590
|
+
confidence: typeof aspect.confidence === "number" ? aspect.confidence : undefined,
|
|
35591
|
+
importance: typeof aspect.importance === "number" ? aspect.importance : undefined
|
|
35592
|
+
})
|
|
35593
|
+
]
|
|
35594
|
+
};
|
|
35595
|
+
}
|
|
35596
|
+
return aspect;
|
|
35597
|
+
})
|
|
35598
|
+
};
|
|
35599
|
+
}
|
|
35600
|
+
function buildRememberRequestBody(content, options = {}) {
|
|
35601
|
+
return withDefined({
|
|
35602
|
+
content,
|
|
35603
|
+
type: options.type,
|
|
35604
|
+
importance: options.importance,
|
|
35605
|
+
tags: normalizeRememberTags(options.tags),
|
|
35606
|
+
who: options.who,
|
|
35607
|
+
pinned: options.pinned === true ? true : undefined,
|
|
35608
|
+
sourceType: options.sourceType,
|
|
35609
|
+
sourceId: options.sourceId,
|
|
35610
|
+
sourcePath: options.sourcePath,
|
|
35611
|
+
createdAt: options.createdAt,
|
|
35612
|
+
occurredAt: options.occurredAt,
|
|
35613
|
+
observedAt: options.observedAt,
|
|
35614
|
+
validFrom: options.validFrom,
|
|
35615
|
+
validUntil: options.validUntil,
|
|
35616
|
+
sourceCreatedAt: options.sourceCreatedAt,
|
|
35617
|
+
hints: options.hints,
|
|
35618
|
+
transcript: options.transcript,
|
|
35619
|
+
structured: normalizeStructuredMemoryPayload(options.structured),
|
|
35620
|
+
agentId: options.agentId,
|
|
35621
|
+
visibility: options.visibility,
|
|
35622
|
+
mode: options.mode,
|
|
35623
|
+
idempotencyKey: options.idempotencyKey,
|
|
35624
|
+
runtimePath: options.runtimePath,
|
|
35625
|
+
harness: options.harness,
|
|
35626
|
+
source: options.source
|
|
35627
|
+
});
|
|
35628
|
+
}
|
|
35387
35629
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
35388
35630
|
function normalizeSql(sql) {
|
|
35389
35631
|
return sql.replace(/\s+/g, " ").trim().toLowerCase();
|
|
@@ -39103,249 +39345,6 @@ try {
|
|
|
39103
39345
|
const esmRequire = createRequire2(import.meta.url);
|
|
39104
39346
|
native = esmRequire("@signet/native");
|
|
39105
39347
|
} catch {}
|
|
39106
|
-
function isRecord3(value) {
|
|
39107
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39108
|
-
}
|
|
39109
|
-
function withDefined(value) {
|
|
39110
|
-
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
|
|
39111
|
-
}
|
|
39112
|
-
function normalizeRememberTags(tags) {
|
|
39113
|
-
if (typeof tags === "string") {
|
|
39114
|
-
const value = tags.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0).join(",");
|
|
39115
|
-
return value.length > 0 ? value : undefined;
|
|
39116
|
-
}
|
|
39117
|
-
if (Array.isArray(tags)) {
|
|
39118
|
-
const value = tags.map((tag) => tag.trim()).filter((tag) => tag.length > 0).join(",");
|
|
39119
|
-
return value.length > 0 ? value : undefined;
|
|
39120
|
-
}
|
|
39121
|
-
return;
|
|
39122
|
-
}
|
|
39123
|
-
function normalizeRecallLimit(limit) {
|
|
39124
|
-
if (typeof limit !== "number" || !Number.isFinite(limit))
|
|
39125
|
-
return 10;
|
|
39126
|
-
return Math.min(100, Math.max(1, Math.trunc(limit)));
|
|
39127
|
-
}
|
|
39128
|
-
function partitionRecallRows(rows) {
|
|
39129
|
-
return {
|
|
39130
|
-
primary: rows.filter((row) => row.supplementary !== true),
|
|
39131
|
-
supporting: rows.filter((row) => row.supplementary === true)
|
|
39132
|
-
};
|
|
39133
|
-
}
|
|
39134
|
-
function parseRecallMeta(raw, fallbackCount) {
|
|
39135
|
-
if (!isRecord3(raw)) {
|
|
39136
|
-
return {
|
|
39137
|
-
totalReturned: fallbackCount,
|
|
39138
|
-
hasSupplementary: false,
|
|
39139
|
-
noHits: fallbackCount === 0
|
|
39140
|
-
};
|
|
39141
|
-
}
|
|
39142
|
-
const totalReturned = typeof raw.totalReturned === "number" ? raw.totalReturned : fallbackCount;
|
|
39143
|
-
const hasSupplementary = raw.hasSupplementary === true;
|
|
39144
|
-
const noHits = "noHits" in raw ? raw.noHits === true : totalReturned === 0;
|
|
39145
|
-
const dedupe = isRecord3(raw.dedupe) ? {
|
|
39146
|
-
enabled: raw.dedupe.enabled === true,
|
|
39147
|
-
contextEpoch: typeof raw.dedupe.contextEpoch === "number" ? raw.dedupe.contextEpoch : undefined,
|
|
39148
|
-
suppressed: typeof raw.dedupe.suppressed === "number" ? raw.dedupe.suppressed : 0,
|
|
39149
|
-
repeatedReturned: typeof raw.dedupe.repeatedReturned === "number" ? raw.dedupe.repeatedReturned : 0
|
|
39150
|
-
} : undefined;
|
|
39151
|
-
const temporal = isRecord3(raw.temporal) ? raw.temporal : undefined;
|
|
39152
|
-
return { totalReturned, hasSupplementary, noHits, ...dedupe ? { dedupe } : {}, ...temporal ? { temporal } : {} };
|
|
39153
|
-
}
|
|
39154
|
-
function parseRecallPayload(raw) {
|
|
39155
|
-
const payload = isRecord3(raw) ? raw : {};
|
|
39156
|
-
const results = Array.isArray(payload.results) ? payload.results : Array.isArray(payload.memories) ? payload.memories : [];
|
|
39157
|
-
const rows = results.filter(isRecord3);
|
|
39158
|
-
return {
|
|
39159
|
-
query: typeof payload.query === "string" ? payload.query : undefined,
|
|
39160
|
-
method: typeof payload.method === "string" ? payload.method : undefined,
|
|
39161
|
-
rows,
|
|
39162
|
-
meta: parseRecallMeta(payload.meta, rows.length),
|
|
39163
|
-
message: typeof payload.message === "string" ? payload.message : undefined
|
|
39164
|
-
};
|
|
39165
|
-
}
|
|
39166
|
-
function applyRecallScoreThreshold(raw, minScore) {
|
|
39167
|
-
if (typeof minScore !== "number" || !Number.isFinite(minScore) || typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
39168
|
-
return raw;
|
|
39169
|
-
}
|
|
39170
|
-
const payload = raw;
|
|
39171
|
-
const rows = Array.isArray(payload.results) ? payload.results : [];
|
|
39172
|
-
const filtered = rows.filter((row) => typeof row.score !== "number" || row.score >= minScore);
|
|
39173
|
-
return {
|
|
39174
|
-
...payload,
|
|
39175
|
-
results: filtered,
|
|
39176
|
-
meta: {
|
|
39177
|
-
totalReturned: filtered.length,
|
|
39178
|
-
hasSupplementary: filtered.some((row) => row.supplementary === true),
|
|
39179
|
-
noHits: filtered.length === 0,
|
|
39180
|
-
...isRecord3(payload.meta) && isRecord3(payload.meta.dedupe) ? { dedupe: payload.meta.dedupe } : {},
|
|
39181
|
-
...isRecord3(payload.meta) && isRecord3(payload.meta.temporal) ? { temporal: payload.meta.temporal } : {}
|
|
39182
|
-
}
|
|
39183
|
-
};
|
|
39184
|
-
}
|
|
39185
|
-
function formatDate(value) {
|
|
39186
|
-
return typeof value === "string" && value.length > 0 ? value.slice(0, 10) : "unknown";
|
|
39187
|
-
}
|
|
39188
|
-
function formatRecallRow(row, options) {
|
|
39189
|
-
const score = typeof row.score === "number" ? `[${(row.score * 100).toFixed(0)}%] ` : "";
|
|
39190
|
-
const source = typeof row.source === "string" ? row.source : "unknown";
|
|
39191
|
-
const type = typeof row.type === "string" ? row.type : "memory";
|
|
39192
|
-
const who = typeof row.who === "string" && row.who.length > 0 ? `, by ${row.who}` : "";
|
|
39193
|
-
const createdAt = formatDate(row.created_at);
|
|
39194
|
-
const id = typeof row.id === "string" && row.id.length > 0 ? `id: ${row.id}; ` : "";
|
|
39195
|
-
const prefix = options?.includeIndex ? `${options.includeIndex}. ` : "- ";
|
|
39196
|
-
return `${prefix}${score}${id}${row.content ?? ""} (${type}, ${source}, ${createdAt}${who})`;
|
|
39197
|
-
}
|
|
39198
|
-
function temporalGroupLabel(row) {
|
|
39199
|
-
if (row.temporal_facet === "session")
|
|
39200
|
-
return "Sessions";
|
|
39201
|
-
if (row.temporal_facet === "source")
|
|
39202
|
-
return "Source Activity";
|
|
39203
|
-
if (row.temporal_facet === "occurred" || row.temporal_facet === "observed" || row.temporal_facet === "valid") {
|
|
39204
|
-
return "Events";
|
|
39205
|
-
}
|
|
39206
|
-
return "Memories Captured";
|
|
39207
|
-
}
|
|
39208
|
-
function formatTemporalDate(value) {
|
|
39209
|
-
const parsed = new Date(value);
|
|
39210
|
-
if (Number.isNaN(parsed.getTime()))
|
|
39211
|
-
return value.slice(0, 10);
|
|
39212
|
-
return parsed.toLocaleDateString("en-US", {
|
|
39213
|
-
month: "long",
|
|
39214
|
-
day: "numeric",
|
|
39215
|
-
year: "numeric",
|
|
39216
|
-
timeZone: "UTC"
|
|
39217
|
-
});
|
|
39218
|
-
}
|
|
39219
|
-
function formatTemporalRecallText(rows, meta3) {
|
|
39220
|
-
const parts = [formatTemporalDate(meta3.start)];
|
|
39221
|
-
const groups = new Map;
|
|
39222
|
-
for (const row of rows) {
|
|
39223
|
-
const label = temporalGroupLabel(row);
|
|
39224
|
-
groups.set(label, [...groups.get(label) ?? [], row]);
|
|
39225
|
-
}
|
|
39226
|
-
for (const label of ["Sessions", "Source Activity", "Events", "Memories Captured"]) {
|
|
39227
|
-
const group = groups.get(label);
|
|
39228
|
-
if (!group || group.length === 0)
|
|
39229
|
-
continue;
|
|
39230
|
-
parts.push("", label, ...group.map((row) => formatRecallRow(row)));
|
|
39231
|
-
}
|
|
39232
|
-
return parts.join(`
|
|
39233
|
-
`);
|
|
39234
|
-
}
|
|
39235
|
-
function formatRecallText(raw) {
|
|
39236
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
39237
|
-
return typeof raw === "string" ? raw : JSON.stringify(raw, null, 2);
|
|
39238
|
-
}
|
|
39239
|
-
const payload = raw;
|
|
39240
|
-
const parsed = parseRecallPayload(payload);
|
|
39241
|
-
if (parsed.message && parsed.rows.length === 0)
|
|
39242
|
-
return parsed.message;
|
|
39243
|
-
if (parsed.meta.noHits || parsed.rows.length === 0)
|
|
39244
|
-
return "No matching memories found.";
|
|
39245
|
-
const { primary, supporting } = partitionRecallRows(parsed.rows);
|
|
39246
|
-
if (parsed.meta.temporal?.mode === "timeline")
|
|
39247
|
-
return formatTemporalRecallText(primary, parsed.meta.temporal);
|
|
39248
|
-
const noun = parsed.meta.totalReturned === 1 ? "memory" : "memories";
|
|
39249
|
-
const parts = payload.aggregate?.partial === true && typeof payload.aggregate.message === "string" ? [
|
|
39250
|
-
payload.aggregate.message,
|
|
39251
|
-
"",
|
|
39252
|
-
`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`
|
|
39253
|
-
] : [`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`];
|
|
39254
|
-
if (primary.length > 0) {
|
|
39255
|
-
parts.push("", "Primary matches:", ...primary.map((row) => formatRecallRow(row)));
|
|
39256
|
-
}
|
|
39257
|
-
if (supporting.length > 0) {
|
|
39258
|
-
parts.push("", "Supporting context:", ...supporting.map((row) => formatRecallRow(row)));
|
|
39259
|
-
}
|
|
39260
|
-
return parts.join(`
|
|
39261
|
-
`);
|
|
39262
|
-
}
|
|
39263
|
-
function buildRecallRequestBody(query, options = {}) {
|
|
39264
|
-
return withDefined({
|
|
39265
|
-
query,
|
|
39266
|
-
keywordQuery: options.keywordQuery ?? options.keyword_query,
|
|
39267
|
-
limit: normalizeRecallLimit(options.limit),
|
|
39268
|
-
project: options.project,
|
|
39269
|
-
type: options.type,
|
|
39270
|
-
tags: options.tags,
|
|
39271
|
-
who: options.who,
|
|
39272
|
-
pinned: options.pinned === true ? true : undefined,
|
|
39273
|
-
importance_min: options.importance_min,
|
|
39274
|
-
since: options.since,
|
|
39275
|
-
until: options.until,
|
|
39276
|
-
time: options.time,
|
|
39277
|
-
expand: options.expand === true ? true : undefined,
|
|
39278
|
-
agentId: options.agentId ?? options.agent_id ?? options.contextAgentId,
|
|
39279
|
-
sessionKey: options.sessionKey ?? options.session_key,
|
|
39280
|
-
includeRecalled: options.includeRecalled === true || options.include_recalled === true ? true : undefined,
|
|
39281
|
-
scope: options.scope,
|
|
39282
|
-
sourceOnly: options.sourceOnly === true || options.source_only === true ? true : undefined,
|
|
39283
|
-
aggregate: options.aggregate === true ? true : undefined,
|
|
39284
|
-
aggregateBudget: options.aggregateBudget ?? options.aggregate_budget,
|
|
39285
|
-
saveAggregate: options.saveAggregate === false || options.save_aggregate === false ? false : options.saveAggregate === true || options.save_aggregate === true ? true : undefined
|
|
39286
|
-
});
|
|
39287
|
-
}
|
|
39288
|
-
function normalizeStructuredMemoryPayload(value) {
|
|
39289
|
-
if (!isRecord3(value))
|
|
39290
|
-
return value;
|
|
39291
|
-
const aspects = value.aspects;
|
|
39292
|
-
if (!Array.isArray(aspects))
|
|
39293
|
-
return value;
|
|
39294
|
-
return {
|
|
39295
|
-
...value,
|
|
39296
|
-
aspects: aspects.map((aspect) => {
|
|
39297
|
-
if (!isRecord3(aspect))
|
|
39298
|
-
return aspect;
|
|
39299
|
-
if (typeof aspect.entityName === "string" && Array.isArray(aspect.attributes))
|
|
39300
|
-
return aspect;
|
|
39301
|
-
if (typeof aspect.entity === "string" && typeof aspect.aspect === "string" && typeof aspect.value === "string") {
|
|
39302
|
-
return {
|
|
39303
|
-
entityName: aspect.entity,
|
|
39304
|
-
aspect: aspect.aspect,
|
|
39305
|
-
attributes: [
|
|
39306
|
-
withDefined({
|
|
39307
|
-
content: aspect.value,
|
|
39308
|
-
groupKey: typeof aspect.groupKey === "string" ? aspect.groupKey : undefined,
|
|
39309
|
-
claimKey: typeof aspect.claimKey === "string" ? aspect.claimKey : undefined,
|
|
39310
|
-
confidence: typeof aspect.confidence === "number" ? aspect.confidence : undefined,
|
|
39311
|
-
importance: typeof aspect.importance === "number" ? aspect.importance : undefined
|
|
39312
|
-
})
|
|
39313
|
-
]
|
|
39314
|
-
};
|
|
39315
|
-
}
|
|
39316
|
-
return aspect;
|
|
39317
|
-
})
|
|
39318
|
-
};
|
|
39319
|
-
}
|
|
39320
|
-
function buildRememberRequestBody(content, options = {}) {
|
|
39321
|
-
return withDefined({
|
|
39322
|
-
content,
|
|
39323
|
-
type: options.type,
|
|
39324
|
-
importance: options.importance,
|
|
39325
|
-
tags: normalizeRememberTags(options.tags),
|
|
39326
|
-
who: options.who,
|
|
39327
|
-
pinned: options.pinned === true ? true : undefined,
|
|
39328
|
-
sourceType: options.sourceType,
|
|
39329
|
-
sourceId: options.sourceId,
|
|
39330
|
-
sourcePath: options.sourcePath,
|
|
39331
|
-
createdAt: options.createdAt,
|
|
39332
|
-
occurredAt: options.occurredAt,
|
|
39333
|
-
observedAt: options.observedAt,
|
|
39334
|
-
validFrom: options.validFrom,
|
|
39335
|
-
validUntil: options.validUntil,
|
|
39336
|
-
sourceCreatedAt: options.sourceCreatedAt,
|
|
39337
|
-
hints: options.hints,
|
|
39338
|
-
transcript: options.transcript,
|
|
39339
|
-
structured: normalizeStructuredMemoryPayload(options.structured),
|
|
39340
|
-
agentId: options.agentId,
|
|
39341
|
-
visibility: options.visibility,
|
|
39342
|
-
mode: options.mode,
|
|
39343
|
-
idempotencyKey: options.idempotencyKey,
|
|
39344
|
-
runtimePath: options.runtimePath,
|
|
39345
|
-
harness: options.harness,
|
|
39346
|
-
source: options.source
|
|
39347
|
-
});
|
|
39348
|
-
}
|
|
39349
39348
|
var SIGNET_SECRETS_PLUGIN_ID = "signet.secrets";
|
|
39350
39349
|
var SIGNET_GRAPHIQ_PLUGIN_ID = "signet.graphiq";
|
|
39351
39350
|
var SIGNET_PLUGIN_REGISTRY_DIR = ".daemon/plugins";
|
|
@@ -40201,7 +40200,7 @@ function sanitizeAuditValue(value) {
|
|
|
40201
40200
|
return sanitizeAuditString(value);
|
|
40202
40201
|
if (Array.isArray(value))
|
|
40203
40202
|
return value.map((entry) => sanitizeAuditValue(entry));
|
|
40204
|
-
if (
|
|
40203
|
+
if (isRecord2(value))
|
|
40205
40204
|
return sanitizeAuditData(value);
|
|
40206
40205
|
return String(value);
|
|
40207
40206
|
}
|
|
@@ -40211,7 +40210,7 @@ function sanitizeAuditString(value) {
|
|
|
40211
40210
|
function makeAuditId() {
|
|
40212
40211
|
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
40213
40212
|
}
|
|
40214
|
-
function
|
|
40213
|
+
function isRecord2(value) {
|
|
40215
40214
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40216
40215
|
}
|
|
40217
40216
|
|
|
@@ -40559,19 +40558,19 @@ function validateName(name) {
|
|
|
40559
40558
|
}
|
|
40560
40559
|
}
|
|
40561
40560
|
function parseSecretsStore(value) {
|
|
40562
|
-
if (!
|
|
40561
|
+
if (!isRecord3(value)) {
|
|
40563
40562
|
throw new Error("store must be a JSON object");
|
|
40564
40563
|
}
|
|
40565
40564
|
if (value.version !== 1) {
|
|
40566
40565
|
throw new Error("unsupported secrets store version");
|
|
40567
40566
|
}
|
|
40568
|
-
if (!
|
|
40567
|
+
if (!isRecord3(value.secrets)) {
|
|
40569
40568
|
throw new Error("secrets field must be an object");
|
|
40570
40569
|
}
|
|
40571
40570
|
const secrets = {};
|
|
40572
40571
|
for (const [name, entry] of Object.entries(value.secrets)) {
|
|
40573
40572
|
validateName(name);
|
|
40574
|
-
if (!
|
|
40573
|
+
if (!isRecord3(entry)) {
|
|
40575
40574
|
throw new Error(`secret '${name}' must be an object`);
|
|
40576
40575
|
}
|
|
40577
40576
|
if (typeof entry.ciphertext !== "string" || typeof entry.created !== "string" || typeof entry.updated !== "string") {
|
|
@@ -40585,7 +40584,7 @@ function parseSecretsStore(value) {
|
|
|
40585
40584
|
}
|
|
40586
40585
|
return { version: 1, secrets };
|
|
40587
40586
|
}
|
|
40588
|
-
function
|
|
40587
|
+
function isRecord3(value) {
|
|
40589
40588
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40590
40589
|
}
|
|
40591
40590
|
|
package/native-manifest.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.148.1",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
9
|
-
"size":
|
|
8
|
+
"sha256": "1cc5dcffba371496044a66fff5142bf4d62f8646094d4cc5477f15fdac878e28",
|
|
9
|
+
"size": 116978848
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
15
|
-
"size":
|
|
14
|
+
"sha256": "14fe0b3c806275f98c7ebf8d25e6bb9e29000297b452f33df2a824f75c5e5cf6",
|
|
15
|
+
"size": 121604672
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "9864a950daf9a4282cd53bae489103afd71863bff7f27f3ffd9f9ab7be71f606",
|
|
21
|
+
"size": 154211707
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "1114f046b13ee562cf56ed4ccd29468aa2b5749fd1eb23adbf2001fdeacd850b",
|
|
27
|
+
"size": 154770702
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "03349f046034ef0177f237dd65fad294f9b0062ebb7fcc23e09c2bbac73ccf58",
|
|
33
|
+
"size": 170903040
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.
|
|
39
|
-
"sha256": "
|
|
40
|
-
"size":
|
|
38
|
+
"url": "signet-connectors-0.148.1.tar.gz",
|
|
39
|
+
"sha256": "3f0401144eb8a7fe5ef12432d383753483921b9a24aaaa5b468bd7ed9393e3b0",
|
|
40
|
+
"size": 15563
|
|
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.148.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.
|
|
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.148.1/signetai-darwin-arm64-0.148.1.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.148.1/signetai-darwin-x64-0.148.1.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.148.1/signetai-linux-arm64-0.148.1.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.148.1/signetai-linux-x64-0.148.1.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.148.1/signetai-win32-x64-0.148.1.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|