@whisperr/wizard 0.1.7 → 0.1.9
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.js +31 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,6 +7,12 @@ import * as p from "@clack/prompts";
|
|
|
7
7
|
// src/core/config.ts
|
|
8
8
|
var DEFAULT_API_BASE = "https://api.whisperr.net";
|
|
9
9
|
var DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
10
|
+
var DEFAULT_EFFORT = "medium";
|
|
11
|
+
var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
12
|
+
function resolveEffort() {
|
|
13
|
+
const raw = (process.env.WHISPERR_WIZARD_EFFORT ?? "").toLowerCase();
|
|
14
|
+
return EFFORT_LEVELS.includes(raw) ? raw : DEFAULT_EFFORT;
|
|
15
|
+
}
|
|
10
16
|
function resolveConfig(flags = {}) {
|
|
11
17
|
const apiBaseUrl = (flags.apiBaseUrl ?? process.env.WHISPERR_WIZARD_API_BASE ?? DEFAULT_API_BASE).replace(/\/+$/, "");
|
|
12
18
|
const llmBaseUrl = (process.env.WHISPERR_WIZARD_LLM_BASE ?? `${apiBaseUrl}/wizard/llm`).replace(/\/+$/, "");
|
|
@@ -18,6 +24,7 @@ function resolveConfig(flags = {}) {
|
|
|
18
24
|
apiBaseUrl,
|
|
19
25
|
llmBaseUrl,
|
|
20
26
|
model: flags.model ?? process.env.WHISPERR_WIZARD_MODEL ?? DEFAULT_MODEL,
|
|
27
|
+
effort: resolveEffort(),
|
|
21
28
|
maxTurns: Number(process.env.WHISPERR_WIZARD_MAX_TURNS ?? 55),
|
|
22
29
|
directAnthropicKey,
|
|
23
30
|
offline
|
|
@@ -988,7 +995,7 @@ in the code. You will NOT find everything \u2014 some events live server-side or
|
|
|
988
995
|
aren't in this codebase at all. That is expected and fine. Get what is here, get
|
|
989
996
|
it right, report the rest. Know exactly what you're doing; never hunt blindly.
|
|
990
997
|
|
|
991
|
-
|
|
998
|
+
Every step costs time and the user is watching. Work FAST and DECISIVELY.
|
|
992
999
|
|
|
993
1000
|
EFFICIENCY \u2014 non-negotiable:
|
|
994
1001
|
- Use Grep and Glob to find code. Do NOT read whole files; read the smallest
|
|
@@ -1019,8 +1026,16 @@ CORRECTNESS:
|
|
|
1019
1026
|
- Use the EXACT snake_case event names given. Never invent or rename events.
|
|
1020
1027
|
- Only place an event where you're confident the user action truly happens.
|
|
1021
1028
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1029
|
+
FINAL SUMMARY (this is shown verbatim to a non-technical customer in a
|
|
1030
|
+
dashboard \u2014 write for a human, not a changelog):
|
|
1031
|
+
- Plain prose and simple short lines ONLY. Do NOT use Markdown: no #/##
|
|
1032
|
+
headings, no **bold**, no backticks, no code fences, no tables, no "---".
|
|
1033
|
+
- Keep it tight: 3\u20136 short sentences or dash-prefixed lines. Lead with what now
|
|
1034
|
+
works ("Installed the SDK and wired identify() on login."). Then one line per
|
|
1035
|
+
group of events wired (you don't need to list all 28 individually \u2014 group
|
|
1036
|
+
them, e.g. "Wired the 6 subscription + signup events in your auth and billing
|
|
1037
|
+
controllers."). End with what you deliberately left as follow-ups and why.
|
|
1038
|
+
- Mention concrete file names in prose if helpful, but no diffs, no snippets.
|
|
1024
1039
|
`.trim();
|
|
1025
1040
|
function renderIdentifyBrief(m) {
|
|
1026
1041
|
const lines = [];
|
|
@@ -1127,6 +1142,7 @@ async function runIntegrationAgent(opts) {
|
|
|
1127
1142
|
systemPrompt: systemPrompt9,
|
|
1128
1143
|
repoPath,
|
|
1129
1144
|
model: config.model,
|
|
1145
|
+
effort: config.effort,
|
|
1130
1146
|
maxTurns: 35,
|
|
1131
1147
|
progress
|
|
1132
1148
|
});
|
|
@@ -1156,6 +1172,7 @@ ${core.summary}`);
|
|
|
1156
1172
|
systemPrompt: systemPrompt9,
|
|
1157
1173
|
repoPath,
|
|
1158
1174
|
model: config.model,
|
|
1175
|
+
effort: config.effort,
|
|
1159
1176
|
maxTurns: config.maxTurns,
|
|
1160
1177
|
progress
|
|
1161
1178
|
});
|
|
@@ -1173,7 +1190,7 @@ ${events.summary}`);
|
|
|
1173
1190
|
};
|
|
1174
1191
|
}
|
|
1175
1192
|
async function runPass(opts) {
|
|
1176
|
-
const { prompt, systemPrompt: systemPrompt9, repoPath, model, maxTurns, progress } = opts;
|
|
1193
|
+
const { prompt, systemPrompt: systemPrompt9, repoPath, model, effort, maxTurns, progress } = opts;
|
|
1177
1194
|
let summary = "";
|
|
1178
1195
|
let costUsd = 0;
|
|
1179
1196
|
let ok = false;
|
|
@@ -1184,6 +1201,11 @@ async function runPass(opts) {
|
|
|
1184
1201
|
model,
|
|
1185
1202
|
cwd: repoPath,
|
|
1186
1203
|
systemPrompt: systemPrompt9,
|
|
1204
|
+
// Adaptive thinking (Claude decides depth per step) + an explicit effort
|
|
1205
|
+
// level. Sonnet 4.6 supports both; we set them rather than rely on SDK
|
|
1206
|
+
// defaults so the behavior is pinned regardless of SDK version.
|
|
1207
|
+
thinking: { type: "adaptive" },
|
|
1208
|
+
effort,
|
|
1187
1209
|
allowedTools: ["Read", "Edit", "Write", "Bash", "Glob", "Grep"],
|
|
1188
1210
|
permissionMode: "bypassPermissions",
|
|
1189
1211
|
maxTurns,
|
|
@@ -1321,7 +1343,9 @@ async function scanWiredEvents(repoPath, files, eventTypes) {
|
|
|
1321
1343
|
const wired = /* @__PURE__ */ new Map();
|
|
1322
1344
|
const patterns = eventTypes.map((e) => ({
|
|
1323
1345
|
eventType: e,
|
|
1324
|
-
re: new RegExp(
|
|
1346
|
+
re: new RegExp(
|
|
1347
|
+
`\\btrack\\s*\\(\\s*[\\s\\S]{0,160}?['"\`]${escapeRegExp(e)}['"\`]`
|
|
1348
|
+
)
|
|
1325
1349
|
}));
|
|
1326
1350
|
for (const file of files) {
|
|
1327
1351
|
let content = "";
|
|
@@ -1565,7 +1589,7 @@ Flutter is live today; ${theme.bright(
|
|
|
1565
1589
|
});
|
|
1566
1590
|
p.log.info(
|
|
1567
1591
|
theme.muted(
|
|
1568
|
-
`${wiredMap.size}/${manifest.events.length} events wired \xB7 ${files.length} file${files.length === 1 ? "" : "s"} changed \xB7
|
|
1592
|
+
`${wiredMap.size}/${manifest.events.length} events wired \xB7 ${files.length} file${files.length === 1 ? "" : "s"} changed \xB7 ${Math.round(outcome.durationMs / 1e3)}s`
|
|
1569
1593
|
)
|
|
1570
1594
|
);
|
|
1571
1595
|
if (!config.offline) {
|
|
@@ -1761,7 +1785,7 @@ async function main() {
|
|
|
1761
1785
|
return;
|
|
1762
1786
|
}
|
|
1763
1787
|
if ("version" in parsed) {
|
|
1764
|
-
console.log("0.1.
|
|
1788
|
+
console.log("0.1.9");
|
|
1765
1789
|
return;
|
|
1766
1790
|
}
|
|
1767
1791
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whisperr/wizard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Whisperr Wizard — one command to integrate the Whisperr SDK into your app. Authenticates with your onboarded account and uses an AI coding agent to wire up identify() and your business events automatically.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|