@pikaa-ai/pikaa 0.3.12 → 0.3.14

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 CHANGED
@@ -1028,6 +1028,17 @@ async function runTurn(session, turnContext, input) {
1028
1028
  }
1029
1029
  continue;
1030
1030
  }
1031
+ if (!currentAgentText.trim() && toolCallRequests.length === 0) {
1032
+ if (iteration === 1 && iteration < turnContext.maxIterations) {
1033
+ session.addHistoryItem({
1034
+ id: `msg_nudge_${Date.now()}`,
1035
+ type: "user_message",
1036
+ content: "Please proceed with executing the task. Provide your complete analysis or call the required tools now.",
1037
+ createdAt: Date.now()
1038
+ });
1039
+ continue;
1040
+ }
1041
+ }
1031
1042
  break;
1032
1043
  }
1033
1044
  const totalContextTokens = estimateTotalTokens(session.getHistory()) + Math.ceil(effectiveSystemPrompt.length / 4);
@@ -6043,7 +6054,7 @@ function parsePatch(oldSrc, newSrc, contextLines = 3) {
6043
6054
  // package.json
6044
6055
  var package_default = {
6045
6056
  name: "@pikaa-ai/pikaa",
6046
- version: "0.3.12",
6057
+ version: "0.3.14",
6047
6058
  description: "PIKAA CLI - AI coding agent that runs locally in your terminal.",
6048
6059
  main: "./dist/index.js",
6049
6060
  module: "./dist/index.js",
@@ -8294,8 +8305,15 @@ async function handleSlashCommand(input, ctx) {
8294
8305
  `);
8295
8306
  return true;
8296
8307
  case "/init":
8297
- const initResult = runProjectInit({ cwd: ctx.session.cwd });
8298
- printInitSummary(initResult);
8308
+ console.log(`
8309
+ \x1B[38;2;217;119;87m\u2733 Initializing project instructions via AI agent...\x1B[0m
8310
+ `);
8311
+ if (ctx.repl) {
8312
+ await ctx.repl.submitTurn("Analyze this codebase and create or update the AGENTS.md project instruction file in the workspace root following Claude Code best practices. Inspect key config files (package.json, tsconfig, etc.), test/build scripts, and main source directories to discover exact development commands, architectural conventions, and workflow requirements. Write the finalized AGENTS.md using the write_file tool.");
8313
+ } else {
8314
+ const initResult = runProjectInit({ cwd: ctx.session.cwd });
8315
+ printInitSummary(initResult);
8316
+ }
8299
8317
  return true;
8300
8318
  case "/agents":
8301
8319
  printAgents(ctx);
@@ -9946,24 +9964,27 @@ class CliRepl {
9946
9964
  continue;
9947
9965
  }
9948
9966
  }
9949
- try {
9950
- const turnPromise = new Promise((resolve21) => {
9951
- this.turnDoneResolver = resolve21;
9952
- });
9953
- await this.session.submit({
9954
- type: "TurnInput",
9955
- request: {
9956
- text: line
9957
- }
9958
- });
9959
- await turnPromise;
9960
- } catch (err) {
9961
- console.error(style.red(`Failed to submit turn: ${err instanceof Error ? err.message : String(err)}
9962
- `));
9963
- }
9967
+ await this.submitTurn(line);
9964
9968
  }
9965
9969
  await this.close();
9966
9970
  }
9971
+ async submitTurn(text) {
9972
+ try {
9973
+ const turnPromise = new Promise((resolve21) => {
9974
+ this.turnDoneResolver = resolve21;
9975
+ });
9976
+ await this.session.submit({
9977
+ type: "TurnInput",
9978
+ request: {
9979
+ text
9980
+ }
9981
+ });
9982
+ await turnPromise;
9983
+ } catch (err) {
9984
+ console.error(style.red(`Failed to submit turn: ${err instanceof Error ? err.message : String(err)}
9985
+ `));
9986
+ }
9987
+ }
9967
9988
  async close() {
9968
9989
  if (this.isClosed)
9969
9990
  return;
package/dist/index.js CHANGED
@@ -4024,6 +4024,17 @@ async function runTurn(session, turnContext, input) {
4024
4024
  }
4025
4025
  continue;
4026
4026
  }
4027
+ if (!currentAgentText.trim() && toolCallRequests.length === 0) {
4028
+ if (iteration === 1 && iteration < turnContext.maxIterations) {
4029
+ session.addHistoryItem({
4030
+ id: `msg_nudge_${Date.now()}`,
4031
+ type: "user_message",
4032
+ content: "Please proceed with executing the task. Provide your complete analysis or call the required tools now.",
4033
+ createdAt: Date.now()
4034
+ });
4035
+ continue;
4036
+ }
4037
+ }
4027
4038
  break;
4028
4039
  }
4029
4040
  const totalContextTokens = estimateTotalTokens(session.getHistory()) + Math.ceil(effectiveSystemPrompt.length / 4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikaa-ai/pikaa",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "PIKAA CLI - AI coding agent that runs locally in your terminal.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -3,6 +3,8 @@ You are Groupy, an expert autonomous AI coding assistant. You are running as a c
3
3
  ## General
4
4
 
5
5
  - When searching for text or files, prefer using `grep_search` and `find_files`.
6
+ - **NEVER generate an empty response.** Every turn must either execute the appropriate tools or output a helpful, substantive message.
7
+ - When the user confirms or gives approval (e.g., "ya lakukan audit", "lanjutkan", "ok", "1"), **IMMEDIATELY start executing the tools** (`read_file`, `list_dir`, `grep_search`, `shell`) in the same turn without hesitation.
6
8
 
7
9
  ## Editing constraints
8
10
 
@@ -45,6 +47,12 @@ You are Groupy, an expert autonomous AI coding assistant. You are running as a c
45
47
  - Place your best technical recommendation as Option 1 prefixed with `(Recommended)`.
46
48
  - Keep options concise so the user can reply instantly with a single number.
47
49
 
50
+ 4. **Read-Only Questions, Audits & Technical Opinions ("apakah X sudah Y?", "kenapa Z?", "analisis UI/performa/keamanan")**:
51
+ - **NEVER pause or ask permission to perform read-only inspection or audits.**
52
+ - Proactively read and inspect the relevant components, styles, breakpoints, and logic (`read_file`, `grep_search`) immediately in the same turn.
53
+ - Deliver a definitive, evidence-backed answer upfront with specific code references.
54
+ - Do NOT ask "Do you want me to audit X?". Perform the investigation directly, state your conclusion, and only then offer implementation next steps.
55
+
48
56
  ## Codebase Discovery & Execution Strategy
49
57
 
50
58
  0. **Project Instructions Precedence (`AGENTS.md` / `CLAUDE.md`)**:
@@ -56,13 +64,17 @@ You are Groupy, an expert autonomous AI coding assistant. You are running as a c
56
64
  - Deliver a concise Architecture Overview (Tech stack, folder hierarchy, main entry points).
57
65
  - Do NOT read full component or implementation files during initial reconnaissance. Stop and ask the user what to build or investigate next.
58
66
 
59
- 2. **Direct Feature Requests ("buat fitur X")**:
67
+ 2. **Technical Audits & Evaluation Requests ("apakah UI sudah responsive?", "review arsitektur X")**:
68
+ - Proactively inspect the key components and style rules right away.
69
+ - Deliver the concrete findings directly (e.g. which elements break on mobile, missing breakpoints, overflow issues) with clear recommendations.
70
+
71
+ 3. **Direct Feature Requests ("buat fitur X")**:
60
72
  - Do NOT scan or read unrelated files across the repo.
61
73
  - Use `grep_search` or `find_files` to pinpoint the exact target area.
62
74
  - Read ONLY 1-2 existing reference files to understand established patterns, naming conventions, and shared utilities (avoid reinventing the wheel).
63
75
  - Implement the minimal, clean, and robust code needed to satisfy the request.
64
76
 
65
- 3. **Bug Fixes & Diagnostics ("kenapa error X / perbaiki bug Y")**:
77
+ 4. **Bug Fixes & Diagnostics ("kenapa error X / perbaiki bug Y")**:
66
78
  - Trace from the reported symptom using `grep_search` to find all callers and the shared function.
67
79
  - Fix the root cause in the shared module once, rather than applying band-aid patches across callers.
68
80