@trydecember/cli 0.4.5 → 0.4.7

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
  # December
2
2
 
3
- December is a 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.
3
+ December is a (so much) better coding agent for terminal and cloud. 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
 
package/dist/december.js CHANGED
@@ -65,8 +65,8 @@ var package_default;
65
65
  var init_package = __esm(() => {
66
66
  package_default = {
67
67
  name: "@trydecember/cli",
68
- version: "0.4.5",
69
- description: "a coding agent for terminal and cloud.",
68
+ version: "0.4.7",
69
+ description: "a (so much) better coding agent for terminal and cloud.",
70
70
  homepage: "https://trydecember.com",
71
71
  repository: {
72
72
  type: "git",
@@ -497,6 +497,7 @@ function supportsModelThinking(model) {
497
497
  function createProvider(config, streamImpl) {
498
498
  return {
499
499
  id: config.id,
500
+ api: config.api,
500
501
  stream: streamImpl
501
502
  };
502
503
  }
@@ -66427,13 +66428,22 @@ function resolveAnthropicModel(model) {
66427
66428
  function anthropicProvider(baseURL, apiKey, customClientOrDefaultHeaders, customClient) {
66428
66429
  const isCustomClient = customClientOrDefaultHeaders instanceof Anthropic || Boolean(customClientOrDefaultHeaders && typeof customClientOrDefaultHeaders.messages?.create === "function");
66429
66430
  const defaultHeaders = isCustomClient ? undefined : customClientOrDefaultHeaders;
66430
- const isOAuth = Boolean(defaultHeaders && (defaultHeaders["anthropic-beta"]?.includes("oauth") || defaultHeaders["anthropic-beta"]?.includes("claude-code"))) || Boolean(apiKey && !apiKey.startsWith("sk-ant-api"));
66431
+ let resolvedBaseURL = baseURL;
66432
+ let resolvedApiKey = apiKey;
66433
+ if (baseURL && !baseURL.startsWith("http") && !baseURL.startsWith("/") && apiKey === undefined) {
66434
+ resolvedApiKey = baseURL;
66435
+ resolvedBaseURL = undefined;
66436
+ }
66437
+ const isExplicitOAuth = Boolean(defaultHeaders && (defaultHeaders["anthropic-beta"]?.includes("oauth") || defaultHeaders["anthropic-beta"]?.includes("claude-code")));
66438
+ const isTokenOAuth = Boolean(resolvedApiKey && (resolvedApiKey.startsWith("sk-ant-oat") || resolvedApiKey.startsWith("Bearer ")));
66439
+ const isEnvOAuth = Boolean(!resolvedApiKey && !process.env.ANTHROPIC_API_KEY && (process.env.ANTHROPIC_AUTH_TOKEN || process.env.CLAUDE_CODE_OAUTH_TOKEN));
66440
+ const isOAuth = isExplicitOAuth || isTokenOAuth || isEnvOAuth;
66431
66441
  const client = (isCustomClient ? customClientOrDefaultHeaders : customClient) || new Anthropic({
66432
- baseURL,
66433
- apiKey: isOAuth ? undefined : apiKey || process.env.ANTHROPIC_API_KEY,
66434
- authToken: isOAuth ? apiKey || process.env.ANTHROPIC_AUTH_TOKEN || process.env.CLAUDE_CODE_OAUTH_TOKEN : undefined,
66442
+ baseURL: resolvedBaseURL,
66443
+ apiKey: isOAuth ? undefined : resolvedApiKey || process.env.ANTHROPIC_API_KEY,
66444
+ authToken: isOAuth ? resolvedApiKey || process.env.ANTHROPIC_AUTH_TOKEN || process.env.CLAUDE_CODE_OAUTH_TOKEN : undefined,
66435
66445
  defaultHeaders: {
66436
- ...isOAuth ? { "anthropic-beta": "oauth-2024-11-18" } : {},
66446
+ ...isOAuth ? { "anthropic-beta": "claude-code-20250219,oauth-2024-06-20" } : {},
66437
66447
  ...defaultHeaders || {}
66438
66448
  }
66439
66449
  });
@@ -108645,10 +108655,10 @@ async function fetchLiveProviderModels(provider, apiKey, baseUrl, fetchFn = fetc
108645
108655
  } else if (normalized === "anthropic" || normalized === "claude") {
108646
108656
  endpoint = "https://api.anthropic.com/v1/models";
108647
108657
  headers["anthropic-version"] = "2023-06-01";
108648
- const isOAuth = normalized === "claude" || !apiKey.startsWith("sk-ant-api") || apiKey.startsWith("Bearer ");
108649
- if (isOAuth && !apiKey.startsWith("sk-ant-api")) {
108658
+ const isOAuth = normalized === "claude" || apiKey.startsWith("sk-ant-oat") || apiKey.startsWith("Bearer ");
108659
+ if (isOAuth) {
108650
108660
  headers["Authorization"] = apiKey.startsWith("Bearer ") ? apiKey : `Bearer ${apiKey}`;
108651
- headers["anthropic-beta"] = "oauth-2024-11-18";
108661
+ headers["anthropic-beta"] = "claude-code-20250219,oauth-2024-06-20";
108652
108662
  } else {
108653
108663
  headers["x-api-key"] = apiKey;
108654
108664
  }
@@ -114423,7 +114433,7 @@ function inferManagerFromPath(filePath, realPath) {
114423
114433
  return "npm";
114424
114434
  }
114425
114435
  if (normalized.includes("/.december/bin/december") || normalized.includes("/.december/bin") || normalized.includes("/.local/bin/december") || normalized.includes("/.local/bin/")) {
114426
- return "standalone";
114436
+ return "curl";
114427
114437
  }
114428
114438
  return "unknown";
114429
114439
  }
@@ -114771,7 +114781,7 @@ function isPermissionDeniedError2(errMsg) {
114771
114781
  }
114772
114782
  function detectInstallMethod(options) {
114773
114783
  const configMethod = options?.configInstallMethod;
114774
- const validMethods = ["npm", "bun", "pnpm", "npx", "source"];
114784
+ const validMethods = ["npm", "bun", "pnpm", "npx", "curl", "source"];
114775
114785
  if (configMethod && validMethods.includes(configMethod)) {
114776
114786
  return configMethod;
114777
114787
  }
@@ -114793,6 +114803,9 @@ function detectInstallMethod(options) {
114793
114803
  if (combined.includes("/_npx/") || combined.includes("\\_npx\\") || combined.includes("/.bunx/") || env.npm_config_user_agent?.includes("npx")) {
114794
114804
  return "npx";
114795
114805
  }
114806
+ if (execPath.includes(".december/bin") || combined.includes(".december/bin") || execPath.includes(".local/bin/december") || combined.includes(".local/bin/december") || execPath.endsWith("/december") && !execPath.includes("node_modules") && !execPath.includes(".bun") && !execPath.includes("/node")) {
114807
+ return "curl";
114808
+ }
114796
114809
  if (combined.includes(".bun/bin") || combined.includes("/.bun/") || execPath.includes("/bun") && !execPath.endsWith("/node")) {
114797
114810
  return "bun";
114798
114811
  }
@@ -114803,6 +114816,13 @@ function detectInstallMethod(options) {
114803
114816
  }
114804
114817
  function getUpdateCommand(method, _platform = process.platform) {
114805
114818
  switch (method) {
114819
+ case "curl": {
114820
+ return {
114821
+ command: "curl -fsSL https://trydecember.com/install.sh | bash",
114822
+ manualCmd: "curl -fsSL https://trydecember.com/install.sh | bash",
114823
+ description: "Standalone binary via curl installer"
114824
+ };
114825
+ }
114806
114826
  case "bun": {
114807
114827
  return {
114808
114828
  command: "bun add -g @trydecember/cli@latest",
@@ -114864,8 +114884,8 @@ async function performCliUpdate(options) {
114864
114884
  });
114865
114885
  if (!options?.configInstallMethod && preDiagnosis?.activeBinary?.manager) {
114866
114886
  const activeMgr = preDiagnosis.activeBinary.manager;
114867
- if (activeMgr === "bun" || activeMgr === "npm" || activeMgr === "pnpm" || activeMgr === "source") {
114868
- detectedMethod = activeMgr;
114887
+ if (activeMgr === "bun" || activeMgr === "npm" || activeMgr === "pnpm" || activeMgr === "curl" || activeMgr === "standalone" || activeMgr === "source") {
114888
+ detectedMethod = activeMgr === "standalone" ? "curl" : activeMgr;
114869
114889
  }
114870
114890
  }
114871
114891
  const method = detectedMethod;
@@ -276796,12 +276816,9 @@ Options:
276796
276816
  }
276797
276817
  // src/constants/release-highlights.json
276798
276818
  var release_highlights_default = {
276799
- version: "0.4.5",
276800
- title: "What's New in v0.4.5",
276801
- bullets: [
276802
- "*(cli,tui)* Add voice input dictation and workspace trust verification",
276803
- "*(tools,cli)* Interactive cdp browser engine and browser_action tool (#506, #509)"
276804
- ],
276819
+ version: "0.4.7",
276820
+ title: "What's New in v0.4.7",
276821
+ bullets: ["*(docs)* Add installer redirects for install.sh and install"],
276805
276822
  url: "https://trydecember.com/docs/changelog"
276806
276823
  };
276807
276824
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trydecember/cli",
3
- "version": "0.4.5",
4
- "description": "a coding agent for terminal and cloud.",
3
+ "version": "0.4.7",
4
+ "description": "a (so much) better coding agent for terminal and cloud.",
5
5
  "homepage": "https://trydecember.com",
6
6
  "repository": {
7
7
  "type": "git",