@stackmemoryai/stackmemory 0.3.5 → 0.3.6

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.
@@ -0,0 +1,240 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import ora from "ora";
4
+ import Table from "cli-table3";
5
+ import { InfiniteStorageSystem } from "../../core/storage/infinite-storage.js";
6
+ import { FrameManager } from "../../core/context/frame-manager.js";
7
+ import { Logger } from "../../core/monitoring/logger.js";
8
+ import dotenv from "dotenv";
9
+ import path from "path";
10
+ import { fileURLToPath } from "url";
11
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
+ dotenv.config({
13
+ path: path.join(__dirname, "../../../.env"),
14
+ override: true,
15
+ silent: true
16
+ });
17
+ const logger = new Logger("InfiniteStorage-CLI");
18
+ function createInfiniteStorageCommand() {
19
+ const storage = new Command("infinite-storage").description("Manage infinite storage system with tiered storage").alias("storage");
20
+ storage.command("init").description("Initialize infinite storage system").option("--redis-url <url>", "Redis connection URL").option("--timeseries-url <url>", "TimeSeries DB connection URL").option("--s3-bucket <bucket>", "S3 bucket name").option("--s3-region <region>", "S3 region", "us-east-1").action(async (options) => {
21
+ const spinner = ora("Initializing infinite storage...").start();
22
+ try {
23
+ const config = {
24
+ redis: {
25
+ url: options.redisUrl || process.env.REDIS_URL || "redis://localhost:6379",
26
+ ttlSeconds: 3600,
27
+ maxMemoryMB: parseInt(process.env.REDIS_MAX_MEMORY_MB || "512")
28
+ },
29
+ timeseries: {
30
+ connectionString: options.timeseriesUrl || process.env.TIMESERIES_URL || "",
31
+ retentionDays: 30
32
+ },
33
+ s3: {
34
+ bucket: options.s3Bucket || process.env.S3_BUCKET || "",
35
+ region: options.s3Region || process.env.AWS_REGION || "us-east-1",
36
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID,
37
+ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
38
+ },
39
+ tiers: []
40
+ };
41
+ const storage2 = new InfiniteStorageSystem(config);
42
+ await storage2.initialize();
43
+ spinner.succeed("Infinite storage initialized");
44
+ console.log(chalk.green("\n\u2705 Storage Tiers Configured:"));
45
+ console.log(" Hot (Redis): < 1 hour, 5ms latency");
46
+ console.log(" Warm (TimeSeries): 1h - 7 days, 50ms latency");
47
+ console.log(" Cold (S3): 7 - 30 days, 100ms latency");
48
+ console.log(" Archive (Glacier): > 30 days, 1h latency");
49
+ const envPath = path.join(__dirname, "../../../.env");
50
+ const updates = [];
51
+ if (!process.env.REDIS_URL && options.redisUrl) {
52
+ updates.push(`REDIS_URL=${options.redisUrl}`);
53
+ }
54
+ if (!process.env.TIMESERIES_URL && options.timeseriesUrl) {
55
+ updates.push(`TIMESERIES_URL=${options.timeseriesUrl}`);
56
+ }
57
+ if (!process.env.S3_BUCKET && options.s3Bucket) {
58
+ updates.push(`S3_BUCKET=${options.s3Bucket}`);
59
+ }
60
+ if (updates.length > 0) {
61
+ const fs = await import("fs");
62
+ fs.appendFileSync(envPath, "\n# Infinite Storage Configuration\n" + updates.join("\n") + "\n");
63
+ }
64
+ } catch (error) {
65
+ spinner.fail("Failed to initialize storage");
66
+ logger.error("Initialization error", error);
67
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
68
+ }
69
+ });
70
+ storage.command("store").description("Store current frames in infinite storage").option("--project <name>", "Project name").option("--user <id>", "User ID").action(async (options) => {
71
+ const spinner = ora("Storing frames...").start();
72
+ try {
73
+ const config = getStorageConfig();
74
+ const storage2 = new InfiniteStorageSystem(config);
75
+ await storage2.initialize();
76
+ const frameManager = new FrameManager();
77
+ const frames = frameManager.getAllFrames();
78
+ const userId = options.user || process.env.USER || "default";
79
+ for (const frame of frames) {
80
+ await storage2.storeFrame(frame, userId);
81
+ }
82
+ spinner.succeed(`Stored ${frames.length} frames`);
83
+ } catch (error) {
84
+ spinner.fail("Failed to store frames");
85
+ logger.error("Store error", error);
86
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
87
+ }
88
+ });
89
+ storage.command("retrieve <frameId>").description("Retrieve a frame from storage").option("--user <id>", "User ID").action(async (frameId, options) => {
90
+ const spinner = ora("Retrieving frame...").start();
91
+ try {
92
+ const config = getStorageConfig();
93
+ const storage2 = new InfiniteStorageSystem(config);
94
+ await storage2.initialize();
95
+ const userId = options.user || process.env.USER || "default";
96
+ const frame = await storage2.retrieveFrame(frameId, userId);
97
+ spinner.stop();
98
+ if (frame) {
99
+ console.log(chalk.green("\n\u2705 Frame Retrieved:"));
100
+ console.log(JSON.stringify(frame, null, 2));
101
+ } else {
102
+ console.log(chalk.yellow("Frame not found"));
103
+ }
104
+ } catch (error) {
105
+ spinner.fail("Failed to retrieve frame");
106
+ logger.error("Retrieve error", error);
107
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
108
+ }
109
+ });
110
+ storage.command("metrics").description("Show storage system metrics").action(async () => {
111
+ const spinner = ora("Fetching metrics...").start();
112
+ try {
113
+ const config = getStorageConfig();
114
+ const storage2 = new InfiniteStorageSystem(config);
115
+ await storage2.initialize();
116
+ const metrics = await storage2.getMetrics();
117
+ spinner.stop();
118
+ console.log(chalk.cyan("\n\u{1F4CA} Infinite Storage Metrics\n"));
119
+ const table = new Table({
120
+ head: ["Metric", "Value"],
121
+ colWidths: [30, 40]
122
+ });
123
+ table.push(
124
+ ["Total Objects", metrics.totalObjects.toString()],
125
+ ["Storage Size", formatBytes(metrics.storageBytes)],
126
+ ["Avg Latency", `${metrics.avgLatencyMs.toFixed(2)}ms`],
127
+ ["P50 Latency", `${metrics.p50LatencyMs}ms`],
128
+ ["P99 Latency", `${metrics.p99LatencyMs}ms`]
129
+ );
130
+ console.log(table.toString());
131
+ if (Object.keys(metrics.tierDistribution).length > 0) {
132
+ console.log("\nTier Distribution:");
133
+ for (const [tier, count] of Object.entries(metrics.tierDistribution)) {
134
+ const percentage = (count / metrics.totalObjects * 100).toFixed(1);
135
+ console.log(` ${tier}: ${count} objects (${percentage}%)`);
136
+ }
137
+ }
138
+ console.log(chalk.cyan("\n\u{1F3AF} STA-287 Performance Targets:"));
139
+ const p50Target = metrics.p50LatencyMs <= 50;
140
+ const p99Target = metrics.p99LatencyMs <= 500;
141
+ console.log(` P50 \u2264 50ms: ${p50Target ? chalk.green("\u2705 PASS") : chalk.red("\u274C FAIL")} (${metrics.p50LatencyMs}ms)`);
142
+ console.log(` P99 \u2264 500ms: ${p99Target ? chalk.green("\u2705 PASS") : chalk.red("\u274C FAIL")} (${metrics.p99LatencyMs}ms)`);
143
+ } catch (error) {
144
+ spinner.fail("Failed to get metrics");
145
+ logger.error("Metrics error", error);
146
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
147
+ }
148
+ });
149
+ storage.command("migrate").description("Manually trigger tier migration").action(async () => {
150
+ const spinner = ora("Running migration...").start();
151
+ try {
152
+ const config = getStorageConfig();
153
+ const storage2 = new InfiniteStorageSystem(config);
154
+ await storage2.initialize();
155
+ await storage2.migrateAgedData();
156
+ spinner.succeed("Migration completed");
157
+ } catch (error) {
158
+ spinner.fail("Migration failed");
159
+ logger.error("Migration error", error);
160
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
161
+ }
162
+ });
163
+ storage.command("status").description("Check storage system status").action(async () => {
164
+ const spinner = ora("Checking status...").start();
165
+ try {
166
+ const config = getStorageConfig();
167
+ spinner.stop();
168
+ console.log(chalk.cyan("\n\u{1F4E6} Storage System Status\n"));
169
+ if (config.redis?.url) {
170
+ try {
171
+ const { createClient } = await import("redis");
172
+ const client = createClient({ url: config.redis.url });
173
+ await client.connect();
174
+ await client.ping();
175
+ await client.quit();
176
+ console.log("Redis (Hot Tier): " + chalk.green("\u2705 Connected"));
177
+ } catch {
178
+ console.log("Redis (Hot Tier): " + chalk.red("\u274C Not connected"));
179
+ }
180
+ } else {
181
+ console.log("Redis (Hot Tier): " + chalk.yellow("\u26A0\uFE0F Not configured"));
182
+ }
183
+ if (config.timeseries?.connectionString) {
184
+ try {
185
+ const { Pool } = await import("pg");
186
+ const pool = new Pool({ connectionString: config.timeseries.connectionString });
187
+ await pool.query("SELECT 1");
188
+ await pool.end();
189
+ console.log("TimeSeries DB (Warm Tier): " + chalk.green("\u2705 Connected"));
190
+ } catch {
191
+ console.log("TimeSeries DB (Warm Tier): " + chalk.red("\u274C Not connected"));
192
+ }
193
+ } else {
194
+ console.log("TimeSeries DB (Warm Tier): " + chalk.yellow("\u26A0\uFE0F Not configured"));
195
+ }
196
+ if (config.s3?.bucket) {
197
+ console.log(`S3 (Cold/Archive Tier): ${chalk.green("\u2705")} Bucket: ${config.s3.bucket}`);
198
+ } else {
199
+ console.log("S3 (Cold/Archive Tier): " + chalk.yellow("\u26A0\uFE0F Not configured"));
200
+ }
201
+ console.log("\n" + chalk.gray("Configure missing tiers with: stackmemory infinite-storage init"));
202
+ } catch (error) {
203
+ spinner.fail("Failed to check status");
204
+ logger.error("Status error", error);
205
+ console.error(chalk.red(error instanceof Error ? error.message : "Unknown error"));
206
+ }
207
+ });
208
+ return storage;
209
+ }
210
+ function getStorageConfig() {
211
+ return {
212
+ redis: {
213
+ url: process.env.REDIS_URL || "redis://localhost:6379",
214
+ ttlSeconds: parseInt(process.env.REDIS_TTL || "3600"),
215
+ maxMemoryMB: parseInt(process.env.REDIS_MAX_MEMORY_MB || "512")
216
+ },
217
+ timeseries: {
218
+ connectionString: process.env.TIMESERIES_URL || "",
219
+ retentionDays: parseInt(process.env.TIMESERIES_RETENTION_DAYS || "30")
220
+ },
221
+ s3: {
222
+ bucket: process.env.S3_BUCKET || "",
223
+ region: process.env.AWS_REGION || "us-east-1",
224
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID,
225
+ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
226
+ },
227
+ tiers: []
228
+ };
229
+ }
230
+ function formatBytes(bytes) {
231
+ if (bytes === 0) return "0 Bytes";
232
+ const k = 1024;
233
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
234
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
235
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
236
+ }
237
+ export {
238
+ createInfiniteStorageCommand
239
+ };
240
+ //# sourceMappingURL=infinite-storage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/commands/infinite-storage.ts"],
4
+ "sourcesContent": ["/**\n * CLI commands for Infinite Storage System management\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport Table from 'cli-table3';\nimport { InfiniteStorageSystem, StorageConfig } from '../../core/storage/infinite-storage.js';\nimport { FrameManager } from '../../core/context/frame-manager.js';\nimport { Logger } from '../../core/monitoring/logger.js';\nimport dotenv from 'dotenv';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\n// Load environment variables\ndotenv.config({ \n path: path.join(__dirname, '../../../.env'),\n override: true,\n silent: true\n});\n\nconst logger = new Logger('InfiniteStorage-CLI');\n\nexport function createInfiniteStorageCommand(): Command {\n const storage = new Command('infinite-storage')\n .description('Manage infinite storage system with tiered storage')\n .alias('storage');\n\n // Initialize storage system\n storage\n .command('init')\n .description('Initialize infinite storage system')\n .option('--redis-url <url>', 'Redis connection URL')\n .option('--timeseries-url <url>', 'TimeSeries DB connection URL')\n .option('--s3-bucket <bucket>', 'S3 bucket name')\n .option('--s3-region <region>', 'S3 region', 'us-east-1')\n .action(async (options) => {\n const spinner = ora('Initializing infinite storage...').start();\n\n try {\n const config: StorageConfig = {\n redis: {\n url: options.redisUrl || process.env.REDIS_URL || 'redis://localhost:6379',\n ttlSeconds: 3600,\n maxMemoryMB: parseInt(process.env.REDIS_MAX_MEMORY_MB || '512'),\n },\n timeseries: {\n connectionString: options.timeseriesUrl || process.env.TIMESERIES_URL || '',\n retentionDays: 30,\n },\n s3: {\n bucket: options.s3Bucket || process.env.S3_BUCKET || '',\n region: options.s3Region || process.env.AWS_REGION || 'us-east-1',\n accessKeyId: process.env.AWS_ACCESS_KEY_ID,\n secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,\n },\n tiers: [],\n };\n\n const storage = new InfiniteStorageSystem(config);\n await storage.initialize();\n\n spinner.succeed('Infinite storage initialized');\n \n console.log(chalk.green('\\n\u2705 Storage Tiers Configured:'));\n console.log(' Hot (Redis): < 1 hour, 5ms latency');\n console.log(' Warm (TimeSeries): 1h - 7 days, 50ms latency');\n console.log(' Cold (S3): 7 - 30 days, 100ms latency');\n console.log(' Archive (Glacier): > 30 days, 1h latency');\n \n // Save config to env\n const envPath = path.join(__dirname, '../../../.env');\n const updates: string[] = [];\n \n if (!process.env.REDIS_URL && options.redisUrl) {\n updates.push(`REDIS_URL=${options.redisUrl}`);\n }\n if (!process.env.TIMESERIES_URL && options.timeseriesUrl) {\n updates.push(`TIMESERIES_URL=${options.timeseriesUrl}`);\n }\n if (!process.env.S3_BUCKET && options.s3Bucket) {\n updates.push(`S3_BUCKET=${options.s3Bucket}`);\n }\n \n if (updates.length > 0) {\n const fs = await import('fs');\n fs.appendFileSync(envPath, '\\n# Infinite Storage Configuration\\n' + updates.join('\\n') + '\\n');\n }\n } catch (error) {\n spinner.fail('Failed to initialize storage');\n logger.error('Initialization error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n // Store frames\n storage\n .command('store')\n .description('Store current frames in infinite storage')\n .option('--project <name>', 'Project name')\n .option('--user <id>', 'User ID')\n .action(async (options) => {\n const spinner = ora('Storing frames...').start();\n\n try {\n const config = getStorageConfig();\n const storage = new InfiniteStorageSystem(config);\n await storage.initialize();\n\n const frameManager = new FrameManager();\n const frames = frameManager.getAllFrames();\n const userId = options.user || process.env.USER || 'default';\n\n for (const frame of frames) {\n await storage.storeFrame(frame, userId);\n }\n\n spinner.succeed(`Stored ${frames.length} frames`);\n } catch (error) {\n spinner.fail('Failed to store frames');\n logger.error('Store error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n // Retrieve frame\n storage\n .command('retrieve <frameId>')\n .description('Retrieve a frame from storage')\n .option('--user <id>', 'User ID')\n .action(async (frameId, options) => {\n const spinner = ora('Retrieving frame...').start();\n\n try {\n const config = getStorageConfig();\n const storage = new InfiniteStorageSystem(config);\n await storage.initialize();\n\n const userId = options.user || process.env.USER || 'default';\n const frame = await storage.retrieveFrame(frameId, userId);\n\n spinner.stop();\n\n if (frame) {\n console.log(chalk.green('\\n\u2705 Frame Retrieved:'));\n console.log(JSON.stringify(frame, null, 2));\n } else {\n console.log(chalk.yellow('Frame not found'));\n }\n } catch (error) {\n spinner.fail('Failed to retrieve frame');\n logger.error('Retrieve error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n // Show metrics\n storage\n .command('metrics')\n .description('Show storage system metrics')\n .action(async () => {\n const spinner = ora('Fetching metrics...').start();\n\n try {\n const config = getStorageConfig();\n const storage = new InfiniteStorageSystem(config);\n await storage.initialize();\n\n const metrics = await storage.getMetrics();\n\n spinner.stop();\n\n console.log(chalk.cyan('\\n\uD83D\uDCCA Infinite Storage Metrics\\n'));\n \n const table = new Table({\n head: ['Metric', 'Value'],\n colWidths: [30, 40],\n });\n\n table.push(\n ['Total Objects', metrics.totalObjects.toString()],\n ['Storage Size', formatBytes(metrics.storageBytes)],\n ['Avg Latency', `${metrics.avgLatencyMs.toFixed(2)}ms`],\n ['P50 Latency', `${metrics.p50LatencyMs}ms`],\n ['P99 Latency', `${metrics.p99LatencyMs}ms`],\n );\n\n console.log(table.toString());\n\n if (Object.keys(metrics.tierDistribution).length > 0) {\n console.log('\\nTier Distribution:');\n for (const [tier, count] of Object.entries(metrics.tierDistribution)) {\n const percentage = ((count / metrics.totalObjects) * 100).toFixed(1);\n console.log(` ${tier}: ${count} objects (${percentage}%)`);\n }\n }\n\n // Check if meeting STA-287 targets\n console.log(chalk.cyan('\\n\uD83C\uDFAF STA-287 Performance Targets:'));\n const p50Target = metrics.p50LatencyMs <= 50;\n const p99Target = metrics.p99LatencyMs <= 500;\n \n console.log(` P50 \u2264 50ms: ${p50Target ? chalk.green('\u2705 PASS') : chalk.red('\u274C FAIL')} (${metrics.p50LatencyMs}ms)`);\n console.log(` P99 \u2264 500ms: ${p99Target ? chalk.green('\u2705 PASS') : chalk.red('\u274C FAIL')} (${metrics.p99LatencyMs}ms)`);\n } catch (error) {\n spinner.fail('Failed to get metrics');\n logger.error('Metrics error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n // Migrate data\n storage\n .command('migrate')\n .description('Manually trigger tier migration')\n .action(async () => {\n const spinner = ora('Running migration...').start();\n\n try {\n const config = getStorageConfig();\n const storage = new InfiniteStorageSystem(config);\n await storage.initialize();\n\n // Trigger migration (this would normally run automatically)\n // @ts-ignore - accessing private method for manual trigger\n await storage.migrateAgedData();\n\n spinner.succeed('Migration completed');\n } catch (error) {\n spinner.fail('Migration failed');\n logger.error('Migration error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n // Status command\n storage\n .command('status')\n .description('Check storage system status')\n .action(async () => {\n const spinner = ora('Checking status...').start();\n\n try {\n const config = getStorageConfig();\n \n spinner.stop();\n \n console.log(chalk.cyan('\\n\uD83D\uDCE6 Storage System Status\\n'));\n \n // Check Redis\n if (config.redis?.url) {\n try {\n const { createClient } = await import('redis');\n const client = createClient({ url: config.redis.url });\n await client.connect();\n await client.ping();\n await client.quit();\n console.log('Redis (Hot Tier): ' + chalk.green('\u2705 Connected'));\n } catch {\n console.log('Redis (Hot Tier): ' + chalk.red('\u274C Not connected'));\n }\n } else {\n console.log('Redis (Hot Tier): ' + chalk.yellow('\u26A0\uFE0F Not configured'));\n }\n\n // Check TimeSeries DB\n if (config.timeseries?.connectionString) {\n try {\n const { Pool } = await import('pg');\n const pool = new Pool({ connectionString: config.timeseries.connectionString });\n await pool.query('SELECT 1');\n await pool.end();\n console.log('TimeSeries DB (Warm Tier): ' + chalk.green('\u2705 Connected'));\n } catch {\n console.log('TimeSeries DB (Warm Tier): ' + chalk.red('\u274C Not connected'));\n }\n } else {\n console.log('TimeSeries DB (Warm Tier): ' + chalk.yellow('\u26A0\uFE0F Not configured'));\n }\n\n // Check S3\n if (config.s3?.bucket) {\n console.log(`S3 (Cold/Archive Tier): ${chalk.green('\u2705')} Bucket: ${config.s3.bucket}`);\n } else {\n console.log('S3 (Cold/Archive Tier): ' + chalk.yellow('\u26A0\uFE0F Not configured'));\n }\n\n console.log('\\n' + chalk.gray('Configure missing tiers with: stackmemory infinite-storage init'));\n } catch (error) {\n spinner.fail('Failed to check status');\n logger.error('Status error', error);\n console.error(chalk.red(error instanceof Error ? error.message : 'Unknown error'));\n }\n });\n\n return storage;\n}\n\nfunction getStorageConfig(): StorageConfig {\n return {\n redis: {\n url: process.env.REDIS_URL || 'redis://localhost:6379',\n ttlSeconds: parseInt(process.env.REDIS_TTL || '3600'),\n maxMemoryMB: parseInt(process.env.REDIS_MAX_MEMORY_MB || '512'),\n },\n timeseries: {\n connectionString: process.env.TIMESERIES_URL || '',\n retentionDays: parseInt(process.env.TIMESERIES_RETENTION_DAYS || '30'),\n },\n s3: {\n bucket: process.env.S3_BUCKET || '',\n region: process.env.AWS_REGION || 'us-east-1',\n accessKeyId: process.env.AWS_ACCESS_KEY_ID,\n secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,\n },\n tiers: [],\n };\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n}"],
5
+ "mappings": "AAIA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,SAAS,6BAA4C;AACrD,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB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kBAAkB,QAAQ,IAAI,kBAAkB;AAAA,MAChD,eAAe,SAAS,QAAQ,IAAI,6BAA6B,IAAI;AAAA,IACvE;AAAA,IACA,IAAI;AAAA,MACF,QAAQ,QAAQ,IAAI,aAAa;AAAA,MACjC,QAAQ,QAAQ,IAAI,cAAc;AAAA,MAClC,aAAa,QAAQ,IAAI;AAAA,MACzB,iBAAiB,QAAQ,IAAI;AAAA,IAC/B;AAAA,IACA,OAAO,CAAC;AAAA,EACV;AACF;AAEA,SAAS,YAAY,OAAuB;AAC1C,MAAI,UAAU,EAAG,QAAO;AACxB,QAAM,IAAI;AACV,QAAM,QAAQ,CAAC,SAAS,MAAM,MAAM,MAAM,IAAI;AAC9C,QAAM,IAAI,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC;AAClD,SAAO,YAAY,QAAQ,KAAK,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,MAAM,MAAM,CAAC;AACxE;",
6
+ "names": ["storage"]
7
+ }
package/dist/cli/index.js CHANGED
@@ -29,6 +29,7 @@ import { registerLinearListCommand } from "./commands/linear-list.js";
29
29
  import { registerLinearMigrateCommand } from "./commands/linear-migrate.js";
30
30
  import { registerLinearCreateCommand } from "./commands/linear-create.js";
31
31
  import { createChromaDBCommand } from "./commands/chromadb.js";
32
+ import { createInfiniteStorageCommand } from "./commands/infinite-storage.js";
32
33
  import { createSessionCommands } from "./commands/session.js";
33
34
  import { registerWorktreeCommands } from "./commands/worktree.js";
34
35
  import { registerOnboardingCommand } from "./commands/onboard.js";
@@ -974,6 +975,7 @@ registerLinearListCommand(program);
974
975
  registerLinearMigrateCommand(program);
975
976
  registerLinearCreateCommand(program);
976
977
  program.addCommand(createChromaDBCommand());
978
+ program.addCommand(createInfiniteStorageCommand());
977
979
  program.addCommand(createSessionCommands());
978
980
  program.addCommand(webhookCommand());
979
981
  program.addCommand(createTaskCommands());