mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Add the agent-less setup page, a shared agent list and the split Agents & models tab
AI Assisted
This commit is contained in:
1 parent
c122332657
commit
33f1783979
55 files changed
+5453
-1345
No files matched your search
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"$comment": "The one agent lookup rule (src/web-console/agent-lookup.mjs findAgent) as cases both the Node suite (scripts/test-agent-lookup.mjs) and cargo test load. Each case makes temp folders named under `dirs` (a list of file names per folder), then calls findAgent(entry, env): `{name}` in env values, installDirs and `folder` expands to that folder's path. env: path, savedPath, npmBin, pathext, platform, home, vars (for %NAME% expansion). state is found | outside | missing; where is path | saved-path | npm | install-dir | null; file names the hit the found path must end with (null when missing).",
|
||||
"cases": [
|
||||
{
|
||||
"name": "found on PATH",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose", "installDirs": { "linux": ["{install}"] } },
|
||||
"dirs": { "bin": ["goose"], "install": [] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "", "pathext": "", "home": "{home}" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "found on Windows PATH through PATHEXT (.cmd)",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "bin": ["goose.cmd"] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose.cmd"
|
||||
},
|
||||
{
|
||||
"name": "found on Windows PATH through PATHEXT (.exe)",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "bin": ["goose.exe"] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose.exe"
|
||||
},
|
||||
{
|
||||
"name": "found only on the saved Windows PATH is outside",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "saved": ["goose.cmd"] },
|
||||
"env": { "path": "{bin}", "savedPath": "{saved}", "npmBin": "", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "outside",
|
||||
"where": "saved-path",
|
||||
"folder": "{saved}",
|
||||
"file": "goose.cmd"
|
||||
},
|
||||
{
|
||||
"name": "found only in npm's global folder is outside",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "npm": ["goose"] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "{npm}", "pathext": "" },
|
||||
"state": "outside",
|
||||
"where": "npm",
|
||||
"folder": "{npm}",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "found only in an install folder is outside",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose", "installDirs": { "linux": ["{install}"] } },
|
||||
"dirs": { "install": ["goose"] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "{npm}", "pathext": "" },
|
||||
"state": "outside",
|
||||
"where": "install-dir",
|
||||
"folder": "{install}",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "an install folder with ~ expands against home",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose", "installDirs": { "linux": ["~/toolbin"] } },
|
||||
"dirs": { "home": ["toolbin/goose"] },
|
||||
"env": { "path": "", "savedPath": "", "npmBin": "", "pathext": "", "home": "{home}" },
|
||||
"state": "outside",
|
||||
"where": "install-dir",
|
||||
"folder": "{home}/toolbin",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "an install folder with %NAME% expands against vars",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose", "installDirs": { "win": ["%TOOLS%\\bin"] } },
|
||||
"dirs": { "tools": ["bin/goose.exe"] },
|
||||
"env": { "path": "", "savedPath": "", "npmBin": "", "pathext": ".EXE;.CMD", "vars": { "TOOLS": "{tools}" } },
|
||||
"state": "outside",
|
||||
"where": "install-dir",
|
||||
"folder": "{tools}/bin",
|
||||
"file": "goose.exe"
|
||||
},
|
||||
{
|
||||
"name": "a command carrying its own extension is tried as written",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose.cmd" },
|
||||
"dirs": { "bin": ["goose.cmd"] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose.cmd"
|
||||
},
|
||||
{
|
||||
"name": "not found anywhere is missing",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose", "installDirs": { "linux": ["{install}"] } },
|
||||
"dirs": { "bin": [], "install": [] },
|
||||
"env": { "path": "{bin}", "savedPath": "", "npmBin": "", "pathext": "" },
|
||||
"state": "missing",
|
||||
"where": null,
|
||||
"folder": null,
|
||||
"file": null
|
||||
},
|
||||
{
|
||||
"name": "a command written as a full path is checked as a file",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "{bin}/goose" },
|
||||
"dirs": { "bin": ["goose"] },
|
||||
"env": { "path": "", "savedPath": "", "npmBin": "", "pathext": "" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "a PATH entry with a space still finds the command",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "with space": ["goose"] },
|
||||
"env": { "path": "{with space}", "savedPath": "", "npmBin": "", "pathext": "" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{with space}",
|
||||
"file": "goose"
|
||||
},
|
||||
{
|
||||
"name": "PATH wins over the saved PATH and npm",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose" },
|
||||
"dirs": { "bin": ["goose.exe"], "saved": ["goose.exe"], "npm": ["goose.exe"] },
|
||||
"env": { "path": "{bin}", "savedPath": "{saved}", "npmBin": "{npm}", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "found",
|
||||
"where": "path",
|
||||
"folder": "{bin}",
|
||||
"file": "goose.exe"
|
||||
},
|
||||
{
|
||||
"name": "the saved PATH wins over npm and install folders",
|
||||
"platform": "win",
|
||||
"entry": { "command": "goose", "installDirs": { "win": ["{install}"] } },
|
||||
"dirs": { "saved": ["goose.exe"], "npm": ["goose.exe"], "install": ["goose.exe"] },
|
||||
"env": { "path": "", "savedPath": "{saved}", "npmBin": "{npm}", "pathext": ".EXE;.CMD;.BAT" },
|
||||
"state": "outside",
|
||||
"where": "saved-path",
|
||||
"folder": "{saved}",
|
||||
"file": "goose.exe"
|
||||
},
|
||||
{
|
||||
"name": "npm wins over install folders",
|
||||
"platform": "linux",
|
||||
"entry": { "command": "goose", "installDirs": { "linux": ["{install}"] } },
|
||||
"dirs": { "npm": ["goose"], "install": ["goose"] },
|
||||
"env": { "path": "", "savedPath": "", "npmBin": "{npm}", "pathext": "" },
|
||||
"state": "outside",
|
||||
"where": "npm",
|
||||
"folder": "{npm}",
|
||||
"file": "goose"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$comment": "The rules of ~/.plan2code/agents.json (PLAN-DRAFT 4.4) as cases every reader's tests load: the console (src/web-console/agents.mjs), the launcher and the desktop app. files: `raw` is the file's text (null: no file); `warnings` lists substrings, each found in some warning, and an empty list means no warnings at all; entries are named agents[i], 0-based. buildArgs: `options` as passed (a missing prompt means the entry's own). ids: makeId(input, taken).",
|
||||
"$comment": "The rules of ~/.plan2code/agents.json (PLAN-DRAFT 4.4) as cases every reader's tests load: the console (src/web-console/agents.mjs), the launcher and the desktop app. files: `raw` is the file's text (null: no file); `warnings` lists substrings, each found in some warning, and an empty list means no warnings at all; entries are named agents[i], 0-based. buildArgs: `options` as passed (a missing prompt means the entry's own); an argument exactly `{bypass}` or `{model}` expands to bypassArgs / modelArgs in place and suppresses the end-append for that flag. ids: makeId(input, taken).",
|
||||
"files": [
|
||||
{
|
||||
"name": "no file",
|
||||
@@ -1637,6 +1637,229 @@
|
||||
"--yes-always"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "{bypass} expands to bypassArgs in place when on",
|
||||
"entry": {
|
||||
"id": "devin",
|
||||
"name": "Devin",
|
||||
"command": "devin",
|
||||
"args": [
|
||||
"{bypass}",
|
||||
"--",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--permission-mode",
|
||||
"bypass"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"bypass": true
|
||||
},
|
||||
"args": [
|
||||
"--permission-mode",
|
||||
"bypass",
|
||||
"--",
|
||||
"/plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "{bypass} drops out when off",
|
||||
"entry": {
|
||||
"id": "devin",
|
||||
"name": "Devin",
|
||||
"command": "devin",
|
||||
"args": [
|
||||
"{bypass}",
|
||||
"--",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--permission-mode",
|
||||
"bypass"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"bypass": false
|
||||
},
|
||||
"args": [
|
||||
"--",
|
||||
"/plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "{model} expands to modelArgs in place when chosen",
|
||||
"entry": {
|
||||
"id": "devin",
|
||||
"name": "Devin",
|
||||
"command": "devin",
|
||||
"args": [
|
||||
"{model}",
|
||||
"--",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--permission-mode",
|
||||
"bypass"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"model": "opus",
|
||||
"bypass": false
|
||||
},
|
||||
"args": [
|
||||
"--model",
|
||||
"opus",
|
||||
"--",
|
||||
"/plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "{model} drops out with no model chosen",
|
||||
"entry": {
|
||||
"id": "devin",
|
||||
"name": "Devin",
|
||||
"command": "devin",
|
||||
"args": [
|
||||
"{model}",
|
||||
"--",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--permission-mode",
|
||||
"bypass"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"bypass": false
|
||||
},
|
||||
"args": [
|
||||
"--",
|
||||
"/plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Devin's shape: bypass and model ahead of the -- and the prompt",
|
||||
"entry": {
|
||||
"id": "devin",
|
||||
"name": "Devin",
|
||||
"command": "devin",
|
||||
"args": [
|
||||
"{bypass}",
|
||||
"{model}",
|
||||
"--",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--permission-mode",
|
||||
"bypass"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"model": "swe-2-high",
|
||||
"bypass": true
|
||||
},
|
||||
"args": [
|
||||
"--permission-mode",
|
||||
"bypass",
|
||||
"--model",
|
||||
"swe-2-high",
|
||||
"--",
|
||||
"/plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Codex's shape: bypass then model then the $-prompt",
|
||||
"entry": {
|
||||
"id": "codex",
|
||||
"name": "Codex",
|
||||
"command": "codex",
|
||||
"args": [
|
||||
"{bypass}",
|
||||
"{model}",
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "$plan2code",
|
||||
"bypassArgs": [
|
||||
"--dangerously-bypass-approvals-and-sandbox"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"model": "gpt-5",
|
||||
"bypass": true
|
||||
},
|
||||
"args": [
|
||||
"--dangerously-bypass-approvals-and-sandbox",
|
||||
"--model",
|
||||
"gpt-5",
|
||||
"$plan2code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "an entry holding neither placeholder keeps the appended order",
|
||||
"entry": {
|
||||
"id": "aider",
|
||||
"name": "Aider",
|
||||
"command": "aider",
|
||||
"args": [
|
||||
"{prompt}"
|
||||
],
|
||||
"prompt": "/plan2code",
|
||||
"bypassArgs": [
|
||||
"--yes-always"
|
||||
],
|
||||
"modelArgs": [
|
||||
"--model",
|
||||
"{model}"
|
||||
],
|
||||
"models": []
|
||||
},
|
||||
"options": {
|
||||
"model": "sonnet",
|
||||
"bypass": true
|
||||
},
|
||||
"args": [
|
||||
"/plan2code",
|
||||
"--model",
|
||||
"sonnet",
|
||||
"--yes-always"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "placeholders are replaced as plain text",
|
||||
"entry": {
|
||||
|
||||
Reference in new issue
Block a user