@gurulu/cli 1.6.4 → 1.6.6

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 CHANGED
@@ -40223,7 +40223,7 @@ var pullCmd = defineCommand({
40223
40223
  });
40224
40224
 
40225
40225
  // src/lib/detect.ts
40226
- import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
40226
+ import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync4 } from "node:fs";
40227
40227
  import { dirname as dirname2, join as join5, parse } from "node:path";
40228
40228
  var COMPETITOR_DEP_MAP = {
40229
40229
  "posthog-js": "posthog",
@@ -40389,11 +40389,51 @@ function detectLlmFrameworks(pkg) {
40389
40389
  }
40390
40390
  return [...found];
40391
40391
  }
40392
+ function expandWorkspaceGlobs(rootDir, patterns) {
40393
+ const out = [];
40394
+ for (const pat of patterns) {
40395
+ if (pat.endsWith("/*")) {
40396
+ const base = join5(rootDir, pat.slice(0, -2));
40397
+ if (!existsSync4(base))
40398
+ continue;
40399
+ try {
40400
+ for (const name of readdirSync2(base)) {
40401
+ const d2 = join5(base, name);
40402
+ if (existsSync4(join5(d2, "package.json")))
40403
+ out.push(d2);
40404
+ }
40405
+ } catch {}
40406
+ } else {
40407
+ const d2 = join5(rootDir, pat);
40408
+ if (existsSync4(join5(d2, "package.json")))
40409
+ out.push(d2);
40410
+ }
40411
+ }
40412
+ return out;
40413
+ }
40414
+ function findWorkspaceFrameworkPackage(rootDir, pkg) {
40415
+ const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces?.packages ?? [];
40416
+ if (patterns.length === 0)
40417
+ return null;
40418
+ let fallback = null;
40419
+ for (const d2 of expandWorkspaceGlobs(rootDir, patterns)) {
40420
+ const p = readPackageJson(d2);
40421
+ if (!p)
40422
+ continue;
40423
+ const fw = detectFramework(p, d2);
40424
+ if (frameworkRuntime(fw) === "browser")
40425
+ return { dir: d2, framework: fw, pkg: p };
40426
+ if (fw !== "unknown" && !fallback)
40427
+ fallback = { dir: d2, framework: fw, pkg: p };
40428
+ }
40429
+ return fallback;
40430
+ }
40392
40431
  function detectProject(dir) {
40393
40432
  const pkg = readPackageJson(dir);
40394
40433
  let framework = detectFramework(pkg, dir);
40395
40434
  const { root, isMonorepo } = findWorkspaceRoot(dir);
40396
40435
  let effectivePkg = pkg;
40436
+ let appDir = dir;
40397
40437
  if (framework === "unknown" && isMonorepo && root !== dir) {
40398
40438
  const rootPkg = readPackageJson(root);
40399
40439
  const rootFw = detectFramework(rootPkg, root);
@@ -40402,19 +40442,28 @@ function detectProject(dir) {
40402
40442
  effectivePkg = pkg ?? rootPkg;
40403
40443
  }
40404
40444
  }
40445
+ if (framework === "unknown" && pkg?.workspaces) {
40446
+ const found = findWorkspaceFrameworkPackage(dir, pkg);
40447
+ if (found) {
40448
+ framework = found.framework;
40449
+ appDir = found.dir;
40450
+ effectivePkg = found.pkg;
40451
+ }
40452
+ }
40405
40453
  return {
40406
40454
  dir,
40407
40455
  hasPackageJson: pkg !== null,
40408
40456
  framework,
40409
40457
  runtime: frameworkRuntime(framework),
40410
40458
  packageManager: detectPackageManager(dir),
40411
- packageJson: pkg,
40412
- llmFrameworks: detectLlmFrameworks(pkg),
40459
+ packageJson: effectivePkg,
40460
+ llmFrameworks: detectLlmFrameworks(effectivePkg),
40413
40461
  moduleType: detectModuleType(effectivePkg),
40414
40462
  rootDir: root,
40463
+ appDir,
40415
40464
  isMonorepo,
40416
- competitors: detectCompetitors(pkg),
40417
- language: detectLanguage(dir)
40465
+ competitors: detectCompetitors(effectivePkg),
40466
+ language: detectLanguage(appDir)
40418
40467
  };
40419
40468
  }
