junecoder 1.0.1 → 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/agent.mjs +1 -1
- package/checkpoint.mjs +2 -2
- package/config.mjs +1 -1
- package/distill.mjs +3 -4
- package/executor.mjs +1 -2
- package/package.json +1 -1
- package/provider.mjs +2 -2
- package/tools/grep.mjs +2 -2
- package/tui.mjs +3 -3
package/agent.mjs
CHANGED
|
@@ -239,7 +239,7 @@ export function loadProjectInstructions(cwd) {
|
|
|
239
239
|
|
|
240
240
|
// ─── System Prompt ────────────────────────────────────────────────────────────
|
|
241
241
|
|
|
242
|
-
export const DEFAULT_SYSTEM_PROMPT = `You are
|
|
242
|
+
export const DEFAULT_SYSTEM_PROMPT = `You are JuneCoder, a coding agent. You are a terse, precise engineer who cuts straight to the point—no fluff, no showing off, no filler. You write the most minimal, elegant code that solves the problem, and you say things in as few words as the truth allows.
|
|
243
243
|
|
|
244
244
|
Rules:
|
|
245
245
|
- Prefer tool calls over guessing. Read files before modifying them.
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
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
|
|
35
|
-
body.thinking = { type:
|
|
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
|
-
|
|
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
|
|
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',
|
package/tui.mjs
CHANGED
|
@@ -152,7 +152,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
152
152
|
};
|
|
153
153
|
let assistantLabeled = false;
|
|
154
154
|
const ensureAssistantLabel = () => {
|
|
155
|
-
if (!assistantLabeled) { assistantLabeled = true; pushLabel("\u276f
|
|
155
|
+
if (!assistantLabeled) { assistantLabeled = true; pushLabel("\u276f JuneCoder:", ansi.bold + C.assistant); }
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
let lastFrame = "", renderTimer = null;
|
|
@@ -204,7 +204,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
204
204
|
state.scroll = Math.min(state.scroll, maxScroll);
|
|
205
205
|
const end = convLines.length - state.scroll;
|
|
206
206
|
const visible = convLines.slice(Math.max(0, end - convH), end);
|
|
207
|
-
const out = [`${ansi.home}${ansi.bold}${C.tool}
|
|
207
|
+
const out = [`${ansi.home}${ansi.bold}${C.tool}JuneCoder${ansi.reset}${ansi.dim} \u2502 ${sliceByWidth(agent.provider.model || "?", 30)} \u2502 ${sliceByWidth(basename(agent.cwd), Math.max(10, cols - 50))}${ansi.reset}${ansi.clearLine}`];
|
|
208
208
|
|
|
209
209
|
const pad = convH - visible.length;
|
|
210
210
|
for (let i = 0; i < pad; i++) out.push(ansi.clearLine);
|
|
@@ -429,7 +429,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
429
429
|
state.status = "Session restored";
|
|
430
430
|
} else {
|
|
431
431
|
pushLine("", C.dim);
|
|
432
|
-
pushLine("
|
|
432
|
+
pushLine("JuneCoder TUI \u2014 " + (agent.provider.model || ""), ansi.bold + C.tool);
|
|
433
433
|
pushLine("Type /help for commands, Ctrl+C to quit.", C.dim);
|
|
434
434
|
pushLine("", C.dim);
|
|
435
435
|
}
|