@axiom-lattice/lattice-cli 0.2.41 → 0.2.42

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/lattice-cli@0.2.41 build /home/runner/work/agentic/agentic/packages/lattice-cli
2
+ > @axiom-lattice/lattice-cli@0.2.42 build /home/runner/work/agentic/agentic/packages/lattice-cli
3
3
  > tsup src/cli.ts --format esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/cli.ts
@@ -7,9 +7,9 @@
7
7
  CLI tsup v8.5.0
8
8
  CLI Target: es2020
9
9
  ESM Build start
10
- ESM dist/cli.js 9.67 KB
11
- ESM dist/cli.js.map 17.89 KB
12
- ESM ⚡️ Build success in 123ms
10
+ ESM dist/cli.js 9.60 KB
11
+ ESM dist/cli.js.map 17.77 KB
12
+ ESM ⚡️ Build success in 108ms
13
13
  DTS Build start
14
- DTS ⚡️ Build success in 11065ms
14
+ DTS ⚡️ Build success in 8204ms
15
15
  DTS dist/cli.d.ts 20.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # @axiom-lattice/lattice-cli
2
2
 
3
+ ## 0.2.42
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d627daa]
8
+ - Updated dependencies [0a3ad06]
9
+ - Updated dependencies [251c084]
10
+ - Updated dependencies [e57a515]
11
+ - Updated dependencies [1fde314]
12
+ - Updated dependencies [353699c]
13
+ - Updated dependencies [84c7c5b]
14
+ - Updated dependencies [9a6579c]
15
+ - Updated dependencies [c1f4f54]
16
+ - Updated dependencies [d5dc506]
17
+ - Updated dependencies [4be8a9b]
18
+ - Updated dependencies [f1f8840]
19
+ - Updated dependencies [8285b9a]
20
+ - Updated dependencies [5f0aeff]
21
+ - Updated dependencies [dcbe47b]
22
+ - Updated dependencies [b3e1a30]
23
+ - Updated dependencies [ff8d4cb]
24
+ - Updated dependencies [235b4a4]
25
+ - Updated dependencies [c07db86]
26
+ - Updated dependencies [ea90717]
27
+ - Updated dependencies [e33c7c3]
28
+ - Updated dependencies [2d61ef6]
29
+ - Updated dependencies [351b0e9]
30
+ - Updated dependencies [1fde314]
31
+ - Updated dependencies [1236db0]
32
+ - Updated dependencies [5c5550b]
33
+ - Updated dependencies [e732b92]
34
+ - Updated dependencies [476a26b]
35
+ - Updated dependencies [2422cdd]
36
+ - Updated dependencies [bfb7c42]
37
+ - Updated dependencies [ced17aa]
38
+ - Updated dependencies [8f9dd0d]
39
+ - Updated dependencies [1fde314]
40
+ - Updated dependencies [1525f4e]
41
+ - Updated dependencies [b794e07]
42
+ - Updated dependencies [2454005]
43
+ - Updated dependencies [da5294d]
44
+ - Updated dependencies [03e9984]
45
+ - Updated dependencies [2609f3b]
46
+ - Updated dependencies [4a74c70]
47
+ - Updated dependencies [12ce057]
48
+ - Updated dependencies [66daf89]
49
+ - Updated dependencies [23902af]
50
+ - Updated dependencies [fad0bd0]
51
+ - @axiom-lattice/gateway@7.0.0
52
+ - @axiom-lattice/core@9.0.0
53
+ - @axiom-lattice/protocols@5.0.0
54
+ - @axiom-lattice/local-stores@3.3.0
55
+
3
56
  ## 0.2.41
4
57
 
5
58
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -180,7 +180,6 @@ async function startServer(options) {
180
180
  };
181
181
  LatticeGateway.startAsHttpEndpoint({
182
182
  port: options.port,
183
- queueServiceConfig: { type: "memory", defaultStartPollingQueue: true },
184
183
  loggerConfig: DEFAULT_LOGGER_CONFIG
185
184
  });
