@aperdomoll90/ledger-ai 1.1.2 → 1.1.3

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.
@@ -27,6 +27,13 @@ const DESCRIPTIONS = {
27
27
  writeInterception: 'Auto-ingest files written to memory directory into Ledger',
28
28
  sessionEndCheck: 'Check for unsynced files at session end',
29
29
  };
30
+ const NAMING_DESCRIPTIONS = {
31
+ 'naming.enforce': 'Validate upsert_key format on note creation',
32
+ 'naming.interactive': 'Prompt for missing metadata when creating notes (default: true)',
33
+ };
34
+ const DEVICE_DESCRIPTIONS = {
35
+ 'device.alias': 'Name for this device',
36
+ };
30
37
  export async function configGet(key) {
31
38
  const config = loadFullConfig();
32
39
  if (key === 'all') {
@@ -44,6 +51,20 @@ export async function configGet(key) {
44
51
  console.log(`${key}: ${config[key]}`);
45
52
  return;
46
53
  }
54
+ // Check naming settings
55
+ if (key === 'naming.enforce') {
56
+ console.log(`naming.enforce: ${config.naming?.enforce ?? false}`);
57
+ return;
58
+ }
59
+ if (key === 'naming.interactive') {
60
+ console.log(`naming.interactive: ${config.naming?.interactive ?? true} (default: true)`);
61
+ return;
62
+ }
63
+ // Check device
64
+ if (key === 'device.alias') {
65
+ console.log(`device.alias: ${config.device?.alias || '(not set)'}`);
66
+ return;
67
+ }
47
68
  // Show default
48
69
  const defaults = {
49
70
  envBlocking: true,
@@ -55,8 +76,9 @@ export async function configGet(key) {
55
76
  console.log(`${key}: ${defaults[key]} (default)`);
56
77
  return;
57
78
  }
79
+ const allKeys = [...Object.keys(DESCRIPTIONS), ...Object.keys(NAMING_DESCRIPTIONS), ...Object.keys(DEVICE_DESCRIPTIONS), 'memoryDir', 'claudeMdPath', 'all'];
58
80
  console.error(`Unknown config key: ${key}`);
59
- console.error(`Available: ${Object.keys(DESCRIPTIONS).join(', ')}, memoryDir, claudeMdPath, all`);
81
+ console.error(`Available: ${allKeys.join(', ')}`);
60
82
  process.exit(1);
61
83
  }
62
84
  export async function configSet(key, value) {
@@ -88,6 +110,25 @@ export async function configSet(key, value) {
88
110
  console.error('Run `ledger setup claude-code` to apply hook changes.');
89
111
  return;
90
112
  }
113
+ // Handle naming settings
114
+ const namingKeys = ['naming.enforce', 'naming.interactive'];
115
+ if (namingKeys.includes(key)) {
116
+ const boolValue = value === 'true';
117
+ if (!config.naming)
118
+ config.naming = {};
119
+ const field = key.split('.')[1];
120
+ config.naming[field] = boolValue;
121
+ saveConfig(config);
122
+ console.error(`${key}: ${boolValue ? 'enabled' : 'disabled'}`);
123
+ return;
124
+ }
125
+ // Handle device alias
126
+ if (key === 'device.alias') {
127
+ config.device = { alias: value };
128
+ saveConfig(config);
129
+ console.error(`device.alias: ${value}`);
130
+ return;
131
+ }
91
132
  // Handle path settings
92
133
  if (key === 'memoryDir' || key === 'claudeMdPath') {
93
134
  config[key] = value;
@@ -95,8 +136,9 @@ export async function configSet(key, value) {
95
136
  console.error(`${key}: ${value}`);
96
137
  return;
97
138
  }
139
+ const allKeys = [...hookKeys, ...namingKeys, 'device.alias', 'memoryDir', 'claudeMdPath'];
98
140
  console.error(`Unknown config key: ${key}`);
99
- console.error(`Available: ${hookKeys.join(', ')}, memoryDir, claudeMdPath`);
141
+ console.error(`Available: ${allKeys.join(', ')}`);
100
142
  process.exit(1);
101
143
  }
102
144
  export async function configList() {
@@ -108,6 +150,16 @@ export async function configList() {
108
150
  const state = value ? 'enabled' : 'DISABLED';
109
151
  console.error(` ${key}: ${state} — ${desc}`);
110
152
  }
153
+ console.error('\nNaming settings:');
154
+ for (const [key, desc] of Object.entries(NAMING_DESCRIPTIONS)) {
155
+ const field = key.split('.')[1];
156
+ const defaultVal = field === 'interactive' ? true : false;
157
+ const value = config.naming?.[field] ?? defaultVal;
158
+ const state = value ? 'enabled' : 'DISABLED';
159
+ console.error(` ${key}: ${state} — ${desc}`);
160
+ }
161
+ console.error('\nDevice:');
162
+ console.error(` device.alias: ${config.device?.alias || '(not set)'}`);
111
163
  console.error('\nPaths:');
112
164
  console.error(` memoryDir: ${config.memoryDir || '(default)'}`);
113
165
  console.error(` claudeMdPath: ${config.claudeMdPath || '(default)'}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aperdomoll90/ledger-ai",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "AI identity and memory system — portable persona, knowledge sync, semantic search across agents and devices",
5
5
  "type": "module",
6
6
  "bin": {