@gurulu/cli 1.6.3 → 1.6.4

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
@@ -41729,12 +41729,14 @@ function readTruncated(abs, maxBytes) {
41729
41729
  const raw = redactSecrets(readFileSync9(abs, "utf-8"));
41730
41730
  if (raw.length <= maxBytes)
41731
41731
  return { content: raw, truncated: false };
41732
- const head = Math.floor(maxBytes * 0.65);
41733
- const tail = maxBytes - head;
41734
- return {
41735
- content: `${raw.slice(0, head)}
41732
+ const marker = `
41736
41733
  /* …${raw.length - maxBytes} char kesildi… */
41737
- ${raw.slice(-tail)}`,
41734
+ `;
41735
+ const budget = Math.max(0, maxBytes - marker.length);
41736
+ const head = Math.floor(budget * 0.65);
41737
+ const tail = budget - head;
41738
+ return {
41739
+ content: `${raw.slice(0, head)}${marker}${tail > 0 ? raw.slice(-tail) : ""}`,
41738
41740
  truncated: true
41739
41741
  };
41740
41742
  } catch {
@@ -42112,7 +42114,16 @@ function buildWireSystemPrompt() {
42112
42114
  return [
42113
42115
  "You are Gurulu's capture wire agent. Add the approved analytics events to the user's code,",
42114
42116
  "plus any additional wiring tasks given (e.g. wrapping an LLM client, mounting a provider).",
42115
- "Tools (one JSON action per turn): read{path} | edit{path,find,replace} | bash{cmd} | done{summary}.",
42117
+ "",
42118
+ "OUTPUT: respond with ONLY a single JSON object per turn — no prose, no markdown fences,",
42119
+ 'no <think> blocks. Exact shape: {"reasoning": "<short why>", "action": <one action below>}',
42120
+ "action is exactly one of:",
42121
+ ' {"tool": "read", "path": "src/file.ts"}',
42122
+ ' {"tool": "edit", "path": "src/file.ts", "find": "<exact unique existing snippet>", "replace": "<that snippet plus added code>"}',
42123
+ ' {"tool": "bash", "cmd": "npm run typecheck"}',
42124
+ ' {"tool": "done", "summary": "<what was wired>"}',
42125
+ 'Example turn: {"reasoning": "Read entry to find the init call site", "action": {"tool": "read", "path": "src/main.tsx"}}',
42126
+ "",
42116
42127
  "HARD RULES:",
42117
42128
  "- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
42118
42129
  ' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
@@ -43100,7 +43111,7 @@ var uninstallCmd = defineCommand({
43100
43111
  });
43101
43112
 
43102
43113
  // src/index.ts
43103
- var VERSION = "1.6.3";
43114
+ var VERSION = "1.6.4";
43104
43115
  var mainCmd = defineCommand({
43105
43116
  meta: {
43106
43117
  name: "gurulu",
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "1.6.3";
1
+ export declare const VERSION = "1.6.4";
2
2
  declare const mainCmd: import("citty").CommandDef<{
3
3
  workspace: {
4
4
  type: "string";
package/dist/index.js CHANGED
@@ -41306,12 +41306,14 @@ function readTruncated(abs, maxBytes) {
41306
41306
  const raw = redactSecrets(readFileSync9(abs, "utf-8"));
41307
41307
  if (raw.length <= maxBytes)
41308
41308
  return { content: raw, truncated: false };
41309
- const head = Math.floor(maxBytes * 0.65);
41310
- const tail = maxBytes - head;
41311
- return {
41312
- content: `${raw.slice(0, head)}
41309
+ const marker = `
41313
41310
  /* …${raw.length - maxBytes} char kesildi… */
41314
- ${raw.slice(-tail)}`,
41311
+ `;
41312
+ const budget = Math.max(0, maxBytes - marker.length);
41313
+ const head = Math.floor(budget * 0.65);
41314
+ const tail = budget - head;
41315
+ return {
41316
+ content: `${raw.slice(0, head)}${marker}${tail > 0 ? raw.slice(-tail) : ""}`,
41315
41317
  truncated: true
41316
41318
  };
41317
41319
  } catch {
@@ -41689,7 +41691,16 @@ function buildWireSystemPrompt() {
41689
41691
  return [
41690
41692
  "You are Gurulu's capture wire agent. Add the approved analytics events to the user's code,",
41691
41693
  "plus any additional wiring tasks given (e.g. wrapping an LLM client, mounting a provider).",
41692
- "Tools (one JSON action per turn): read{path} | edit{path,find,replace} | bash{cmd} | done{summary}.",
41694
+ "",
41695
+ "OUTPUT: respond with ONLY a single JSON object per turn — no prose, no markdown fences,",
41696
+ 'no <think> blocks. Exact shape: {"reasoning": "<short why>", "action": <one action below>}',
41697
+ "action is exactly one of:",
41698
+ ' {"tool": "read", "path": "src/file.ts"}',
41699
+ ' {"tool": "edit", "path": "src/file.ts", "find": "<exact unique existing snippet>", "replace": "<that snippet plus added code>"}',
41700
+ ' {"tool": "bash", "cmd": "npm run typecheck"}',
41701
+ ' {"tool": "done", "summary": "<what was wired>"}',
41702
+ 'Example turn: {"reasoning": "Read entry to find the init call site", "action": {"tool": "read", "path": "src/main.tsx"}}',
41703
+ "",
41693
41704
  "HARD RULES:",
41694
41705
  "- ADDITIVE-ONLY: every edit `replace` MUST contain `find` verbatim — you may only ADD code,",
41695
41706
  ' never delete or rewrite existing code. Edits violating this are rejected. To "wrap" an existing',
@@ -42677,7 +42688,7 @@ var uninstallCmd = defineCommand({
42677
42688
  });
42678
42689
 
42679
42690
  // src/index.ts
42680
- var VERSION = "1.6.3";
42691
+ var VERSION = "1.6.4";
42681
42692
  var mainCmd = defineCommand({
42682
42693
  meta: {
42683
42694
  name: "gurulu",
@@ -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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,CA2BR"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/wizard/context.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAsBD,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWrD;AAqGD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,CAwC9D"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/wizard/context.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAsBD,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWrD;AAyGD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,CAwC9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurulu/cli",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "private": false,
5
5
  "license": "BUSL-1.1",
6
6
  "publishConfig": {