zeitzeuge 0.7.1 → 0.7.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/dist/cli.js +25 -7
- package/package.json +3 -1
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
2
20
|
|
|
3
21
|
// src/cli.ts
|
|
4
22
|
import yargs from "yargs";
|
|
@@ -61,19 +79,19 @@ var FindingsSchema = z.object({
|
|
|
61
79
|
findings: z.array(FindingSchema)
|
|
62
80
|
});
|
|
63
81
|
// ../utils/src/models/init.ts
|
|
64
|
-
|
|
65
|
-
import { ChatAnthropic } from "@langchain/anthropic";
|
|
66
|
-
function initModel() {
|
|
82
|
+
async function initModel() {
|
|
67
83
|
const modelOverride = process.env.ZEITZEUGE_MODEL;
|
|
68
84
|
const openaiKey = process.env.OPENAI_API_KEY;
|
|
69
85
|
const anthropicKey = process.env.ANTHROPIC_API_KEY;
|
|
70
86
|
if (openaiKey) {
|
|
87
|
+
const { ChatOpenAI } = await import("@langchain/openai");
|
|
71
88
|
return new ChatOpenAI({
|
|
72
89
|
model: modelOverride ?? "gpt-5.2",
|
|
73
90
|
apiKey: openaiKey
|
|
74
91
|
});
|
|
75
92
|
}
|
|
76
93
|
if (anthropicKey) {
|
|
94
|
+
const { ChatAnthropic } = await import("@langchain/anthropic");
|
|
77
95
|
return new ChatAnthropic({
|
|
78
96
|
model: modelOverride ?? "claude-opus-4-6",
|
|
79
97
|
apiKey: anthropicKey
|
|
@@ -81,9 +99,9 @@ function initModel() {
|
|
|
81
99
|
}
|
|
82
100
|
throw new Error(`No API key found. Set OPENAI_API_KEY or ANTHROPIC_API_KEY in your environment.
|
|
83
101
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
export OPENAI_API_KEY=sk-...
|
|
103
|
+
# or
|
|
104
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
87
105
|
`);
|
|
88
106
|
}
|
|
89
107
|
// ../utils/src/analysis/agent.ts
|
|
@@ -2910,7 +2928,7 @@ async function main() {
|
|
|
2910
2928
|
printHeader(url, VERSION);
|
|
2911
2929
|
if (verbose)
|
|
2912
2930
|
console.log("[verbose] Detecting API key and initializing model...");
|
|
2913
|
-
const model = initModel();
|
|
2931
|
+
const model = await initModel();
|
|
2914
2932
|
if (verbose)
|
|
2915
2933
|
console.log(`[verbose] Model initialized: ${model.constructor.name}`);
|
|
2916
2934
|
const browserSpinner = createSpinner("Launching browser...");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zeitzeuge",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "A deepagent to witnessing slowdowns in your test runs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analysis",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
"test": "bun test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@langchain/anthropic": "^1.3.18",
|
|
41
42
|
"@langchain/core": "^1.1.25",
|
|
43
|
+
"@langchain/openai": "^1.2.8",
|
|
42
44
|
"deepagents": "^1.8.0",
|
|
43
45
|
"langchain": "^1.2.23",
|
|
44
46
|
"ora": "^9.3.0",
|