@ikyyofc/gemini-cli 5.0.6 → 5.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikyyofc/gemini-cli",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "AI Agent CLI — native function calling · GEMINI.md context · extensions",
5
5
  "type": "module",
6
6
  "bin": { "gemini": "./index.js" },
package/src/agent.js CHANGED
@@ -4,7 +4,7 @@ import readline from "readline";
4
4
  import { callGemini } from "./gemini.js";
5
5
  import { GEMINI_TOOLS, FUNCTION_DECLARATIONS, executeTool } from "./tools.js";
6
6
  import { Spinner } from "./utils/spinner.js";
7
- import { loadSkills } from "./skills.js";
7
+ import { loadSkills, SKILLS_DIR } from "./skills.js";
8
8
  import {
9
9
  printAssistant, printError, printWarning, printInfo,
10
10
  printToolCall, printToolResult,
@@ -24,7 +24,15 @@ function buildSystemPrompt(extra = "") {
24
24
  const datetime = now.toLocaleString("id-ID", { timeZone: tz, dateStyle: "full", timeStyle: "long" });
25
25
 
26
26
  const skillHint = skills.length
27
- ? "\n## SKILLS\nALWAYS call get_skills() first before starting any task."
27
+ ? `\n## SKILLS
28
+ ALWAYS call get_skills() first before starting any task.
29
+
30
+ All skills and their support files live under: ${SKILLS_DIR}/<skill-slug>/
31
+ If a skill references a relative path (e.g. "skills/<slug>/some-file.md" or "./reference.md"),
32
+ that path is relative to the skill's own folder — resolve it as:
33
+ ${SKILLS_DIR}/<skill-slug>/<relative-path>
34
+ Use read_file with that full resolved path. Do NOT look for skill files relative to the
35
+ current working directory — they are never there.`
28
36
  : "";
29
37
 
30
38
  return `You are an autonomous AI coding agent running in the user's terminal.
package/src/tools.js CHANGED
@@ -872,15 +872,22 @@ export async function executeTool(name, args = {}, { autoApprove = false } = {})
872
872
  if (!args.slug) {
873
873
  if (!skills.length) return { result: "No skills installed." };
874
874
  const list = skills.map(s =>
875
- `${s.slug}\n description: ${s.description}`
875
+ `${s.slug}\n description: ${s.description}\n folder: ${SKILLS_DIR}/${s.slug}/`
876
876
  ).join("\n\n");
877
877
  return { result: `Available skills:\n\n${list}\n\nTo read a skill: call get_skills with slug="<slug>"` };
878
878
  }
879
879
 
880
- // Slug provided → return full SKILL.md content
880
+ // Slug provided → return full SKILL.md content + its folder path
881
881
  const skill = skills.find(s => s.slug === args.slug);
882
882
  if (!skill) return { error: `Skill "${args.slug}" not found. Call get_skills without slug to see available skills.` };
883
- return { result: skill.content };
883
+
884
+ const folderPath = `${SKILLS_DIR}/${skill.slug}`;
885
+ return {
886
+ result:
887
+ `[Skill folder: ${folderPath}/]\n` +
888
+ `[Any relative path mentioned below is relative to that folder — resolve and use read_file with the full path]\n\n` +
889
+ skill.content
890
+ };
884
891
  }
885
892
 
886
893
  // ── Real-time ─────────────────────────────────────────