@cortexkit/magic-context 0.49.33 → 0.49.35

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 +31 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34695,6 +34695,16 @@ var init_ask_answer_notice = __esm(() => {
34695
34695
  reminderEnvelopePattern = /<system-reminder>([\s\S]*?)<\/system-reminder>/gi;
34696
34696
  });
34697
34697
 
34698
+ // ../plugin/src/hooks/magic-context/compartment-commit-hashes.ts
34699
+ function rawCommitHashes(value) {
34700
+ if (typeof value === "string") {
34701
+ return Array.from(value.matchAll(/\b[0-9a-f]{7,40}\b/gi), (match) => match[0].toLowerCase());
34702
+ }
34703
+ if (value === null || typeof value !== "object")
34704
+ return [];
34705
+ return Object.values(value).flatMap(rawCommitHashes);
34706
+ }
34707
+
34698
34708
  // ../plugin/src/hooks/magic-context/host-served-rows.ts
34699
34709
  function markHostUnservedRow(target) {
34700
34710
  Object.defineProperty(target, HOST_UNSERVED_ROW, {
@@ -35023,6 +35033,11 @@ var init_edit_marker = __esm(() => {
35023
35033
  DIFF_KEYS = new Set(["oldString", "newString", "content", "old_string", "new_string"]);
35024
35034
  });
35025
35035
 
35036
+ // ../plugin/src/hooks/magic-context/final-wire-completeness.ts
35037
+ var init_final_wire_completeness = __esm(() => {
35038
+ init_logger();
35039
+ });
35040
+
35026
35041
  // ../plugin/src/features/magic-context/merged-reasoning-decisions.ts
35027
35042
  var decodedDecisions, MAX_DECODED_DECISION_BYTES;
35028
35043
  var init_merged_reasoning_decisions = __esm(() => {
@@ -35227,6 +35242,7 @@ var wireTextTokens;
35227
35242
  var init_final_wire_token_estimate = __esm(async () => {
35228
35243
  init_tool_definition_tokens();
35229
35244
  init_decision_calibration();
35245
+ init_final_wire_completeness();
35230
35246
  init_image_token_estimate();
35231
35247
  init_read_session_formatting();
35232
35248
  init_tokenizer_calibration();
@@ -35303,6 +35319,8 @@ __export(exports_read_session_chunk, {
35303
35319
  prepareRawSessionOrdinals: () => prepareRawSessionOrdinals,
35304
35320
  primeInMemoryTailRawMessageCache: () => primeInMemoryTailRawMessageCache,
35305
35321
  primeTailRawMessageCache: () => primeTailRawMessageCache,
35322
+ rawMessageOffThreadRangeReader: () => rawMessageOffThreadRangeReader,
35323
+ rawMessageWorkerSource: () => rawMessageWorkerSource,
35306
35324
  readRawSessionBoundaryEndpoints: () => readRawSessionBoundaryEndpoints,
35307
35325
  readRawSessionMessageById: () => readRawSessionMessageById,
35308
35326
  readRawSessionMessageIdOrdinals: () => readRawSessionMessageIdOrdinals,
@@ -35348,6 +35366,13 @@ function resolveHostServedBoundaryId(sessionId, messageId) {
35348
35366
  function hasRawMessageProvider(sessionId) {
35349
35367
  return sessionProviders.has(sessionId);
35350
35368
  }
35369
+ function rawMessageWorkerSource(sessionId) {
35370
+ return sessionProviders.get(sessionId)?.provider.workerSource;
35371
+ }
35372
+ function rawMessageOffThreadRangeReader(sessionId) {
35373
+ const provider = sessionProviders.get(sessionId)?.provider;
35374
+ return provider?.readMessageIdOrdinalsForRangeOffThread?.bind(provider);
35375
+ }
35351
35376
  function setRawMessageProvider(sessionId, provider) {
35352
35377
  const current = sessionProviders.get(sessionId);
35353
35378
  const registration = current?.provider === provider ? current : { provider, scopes: 0 };
@@ -36125,7 +36150,12 @@ function readSessionChunk(sessionId, tokenBudget, offset = 1, eligibleEndOrdinal
36125
36150
  }
36126
36151
  if (msg.ordinal < startOrdinal)
36127
36152
  continue;
36128
- const meta = { ordinal: msg.ordinal, messageId: msg.id };
36153
+ const commitHashes = rawCommitHashes(msg.parts);
36154
+ const meta = {
36155
+ ordinal: msg.ordinal,
36156
+ messageId: msg.id
36157
+ };
36158
+ Object.defineProperty(meta, "commitHashes", { value: commitHashes });
36129
36159
  if (isHostUnservedRow(msg))
36130
36160
  markHostUnservedRow(meta);
36131
36161
  if (msg.role === "system") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/magic-context",
3
- "version": "0.49.33",
3
+ "version": "0.49.35",
4
4
  "description": "Unified CLI for Magic Context — setup, doctor, and migration across OpenCode, Pi, and OMP",
5
5
  "keywords": [
6
6
  "opencode",