tempo-agent 1.1.2 → 1.3.0

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
@@ -1,6 +1,6 @@
1
1
  # Tempo [![npm version](https://img.shields.io/npm/v/tempo-agent.svg?style=flat-square)](https://www.npmjs.org/package/tempo-agent)
2
2
 
3
- AI-driven code generation CLI. Give Tempo a goal, and it writes, validates, and retries code changes step by step using Claude.
3
+ AI-driven code generation CLI. Give Tempo a goal, and it writes, validates, and retries code changes step by step.
4
4
 
5
5
  ## Install
6
6
 
@@ -10,23 +10,25 @@ npm install -g tempo-agent
10
10
 
11
11
  ## Requirements
12
12
 
13
- Set your Anthropic API key as an environment variable.
13
+ Tempo uses the **Gemini 2.0 Flash** model via the Google AI API (free tier available no billing required).
14
+
15
+ Set your Gemini API key as an environment variable.
14
16
 
15
17
  **macOS / Linux**
16
18
  ```bash
17
- export ANTHROPIC_API_KEY=your-key-here
19
+ export GEMINI_API_KEY=your-key-here
18
20
  ```
19
21
 
20
22
  **Windows (PowerShell)**
21
23
  ```powershell
22
24
  # Current session only
23
- $env:ANTHROPIC_API_KEY = "your-key-here"
25
+ $env:GEMINI_API_KEY = "your-key-here"
24
26
 
25
27
  # Permanently (no need to set it again after restart)
26
- [System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-key-here", "User")
28
+ [System.Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your-key-here", "User")
27
29
  ```
28
30
 
29
- Get your API key at [console.anthropic.com](https://console.anthropic.com) → API Keys.
31
+ Get your free API key at [aistudio.google.com](https://aistudio.google.com) → Get API Key.
30
32
 
31
33
  ## Usage
32
34
 
@@ -73,7 +75,7 @@ Generates `.tempo/scores/my-feature.json` — a structured execution plan.
73
75
 
74
76
  ### 4. Edit the Score
75
77
 
76
- Open `.tempo/scores/my-feature.json` and fill in `files_allowed` for each Step — the list of files Claude is permitted to create or modify:
78
+ Open `.tempo/scores/my-feature.json` and fill in `files_allowed` for each Step — the list of files Tempo is permitted to create or modify:
77
79
 
78
80
  ```json
79
81
  {
@@ -120,7 +122,7 @@ Every run is saved to `.tempo/sessions/session-{timestamp}/`:
120
122
 
121
123
  | File | Contents |
122
124
  |---|---|
123
- | `step-N.md` | Prompt sent, files used, Claude response, result |
125
+ | `step-N.md` | Prompt sent, files used, AI response, result |
124
126
  | `errors-step-N.md` | Validation errors and retry attempts |
125
127
  | `diff-N.patch` | Git diff after each Step |
126
128
 
@@ -134,8 +136,8 @@ Add to your `.gitignore`:
134
136
  ## How it works
135
137
 
136
138
  1. Reads the files listed in `files_allowed` for the current Step
137
- 2. Sends them to Claude with the Step instruction
138
- 3. Claude returns full file replacements
139
+ 2. Sends them to Gemini with the Step instruction
140
+ 3. Gemini returns full file replacements
139
141
  4. Tempo writes them to disk
140
- 5. Runs validation — if it fails, sends the errors back to Claude and retries
142
+ 5. Runs validation — if it fails, sends the errors back to Gemini and retries
141
143
  6. Moves to the next Step once validation passes
@@ -1 +1 @@
1
- {"version":3,"file":"claudeClient.d.ts","sourceRoot":"","sources":["../../src/executor/claudeClient.ts"],"names":[],"mappings":"AAKA,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC1F"}
1
+ {"version":3,"file":"claudeClient.d.ts","sourceRoot":"","sources":["../../src/executor/claudeClient.ts"],"names":[],"mappings":"AAKA,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiC1F"}
@@ -5,26 +5,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.callClaude = callClaude;
7
7
  const axios_1 = __importDefault(require("axios"));
8
- const CLAUDE_API_URL = 'https://api.anthropic.com/v1/messages';
9
- const DEFAULT_MODEL = 'claude-sonnet-4-6';
8
+ const GEMINI_MODEL = 'gemini-2.0-flash';
9
+ const GEMINI_API_URL = `https://generativelanguage.googleapis.com/v1beta/models/${GEMINI_MODEL}:generateContent`;
10
10
  async function callClaude(systemPrompt, userPrompt) {
11
- const apiKey = process.env.ANTHROPIC_API_KEY;
11
+ const apiKey = process.env.GEMINI_API_KEY;
12
12
  if (!apiKey) {
13
- throw new Error('ANTHROPIC_API_KEY environment variable is not set');
13
+ throw new Error('GEMINI_API_KEY environment variable is not set');
14
14
  }
15
15
  let response;
16
16
  try {
17
- response = await axios_1.default.post(CLAUDE_API_URL, {
18
- model: DEFAULT_MODEL,
19
- max_tokens: 8192,
20
- system: systemPrompt,
21
- messages: [{ role: 'user', content: userPrompt }],
17
+ response = await axios_1.default.post(`${GEMINI_API_URL}?key=${apiKey}`, {
18
+ systemInstruction: { parts: [{ text: systemPrompt }] },
19
+ contents: [{ role: 'user', parts: [{ text: userPrompt }] }],
20
+ generationConfig: { maxOutputTokens: 8192 },
22
21
  }, {
23
- headers: {
24
- 'x-api-key': apiKey,
25
- 'anthropic-version': '2023-06-01',
26
- 'content-type': 'application/json',
27
- },
22
+ headers: { 'content-type': 'application/json' },
28
23
  });
29
24
  }
30
25
  catch (err) {
@@ -35,10 +30,10 @@ async function callClaude(systemPrompt, userPrompt) {
35
30
  }
36
31
  throw err;
37
32
  }
38
- const block = response.data.content?.[0];
39
- if (!block || block.type !== 'text') {
40
- throw new Error('Unexpected response format from Claude API');
33
+ const text = response.data.candidates?.[0]?.content?.parts?.[0]?.text;
34
+ if (typeof text !== 'string') {
35
+ throw new Error('Unexpected response format from Gemini API');
41
36
  }
42
- return block.text;
37
+ return text;
43
38
  }
44
39
  //# sourceMappingURL=claudeClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claudeClient.js","sourceRoot":"","sources":["../../src/executor/claudeClient.ts"],"names":[],"mappings":";;;;;AAKA,gCAsCC;AA3CD,kDAA0C;AAE1C,MAAM,cAAc,GAAG,uCAAuC,CAAC;AAC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E,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;IACtE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tempo-agent",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "A modular CLI tool for AI-driven code generation and validation",
5
5
  "main": "dist/cli/index.js",
6
6
  "bin": {