@cnwenf/occ 2.1.306 → 2.1.307

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.
Files changed (2) hide show
  1. package/dist/cli.js +55 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- globalThis.MACRO={"VERSION":"2.1.306","BINARY_NAME":"occ","BUILD_TIME":"2026-08-19T19:58:24.299Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
2
+ globalThis.MACRO={"VERSION":"2.1.307","BINARY_NAME":"occ","BUILD_TIME":"2026-08-20T23:38:42.953Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
3
3
  // @bun
4
4
  var __create = Object.create;
5
5
  var __getProtoOf = Object.getPrototypeOf;
@@ -101103,6 +101103,7 @@ var init_modelAllowlist = __esm(() => {
101103
101103
  var exports_model = {};
101104
101104
  __export(exports_model, {
101105
101105
  resolveSkillModelOverride: () => resolveSkillModelOverride,
101106
+ resolveAnthropicDefaultModel: () => resolveAnthropicDefaultModel,
101106
101107
  renderModelSetting: () => renderModelSetting,
101107
101108
  renderModelName: () => renderModelName,
101108
101109
  renderDefaultModelSetting: () => renderDefaultModelSetting,
@@ -101241,7 +101242,32 @@ function getRuntimeMainLoopModel(params) {
101241
101242
  }
101242
101243
  return mainLoopModel;
101243
101244
  }
101245
+ function resolveAnthropicDefaultModel() {
101246
+ const raw = process.env.ANTHROPIC_DEFAULT_MODEL;
101247
+ if (raw === undefined || raw.trim() === "") {
101248
+ return;
101249
+ }
101250
+ const normalized = raw.trim().toLowerCase();
101251
+ if (normalized === "default" || normalized === "inherit") {
101252
+ return;
101253
+ }
101254
+ const aliasForm = normalized.replace(/\[1m\]$/i, "");
101255
+ if (aliasForm === "opusplan" || aliasForm === "haiku") {
101256
+ return;
101257
+ }
101258
+ if (getEnforceAvailableModels()) {
101259
+ return;
101260
+ }
101261
+ if (!isModelAllowed(raw)) {
101262
+ return;
101263
+ }
101264
+ return raw;
101265
+ }
101244
101266
  function getDefaultMainLoopModelSetting() {
101267
+ const anthropicDefault = resolveAnthropicDefaultModel();
101268
+ if (anthropicDefault !== undefined) {
101269
+ return anthropicDefault;
101270
+ }
101245
101271
  let setting;
101246
101272
  if (process.env.USER_TYPE === "ant") {
101247
101273
  setting = getAntModelOverrideConfig()?.defaultModel ?? getDefaultOpusModel() + "[1m]";
@@ -601661,7 +601687,7 @@ async function getAttachments(input2, toolUseContext, ideSelection, queuedComman
601661
601687
  const mainThreadAttachments = isMainThread ? [
601662
601688
  maybe("ide_selection", async () => getSelectedLinesFromIDE(ideSelection, toolUseContext)),
601663
601689
  maybe("ide_opened_file", async () => getOpenedFileFromIDE(ideSelection, toolUseContext)),
601664
- maybe("output_style", async () => Promise.resolve(getOutputStyleAttachment())),
601690
+ maybe("output_style", () => getOutputStyleAttachment()),
601665
601691
  maybe("diagnostics", async () => getDiagnosticAttachments(toolUseContext)),
601666
601692
  maybe("lsp_diagnostics", async () => getLSPDiagnosticAttachments(toolUseContext)),
601667
601693
  maybe("unified_tasks", async () => getUnifiedTaskAttachments(toolUseContext)),
@@ -602007,16 +602033,18 @@ function getCriticalSystemReminderAttachment(toolUseContext) {
602007
602033
  }
602008
602034
  return [{ type: "critical_system_reminder", content: reminder }];
602009
602035
  }
602010
- function getOutputStyleAttachment() {
602036
+ async function getOutputStyleAttachment() {
602011
602037
  const settings = getSettings_DEPRECATED();
602012
602038
  const outputStyle = settings?.outputStyle || "default";
602013
602039
  if (outputStyle === "default") {
602014
602040
  return [];
602015
602041
  }
602042
+ const styleConfig = await getOutputStyleConfig();
602016
602043
  return [
602017
602044
  {
602018
602045
  type: "output_style",
602019
- style: outputStyle
602046
+ style: outputStyle,
602047
+ turnReminder: styleConfig?.turnReminder
602020
602048
  }
602021
602049
  ];
602022
602050
  }
@@ -603378,6 +603406,7 @@ var init_attachments2 = __esm(() => {
603378
603406
  init_common2();
603379
603407
  init_pdf();
603380
603408
  init_apiLimits();
603409
+ init_outputStyles();
603381
603410
  init_agentSwarmsEnabled();
603382
603411
  init_findRelevantMemories();
603383
603412
  init_paths();
@@ -613203,7 +613232,16 @@ async function getOutputStyleConfig() {
613203
613232
  const outputStyle = settings?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME;
613204
613233
  return allStyles[outputStyle] ?? null;
613205
613234
  }
613206
- var EXPLANATORY_FEATURE_PROMPT, DEFAULT_OUTPUT_STYLE_NAME = "default", OUTPUT_STYLE_CONFIG, getAllOutputStyles;
613235
+ var EXPLANATORY_FEATURE_PROMPT, DEFAULT_OUTPUT_STYLE_NAME = "default", CONCISE_STYLE_RULES = `The user chose brevity over narration. You should:
613236
+
613237
+ 1. **Lead with the result** \u2014 Your first sentence answers "what happened" or "what's the answer." No preamble ("Let me...", "Now I'll...") and no closing recap of what you already said.
613238
+ 2. **Cut narration, keep substance** \u2014 Don't restate the request, the plan, or each step you took. Report outcomes, decisions, and anything the user must act on.
613239
+ 3. **Short by default** \u2014 Answer simple questions in 1-3 sentences of plain prose. Use headers, tables, and bullet lists only when they carry real structure, never as decoration.
613240
+ 4. **State things plainly** \u2014 Skip hedging boilerplate. Mention a caveat only when it changes what the user should do next.
613241
+ 5. **Give full detail on request** \u2014 When the user asks for an explanation or detail, answer completely. Conciseness never means withholding requested information.
613242
+ 6. **Never trade correctness for brevity** \u2014 Error reports, failing test output, security warnings, and confirmations for destructive actions keep their full content.
613243
+
613244
+ Where these rules conflict with more general communication or formatting guidance elsewhere in your instructions, these rules win.`, CONCISE_TURN_REMINDER = "Be concise: lead with the result, skip preamble and narration, keep only what the user needs.", OUTPUT_STYLE_CONFIG, getAllOutputStyles;
613207
613245
  var init_outputStyles = __esm(() => {
613208
613246
  init_figures();
613209
613247
  init_memoize();
@@ -613222,6 +613260,17 @@ In order to encourage learning, before and after writing code, always provide br
613222
613260
  These insights should be included in the conversation, not in the codebase. You should generally focus on interesting insights that are specific to the codebase or the code you just wrote, rather than general programming concepts.`;
613223
613261
  OUTPUT_STYLE_CONFIG = {
613224
613262
  [DEFAULT_OUTPUT_STYLE_NAME]: null,
613263
+ Concise: {
613264
+ name: "Concise",
613265
+ source: "built-in",
613266
+ description: "Claude responds tersely, leading with results and skipping preamble and narration",
613267
+ keepCodingInstructions: true,
613268
+ prompt: `You are an interactive CLI tool that helps users with software engineering tasks. Keep your responses short and direct while doing the work just as thoroughly.
613269
+
613270
+ # Concise Style Active
613271
+ ${CONCISE_STYLE_RULES}`,
613272
+ turnReminder: CONCISE_TURN_REMINDER
613273
+ },
613225
613274
  Explanatory: {
613226
613275
  name: "Explanatory",
613227
613276
  source: "built-in",
@@ -615650,7 +615699,7 @@ ${attachment.content}`,
615650
615699
  }
615651
615700
  return wrapMessagesInSystemReminder([
615652
615701
  createUserMessage({
615653
- content: `${outputStyle.name} output style is active. Remember to follow the specific guidelines for this style.`,
615702
+ content: `${outputStyle.name} output style is active. ${attachment.turnReminder ?? "Remember to follow the specific guidelines for this style."}`,
615654
615703
  isMeta: true
615655
615704
  })
615656
615705
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnwenf/occ",
3
- "version": "2.1.306",
3
+ "version": "2.1.307",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {