junecoder 1.0.2 → 1.0.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/checkpoint.mjs CHANGED
@@ -27,9 +27,9 @@ export async function listCheckpoints(cwd) {
27
27
  }
28
28
  }
29
29
 
30
- /** Rewind to a specific checkpoint. */
30
+ /** Rewind to a specific checkpoint. (Not yet implemented.) */
31
31
  export async function rewind(cwd, id) {
32
- throw new Error('Checkpoint rewind not implemented yet.');
32
+ return 'Checkpoint rewind not implemented yet.';
33
33
  }
34
34
 
35
35
  /** Check if cwd is inside a git repo. */
package/config.mjs CHANGED
@@ -47,7 +47,7 @@ export function defaultConfig() {
47
47
  },
48
48
  provider: {
49
49
  type: 'deepseek',
50
- apiKey: process.env.DEEPSEEK_API_KEY || '',
50
+ apiKey: '', // injected by cli.js / TUI from env after load
51
51
  model: 'deepseek-v4-pro',
52
52
  baseURL: 'https://api.deepseek.com',
53
53
  thinking: { type: 'enabled' },
package/distill.mjs CHANGED
@@ -9,6 +9,9 @@
9
9
  */
10
10
 
11
11
  import { createHash } from 'node:crypto';
12
+ import { join } from 'node:path';
13
+ import { mkdirSync, writeFileSync } from 'node:fs';
14
+ import { homedir } from 'node:os';
12
15
 
13
16
  // ─── Candidate extraction heuristics ───────────────────────────────────────────
14
17
 
@@ -161,10 +164,6 @@ export async function saveCandidate(memory, candidate, opts = {}) {
161
164
  timestamp: Date.now(),
162
165
  };
163
166
 
164
- const { join } = await import('node:path');
165
- const { mkdirSync, writeFileSync } = await import('node:fs');
166
- const { homedir } = await import('node:os');
167
-
168
167
  const dir = memory.dir || join(homedir(), '.junecoder', 'memory');
169
168
  try { mkdirSync(dir, { recursive: true }); } catch { /* dir exists */ }
170
169
 
package/executor.mjs CHANGED
@@ -131,8 +131,7 @@ export async function executeToolCalls(agent, toolByName, toolCalls, callbacks,
131
131
  // Execute serial group one by one
132
132
  for (const item of serialItems) {
133
133
  try {
134
- // Single-item parallel-ish (but in a serial loop)
135
- const [result] = await Promise.all([runOne(agent, item, cb, signal)]);
134
+ const result = await runOne(agent, item, cb, signal);
136
135
  results[item._idx] = result;
137
136
  } catch {
138
137
  results[item._idx] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "junecoder",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Zero Npm Dependencies Agent Framework",
5
5
  "main": "agent.mjs",
6
6
  "type": "module",
package/provider.mjs CHANGED
@@ -31,8 +31,8 @@ export async function chat(provider, { messages, tools, onToken, onReasoning, si
31
31
  };
32
32
 
33
33
  // DeepSeek thinking/reasoning config
34
- if (thinking.type === 'enabled') {
35
- body.thinking = { type: 'enabled' };
34
+ if (thinking.type) {
35
+ body.thinking = { type: thinking.type };
36
36
  }
37
37
  if (thinking.reasoning_effort) {
38
38
  body.reasoning_effort = thinking.reasoning_effort;
package/tools/grep.mjs CHANGED
@@ -34,10 +34,10 @@ export const grepTool = {
34
34
  const base = args.path ? resolve(cwd, args.path) : cwd;
35
35
 
36
36
  try {
37
- let cmd = `grep -rn --include='*.${args.glob || '*'}' `;
37
+ const globPart = args.glob ? ` --include='*.${args.glob}'` : '';
38
38
  // Escape the pattern for shell
39
39
  const escaped = args.pattern.replace(/'/g, "'\\''");
40
- cmd += `'${escaped}' "${base}" 2>/dev/null | head -200`;
40
+ let cmd = `grep -rn${globPart} '${escaped}' "${base}" 2>/dev/null | head -200`;
41
41
 
42
42
  const output = execSync(cmd, {
43
43
  encoding: 'utf-8',