186
185
  const shutdown = async () => {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts","../src/cli.ts"],"sourcesContent":["import { LatticeGateway } from \"@axiom-lattice/gateway\";\nimport {\n configureStores,\n sandboxLatticeManager,\n createSandboxProvider,\n registerScheduleLattice,\n MemoryLatticeManager,\n registerCheckpointSaver,\n getStoreLattice,\n} from \"@axiom-lattice/core\";\nimport {\n createLocalStoreConfig,\n closeDatabase,\n initDatabase,\n} from \"@axiom-lattice/local-stores\";\nimport { LoggerType } from \"@axiom-lattice/protocols\";\nimport type { LoggerConfig } from \"@axiom-lattice/protocols\";\nimport type { DatabaseWrapper } from \"@axiom-lattice/local-stores\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport interface LatticeCliOptions {\n port: number;\n dbPath: string;\n sandboxBasePath: string;\n serveWeb: boolean;\n}\n\nfunction resolveWebDir(): string | null {\n // Look for apps/cli-web/dist (Vite build output)\n const repoRoot = path.resolve(__dirname, \"..\", \"..\", \"..\", \"apps\", \"cli-web\", \"dist\");\n if (fs.existsSync(repoRoot)) return repoRoot;\n return null;\n}\n\n/**\n * Fallback: create all local stores manually without checkpoint saver.\n * Used when createLocalStoreConfig fails due to better-sqlite3 not being available.\n */\nasync function createStoresFallback(\n db: DatabaseWrapper\n): Promise<Record<string, unknown>> {\n const mod = await import(\"@axiom-lattice/local-stores\");\n return {\n thread: new mod.LocalThreadStore(db),\n assistant: new mod.LocalAssistantStore(db),\n workspace: new mod.LocalWorkspaceStore(db),\n project: new mod.LocalProjectStore(db),\n user: new mod.LocalUserStore(db),\n tenant: new mod.LocalTenantStore(db),\n userTenantLink: new mod.LocalUserTenantLinkStore(db),\n database: new mod.LocalDatabaseConfigStore(db),\n metrics: new mod.LocalMetricsServerConfigStore(db),\n mcp: new mod.LocalMcpServerConfigStore(db),\n workflowTracking: new mod.LocalWorkflowTrackingStore(db),\n eval: new mod.LocalEvalStore(db),\n channelBinding: new mod.LocalChannelBindingStore(db),\n channelInstallation: new mod.LocalChannelInstallationStore(db),\n a2aApiKey: new mod.LocalA2AApiKeyStore(db),\n threadMessageQueue: new mod.LocalThreadMessageQueueStore(db),\n skill: new mod.LocalSkillStore(db),\n schedule: new mod.LocalScheduleStorage(db),\n };\n}\n\nexport async function startServer(options: LatticeCliOptions): Promise<void> {\n console.log(`\n╔═══════════════════════════════════════════╗\n║ Lattice Local Server ║\n║ Version: 0.1.0 ║\n║ Sandbox: local ║\n║ Stores: sqlite (sql.js) ║\n╚═══════════════════════════════════════════╝\n`);\n\n // 1. Initialize local SQLite stores\n console.log(`[store] Initializing local stores at ${options.dbPath} ...`);\n\n let stores: Record<string, unknown>;\n let checkpoint: unknown = undefined;\n\n try {\n const result = await createLocalStoreConfig({ dbPath: options.dbPath });\n stores = result as unknown as Record<string, unknown>;\n } catch (e: unknown) {\n const msg = e instanceof Error ? e.message : String(e);\n if (msg.includes(\"better_sqlite3\") || msg.includes(\"bindings\")) {\n console.log(\"[store] better-sqlite3 unavailable, skipping checkpoint saver\");\n const db = await initDatabase({ dbPath: options.dbPath });\n stores = await createStoresFallback(db);\n } else {\n throw e;\n }\n }\n\n // Extract special keys\n const schedule = stores.schedule;\n checkpoint = stores.checkpoint;\n delete stores.schedule;\n delete stores.checkpoint;\n\n await configureStores(stores as Parameters<typeof configureStores>[0], { autoDisposeStores: true });\n\n // Register schedule storage\n if (schedule) {\n try {\n registerScheduleLattice(\"default\", {\n name: \"Default Scheduler\",\n description: \"Local schedule storage\",\n type: \"postgres\" as never,\n storage: schedule as never,\n });\n } catch { /* non-critical */ }\n }\n\n // Register checkpoint saver\n if (checkpoint) {\n try {\n MemoryLatticeManager.getInstance().removeCheckpointSaver(\"default\");\n registerCheckpointSaver(\"default\", checkpoint as Parameters<typeof registerCheckpointSaver>[1]);\n console.log(\"[store] Checkpoint saver registered\");\n } catch (e) {\n console.log(\"[store] Checkpoint saver skipped:\", e instanceof Error ? e.message : e);\n }\n }\n\n console.log(\"[store] Local SQLite stores ready\");\n\n // Seed default tenant, workspace, and project so the UI works out of the box\n try {\n const tenantId = \"default\";\n\n // Ensure default tenant exists\n const tenantStore = getStoreLattice(\"default\", \"tenant\").store as {\n getTenantById(id: string): Promise<unknown>;\n createTenant(id: string, data: { name: string }): Promise<unknown>;\n };\n const existingTenant = await tenantStore.getTenantById(tenantId).catch(() => null);\n if (!existingTenant) {\n await tenantStore.createTenant(tenantId, { name: \"Default\" });\n }\n\n // Ensure default user exists (onboarding will update the name)\n const userId = \"local\";\n const userStore = getStoreLattice(\"default\", \"user\").store as {\n getUserById(id: string): Promise<unknown>;\n createUser(id: string, data: { name: string; email: string }): Promise<unknown>;\n };\n const existingUser = await userStore.getUserById(userId).catch(() => null);\n if (!existingUser) {\n await userStore.createUser(userId, { name: \"Local User\", email: \"local@local\" });\n }\n\n // Ensure default workspace + project exist\n const wsStore = getStoreLattice(\"default\", \"workspace\").store as {\n getAllWorkspaces(tenantId: string): Promise<{ id: string }[]>;\n createWorkspace(tenantId: string, id: string, data: { name: string; storageType: string }): Promise<unknown>;\n };\n const pjStore = getStoreLattice(\"default\", \"project\").store as {\n getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<{ id: string }[]>;\n createProject(tenantId: string, workspaceId: string, id: string, data: { name: string }): Promise<unknown>;\n };\n const wss = await wsStore.getAllWorkspaces(tenantId);\n if (wss.length === 0) {\n const wsId = crypto.randomUUID();\n await wsStore.createWorkspace(tenantId, wsId, { name: \"Default\", storageType: \"sandbox\" });\n await pjStore.createProject(tenantId, wsId, crypto.randomUUID(), { name: \"Default Project\" });\n }\n\n // Ensure default assistant exists (model must be registered first via onboarding)\n const asStore = getStoreLattice(\"default\", \"assistant\").store as {\n getAssistantById(tenantId: string, id: string): Promise<unknown>;\n createAssistant(tenantId: string, id: string, data: { name: string; graphDefinition: unknown }): Promise<unknown>;\n };\n const existingAssistant = await asStore.getAssistantById(tenantId, \"default-assistant\").catch(() => null);\n if (!existingAssistant) {\n await asStore.createAssistant(tenantId, \"default-assistant\", {\n name: \"Default Assistant\",\n graphDefinition: {\n key: \"default-assistant\",\n type: \"react\",\n prompt: \"You are a helpful assistant.\",\n modelKey: \"default\",\n tools: [],\n },\n });\n }\n console.log(\"[store] Seeded tenant, user, workspace, project, and assistant\");\n } catch (e) {\n console.log(\"[store] Seed skipped:\", e instanceof Error ? e.message : e);\n }\n\n // 2. Register local sandbox provider\n console.log(`[sandbox] Initializing local sandbox at ${options.sandboxBasePath} ...`);\n const sandboxProvider = createSandboxProvider({\n type: \"local\",\n localSandboxBasePath: options.sandboxBasePath,\n });\n sandboxLatticeManager.registerLattice(\"default\", sandboxProvider);\n console.log(\"[sandbox] Local sandbox provider registered\");\n\n // 3. Swagger setup\n await LatticeGateway.configureSwagger(LatticeGateway.app);\n console.log(`[web] API docs: http://localhost:${options.port}/api-docs`);\n\n // 4. Serve web UI if requested\n if (options.serveWeb) {\n const webDir = resolveWebDir();\n if (webDir) {\n console.log(`[web] Serving chat UI from ${webDir}`);\n\n // SPA fallback: serve index.html for paths without an extension\n LatticeGateway.app.setNotFoundHandler((req, reply) => {\n if ((req.url || \"/\").startsWith(\"/api\")) {\n return reply.status(404).send({ success: false, error: \"Not found\" });\n }\n return reply.type(\"text/html\").send(fs.readFileSync(path.join(webDir, \"index.html\"), \"utf-8\"));\n });\n\n // Serve static assets\n LatticeGateway.app.get(\"/assets/*\", (req, reply) => {\n const p = (req.url || \"\").split(\"?\")[0].replace(/^\\/+/, \"\");\n const filePath = path.join(webDir, p);\n if (!fs.existsSync(filePath)) return reply.status(404).send(\"Not found\");\n const ext = path.extname(filePath);\n const ct: Record<string, string> = { \".js\": \"application/javascript\", \".css\": \"text/css\", \".svg\": \"image/svg+xml\", \".png\": \"image/png\", \".ico\": \"image/x-icon\", \".json\": \"application/json\" };\n return reply.type(ct[ext] || \"application/octet-stream\").send(fs.readFileSync(filePath));\n });\n\n console.log(`[web] Chat UI: http://localhost:${options.port}`);\n } else {\n console.log(\"[web] Web UI files not found (build apps/cli-web first: cd apps/cli-web && pnpm build)\");\n }\n }\n\n // 5. Start gateway\n const DEFAULT_LOGGER_CONFIG: LoggerConfig = {\n name: \"default\",\n description: \"Lattice CLI local server\",\n type: LoggerType.PINO,\n serviceName: \"lattice/cli\",\n loggerName: \"lattice/cli\",\n };\n\n LatticeGateway.startAsHttpEndpoint({\n port: options.port,\n queueServiceConfig: { type: \"memory\", defaultStartPollingQueue: true },\n loggerConfig: DEFAULT_LOGGER_CONFIG,\n });\n\n // Graceful shutdown\n const shutdown = async () => {\n console.log(\"\\n[shutdown] Closing database and stopping server...\");\n closeDatabase();\n await LatticeGateway.app.close();\n process.exit(0);\n };\n\n process.on(\"SIGINT\", shutdown);\n process.on(\"SIGTERM\", shutdown);\n}\n","#!/usr/bin/env node\nimport { startServer, type LatticeCliOptions } from \"./server.js\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\n\nfunction printHelp(): void {\n console.log(`\nlattice — Axiom Lattice local development server\n\nUsage:\n lattice [options]\n\nOptions:\n --port, -p <number> Server port (default: 4001)\n --db-path <path> SQLite database path (default: ~/.axiom/lattice.db)\n --sandbox-path <path> Sandbox base directory (default: ~/.axiom-local-sandbox)\n --web, -w Serve the chat web UI at /\n --help, -h Show this help\n\nExamples:\n lattice Start API-only on port 4001\n lattice --web Start with chat UI\n lattice -p 3000 --web Custom port with web UI\n lattice --db-path ./dev.db Custom database path\n`);\n}\n\nfunction parseArgs(): LatticeCliOptions | null {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return null;\n }\n\n const getArg = (flag: string): string | undefined => {\n const idx = args.findIndex((a) => a === flag);\n return idx !== -1 && args[idx + 1] ? args[idx + 1] : undefined;\n };\n\n const hasFlag = (flag: string): boolean => args.includes(flag);\n\n const portStr = getArg(\"--port\") ?? getArg(\"-p\");\n const port = portStr ? parseInt(portStr, 10) : 4001;\n\n return {\n port,\n dbPath: getArg(\"--db-path\") ?? path.join(os.homedir(), \".axiom\", \"lattice.db\"),\n sandboxBasePath: getArg(\"--sandbox-path\") ?? path.join(os.homedir(), \".axiom-local-sandbox\"),\n serveWeb: hasFlag(\"--web\") || hasFlag(\"-w\"),\n };\n}\n\nasync function main(): Promise<void> {\n const options = parseArgs();\n if (!options) return; // help printed\n\n try {\n await startServer(options);\n }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AAI,KAAK,MAAM,CAAC,IAAI;AAAA,EACvD;AAEA,QAAM,UAAU,CAAC,SAA0B,KAAK,SAAS,IAAI;AAE7D,QAAM,UAAU,OAAO,QAAQ,KAAK,OAAO,IAAI;AAC/C,QAAM,OAAO,UAAU,SAAS,SAAS,EAAE,IAAI;AAE/C,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,OAAO,WAAW,KAAU,WAAQ,WAAQ,GAAG,UAAU,YAAY;AAAA,IAC7E,iBAAiB,OAAO,gBAAgB,KAAU,WAAQ,WAAQ,GAAG,sBAAsB;AAAA,IAC3F,UAAU,QAAQ,OAAO,KAAK,QAAQ,IAAI;AAAA,EAC5C;AACF;AAEA,eAAe,OAAsB;AACnC,QAAM,UAAU,UAAU;AAC1B,MAAI,CAAC,QAAS;AAEd,MAAI;AACF,UAAM,YAAY,OAAO;AAAA,EAC3B,SAAS,KAAK;AACZ,YAAQ,MAAM,2BAA2B,GAAG;AAC5C,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;AAEA,KAAK;","names":["path"]}
