aisnitch 0.2.4 → 0.2.5
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/cli/index.cjs +9 -0
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +9 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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),
|