40420
40469
 
@@ -41626,7 +41675,7 @@ function createCheckpoint(cwd, snapshots = new Map) {
41626
41675
  }
41627
41676
 
41628
41677
  // src/wizard/context.ts
41629
- import { readdirSync as readdirSync2, readFileSync as readFileSync9 } from "node:fs";
41678
+ import { readdirSync as readdirSync3, readFileSync as readFileSync9 } from "node:fs";
41630
41679
  import { extname as extname2, join as join10, relative as relative2 } from "node:path";
41631
41680
  var INCLUDE_EXT = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue", ".svelte", ".astro"]);
41632
41681
  var SECRET_PATTERNS = [
@@ -41709,7 +41758,7 @@ function collectCandidates(dir, base, depth, maxDepth, out) {
41709
41758
  return;
41710
41759
  let entries;
41711
41760
  try {
41712
- entries = readdirSync2(dir, { withFileTypes: true });
41761
+ entries = readdirSync3(dir, { withFileTypes: true });
41713
41762
  } catch {
41714
41763
  return;
41715
41764
  }
@@ -42124,6 +42173,16 @@ function buildWireSystemPrompt() {
42124
42173
  ' {"tool": "done", "summary": "<what was wired>"}',
42125
42174
  'Example turn: {"reasoning": "Read entry to find the init call site", "action": {"tool": "read", "path": "src/main.tsx"}}',
42126
42175
  "",
42176
+ "SDK API (@gurulu/web) — use EXACTLY this; NEVER invent import style or option names:",
42177
+ " import gurulu from '@gurulu/web'; // DEFAULT import — NOT `import { gurulu }`",
42178
+ " gurulu.init({ workspaceKey: '<key>' }); // option is `workspaceKey`, NOT `apiKey`",
42179
+ " gurulu.track('event_key', { /* props */ });",
42180
+ " gurulu.identify(userId, { /* traits */ });",
42181
+ "- init() is added ONCE at the app entry. If an init call already exists in the file, NEVER add",
42182
+ ' a second one — do not duplicate or "re-initialize". Your main job is track()/identify()/wrapping.',
42183
+ "- If you must add init, use the EXACT snippet given in the user message verbatim (correct env var + key).",
42184
+ "- Put new imports at the TOP of the file with the other imports, never in the middle of the body.",
42185
+ "",
42127
42186
  "HARD RULES:",
42128
42187
  "- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
42129
42188
  ' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
@@ -42143,8 +42202,11 @@ function buildWireSystemPrompt() {
42143
42202
  ].join(`
42144
42203
  `);
42145
42204
  }
42146
- function buildWireUserPrompt(events, identifyHint, files, extraTasks = []) {
42205
+ function buildWireUserPrompt(events, identifyHint, files, extraTasks = [], initSnippet) {
42147
42206
  const sections = [];
42207
+ if (initSnippet) {
42208
+ sections.push("SDK init snippet (add ONLY if an init call is not already present at the app entry;", "copy it VERBATIM — correct default import, `workspaceKey`, env var and key are already right):", initSnippet, "");
42209
+ }
42148
42210
  if (events.length > 0) {
42149
42211
  const evLines = events.map((e2) => `- ${e2.event_key} (${e2.event_type})${e2.capture_hint ? ` @ ${e2.capture_hint}` : ""}: ${e2.reason}`).join(`
42150
42212
  `);
@@ -42167,7 +42229,7 @@ async function runWireAgent(client, input, snapshots) {
42167
42229
  { role: "system", content: buildWireSystemPrompt() },
42168
42230
  {
42169
42231
  role: "user",
42170
- content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [])
42232
+ content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [], input.initSnippet)
42171
42233
  }
42172
42234
  ];
42173
42235
  const edits = [];
@@ -42352,20 +42414,26 @@ async function runWizard(opts) {
42352
42414
  p4.log.info(c3.dim(`Bu proje zaten bağlı (workspace ${priorConfig.workspace_id.slice(0, 8)}…) — güncelleme / yeni özellik ekleme modu.`));
42353
42415
  }
42354
42416
  const TOTAL = 6;
42355
- const phase = (n2, label) => {
42417
+ const phase = (n2, label, desc) => {
42356
42418
  p4.log.step(`${c3.dim(`[${n2}/${TOTAL}]`)} ${c3.bold(label)}`);
42419
+ if (desc)
42420
+ p4.log.message(c3.dim(desc));
42357
42421
  };
42358
- phase(1, "Kimlik doğrulama");
42422
+ phase(1, "Hesabına bağlanıyoruz", "Gurulu hesabınla güvenli oturum — ilk sefer tarayıcıda bir onay, sonra hatırlanır.");
42359
42423
  const auth = await ensureAuth({
42360
42424
  ...opts.endpoint ? { endpoint: opts.endpoint } : {},
42361
42425
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
42362
42426
  ...opts.workspaceId ? { workspaceId: opts.workspaceId } : {}
42363
42427
  });
42364
42428
  const client = new ApiClient({ endpoint: auth.endpoint, apiKey: auth.apiKey });
42365
- phase(2, "Workspace");
42429
+ phase(2, "Çalışma alanı seçiliyor", "Verilerinin akacağı workspace ayarlanıyor ve site anahtarı üretiliyor.");
42366
42430
  const { workspaceId, writeKey } = await resolveWorkspace(client, auth.workspaceId, opts);
42367
- phase(3, "Proje tespiti & plan");
42431
+ phase(3, "Projeni tanıyoruz", "Kodun okunuyor; hangi kullanıcı olaylarını (ör. kayıt, satın alma) izleyeceğimiz planlanıyor.");
42368
42432
  const detected = detectProject(opts.cwd);
42433
+ if (detected.appDir !== opts.cwd) {
42434
+ p4.log.info(c3.dim(`Monorepo: kurulum ${detected.framework} app'ine → ${detected.appDir}`));
42435
+ opts.cwd = detected.appDir;
42436
+ }
42369
42437
  let framework = detected.framework;
42370
42438
  if (opts.framework && FRAMEWORKS.includes(opts.framework)) {
42371
42439
  framework = opts.framework;
@@ -42434,7 +42502,7 @@ async function runWizard(opts) {
42434
42502
  });
42435
42503
  const isNode = plan.sdk === "@gurulu/node";
42436
42504
  const checkpoint = opts.autonomous ? createCheckpoint(opts.cwd) : null;
42437
- phase(4, "SDK kurulumu");
42505
+ phase(4, "SDK ekleniyor", "Ölçüm kütüphanesi (@gurulu/web) projene kuruluyor.");
42438
42506
  let installed = false;
42439
42507
  if (opts.noInstall) {
42440
42508
  p4.log.info(`SDK kurulumu atlandı — elle: ${plan.installCommand}`);
@@ -42460,7 +42528,7 @@ async function runWizard(opts) {
42460
42528
  s2.stop(`Kurulum başarısız (geri alındı) — elle çalıştır: ${plan.installCommand}`, 1);
42461
42529
  }
42462
42530
  }
42463
- phase(5, "Kod & env wiring");
42531
+ phase(5, "Koduna bağlanıyor", "SDK kodun içine otomatik yerleştiriliyor ve ayarlar (.env) yazılıyor.");
42464
42532
  const activationSelected = featuresResult.selected.some((f3) => f3.key === "activation");
42465
42533
  const inj = applyInjection({
42466
42534
  cwd: opts.cwd,
@@ -42507,7 +42575,7 @@ async function runWizard(opts) {
42507
42575
  endpoint: auth.endpoint,
42508
42576
  sdkPref: isNode ? "node" : "web"
42509
42577
  });
42510
- phase(6, "Registry & rapor");
42578
+ phase(6, "Kaydediliyor & özet", "Olay tanımların kaydediliyor, kurulum doğrulanıyor ve özet çıkarılıyor.");
42511
42579
  let pulled = false;
42512
42580
  if (!opts.noPull) {
42513
42581
  try {
@@ -42536,7 +42604,14 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
42536
42604
  const snapshots = new Map;
42537
42605
  const s2 = p4.spinner();
42538
42606
  s2.start("AI capture wiring (kod düzenleniyor)…");
42539
- const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles, extraTasks }, snapshots);
42607
+ const outcome = await runWireAgent(client, {
42608
+ cwd: opts.cwd,
42609
+ events: approvedEvents,
42610
+ identifyHint,
42611
+ files: wireFiles,
42612
+ extraTasks,
42613
+ initSnippet: inj.strategy === "manual" ? plan.initSnippet : undefined
42614
+ }, snapshots);
42540
42615
  s2.stop(`wire: ${outcome.changedFiles.length} dosya / ${outcome.steps} adım (${outcome.stoppedReason})`);
42541
42616
  if (outcome.changedFiles.length > 0) {
42542
42617
  p4.log.message(formatWireDiff(opts.cwd, snapshots));
@@ -43111,7 +43186,7 @@ var uninstallCmd = defineCommand({
43111
43186
  });
43112
43187
 
43113
43188
  // src/index.ts
43114
- var VERSION = "1.6.4";
43189
+ var VERSION = "1.6.6";
43115
43190
  var mainCmd = defineCommand({
43116
43191
  meta: {
43117
43192
  name: "gurulu",
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "1.6.4";
1
+ export declare const VERSION = "1.6.6";
2
2
  declare const mainCmd: import("citty").CommandDef<{
3
3
  workspace: {
4
4
  type: "string";
package/dist/index.js CHANGED
@@ -39800,7 +39800,7 @@ var pullCmd = defineCommand({
39800
39800
  });
39801
39801
 
39802
39802
  // src/lib/detect.ts
39803
- import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
39803
+ import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync4 } from "node:fs";
39804
39804
  import { dirname as dirname2, join as join5, parse } from "node:path";
39805
39805
  var COMPETITOR_DEP_MAP = {
39806
39806
  "posthog-js": "posthog",
@@ -39966,11 +39966,51 @@ function detectLlmFrameworks(pkg) {
39966
39966
  }
39967
39967
  return [...found];
39968
39968
  }
39969
+ function expandWorkspaceGlobs(rootDir, patterns) {
39970
+ const out = [];
39971
+ for (const pat of patterns) {
39972
+ if (pat.endsWith("/*")) {
39973
+ const base = join5(rootDir, pat.slice(0, -2));
39974
+ if (!existsSync4(base))
39975
+ continue;
39976
+ try {
39977
+ for (const name of readdirSync2(base)) {
39978
+ const d2 = join5(base, name);
39979
+ if (existsSync4(join5(d2, "package.json")))
39980
+ out.push(d2);
39981
+ }
39982
+ } catch {}
39983
+ } else {
39984
+ const d2 = join5(rootDir, pat);
39985
+ if (existsSync4(join5(d2, "package.json")))
39986
+ out.push(d2);
39987
+ }
39988
+ }
39989
+ return out;
39990
+ }
39991
+ function findWorkspaceFrameworkPackage(rootDir, pkg) {
39992
+ const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces?.packages ?? [];
39993
+ if (patterns.length === 0)
39994
+ return null;
39995
+ let fallback = null;
39996
+ for (const d2 of expandWorkspaceGlobs(rootDir, patterns)) {
39997
+ const p = readPackageJson(d2);
39998
+ if (!p)
39999
+ continue;
40000
+ const fw = detectFramework(p, d2);
40001
+ if (frameworkRuntime(fw) === "browser")
40002
+ return { dir: d2, framework: fw, pkg: p };
40003
+ if (fw !== "unknown" && !fallback)
40004
+ fallback = { dir: d2, framework: fw, pkg: p };
40005
+ }
40006
+ return fallback;
40007
+ }
39969
40008
  function detectProject(dir) {
39970
40009
  const pkg = readPackageJson(dir);
39971
40010
  let framework = detectFramework(pkg, dir);
39972
40011
  const { root, isMonorepo } = findWorkspaceRoot(dir);
39973
40012
  let effectivePkg = pkg;
40013
+ let appDir = dir;
39974
40014
  if (framework === "unknown" && isMonorepo && root !== dir) {
39975
40015
  const rootPkg = readPackageJson(root);
39976
40016
  const rootFw = detectFramework(rootPkg, root);
@@ -39979,19 +40019,28 @@ function detectProject(dir) {
39979
40019
  effectivePkg = pkg ?? rootPkg;
39980
40020
  }
39981
40021
  }
40022
+ if (framework === "unknown" && pkg?.workspaces) {
40023
+ const found = findWorkspaceFrameworkPackage(dir, pkg);
40024
+ if (found) {
40025
+ framework = found.framework;
40026
+ appDir = found.dir;
40027
+ effectivePkg = found.pkg;
40028
+ }
40029
+ }
39982
40030
  return {
39983
40031
  dir,
39984
40032
  hasPackageJson: pkg !== null,
39985
40033
  framework,
39986
40034
  runtime: frameworkRuntime(framework),
39987
40035
  packageManager: detectPackageManager(dir),
39988
- packageJson: pkg,
39989
- llmFrameworks: detectLlmFrameworks(pkg),
40036
+ packageJson: effectivePkg,
40037
+ llmFrameworks: detectLlmFrameworks(effectivePkg),
39990
40038
  moduleType: detectModuleType(effectivePkg),
39991
40039
  rootDir: root,
40040
+ appDir,
39992
40041
  isMonorepo,
39993
- competitors: detectCompetitors(pkg),
39994
- language: detectLanguage(dir)
40042
+ competitors: detectCompetitors(effectivePkg),
40043
+ language: detectLanguage(appDir)
39995
40044
  };
39996
40045
  }
39997
40046
 
@@ -41203,7 +41252,7 @@ function createCheckpoint(cwd, snapshots = new Map) {
41203
41252
  }
41204
41253
 
41205
41254
  // src/wizard/context.ts
41206
- import { readdirSync as readdirSync2, readFileSync as readFileSync9 } from "node:fs";
41255
+ import { readdirSync as readdirSync3, readFileSync as readFileSync9 } from "node:fs";
41207
41256
  import { extname as extname2, join as join10, relative as relative2 } from "node:path";
41208
41257
  var INCLUDE_EXT = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue", ".svelte", ".astro"]);
41209
41258
  var SECRET_PATTERNS = [
@@ -41286,7 +41335,7 @@ function collectCandidates(dir, base, depth, maxDepth, out) {
41286
41335
  return;
41287
41336
  let entries;
41288
41337
  try {
41289
- entries = readdirSync2(dir, { withFileTypes: true });
41338
+ entries = readdirSync3(dir, { withFileTypes: true });
41290
41339
  } catch {
41291
41340
  return;
41292
41341
  }
@@ -41701,6 +41750,16 @@ function buildWireSystemPrompt() {
41701
41750
  ' {"tool": "done", "summary": "<what was wired>"}',
41702
41751
  'Example turn: {"reasoning": "Read entry to find the init call site", "action": {"tool": "read", "path": "src/main.tsx"}}',
41703
41752
  "",
41753
+ "SDK API (@gurulu/web) — use EXACTLY this; NEVER invent import style or option names:",
41754
+ " import gurulu from '@gurulu/web'; // DEFAULT import — NOT `import { gurulu }`",
41755
+ " gurulu.init({ workspaceKey: '<key>' }); // option is `workspaceKey`, NOT `apiKey`",
41756
+ " gurulu.track('event_key', { /* props */ });",
41757
+ " gurulu.identify(userId, { /* traits */ });",
41758
+ "- init() is added ONCE at the app entry. If an init call already exists in the file, NEVER add",
41759
+ ' a second one — do not duplicate or "re-initialize". Your main job is track()/identify()/wrapping.',
41760
+ "- If you must add init, use the EXACT snippet given in the user message verbatim (correct env var + key).",
41761
+ "- Put new imports at the TOP of the file with the other imports, never in the middle of the body.",
41762
+ "",
41704
41763
  "HARD RULES:",
41705
41764
  "- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
41706
41765
  ' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
@@ -41720,8 +41779,11 @@ function buildWireSystemPrompt() {
41720
41779
  ].join(`
41721
41780
  `);
41722
41781
  }
41723
- function buildWireUserPrompt(events, identifyHint, files, extraTasks = []) {
41782
+ function buildWireUserPrompt(events, identifyHint, files, extraTasks = [], initSnippet) {
41724
41783
  const sections = [];
41784
+ if (initSnippet) {
41785
+ sections.push("SDK init snippet (add ONLY if an init call is not already present at the app entry;", "copy it VERBATIM — correct default import, `workspaceKey`, env var and key are already right):", initSnippet, "");
41786
+ }
41725
41787
  if (events.length > 0) {
41726
41788
  const evLines = events.map((e2) => `- ${e2.event_key} (${e2.event_type})${e2.capture_hint ? ` @ ${e2.capture_hint}` : ""}: ${e2.reason}`).join(`
41727
41789
  `);
@@ -41744,7 +41806,7 @@ async function runWireAgent(client, input, snapshots) {
41744
41806
  { role: "system", content: buildWireSystemPrompt() },
41745
41807
  {
41746
41808
  role: "user",
41747
- content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [])
41809
+ content: buildWireUserPrompt(input.events, input.identifyHint, input.files, input.extraTasks ?? [], input.initSnippet)
41748
41810
  }
41749
41811
  ];
41750
41812
  const edits = [];
@@ -41929,20 +41991,26 @@ async function runWizard(opts) {
41929
41991
  p4.log.info(c3.dim(`Bu proje zaten bağlı (workspace ${priorConfig.workspace_id.slice(0, 8)}…) — güncelleme / yeni özellik ekleme modu.`));
41930
41992
  }
41931
41993
  const TOTAL = 6;
41932
- const phase = (n2, label) => {
41994
+ const phase = (n2, label, desc) => {
41933
41995
  p4.log.step(`${c3.dim(`[${n2}/${TOTAL}]`)} ${c3.bold(label)}`);
41996
+ if (desc)
41997
+ p4.log.message(c3.dim(desc));
41934
41998
  };
41935
- phase(1, "Kimlik doğrulama");
41999
+ phase(1, "Hesabına bağlanıyoruz", "Gurulu hesabınla güvenli oturum — ilk sefer tarayıcıda bir onay, sonra hatırlanır.");
41936
42000
  const auth = await ensureAuth({
41937
42001
  ...opts.endpoint ? { endpoint: opts.endpoint } : {},
41938
42002
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
41939
42003
  ...opts.workspaceId ? { workspaceId: opts.workspaceId } : {}
41940
42004
  });
41941
42005
  const client = new ApiClient({ endpoint: auth.endpoint, apiKey: auth.apiKey });
41942
- phase(2, "Workspace");
42006
+ phase(2, "Çalışma alanı seçiliyor", "Verilerinin akacağı workspace ayarlanıyor ve site anahtarı üretiliyor.");
41943
42007
  const { workspaceId, writeKey } = await resolveWorkspace(client, auth.workspaceId, opts);
41944
- phase(3, "Proje tespiti & plan");
42008
+ phase(3, "Projeni tanıyoruz", "Kodun okunuyor; hangi kullanıcı olaylarını (ör. kayıt, satın alma) izleyeceğimiz planlanıyor.");
41945
42009
  const detected = detectProject(opts.cwd);
42010
+ if (detected.appDir !== opts.cwd) {
42011
+ p4.log.info(c3.dim(`Monorepo: kurulum ${detected.framework} app'ine → ${detected.appDir}`));
42012
+ opts.cwd = detected.appDir;
42013
+ }
41946
42014
  let framework = detected.framework;
41947
42015
  if (opts.framework && FRAMEWORKS.includes(opts.framework)) {
41948
42016
  framework = opts.framework;
@@ -42011,7 +42079,7 @@ async function runWizard(opts) {
42011
42079
  });
42012
42080
  const isNode = plan.sdk === "@gurulu/node";
42013
42081
  const checkpoint = opts.autonomous ? createCheckpoint(opts.cwd) : null;
42014
- phase(4, "SDK kurulumu");
42082
+ phase(4, "SDK ekleniyor", "Ölçüm kütüphanesi (@gurulu/web) projene kuruluyor.");
42015
42083
  let installed = false;
42016
42084
  if (opts.noInstall) {
42017
42085
  p4.log.info(`SDK kurulumu atlandı — elle: ${plan.installCommand}`);
@@ -42037,7 +42105,7 @@ async function runWizard(opts) {
42037
42105
  s2.stop(`Kurulum başarısız (geri alındı) — elle çalıştır: ${plan.installCommand}`, 1);
42038
42106
  }
42039
42107
  }
42040
- phase(5, "Kod & env wiring");
42108
+ phase(5, "Koduna bağlanıyor", "SDK kodun içine otomatik yerleştiriliyor ve ayarlar (.env) yazılıyor.");
42041
42109
  const activationSelected = featuresResult.selected.some((f3) => f3.key === "activation");
42042
42110
  const inj = applyInjection({
42043
42111
  cwd: opts.cwd,
@@ -42084,7 +42152,7 @@ async function runWizard(opts) {
42084
42152
  endpoint: auth.endpoint,
42085
42153
  sdkPref: isNode ? "node" : "web"
42086
42154
  });
42087
- phase(6, "Registry & rapor");
42155
+ phase(6, "Kaydediliyor & özet", "Olay tanımların kaydediliyor, kurulum doğrulanıyor ve özet çıkarılıyor.");
42088
42156
  let pulled = false;
42089
42157
  if (!opts.noPull) {
42090
42158
  try {
@@ -42113,7 +42181,14 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
42113
42181
  const snapshots = new Map;
42114
42182
  const s2 = p4.spinner();
42115
42183
  s2.start("AI capture wiring (kod düzenleniyor)…");
42116
- const outcome = await runWireAgent(client, { cwd: opts.cwd, events: approvedEvents, identifyHint, files: wireFiles, extraTasks }, snapshots);
42184
+ const outcome = await runWireAgent(client, {
42185
+ cwd: opts.cwd,
42186
+ events: approvedEvents,
42187
+ identifyHint,
42188
+ files: wireFiles,
42189
+ extraTasks,
42190
+ initSnippet: inj.strategy === "manual" ? plan.initSnippet : undefined
42191
+ }, snapshots);
42117
42192
  s2.stop(`wire: ${outcome.changedFiles.length} dosya / ${outcome.steps} adım (${outcome.stoppedReason})`);
42118
42193
  if (outcome.changedFiles.length > 0) {
42119
42194
  p4.log.message(formatWireDiff(opts.cwd, snapshots));
@@ -42688,7 +42763,7 @@ var uninstallCmd = defineCommand({
42688
42763
  });
42689
42764
 
42690
42765
  // src/index.ts
42691
- var VERSION = "1.6.4";
42766
+ var VERSION = "1.6.6";
42692
42767
  var mainCmd = defineCommand({
42693
42768
  meta: {
42694
42769
  name: "gurulu",
@@ -22,6 +22,12 @@ export interface DetectedProject {
22
22
  moduleType: ModuleType;
23
23
  /** Workspace root (lockfile dizini); cwd ile aynıysa monorepo değil. */
24
24
  rootDir: string;
25
+ /**
26
+ * Framework app'inin gerçek dizini. Genelde = dir; ama monorepo ROOT'unda
27
+ * çalışıp framework bir alt-pakette (ör. apps/dashboard) ise o alt-paket dizini.
28
+ * `.env` + kod-wire + SDK install BURAYA hedeflenir (root'a değil).
29
+ */
30
+ appDir: string;
25
31
  /** cwd bir monorepo paketi mi (root farklı + workspaces sinyali). */
26
32
  isMonorepo: boolean;
27
33
  /** Tespit edilen rakip analytics SDK'ları (augmentation/twin için, boş = yok). */
@@ -1 +1 @@
1
- {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/lib/detect.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GAC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F;IAClF,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACjD;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,GAAG,UAAU,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CA0BpF;AAiBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAchE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAmBpF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,SAAS,GAAG,OAAO,CAmBvD;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,GAAG,YAAY,EAAE,CAMhF;AAgDD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CA6C1D"}
@@ -1,5 +1,5 @@
1
1
  // src/lib/detect.ts
2
- import { existsSync, readFileSync } from "node:fs";
2
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
3
3
  import { dirname, join, parse } from "node:path";
4
4
  var COMPETITOR_DEP_MAP = {
5
5
  "posthog-js": "posthog",
@@ -165,11 +165,51 @@ function detectLlmFrameworks(pkg) {
165
165
  }
166
166
  return [...found];
167
167
  }
168
+ function expandWorkspaceGlobs(rootDir, patterns) {
169
+ const out = [];
170
+ for (const pat of patterns) {
171
+ if (pat.endsWith("/*")) {
172
+ const base = join(rootDir, pat.slice(0, -2));
173
+ if (!existsSync(base))
174
+ continue;
175
+ try {
176
+ for (const name of readdirSync(base)) {
177
+ const d = join(base, name);
178
+ if (existsSync(join(d, "package.json")))
179
+ out.push(d);
180
+ }
181
+ } catch {}
182
+ } else {
183
+ const d = join(rootDir, pat);
184
+ if (existsSync(join(d, "package.json")))
185
+ out.push(d);
186
+ }
187
+ }
188
+ return out;
189
+ }
190
+ function findWorkspaceFrameworkPackage(rootDir, pkg) {
191
+ const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces?.packages ?? [];
192
+ if (patterns.length === 0)
193
+ return null;
194
+ let fallback = null;
195
+ for (const d of expandWorkspaceGlobs(rootDir, patterns)) {
196
+ const p = readPackageJson(d);
197
+ if (!p)
198
+ continue;
199
+ const fw = detectFramework(p, d);
200
+ if (frameworkRuntime(fw) === "browser")
201
+ return { dir: d, framework: fw, pkg: p };
202
+ if (fw !== "unknown" && !fallback)
203
+ fallback = { dir: d, framework: fw, pkg: p };
204
+ }
205
+ return fallback;
206
+ }
168
207
  function detectProject(dir) {
169
208
  const pkg = readPackageJson(dir);
170
209
  let framework = detectFramework(pkg, dir);
171
210
  const { root, isMonorepo } = findWorkspaceRoot(dir);
172
211
  let effectivePkg = pkg;
212
+ let appDir = dir;
173
213
  if (framework === "unknown" && isMonorepo && root !== dir) {
174
214
  const rootPkg = readPackageJson(root);
175
215
  const rootFw = detectFramework(rootPkg, root);
@@ -178,19 +218,28 @@ function detectProject(dir) {
178
218
  effectivePkg = pkg ?? rootPkg;
179
219
  }
180
220
  }
221
+ if (framework === "unknown" && pkg?.workspaces) {
222
+ const found = findWorkspaceFrameworkPackage(dir, pkg);
223
+ if (found) {
224
+ framework = found.framework;
225
+ appDir = found.dir;
226
+ effectivePkg = found.pkg;
227
+ }
228
+ }
181
229
  return {
182
230
  dir,
183
231
  hasPackageJson: pkg !== null,
184
232
  framework,
185
233
  runtime: frameworkRuntime(framework),
186
234
  packageManager: detectPackageManager(dir),
187
- packageJson: pkg,
188
- llmFrameworks: detectLlmFrameworks(pkg),
235
+ packageJson: effectivePkg,
236
+ llmFrameworks: detectLlmFrameworks(effectivePkg),
189
237
  moduleType: detectModuleType(effectivePkg),
190
238
  rootDir: root,
239
+ appDir,
191
240
  isMonorepo,
192
- competitors: detectCompetitors(pkg),
193
- language: detectLanguage(dir)
241
+ competitors: detectCompetitors(effectivePkg),
242
+ language: detectLanguage(appDir)
194
243
  };
195
244
  }
196
245
  export {
@@ -18,5 +18,5 @@ export declare function executeTool(action: AgentAction, deps: ToolDeps): Promis
18
18
  /** Wire agent system prompt (commandments) — pure. */
19
19
  export declare function buildWireSystemPrompt(): string;
20
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;
21
+ export declare function buildWireUserPrompt(events: PlannedEvent[], identifyHint: string | null, files: string[], extraTasks?: string[], initSnippet?: 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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AqB,IAAI,MAAM,CAyC9C;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,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAmCR"}
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAuCA,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;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA0DD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwclE"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAuCA,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;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA0DD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwdlE"}
@@ -21,6 +21,8 @@ export interface WireInput {
21
21
  files: string[];
22
22
  /** Feature/inject kaynaklı ek wire görevleri (LLM client sarma · provider mount). */
23
23
  extraTasks?: string[];
24
+ /** Doğru gurulu.init() snippet'i — AI'ın init API'sini uydurmasını engeller. */
25
+ initSnippet?: string;
24
26
  }
25
27
  /**
26
28
  * 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;AAC5B,kFAAkF;AAClF,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,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,GAAG,aAAa,CAAC;CAClE;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,YAA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aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;CAClE;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;IACtB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;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,CAyFtB;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurulu/cli",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "private": false,
5
5
  "license": "BUSL-1.1",
6
6
  "publishConfig": {