kibi-agent-core 0.11.1 → 0.11.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # kibi-agent-core
2
2
 
3
+ ## 0.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f718e79: Remove unreachable branches found while covering the multi-language proof code with unit tests. Behavior is unchanged:
8
+ - The type-position check of the TypeScript references reader stops at the enclosing statement without a trailing fallback.
9
+ - Source classification reads the two ambiguous extensions (`.pl`, `.h`) without a third, impossible case.
10
+ - A symbol refresh failure no longer has a message for a coarse symbol, which is anchored to its whole file and never reported.
11
+ - The tree-sitter reference reader's first-error search and its `System.Environment` check drop branches no input can reach.
12
+ - `kibi-agent-core` exports `moduleFileFromUrl`, which telemetry uses to find its own module file when a bundle drops `import.meta.url`; the Claude Code, Codex and Cursor hook bundles are rebuilt with it.
13
+
3
14
  ## 0.11.1
4
15
 
5
16
  ### Patch Changes
@@ -97,6 +97,11 @@ export declare const SESSION_ENV_KEYS: readonly ["KIBI_SESSION_ID", "CLAUDE_CODE
97
97
  export declare function detectTelemetryHost(env?: Env): string | undefined;
98
98
  /** The host agent's session id from the environment, when it exposes one. */
99
99
  export declare function detectTelemetrySession(env?: Env): string | undefined;
100
+ /**
101
+ * The file a module URL names, or undefined when there is none: a bundle
102
+ * format can drop `import.meta.url` or make reading it throw.
103
+ */
104
+ export declare function moduleFileFromUrl(readUrl: () => unknown): string | undefined;
100
105
  /**
101
106
  * Where a run comes from: the `KIBI_TELEMETRY_CHANNEL` a harness sets (for
102
107
  * example `agent-test`), `source` when Kibi runs from a checkout of its own
@@ -189,10 +189,13 @@ function sandboxedHome(env) {
189
189
  }
190
190
  /** The Kibi monorepo root's package name. */
191
191
  const KIBI_REPOSITORY_PACKAGE = "kibi";
192
- /** This module's file, or undefined when a bundle format drops `import.meta.url`. */
193
- function thisModuleFile() {
192
+ /**
193
+ * The file a module URL names, or undefined when there is none: a bundle
194
+ * format can drop `import.meta.url` or make reading it throw.
195
+ */
196
+ export function moduleFileFromUrl(readUrl) {
194
197
  try {
195
- const url = import.meta.url;
198
+ const url = readUrl();
196
199
  return typeof url === "string" && url !== ""
197
200
  ? fileURLToPath(url)
198
201
  : undefined;
@@ -201,6 +204,10 @@ function thisModuleFile() {
201
204
  return undefined;
202
205
  }
203
206
  }
207
+ /** This module's file. */
208
+ function thisModuleFile() {
209
+ return moduleFileFromUrl(() => import.meta.url);
210
+ }
204
211
  /**
205
212
  * Whether a file belongs to a checkout of the Kibi repository rather than to
206
213
  * an installed package. Installed copies live under `node_modules` or in a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kibi-agent-core",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Shared low-latency hook helpers for Kibi agent adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",