Compare commits
3 Commits
3707c257bb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dcc4efcc75 | |||
| a23a317335 | |||
| 6e545c0a15 |
@@ -118,6 +118,7 @@
|
||||
- OMP does not discover project skills from `.pi/skills`.
|
||||
Put skills shared by Pi and OMP under `.agents/skills`, or configure OMP's `skills.customDirectories`.
|
||||
- Pi is vendored under `third_party/pi` as a linear vendor import.
|
||||
`pkgs.alexion.pi-coding-agent` packages that source and does not use Nixpkgs Pi.
|
||||
Do not use `git subtree add` or `git subtree pull` for Pi PR branches.
|
||||
Gitea rebases the synthetic upstream root commit without the `third_party/pi` prefix.
|
||||
Preserve `git-subtree-dir` and `git-subtree-split` trailers on Pi vendor commits.
|
||||
|
||||
@@ -28,12 +28,11 @@ in
|
||||
# Stylix supplies the Nord theme.
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = lib.mkForce "JetBrains Mono 12";
|
||||
|
||||
# Application launch is the only mode, kept minimal so the prompt opens
|
||||
# as fast as rofi can read the desktop entries.
|
||||
# Icons are off: resolving one per entry is the bulk of drun's startup.
|
||||
extraConfig = {
|
||||
settings = {
|
||||
font = lib.mkForce "JetBrains Mono 12";
|
||||
modi = "drun";
|
||||
show-icons = false;
|
||||
};
|
||||
|
||||
107
flake.lock
generated
107
flake.lock
generated
@@ -75,11 +75,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789232619,
|
||||
"narHash": "sha256-8pyRIm67V5dtVN3A4Mu0e2a7DIhUhWp6y3NSVS6WBwU=",
|
||||
"lastModified": 1792048969,
|
||||
"narHash": "sha256-+Scy7etDouWzvEV9d6zEDz/TxOoGzfSJau9+yp/zWM4=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "0265d6932168aef12c47f03a565786410ba877e0",
|
||||
"rev": "c283697bfcc3770232139b86c4ad19fd8a62cd6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -96,11 +96,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781152676,
|
||||
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
|
||||
"lastModified": 1789770686,
|
||||
"narHash": "sha256-uZkBR7yHdIKUFB5SZdfgh1qkGfI3XmYmI/lTiquxbck=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
|
||||
"rev": "725ea35e410ad83be4931d1bff7e090eacaf3563",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -117,11 +117,11 @@
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1789185767,
|
||||
"narHash": "sha256-jaWL9beN3ifjNzNEBxo0abA+TSi0n7Q8LRQvZTxEqaM=",
|
||||
"lastModified": 1792036980,
|
||||
"narHash": "sha256-y28wLbzsIbBDeToXHhAdoTs+lcH/d7/1Pky40N6/CoI=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "811170bb74b11f3b9489618ce77487cc58c79067",
|
||||
"rev": "cbf0380669792dd8f6dbb891d3be33aae8fa4625",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -155,11 +155,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788450739,
|
||||
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||
"lastModified": 1790898470,
|
||||
"narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||
"rev": "024633cd702b10285db5cb19b40ad48d2399ba60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -267,11 +267,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789183968,
|
||||
"narHash": "sha256-pEWnYdIF1pBMZwarp/rEPzl+Lknhm5hhjSfeLxH8nAA=",
|
||||
"lastModified": 1791940130,
|
||||
"narHash": "sha256-hRCCi4fp5IjLz4cA8+RkUsaYAHzbd7M5FSAjKOq4E+k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cd1c9e552f41894aeb5cc5cb353d5a1d61550357",
|
||||
"rev": "92a0ed1be12f1e20093faf8af63bae2c74ad521e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -308,11 +308,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789267719,
|
||||
"narHash": "sha256-FIlwGdFjtpGYyL8g/RZZvIxshT9gdwJfcMjHRWHrc4U=",
|
||||
"lastModified": 1792098797,
|
||||
"narHash": "sha256-u4DIIZgznEGzByxXrxWCXK19VcMtTBmi/M9gZ7Jk9bM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "10d0acd7f81e3c035b452daa39ac7d1673880729",
|
||||
"rev": "640725978b99076e18e069f6e7d2959124584f8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -328,11 +328,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789127271,
|
||||
"narHash": "sha256-vL/Fpo7Zxa7wvO8V5FAToUBvP+K3XsMB1wUglTtd/J0=",
|
||||
"lastModified": 1791721963,
|
||||
"narHash": "sha256-BYhx89XJltnRyQeuDKHVL5eSqbbfAcOKuDts7QRsrxQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "24cfdc1f9344b90a1eee329a3906e2f39f4d0f1e",
|
||||
"rev": "60a624466c08787ee8303393b7d4752d1826f14f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -343,27 +343,24 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789006805,
|
||||
"narHash": "sha256-xB8mKMOx1IA9vTDNLmJZ6n4wCMq/cuWBBOzGCRnqxrU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe",
|
||||
"type": "github"
|
||||
"lastModified": 1791734076,
|
||||
"narHash": "sha256-0dNcyVeoD61zhucIpt5BAQ+ytd6JzF641Z+A9bgltLo=",
|
||||
"rev": "7fd4004d0511991fff3a0524856a9be09e28c5f0",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1090327.7fd4004d0511/nixexprs.tar.zst"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"type": "tarball",
|
||||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1789114715,
|
||||
"narHash": "sha256-ugpsyk3NM2s87vXfUiIIiibbJ4Pp0JPS5p/3mfs+q+c=",
|
||||
"lastModified": 1791883866,
|
||||
"narHash": "sha256-yvkDdToRZ4IgPc9tSBzzCYJvTLf8n5eE3rgUkpCuD5A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "21a67dc470149f337cecafbe965d8d252a390518",
|
||||
"rev": "a033e66ab94a6bedf2c3d58d93a36319d3cbbbaf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -375,11 +372,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1789073787,
|
||||
"narHash": "sha256-xfX/toC2QV707s06GbP4II/TxYF0fNQj7s5/LClNDKc=",
|
||||
"lastModified": 1791966044,
|
||||
"narHash": "sha256-t1hT8UW97rFCWCJO7/pClvu0AhLN5V3uir2M0ic4w/Q=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "aff8a0b28396750446e5537a96461bc4facdb287",
|
||||
"rev": "319e4cebef10cbb636c6ea392137b52ad105336a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -391,11 +388,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1789149629,
|
||||
"narHash": "sha256-H6GwaZzZf+4npqv0tph94w9tZddSjFjmQrVsW0z78uk=",
|
||||
"lastModified": 1791956154,
|
||||
"narHash": "sha256-jBYGPi4udQ9uo4KQp9m2J0546nJVQitG15gvZSaVVAs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eaad089433ca2bb662274377d33df3d0e51ef28b",
|
||||
"rev": "55bfb4d7437bd4e09ab7cba58a43bd68eb310044",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -414,11 +411,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789067777,
|
||||
"narHash": "sha256-gN3OnYgJwCK0HX01dQGWusnirJuVHE9WigmSqOnyuCE=",
|
||||
"lastModified": 1792012326,
|
||||
"narHash": "sha256-DApZIjaKdU4XzglZ56yrPYLhG/ajoyuQ4g4s8tkHqxU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "16baff93297c63b6d4c497f00ffcf0b844b06fc6",
|
||||
"rev": "8485794923eb406ce3728af320392226608f724b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -476,11 +473,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788914643,
|
||||
"narHash": "sha256-4GuMPW90JSxXWDPUB9M+1m7fYbe3H0apOd86/zBQ2Kw=",
|
||||
"lastModified": 1792056300,
|
||||
"narHash": "sha256-YU1LjDe1o2Ymg5zEiCHbmMXLkDCtxHQRiVqZ3nC5GGk=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "13616fff713a9f94055c66f15687ebdc17a335df",
|
||||
"rev": "44931708c62937c2b1bf7953902989fa5bb9ee1b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -509,11 +506,11 @@
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1787771653,
|
||||
"narHash": "sha256-DkkJSBOXWV/mja5Vy8az5g1KpZlsbUwlmH0BsQhowaQ=",
|
||||
"lastModified": 1791574276,
|
||||
"narHash": "sha256-UMnLnZ3JlA7UTBNNNx1rNsXYoPP/cirXLCKGiQ/yDx8=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "5e3809851f486e7fc7e84b40f174c74b60ecc784",
|
||||
"rev": "2856c4c6a845b9bec98828ef197abe176e4806bb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -525,11 +522,11 @@
|
||||
"systems": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1774449309,
|
||||
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
|
||||
"lastModified": 1791244623,
|
||||
"narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
|
||||
"rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -626,11 +623,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786901030,
|
||||
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
|
||||
"lastModified": 1791885023,
|
||||
"narHash": "sha256-C3alQ2MEt0zVrUSho5NUDo3jmhbff72++bfwoqT9Omo=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
|
||||
"rev": "0d6d739a833ba9a9c93034862e4a7b061a062a1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pi-coding-agent,
|
||||
root,
|
||||
}:
|
||||
pi-coding-agent.overrideAttrs {
|
||||
src = root + "/third_party/pi";
|
||||
patches = [ ];
|
||||
{ pkgs, root }:
|
||||
pkgs.callPackage (root + "/third_party/pi/nix/package.nix") {
|
||||
source = root + "/third_party/pi";
|
||||
}
|
||||
|
||||
@@ -471,14 +471,14 @@ function findGitRepoRoot(startDir: string): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
function collectAncestorAgentsSkillDirs(startDir: string): string[] {
|
||||
const skillDirs: string[] = [];
|
||||
function collectAncestorConfigDirs(startDir: string, configDirName: string): string[] {
|
||||
const configDirs: string[] = [];
|
||||
const resolvedStartDir = resolve(startDir);
|
||||
const gitRepoRoot = findGitRepoRoot(resolvedStartDir);
|
||||
|
||||
let dir = resolvedStartDir;
|
||||
while (true) {
|
||||
skillDirs.push(join(dir, ".agents", "skills"));
|
||||
configDirs.push(join(dir, configDirName));
|
||||
if (gitRepoRoot && dir === gitRepoRoot) {
|
||||
break;
|
||||
}
|
||||
@@ -489,7 +489,7 @@ function collectAncestorAgentsSkillDirs(startDir: string): string[] {
|
||||
dir = parent;
|
||||
}
|
||||
|
||||
return skillDirs;
|
||||
return configDirs;
|
||||
}
|
||||
|
||||
function collectAutoPromptEntries(dir: string): string[] {
|
||||
@@ -2455,16 +2455,13 @@ export class DefaultPackageManager implements PackageManager {
|
||||
prompts: join(globalBaseDir, "prompts"),
|
||||
themes: join(globalBaseDir, "themes"),
|
||||
};
|
||||
const projectDirs = {
|
||||
extensions: join(projectBaseDir, "extensions"),
|
||||
skills: join(projectBaseDir, "skills"),
|
||||
prompts: join(projectBaseDir, "prompts"),
|
||||
themes: join(projectBaseDir, "themes"),
|
||||
};
|
||||
const userAgentsSkillsDir = join(getHomeDir(), ".agents", "skills");
|
||||
const projectTrusted = this.settingsManager.isProjectTrusted();
|
||||
const projectAgentsSkillDirs = projectTrusted
|
||||
? collectAncestorAgentsSkillDirs(this.cwd).filter((dir) => resolve(dir) !== resolve(userAgentsSkillsDir))
|
||||
const projectConfigDirs = projectTrusted
|
||||
? collectAncestorConfigDirs(this.cwd, CONFIG_DIR_NAME).filter((dir) => resolve(dir) !== resolve(globalBaseDir))
|
||||
: [];
|
||||
const projectAgentsDirs = projectTrusted
|
||||
? collectAncestorConfigDirs(this.cwd, ".agents").filter((dir) => resolve(dir) !== resolve(dirname(userAgentsSkillsDir)))
|
||||
: [];
|
||||
|
||||
const addResources = (
|
||||
@@ -2481,56 +2478,54 @@ export class DefaultPackageManager implements PackageManager {
|
||||
}
|
||||
};
|
||||
|
||||
if (projectTrusted) {
|
||||
// Project extensions from .pi/
|
||||
addResources(
|
||||
"extensions",
|
||||
collectAutoExtensionEntries(projectDirs.extensions),
|
||||
projectMetadata,
|
||||
projectOverrides.extensions,
|
||||
projectBaseDir,
|
||||
);
|
||||
|
||||
// Project skills from .pi/
|
||||
addResources(
|
||||
"skills",
|
||||
collectAutoSkillEntries(projectDirs.skills, "pi"),
|
||||
projectMetadata,
|
||||
projectOverrides.skills,
|
||||
projectBaseDir,
|
||||
);
|
||||
}
|
||||
|
||||
// Project skills from .agents/ (each with its own baseDir)
|
||||
for (const agentsSkillsDir of projectAgentsSkillDirs) {
|
||||
const agentsBaseDir = dirname(agentsSkillsDir); // the .agents directory
|
||||
const agentsMetadata: PathMetadata = {
|
||||
// Project resources from .pi/ in cwd and ancestors.
|
||||
for (const configDir of projectConfigDirs) {
|
||||
const configMetadata: PathMetadata = {
|
||||
...projectMetadata,
|
||||
baseDir: agentsBaseDir,
|
||||
baseDir: configDir,
|
||||
};
|
||||
addResources(
|
||||
"skills",
|
||||
collectAutoSkillEntries(agentsSkillsDir, "agents"),
|
||||
agentsMetadata,
|
||||
projectOverrides.skills,
|
||||
agentsBaseDir,
|
||||
"extensions",
|
||||
collectAutoExtensionEntries(join(configDir, "extensions")),
|
||||
configMetadata,
|
||||
projectOverrides.extensions,
|
||||
configDir,
|
||||
);
|
||||
addResources(
|
||||
"skills",
|
||||
collectAutoSkillEntries(join(configDir, "skills"), "pi"),
|
||||
configMetadata,
|
||||
projectOverrides.skills,
|
||||
configDir,
|
||||
);
|
||||
}
|
||||
|
||||
if (projectTrusted) {
|
||||
addResources(
|
||||
"prompts",
|
||||
collectAutoPromptEntries(projectDirs.prompts),
|
||||
projectMetadata,
|
||||
collectAutoPromptEntries(join(configDir, "prompts")),
|
||||
configMetadata,
|
||||
projectOverrides.prompts,
|
||||
projectBaseDir,
|
||||
configDir,
|
||||
);
|
||||
addResources(
|
||||
"themes",
|
||||
collectAutoThemeEntries(projectDirs.themes),
|
||||
projectMetadata,
|
||||
collectAutoThemeEntries(join(configDir, "themes")),
|
||||
configMetadata,
|
||||
projectOverrides.themes,
|
||||
projectBaseDir,
|
||||
configDir,
|
||||
);
|
||||
}
|
||||
|
||||
// Project skills from .agents/ in cwd and ancestors.
|
||||
for (const agentsDir of projectAgentsDirs) {
|
||||
const agentsMetadata: PathMetadata = {
|
||||
...projectMetadata,
|
||||
baseDir: agentsDir,
|
||||
};
|
||||
addResources(
|
||||
"skills",
|
||||
collectAutoSkillEntries(join(agentsDir, "skills"), "agents"),
|
||||
agentsMetadata,
|
||||
projectOverrides.skills,
|
||||
agentsDir,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user