@gurulu/cli 1.3.0 → 1.4.1
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/bin.js +77 -32
- package/dist/index.js +77 -32
- package/dist/lib/install-plan.d.ts +6 -0
- package/dist/lib/install-plan.d.ts.map +1 -1
- package/dist/lib/install-plan.js +12 -8
- package/dist/wizard/agent.d.ts +2 -2
- package/dist/wizard/agent.d.ts.map +1 -1
- package/dist/wizard/features.d.ts +1 -1
- package/dist/wizard/features.d.ts.map +1 -1
- package/dist/wizard/run.d.ts.map +1 -1
- package/dist/wizard/wire.d.ts +2 -0
- package/dist/wizard/wire.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -25710,15 +25710,19 @@ function sdkFor(framework) {
|
|
|
25710
25710
|
return "@gurulu/web";
|
|
25711
25711
|
}
|
|
25712
25712
|
}
|
|
25713
|
-
function
|
|
25713
|
+
function autocaptureLine(jsError, indent) {
|
|
25714
|
+
return jsError ? `
|
|
25715
|
+
${indent}autocapture: { js_error: true }, // hata takibi açık` : "";
|
|
25716
|
+
}
|
|
25717
|
+
function snippetWeb(workspaceKey, jsError = false) {
|
|
25714
25718
|
return `import gurulu from '@gurulu/web';
|
|
25715
25719
|
|
|
25716
25720
|
gurulu.init({
|
|
25717
25721
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
25718
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io
|
|
25722
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
|
|
25719
25723
|
});`;
|
|
25720
25724
|
}
|
|
25721
|
-
function snippetNext(workspaceKey) {
|
|
25725
|
+
function snippetNext(workspaceKey, jsError = false) {
|
|
25722
25726
|
return `// src/app/gurulu-provider.tsx
|
|
25723
25727
|
'use client';
|
|
25724
25728
|
import { useEffect } from 'react';
|
|
@@ -25728,7 +25732,7 @@ export function GuruluProvider({ children }: { children: React.ReactNode }) {
|
|
|
25728
25732
|
useEffect(() => {
|
|
25729
25733
|
gurulu.init({
|
|
25730
25734
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
25731
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,
|
|
25735
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,${autocaptureLine(jsError, " ")}
|
|
25732
25736
|
});
|
|
25733
25737
|
}, []);
|
|
25734
25738
|
return <>{children}</>;
|
|
@@ -25807,7 +25811,7 @@ function placementHintFor(framework) {
|
|
|
25807
25811
|
return "Initialize the SDK at your app entry point.";
|
|
25808
25812
|
}
|
|
25809
25813
|
}
|
|
25810
|
-
function initSnippetFor(framework, sdk, workspaceKey) {
|
|
25814
|
+
function initSnippetFor(framework, sdk, workspaceKey, jsError = false) {
|
|
25811
25815
|
if (sdk === "@gurulu/node") {
|
|
25812
25816
|
if (framework === "express")
|
|
25813
25817
|
return snippetExpress();
|
|
@@ -25816,8 +25820,8 @@ function initSnippetFor(framework, sdk, workspaceKey) {
|
|
|
25816
25820
|
return snippetNode();
|
|
25817
25821
|
}
|
|
25818
25822
|
if (framework === "next")
|
|
25819
|
-
return snippetNext(workspaceKey);
|
|
25820
|
-
return snippetWeb(workspaceKey);
|
|
25823
|
+
return snippetNext(workspaceKey, jsError);
|
|
25824
|
+
return snippetWeb(workspaceKey, jsError);
|
|
25821
25825
|
}
|
|
25822
25826
|
function envKeysFor(sdk, framework) {
|
|
25823
25827
|
if (sdk === "@gurulu/node") {
|
|
@@ -25843,7 +25847,7 @@ function buildInstallPlan(detected, ctx = {}) {
|
|
|
25843
25847
|
sdk,
|
|
25844
25848
|
packageManager: detected.packageManager,
|
|
25845
25849
|
installCommand: installCmdFor(detected.packageManager, sdk),
|
|
25846
|
-
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey),
|
|
25850
|
+
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey, ctx.autocaptureJsError),
|
|
25847
25851
|
envKeys: envKeysFor(sdk, detected.framework),
|
|
25848
25852
|
placementHint: placementHintFor(detected.framework),
|
|
25849
25853
|
framework: detected.framework
|
|
@@ -26165,6 +26169,15 @@ function availableFeatures(detected) {
|
|
|
26165
26169
|
enableHint: isBrowser ? "gurulu.init({ ..., autocapture: { js_error: true } })" : "Sunucu hatalarında: gurulu.track('js_error', { message, error_type })",
|
|
26166
26170
|
recommended: isBrowser
|
|
26167
26171
|
});
|
|
26172
|
+
if (isBrowser) {
|
|
26173
|
+
feats.push({
|
|
26174
|
+
key: "heatmap",
|
|
26175
|
+
label: "Heatmap (tıklama + kaydırma)",
|
|
26176
|
+
detail: "Tıklama/kaydırma ısı haritası — default autocapture, ek kod gerekmez",
|
|
26177
|
+
enableHint: "Otomatik: element_clicked + scroll_depth default açık → Heatmaps dashboard kendiliğinden dolar.",
|
|
26178
|
+
recommended: true
|
|
26179
|
+
});
|
|
26180
|
+
}
|
|
26168
26181
|
if (detected.llmFrameworks.length > 0) {
|
|
26169
26182
|
feats.push({
|
|
26170
26183
|
key: "llm",
|
|
@@ -26478,11 +26491,14 @@ ${stderr}`.trim().slice(0, MAX_OBS);
|
|
|
26478
26491
|
}
|
|
26479
26492
|
function buildWireSystemPrompt() {
|
|
26480
26493
|
return [
|
|
26481
|
-
"You are Gurulu's capture wire agent. Add the approved analytics events to the user's code
|
|
26494
|
+
"You are Gurulu's capture wire agent. Add the approved analytics events to the user's code,",
|
|
26495
|
+
"plus any additional wiring tasks given (e.g. wrapping an LLM client, mounting a provider).",
|
|
26482
26496
|
"Tools (one JSON action per turn): read{path} | edit{path,find,replace} | bash{cmd} | done{summary}.",
|
|
26483
26497
|
"HARD RULES:",
|
|
26484
26498
|
"- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
|
|
26485
|
-
|
|
26499
|
+
' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
|
|
26500
|
+
" expression, keep the original verbatim inside the new wrapper (e.g. find `new OpenAI(cfg)` →",
|
|
26501
|
+
" replace `wrapOpenAI(new OpenAI(cfg))`), and add the import additively.",
|
|
26486
26502
|
"- `find` must be an EXACT, UNIQUE snippet copied from a file you have read (read before edit).",
|
|
26487
26503
|
"- Use the exact provided event_key (snake_case). Wire gurulu.track(...) at the right place and",
|
|
26488
26504
|
" gurulu.identify(...) at the auth point if given.",
|
|
@@ -26490,21 +26506,23 @@ function buildWireSystemPrompt() {
|
|
|
26490
26506
|
" `pnpm run lint`) or a checker binary (`tsc --noEmit`, `biome check`, `eslint .`). Installing or",
|
|
26491
26507
|
" fetching packages (`npm install`, `npx`, `bunx`, `pnpm dlx`, `add`, `exec`) is REJECTED by the guard.",
|
|
26492
26508
|
"- After wiring, run the project typecheck/build to verify; if it breaks, fix additively.",
|
|
26493
|
-
"- When all events are
|
|
26509
|
+
"- When all events AND additional tasks are done and verify passes, emit done{summary}. Keep edits minimal."
|
|
26494
26510
|
].join(`
|
|
26495
26511
|
`);
|
|
26496
26512
|
}
|
|
26497
|
-
function buildWireUserPrompt(events, identifyHint, files) {
|
|
26498
|
-
const
|
|
26513
|
+
function buildWireUserPrompt(events, identifyHint, files, extraTasks = []) {
|
|
26514
|
+
const sections = [];
|
|
26515
|
+
if (events.length > 0) {
|
|
26516
|
+
const evLines = events.map((e2) => `- ${e2.event_key} (${e2.event_type})${e2.capture_hint ? ` @ ${e2.capture_hint}` : ""}: ${e2.reason}`).join(`
|
|
26499
26517
|
`);
|
|
26500
|
-
|
|
26501
|
-
|
|
26502
|
-
|
|
26503
|
-
|
|
26504
|
-
|
|
26505
|
-
|
|
26506
|
-
|
|
26507
|
-
|
|
26518
|
+
sections.push("Wire these events into the codebase:", evLines, identifyHint ? `identify() at: ${identifyHint}` : "No identify hint.");
|
|
26519
|
+
}
|
|
26520
|
+
if (extraTasks.length > 0) {
|
|
26521
|
+
sections.push("Additional wiring tasks:", extraTasks.map((t2, i2) => `${i2 + 1}. ${t2}`).join(`
|
|
26522
|
+
`));
|
|
26523
|
+
}
|
|
26524
|
+
sections.push("", `Project files (read the relevant ones): ${files.join(", ")}`, "Start by reading the files you need, then edit additively.");
|
|
26525
|
+
return sections.join(`
|
|
26508
26526
|
`);
|
|
26509
26527
|
}
|
|
26510
26528
|
|
|
@@ -26513,7 +26531,10 @@ var MAX_STEPS = 25;
|
|
|
26513
26531
|
async function runWireAgent(client, input, snapshots) {
|
|
26514
26532
|
const messages = [
|
|
26515
26533
|
{ role: "system", content: buildWireSystemPrompt() },
|
|
26516
|
-
{
|
|
26534
|
+
{
|
|
26535
|
+
role: "user",
|
|
26536
|
+
content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [])
|
|
26537
|
+
}
|
|
26517
26538
|
];
|
|
26518
26539
|
const edits = [];
|
|
26519
26540
|
const changed = new Set;
|
|
@@ -26674,8 +26695,6 @@ async function runWizard(opts) {
|
|
|
26674
26695
|
}
|
|
26675
26696
|
}
|
|
26676
26697
|
const project = { ...detected, framework };
|
|
26677
|
-
const plan = buildInstallPlan(project, { writeKey, workspaceId });
|
|
26678
|
-
const isNode = plan.sdk === "@gurulu/node";
|
|
26679
26698
|
const authed = Boolean(auth.apiKey);
|
|
26680
26699
|
let approvedEvents = [];
|
|
26681
26700
|
let identifyHint = null;
|
|
@@ -26695,6 +26714,13 @@ async function runWizard(opts) {
|
|
|
26695
26714
|
if (authed) {
|
|
26696
26715
|
featuresResult = await runFeatures(client, project, { yes: opts.yes, authed });
|
|
26697
26716
|
}
|
|
26717
|
+
const errorSelected = featuresResult.selected.some((f3) => f3.key === "error");
|
|
26718
|
+
const plan = buildInstallPlan(project, {
|
|
26719
|
+
writeKey,
|
|
26720
|
+
workspaceId,
|
|
26721
|
+
autocaptureJsError: errorSelected
|
|
26722
|
+
});
|
|
26723
|
+
const isNode = plan.sdk === "@gurulu/node";
|
|
26698
26724
|
phase(4, "SDK kurulumu");
|
|
26699
26725
|
let installed = false;
|
|
26700
26726
|
if (opts.noInstall) {
|
|
@@ -26720,6 +26746,18 @@ async function runWizard(opts) {
|
|
|
26720
26746
|
snippet: plan.initSnippet,
|
|
26721
26747
|
placementHint: plan.placementHint
|
|
26722
26748
|
});
|
|
26749
|
+
const extraTasks = [];
|
|
26750
|
+
const llmSelected = featuresResult.selected.some((f3) => f3.key === "llm");
|
|
26751
|
+
const activationSelected = featuresResult.selected.some((f3) => f3.key === "activation");
|
|
26752
|
+
if (activationSelected && !isNode) {
|
|
26753
|
+
extraTasks.push("Enable the Gurulu Activation runtime so dashboard-published popups, tours and personalization " + "render in the browser. Find where the Gurulu browser SDK is initialized (the `gurulu.init({...})` " + "call or the created Gurulu instance) and, right after it, additively add: " + "`import { runActivation } from '@gurulu/web/activate';` then call `runActivation(gurulu);` " + "(use the actual instance variable name from that file). Add the import additively; do not remove " + "or rewrite the existing init.");
|
|
26754
|
+
}
|
|
26755
|
+
if (llmSelected && detected.llmFrameworks.length > 0) {
|
|
26756
|
+
extraTasks.push(`Wrap the project's LLM client(s) [${detected.llmFrameworks.join(", ")}] with @gurulu/node so ` + "every call is auto-captured. Find where the OpenAI/Anthropic client is instantiated and wrap " + "it in place additively: `import { wrapOpenAI } from '@gurulu/node';` then " + "`const client = wrapOpenAI(new OpenAI({...}))` (use wrapAnthropic for Anthropic SDK). " + "Keep the original instantiation verbatim inside the wrapper.");
|
|
26757
|
+
}
|
|
26758
|
+
if (inj.strategy === "create-module" && inj.file && (project.framework === "next" || project.framework === "nuxt")) {
|
|
26759
|
+
extraTasks.push(project.framework === "next" ? `Mount the Gurulu provider created at \`${inj.file}\` into the app root. Edit app/layout.tsx ` + "(App Router) or pages/_app.tsx (Pages Router) to import { GuruluProvider } from that module " + "and wrap the children additively: `<GuruluProvider>{children}</GuruluProvider>`." : `Register the Nuxt plugin created at \`${inj.file}\` so it loads on the client. If it is under ` + "plugins/ Nuxt auto-registers it; otherwise add it to the plugins array in nuxt.config.ts additively.");
|
|
26760
|
+
}
|
|
26723
26761
|
const envFile = isNode ? ".env" : ".env.local";
|
|
26724
26762
|
const vars = [];
|
|
26725
26763
|
for (const k2 of plan.envKeys) {
|
|
@@ -26756,16 +26794,19 @@ async function runWizard(opts) {
|
|
|
26756
26794
|
s2.stop(`${res.registered.length} yeni event verification queue'ya eklendi${res.failed.length > 0 ? ` (${res.failed.length} başarısız)` : ""}`);
|
|
26757
26795
|
}
|
|
26758
26796
|
let wiredCount = 0;
|
|
26759
|
-
|
|
26797
|
+
const hasWireWork = approvedEvents.length > 0 || extraTasks.length > 0;
|
|
26798
|
+
if (hasWireWork) {
|
|
26760
26799
|
if (opts.noAi) {
|
|
26761
|
-
|
|
26800
|
+
if (approvedEvents.length > 0) {
|
|
26801
|
+
p4.log.message(`Capture — şu çağrıları ekle:
|
|
26762
26802
|
${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
26803
|
+
}
|
|
26763
26804
|
} else {
|
|
26764
26805
|
const wireFiles = gatherContext({ cwd: opts.cwd }).files.map((f3) => f3.path);
|
|
26765
26806
|
const snapshots = new Map;
|
|
26766
26807
|
const s2 = p4.spinner();
|
|
26767
26808
|
s2.start("AI capture wiring (kod düzenleniyor)…");
|
|
26768
|
-
const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles }, snapshots);
|
|
26809
|
+
const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles, extraTasks }, snapshots);
|
|
26769
26810
|
s2.stop(`wire: ${outcome.changedFiles.length} dosya / ${outcome.steps} adım (${outcome.stoppedReason})`);
|
|
26770
26811
|
if (outcome.changedFiles.length > 0) {
|
|
26771
26812
|
p4.log.message(formatWireDiff(opts.cwd, snapshots));
|
|
@@ -26774,12 +26815,16 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
|
26774
26815
|
});
|
|
26775
26816
|
if (p4.isCancel(keep) || !keep) {
|
|
26776
26817
|
restoreSnapshots(opts.cwd, snapshots);
|
|
26777
|
-
|
|
26778
|
-
|
|
26818
|
+
if (approvedEvents.length > 0) {
|
|
26819
|
+
p4.log.info("Wire geri alındı — capture snippet rehberi:");
|
|
26820
|
+
p4.log.message(captureGuide(approvedEvents, identifyHint, isNode));
|
|
26821
|
+
} else {
|
|
26822
|
+
p4.log.info("Wire geri alındı — etkinleştirme snippet'leri yukarıda.");
|
|
26823
|
+
}
|
|
26779
26824
|
} else {
|
|
26780
26825
|
wiredCount = outcome.changedFiles.length;
|
|
26781
26826
|
}
|
|
26782
|
-
} else {
|
|
26827
|
+
} else if (approvedEvents.length > 0) {
|
|
26783
26828
|
p4.log.message(`Capture (AI gömemedi → snippet-göster) — şu çağrıları ekle:
|
|
26784
26829
|
${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
26785
26830
|
}
|
|
@@ -26796,9 +26841,9 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
|
26796
26841
|
}
|
|
26797
26842
|
if (approvedEvents.length > 0) {
|
|
26798
26843
|
lines.push(`✓ ${approvedEvents.length} event planlandı, ${registeredCount} yeni registry kuyruğunda`);
|
|
26799
|
-
if (wiredCount > 0)
|
|
26800
|
-
lines.push(`✓ ${wiredCount} dosya AI ile capture wire edildi`);
|
|
26801
26844
|
}
|
|
26845
|
+
if (wiredCount > 0)
|
|
26846
|
+
lines.push(`✓ ${wiredCount} dosya AI ile wire edildi (capture/LLM/provider)`);
|
|
26802
26847
|
if (featuresResult.registered && featuresResult.selected.length > 0) {
|
|
26803
26848
|
lines.push(`✓ özellikler: ${featuresResult.selected.map((f3) => f3.key).join(", ")} kuruldu`);
|
|
26804
26849
|
}
|
package/dist/index.js
CHANGED
|
@@ -25287,15 +25287,19 @@ function sdkFor(framework) {
|
|
|
25287
25287
|
return "@gurulu/web";
|
|
25288
25288
|
}
|
|
25289
25289
|
}
|
|
25290
|
-
function
|
|
25290
|
+
function autocaptureLine(jsError, indent) {
|
|
25291
|
+
return jsError ? `
|
|
25292
|
+
${indent}autocapture: { js_error: true }, // hata takibi açık` : "";
|
|
25293
|
+
}
|
|
25294
|
+
function snippetWeb(workspaceKey, jsError = false) {
|
|
25291
25295
|
return `import gurulu from '@gurulu/web';
|
|
25292
25296
|
|
|
25293
25297
|
gurulu.init({
|
|
25294
25298
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
25295
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io
|
|
25299
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
|
|
25296
25300
|
});`;
|
|
25297
25301
|
}
|
|
25298
|
-
function snippetNext(workspaceKey) {
|
|
25302
|
+
function snippetNext(workspaceKey, jsError = false) {
|
|
25299
25303
|
return `// src/app/gurulu-provider.tsx
|
|
25300
25304
|
'use client';
|
|
25301
25305
|
import { useEffect } from 'react';
|
|
@@ -25305,7 +25309,7 @@ export function GuruluProvider({ children }: { children: React.ReactNode }) {
|
|
|
25305
25309
|
useEffect(() => {
|
|
25306
25310
|
gurulu.init({
|
|
25307
25311
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
25308
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,
|
|
25312
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,${autocaptureLine(jsError, " ")}
|
|
25309
25313
|
});
|
|
25310
25314
|
}, []);
|
|
25311
25315
|
return <>{children}</>;
|
|
@@ -25384,7 +25388,7 @@ function placementHintFor(framework) {
|
|
|
25384
25388
|
return "Initialize the SDK at your app entry point.";
|
|
25385
25389
|
}
|
|
25386
25390
|
}
|
|
25387
|
-
function initSnippetFor(framework, sdk, workspaceKey) {
|
|
25391
|
+
function initSnippetFor(framework, sdk, workspaceKey, jsError = false) {
|
|
25388
25392
|
if (sdk === "@gurulu/node") {
|
|
25389
25393
|
if (framework === "express")
|
|
25390
25394
|
return snippetExpress();
|
|
@@ -25393,8 +25397,8 @@ function initSnippetFor(framework, sdk, workspaceKey) {
|
|
|
25393
25397
|
return snippetNode();
|
|
25394
25398
|
}
|
|
25395
25399
|
if (framework === "next")
|
|
25396
|
-
return snippetNext(workspaceKey);
|
|
25397
|
-
return snippetWeb(workspaceKey);
|
|
25400
|
+
return snippetNext(workspaceKey, jsError);
|
|
25401
|
+
return snippetWeb(workspaceKey, jsError);
|
|
25398
25402
|
}
|
|
25399
25403
|
function envKeysFor(sdk, framework) {
|
|
25400
25404
|
if (sdk === "@gurulu/node") {
|
|
@@ -25420,7 +25424,7 @@ function buildInstallPlan(detected, ctx = {}) {
|
|
|
25420
25424
|
sdk,
|
|
25421
25425
|
packageManager: detected.packageManager,
|
|
25422
25426
|
installCommand: installCmdFor(detected.packageManager, sdk),
|
|
25423
|
-
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey),
|
|
25427
|
+
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey, ctx.autocaptureJsError),
|
|
25424
25428
|
envKeys: envKeysFor(sdk, detected.framework),
|
|
25425
25429
|
placementHint: placementHintFor(detected.framework),
|
|
25426
25430
|
framework: detected.framework
|
|
@@ -25742,6 +25746,15 @@ function availableFeatures(detected) {
|
|
|
25742
25746
|
enableHint: isBrowser ? "gurulu.init({ ..., autocapture: { js_error: true } })" : "Sunucu hatalarında: gurulu.track('js_error', { message, error_type })",
|
|
25743
25747
|
recommended: isBrowser
|
|
25744
25748
|
});
|
|
25749
|
+
if (isBrowser) {
|
|
25750
|
+
feats.push({
|
|
25751
|
+
key: "heatmap",
|
|
25752
|
+
label: "Heatmap (tıklama + kaydırma)",
|
|
25753
|
+
detail: "Tıklama/kaydırma ısı haritası — default autocapture, ek kod gerekmez",
|
|
25754
|
+
enableHint: "Otomatik: element_clicked + scroll_depth default açık → Heatmaps dashboard kendiliğinden dolar.",
|
|
25755
|
+
recommended: true
|
|
25756
|
+
});
|
|
25757
|
+
}
|
|
25745
25758
|
if (detected.llmFrameworks.length > 0) {
|
|
25746
25759
|
feats.push({
|
|
25747
25760
|
key: "llm",
|
|
@@ -26055,11 +26068,14 @@ ${stderr}`.trim().slice(0, MAX_OBS);
|
|
|
26055
26068
|
}
|
|
26056
26069
|
function buildWireSystemPrompt() {
|
|
26057
26070
|
return [
|
|
26058
|
-
"You are Gurulu's capture wire agent. Add the approved analytics events to the user's code
|
|
26071
|
+
"You are Gurulu's capture wire agent. Add the approved analytics events to the user's code,",
|
|
26072
|
+
"plus any additional wiring tasks given (e.g. wrapping an LLM client, mounting a provider).",
|
|
26059
26073
|
"Tools (one JSON action per turn): read{path} | edit{path,find,replace} | bash{cmd} | done{summary}.",
|
|
26060
26074
|
"HARD RULES:",
|
|
26061
26075
|
"- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
|
|
26062
|
-
|
|
26076
|
+
' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
|
|
26077
|
+
" expression, keep the original verbatim inside the new wrapper (e.g. find `new OpenAI(cfg)` →",
|
|
26078
|
+
" replace `wrapOpenAI(new OpenAI(cfg))`), and add the import additively.",
|
|
26063
26079
|
"- `find` must be an EXACT, UNIQUE snippet copied from a file you have read (read before edit).",
|
|
26064
26080
|
"- Use the exact provided event_key (snake_case). Wire gurulu.track(...) at the right place and",
|
|
26065
26081
|
" gurulu.identify(...) at the auth point if given.",
|
|
@@ -26067,21 +26083,23 @@ function buildWireSystemPrompt() {
|
|
|
26067
26083
|
" `pnpm run lint`) or a checker binary (`tsc --noEmit`, `biome check`, `eslint .`). Installing or",
|
|
26068
26084
|
" fetching packages (`npm install`, `npx`, `bunx`, `pnpm dlx`, `add`, `exec`) is REJECTED by the guard.",
|
|
26069
26085
|
"- After wiring, run the project typecheck/build to verify; if it breaks, fix additively.",
|
|
26070
|
-
"- When all events are
|
|
26086
|
+
"- When all events AND additional tasks are done and verify passes, emit done{summary}. Keep edits minimal."
|
|
26071
26087
|
].join(`
|
|
26072
26088
|
`);
|
|
26073
26089
|
}
|
|
26074
|
-
function buildWireUserPrompt(events, identifyHint, files) {
|
|
26075
|
-
const
|
|
26090
|
+
function buildWireUserPrompt(events, identifyHint, files, extraTasks = []) {
|
|
26091
|
+
const sections = [];
|
|
26092
|
+
if (events.length > 0) {
|
|
26093
|
+
const evLines = events.map((e2) => `- ${e2.event_key} (${e2.event_type})${e2.capture_hint ? ` @ ${e2.capture_hint}` : ""}: ${e2.reason}`).join(`
|
|
26076
26094
|
`);
|
|
26077
|
-
|
|
26078
|
-
|
|
26079
|
-
|
|
26080
|
-
|
|
26081
|
-
|
|
26082
|
-
|
|
26083
|
-
|
|
26084
|
-
|
|
26095
|
+
sections.push("Wire these events into the codebase:", evLines, identifyHint ? `identify() at: ${identifyHint}` : "No identify hint.");
|
|
26096
|
+
}
|
|
26097
|
+
if (extraTasks.length > 0) {
|
|
26098
|
+
sections.push("Additional wiring tasks:", extraTasks.map((t2, i2) => `${i2 + 1}. ${t2}`).join(`
|
|
26099
|
+
`));
|
|
26100
|
+
}
|
|
26101
|
+
sections.push("", `Project files (read the relevant ones): ${files.join(", ")}`, "Start by reading the files you need, then edit additively.");
|
|
26102
|
+
return sections.join(`
|
|
26085
26103
|
`);
|
|
26086
26104
|
}
|
|
26087
26105
|
|
|
@@ -26090,7 +26108,10 @@ var MAX_STEPS = 25;
|
|
|
26090
26108
|
async function runWireAgent(client, input, snapshots) {
|
|
26091
26109
|
const messages = [
|
|
26092
26110
|
{ role: "system", content: buildWireSystemPrompt() },
|
|
26093
|
-
{
|
|
26111
|
+
{
|
|
26112
|
+
role: "user",
|
|
26113
|
+
content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [])
|
|
26114
|
+
}
|
|
26094
26115
|
];
|
|
26095
26116
|
const edits = [];
|
|
26096
26117
|
const changed = new Set;
|
|
@@ -26251,8 +26272,6 @@ async function runWizard(opts) {
|
|
|
26251
26272
|
}
|
|
26252
26273
|
}
|
|
26253
26274
|
const project = { ...detected, framework };
|
|
26254
|
-
const plan = buildInstallPlan(project, { writeKey, workspaceId });
|
|
26255
|
-
const isNode = plan.sdk === "@gurulu/node";
|
|
26256
26275
|
const authed = Boolean(auth.apiKey);
|
|
26257
26276
|
let approvedEvents = [];
|
|
26258
26277
|
let identifyHint = null;
|
|
@@ -26272,6 +26291,13 @@ async function runWizard(opts) {
|
|
|
26272
26291
|
if (authed) {
|
|
26273
26292
|
featuresResult = await runFeatures(client, project, { yes: opts.yes, authed });
|
|
26274
26293
|
}
|
|
26294
|
+
const errorSelected = featuresResult.selected.some((f3) => f3.key === "error");
|
|
26295
|
+
const plan = buildInstallPlan(project, {
|
|
26296
|
+
writeKey,
|
|
26297
|
+
workspaceId,
|
|
26298
|
+
autocaptureJsError: errorSelected
|
|
26299
|
+
});
|
|
26300
|
+
const isNode = plan.sdk === "@gurulu/node";
|
|
26275
26301
|
phase(4, "SDK kurulumu");
|
|
26276
26302
|
let installed = false;
|
|
26277
26303
|
if (opts.noInstall) {
|
|
@@ -26297,6 +26323,18 @@ async function runWizard(opts) {
|
|
|
26297
26323
|
snippet: plan.initSnippet,
|
|
26298
26324
|
placementHint: plan.placementHint
|
|
26299
26325
|
});
|
|
26326
|
+
const extraTasks = [];
|
|
26327
|
+
const llmSelected = featuresResult.selected.some((f3) => f3.key === "llm");
|
|
26328
|
+
const activationSelected = featuresResult.selected.some((f3) => f3.key === "activation");
|
|
26329
|
+
if (activationSelected && !isNode) {
|
|
26330
|
+
extraTasks.push("Enable the Gurulu Activation runtime so dashboard-published popups, tours and personalization " + "render in the browser. Find where the Gurulu browser SDK is initialized (the `gurulu.init({...})` " + "call or the created Gurulu instance) and, right after it, additively add: " + "`import { runActivation } from '@gurulu/web/activate';` then call `runActivation(gurulu);` " + "(use the actual instance variable name from that file). Add the import additively; do not remove " + "or rewrite the existing init.");
|
|
26331
|
+
}
|
|
26332
|
+
if (llmSelected && detected.llmFrameworks.length > 0) {
|
|
26333
|
+
extraTasks.push(`Wrap the project's LLM client(s) [${detected.llmFrameworks.join(", ")}] with @gurulu/node so ` + "every call is auto-captured. Find where the OpenAI/Anthropic client is instantiated and wrap " + "it in place additively: `import { wrapOpenAI } from '@gurulu/node';` then " + "`const client = wrapOpenAI(new OpenAI({...}))` (use wrapAnthropic for Anthropic SDK). " + "Keep the original instantiation verbatim inside the wrapper.");
|
|
26334
|
+
}
|
|
26335
|
+
if (inj.strategy === "create-module" && inj.file && (project.framework === "next" || project.framework === "nuxt")) {
|
|
26336
|
+
extraTasks.push(project.framework === "next" ? `Mount the Gurulu provider created at \`${inj.file}\` into the app root. Edit app/layout.tsx ` + "(App Router) or pages/_app.tsx (Pages Router) to import { GuruluProvider } from that module " + "and wrap the children additively: `<GuruluProvider>{children}</GuruluProvider>`." : `Register the Nuxt plugin created at \`${inj.file}\` so it loads on the client. If it is under ` + "plugins/ Nuxt auto-registers it; otherwise add it to the plugins array in nuxt.config.ts additively.");
|
|
26337
|
+
}
|
|
26300
26338
|
const envFile = isNode ? ".env" : ".env.local";
|
|
26301
26339
|
const vars = [];
|
|
26302
26340
|
for (const k2 of plan.envKeys) {
|
|
@@ -26333,16 +26371,19 @@ async function runWizard(opts) {
|
|
|
26333
26371
|
s2.stop(`${res.registered.length} yeni event verification queue'ya eklendi${res.failed.length > 0 ? ` (${res.failed.length} başarısız)` : ""}`);
|
|
26334
26372
|
}
|
|
26335
26373
|
let wiredCount = 0;
|
|
26336
|
-
|
|
26374
|
+
const hasWireWork = approvedEvents.length > 0 || extraTasks.length > 0;
|
|
26375
|
+
if (hasWireWork) {
|
|
26337
26376
|
if (opts.noAi) {
|
|
26338
|
-
|
|
26377
|
+
if (approvedEvents.length > 0) {
|
|
26378
|
+
p4.log.message(`Capture — şu çağrıları ekle:
|
|
26339
26379
|
${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
26380
|
+
}
|
|
26340
26381
|
} else {
|
|
26341
26382
|
const wireFiles = gatherContext({ cwd: opts.cwd }).files.map((f3) => f3.path);
|
|
26342
26383
|
const snapshots = new Map;
|
|
26343
26384
|
const s2 = p4.spinner();
|
|
26344
26385
|
s2.start("AI capture wiring (kod düzenleniyor)…");
|
|
26345
|
-
const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles }, snapshots);
|
|
26386
|
+
const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles, extraTasks }, snapshots);
|
|
26346
26387
|
s2.stop(`wire: ${outcome.changedFiles.length} dosya / ${outcome.steps} adım (${outcome.stoppedReason})`);
|
|
26347
26388
|
if (outcome.changedFiles.length > 0) {
|
|
26348
26389
|
p4.log.message(formatWireDiff(opts.cwd, snapshots));
|
|
@@ -26351,12 +26392,16 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
|
26351
26392
|
});
|
|
26352
26393
|
if (p4.isCancel(keep) || !keep) {
|
|
26353
26394
|
restoreSnapshots(opts.cwd, snapshots);
|
|
26354
|
-
|
|
26355
|
-
|
|
26395
|
+
if (approvedEvents.length > 0) {
|
|
26396
|
+
p4.log.info("Wire geri alındı — capture snippet rehberi:");
|
|
26397
|
+
p4.log.message(captureGuide(approvedEvents, identifyHint, isNode));
|
|
26398
|
+
} else {
|
|
26399
|
+
p4.log.info("Wire geri alındı — etkinleştirme snippet'leri yukarıda.");
|
|
26400
|
+
}
|
|
26356
26401
|
} else {
|
|
26357
26402
|
wiredCount = outcome.changedFiles.length;
|
|
26358
26403
|
}
|
|
26359
|
-
} else {
|
|
26404
|
+
} else if (approvedEvents.length > 0) {
|
|
26360
26405
|
p4.log.message(`Capture (AI gömemedi → snippet-göster) — şu çağrıları ekle:
|
|
26361
26406
|
${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
26362
26407
|
}
|
|
@@ -26373,9 +26418,9 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
|
|
|
26373
26418
|
}
|
|
26374
26419
|
if (approvedEvents.length > 0) {
|
|
26375
26420
|
lines.push(`✓ ${approvedEvents.length} event planlandı, ${registeredCount} yeni registry kuyruğunda`);
|
|
26376
|
-
if (wiredCount > 0)
|
|
26377
|
-
lines.push(`✓ ${wiredCount} dosya AI ile capture wire edildi`);
|
|
26378
26421
|
}
|
|
26422
|
+
if (wiredCount > 0)
|
|
26423
|
+
lines.push(`✓ ${wiredCount} dosya AI ile wire edildi (capture/LLM/provider)`);
|
|
26379
26424
|
if (featuresResult.registered && featuresResult.selected.length > 0) {
|
|
26380
26425
|
lines.push(`✓ özellikler: ${featuresResult.selected.map((f3) => f3.key).join(", ")} kuruldu`);
|
|
26381
26426
|
}
|
|
@@ -7,6 +7,12 @@ export interface InstallPlanContext {
|
|
|
7
7
|
workspaceId?: string;
|
|
8
8
|
/** Server-side projeler için API key (sk_xxx). */
|
|
9
9
|
apiKey?: string;
|
|
10
|
+
/**
|
|
11
|
+
* "Hata takibi" özelliği seçildiyse browser init snippet'ine
|
|
12
|
+
* `autocapture: { js_error: true }` eklenir (default autocapture kapalı —
|
|
13
|
+
* registry'ye event kurmak yetmez, SDK'da da açılmalı). Sadece browser SDK.
|
|
14
|
+
*/
|
|
15
|
+
autocaptureJsError?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export interface InstallPlan {
|
|
12
18
|
sdk: SdkPackage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-plan.d.ts","sourceRoot":"","sources":["../../src/lib/install-plan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9E,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"install-plan.d.ts","sourceRoot":"","sources":["../../src/lib/install-plan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9E,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,UAAU,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;CACtB;AAmLD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,GAAG,GAAE,kBAAuB,GAC3B,WAAW,CAYb"}
|
package/dist/lib/install-plan.js
CHANGED
|
@@ -23,15 +23,19 @@ function sdkFor(framework) {
|
|
|
23
23
|
return "@gurulu/web";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function autocaptureLine(jsError, indent) {
|
|
27
|
+
return jsError ? `
|
|
28
|
+
${indent}autocapture: { js_error: true }, // hata takibi açık` : "";
|
|
29
|
+
}
|
|
30
|
+
function snippetWeb(workspaceKey, jsError = false) {
|
|
27
31
|
return `import gurulu from '@gurulu/web';
|
|
28
32
|
|
|
29
33
|
gurulu.init({
|
|
30
34
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
31
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io
|
|
35
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
|
|
32
36
|
});`;
|
|
33
37
|
}
|
|
34
|
-
function snippetNext(workspaceKey) {
|
|
38
|
+
function snippetNext(workspaceKey, jsError = false) {
|
|
35
39
|
return `// src/app/gurulu-provider.tsx
|
|
36
40
|
'use client';
|
|
37
41
|
import { useEffect } from 'react';
|
|
@@ -41,7 +45,7 @@ export function GuruluProvider({ children }: { children: React.ReactNode }) {
|
|
|
41
45
|
useEffect(() => {
|
|
42
46
|
gurulu.init({
|
|
43
47
|
workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
|
|
44
|
-
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,
|
|
48
|
+
endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT,${autocaptureLine(jsError, " ")}
|
|
45
49
|
});
|
|
46
50
|
}, []);
|
|
47
51
|
return <>{children}</>;
|
|
@@ -120,7 +124,7 @@ function placementHintFor(framework) {
|
|
|
120
124
|
return "Initialize the SDK at your app entry point.";
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
|
-
function initSnippetFor(framework, sdk, workspaceKey) {
|
|
127
|
+
function initSnippetFor(framework, sdk, workspaceKey, jsError = false) {
|
|
124
128
|
if (sdk === "@gurulu/node") {
|
|
125
129
|
if (framework === "express")
|
|
126
130
|
return snippetExpress();
|
|
@@ -129,8 +133,8 @@ function initSnippetFor(framework, sdk, workspaceKey) {
|
|
|
129
133
|
return snippetNode();
|
|
130
134
|
}
|
|
131
135
|
if (framework === "next")
|
|
132
|
-
return snippetNext(workspaceKey);
|
|
133
|
-
return snippetWeb(workspaceKey);
|
|
136
|
+
return snippetNext(workspaceKey, jsError);
|
|
137
|
+
return snippetWeb(workspaceKey, jsError);
|
|
134
138
|
}
|
|
135
139
|
function envKeysFor(sdk, framework) {
|
|
136
140
|
if (sdk === "@gurulu/node") {
|
|
@@ -156,7 +160,7 @@ function buildInstallPlan(detected, ctx = {}) {
|
|
|
156
160
|
sdk,
|
|
157
161
|
packageManager: detected.packageManager,
|
|
158
162
|
installCommand: installCmdFor(detected.packageManager, sdk),
|
|
159
|
-
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey),
|
|
163
|
+
initSnippet: initSnippetFor(detected.framework, sdk, workspaceKey, ctx.autocaptureJsError),
|
|
160
164
|
envKeys: envKeysFor(sdk, detected.framework),
|
|
161
165
|
placementHint: placementHintFor(detected.framework),
|
|
162
166
|
framework: detected.framework
|
package/dist/wizard/agent.d.ts
CHANGED
|
@@ -17,6 +17,6 @@ export interface ToolDeps {
|
|
|
17
17
|
export declare function executeTool(action: AgentAction, deps: ToolDeps): Promise<ToolResult>;
|
|
18
18
|
/** Wire agent system prompt (commandments) — pure. */
|
|
19
19
|
export declare function buildWireSystemPrompt(): string;
|
|
20
|
-
/** İlk user mesajı — onaylı plan + dosya listesi (pure). */
|
|
21
|
-
export declare function buildWireUserPrompt(events: PlannedEvent[], identifyHint: string | null, files: string[]): string;
|
|
20
|
+
/** İlk user mesajı — onaylı plan + ek görevler + dosya listesi (pure). */
|
|
21
|
+
export declare function buildWireUserPrompt(events: PlannedEvent[], identifyHint: string | null, files: string[], extraTasks?: string[]): string;
|
|
22
22
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/wizard/agent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAuC/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrF;AAuBD,kEAAkE;AAClE,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CA0C1F;AAED,sDAAsD;AACtD,wBAAgB,qBAAqB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/wizard/agent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAuC/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrF;AAuBD,kEAAkE;AAClE,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CA0C1F;AAED,sDAAsD;AACtD,wBAAgB,qBAAqB,IAAI,MAAM,CAmB9C;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,GAAE,MAAM,EAAO,GACxB,MAAM,CA2BR"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiClient } from '../lib/api.ts';
|
|
2
2
|
import { type DetectedProject } from '../lib/detect.ts';
|
|
3
|
-
export type FeatureKey = 'error' | 'llm' | 'activation';
|
|
3
|
+
export type FeatureKey = 'error' | 'heatmap' | 'llm' | 'activation';
|
|
4
4
|
export interface FeatureOption {
|
|
5
5
|
key: FeatureKey;
|
|
6
6
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/wizard/features.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AAG1E,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/wizard/features.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AAG1E,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,aAAa,EAAE,CAqD5E;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAAC,cAAc,CAAC,CAqCzB"}
|
package/dist/wizard/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAiCA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAsBD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAiCA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAsBD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA4RlE"}
|
package/dist/wizard/wire.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface WireInput {
|
|
|
17
17
|
events: PlannedEvent[];
|
|
18
18
|
identifyHint: string | null;
|
|
19
19
|
files: string[];
|
|
20
|
+
/** Feature/inject kaynaklı ek wire görevleri (LLM client sarma · provider mount). */
|
|
21
|
+
extraTasks?: string[];
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Agent döngüsü. `snapshots` (file → pre-edit içerik) revert için doldurulur.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/wizard/wire.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAoB,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI/E,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;CAClD;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/wizard/wire.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAoB,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI/E,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;CAClD;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,OAAO,CAAC,WAAW,CAAC,CAyEtB;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAIlF;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CAiB7F;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQlF"}
|