@inerrata-corporation/errata 2.0.2-dev.1255 → 2.0.2-dev.1263

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/errata.mjs +18 -4
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -24079,7 +24079,7 @@ function provenanceHeaders(provenance) {
24079
24079
  ...provenance.agentModel ? { "x-inerrata-agent-model": provenance.agentModel } : {}
24080
24080
  };
24081
24081
  }
24082
- var asWireCount, INGEST_NODE_CHUNK, CloudClient, CloudError;
24082
+ var asWireCount, INGEST_NODE_CHUNK, E6B_PUBLIC_CONTEXT_SENTINEL, CloudClient, CloudError;
24083
24083
  var init_client = __esm({
24084
24084
  "../../packages/cloud-client/src/client.ts"() {
24085
24085
  "use strict";
@@ -24087,6 +24087,7 @@ var init_client = __esm({
24087
24087
  init_src();
24088
24088
  asWireCount = (n) => typeof n === "number" && Number.isFinite(n) && n >= 0 ? Math.floor(n) : null;
24089
24089
  INGEST_NODE_CHUNK = 8;
24090
+ E6B_PUBLIC_CONTEXT_SENTINEL = "00000000-0000-4e6b-8000-000000000e6b";
24090
24091
  CloudClient = class {
24091
24092
  baseUrl;
24092
24093
  apiKey;
@@ -24478,7 +24479,19 @@ var init_client = __esm({
24478
24479
  if (q.seed?.length) qs.set("seed", q.seed.join(","));
24479
24480
  if (q.q) qs.set("q", q.q);
24480
24481
  if (q.channel) qs.set("channel", q.channel);
24481
- const res = await this.json("GET", `/v2/search?${qs.toString()}`);
24482
+ const publicCtx = process.env["ERRATA_PRIMING_PUBLIC_CONTEXT"];
24483
+ const usePublicCtx = Boolean(publicCtx && publicCtx !== "0" && q.channel === "priming");
24484
+ const UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
24485
+ const res = await this.json(
24486
+ "GET",
24487
+ `/v2/search?${qs.toString()}`,
24488
+ void 0,
24489
+ usePublicCtx ? {
24490
+ extraHeaders: {
24491
+ "X-Inerrata-Project-Id": UUID_RE2.test(publicCtx) ? publicCtx : E6B_PUBLIC_CONTEXT_SENTINEL
24492
+ }
24493
+ } : void 0
24494
+ );
24482
24495
  const { nodes, edges } = this.toCastalia(res);
24483
24496
  return {
24484
24497
  nodes,
@@ -24642,7 +24655,8 @@ var init_client = __esm({
24642
24655
  const headers = {
24643
24656
  "content-type": "application/json",
24644
24657
  accept: "application/json",
24645
- ...provenanceHeaders(this.provenance)
24658
+ ...provenanceHeaders(this.provenance),
24659
+ ...opts?.extraHeaders ?? {}
24646
24660
  };
24647
24661
  if (!opts?.skipAuth) {
24648
24662
  const token = opts?.bearerToken ?? await this.authToken();
@@ -57309,7 +57323,7 @@ function createWatchBreaker(deps) {
57309
57323
  }
57310
57324
 
57311
57325
  // src/engine.ts
57312
- var DAEMON_VERSION = true ? "2.0.2-dev.1255" : "2.0.0-alpha.0";
57326
+ var DAEMON_VERSION = true ? "2.0.2-dev.1263" : "2.0.0-alpha.0";
57313
57327
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
57314
57328
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
57315
57329
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.1255",
3
+ "version": "2.0.2-dev.1263",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {