aisnitch 0.2.4 → 0.2.12

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/dist/index.d.cts CHANGED
@@ -1717,7 +1717,7 @@ declare const AISNITCH_PACKAGE_NAME = "aisnitch";
1717
1717
  * 📖 The published version is kept in source so runtime entrypoints can expose
1718
1718
  * stable metadata without reading package.json at runtime.
1719
1719
  */
1720
- declare const AISNITCH_VERSION = "0.2.3";
1720
+ declare const AISNITCH_VERSION = "0.2.12";
1721
1721
  /**
1722
1722
  * 📖 The shared description stays close to the package identity so commander
1723
1723
  * help output and future docs surfaces stay aligned.
package/dist/index.d.ts CHANGED
@@ -1717,7 +1717,7 @@ declare const AISNITCH_PACKAGE_NAME = "aisnitch";
1717
1717
  * 📖 The published version is kept in source so runtime entrypoints can expose
1718
1718
  * stable metadata without reading package.json at runtime.
1719
1719
  */
1720
- declare const AISNITCH_VERSION = "0.2.3";
1720
+ declare const AISNITCH_VERSION = "0.2.12";
1721
1721
  /**
1722
1722
  * 📖 The shared description stays close to the package identity so commander
1723
1723
  * help output and future docs surfaces stay aligned.
package/dist/index.js CHANGED
@@ -1349,6 +1349,9 @@ var ClaudeCodeAdapter = class extends BaseAdapter {
1349
1349
  });
1350
1350
  const context = {
1351
1351
  cwd: getString(payload, "cwd"),
1352
+ // 📖 Pass process.env so the context detector can detect the terminal
1353
+ // from TERM_PROGRAM, ITERM_SESSION_ID, etc. — hooks don't carry env vars
1354
+ env: this.env ?? process.env,
1352
1355
  hookPayload: payload,
1353
1356
  pid: getNumber(payload, "pid"),
1354
1357
  sessionId,
@@ -1582,6 +1585,8 @@ function extractClaudeTranscriptObservations(payload, transcriptPath) {
1582
1585
  const tokensUsed = extractTokenUsage(payload);
1583
1586
  const rawPayload = payload;
1584
1587
  const sharedContext = {
1588
+ // 📖 Pass process.env so terminal detection works from transcript path too
1589
+ env: process.env,
1585
1590
  hookPayload: rawPayload,
1586
1591
  sessionId,
1587
1592
  source: "aisnitch://adapters/claude-code/transcript",
@@ -5238,6 +5243,8 @@ var OpenCodeAdapter = class extends BaseAdapter {
5238
5243
  });
5239
5244
  const context = {
5240
5245
  cwd: extractOpenCodeCwd(payload),
5246
+ // 📖 Pass process.env so the context detector can detect the terminal
5247
+ env: this.env ?? process.env,
5241
5248
  hookPayload: payload,
5242
5249
  pid: getNumber5(payload, "pid"),
5243
5250
  sessionId,
@@ -5248,6 +5255,8 @@ var OpenCodeAdapter = class extends BaseAdapter {
5248
5255
  cwd: context.cwd,
5249
5256
  errorMessage: extractOpenCodeErrorMessage(payload),
5250
5257
  errorType: extractOpenCodeErrorType(payload),
5258
+ // 📖 Extract model from payload — OpenCode may send it as "model" or nested in properties
5259
+ model: getString7(payload, "model") ?? getString7(getRecord6(payload.properties), "model"),
5251
5260
  project: extractOpenCodeProject(payload),
5252
5261
  raw: payload,
5253
5262
  toolInput: extractOpenCodeToolInput(payload),
@@ -6643,7 +6652,7 @@ import { WebSocket, WebSocketServer } from "ws";
6643
6652
 
6644
6653
  // src/package-info.ts
6645
6654
  var AISNITCH_PACKAGE_NAME = "aisnitch";
6646
- var AISNITCH_VERSION = "0.2.3";
6655
+ var AISNITCH_VERSION = "0.2.12";
6647
6656
  var AISNITCH_DESCRIPTION = "Universal bridge for AI coding tool activity \u2014 capture, normalize, stream.";
6648
6657
  function getPackageScaffoldInfo() {
6649
6658
  return {
@@ -7507,6 +7516,7 @@ var Pipeline = class {
7507
7516
 
7508
7517
  // src/tui/index.tsx
7509
7518
  import { render } from "ink";
7519
+ import { withFullScreen } from "fullscreen-ink";
7510
7520
  import WebSocket4 from "ws";
7511
7521
 
7512
7522
  // src/tui/App.tsx
@@ -9476,7 +9486,7 @@ function isWelcomeMessage(payload) {
9476
9486
  // src/tui/index.tsx
9477
9487
  import { jsx as jsx13 } from "react/jsx-runtime";
9478
9488
  async function renderForegroundTui(options) {
9479
- const app = render(
9489
+ const ink = withFullScreen(
9480
9490
  /* @__PURE__ */ jsx13(
9481
9491
  App,
9482
9492
  {
@@ -9498,7 +9508,8 @@ async function renderForegroundTui(options) {
9498
9508
  }
9499
9509
  )
9500
9510
  );
9501
- await app.waitUntilExit();
9511
+ await ink.start();
9512
+ await ink.waitUntilExit;
9502
9513
  }
9503
9514
  async function renderAttachedTui(options) {
9504
9515
  const socket = new WebSocket4(options.wsUrl);