Add agent CLI wrappers to T3 Code packages
- Wire llm-agents into the flake - Expose optional codex, Claude Code, and OpenCode paths in desktop and server wrappers
This commit is contained in:
Generated
+158
@@ -1,5 +1,126 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"blueprint": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"llm-agents",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"llm-agents",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1776249299,
|
||||||
|
"narHash": "sha256-Dt9t1TGRmJFc0xVYhttNBD6QsAgHOHCArqGa0AyjrJY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "blueprint",
|
||||||
|
"rev": "56131e8628f173d24a27f6d27c0215eff57e40dd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "blueprint",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bun2nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": [
|
||||||
|
"llm-agents",
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"import-tree": "import-tree",
|
||||||
|
"nixpkgs": [
|
||||||
|
"llm-agents",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"llm-agents",
|
||||||
|
"systems"
|
||||||
|
],
|
||||||
|
"treefmt-nix": [
|
||||||
|
"llm-agents",
|
||||||
|
"treefmt-nix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777322186,
|
||||||
|
"narHash": "sha256-CFlRnym0RphrTymMUg7PfQgfdYdMd6BnMZQJhlwv0fI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "bun2nix",
|
||||||
|
"rev": "8985e47786dd0bfa95b7c795f12aeafadd328eb8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "staging-2.1.0",
|
||||||
|
"repo": "bun2nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"llm-agents",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1775087534,
|
||||||
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"import-tree": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773693634,
|
||||||
|
"narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
|
||||||
|
"owner": "vic",
|
||||||
|
"repo": "import-tree",
|
||||||
|
"rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "vic",
|
||||||
|
"repo": "import-tree",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"llm-agents": {
|
||||||
|
"inputs": {
|
||||||
|
"blueprint": "blueprint",
|
||||||
|
"bun2nix": "bun2nix",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777354680,
|
||||||
|
"narHash": "sha256-jtMZ7U79JYGoE8NYIu8Y4bNr+EoQW5i6zMP6Mig7tCU=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "llm-agents.nix",
|
||||||
|
"rev": "efa749415e2ee5015db3fda1d3d6d7484d8aa64c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "llm-agents.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776734388,
|
"lastModified": 1776734388,
|
||||||
@@ -18,10 +139,26 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"llm-agents": "llm-agents",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"t3code": "t3code"
|
"t3code": "t3code"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"t3code": {
|
"t3code": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -37,6 +174,27 @@
|
|||||||
"repo": "t3code",
|
"repo": "t3code",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"llm-agents",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1775636079,
|
||||||
|
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -3,12 +3,17 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
llm-agents = {
|
||||||
|
url = "github:numtide/llm-agents.nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
t3code.url = "github:pingdotgg/t3code";
|
t3code.url = "github:pingdotgg/t3code";
|
||||||
t3code.flake = false;
|
t3code.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
|
llm-agents,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
t3code,
|
t3code,
|
||||||
...
|
...
|
||||||
@@ -25,8 +30,18 @@
|
|||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
t3code-desktop = pkgs.callPackage ./packages/t3code-desktop {src = t3code;};
|
t3code-desktop = pkgs.callPackage ./packages/t3code-desktop {
|
||||||
t3code-server = pkgs.callPackage ./packages/t3code-server {src = t3code;};
|
src = t3code;
|
||||||
|
codex = llm-agents.packages.${system}.codex;
|
||||||
|
claudeCode = llm-agents.packages.${system}."claude-code";
|
||||||
|
opencode = llm-agents.packages.${system}.opencode;
|
||||||
|
};
|
||||||
|
t3code-server = pkgs.callPackage ./packages/t3code-server {
|
||||||
|
src = t3code;
|
||||||
|
codex = llm-agents.packages.${system}.codex;
|
||||||
|
claudeCode = llm-agents.packages.${system}."claude-code";
|
||||||
|
opencode = llm-agents.packages.${system}.opencode;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
inherit t3code-desktop t3code-server;
|
inherit t3code-desktop t3code-server;
|
||||||
desktop = t3code-desktop;
|
desktop = t3code-desktop;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
asar,
|
asar,
|
||||||
stdenv,
|
stdenv,
|
||||||
bun,
|
bun,
|
||||||
|
codex ? null,
|
||||||
|
claudeCode ? null,
|
||||||
electron_40,
|
electron_40,
|
||||||
gcc,
|
gcc,
|
||||||
git,
|
git,
|
||||||
@@ -11,9 +13,13 @@
|
|||||||
makeWrapper,
|
makeWrapper,
|
||||||
node-gyp,
|
node-gyp,
|
||||||
nodejs,
|
nodejs,
|
||||||
|
opencode ? null,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
python3,
|
python3,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
|
withClaudeCode ? false,
|
||||||
|
withCodex ? false,
|
||||||
|
withOpencode ? false,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
}: let
|
}: let
|
||||||
common = import ../common.nix {
|
common = import ../common.nix {
|
||||||
@@ -30,6 +36,9 @@
|
|||||||
pname = "t3code-desktop";
|
pname = "t3code-desktop";
|
||||||
version = desktopPackageJson.version;
|
version = desktopPackageJson.version;
|
||||||
in
|
in
|
||||||
|
assert lib.assertMsg (!withCodex || codex != null) "withCodex requires a codex package";
|
||||||
|
assert lib.assertMsg (!withClaudeCode || claudeCode != null) "withClaudeCode requires a claudeCode package";
|
||||||
|
assert lib.assertMsg (!withOpencode || opencode != null) "withOpencode requires an opencode package";
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
inherit src;
|
inherit src;
|
||||||
@@ -172,6 +181,13 @@ in
|
|||||||
git
|
git
|
||||||
xdg-utils
|
xdg-utils
|
||||||
]} \
|
]} \
|
||||||
|
${lib.optionalString withCodex ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ codex ]}" \
|
||||||
|
''}${lib.optionalString withClaudeCode ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ claudeCode ]}" \
|
||||||
|
''}${lib.optionalString withOpencode ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ opencode ]}" \
|
||||||
|
''} \
|
||||||
--add-flags "$out/share/${pname}/resources/app.asar"
|
--add-flags "$out/share/${pname}/resources/app.asar"
|
||||||
|
|
||||||
export out
|
export out
|
||||||
|
|||||||
@@ -3,11 +3,17 @@
|
|||||||
src,
|
src,
|
||||||
stdenv,
|
stdenv,
|
||||||
bun,
|
bun,
|
||||||
|
codex ? null,
|
||||||
|
claudeCode ? null,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
node-gyp,
|
node-gyp,
|
||||||
nodejs,
|
nodejs,
|
||||||
|
opencode ? null,
|
||||||
python3,
|
python3,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
|
withClaudeCode ? false,
|
||||||
|
withCodex ? false,
|
||||||
|
withOpencode ? false,
|
||||||
}: let
|
}: let
|
||||||
common = import ../common.nix {
|
common = import ../common.nix {
|
||||||
inherit
|
inherit
|
||||||
@@ -23,6 +29,9 @@
|
|||||||
pname = "t3code-server";
|
pname = "t3code-server";
|
||||||
version = serverPackageJson.version;
|
version = serverPackageJson.version;
|
||||||
in
|
in
|
||||||
|
assert lib.assertMsg (!withCodex || codex != null) "withCodex requires a codex package";
|
||||||
|
assert lib.assertMsg (!withClaudeCode || claudeCode != null) "withClaudeCode requires a claudeCode package";
|
||||||
|
assert lib.assertMsg (!withOpencode || opencode != null) "withOpencode requires an opencode package";
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
inherit src;
|
inherit src;
|
||||||
@@ -107,6 +116,13 @@ in
|
|||||||
cp -R --no-preserve=mode packages/shared "$out/libexec/t3code/packages/"
|
cp -R --no-preserve=mode packages/shared "$out/libexec/t3code/packages/"
|
||||||
|
|
||||||
makeWrapper ${lib.getExe nodejs} "$out/bin/t3" \
|
makeWrapper ${lib.getExe nodejs} "$out/bin/t3" \
|
||||||
|
${lib.optionalString withCodex ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ codex ]}" \
|
||||||
|
''}${lib.optionalString withClaudeCode ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ claudeCode ]}" \
|
||||||
|
''}${lib.optionalString withOpencode ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ opencode ]}" \
|
||||||
|
''} \
|
||||||
--add-flags "$out/libexec/t3code/apps/server/dist/bin.mjs"
|
--add-flags "$out/libexec/t3code/apps/server/dist/bin.mjs"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|||||||
Reference in New Issue
Block a user