@signetai/signet-memory-openclaw 0.110.1 → 0.111.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/index.d.ts.map +1 -1
- package/dist/index.js +802 -14
- package/package.json +3 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,KAAK,EACX,iBAAiB,EAQjB,MAAM,qBAAqB,CAAC;AA0H7B,MAAM,WAAW,YAAY;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC;QACf,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,MAAM,CA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,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAelE;AAID,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM/C;AAED;;;GAGG;AACH,iBAAS,wBAAwB,IAAI,MAAM,GAAG,SAAS,CAoBtD;AAED;;;;GAIG;AACH,iBAAS,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAQlF;AAED,iBAAS,qBAAqB,IAAI,MAAM,IAAI,CA6C3C;AAID;;;;;GAKG;AACH,iBAAS,oBAAoB,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,SAAS,CA8BjF;AAED,iBAAS,mBAAmB,IAAI,MAAM,IAAI,CA+CzC;AAwRD,QAAA,MAAM,YAAY;;;;;;qBA1lBJ,OAAO,GAAG,YAAY;;kBAimBrB,iBAAiB,GAAG,IAAI;CAk6BtC,CAAC;AAEF,2FAA2F;AAC3F,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED,sEAAsE;AACtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CAYhB,CAAC;AAEX,eAAe,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10097,6 +10097,793 @@ var CODE_EXTS = new Set([
|
|
|
10097
10097
|
]);
|
|
10098
10098
|
var SKIP_FILES = new Set([".DS_Store", "Thumbs.db", ".gitkeep", "node_modules", ".git", ".env", ".env.local"]);
|
|
10099
10099
|
|
|
10100
|
+
// ../../../libs/sdk/dist/index.js
|
|
10101
|
+
class SignetClientP2 {
|
|
10102
|
+
transport;
|
|
10103
|
+
constructor(transport) {
|
|
10104
|
+
this.transport = transport;
|
|
10105
|
+
}
|
|
10106
|
+
async sessionStart(opts) {
|
|
10107
|
+
return this.transport.post("/api/hooks/session-start", opts);
|
|
10108
|
+
}
|
|
10109
|
+
async userPromptSubmit(opts) {
|
|
10110
|
+
return this.transport.post("/api/hooks/user-prompt-submit", opts);
|
|
10111
|
+
}
|
|
10112
|
+
async sessionEnd(opts) {
|
|
10113
|
+
return this.transport.post("/api/hooks/session-end", opts);
|
|
10114
|
+
}
|
|
10115
|
+
sessionEndFireAndForget(opts) {
|
|
10116
|
+
this.transport.post("/api/hooks/session-end", opts).catch(() => {});
|
|
10117
|
+
}
|
|
10118
|
+
async hookRemember(opts) {
|
|
10119
|
+
return this.transport.post("/api/hooks/remember", opts);
|
|
10120
|
+
}
|
|
10121
|
+
async rememberHook(opts) {
|
|
10122
|
+
return this.hookRemember(opts);
|
|
10123
|
+
}
|
|
10124
|
+
async hookRecall(opts) {
|
|
10125
|
+
return this.transport.post("/api/hooks/recall", opts);
|
|
10126
|
+
}
|
|
10127
|
+
async recallHook(opts) {
|
|
10128
|
+
return this.hookRecall(opts);
|
|
10129
|
+
}
|
|
10130
|
+
async preCompaction(opts) {
|
|
10131
|
+
return this.transport.post("/api/hooks/pre-compaction", opts);
|
|
10132
|
+
}
|
|
10133
|
+
async compactionComplete(opts) {
|
|
10134
|
+
return this.transport.post("/api/hooks/compaction-complete", opts);
|
|
10135
|
+
}
|
|
10136
|
+
async getSynthesisConfig() {
|
|
10137
|
+
return this.transport.get("/api/hooks/synthesis/config");
|
|
10138
|
+
}
|
|
10139
|
+
async requestSynthesis(opts) {
|
|
10140
|
+
return this.transport.post("/api/hooks/synthesis", opts ?? {});
|
|
10141
|
+
}
|
|
10142
|
+
async synthesisComplete(opts) {
|
|
10143
|
+
return this.transport.post("/api/hooks/synthesis/complete", opts);
|
|
10144
|
+
}
|
|
10145
|
+
async listConnectors() {
|
|
10146
|
+
return this.transport.get("/api/connectors");
|
|
10147
|
+
}
|
|
10148
|
+
async createConnector(opts) {
|
|
10149
|
+
return this.transport.post("/api/connectors", opts);
|
|
10150
|
+
}
|
|
10151
|
+
async getConnector(id) {
|
|
10152
|
+
return this.transport.get(`/api/connectors/${id}`);
|
|
10153
|
+
}
|
|
10154
|
+
async syncConnector(id) {
|
|
10155
|
+
return this.transport.post(`/api/connectors/${id}/sync`, {});
|
|
10156
|
+
}
|
|
10157
|
+
async resyncAllConnectors() {
|
|
10158
|
+
return this.transport.post("/api/connectors/resync", {});
|
|
10159
|
+
}
|
|
10160
|
+
async fullSyncConnector(id) {
|
|
10161
|
+
return this.transport.post(`/api/connectors/${id}/sync/full?confirm=true`, {});
|
|
10162
|
+
}
|
|
10163
|
+
async deleteConnector(id, opts) {
|
|
10164
|
+
const cascade = opts?.cascade ? "?cascade=true" : "";
|
|
10165
|
+
return this.transport.del(`/api/connectors/${id}${cascade}`, {});
|
|
10166
|
+
}
|
|
10167
|
+
async getConnectorHealth(id) {
|
|
10168
|
+
return this.transport.get(`/api/connectors/${id}/health`);
|
|
10169
|
+
}
|
|
10170
|
+
async getUsageCounters() {
|
|
10171
|
+
return this.transport.get("/api/analytics/usage");
|
|
10172
|
+
}
|
|
10173
|
+
async getErrors(opts) {
|
|
10174
|
+
return this.transport.get("/api/analytics/errors", opts);
|
|
10175
|
+
}
|
|
10176
|
+
async getLatency() {
|
|
10177
|
+
return this.transport.get("/api/analytics/latency");
|
|
10178
|
+
}
|
|
10179
|
+
async getAnalyticsLogs(opts) {
|
|
10180
|
+
return this.transport.get("/api/analytics/logs", opts);
|
|
10181
|
+
}
|
|
10182
|
+
async getMemorySafety() {
|
|
10183
|
+
return this.transport.get("/api/analytics/memory-safety");
|
|
10184
|
+
}
|
|
10185
|
+
async getContinuity(opts) {
|
|
10186
|
+
return this.transport.get("/api/analytics/continuity", opts);
|
|
10187
|
+
}
|
|
10188
|
+
async getLatestContinuity() {
|
|
10189
|
+
return this.transport.get("/api/analytics/continuity/latest");
|
|
10190
|
+
}
|
|
10191
|
+
async listKnowledgeEntities(opts) {
|
|
10192
|
+
return this.transport.get("/api/knowledge/entities", opts);
|
|
10193
|
+
}
|
|
10194
|
+
async pinEntity(id, opts) {
|
|
10195
|
+
return this.transport.post(`/api/knowledge/entities/${id}/pin`, {}, opts ? { query: opts } : undefined);
|
|
10196
|
+
}
|
|
10197
|
+
async unpinEntity(id, opts) {
|
|
10198
|
+
const query = opts?.agentId ? `?agent_id=${opts.agentId}` : "";
|
|
10199
|
+
return this.transport.del(`/api/knowledge/entities/${id}/pin${query}`, {});
|
|
10200
|
+
}
|
|
10201
|
+
async getPinnedEntities(opts) {
|
|
10202
|
+
return this.transport.get("/api/knowledge/entities/pinned", opts);
|
|
10203
|
+
}
|
|
10204
|
+
async getEntityHealth(opts) {
|
|
10205
|
+
return this.transport.get("/api/knowledge/entities/health", opts);
|
|
10206
|
+
}
|
|
10207
|
+
async getKnowledgeEntity(id, opts) {
|
|
10208
|
+
return this.transport.get(`/api/knowledge/entities/${id}`, opts);
|
|
10209
|
+
}
|
|
10210
|
+
async getEntityAspects(entityId, opts) {
|
|
10211
|
+
return this.transport.get(`/api/knowledge/entities/${entityId}/aspects`, opts);
|
|
10212
|
+
}
|
|
10213
|
+
async getAspectAttributes(entityId, aspectId, opts) {
|
|
10214
|
+
return this.transport.get(`/api/knowledge/entities/${entityId}/aspects/${aspectId}/attributes`, opts);
|
|
10215
|
+
}
|
|
10216
|
+
async getEntityDependencies(entityId, opts) {
|
|
10217
|
+
return this.transport.get(`/api/knowledge/entities/${entityId}/dependencies`, opts);
|
|
10218
|
+
}
|
|
10219
|
+
async getKnowledgeStats() {
|
|
10220
|
+
return this.transport.get("/api/knowledge/stats");
|
|
10221
|
+
}
|
|
10222
|
+
async getTraversalStatus() {
|
|
10223
|
+
return this.transport.get("/api/knowledge/traversal/status");
|
|
10224
|
+
}
|
|
10225
|
+
async getConstellation() {
|
|
10226
|
+
return this.transport.get("/api/knowledge/constellation");
|
|
10227
|
+
}
|
|
10228
|
+
async requeueDeadJobs() {
|
|
10229
|
+
return this.transport.post("/api/repair/requeue-dead", {});
|
|
10230
|
+
}
|
|
10231
|
+
async releaseStaleLeases() {
|
|
10232
|
+
return this.transport.post("/api/repair/release-leases", {});
|
|
10233
|
+
}
|
|
10234
|
+
async checkFts(opts) {
|
|
10235
|
+
return this.transport.post("/api/repair/check-fts", opts ?? {});
|
|
10236
|
+
}
|
|
10237
|
+
async triggerRetentionSweep() {
|
|
10238
|
+
return this.transport.post("/api/repair/retention-sweep", {});
|
|
10239
|
+
}
|
|
10240
|
+
async getEmbeddingGaps() {
|
|
10241
|
+
return this.transport.get("/api/repair/embedding-gaps");
|
|
10242
|
+
}
|
|
10243
|
+
async reembedMissing(opts) {
|
|
10244
|
+
return this.transport.post("/api/repair/re-embed", opts ?? {});
|
|
10245
|
+
}
|
|
10246
|
+
async resyncVectorIndex() {
|
|
10247
|
+
return this.transport.post("/api/repair/resync-vec", {});
|
|
10248
|
+
}
|
|
10249
|
+
async cleanOrphanedEmbeddings() {
|
|
10250
|
+
return this.transport.post("/api/repair/clean-orphans", {});
|
|
10251
|
+
}
|
|
10252
|
+
async getDedupStats() {
|
|
10253
|
+
return this.transport.get("/api/repair/dedup-stats");
|
|
10254
|
+
}
|
|
10255
|
+
async deduplicateMemories(opts) {
|
|
10256
|
+
return this.transport.post("/api/repair/deduplicate", opts ?? {});
|
|
10257
|
+
}
|
|
10258
|
+
async reclassifyEntities() {
|
|
10259
|
+
return this.transport.post("/api/repair/reclassify-entities", {});
|
|
10260
|
+
}
|
|
10261
|
+
async pruneChunkGroups() {
|
|
10262
|
+
return this.transport.post("/api/repair/prune-chunk-groups", {});
|
|
10263
|
+
}
|
|
10264
|
+
async pruneSingletonEntities(opts) {
|
|
10265
|
+
return this.transport.post("/api/repair/prune-singleton-entities", opts ?? {});
|
|
10266
|
+
}
|
|
10267
|
+
async structuralBackfill() {
|
|
10268
|
+
return this.transport.post("/api/repair/structural-backfill", {});
|
|
10269
|
+
}
|
|
10270
|
+
async listAgentPresence(opts) {
|
|
10271
|
+
return this.transport.get("/api/cross-agent/presence", opts);
|
|
10272
|
+
}
|
|
10273
|
+
async updateAgentPresence(opts) {
|
|
10274
|
+
return this.transport.post("/api/cross-agent/presence", opts);
|
|
10275
|
+
}
|
|
10276
|
+
async removeAgentPresence(sessionKey) {
|
|
10277
|
+
return this.transport.del(`/api/cross-agent/presence/${sessionKey}`, {});
|
|
10278
|
+
}
|
|
10279
|
+
async listAgentMessages(opts) {
|
|
10280
|
+
return this.transport.get("/api/cross-agent/messages", opts);
|
|
10281
|
+
}
|
|
10282
|
+
async sendAgentMessage(opts) {
|
|
10283
|
+
return this.transport.post("/api/cross-agent/messages", opts);
|
|
10284
|
+
}
|
|
10285
|
+
async getPredictorStatus() {
|
|
10286
|
+
return this.transport.get("/api/predictor/status");
|
|
10287
|
+
}
|
|
10288
|
+
async getComparisonsByProject(project) {
|
|
10289
|
+
return this.transport.get("/api/predictor/comparisons/by-project", { project });
|
|
10290
|
+
}
|
|
10291
|
+
async getComparisonsByEntity(entityId) {
|
|
10292
|
+
return this.transport.get("/api/predictor/comparisons/by-entity", {
|
|
10293
|
+
entity_id: entityId
|
|
10294
|
+
});
|
|
10295
|
+
}
|
|
10296
|
+
async listComparisons(opts) {
|
|
10297
|
+
return this.transport.get("/api/predictor/comparisons", opts);
|
|
10298
|
+
}
|
|
10299
|
+
async listTrainingRuns(opts) {
|
|
10300
|
+
return this.transport.get("/api/predictor/training", opts);
|
|
10301
|
+
}
|
|
10302
|
+
async getTrainingPairsCount() {
|
|
10303
|
+
return this.transport.get("/api/predictor/training-pairs-count");
|
|
10304
|
+
}
|
|
10305
|
+
async trainPredictor(opts) {
|
|
10306
|
+
return this.transport.post("/api/predictor/train", opts ?? {});
|
|
10307
|
+
}
|
|
10308
|
+
}
|
|
10309
|
+
|
|
10310
|
+
class SignetError extends Error {
|
|
10311
|
+
code;
|
|
10312
|
+
constructor(message, code) {
|
|
10313
|
+
super(message);
|
|
10314
|
+
this.name = "SignetError";
|
|
10315
|
+
this.code = code;
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
|
|
10319
|
+
class SignetApiError extends SignetError {
|
|
10320
|
+
status;
|
|
10321
|
+
body;
|
|
10322
|
+
constructor(status, body) {
|
|
10323
|
+
const message = typeof body === "object" && body !== null && "error" in body ? String(body.error) : `API error ${status}`;
|
|
10324
|
+
super(message, "api_error");
|
|
10325
|
+
this.name = "SignetApiError";
|
|
10326
|
+
this.status = status;
|
|
10327
|
+
this.body = body;
|
|
10328
|
+
}
|
|
10329
|
+
}
|
|
10330
|
+
|
|
10331
|
+
class SignetNetworkError extends SignetError {
|
|
10332
|
+
cause;
|
|
10333
|
+
constructor(message, cause) {
|
|
10334
|
+
super(message, "network_error");
|
|
10335
|
+
this.name = "SignetNetworkError";
|
|
10336
|
+
this.cause = cause;
|
|
10337
|
+
}
|
|
10338
|
+
}
|
|
10339
|
+
|
|
10340
|
+
class SignetTimeoutError extends SignetNetworkError {
|
|
10341
|
+
constructor(timeoutMs) {
|
|
10342
|
+
super(`Request timed out after ${timeoutMs}ms`, new Error("timeout"));
|
|
10343
|
+
this.name = "SignetTimeoutError";
|
|
10344
|
+
}
|
|
10345
|
+
}
|
|
10346
|
+
function applyRecallMinScore(result, minScore) {
|
|
10347
|
+
if (typeof minScore !== "number") {
|
|
10348
|
+
return result;
|
|
10349
|
+
}
|
|
10350
|
+
const filtered = result.results.filter((row) => row.score >= minScore);
|
|
10351
|
+
return {
|
|
10352
|
+
...result,
|
|
10353
|
+
results: filtered,
|
|
10354
|
+
meta: {
|
|
10355
|
+
totalReturned: filtered.length,
|
|
10356
|
+
hasSupplementary: filtered.some((row) => row.supplementary === true),
|
|
10357
|
+
noHits: filtered.length === 0
|
|
10358
|
+
}
|
|
10359
|
+
};
|
|
10360
|
+
}
|
|
10361
|
+
|
|
10362
|
+
class SignetClientHelpers {
|
|
10363
|
+
transport;
|
|
10364
|
+
constructor(transport) {
|
|
10365
|
+
this.transport = transport;
|
|
10366
|
+
}
|
|
10367
|
+
async waitForJob(jobId, opts) {
|
|
10368
|
+
const timeout = opts?.timeout ?? 30000;
|
|
10369
|
+
const interval = opts?.interval ?? 500;
|
|
10370
|
+
const startTime = Date.now();
|
|
10371
|
+
while (Date.now() - startTime < timeout) {
|
|
10372
|
+
const job = await this.transport.get(`/api/memory/jobs/${jobId}`);
|
|
10373
|
+
if (isTerminalJobStatus(job.status)) {
|
|
10374
|
+
return job;
|
|
10375
|
+
}
|
|
10376
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
10377
|
+
}
|
|
10378
|
+
throw new Error(`Job ${jobId} did not complete within ${timeout}ms`);
|
|
10379
|
+
}
|
|
10380
|
+
async waitForDocument(documentId, opts) {
|
|
10381
|
+
const timeout = opts?.timeout ?? 30000;
|
|
10382
|
+
const interval = opts?.interval ?? 500;
|
|
10383
|
+
const startTime = Date.now();
|
|
10384
|
+
while (Date.now() - startTime < timeout) {
|
|
10385
|
+
const doc = await this.transport.get(`/api/documents/${documentId}`);
|
|
10386
|
+
if (isTerminalDocumentStatus(doc.status)) {
|
|
10387
|
+
return doc;
|
|
10388
|
+
}
|
|
10389
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
10390
|
+
}
|
|
10391
|
+
throw new Error(`Document ${documentId} did not complete within ${timeout}ms`);
|
|
10392
|
+
}
|
|
10393
|
+
async createAndIngestDocument(opts) {
|
|
10394
|
+
const result = await this.transport.post("/api/documents", opts);
|
|
10395
|
+
if (result.jobId) {
|
|
10396
|
+
await this.waitForJob(result.jobId);
|
|
10397
|
+
}
|
|
10398
|
+
return this.waitForDocument(result.id);
|
|
10399
|
+
}
|
|
10400
|
+
async recallOrThrow(query, opts) {
|
|
10401
|
+
const result = applyRecallMinScore(await this.transport.post("/api/memory/recall", {
|
|
10402
|
+
query,
|
|
10403
|
+
...opts
|
|
10404
|
+
}), opts?.minScore);
|
|
10405
|
+
if (!result.results || result.results.length === 0) {
|
|
10406
|
+
throw new Error(`No memories found for query: "${query}"`);
|
|
10407
|
+
}
|
|
10408
|
+
return result;
|
|
10409
|
+
}
|
|
10410
|
+
async getMemoryOrThrow(id) {
|
|
10411
|
+
try {
|
|
10412
|
+
return await this.transport.get(`/api/memory/${id}`);
|
|
10413
|
+
} catch (error) {
|
|
10414
|
+
if (error instanceof SignetApiError && error.status === 404) {
|
|
10415
|
+
throw new Error(`Memory not found: ${id}`);
|
|
10416
|
+
}
|
|
10417
|
+
throw error;
|
|
10418
|
+
}
|
|
10419
|
+
}
|
|
10420
|
+
async getDocumentOrThrow(id) {
|
|
10421
|
+
try {
|
|
10422
|
+
return await this.transport.get(`/api/documents/${id}`);
|
|
10423
|
+
} catch (error) {
|
|
10424
|
+
if (error instanceof SignetApiError && error.status === 404) {
|
|
10425
|
+
throw new Error(`Document not found: ${id}`);
|
|
10426
|
+
}
|
|
10427
|
+
throw error;
|
|
10428
|
+
}
|
|
10429
|
+
}
|
|
10430
|
+
async batchModifyWithProgress(patches, onProgress, opts) {
|
|
10431
|
+
onProgress?.({ done: 0, total: patches.length });
|
|
10432
|
+
const mapped = patches.map(({ ifVersion, ...rest }) => ({
|
|
10433
|
+
...rest,
|
|
10434
|
+
if_version: ifVersion
|
|
10435
|
+
}));
|
|
10436
|
+
const response = await this.transport.post("/api/memory/modify", {
|
|
10437
|
+
patches: mapped,
|
|
10438
|
+
...opts
|
|
10439
|
+
});
|
|
10440
|
+
onProgress?.({ done: patches.length, total: patches.length });
|
|
10441
|
+
return response;
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
function isTerminalJobStatus(status) {
|
|
10445
|
+
return status === "completed" || status === "failed" || status === "done" || status === "dead";
|
|
10446
|
+
}
|
|
10447
|
+
function isTerminalDocumentStatus(status) {
|
|
10448
|
+
return status === "done" || status === "failed" || status === "deleted" || status === "ready";
|
|
10449
|
+
}
|
|
10450
|
+
var DEFAULT_CONFIG = {
|
|
10451
|
+
baseUrl: "http://localhost:3850",
|
|
10452
|
+
timeoutMs: 1e4,
|
|
10453
|
+
retries: 2,
|
|
10454
|
+
retryDelayMs: 500
|
|
10455
|
+
};
|
|
10456
|
+
var IDEMPOTENT_METHODS = new Set(["GET", "HEAD", "OPTIONS"]);
|
|
10457
|
+
|
|
10458
|
+
class SignetTransport {
|
|
10459
|
+
config;
|
|
10460
|
+
constructor(config) {
|
|
10461
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
10462
|
+
}
|
|
10463
|
+
async request(method, path, opts) {
|
|
10464
|
+
const url = this.buildUrl(path, opts?.query);
|
|
10465
|
+
const headers = {
|
|
10466
|
+
...this.config.headers
|
|
10467
|
+
};
|
|
10468
|
+
if (opts?.body !== undefined) {
|
|
10469
|
+
headers["Content-Type"] = "application/json";
|
|
10470
|
+
}
|
|
10471
|
+
const canRetry = IDEMPOTENT_METHODS.has(method.toUpperCase());
|
|
10472
|
+
const maxAttempts = canRetry ? this.config.retries + 1 : 1;
|
|
10473
|
+
let lastError;
|
|
10474
|
+
for (let attempt = 0;attempt < maxAttempts; attempt++) {
|
|
10475
|
+
if (attempt > 0) {
|
|
10476
|
+
await sleep(this.config.retryDelayMs * attempt);
|
|
10477
|
+
}
|
|
10478
|
+
try {
|
|
10479
|
+
const response = await fetch(url, {
|
|
10480
|
+
method,
|
|
10481
|
+
headers,
|
|
10482
|
+
body: opts?.body !== undefined ? JSON.stringify(opts.body) : undefined,
|
|
10483
|
+
signal: opts?.signal ?? AbortSignal.timeout(this.config.timeoutMs)
|
|
10484
|
+
});
|
|
10485
|
+
if (!response.ok) {
|
|
10486
|
+
const body = await parseResponseBody(response);
|
|
10487
|
+
throw new SignetApiError(response.status, body);
|
|
10488
|
+
}
|
|
10489
|
+
return await parseResponseBody(response);
|
|
10490
|
+
} catch (error) {
|
|
10491
|
+
if (error instanceof SignetApiError) {
|
|
10492
|
+
throw error;
|
|
10493
|
+
}
|
|
10494
|
+
if (error instanceof DOMException && error.name === "TimeoutError") {
|
|
10495
|
+
lastError = new SignetTimeoutError(this.config.timeoutMs);
|
|
10496
|
+
} else if (error instanceof Error) {
|
|
10497
|
+
lastError = new SignetNetworkError(error.message, error);
|
|
10498
|
+
} else {
|
|
10499
|
+
lastError = new SignetNetworkError("Unknown network error", new Error(String(error)));
|
|
10500
|
+
}
|
|
10501
|
+
}
|
|
10502
|
+
}
|
|
10503
|
+
throw lastError;
|
|
10504
|
+
}
|
|
10505
|
+
async get(path, query) {
|
|
10506
|
+
return this.request("GET", path, { query });
|
|
10507
|
+
}
|
|
10508
|
+
async post(path, body) {
|
|
10509
|
+
return this.request("POST", path, { body });
|
|
10510
|
+
}
|
|
10511
|
+
async patch(path, body) {
|
|
10512
|
+
return this.request("PATCH", path, { body });
|
|
10513
|
+
}
|
|
10514
|
+
async del(path, query) {
|
|
10515
|
+
return this.request("DELETE", path, { query });
|
|
10516
|
+
}
|
|
10517
|
+
buildUrl(path, query) {
|
|
10518
|
+
const base = trimTrailingSlashes(this.config.baseUrl);
|
|
10519
|
+
const url = new URL(`${base}${path}`);
|
|
10520
|
+
if (query) {
|
|
10521
|
+
for (const [key, value] of Object.entries(query)) {
|
|
10522
|
+
if (value !== undefined) {
|
|
10523
|
+
url.searchParams.set(key, String(value));
|
|
10524
|
+
}
|
|
10525
|
+
}
|
|
10526
|
+
}
|
|
10527
|
+
return url.toString();
|
|
10528
|
+
}
|
|
10529
|
+
}
|
|
10530
|
+
function trimTrailingSlashes(s) {
|
|
10531
|
+
let end = s.length;
|
|
10532
|
+
while (end > 0 && s[end - 1] === "/") {
|
|
10533
|
+
end--;
|
|
10534
|
+
}
|
|
10535
|
+
return s.slice(0, end);
|
|
10536
|
+
}
|
|
10537
|
+
function sleep(ms) {
|
|
10538
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10539
|
+
}
|
|
10540
|
+
function isJsonContentType(contentType) {
|
|
10541
|
+
if (!contentType)
|
|
10542
|
+
return false;
|
|
10543
|
+
const normalized = contentType.toLowerCase();
|
|
10544
|
+
return normalized.includes("application/json") || normalized.includes("+json");
|
|
10545
|
+
}
|
|
10546
|
+
async function parseResponseBody(response) {
|
|
10547
|
+
if (response.status === 204 || response.status === 205) {
|
|
10548
|
+
return;
|
|
10549
|
+
}
|
|
10550
|
+
const text = await response.text();
|
|
10551
|
+
if (text.length === 0) {
|
|
10552
|
+
return;
|
|
10553
|
+
}
|
|
10554
|
+
if (isJsonContentType(response.headers.get("content-type"))) {
|
|
10555
|
+
try {
|
|
10556
|
+
return JSON.parse(text);
|
|
10557
|
+
} catch {
|
|
10558
|
+
return text;
|
|
10559
|
+
}
|
|
10560
|
+
}
|
|
10561
|
+
return text;
|
|
10562
|
+
}
|
|
10563
|
+
|
|
10564
|
+
class SignetClient extends SignetClientHelpers {
|
|
10565
|
+
constructor(config) {
|
|
10566
|
+
const headers = {};
|
|
10567
|
+
if (config?.token) {
|
|
10568
|
+
headers.Authorization = `Bearer ${config.token}`;
|
|
10569
|
+
}
|
|
10570
|
+
if (config?.actor) {
|
|
10571
|
+
headers["x-signet-actor"] = config.actor;
|
|
10572
|
+
}
|
|
10573
|
+
if (config?.actorType) {
|
|
10574
|
+
headers["x-signet-actor-type"] = config.actorType;
|
|
10575
|
+
}
|
|
10576
|
+
const transport = new SignetTransport({
|
|
10577
|
+
baseUrl: config?.daemonUrl ?? "http://localhost:3850",
|
|
10578
|
+
timeoutMs: config?.timeoutMs ?? 1e4,
|
|
10579
|
+
retries: config?.retries ?? 2,
|
|
10580
|
+
headers: Object.keys(headers).length > 0 ? headers : undefined
|
|
10581
|
+
});
|
|
10582
|
+
super(transport);
|
|
10583
|
+
}
|
|
10584
|
+
async remember(content, opts) {
|
|
10585
|
+
return this.transport.post("/api/memory/remember", {
|
|
10586
|
+
content,
|
|
10587
|
+
...opts
|
|
10588
|
+
});
|
|
10589
|
+
}
|
|
10590
|
+
async recall(query, opts) {
|
|
10591
|
+
return applyRecallMinScore(await this.transport.post("/api/memory/recall", {
|
|
10592
|
+
query,
|
|
10593
|
+
...opts
|
|
10594
|
+
}), opts?.minScore);
|
|
10595
|
+
}
|
|
10596
|
+
async getMemory(id) {
|
|
10597
|
+
return this.transport.get(`/api/memory/${id}`);
|
|
10598
|
+
}
|
|
10599
|
+
async listMemories(opts) {
|
|
10600
|
+
return this.transport.get("/api/memories", {
|
|
10601
|
+
limit: opts?.limit,
|
|
10602
|
+
offset: opts?.offset,
|
|
10603
|
+
type: opts?.type
|
|
10604
|
+
});
|
|
10605
|
+
}
|
|
10606
|
+
async modifyMemory(id, patch) {
|
|
10607
|
+
const { ifVersion, ...rest } = patch;
|
|
10608
|
+
return this.transport.patch(`/api/memory/${id}`, {
|
|
10609
|
+
...rest,
|
|
10610
|
+
if_version: ifVersion
|
|
10611
|
+
});
|
|
10612
|
+
}
|
|
10613
|
+
async forgetMemory(id, opts) {
|
|
10614
|
+
return this.transport.del(`/api/memory/${id}`, {
|
|
10615
|
+
reason: opts.reason,
|
|
10616
|
+
force: opts.force,
|
|
10617
|
+
if_version: opts.ifVersion
|
|
10618
|
+
});
|
|
10619
|
+
}
|
|
10620
|
+
async batchForget(opts) {
|
|
10621
|
+
return this.transport.post("/api/memory/forget", opts);
|
|
10622
|
+
}
|
|
10623
|
+
async batchModify(patches, opts) {
|
|
10624
|
+
const mapped = patches.map(({ ifVersion, ...rest }) => ({
|
|
10625
|
+
...rest,
|
|
10626
|
+
if_version: ifVersion
|
|
10627
|
+
}));
|
|
10628
|
+
return this.transport.post("/api/memory/modify", {
|
|
10629
|
+
patches: mapped,
|
|
10630
|
+
...opts
|
|
10631
|
+
});
|
|
10632
|
+
}
|
|
10633
|
+
async getHistory(memoryId, opts) {
|
|
10634
|
+
return this.transport.get(`/api/memory/${memoryId}/history`, { limit: opts?.limit });
|
|
10635
|
+
}
|
|
10636
|
+
async recoverMemory(id, opts) {
|
|
10637
|
+
return this.transport.post(`/api/memory/${id}/recover`, {
|
|
10638
|
+
reason: opts?.reason,
|
|
10639
|
+
if_version: opts?.ifVersion
|
|
10640
|
+
});
|
|
10641
|
+
}
|
|
10642
|
+
async getJob(jobId) {
|
|
10643
|
+
return this.transport.get(`/api/memory/jobs/${jobId}`);
|
|
10644
|
+
}
|
|
10645
|
+
async createDocument(opts) {
|
|
10646
|
+
return this.transport.post("/api/documents", opts);
|
|
10647
|
+
}
|
|
10648
|
+
async getDocument(id) {
|
|
10649
|
+
return this.transport.get(`/api/documents/${id}`);
|
|
10650
|
+
}
|
|
10651
|
+
async listDocuments(opts) {
|
|
10652
|
+
return this.transport.get("/api/documents", {
|
|
10653
|
+
status: opts?.status,
|
|
10654
|
+
limit: opts?.limit,
|
|
10655
|
+
offset: opts?.offset
|
|
10656
|
+
});
|
|
10657
|
+
}
|
|
10658
|
+
async getDocumentChunks(id) {
|
|
10659
|
+
return this.transport.get(`/api/documents/${id}/chunks`);
|
|
10660
|
+
}
|
|
10661
|
+
async deleteDocument(id, reason) {
|
|
10662
|
+
return this.transport.del(`/api/documents/${id}`, { reason });
|
|
10663
|
+
}
|
|
10664
|
+
async health() {
|
|
10665
|
+
return this.transport.get("/health");
|
|
10666
|
+
}
|
|
10667
|
+
async status() {
|
|
10668
|
+
return this.transport.get("/api/status");
|
|
10669
|
+
}
|
|
10670
|
+
async diagnostics(domain) {
|
|
10671
|
+
const path = domain ? `/api/diagnostics/${domain}` : "/api/diagnostics";
|
|
10672
|
+
return this.transport.get(path);
|
|
10673
|
+
}
|
|
10674
|
+
async createToken(opts) {
|
|
10675
|
+
return this.transport.post("/api/auth/token", opts);
|
|
10676
|
+
}
|
|
10677
|
+
async whoami() {
|
|
10678
|
+
return this.transport.get("/api/auth/whoami");
|
|
10679
|
+
}
|
|
10680
|
+
async getTimeline(entityId) {
|
|
10681
|
+
return this.transport.get(`/api/timeline/${entityId}`);
|
|
10682
|
+
}
|
|
10683
|
+
async exportTimeline(entityId) {
|
|
10684
|
+
return this.transport.get(`/api/timeline/${entityId}/export`);
|
|
10685
|
+
}
|
|
10686
|
+
async getPipelineStatus() {
|
|
10687
|
+
return this.transport.get("/api/pipeline/status");
|
|
10688
|
+
}
|
|
10689
|
+
async getTelemetryEvents(opts) {
|
|
10690
|
+
return this.transport.get("/api/telemetry/events", {
|
|
10691
|
+
event: opts?.event,
|
|
10692
|
+
since: opts?.since,
|
|
10693
|
+
until: opts?.until,
|
|
10694
|
+
limit: opts?.limit
|
|
10695
|
+
});
|
|
10696
|
+
}
|
|
10697
|
+
async getTelemetryStats(opts) {
|
|
10698
|
+
return this.transport.get("/api/telemetry/stats", {
|
|
10699
|
+
since: opts?.since
|
|
10700
|
+
});
|
|
10701
|
+
}
|
|
10702
|
+
async exportTelemetry(opts) {
|
|
10703
|
+
return this.transport.get("/api/telemetry/export", {
|
|
10704
|
+
since: opts?.since,
|
|
10705
|
+
limit: opts?.limit
|
|
10706
|
+
});
|
|
10707
|
+
}
|
|
10708
|
+
async listConfig() {
|
|
10709
|
+
return this.transport.get("/api/config");
|
|
10710
|
+
}
|
|
10711
|
+
async writeConfig(file, content) {
|
|
10712
|
+
return this.transport.post("/api/config", {
|
|
10713
|
+
file,
|
|
10714
|
+
content
|
|
10715
|
+
});
|
|
10716
|
+
}
|
|
10717
|
+
async getIdentity() {
|
|
10718
|
+
return this.transport.get("/api/identity");
|
|
10719
|
+
}
|
|
10720
|
+
async getEmbeddingStatus() {
|
|
10721
|
+
return this.transport.get("/api/embeddings/status");
|
|
10722
|
+
}
|
|
10723
|
+
async getEmbeddingHealth() {
|
|
10724
|
+
return this.transport.get("/api/embeddings/health");
|
|
10725
|
+
}
|
|
10726
|
+
async getEmbeddingProjection(opts) {
|
|
10727
|
+
return this.transport.get("/api/embeddings/projection", {
|
|
10728
|
+
dimensions: opts?.dimensions
|
|
10729
|
+
});
|
|
10730
|
+
}
|
|
10731
|
+
async listHarnesses() {
|
|
10732
|
+
return this.transport.get("/api/harnesses");
|
|
10733
|
+
}
|
|
10734
|
+
async regenerateHarnesses() {
|
|
10735
|
+
return this.transport.post("/api/harnesses/regenerate", {});
|
|
10736
|
+
}
|
|
10737
|
+
async listCheckpoints(opts) {
|
|
10738
|
+
return this.transport.get("/api/checkpoints", {
|
|
10739
|
+
project: opts.project,
|
|
10740
|
+
limit: opts.limit
|
|
10741
|
+
});
|
|
10742
|
+
}
|
|
10743
|
+
async listSessionCheckpoints(sessionKey) {
|
|
10744
|
+
return this.transport.get(`/api/checkpoints/${sessionKey}`);
|
|
10745
|
+
}
|
|
10746
|
+
async getFeatures() {
|
|
10747
|
+
return this.transport.get("/api/features");
|
|
10748
|
+
}
|
|
10749
|
+
async getGreeting() {
|
|
10750
|
+
return this.transport.get("/api/home/greeting");
|
|
10751
|
+
}
|
|
10752
|
+
async listSessions() {
|
|
10753
|
+
return this.transport.get("/api/sessions");
|
|
10754
|
+
}
|
|
10755
|
+
async getSession(key) {
|
|
10756
|
+
return this.transport.get(`/api/sessions/${key}`);
|
|
10757
|
+
}
|
|
10758
|
+
async setSessionBypass(key, enabled) {
|
|
10759
|
+
return this.transport.post(`/api/sessions/${key}/bypass`, { enabled });
|
|
10760
|
+
}
|
|
10761
|
+
async getGitStatus() {
|
|
10762
|
+
return this.transport.get("/api/git/status");
|
|
10763
|
+
}
|
|
10764
|
+
async gitPull() {
|
|
10765
|
+
return this.transport.post("/api/git/pull", {});
|
|
10766
|
+
}
|
|
10767
|
+
async gitPush() {
|
|
10768
|
+
return this.transport.post("/api/git/push", {});
|
|
10769
|
+
}
|
|
10770
|
+
async gitSync() {
|
|
10771
|
+
return this.transport.post("/api/git/sync", {});
|
|
10772
|
+
}
|
|
10773
|
+
async getGitConfig() {
|
|
10774
|
+
return this.transport.get("/api/git/config");
|
|
10775
|
+
}
|
|
10776
|
+
async updateGitConfig(patch) {
|
|
10777
|
+
return this.transport.post("/api/git/config", patch);
|
|
10778
|
+
}
|
|
10779
|
+
async listTasks() {
|
|
10780
|
+
return this.transport.get("/api/tasks");
|
|
10781
|
+
}
|
|
10782
|
+
async createTask(payload) {
|
|
10783
|
+
return this.transport.post("/api/tasks", payload);
|
|
10784
|
+
}
|
|
10785
|
+
async getTask(id) {
|
|
10786
|
+
return this.transport.get(`/api/tasks/${id}`);
|
|
10787
|
+
}
|
|
10788
|
+
async updateTask(id, patch) {
|
|
10789
|
+
return this.transport.patch(`/api/tasks/${id}`, patch);
|
|
10790
|
+
}
|
|
10791
|
+
async deleteTask(id) {
|
|
10792
|
+
return this.transport.del(`/api/tasks/${id}`);
|
|
10793
|
+
}
|
|
10794
|
+
async runTask(id) {
|
|
10795
|
+
return this.transport.post(`/api/tasks/${id}/run`, {});
|
|
10796
|
+
}
|
|
10797
|
+
async listTaskRuns(id, opts) {
|
|
10798
|
+
return this.transport.get(`/api/tasks/${id}/runs`, {
|
|
10799
|
+
limit: opts?.limit,
|
|
10800
|
+
offset: opts?.offset
|
|
10801
|
+
});
|
|
10802
|
+
}
|
|
10803
|
+
async listSecrets() {
|
|
10804
|
+
return this.transport.get("/api/secrets");
|
|
10805
|
+
}
|
|
10806
|
+
async storeSecret(name, value) {
|
|
10807
|
+
return this.transport.post(`/api/secrets/${name}`, { value });
|
|
10808
|
+
}
|
|
10809
|
+
async deleteSecret(name) {
|
|
10810
|
+
return this.transport.del(`/api/secrets/${name}`);
|
|
10811
|
+
}
|
|
10812
|
+
async execWithSecrets(command, secrets) {
|
|
10813
|
+
return this.transport.post("/api/secrets/exec", {
|
|
10814
|
+
command,
|
|
10815
|
+
secrets
|
|
10816
|
+
});
|
|
10817
|
+
}
|
|
10818
|
+
async getOnePasswordStatus() {
|
|
10819
|
+
return this.transport.get("/api/secrets/1password/status");
|
|
10820
|
+
}
|
|
10821
|
+
async connectOnePassword(token) {
|
|
10822
|
+
return this.transport.post("/api/secrets/1password/connect", { token });
|
|
10823
|
+
}
|
|
10824
|
+
async disconnectOnePassword() {
|
|
10825
|
+
return this.transport.del("/api/secrets/1password/connect");
|
|
10826
|
+
}
|
|
10827
|
+
async listOnePasswordVaults() {
|
|
10828
|
+
return this.transport.get("/api/secrets/1password/vaults");
|
|
10829
|
+
}
|
|
10830
|
+
async importOnePasswordSecrets(opts) {
|
|
10831
|
+
return this.transport.post("/api/secrets/1password/import", opts);
|
|
10832
|
+
}
|
|
10833
|
+
async listPlugins() {
|
|
10834
|
+
return this.transport.get("/api/plugins");
|
|
10835
|
+
}
|
|
10836
|
+
async getPlugin(id) {
|
|
10837
|
+
return this.transport.get(`/api/plugins/${id}`);
|
|
10838
|
+
}
|
|
10839
|
+
async getPluginDiagnostics(id) {
|
|
10840
|
+
return this.transport.get(`/api/plugins/${id}/diagnostics`);
|
|
10841
|
+
}
|
|
10842
|
+
async listPluginPromptContributions() {
|
|
10843
|
+
return this.transport.get("/api/plugins/prompt-contributions");
|
|
10844
|
+
}
|
|
10845
|
+
async listPluginAuditEvents(opts) {
|
|
10846
|
+
return this.transport.get("/api/plugins/audit", {
|
|
10847
|
+
pluginId: opts?.pluginId,
|
|
10848
|
+
event: opts?.event,
|
|
10849
|
+
since: opts?.since,
|
|
10850
|
+
until: opts?.until,
|
|
10851
|
+
limit: opts?.limit
|
|
10852
|
+
});
|
|
10853
|
+
}
|
|
10854
|
+
async listSkills() {
|
|
10855
|
+
return this.transport.get("/api/skills");
|
|
10856
|
+
}
|
|
10857
|
+
async browseSkills() {
|
|
10858
|
+
return this.transport.get("/api/skills/browse");
|
|
10859
|
+
}
|
|
10860
|
+
async searchSkills(query) {
|
|
10861
|
+
return this.transport.get("/api/skills/search", { q: query });
|
|
10862
|
+
}
|
|
10863
|
+
async getSkill(name, source) {
|
|
10864
|
+
return this.transport.get(`/api/skills/${name}`, {
|
|
10865
|
+
source
|
|
10866
|
+
});
|
|
10867
|
+
}
|
|
10868
|
+
async installSkill(name, source) {
|
|
10869
|
+
return this.transport.post("/api/skills/install", {
|
|
10870
|
+
name,
|
|
10871
|
+
source
|
|
10872
|
+
});
|
|
10873
|
+
}
|
|
10874
|
+
async uninstallSkill(name) {
|
|
10875
|
+
return this.transport.del(`/api/skills/${name}`);
|
|
10876
|
+
}
|
|
10877
|
+
}
|
|
10878
|
+
for (const key of Reflect.ownKeys(SignetClientP2.prototype)) {
|
|
10879
|
+
if (key === "constructor")
|
|
10880
|
+
continue;
|
|
10881
|
+
const descriptor = Object.getOwnPropertyDescriptor(SignetClientP2.prototype, key);
|
|
10882
|
+
if (descriptor) {
|
|
10883
|
+
Object.defineProperty(SignetClient.prototype, key, descriptor);
|
|
10884
|
+
}
|
|
10885
|
+
}
|
|
10886
|
+
|
|
10100
10887
|
// ../../../node_modules/.bun/@sinclair+typebox@0.34.47/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
10101
10888
|
var exports_value = {};
|
|
10102
10889
|
__export(exports_value, {
|
|
@@ -12974,21 +13761,22 @@ async function onCompactionComplete(harness, summary, options = {}) {
|
|
|
12974
13761
|
return result?.success === true;
|
|
12975
13762
|
}
|
|
12976
13763
|
async function onSessionEnd(harness, options = {}) {
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
13764
|
+
new SignetClient({
|
|
13765
|
+
daemonUrl: options.daemonUrl || DEFAULT_DAEMON_URL,
|
|
13766
|
+
retries: 0,
|
|
13767
|
+
timeoutMs: WRITE_TIMEOUT
|
|
13768
|
+
}).sessionEndFireAndForget({
|
|
13769
|
+
harness,
|
|
13770
|
+
agentId: options.agentId,
|
|
13771
|
+
transcriptPath: options.transcriptPath,
|
|
13772
|
+
...options.transcript && { transcript: options.transcript },
|
|
13773
|
+
sessionKey: options.sessionKey,
|
|
13774
|
+
sessionId: options.sessionId,
|
|
13775
|
+
cwd: options.cwd,
|
|
13776
|
+
reason: options.reason,
|
|
13777
|
+
runtimePath: RUNTIME_PATH
|
|
12991
13778
|
});
|
|
13779
|
+
return null;
|
|
12992
13780
|
}
|
|
12993
13781
|
async function memoryRecall(query, options = {}) {
|
|
12994
13782
|
const daemonUrl = options.daemonUrl || DEFAULT_DAEMON_URL;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/signet-memory-openclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.111.0",
|
|
4
4
|
"description": "Signet adapter for OpenClaw — runtime plugin for AI agent memory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"@sinclair/typebox": "0.34.47"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@signet/core": "0.
|
|
39
|
+
"@signet/core": "0.111.0",
|
|
40
|
+
"@signet/sdk": "0.111.0",
|
|
40
41
|
"@types/node": "^22.0.0"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|