@cortexkit/magic-context 0.49.43 → 0.49.45

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/index.js +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10577,7 +10577,7 @@ var init_magic_context = __esm(() => {
10577
10577
  enabled: boolean2().default(true).describe("Enable smart-note authoring and condition evaluation. Needs a runnable dreamer, which evaluates the conditions: with dreamer.disable true (or no dreamer block) ctx_note offers no surface_condition whatever this says. User-level only: tool definitions are process-wide. Changes require a host restart and rebuild each session's cached prompt once. Pending notes remain stored and unchecked; already-ready notes still surface."),
10578
10578
  retina_handoff: boolean2().default(false).describe("When true, dreamer skips smart notes whose surface conditions compiled to retina provider configs at authoring time. Default false keeps both paths active until the retina consumer is deployed.")
10579
10579
  }).default({ enabled: true, retina_handoff: false }).describe("Smart-note ownership transition controls."),
10580
- cache_ttl: union([string2(), object({ default: string2() }).catchall(string2())]).default("5m").describe(`How long Magic Context assumes the provider's cached prefix stays valid. This is MC's own deferral gate — it does not change the provider's actual cache lifetime. String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "provider/model": "1h", "provider/*": "never" }); keys resolve most-specific first (exact provider/model, bare model ID, shorter dash-prefixes, then the provider/* wildcard, then default). User and project settings, including an explicit "5m" or object default, apply on the next pass. Only built-in defaults are frozen per session, including across restarts: when unset, GPT-5.6 and later (including gpt-6*, through any provider prefix) use 30m, other models use 5m. /ctx-status shows the effective TTL and whether it comes from your config or a frozen built-in default. Editing the TTL does not itself rewrite prompt bytes; a lowered TTL rebuilds only after normal idle expiry. OpenAI documents at least 30 minutes since the latest write or reuse: https://developers.openai.com/api/docs/guides/prompt-caching (Cache lifetime and Summary of model differences). Set to "never" to mean MC never assumes expiry (for lanes kept warm externally by a cache-keep tool) — disables the idle-TTL heuristic so MC never initiates a rebuild based on elapsed time. Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).`),
10580
+ cache_ttl: union([string2(), object({ default: string2() }).catchall(string2())]).default("5m").describe(`How long Magic Context assumes the provider's cached prefix stays valid. It does not change the provider's actual cache lifetime, and it triggers no rebuild or fold: after an expiry the next request replays the same bytes. Magic Context uses it for diagnostics and, on OpenCode 2, to time an idle checkpoint in the host's session store (the experimental Rust transform still rebuilds on it). String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "provider/model": "1h", "provider/*": "never" }); keys resolve most-specific first (exact provider/model, bare model ID, shorter dash-prefixes, then the provider/* wildcard, then default). User and project settings, including an explicit "5m" or object default, apply on the next pass. Only built-in defaults are frozen per session, including across restarts: when unset, GPT-5.6 and later (including gpt-6*, through any provider prefix) use 30m, other models use 5m. /ctx-status shows the effective TTL and whether it comes from your config or a frozen built-in default. Editing the TTL never rewrites prompt bytes. OpenAI documents at least 30 minutes since the latest write or reuse: https://developers.openai.com/api/docs/guides/prompt-caching (Cache lifetime and Summary of model differences). Set to "never" to mean MC never assumes expiry (for a provider cache that an external cache-keep tool keeps warm). Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).`),
10581
10581
  prompt_surface: PromptSurfaceConfigSchema.default({ default: "full" }).describe("Prompt-surface presets: default is full; models use bare model IDs, provider/model, or provider/* routing keys. Guidance and tool-description overrides are user-level only. OpenCode 1.x, Pi, and OMP register tool descriptions once per process (they follow the default preset). OpenCode 2 rewrites the five ctx_* descriptions per request from the draft model."),
10582
10582
  output_reserve: union([
10583
10583
  number2().min(0),
@@ -28328,7 +28328,8 @@ END`;
28328
28328
  "query",
28329
28329
  "symbol",
28330
28330
  "module",
28331
- "action"
28331
+ "action",
28332
+ "command"
28332
28333
  ];
28333
28334
  RAW_SUMMARY_PART_DATA_SQL = `CASE
28334
28335
  WHEN json_extract(data, '$.type') = 'text'
@@ -33450,6 +33451,9 @@ function extractKeyArg(_toolName, input) {
33450
33451
  return input.module;
33451
33452
  if (typeof input.action === "string")
33452
33453
  return input.action;
33454
+ if (typeof input.command === "string") {
33455
+ return truncateArg(normalizeText(input.command), COMMAND_ARG_MAX_CHARS);
33456
+ }
33453
33457
  return null;
33454
33458
  }
33455
33459
  function truncateArg(value, maxLen = 60) {
@@ -33587,7 +33591,7 @@ function mergeCommitHashes(existing, next) {
33587
33591
  }
33588
33592
  return merged;
33589
33593
  }
33590
- var MAX_COMMITS_PER_BLOCK = 5, tokenizer, tokenizerLoadAttempted = false, tokenizerWarningSent = false, tokenizerEncodingPath, tokenizerSerializedTableBytes, promptTokenCounts, PROMPT_TOKEN_COUNT_BYTES;
33594
+ var MAX_COMMITS_PER_BLOCK = 5, COMMAND_ARG_MAX_CHARS = 200, tokenizer, tokenizerLoadAttempted = false, tokenizerWarningSent = false, tokenizerEncodingPath, tokenizerSerializedTableBytes, promptTokenCounts, PROMPT_TOKEN_COUNT_BYTES;
33591
33595
  var init_read_session_formatting = __esm(() => {
33592
33596
  init_commit_detection();
33593
33597
  init_logger();
@@ -35382,6 +35386,9 @@ var PREFIX_BOUND_THINKING_MODELS, PREFIX_BOUND_THINKING_PATTERN;
35382
35386
  var init_overflow_detection = __esm(() => {
35383
35387
  PREFIX_BOUND_THINKING_MODELS = [
35384
35388
  ["fable", 5, 1],
35389
+ ["fable", 5, 2],
35390
+ ["mythos", 5, 1],
35391
+ ["mythos", 5, 2],
35385
35392
  ["opus", 5, 5],
35386
35393
  ["sonnet", 5, 5],
35387
35394
  ["haiku", 5, 5]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/magic-context",
3
- "version": "0.49.43",
3
+ "version": "0.49.45",
4
4
  "description": "Unified CLI for Magic Context — setup, doctor, and migration across OpenCode, Pi, and OMP",
5
5
  "keywords": [
6
6
  "opencode",