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/cli/index.js
CHANGED
|
@@ -5006,6 +5006,9 @@ var ClaudeCodeAdapter = class extends BaseAdapter {
|
|
|
5006
5006
|
});
|
|
5007
5007
|
const context = {
|
|
5008
5008
|
cwd: getString(payload, "cwd"),
|
|
5009
|
+
// 📖 Pass process.env so the context detector can detect the terminal
|
|
5010
|
+
// from TERM_PROGRAM, ITERM_SESSION_ID, etc. — hooks don't carry env vars
|
|
5011
|
+
env: this.env ?? process.env,
|
|
5009
5012
|
hookPayload: payload,
|
|
5010
5013
|
pid: getNumber(payload, "pid"),
|
|
5011
5014
|
sessionId,
|
|
@@ -5239,6 +5242,8 @@ function extractClaudeTranscriptObservations(payload, transcriptPath) {
|
|
|
5239
5242
|
const tokensUsed = extractTokenUsage(payload);
|
|
5240
5243
|
const rawPayload = payload;
|
|
5241
5244
|
const sharedContext = {
|
|
5245
|
+
// 📖 Pass process.env so terminal detection works from transcript path too
|
|
5246
|
+
env: process.env,
|
|
5242
5247
|
hookPayload: rawPayload,
|
|
5243
5248
|
sessionId,
|
|
5244
5249
|
source: "aisnitch://adapters/claude-code/transcript",
|
|
@@ -8895,6 +8900,8 @@ var OpenCodeAdapter = class extends BaseAdapter {
|
|
|
8895
8900
|
});
|
|
8896
8901
|
const context = {
|
|
8897
8902
|
cwd: extractOpenCodeCwd(payload),
|
|
8903
|
+
// 📖 Pass process.env so the context detector can detect the terminal
|
|
8904
|
+
env: this.env ?? process.env,
|
|
8898
8905
|
hookPayload: payload,
|
|
8899
8906
|
pid: getNumber5(payload, "pid"),
|
|
8900
8907
|
sessionId,
|
|
@@ -8905,6 +8912,8 @@ var OpenCodeAdapter = class extends BaseAdapter {
|
|
|
8905
8912
|
cwd: context.cwd,
|
|
8906
8913
|
errorMessage: extractOpenCodeErrorMessage(payload),
|
|
8907
8914
|
errorType: extractOpenCodeErrorType(payload),
|
|
8915
|
+
// 📖 Extract model from payload — OpenCode may send it as "model" or nested in properties
|
|
8916
|
+
model: getString7(payload, "model") ?? getString7(getRecord6(payload.properties), "model"),
|
|
8908
8917
|
project: extractOpenCodeProject(payload),
|
|
8909
8918
|
raw: payload,
|
|
8910
8919
|
toolInput: extractOpenCodeToolInput(payload),
|