@cortexkit/magic-context 0.49.53 → 0.49.55

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 +230 -237
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16132,18 +16132,8 @@ function parseModelListOutput(output) {
16132
16132
  return [...models];
16133
16133
  }
16134
16134
  function getAvailableModels(piPath) {
16135
- const outputs = [
16136
- runPiCommand(piPath, ["--list-models"]),
16137
- runPiCommand(piPath, ["models", "list"])
16138
- ];
16139
- for (const output of outputs) {
16140
- if (!output)
16141
- continue;
16142
- const models = parseModelListOutput(output);
16143
- if (models.length > 0)
16144
- return models;
16145
- }
16146
- return [];
16135
+ const output = runPiCommand(piPath, ["--list-models"]);
16136
+ return output ? parseModelListOutput(output) : [];
16147
16137
  }
16148
16138
  var PI_PACKAGE_SOURCE = "npm:@cortexkit/pi-magic-context", PROVIDER_TOKEN, MODEL_TOKEN, SIZE_TOKEN, CAPABILITY_TOKEN;
16149
16139
  var init_pi_helpers = __esm(() => {
@@ -34613,12 +34603,235 @@ var init_ctx_reduce_nudge = __esm(() => {
34613
34603
  init_tail_hygiene_output_count();
34614
34604
  });
34615
34605
 
34606
+ // ../plugin/src/hooks/magic-context/final-wire-completeness.ts
34607
+ var init_final_wire_completeness = __esm(() => {
34608
+ init_logger();
34609
+ });
34610
+
34611
+ // ../plugin/src/features/magic-context/merged-reasoning-decisions.ts
34612
+ var decodedDecisions, MAX_DECODED_DECISION_BYTES;
34613
+ var init_merged_reasoning_decisions = __esm(() => {
34614
+ decodedDecisions = new Map;
34615
+ MAX_DECODED_DECISION_BYTES = 32 * 1024 * 1024;
34616
+ });
34617
+ // ../plugin/src/features/magic-context/session-decision-calibration.ts
34618
+ var init_session_decision_calibration = __esm(() => {
34619
+ init_decision_calibration();
34620
+ init_harness_provider_map();
34621
+ });
34622
+
34623
+ // ../plugin/src/features/magic-context/protection-window.ts
34624
+ var init_protection_window = __esm(async () => {
34625
+ init_session_decision_calibration();
34626
+ await init_storage_tags();
34627
+ });
34628
+
34629
+ // ../plugin/src/features/magic-context/storage-meta-shared.ts
34630
+ var BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, sessionMetaExistsStatements;
34631
+ var init_storage_meta_shared = __esm(async () => {
34632
+ init_harness_provider_map();
34633
+ await init_sqlite();
34634
+ BOOLEAN_META_KEYS = new Set(["isSubagent", "compartmentInProgress", "cacheAlertSent"]);
34635
+ NULL_BIND_META_KEYS = new Set([
34636
+ "cachedM0Bytes",
34637
+ "cachedM0MuralDataUrl",
34638
+ "cachedM0MuralHash",
34639
+ "cachedM1Bytes",
34640
+ "cachedM0ProjectMemoryEpoch",
34641
+ "cachedM0WorkspaceFingerprint",
34642
+ "cachedM0ProjectUserProfileVersion",
34643
+ "cachedM0MaxCompartmentSeq",
34644
+ "cachedM0MaxMemoryId",
34645
+ "cachedM0MaxMutationId",
34646
+ "cachedM0MaxMemoryMutationId",
34647
+ "cachedM0ProjectDocsHash",
34648
+ "cachedM0MaterializedAt",
34649
+ "cachedM0SessionFactsVersion",
34650
+ "cachedM0UpgradeState",
34651
+ "cachedM0ProjectIdentity",
34652
+ "lastObservedModelKey",
34653
+ "upgradeRemindedAt",
34654
+ "upgradeReminderLastSentAt",
34655
+ "piStableIdScheme"
34656
+ ]);
34657
+ sessionMetaExistsStatements = new WeakMap;
34658
+ });
34659
+
34660
+ // ../plugin/src/features/magic-context/storage-replay-document.ts
34661
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
34662
+ var MISSING_REPLAY_DOCUMENT_COLUMN, replaySnapshots, decisionTablePresent, trailingBlankReadCache, TRAILING_BLANK_CACHE_MAX_CHARS, DECISION_CONFLICT;
34663
+ var init_storage_replay_document = __esm(async () => {
34664
+ init_logger();
34665
+ await init_storage_meta_shared();
34666
+ MISSING_REPLAY_DOCUMENT_COLUMN = Symbol("missing replay document column");
34667
+ replaySnapshots = new AsyncLocalStorage2;
34668
+ decisionTablePresent = new WeakMap;
34669
+ trailingBlankReadCache = new WeakMap;
34670
+ TRAILING_BLANK_CACHE_MAX_CHARS = 4 * 1024 * 1024;
34671
+ DECISION_CONFLICT = Symbol("replay decision changed concurrently");
34672
+ });
34673
+
34674
+ // ../plugin/src/features/magic-context/storage-meta-persisted.ts
34675
+ var emergencyRecoveryArmedSessions, emergencyRecoveryArmedAtBySession, providerOverflowReconfirmedSessions, providerOverflowKnownLimitSessions, AUTO_SEARCH_NO_HINT_REASONS, DRAIN_WINDOW_MS, WRAPUP_IN_PROGRESS_TTL_MS, COMPACTION_MODE_RECORD_VALUES, EMERGENCY_DRAIN_MAX_LATCH_MS, pendingAutoSearchRetirements, bindingRecoveriesAwaitingClear, COMPACTION_MARKER_PENDING_BUDGET_MS, preSnapshotSessions, warnedProtectedTokenTierOverrides;
34676
+ var init_storage_meta_persisted = __esm(async () => {
34677
+ init_magic_context();
34678
+ init_harness_provider_map();
34679
+ init_logger();
34680
+ init_write_transaction_timing();
34681
+ init_merged_reasoning_decisions();
34682
+ await __promiseAll([
34683
+ init_protection_window(),
34684
+ init_storage_meta_shared(),
34685
+ init_storage_replay_document()
34686
+ ]);
34687
+ emergencyRecoveryArmedSessions = new Set;
34688
+ emergencyRecoveryArmedAtBySession = new Map;
34689
+ providerOverflowReconfirmedSessions = new Set;
34690
+ providerOverflowKnownLimitSessions = new Set;
34691
+ AUTO_SEARCH_NO_HINT_REASONS = new Set([
34692
+ "below-threshold",
34693
+ "timeout",
34694
+ "empty",
34695
+ "error",
34696
+ "stacked",
34697
+ "too-short"
34698
+ ]);
34699
+ DRAIN_WINDOW_MS = 10 * 60 * 1000;
34700
+ WRAPUP_IN_PROGRESS_TTL_MS = 5 * 60 * 1000;
34701
+ COMPACTION_MODE_RECORD_VALUES = new Set([
34702
+ "on",
34703
+ "off",
34704
+ "on_notice_pending",
34705
+ "off_notice_pending",
34706
+ "off_cleanup_pending"
34707
+ ]);
34708
+ EMERGENCY_DRAIN_MAX_LATCH_MS = 30 * 60 * 1000;
34709
+ pendingAutoSearchRetirements = new WeakMap;
34710
+ bindingRecoveriesAwaitingClear = new Map;
34711
+ COMPACTION_MARKER_PENDING_BUDGET_MS = 5 * 60000;
34712
+ preSnapshotSessions = new Map;
34713
+ warnedProtectedTokenTierOverrides = new WeakSet;
34714
+ });
34715
+
34716
+ // ../plugin/src/features/magic-context/storage-reasoning-removal.ts
34717
+ var init_storage_reasoning_removal = __esm(async () => {
34718
+ await init_storage_replay_document();
34719
+ });
34720
+
34721
+ // ../plugin/src/features/magic-context/overflow-detection.ts
34722
+ var PREFIX_BOUND_THINKING_MODELS, PREFIX_BOUND_THINKING_PATTERN;
34723
+ var init_overflow_detection = __esm(() => {
34724
+ PREFIX_BOUND_THINKING_MODELS = [
34725
+ ["fable", 5, 1],
34726
+ ["fable", 5, 2],
34727
+ ["mythos", 5, 1],
34728
+ ["mythos", 5, 2],
34729
+ ["opus", 5, 5],
34730
+ ["sonnet", 5, 5],
34731
+ ["haiku", 5, 5]
34732
+ ];
34733
+ PREFIX_BOUND_THINKING_PATTERN = new RegExp(`(?:^|[-_.:/])(?:${PREFIX_BOUND_THINKING_MODELS.map(([family, major, minor]) => `${family}[-_.]?${major}[-_.]${minor}`).join("|")})(?:$|[-_.:/@])`, "i");
34734
+ });
34735
+
34736
+ // ../plugin/src/hooks/magic-context/sentinel.ts
34737
+ var REMOVED_REASONING_MARK, NEUTRALIZED_ORIGINALS;
34738
+ var init_sentinel = __esm(() => {
34739
+ init_overflow_detection();
34740
+ init_harness_provider_map();
34741
+ REMOVED_REASONING_MARK = Symbol.for("magic-context.removed-reasoning");
34742
+ NEUTRALIZED_ORIGINALS = new WeakMap;
34743
+ });
34744
+
34745
+ // ../plugin/src/hooks/magic-context/active-anthropic-turn.ts
34746
+ var init_active_anthropic_turn = __esm(() => {
34747
+ init_sentinel();
34748
+ });
34749
+
34750
+ // ../plugin/src/shared/marker-only-text.ts
34751
+ var init_marker_only_text = () => {};
34752
+ // ../plugin/src/hooks/magic-context/served-shape-repair.ts
34753
+ var sources;
34754
+ var init_served_shape_repair = __esm(async () => {
34755
+ init_tag_content_primitives();
34756
+ await init_storage_replay_document();
34757
+ sources = new WeakMap;
34758
+ });
34759
+
34760
+ // ../plugin/src/hooks/magic-context/strip-content.ts
34761
+ var METADATA_PART_TYPES, CLEARED_REASONING_TYPES, REASONING_IGNORED_PART_TYPES, REASONING_PART_TYPES, emptyImageParts;
34762
+ var init_strip_content = __esm(async () => {
34763
+ init_merged_reasoning_decisions();
34764
+ init_marker_only_text();
34765
+ init_sentinel();
34766
+ init_tag_content_primitives();
34767
+ init_marker_only_text();
34768
+ await init_served_shape_repair();
34769
+ METADATA_PART_TYPES = new Set([
34770
+ "step-start",
34771
+ "step-finish",
34772
+ "snapshot",
34773
+ "patch",
34774
+ "agent",
34775
+ "retry",
34776
+ "subtask",
34777
+ "compaction"
34778
+ ]);
34779
+ CLEARED_REASONING_TYPES = new Set(["thinking", "reasoning"]);
34780
+ REASONING_IGNORED_PART_TYPES = new Set([
34781
+ "step-start",
34782
+ "step-finish",
34783
+ "snapshot",
34784
+ "patch",
34785
+ "agent",
34786
+ "retry",
34787
+ "subtask",
34788
+ "compaction"
34789
+ ]);
34790
+ REASONING_PART_TYPES = new Set(["reasoning", "thinking", "redacted_thinking"]);
34791
+ emptyImageParts = new WeakMap;
34792
+ });
34793
+
34794
+ // ../plugin/src/hooks/magic-context/reasoning-budget.ts
34795
+ var init_reasoning_budget = __esm(async () => {
34796
+ init_merged_reasoning_decisions();
34797
+ init_prompt_surface();
34798
+ init_active_anthropic_turn();
34799
+ init_read_session_formatting();
34800
+ init_sentinel();
34801
+ await __promiseAll([
34802
+ init_storage_meta_persisted(),
34803
+ init_storage_reasoning_removal(),
34804
+ init_storage_tags(),
34805
+ init_strip_content()
34806
+ ]);
34807
+ });
34808
+
34809
+ // ../plugin/src/hooks/magic-context/opaque-thinking.ts
34810
+ var init_opaque_thinking = __esm(async () => {
34811
+ await init_reasoning_budget();
34812
+ });
34813
+
34814
+ // ../plugin/src/hooks/magic-context/final-wire-token-estimate.ts
34815
+ var wireTextTokens;
34816
+ var init_final_wire_token_estimate = __esm(async () => {
34817
+ init_tool_definition_tokens();
34818
+ init_decision_calibration();
34819
+ init_final_wire_completeness();
34820
+ init_image_token_estimate();
34821
+ init_read_session_formatting();
34822
+ init_tokenizer_calibration();
34823
+ init_logger();
34824
+ await init_opaque_thinking();
34825
+ wireTextTokens = createTokenCountMemo(1e5, 128 * 1024 * 1024);
34826
+ });
34827
+
34616
34828
  // ../plugin/src/hooks/magic-context/emergency-drop.ts
34617
34829
  var T1_TOOLS, T2_TOOLS;
34618
- var init_emergency_drop = __esm(() => {
34830
+ var init_emergency_drop = __esm(async () => {
34619
34831
  init_reclaim_protection();
34620
34832
  init_ctx_reduce_nudge();
34621
34833
  init_read_session_formatting();
34834
+ await init_final_wire_token_estimate();
34622
34835
  T1_TOOLS = new Set(["read", "todowrite", "task", "aft_outline", "aft_zoom"]);
34623
34836
  T2_TOOLS = new Set(["edit", "write", "apply_patch", "grep", "glob", "aft_search"]);
34624
34837
  });
@@ -34667,12 +34880,14 @@ function pickNearestPriorOwner(candidates, currentMessageId, times) {
34667
34880
  }
34668
34881
  var insertTagStatements, updateTagStatusStatements, updateTagDropModeStatements, updateTagMessageIdStatements, getTagNumbersByMessageIdStatements, deleteTagsByMessageIdStatements, getMaxTagNumberBySessionStatements, getTagNumberByMessageIdStatements, getAssignableTagNumberByMessageIdStatements, hasPiFallbackMessageTagStatements, updateTagByteSizeStatements, updateTagInputByteSizeStatements, recentTagOwnerStatements, RECLAIM_HINT_EXCLUDED_TOOLS, getActiveToolTagsForAgeReclaimStatements, scopedActiveTokenTotalStatements, updateTagTokenCountStatements, updateTagInputTokenCountStatements, tagOwnerSummaries, TAG_OWNER_COLUMNS = "id, type, message_id, tool_owner_message_id, tag_number, reasoning_token_count", TAG_OWNER_APPENDED_WITH_SHAPE_SQL, droppedTagStatements, inertWhitespaceStatements, inertWhitespaceByNumberStatements, foldStatements, getOwnerScopedToolTagNumbersStatements, getMinMessageTagNumberForRawIdStatements, getActiveTagsBySessionStatements, getNullOwnerToolTagsBySessionStatements, getDroppedTagsBySessionStatements, getMaxDroppedTagNumberStatements, newestToolTagNumberStatements, droppedNumberStatements, tagByIdStatements, getToolTagNumberByOwnerStatements, getNullOwnerToolTagStatements, adoptNullOwnerToolTagStatements, getToolOwnerByTagIdStatements, deleteToolTagsByOwnerStatements;
34669
34882
  var init_storage_tags = __esm(async () => {
34670
- init_emergency_drop();
34671
34883
  init_tag_owner_id();
34672
34884
  init_migration_v95_perf_indexes();
34673
34885
  init_storage_ops();
34674
34886
  init_storage_tag_identity_revision();
34675
- await init_sqlite();
34887
+ await __promiseAll([
34888
+ init_emergency_drop(),
34889
+ init_sqlite()
34890
+ ]);
34676
34891
  insertTagStatements = new WeakMap;
34677
34892
  updateTagStatusStatements = new WeakMap;
34678
34893
  updateTagDropModeStatements = new WeakMap;
@@ -35217,228 +35432,6 @@ var init_edit_marker = __esm(() => {
35217
35432
  DIFF_KEYS = new Set(["oldString", "newString", "content", "old_string", "new_string"]);
35218
35433
  });
35219
35434
 
35220
- // ../plugin/src/hooks/magic-context/final-wire-completeness.ts
35221
- var init_final_wire_completeness = __esm(() => {
35222
- init_logger();
35223
- });
35224
-
35225
- // ../plugin/src/features/magic-context/merged-reasoning-decisions.ts
35226
- var decodedDecisions, MAX_DECODED_DECISION_BYTES;
35227
- var init_merged_reasoning_decisions = __esm(() => {
35228
- decodedDecisions = new Map;
35229
- MAX_DECODED_DECISION_BYTES = 32 * 1024 * 1024;
35230
- });
35231
- // ../plugin/src/features/magic-context/session-decision-calibration.ts
35232
- var init_session_decision_calibration = __esm(() => {
35233
- init_decision_calibration();
35234
- init_harness_provider_map();
35235
- });
35236
-
35237
- // ../plugin/src/features/magic-context/protection-window.ts
35238
- var init_protection_window = __esm(async () => {
35239
- init_session_decision_calibration();
35240
- await init_storage_tags();
35241
- });
35242
-
35243
- // ../plugin/src/features/magic-context/storage-meta-shared.ts
35244
- var BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, sessionMetaExistsStatements;
35245
- var init_storage_meta_shared = __esm(async () => {
35246
- init_harness_provider_map();
35247
- await init_sqlite();
35248
- BOOLEAN_META_KEYS = new Set(["isSubagent", "compartmentInProgress", "cacheAlertSent"]);
35249
- NULL_BIND_META_KEYS = new Set([
35250
- "cachedM0Bytes",
35251
- "cachedM0MuralDataUrl",
35252
- "cachedM0MuralHash",
35253
- "cachedM1Bytes",
35254
- "cachedM0ProjectMemoryEpoch",
35255
- "cachedM0WorkspaceFingerprint",
35256
- "cachedM0ProjectUserProfileVersion",
35257
- "cachedM0MaxCompartmentSeq",
35258
- "cachedM0MaxMemoryId",
35259
- "cachedM0MaxMutationId",
35260
- "cachedM0MaxMemoryMutationId",
35261
- "cachedM0ProjectDocsHash",
35262
- "cachedM0MaterializedAt",
35263
- "cachedM0SessionFactsVersion",
35264
- "cachedM0UpgradeState",
35265
- "cachedM0ProjectIdentity",
35266
- "lastObservedModelKey",
35267
- "upgradeRemindedAt",
35268
- "upgradeReminderLastSentAt",
35269
- "piStableIdScheme"
35270
- ]);
35271
- sessionMetaExistsStatements = new WeakMap;
35272
- });
35273
-
35274
- // ../plugin/src/features/magic-context/storage-replay-document.ts
35275
- import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
35276
- var MISSING_REPLAY_DOCUMENT_COLUMN, replaySnapshots, decisionTablePresent, trailingBlankReadCache, TRAILING_BLANK_CACHE_MAX_CHARS, DECISION_CONFLICT;
35277
- var init_storage_replay_document = __esm(async () => {
35278
- init_logger();
35279
- await init_storage_meta_shared();
35280
- MISSING_REPLAY_DOCUMENT_COLUMN = Symbol("missing replay document column");
35281
- replaySnapshots = new AsyncLocalStorage2;
35282
- decisionTablePresent = new WeakMap;
35283
- trailingBlankReadCache = new WeakMap;
35284
- TRAILING_BLANK_CACHE_MAX_CHARS = 4 * 1024 * 1024;
35285
- DECISION_CONFLICT = Symbol("replay decision changed concurrently");
35286
- });
35287
-
35288
- // ../plugin/src/features/magic-context/storage-meta-persisted.ts
35289
- var emergencyRecoveryArmedSessions, emergencyRecoveryArmedAtBySession, providerOverflowReconfirmedSessions, providerOverflowKnownLimitSessions, AUTO_SEARCH_NO_HINT_REASONS, DRAIN_WINDOW_MS, WRAPUP_IN_PROGRESS_TTL_MS, COMPACTION_MODE_RECORD_VALUES, EMERGENCY_DRAIN_MAX_LATCH_MS, pendingAutoSearchRetirements, bindingRecoveriesAwaitingClear, COMPACTION_MARKER_PENDING_BUDGET_MS, preSnapshotSessions, warnedProtectedTokenTierOverrides;
35290
- var init_storage_meta_persisted = __esm(async () => {
35291
- init_magic_context();
35292
- init_harness_provider_map();
35293
- init_logger();
35294
- init_write_transaction_timing();
35295
- init_merged_reasoning_decisions();
35296
- await __promiseAll([
35297
- init_protection_window(),
35298
- init_storage_meta_shared(),
35299
- init_storage_replay_document()
35300
- ]);
35301
- emergencyRecoveryArmedSessions = new Set;
35302
- emergencyRecoveryArmedAtBySession = new Map;
35303
- providerOverflowReconfirmedSessions = new Set;
35304
- providerOverflowKnownLimitSessions = new Set;
35305
- AUTO_SEARCH_NO_HINT_REASONS = new Set([
35306
- "below-threshold",
35307
- "timeout",
35308
- "empty",
35309
- "error",
35310
- "stacked",
35311
- "too-short"
35312
- ]);
35313
- DRAIN_WINDOW_MS = 10 * 60 * 1000;
35314
- WRAPUP_IN_PROGRESS_TTL_MS = 5 * 60 * 1000;
35315
- COMPACTION_MODE_RECORD_VALUES = new Set([
35316
- "on",
35317
- "off",
35318
- "on_notice_pending",
35319
- "off_notice_pending",
35320
- "off_cleanup_pending"
35321
- ]);
35322
- EMERGENCY_DRAIN_MAX_LATCH_MS = 30 * 60 * 1000;
35323
- pendingAutoSearchRetirements = new WeakMap;
35324
- bindingRecoveriesAwaitingClear = new Map;
35325
- COMPACTION_MARKER_PENDING_BUDGET_MS = 5 * 60000;
35326
- preSnapshotSessions = new Map;
35327
- warnedProtectedTokenTierOverrides = new WeakSet;
35328
- });
35329
-
35330
- // ../plugin/src/features/magic-context/storage-reasoning-removal.ts
35331
- var init_storage_reasoning_removal = __esm(async () => {
35332
- await init_storage_replay_document();
35333
- });
35334
-
35335
- // ../plugin/src/features/magic-context/overflow-detection.ts
35336
- var PREFIX_BOUND_THINKING_MODELS, PREFIX_BOUND_THINKING_PATTERN;
35337
- var init_overflow_detection = __esm(() => {
35338
- PREFIX_BOUND_THINKING_MODELS = [
35339
- ["fable", 5, 1],
35340
- ["fable", 5, 2],
35341
- ["mythos", 5, 1],
35342
- ["mythos", 5, 2],
35343
- ["opus", 5, 5],
35344
- ["sonnet", 5, 5],
35345
- ["haiku", 5, 5]
35346
- ];
35347
- PREFIX_BOUND_THINKING_PATTERN = new RegExp(`(?:^|[-_.:/])(?:${PREFIX_BOUND_THINKING_MODELS.map(([family, major, minor]) => `${family}[-_.]?${major}[-_.]${minor}`).join("|")})(?:$|[-_.:/@])`, "i");
35348
- });
35349
-
35350
- // ../plugin/src/hooks/magic-context/sentinel.ts
35351
- var REMOVED_REASONING_MARK, NEUTRALIZED_ORIGINALS;
35352
- var init_sentinel = __esm(() => {
35353
- init_overflow_detection();
35354
- init_harness_provider_map();
35355
- REMOVED_REASONING_MARK = Symbol.for("magic-context.removed-reasoning");
35356
- NEUTRALIZED_ORIGINALS = new WeakMap;
35357
- });
35358
-
35359
- // ../plugin/src/hooks/magic-context/active-anthropic-turn.ts
35360
- var init_active_anthropic_turn = __esm(() => {
35361
- init_sentinel();
35362
- });
35363
-
35364
- // ../plugin/src/shared/marker-only-text.ts
35365
- var init_marker_only_text = () => {};
35366
- // ../plugin/src/hooks/magic-context/served-shape-repair.ts
35367
- var sources;
35368
- var init_served_shape_repair = __esm(async () => {
35369
- init_tag_content_primitives();
35370
- await init_storage_replay_document();
35371
- sources = new WeakMap;
35372
- });
35373
-
35374
- // ../plugin/src/hooks/magic-context/strip-content.ts
35375
- var METADATA_PART_TYPES, CLEARED_REASONING_TYPES, REASONING_IGNORED_PART_TYPES, REASONING_PART_TYPES, emptyImageParts;
35376
- var init_strip_content = __esm(async () => {
35377
- init_merged_reasoning_decisions();
35378
- init_marker_only_text();
35379
- init_sentinel();
35380
- init_tag_content_primitives();
35381
- init_marker_only_text();
35382
- await init_served_shape_repair();
35383
- METADATA_PART_TYPES = new Set([
35384
- "step-start",
35385
- "step-finish",
35386
- "snapshot",
35387
- "patch",
35388
- "agent",
35389
- "retry",
35390
- "subtask",
35391
- "compaction"
35392
- ]);
35393
- CLEARED_REASONING_TYPES = new Set(["thinking", "reasoning"]);
35394
- REASONING_IGNORED_PART_TYPES = new Set([
35395
- "step-start",
35396
- "step-finish",
35397
- "snapshot",
35398
- "patch",
35399
- "agent",
35400
- "retry",
35401
- "subtask",
35402
- "compaction"
35403
- ]);
35404
- REASONING_PART_TYPES = new Set(["reasoning", "thinking", "redacted_thinking"]);
35405
- emptyImageParts = new WeakMap;
35406
- });
35407
-
35408
- // ../plugin/src/hooks/magic-context/reasoning-budget.ts
35409
- var init_reasoning_budget = __esm(async () => {
35410
- init_merged_reasoning_decisions();
35411
- init_prompt_surface();
35412
- init_active_anthropic_turn();
35413
- init_read_session_formatting();
35414
- init_sentinel();
35415
- await __promiseAll([
35416
- init_storage_meta_persisted(),
35417
- init_storage_reasoning_removal(),
35418
- init_storage_tags(),
35419
- init_strip_content()
35420
- ]);
35421
- });
35422
-
35423
- // ../plugin/src/hooks/magic-context/opaque-thinking.ts
35424
- var init_opaque_thinking = __esm(async () => {
35425
- await init_reasoning_budget();
35426
- });
35427
-
35428
- // ../plugin/src/hooks/magic-context/final-wire-token-estimate.ts
35429
- var wireTextTokens;
35430
- var init_final_wire_token_estimate = __esm(async () => {
35431
- init_tool_definition_tokens();
35432
- init_decision_calibration();
35433
- init_final_wire_completeness();
35434
- init_image_token_estimate();
35435
- init_read_session_formatting();
35436
- init_tokenizer_calibration();
35437
- init_logger();
35438
- await init_opaque_thinking();
35439
- wireTextTokens = createTokenCountMemo(1e5, 128 * 1024 * 1024);
35440
- });
35441
-
35442
35435
  // ../plugin/src/hooks/magic-context/tool-input-size.ts
35443
35436
  var encoder2;
35444
35437
  var init_tool_input_size = __esm(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/magic-context",
3
- "version": "0.49.53",
3
+ "version": "0.49.55",
4
4
  "description": "Unified CLI for Magic Context — setup, doctor, and migration across OpenCode, Pi, and OMP",
5
5
  "keywords": [
6
6
  "opencode",