@cortexkit/pi-magic-context 0.49.37 → 0.49.38

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.
@@ -31,7 +31,7 @@ serveWorkerJobs(async (initial, port) => {
31
31
  import("./embedding-cache-7rp4gqzr.js"),
32
32
  import("./storage-memory-0ndn65fm.js"),
33
33
  import("./project-embedding-registry-16pj4vyf.js"),
34
- import("./search-3p18trsb.js"),
34
+ import("./search-t0pz6p13.js"),
35
35
  import("./compartment-chunk-embedding-jpcme6tz.js"),
36
36
  import("./embedding-activity-ew6dshfd.js"),
37
37
  import("./harness-9872e0ym.js"),
@@ -2064,19 +2064,15 @@ async function remoteScores(config, query, documents, signal) {
2064
2064
  "Content-Type": "application/json",
2065
2065
  ...config.api_key ? { Authorization: `Bearer ${config.api_key}` } : {}
2066
2066
  },
2067
- body: JSON.stringify(tei ? { query, texts: documents } : {
2068
- model: config.model,
2069
- query,
2070
- documents,
2071
- top_n: documents.length
2072
- }),
2067
+ body: JSON.stringify(tei ? { query, texts: documents } : { model: config.model, query, documents }),
2073
2068
  signal: controller.signal,
2074
2069
  redirect: "error"
2075
2070
  });
2076
2071
  if (!response.ok)
2077
2072
  throw new RerankFailure(`http_${response.status}`);
2078
2073
  const body = await response.json();
2079
- const rows = tei ? body : body?.results;
2074
+ const reply = body;
2075
+ const rows = tei ? body : reply?.results ?? reply?.data;
2080
2076
  if (!Array.isArray(rows) || rows.length !== documents.length)
2081
2077
  throw new RerankFailure("invalid_reply");
2082
2078
  const scores = new Array(documents.length);
@@ -133,7 +133,7 @@ import {
133
133
  resolveMemoriesByIdsForSearch2,
134
134
  unifiedSearch2,
135
135
  formatSearchResults2
136
- } from "./index-f6y7mdq9.js";
136
+ } from "./index-gqk9c626.js";
137
137
  import {
138
138
  TODO_STATUSES,
139
139
  TODO_PRIORITIES,
package/dist/index.js CHANGED
@@ -150,7 +150,7 @@ import {
150
150
  registerTodoStateLifecycle,
151
151
  syncCtxMemoryToolEnabled,
152
152
  registerMagicContextTools
153
- } from "./index-dgqjq8sg.js";
153
+ } from "./index-jnk24gvd.js";
154
154
  import"./index-4knyh1kt.js";
155
155
  import {
156
156
  canonicalModelIdentity,
@@ -797,7 +797,7 @@ import {
797
797
  scheduleClearAndReindex,
798
798
  clearSessionTracking,
799
799
  createAutoSearchDiagnostics
800
- } from "./index-f6y7mdq9.js";
800
+ } from "./index-gqk9c626.js";
801
801
  import"./index-y90fxz4t.js";
802
802
  import {
803
803
  DREAMER_PRIMER_INVESTIGATOR_ALLOWED_TOOLS,
@@ -3584,7 +3584,7 @@ function startHostStallProfilerSwitch() {
3584
3584
  // package.json
3585
3585
  var package_default = {
3586
3586
  name: "@cortexkit/pi-magic-context",
3587
- version: "0.49.37",
3587
+ version: "0.49.38",
3588
3588
  type: "module",
3589
3589
  description: "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
3590
3590
  main: "dist/index.js",
@@ -21912,7 +21912,14 @@ function resolveProviderModelAttempt(model, targetHarness) {
21912
21912
  };
21913
21913
  }
21914
21914
  function isProviderCredentialFailure(result, attempt) {
21915
- return attempt.translated && !result.ok && result.reason === "non_zero_exit" && getResultStderr(result).includes(`No API key found for ${attempt.attemptedProvider}`);
21915
+ if (!attempt.translated || result.ok)
21916
+ return false;
21917
+ const missingKey = `No API key found for ${attempt.attemptedProvider}`;
21918
+ if (result.reason === "non_zero_exit")
21919
+ return getResultStderr(result).includes(missingKey);
21920
+ if (result.reason === "model_failed")
21921
+ return (result.error ?? "").includes(missingKey);
21922
+ return false;
21916
21923
  }
21917
21924
  var PROMPT_ARGV_MAX_BYTES = 96 * 1024;
21918
21925
  function buildArgs(options, opts) {
@@ -5,7 +5,7 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./index-f6y7mdq9.js";
8
+ } from "./index-gqk9c626.js";
9
9
  import"./index-w26zvs1q.js";
10
10
  import"./index-kj49vs41.js";
11
11
  import"./index-1cvyaw9a.js";
@@ -34,7 +34,7 @@ import {
34
34
  ensureProjectRegisteredFromPiDirectory,
35
35
  resolvePiHarnessKind,
36
36
  registerMagicContextTools
37
- } from "./index-dgqjq8sg.js";
37
+ } from "./index-jnk24gvd.js";
38
38
  import"./index-ccanzg8p.js";
39
39
  import"./index-rzfr7wdv.js";
40
40
  import"./index-f9qet7y8.js";
@@ -55,7 +55,7 @@ import"./index-1cvyaw9a.js";
55
55
  import"./index-gxqmh9hq.js";
56
56
  import"./index-ry84c8dr.js";
57
57
  import"./index-29nw7n1r.js";
58
- import"./index-f6y7mdq9.js";
58
+ import"./index-gqk9c626.js";
59
59
  import"./index-y90fxz4t.js";
60
60
  import"./index-0wtm7g7f.js";
61
61
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.49.37",
3
+ "version": "0.49.38",
4
4
  "type": "module",
5
5
  "description": "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",