1
+ {"version":3,"sources":["../src/server.ts","../src/cli.ts"],"sourcesContent":["import { LatticeGateway } from \"@axiom-lattice/gateway\";\nimport {\n configureStores,\n sandboxLatticeManager,\n createSandboxProvider,\n registerScheduleLattice,\n MemoryLatticeManager,\n registerCheckpointSaver,\n getStoreLattice,\n} from \"@axiom-lattice/core\";\nimport {\n createLocalStoreConfig,\n closeDatabase,\n initDatabase,\n} from \"@axiom-lattice/local-stores\";\nimport { LoggerType } from \"@axiom-lattice/protocols\";\nimport type { LoggerConfig } from \"@axiom-lattice/protocols\";\nimport type { DatabaseWrapper } from \"@axiom-lattice/local-stores\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport interface LatticeCliOptions {\n port: number;\n dbPath: string;\n sandboxBasePath: string;\n serveWeb: boolean;\n}\n\nfunction resolveWebDir(): string | null {\n // Look for apps/cli-web/dist (Vite build output)\n const repoRoot = path.resolve(__dirname, \"..\", \"..\", \"..\", \"apps\", \"cli-web\", \"dist\");\n if (fs.existsSync(repoRoot)) return repoRoot;\n return null;\n}\n\n/**\n * Fallback: create all local stores manually without checkpoint saver.\n * Used when createLocalStoreConfig fails due to better-sqlite3 not being available.\n */\nasync function createStoresFallback(\n db: DatabaseWrapper\n): Promise<Record<string, unknown>> {\n const mod = await import(\"@axiom-lattice/local-stores\");\n return {\n thread: new mod.LocalThreadStore(db),\n assistant: new mod.LocalAssistantStore(db),\n workspace: new mod.LocalWorkspaceStore(db),\n project: new mod.LocalProjectStore(db),\n user: new mod.LocalUserStore(db),\n tenant: new mod.LocalTenantStore(db),\n userTenantLink: new mod.LocalUserTenantLinkStore(db),\n database: new mod.LocalDatabaseConfigStore(db),\n metrics: new mod.LocalMetricsServerConfigStore(db),\n mcp: new mod.LocalMcpServerConfigStore(db),\n workflowTracking: new mod.LocalWorkflowTrackingStore(db),\n eval: new mod.LocalEvalStore(db),\n channelBinding: new mod.LocalChannelBindingStore(db),\n channelInstallation: new mod.LocalChannelInstallationStore(db),\n a2aApiKey: new mod.LocalA2AApiKeyStore(db),\n threadMessageQueue: new mod.LocalThreadMessageQueueStore(db),\n skill: new mod.LocalSkillStore(db),\n schedule: new mod.LocalScheduleStorage(db),\n };\n}\n\nexport async function startServer(options: LatticeCliOptions): Promise<void> {\n console.log(`\n╔═══════════════════════════════════════════╗\n║ Lattice Local Server ║\n║ Version: 0.1.0 ║\n║ Sandbox: local ║\n║ Stores: sqlite (sql.js) ║\n╚═══════════════════════════════════════════╝\n`);\n\n // 1. Initialize local SQLite stores\n console.log(`[store] Initializing local stores at ${options.dbPath} ...`);\n\n let stores: Record<string, unknown>;\n let checkpoint: unknown = undefined;\n\n try {\n const result = await createLocalStoreConfig({ dbPath: options.dbPath });\n stores = result as unknown as Record<string, unknown>;\n } catch (e: unknown) {\n const msg = e instanceof Error ? e.message : String(e);\n if (msg.includes(\"better_sqlite3\") || msg.includes(\"bindings\")) {\n console.log(\"[store] better-sqlite3 unavailable, skipping checkpoint saver\");\n const db = await initDatabase({ dbPath: options.dbPath });\n stores = await createStoresFallback(db);\n } else {\n throw e;\n }\n }\n\n // Extract special keys\n const schedule = stores.schedule;\n checkpoint = stores.checkpoint;\n delete stores.schedule;\n delete stores.checkpoint;\n\n await configureStores(stores as Parameters<typeof configureStores>[0], { autoDisposeStores: true });\n\n // Register schedule storage\n if (schedule) {\n try {\n registerScheduleLattice(\"default\", {\n name: \"Default Scheduler\",\n description: \"Local schedule storage\",\n type: \"postgres\" as never,\n storage: schedule as never,\n });\n } catch { /* non-critical */ }\n }\n\n // Register checkpoint saver\n if (checkpoint) {\n try {\n MemoryLatticeManager.getInstance().removeCheckpointSaver(\"default\");\n registerCheckpointSaver(\"default\", checkpoint as Parameters<typeof registerCheckpointSaver>[1]);\n console.log(\"[store] Checkpoint saver registered\");\n } catch (e) {\n console.log(\"[store] Checkpoint saver skipped:\", e instanceof Error ? e.message : e);\n }\n }\n\n console.log(\"[store] Local SQLite stores ready\");\n\n // Seed default tenant, workspace, and project so the UI works out of the box\n try {\n const tenantId = \"default\";\n\n // Ensure default tenant exists\n const tenantStore = getStoreLattice(\"default\", \"tenant\").store as {\n getTenantById(id: string): Promise<unknown>;\n createTenant(id: string, data: { name: string }): Promise<unknown>;\n };\n const existingTenant = await tenantStore.getTenantById(tenantId).catch(() => null);\n if (!existingTenant) {\n await tenantStore.createTenant(tenantId, { name: \"Default\" });\n }\n\n // Ensure default user exists (onboarding will update the name)\n const userId = \"local\";\n const userStore = getStoreLattice(\"default\", \"user\").store as {\n getUserById(id: string): Promise<unknown>;\n createUser(id: string, data: { name: string; email: string }): Promise<unknown>;\n };\n const existingUser = await userStore.getUserById(userId).catch(() => null);\n if (!existingUser) {\n await userStore.createUser(userId, { name: \"Local User\", email: \"local@local\" });\n }\n\n // Ensure default workspace + project exist\n const wsStore = getStoreLattice(\"default\", \"workspace\").store as {\n getAllWorkspaces(tenantId: string): Promise<{ id: string }[]>;\n createWorkspace(tenantId: string, id: string, data: { name: string; storageType: string }): Promise<unknown>;\n };\n const pjStore = getStoreLattice(\"default\", \"project\").store as {\n getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<{ id: string }[]>;\n createProject(tenantId: string, workspaceId: string, id: string, data: { name: string }): Promise<unknown>;\n };\n const wss = await wsStore.getAllWorkspaces(tenantId);\n if (wss.length === 0) {\n const wsId = crypto.randomUUID();\n await wsStore.createWorkspace(tenantId, wsId, { name: \"Default\", storageType: \"sandbox\" });\n await pjStore.createProject(tenantId, wsId, crypto.randomUUID(), { name: \"Default Project\" });\n }\n\n // Ensure default assistant exists (model must be registered first via onboarding)\n const asStore = getStoreLattice(\"default\", \"assistant\").store as {\n getAssistantById(tenantId: string, id: string): Promise<unknown>;\n createAssistant(tenantId: string, id: string, data: { name: string; graphDefinition: unknown }): Promise<unknown>;\n };\n const existingAssistant = await asStore.getAssistantById(tenantId, \"default-assistant\").catch(() => null);\n if (!existingAssistant) {\n await asStore.createAssistant(tenantId, \"default-assistant\", {\n name: \"Default Assistant\",\n graphDefinition: {\n key: \"default-assistant\",\n type: \"react\",\n prompt: \"You are a helpful assistant.\",\n modelKey: \"default\",\n tools: [],\n },\n });\n }\n console.log(\"[store] Seeded tenant, user, workspace, project, and assistant\");\n } catch (e) {\n console.log(\"[store] Seed skipped:\", e instanceof Error ? e.message : e);\n }\n\n // 2. Register local sandbox provider\n console.log(`[sandbox] Initializing local sandbox at ${options.sandboxBasePath} ...`);\n const sandboxProvider = createSandboxProvider({\n type: \"local\",\n localSandboxBasePath: options.sandboxBasePath,\n });\n sandboxLatticeManager.registerLattice(\"default\", sandboxProvider);\n console.log(\"[sandbox] Local sandbox provider registered\");\n\n // 3. Swagger setup\n await LatticeGateway.configureSwagger(LatticeGateway.app);\n console.log(`[web] API docs: http://localhost:${options.port}/api-docs`);\n\n // 4. Serve web UI if requested\n if (options.serveWeb) {\n const webDir = resolveWebDir();\n if (webDir) {\n console.log(`[web] Serving chat UI from ${webDir}`);\n\n // SPA fallback: serve index.html for paths without an extension\n LatticeGateway.app.setNotFoundHandler((req, reply) => {\n if ((req.url || \"/\").startsWith(\"/api\")) {\n return reply.status(404).send({ success: false, error: \"Not found\" });\n }\n return reply.type(\"text/html\").send(fs.readFileSync(path.join(webDir, \"index.html\"), \"utf-8\"));\n });\n\n // Serve static assets\n LatticeGateway.app.get(\"/assets/*\", (req, reply) => {\n const p = (req.url || \"\").split(\"?\")[0].replace(/^\\/+/, \"\");\n const filePath = path.join(webDir, p);\n if (!fs.existsSync(filePath)) return reply.status(404).send(\"Not found\");\n const ext = path.extname(filePath);\n const ct: Record<string, string> = { \".js\": \"application/javascript\", \".css\": \"text/css\", \".svg\": \"image/svg+xml\", \".png\": \"image/png\", \".ico\": \"image/x-icon\", \".json\": \"application/json\" };\n return reply.type(ct[ext] || \"application/octet-stream\").send(fs.readFileSync(filePath));\n });\n\n console.log(`[web] Chat UI: http://localhost:${options.port}`);\n } else {\n console.log(\"[web] Web UI files not found (build apps/cli-web first: cd apps/cli-web && pnpm build)\");\n }\n }\n\n // 5. Start gateway\n const DEFAULT_LOGGER_CONFIG: LoggerConfig = {\n name: \"default\",\n description: \"Lattice CLI local server\",\n type: LoggerType.PINO,\n serviceName: \"lattice/cli\",\n loggerName: \"lattice/cli\",\n };\n\n LatticeGateway.startAsHttpEndpoint({\n port: options.port,\n loggerConfig: DEFAULT_LOGGER_CONFIG,\n });\n\n // Graceful shutdown\n const shutdown = async () => {\n console.log(\"\\n[shutdown] Closing database and stopping server...\");\n closeDatabase();\n await LatticeGateway.app.close();\n process.exit(0);\n };\n\n process.on(\"SIGINT\", shutdown);\n process.on(\"SIGTERM\", shutdown);\n}\n","#!/usr/bin/env node\nimport { startServer, type LatticeCliOptions } from \"./server.js\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\n\nfunction printHelp(): void {\n console.log(`\nlattice — Axiom Lattice local development server\n\nUsage:\n lattice [options]\n\nOptions:\n --port, -p <number> Server port (default: 4001)\n --db-path <path> SQLite database path (default: ~/.axiom/lattice.db)\n --sandbox-path <path> Sandbox base directory (default: ~/.axiom-local-sandbox)\n --web, -w Serve the chat web UI at /\n --help, -h Show this help\n\nExamples:\n lattice Start API-only on port 4001\n lattice --web Start with chat UI\n lattice -p 3000 --web Custom port with web UI\n lattice --db-path ./dev.db Custom database path\n`);\n}\n\nfunction parseArgs(): LatticeCliOptions | null {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return null;\n }\n\n const getArg = (flag: string): string | undefined => {\n const idx = args.findIndex((a) => a === flag);\n return idx !== -1 && args[idx + 1] ? args[idx + 1] : undefined;\n };\n\n const hasFlag = (flag: string): boolean => args.includes(flag);\n\n const portStr = getArg(\"--port\") ?? getArg(\"-p\");\n const port = portStr ? parseInt(portStr, 10) : 4001;\n\n return {\n port,\n dbPath: getArg(\"--db-path\") ?? path.join(os.homedir(), \".axiom\", \"lattice.db\"),\n sandboxBasePath: getArg(\"--sandbox-path\") ?? path.join(os.homedir(), \".axiom-local-sandbox\"),\n serveWeb: hasFlag(\"--web\") || hasFlag(\"-w\"),\n };\n}\n\nasync function main(): Promise<void> {\n const options = parseArgs();\n if (!options) return; // help printed\n\n try {\n await startServer(options);\n } catch (err) {\n console.error(\"Failed to start server:\", err);\n process.exit(1);\n }\n}\n\nmain();\n"],"mappings":";;;AAAA,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAG3B,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,qBAAqB;AAE9B,IAAM,YAAiB,aAAQ,cAAc,YAAY,GAAG,CAAC;AAS7D,SAAS,gBAA+B;AAEtC,QAAM,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AM,UAAU,UAAU;AAC1B,MAAI,CAAC,QAAS;AAEd,MAAI;AACF,UAAM,YAAY,OAAO;AAAA,EAC3B,SAAS,KAAK;AACZ,YAAQ,MAAM,2BAA2B,GAAG;AAC5C,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;AAEA,KAAK;","names":["path"]}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@axiom-lattice/lattice-cli",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "type": "module",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
7
7
  "lattice": "./dist/cli.js"
8
8
  },
9
9
  "dependencies": {
10
- "@axiom-lattice/core": "8.1.0",
11
- "@axiom-lattice/gateway": "6.1.0",
12
- "@axiom-lattice/local-stores": "3.2.13",
13
- "@axiom-lattice/protocols": "4.11.0"
10
+ "@axiom-lattice/core": "9.0.0",
11
+ "@axiom-lattice/gateway": "7.0.0",
12
+ "@axiom-lattice/local-stores": "3.3.0",
13
+ "@axiom-lattice/protocols": "5.0.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^20.17.23",
package/src/server.ts CHANGED
@@ -247,7 +247,6 @@ export async function startServer(options: LatticeCliOptions): Promise<void> {
247
247
 
248
248
  LatticeGateway.startAsHttpEndpoint({
249
249
  port: options.port,
250
- queueServiceConfig: { type: "memory", defaultStartPollingQueue: true },
251
250
  loggerConfig: DEFAULT_LOGGER_CONFIG,
252
251
  });
253
252