@signetai/signet-memory-openclaw 0.141.0 → 0.142.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.
Files changed (2) hide show
  1. package/dist/index.js +34 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10379,6 +10379,7 @@ function defaultDiscordDesktopCachePath() {
10379
10379
  return resolve3(process.env.XDG_CONFIG_HOME || resolve3(homedir3(), ".config"), "discord");
10380
10380
  }
10381
10381
  }
10382
+ var IDENTITY_MODES = ["managed", "passthrough", "off"];
10382
10383
  var IDENTITY_FILES = {
10383
10384
  agents: {
10384
10385
  path: "AGENTS.md",
@@ -10498,6 +10499,35 @@ function isSafeRelativeIdentityPath(path) {
10498
10499
  function readRecord(value) {
10499
10500
  return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
10500
10501
  }
10502
+ function isIdentityMode(value) {
10503
+ return typeof value === "string" && IDENTITY_MODES.includes(value);
10504
+ }
10505
+ function resolveIdentityModeFromConfig(config) {
10506
+ const root = readRecord(config);
10507
+ const capabilities = readRecord(root.capabilities);
10508
+ const capabilityIdentity = readRecord(capabilities.identity);
10509
+ if (isIdentityMode(capabilityIdentity.mode))
10510
+ return capabilityIdentity.mode;
10511
+ const identity = readRecord(root.identity);
10512
+ if (isIdentityMode(identity.mode))
10513
+ return identity.mode;
10514
+ if (identity.enabled === false)
10515
+ return "off";
10516
+ return "managed";
10517
+ }
10518
+ function loadIdentityMode(agentsDir) {
10519
+ const agentYaml = join10(agentsDir, "agent.yaml");
10520
+ if (!existsSync10(agentYaml))
10521
+ return "managed";
10522
+ try {
10523
+ return resolveIdentityModeFromConfig(parseSimpleYaml(readFileSync8(agentYaml, "utf-8")));
10524
+ } catch {
10525
+ return "managed";
10526
+ }
10527
+ }
10528
+ function identityModeReadsFiles(mode) {
10529
+ return mode !== "off";
10530
+ }
10501
10531
  function readIdentityEntry(value) {
10502
10532
  if (typeof value === "string") {
10503
10533
  return isSafeRelativeIdentityPath(value) ? { path: value } : null;
@@ -10528,6 +10558,8 @@ function resolveStartupIdentityFiles(agentsDir) {
10528
10558
  return STATIC_BUDGETS.map(({ file, budget }) => ({ path: file, budget }));
10529
10559
  try {
10530
10560
  const config = parseSimpleYaml(readFileSync8(agentYaml, "utf-8"));
10561
+ if (!identityModeReadsFiles(resolveIdentityModeFromConfig(config)))
10562
+ return [];
10531
10563
  const identity = readRecord(config.identity);
10532
10564
  const startup = readRecord(identity.startup);
10533
10565
  const configured = readIdentityEntryList(startup.load);
@@ -10555,6 +10587,8 @@ function resolveSessionStartTimeoutMs(raw) {
10555
10587
  function readStaticIdentity(agentsDir, status = STATIC_IDENTITY_OFFLINE_STATUS) {
10556
10588
  if (!existsSync10(agentsDir))
10557
10589
  return null;
10590
+ if (!identityModeReadsFiles(loadIdentityMode(agentsDir)))
10591
+ return null;
10558
10592
  const parts = [];
10559
10593
  for (const entry of resolveStartupIdentityFiles(agentsDir)) {
10560
10594
  const path = join10(agentsDir, entry.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/signet-memory-openclaw",
3
- "version": "0.141.0",
3
+ "version": "0.142.1",
4
4
  "description": "Signet adapter for OpenClaw — runtime plugin for AI agent memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",