@trydecember/cli 0.3.12 → 0.3.13
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 +10 -2
- package/dist/december.js +82 -18
- package/package.json +1 -1
- package/scripts/postinstall.js +1 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# December
|
|
2
2
|
|
|
3
|
-
December is an AI coding
|
|
3
|
+
December is an AI coding agent that lives in your terminal. It understands your codebase and helps you build faster by writing code, fixing bugs, and running commands. Use it directly in your terminal or alongside your favorite IDE.
|
|
4
4
|
|
|
5
5
|
**Also available on the web at <a href="https://trydecember.com" target="_blank">trydecember.com</a>**
|
|
6
6
|
|
|
@@ -14,12 +14,20 @@ December is an AI coding assistant that lives in your terminal. It understands y
|
|
|
14
14
|
|
|
15
15
|
### Get Started
|
|
16
16
|
|
|
17
|
-
1. Install December:
|
|
17
|
+
1. Install December (via npm, curl, or powershell):
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm install -g @trydecember/cli
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
```bash
|
|
24
|
+
curl -fsSL https://trydecember.com/install.sh | bash
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
irm https://trydecember.com/install.ps1 | iex
|
|
29
|
+
```
|
|
30
|
+
|
|
23
31
|
2. Navigate to your project directory and run `december`.
|
|
24
32
|
|
|
25
33
|
### Feedback & Bugs
|
package/dist/december.js
CHANGED
|
@@ -23143,7 +23143,7 @@ var init_dist = __esm(() => {
|
|
|
23143
23143
|
});
|
|
23144
23144
|
|
|
23145
23145
|
// ../../packages/shared/src/env.ts
|
|
23146
|
-
var env3;
|
|
23146
|
+
var env3, effectiveJwtSecret;
|
|
23147
23147
|
var init_env = __esm(() => {
|
|
23148
23148
|
init_dist();
|
|
23149
23149
|
init_zod();
|
|
@@ -23161,7 +23161,7 @@ var init_env = __esm(() => {
|
|
|
23161
23161
|
FIRECRACKER_BINARY: exports_external.string().default("./firecracker"),
|
|
23162
23162
|
FIRECRACKER_KERNEL_PATH: exports_external.string().default("./vmlinux.bin"),
|
|
23163
23163
|
FIRECRACKER_ROOTFS_PATH: exports_external.string().default("./ubuntu-rootfs.ext4"),
|
|
23164
|
-
JWT_SECRET: exports_external.string().default("default-dev-jwt-secret")
|
|
23164
|
+
JWT_SECRET: exports_external.string().default(process.env.ACCESS_TOKEN_SECRET || "default-dev-jwt-secret")
|
|
23165
23165
|
},
|
|
23166
23166
|
clientPrefix: "",
|
|
23167
23167
|
client: {},
|
|
@@ -23172,8 +23172,9 @@ var init_env = __esm(() => {
|
|
|
23172
23172
|
throw new Error("Invalid shared environment variables");
|
|
23173
23173
|
}
|
|
23174
23174
|
});
|
|
23175
|
-
|
|
23176
|
-
|
|
23175
|
+
effectiveJwtSecret = env3.JWT_SECRET || process.env.ACCESS_TOKEN_SECRET;
|
|
23176
|
+
if (env3.NODE_ENV === "production" && (!effectiveJwtSecret || effectiveJwtSecret === "default-dev-jwt-secret")) {
|
|
23177
|
+
throw new Error("JWT_SECRET or ACCESS_TOKEN_SECRET must be configured with a secure secret in production.");
|
|
23177
23178
|
}
|
|
23178
23179
|
});
|
|
23179
23180
|
|
|
@@ -63425,6 +63426,9 @@ function decomposeContext(options) {
|
|
|
63425
63426
|
};
|
|
63426
63427
|
}
|
|
63427
63428
|
|
|
63429
|
+
// ../../packages/shared/src/usage-rates.ts
|
|
63430
|
+
var init_usage_rates = () => {};
|
|
63431
|
+
|
|
63428
63432
|
// ../../packages/shared/src/index.ts
|
|
63429
63433
|
var init_src = __esm(() => {
|
|
63430
63434
|
init_env();
|
|
@@ -63432,6 +63436,7 @@ var init_src = __esm(() => {
|
|
|
63432
63436
|
init_ignore();
|
|
63433
63437
|
init_custom_commands();
|
|
63434
63438
|
init_permissions2();
|
|
63439
|
+
init_usage_rates();
|
|
63435
63440
|
});
|
|
63436
63441
|
|
|
63437
63442
|
// ../../packages/providers/src/providers/anthropic.ts
|
|
@@ -104735,7 +104740,8 @@ async function streamAssistantResponse(agent, eventQueue, signal, turnCount = 1)
|
|
|
104735
104740
|
eventQueue.push({
|
|
104736
104741
|
type: "AgentUsage",
|
|
104737
104742
|
promptTokens: chunk.promptTokens,
|
|
104738
|
-
completionTokens: chunk.completionTokens
|
|
104743
|
+
completionTokens: chunk.completionTokens,
|
|
104744
|
+
model: loggedModel
|
|
104739
104745
|
});
|
|
104740
104746
|
}
|
|
104741
104747
|
}
|
|
@@ -108818,13 +108824,18 @@ function createLocalBashOperations() {
|
|
|
108818
108824
|
cwd,
|
|
108819
108825
|
detached: process.platform !== "win32",
|
|
108820
108826
|
env: options.env ?? process.env,
|
|
108821
|
-
shell: true
|
|
108827
|
+
shell: true,
|
|
108828
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
108822
108829
|
});
|
|
108830
|
+
try {
|
|
108831
|
+
child.stdin?.end?.();
|
|
108832
|
+
} catch {}
|
|
108823
108833
|
if (child.pid)
|
|
108824
108834
|
trackDetachedChildPid(child.pid);
|
|
108825
108835
|
let output = "";
|
|
108836
|
+
let resolved = false;
|
|
108826
108837
|
const handleData = (data) => {
|
|
108827
|
-
const chunk = data.toString();
|
|
108838
|
+
const chunk = typeof data === "string" ? data : data.toString();
|
|
108828
108839
|
output += chunk;
|
|
108829
108840
|
options.onData(chunk);
|
|
108830
108841
|
};
|
|
@@ -108849,13 +108860,19 @@ function createLocalBashOperations() {
|
|
|
108849
108860
|
else
|
|
108850
108861
|
options.signal.addEventListener("abort", onAbort, { once: true });
|
|
108851
108862
|
}
|
|
108852
|
-
|
|
108863
|
+
const cleanup = () => {
|
|
108853
108864
|
if (child.pid)
|
|
108854
108865
|
untrackDetachedChildPid(child.pid);
|
|
108855
108866
|
if (timeoutHandle)
|
|
108856
108867
|
clearTimeout(timeoutHandle);
|
|
108857
108868
|
if (options.signal)
|
|
108858
108869
|
options.signal.removeEventListener("abort", onAbort);
|
|
108870
|
+
};
|
|
108871
|
+
const finish = (code) => {
|
|
108872
|
+
if (resolved)
|
|
108873
|
+
return;
|
|
108874
|
+
resolved = true;
|
|
108875
|
+
cleanup();
|
|
108859
108876
|
if (timedOut) {
|
|
108860
108877
|
return reject(new Error("timeout"));
|
|
108861
108878
|
}
|
|
@@ -108863,6 +108880,17 @@ function createLocalBashOperations() {
|
|
|
108863
108880
|
return reject(new Error("aborted"));
|
|
108864
108881
|
}
|
|
108865
108882
|
resolve4({ exitCode: code, output });
|
|
108883
|
+
};
|
|
108884
|
+
child.on("close", finish);
|
|
108885
|
+
child.on("exit", (code) => {
|
|
108886
|
+
setTimeout(() => finish(code), 50);
|
|
108887
|
+
});
|
|
108888
|
+
child.on("error", (err) => {
|
|
108889
|
+
if (resolved)
|
|
108890
|
+
return;
|
|
108891
|
+
resolved = true;
|
|
108892
|
+
cleanup();
|
|
108893
|
+
reject(err);
|
|
108866
108894
|
});
|
|
108867
108895
|
});
|
|
108868
108896
|
}
|
|
@@ -264515,10 +264543,14 @@ function startDirectCommand(command, options = {}) {
|
|
|
264515
264543
|
stdio: ["pipe", "pipe", "pipe"],
|
|
264516
264544
|
detached: !isWindows3
|
|
264517
264545
|
});
|
|
264546
|
+
try {
|
|
264547
|
+
child.stdin?.end?.();
|
|
264548
|
+
} catch {}
|
|
264518
264549
|
let timeoutTimer = null;
|
|
264519
264550
|
const promise4 = new Promise((resolve4) => {
|
|
264551
|
+
let closed = false;
|
|
264520
264552
|
child.stdout?.on("data", (data2) => {
|
|
264521
|
-
const str2 = data2.toString("utf8");
|
|
264553
|
+
const str2 = typeof data2 === "string" ? data2 : data2.toString("utf8");
|
|
264522
264554
|
output += str2;
|
|
264523
264555
|
if (isBackground && bgTaskId) {
|
|
264524
264556
|
taskManager.appendOutput(bgTaskId, str2);
|
|
@@ -264527,7 +264559,7 @@ function startDirectCommand(command, options = {}) {
|
|
|
264527
264559
|
}
|
|
264528
264560
|
});
|
|
264529
264561
|
child.stderr?.on("data", (data2) => {
|
|
264530
|
-
const str2 = data2.toString("utf8");
|
|
264562
|
+
const str2 = typeof data2 === "string" ? data2 : data2.toString("utf8");
|
|
264531
264563
|
output += str2;
|
|
264532
264564
|
if (isBackground && bgTaskId) {
|
|
264533
264565
|
taskManager.appendOutput(bgTaskId, str2);
|
|
@@ -264536,6 +264568,9 @@ function startDirectCommand(command, options = {}) {
|
|
|
264536
264568
|
}
|
|
264537
264569
|
});
|
|
264538
264570
|
child.on("error", (err) => {
|
|
264571
|
+
if (closed)
|
|
264572
|
+
return;
|
|
264573
|
+
closed = true;
|
|
264539
264574
|
const errStr = `
|
|
264540
264575
|
Failed to start process: ${err?.message || err}
|
|
264541
264576
|
`;
|
|
@@ -264551,7 +264586,10 @@ Failed to start process: ${err?.message || err}
|
|
|
264551
264586
|
taskId: bgTaskId
|
|
264552
264587
|
});
|
|
264553
264588
|
});
|
|
264554
|
-
|
|
264589
|
+
const finish = (code) => {
|
|
264590
|
+
if (closed)
|
|
264591
|
+
return;
|
|
264592
|
+
closed = true;
|
|
264555
264593
|
if (timeoutTimer)
|
|
264556
264594
|
clearTimeout(timeoutTimer);
|
|
264557
264595
|
const finalCode = isAborted2 ? 130 : code ?? 0;
|
|
@@ -264564,6 +264602,10 @@ Failed to start process: ${err?.message || err}
|
|
|
264564
264602
|
isBackground: false
|
|
264565
264603
|
});
|
|
264566
264604
|
}
|
|
264605
|
+
};
|
|
264606
|
+
child.on("close", finish);
|
|
264607
|
+
child.on("exit", (code) => {
|
|
264608
|
+
setTimeout(() => finish(code), 50);
|
|
264567
264609
|
});
|
|
264568
264610
|
if (timeoutMs > 0 && timeoutMs < Infinity) {
|
|
264569
264611
|
timeoutTimer = setTimeout(() => {
|
|
@@ -265156,7 +265198,7 @@ Provider: ${displayName}
|
|
|
265156
265198
|
*Prompts go directly to the provider API; December servers do not track, log, or bill this usage. Token consumption, quotas, and billing are managed in your ${displayName} account at [${billingLink}](${billingLink})*`;
|
|
265157
265199
|
}
|
|
265158
265200
|
var PROVIDER_BILLING_LINKS, PROVIDER_DISPLAY_NAMES;
|
|
265159
|
-
var
|
|
265201
|
+
var init_usage_rates2 = __esm(() => {
|
|
265160
265202
|
init_messages5();
|
|
265161
265203
|
PROVIDER_BILLING_LINKS = {
|
|
265162
265204
|
december: "https://trydecember.com/settings/usage",
|
|
@@ -266357,7 +266399,6 @@ function useAgentSession({
|
|
|
266357
266399
|
}, [
|
|
266358
266400
|
agent2,
|
|
266359
266401
|
isAuthenticated,
|
|
266360
|
-
addToast,
|
|
266361
266402
|
setActiveMessages,
|
|
266362
266403
|
setAuthMode,
|
|
266363
266404
|
setCurrentGrillIndex,
|
|
@@ -267150,7 +267191,7 @@ var init_use_agent_session = __esm(async () => {
|
|
|
267150
267191
|
init_error_parser();
|
|
267151
267192
|
init_models5();
|
|
267152
267193
|
init_openrouter_models();
|
|
267153
|
-
|
|
267194
|
+
init_usage_rates2();
|
|
267154
267195
|
init_use_agent_runner();
|
|
267155
267196
|
await __promiseAll([
|
|
267156
267197
|
init_store(),
|
|
@@ -267198,13 +267239,17 @@ var init_local_operations = __esm(() => {
|
|
|
267198
267239
|
cwd: targetCwd,
|
|
267199
267240
|
detached: process.platform !== "win32",
|
|
267200
267241
|
env: options.env ?? process.env,
|
|
267201
|
-
shell: true
|
|
267242
|
+
shell: true,
|
|
267243
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
267202
267244
|
});
|
|
267245
|
+
try {
|
|
267246
|
+
child.stdin?.end?.();
|
|
267247
|
+
} catch {}
|
|
267203
267248
|
const task = taskManager.addTask(command, child);
|
|
267204
267249
|
let output = "";
|
|
267205
267250
|
let resolved = false;
|
|
267206
267251
|
const handleData = (data2) => {
|
|
267207
|
-
const chunk2 = data2.toString();
|
|
267252
|
+
const chunk2 = typeof data2 === "string" ? data2 : data2.toString();
|
|
267208
267253
|
output += chunk2;
|
|
267209
267254
|
taskManager.appendOutput(task.id, chunk2);
|
|
267210
267255
|
if (!resolved && options.onData) {
|
|
@@ -267226,7 +267271,7 @@ var init_local_operations = __esm(() => {
|
|
|
267226
267271
|
resolve4({ exitCode: null, output, taskId: task.id });
|
|
267227
267272
|
}
|
|
267228
267273
|
}, options.waitMsBeforeAsync) : undefined;
|
|
267229
|
-
|
|
267274
|
+
const finish = (code) => {
|
|
267230
267275
|
if (bgTimeout)
|
|
267231
267276
|
clearTimeout(bgTimeout);
|
|
267232
267277
|
if (timeoutHandle)
|
|
@@ -267236,6 +267281,25 @@ var init_local_operations = __esm(() => {
|
|
|
267236
267281
|
resolved = true;
|
|
267237
267282
|
resolve4({ exitCode: code, output });
|
|
267238
267283
|
}
|
|
267284
|
+
};
|
|
267285
|
+
child.on("close", finish);
|
|
267286
|
+
child.on("exit", (code) => {
|
|
267287
|
+
setTimeout(() => finish(code), 50);
|
|
267288
|
+
});
|
|
267289
|
+
child.on("error", (err) => {
|
|
267290
|
+
if (bgTimeout)
|
|
267291
|
+
clearTimeout(bgTimeout);
|
|
267292
|
+
if (timeoutHandle)
|
|
267293
|
+
clearTimeout(timeoutHandle);
|
|
267294
|
+
taskManager.markCompleted(task.id, 1);
|
|
267295
|
+
if (!resolved) {
|
|
267296
|
+
resolved = true;
|
|
267297
|
+
const errMsg = `
|
|
267298
|
+
Failed to start process: ${err?.message || err}
|
|
267299
|
+
`;
|
|
267300
|
+
output += errMsg;
|
|
267301
|
+
resolve4({ exitCode: 1, output });
|
|
267302
|
+
}
|
|
267239
267303
|
});
|
|
267240
267304
|
});
|
|
267241
267305
|
},
|
|
@@ -267463,7 +267527,7 @@ import path20 from "node:path";
|
|
|
267463
267527
|
// package.json
|
|
267464
267528
|
var package_default = {
|
|
267465
267529
|
name: "@trydecember/cli",
|
|
267466
|
-
version: "0.3.
|
|
267530
|
+
version: "0.3.13",
|
|
267467
267531
|
description: "AI coding agent for terminal and cloud.",
|
|
267468
267532
|
homepage: "https://trydecember.com",
|
|
267469
267533
|
repository: {
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -6,11 +6,10 @@ if (process.env.CI || process.env.NODE_ENV === 'development') {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const BLUE = '\x1b[38;2;135;178;244m'
|
|
9
|
-
const GREEN = '\x1b[38;2;110;231;183m'
|
|
10
9
|
const WHITE = '\x1b[38;2;244;244;245m'
|
|
11
10
|
const TRUNK = '\x1b[38;2;63;63;70m'
|
|
12
11
|
const RESET = '\x1b[0m'
|
|
13
12
|
|
|
14
|
-
console.log(`\n${BLUE}✱${RESET} ${
|
|
13
|
+
console.log(`\n${BLUE}✱${RESET} ${BLUE}december successfully installed${RESET}`)
|
|
15
14
|
console.log(`${TRUNK}│${RESET}`)
|
|
16
15
|
console.log(`${BLUE}✱${RESET} run ${WHITE}december${RESET} to start your session\n`)
|