@pikaa-ai/pikaa 0.2.3 → 0.2.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/bin/pikaa.js CHANGED
@@ -105,14 +105,15 @@ async function downloadBinary(url, dest, redirects = 0) {
105
105
  }
106
106
 
107
107
  async function main() {
108
- const existing = findExistingBinary();
109
- if (existing) {
110
- launchBinary(existing);
108
+ // 1. If local bun and dist/cli.js are available in the package, run immediately
109
+ if (tryLaunchWithBun()) {
111
110
  return;
112
111
  }
113
112
 
114
- // If local bun and dist/cli.js are available, run immediately with 0 download
115
- if (tryLaunchWithBun()) {
113
+ // 2. Otherwise use existing native binary if present
114
+ const existing = findExistingBinary();
115
+ if (existing) {
116
+ launchBinary(existing);
116
117
  return;
117
118
  }
118
119
 
package/dist/cli.js CHANGED
@@ -468,12 +468,16 @@ function buildSystemPrompt(params) {
468
468
  const sections = [];
469
469
  sections.push(params.basePrompt || "You are Groupy, an expert autonomous AI coding assistant. You think step-by-step, act surgically, and write clean, correct code.");
470
470
  sections.push([
471
- "## Operational Guidelines",
472
- "1. Think before acting. Understand the task and the code it touches before making edits.",
473
- "2. Simplicity first: write the minimum code that solves the problem. No unnecessary abstractions.",
474
- "3. Use `apply_patch` for surgical code replacements rather than overwriting whole files.",
475
- "4. Execute shell commands with `shell` to inspect environment, run tests, or build targets.",
476
- "5. Always verify your changes with tests or execution checks."
471
+ "## Editing Constraints & Guidelines",
472
+ "- Use `apply_patch` for surgical single-file edits. TargetContent must match existing file content exactly.",
473
+ "- Use `write_file` for creating new files or when completely replacing the full content of a file.",
474
+ "- Use `read_file` to inspect files and `grep_search` / `find_files` to discover symbols and locate files across the project.",
475
+ "- NEVER create temporary scripts, scratch files, or chunk files (e.g. `_tmp_*.ps1`, `_tmp_*.txt`, `split_*.py`) in the workspace to manipulate, split, or read files.",
476
+ "- NEVER execute shell or PowerShell scripts as a workaround for reading, writing, or editing text files.",
477
+ "- Use the `shell` tool ONLY for running tests, build targets, package installations, or checking environment/git status.",
478
+ "- You may be in a dirty git worktree. NEVER revert existing changes made by the user.",
479
+ "- NEVER use destructive commands like `git reset --hard` or `git checkout --`.",
480
+ "- Be concise, direct, and act surgically. Write clean, correct code with minimal necessary modifications."
477
481
  ].join(`
478
482
  `));
479
483
  if (params.memoriesPrompt) {
@@ -769,7 +773,7 @@ class ExecPolicy {
769
773
  }
770
774
  initDefaultRules() {
771
775
  this.addRule(/^(git\s+(status|log|diff|branch|show|rev-parse))/i, "allow", "Safe git query");
772
- this.addRule(/^(ls|dir|cat|grep|rg|find|pwd|echo|head|tail|wc|which|where)\b/i, "allow", "Safe read-only shell command");
776
+ this.addRule(/^(ls|dir|cat|type|grep|rg|find|pwd|echo|head|tail|wc|which|where)\b/i, "allow", "Safe read-only shell command");
773
777
  this.addRule(/^(bun\s+(test|--version|-v)|npm\s+(test|--version|-v)|node\s+-v)\b/i, "allow", "Testing & runtime check");
774
778
  this.addRule(/^(rm|del|rmdir|format|mkfs)\b/i, "prompt", "Destructive file removal");
775
779
  this.addRule(/^(git\s+(push|reset\s+--hard|clean\s+-fd|rebase))\b/i, "prompt", "Destructive git operation");
@@ -5906,6 +5910,8 @@ async function main() {
5906
5910
  let model = process.env.GROUPY_MODEL || process.env.OPENAI_MODEL || "groupy";
5907
5911
  let baseUrl = process.env.GROUPY_BASE_URL || process.env.OPENAI_BASE_URL || savedCreds?.baseUrl;
5908
5912
  let apiKey = process.env.GROUPY_API_KEY || process.env.OPENAI_API_KEY || savedCreds?.accessToken;
5913
+ let explicitBaseUrl;
5914
+ let explicitApiKey;
5909
5915
  let cwd = process.cwd();
5910
5916
  let role = "default";
5911
5917
  let mcpConfigFile;
@@ -5930,7 +5936,7 @@ async function main() {
5930
5936
  printWhoami2(credStore);
5931
5937
  process.exit(0);
5932
5938
  } else if (arg === "models" || arg === "--models") {
5933
- await printAvailableModels(baseUrl || "http://localhost:8090/v1", apiKey);
5939
+ await printAvailableModels(baseUrl || "https://api.groupy-hub.store/v1", apiKey);
5934
5940
  process.exit(0);
5935
5941
  } else if (arg === "list" || arg === "sessions" || arg === "--list") {
5936
5942
  printSessionsList(storageManager);
@@ -5949,15 +5955,20 @@ async function main() {
5949
5955
  } else if (arg === "--model" || arg === "-m") {
5950
5956
  model = args[++i] || model;
5951
5957
  } else if (arg === "--base-url" || arg === "-u") {
5952
- baseUrl = args[++i] || baseUrl;
5958
+ explicitBaseUrl = args[++i];
5959
+ baseUrl = explicitBaseUrl || baseUrl;
5953
5960
  } else if (arg === "--api-key" || arg === "-k") {
5954
- apiKey = args[++i] || apiKey;
5961
+ explicitApiKey = args[++i];
5962
+ apiKey = explicitApiKey || apiKey;
5955
5963
  } else if (arg === "--cwd" || arg === "-C") {
5956
5964
  cwd = resolve13(args[++i] || cwd);
5957
5965
  } else if (arg === "--role" || arg === "-r") {
5958
5966
  role = args[++i] || role;
5959
5967
  } else if (arg === "--mcp") {
5960
5968
  mcpConfigFile = args[++i];
5969
+ } else if (arg === "--version" || arg === "-v" || arg === "version") {
5970
+ console.log(`pikaa v0.2.4`);
5971
+ process.exit(0);
5961
5972
  } else if (arg === "--help" || arg === "-h") {
5962
5973
  printCliHelp();
5963
5974
  process.exit(0);
@@ -5966,8 +5977,8 @@ async function main() {
5966
5977
  }
5967
5978
  }
5968
5979
  const modelClient = new ModelClient({
5969
- baseUrl,
5970
- apiKey,
5980
+ baseUrl: explicitBaseUrl,
5981
+ apiKey: explicitApiKey,
5971
5982
  defaultModel: model
5972
5983
  });
5973
5984
  const tools = createDefaultTools({ skillsLoader, memoryStore, worktreeManager });
@@ -6223,6 +6234,7 @@ ${style.bold("OPTIONS:")}
6223
6234
  -C, --cwd <path> Working directory for agent operations (default: current dir)
6224
6235
  -r, --role <role> Initial agent role (default, reviewer, researcher, tester, planner)
6225
6236
  --mcp <path> Path to MCP server configuration JSON file
6237
+ -v, --version Show CLI version
6226
6238
  -h, --help Show this help message
6227
6239
 
6228
6240
  ${style.bold("EXAMPLES:")}
package/dist/index.js CHANGED
@@ -453,7 +453,7 @@ class ExecPolicy {
453
453
  }
454
454
  initDefaultRules() {
455
455
  this.addRule(/^(git\s+(status|log|diff|branch|show|rev-parse))/i, "allow", "Safe git query");
456
- this.addRule(/^(ls|dir|cat|grep|rg|find|pwd|echo|head|tail|wc|which|where)\b/i, "allow", "Safe read-only shell command");
456
+ this.addRule(/^(ls|dir|cat|type|grep|rg|find|pwd|echo|head|tail|wc|which|where)\b/i, "allow", "Safe read-only shell command");
457
457
  this.addRule(/^(bun\s+(test|--version|-v)|npm\s+(test|--version|-v)|node\s+-v)\b/i, "allow", "Testing & runtime check");
458
458
  this.addRule(/^(rm|del|rmdir|format|mkfs)\b/i, "prompt", "Destructive file removal");
459
459
  this.addRule(/^(git\s+(push|reset\s+--hard|clean\s+-fd|rebase))\b/i, "prompt", "Destructive git operation");
@@ -1438,12 +1438,16 @@ function buildSystemPrompt(params) {
1438
1438
  const sections = [];
1439
1439
  sections.push(params.basePrompt || "You are Groupy, an expert autonomous AI coding assistant. You think step-by-step, act surgically, and write clean, correct code.");
1440
1440
  sections.push([
1441
- "## Operational Guidelines",
1442
- "1. Think before acting. Understand the task and the code it touches before making edits.",
1443
- "2. Simplicity first: write the minimum code that solves the problem. No unnecessary abstractions.",
1444
- "3. Use `apply_patch` for surgical code replacements rather than overwriting whole files.",
1445
- "4. Execute shell commands with `shell` to inspect environment, run tests, or build targets.",
1446
- "5. Always verify your changes with tests or execution checks."
1441
+ "## Editing Constraints & Guidelines",
1442
+ "- Use `apply_patch` for surgical single-file edits. TargetContent must match existing file content exactly.",
1443
+ "- Use `write_file` for creating new files or when completely replacing the full content of a file.",
1444
+ "- Use `read_file` to inspect files and `grep_search` / `find_files` to discover symbols and locate files across the project.",
1445
+ "- NEVER create temporary scripts, scratch files, or chunk files (e.g. `_tmp_*.ps1`, `_tmp_*.txt`, `split_*.py`) in the workspace to manipulate, split, or read files.",
1446
+ "- NEVER execute shell or PowerShell scripts as a workaround for reading, writing, or editing text files.",
1447
+ "- Use the `shell` tool ONLY for running tests, build targets, package installations, or checking environment/git status.",
1448
+ "- You may be in a dirty git worktree. NEVER revert existing changes made by the user.",
1449
+ "- NEVER use destructive commands like `git reset --hard` or `git checkout --`.",
1450
+ "- Be concise, direct, and act surgically. Write clean, correct code with minimal necessary modifications."
1447
1451
  ].join(`
1448
1452
  `));
1449
1453
  if (params.memoriesPrompt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikaa-ai/pikaa",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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",