litedbmodel-gen 0.7.1 → 0.7.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.
package/README.md CHANGED
@@ -38,7 +38,7 @@ npx litedbmodel-gen audit src/services/ --adapter claude
38
38
 
39
39
  ## LLM-Powered Commands
40
40
 
41
- litedbmodel-gen includes two LLM-powered commands that understand the litedbmodel API and enforce correct usage patterns. These commands are backed by [agent-contracts-runtime](https://www.npmjs.com/package/agent-contracts-runtime) and require an LLM adapter (`--adapter claude`, `openai`, `gemini`, or `cursor`).
41
+ litedbmodel-gen includes two LLM-powered commands that understand the litedbmodel API and enforce correct usage patterns. These commands are backed by [agent-contracts-runtime](https://www.npmjs.com/package/agent-contracts-runtime) and require an LLM adapter (`--adapter claude`, `openai`, or `gemini`).
42
42
 
43
43
  ### Why
44
44
 
@@ -87,7 +87,7 @@ npx litedbmodel-gen implement "..." --target src/services/foo.ts --adapter claud
87
87
  |--------|---------|-------------|
88
88
  | `--target <path>` | — | Target source file to create or edit |
89
89
  | `--models <glob>` | `models/**/*.ts` | Glob pattern for model definition files |
90
- | `--adapter <name>` | `mock` | LLM adapter: `claude`, `openai`, `gemini`, `cursor`, `mock` |
90
+ | `--adapter <name>` | `mock` | LLM adapter: `claude`, `openai`, `gemini`, `mock` |
91
91
  | `--model <name>` | — | Model name override for the adapter |
92
92
  | `--show-prompt` | `false` | Output the prompt without calling the LLM |
93
93
  | `--report-format` | `json` | Output format: `json`, `text`, `yaml` |
@@ -113,7 +113,7 @@ npx litedbmodel-gen audit src/ --adapter claude --report-format text
113
113
 
114
114
  | Option | Default | Description |
115
115
  |--------|---------|-------------|
116
- | `--adapter <name>` | `mock` | LLM adapter: `claude`, `openai`, `gemini`, `cursor`, `mock` |
116
+ | `--adapter <name>` | `mock` | LLM adapter: `claude`, `openai`, `gemini`, `mock` |
117
117
  | `--model <name>` | — | Model name override for the adapter |
118
118
  | `--show-prompt` | `false` | Output the prompt without calling the LLM |
119
119
  | `--report-format` | `json` | Output format: `json`, `text`, `yaml` |
@@ -175,7 +175,6 @@ schema.sql ──> embedoc generate + build ──> models/*.ts
175
175
  | `ANTHROPIC_API_KEY` | `claude` |
176
176
  | `OPENAI_API_KEY` | `openai` |
177
177
  | `GEMINI_API_KEY` | `gemini` |
178
- | `CURSOR_API_KEY` | `cursor` |
179
178
 
180
179
  ---
181
180
 
package/cli-contract.yaml CHANGED
@@ -142,7 +142,7 @@ command_sets:
142
142
  description: LLM adapter to use for the audit.
143
143
  schema:
144
144
  type: string
145
- enum: [mock, cursor, claude, openai, gemini]
145
+ enum: [mock, claude, openai, gemini]
146
146
  default: mock
147
147
 
148
148
  - name: model
@@ -247,7 +247,7 @@ command_sets:
247
247
  onConflict/onConflictUpdate for idempotent writes, forUpdate for
248
248
  concurrent-safe reads, and DBModel.transaction for multi-step
249
249
  operations. Avoids all eight common litedbmodel anti-patterns.
250
- Requires an agentic adapter (claude/cursor) that can read and
250
+ Requires an agentic adapter (claude) that can read and
251
251
  write project files.
252
252
  usage:
253
253
  - >-
@@ -294,7 +294,7 @@ command_sets:
294
294
  description: LLM adapter to use for code generation.
295
295
  schema:
296
296
  type: string
297
- enum: [mock, cursor, claude, openai, gemini]
297
+ enum: [mock, claude, openai, gemini]
298
298
  default: mock
299
299
 
300
300
  - name: model
@@ -349,7 +349,7 @@ command_sets:
349
349
  sideEffectNote: >-
350
350
  The agent reads project files and writes implementation code
351
351
  directly to the target source file(s). Uses an agentic adapter
352
- (claude/cursor) with file read/write tools.
352
+ (claude) with file read/write tools.
353
353
  safeDryRunOption: show-prompt
354
354
  expectedDurationMs: 120000
355
355
  retryableExitCodes: [1, 12]
package/dist/cli.js CHANGED
@@ -6231,7 +6231,7 @@ command_sets:
6231
6231
  description: LLM adapter to use for the audit.
6232
6232
  schema:
6233
6233
  type: string
6234
- enum: [mock, cursor, claude, openai, gemini]
6234
+ enum: [mock, claude, openai, gemini]
6235
6235
  default: mock
6236
6236
 
6237
6237
  - name: model
@@ -6336,7 +6336,7 @@ command_sets:
6336
6336
  onConflict/onConflictUpdate for idempotent writes, forUpdate for
6337
6337
  concurrent-safe reads, and DBModel.transaction for multi-step
6338
6338
  operations. Avoids all eight common litedbmodel anti-patterns.
6339
- Requires an agentic adapter (claude/cursor) that can read and
6339
+ Requires an agentic adapter (claude) that can read and
6340
6340
  write project files.
6341
6341
  usage:
6342
6342
  - >-
@@ -6383,7 +6383,7 @@ command_sets:
6383
6383
  description: LLM adapter to use for code generation.
6384
6384
  schema:
6385
6385
  type: string
6386
- enum: [mock, cursor, claude, openai, gemini]
6386
+ enum: [mock, claude, openai, gemini]
6387
6387
  default: mock
6388
6388
 
6389
6389
  - name: model
@@ -6438,7 +6438,7 @@ command_sets:
6438
6438
  sideEffectNote: >-
6439
6439
  The agent reads project files and writes implementation code
6440
6440
  directly to the target source file(s). Uses an agentic adapter
6441
- (claude/cursor) with file read/write tools.
6441
+ (claude) with file read/write tools.
6442
6442
  safeDryRunOption: show-prompt
6443
6443
  expectedDurationMs: 120000
6444
6444
  retryableExitCodes: [1, 12]
@@ -6807,7 +6807,6 @@ var CONTRACT_JSON_STR = `{
6807
6807
  "type": "string",
6808
6808
  "enum": [
6809
6809
  "mock",
6810
- "cursor",
6811
6810
  "claude",
6812
6811
  "openai",
6813
6812
  "gemini"
@@ -6946,7 +6945,7 @@ var CONTRACT_JSON_STR = `{
6946
6945
  },
6947
6946
  "implement": {
6948
6947
  "summary": "Implement a feature using litedbmodel best practices.",
6949
- "description": "Reads the project's model definitions, then implements the described feature directly in the target source file(s), applying litedbmodel best-practice patterns: createMany for batch inserts, upsert with onConflict/onConflictUpdate for idempotent writes, forUpdate for concurrent-safe reads, and DBModel.transaction for multi-step operations. Avoids all eight common litedbmodel anti-patterns. Requires an agentic adapter (claude/cursor) that can read and write project files.",
6948
+ "description": "Reads the project's model definitions, then implements the described feature directly in the target source file(s), applying litedbmodel best-practice patterns: createMany for batch inserts, upsert with onConflict/onConflictUpdate for idempotent writes, forUpdate for concurrent-safe reads, and DBModel.transaction for multi-step operations. Avoids all eight common litedbmodel anti-patterns. Requires an agentic adapter (claude) that can read and write project files.",
6950
6949
  "usage": [
6951
6950
  "litedbmodel-gen implement \\"Add syncNutrientSummary in src/services/meal.service.ts\\" --target src/services/meal.service.ts --models \\"src/models/**/*.ts\\" --adapter claude",
6952
6951
  "litedbmodel-gen implement \\"Add bulk upsert for order items\\" --target src/services/order.service.ts --adapter claude"
@@ -6988,7 +6987,6 @@ var CONTRACT_JSON_STR = `{
6988
6987
  "type": "string",
6989
6988
  "enum": [
6990
6989
  "mock",
6991
- "cursor",
6992
6990
  "claude",
6993
6991
  "openai",
6994
6992
  "gemini"
@@ -7073,7 +7071,7 @@ var CONTRACT_JSON_STR = `{
7073
7071
  "network",
7074
7072
  "filesystem_write"
7075
7073
  ],
7076
- "sideEffectNote": "The agent reads project files and writes implementation code directly to the target source file(s). Uses an agentic adapter (claude/cursor) with file read/write tools.",
7074
+ "sideEffectNote": "The agent reads project files and writes implementation code directly to the target source file(s). Uses an agentic adapter (claude) with file read/write tools.",
7077
7075
  "safeDryRunOption": "show-prompt",
7078
7076
  "expectedDurationMs": 120000,
7079
7077
  "retryableExitCodes": [
@@ -8196,15 +8194,6 @@ async function createAdapter(adapterName, config2) {
8196
8194
  responses: config2.mockResponses ?? {}
8197
8195
  });
8198
8196
  }
8199
- case "cursor": {
8200
- const m = await import(`${PKG}/adapters/cursor-sdk`);
8201
- const apiKey = process.env["CURSOR_API_KEY"];
8202
- return m.CursorSdkAdapter.create({
8203
- apiKey,
8204
- ...config2.model ? { model: config2.model } : {},
8205
- ...config2.cwd ? { cwd: config2.cwd } : {}
8206
- });
8207
- }
8208
8197
  case "claude": {
8209
8198
  const m = await import(`${PKG}/adapters/claude-agent-sdk`);
8210
8199
  return new m.ClaudeAgentSdkAdapter({
@@ -8219,15 +8208,15 @@ async function createAdapter(adapterName, config2) {
8219
8208
  });
8220
8209
  }
8221
8210
  case "gemini": {
8222
- const m = await import(`${PKG}/adapters/gemini-sdk`);
8223
- return new m.GeminiSdkAdapter({
8211
+ const m = await import(`${PKG}/adapters/adk-sdk`);
8212
+ return new m.AdkSdkAdapter({
8224
8213
  apiKey: process.env["GEMINI_API_KEY"],
8225
8214
  ...config2.model ? { model: config2.model } : {}
8226
8215
  });
8227
8216
  }
8228
8217
  default:
8229
8218
  throw Object.assign(
8230
- new Error(`Unknown adapter: "${adapterName}". Valid values: mock, cursor, claude, openai, gemini`),
8219
+ new Error(`Unknown adapter: "${adapterName}". Valid values: mock, claude, openai, gemini`),
8231
8220
  { exitCode: EXIT_ADAPTER_ERROR }
8232
8221
  );
8233
8222
  }