@vibest/cli 0.0.1 → 0.0.2-beta.2
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/LICENSE +21 -0
- package/bin/vibest.cjs +45 -0
- package/harnesses/agy/.agents/plugins/vibest/hook.sh +48 -0
- package/harnesses/agy/.agents/plugins/vibest/hooks.json +38 -0
- package/harnesses/agy/.agents/plugins/vibest/plugin.json +5 -0
- package/harnesses/agy/.agents/plugins/vibest/skills/delegate/SKILL.md +66 -0
- package/harnesses/agy/.agents/plugins/vibest/skills/pipeline/SKILL.md +57 -0
- package/harnesses/claude/.claude-plugin/plugin.json +10 -0
- package/harnesses/claude/LICENSE +21 -0
- package/harnesses/claude/README.md +107 -0
- package/harnesses/claude/hooks/hooks.json +4 -0
- package/harnesses/claude/hooks/register.mjs +6215 -0
- package/harnesses/claude/skills/delegate/SKILL.md +66 -0
- package/harnesses/claude/skills/pipeline/SKILL.md +57 -0
- package/harnesses/cursor/.cursor-plugin/plugin.json +5 -0
- package/harnesses/cursor/hooks/hooks.json +39 -0
- package/harnesses/cursor/hooks/vibest.sh +35 -0
- package/harnesses/cursor/skills/delegate/SKILL.md +66 -0
- package/harnesses/cursor/skills/pipeline/SKILL.md +57 -0
- package/harnesses/pi/extension.mjs +18607 -0
- package/harnesses/pi/presentation.mjs +10237 -0
- package/harnesses/pi/skills/delegate/SKILL.md +66 -0
- package/harnesses/pi/skills/pipeline/SKILL.md +57 -0
- package/herdr-plugin/README.md +57 -0
- package/herdr-plugin/bin/vibest.sh +11 -0
- package/herdr-plugin/herdr-plugin.toml +88 -0
- package/package.json +49 -27
- package/CHANGELOG.md +0 -9
- package/src/cli.ts +0 -25
- package/src/server.ts +0 -39
- package/tsconfig.json +0 -12
- package/tsdown.config.ts +0 -6
- package/turbo.json +0 -9
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delegate
|
|
3
|
+
description: Hand work to subagents with `vibest run` and keep talking with the user while they work. Use for any request to change, fix, build, investigate, research, test or verify code ("fix this bug", "add X", "look into why Y", "do these three things", "have an agent check it"), and whenever a task splits into independent parts that can run at the same time.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Delegate
|
|
7
|
+
|
|
8
|
+
You direct subagents. You stay with the user. An agent messages you when it finishes, asks or is blocked; vibest notifies you only of what the agent cannot say; an idle agent sends nothing. Do not poll, sleep, or loop on `vibest result`.
|
|
9
|
+
|
|
10
|
+
## Dispatch
|
|
11
|
+
|
|
12
|
+
Split independent pieces. Research and review run in parallel. One writing subagent per set of files. A few shell reads (`git diff`, `rg`) you do yourself.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
vibest run [<harness>] --title '<Title>' -- '<self-contained task>'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Its id is <id>.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
vibest run [<harness>] --title '<Title>' --archive-on-idle -- '<task>'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`--archive-on-idle` is only for work whose message you will not answer. It archives the first time the session is idle after a completed execution with nothing it sent or was sent still waiting. The branch is kept. Do not `vibest send` it after that. Any execution that ends normally archives it, a question included, so do not use it for a session that may need an answer. A failed execution has not archived it: send the correction to the id it printed; the flag still archives the completed execution that follows. A reviewer that gets later executions is the pipeline skill and must stay open, without this flag.
|
|
25
|
+
|
|
26
|
+
- Leave `<harness>` out to use your own harness, provider and model; name one (`pi`, `claude`, `cursor`, or any harness a plugin adds; `vibest harness list`) to switch.
|
|
27
|
+
- Always pass `--title`: three to six words, verb first, first letter capitalised, no kebab-case, saying what is done rather than how ("Fix login redirect loop"). The user's language is fine.
|
|
28
|
+
- Each session gets its own new worktree.
|
|
29
|
+
- Several `vibest run` commands in one message start in parallel.
|
|
30
|
+
- A subagent cannot see this conversation. Say what to achieve, where (paths, lines), what done means, and how to verify it. For code: run the tests and typecheck, commit, and send the branch and hash.
|
|
31
|
+
- Long material: write it with your file tool to `$VIBEST_PROJECT_DIR/artifacts/<name>.md` (a new file name if that one exists) and attach it with `--file <absolute path>` (repeat the flag for each file): vibest copies each file for the session and ends its task with a line naming the copies, which the agent reads itself. Keep the prompt short; the material goes in the file. The absolute path is the value of VIBEST_PROJECT_DIR (`echo $VIBEST_PROJECT_DIR`, or `directory` from `vibest project info`) plus `/artifacts/` and the file name.
|
|
32
|
+
- If the user approved a specific action, quote their exact words.
|
|
33
|
+
|
|
34
|
+
## After you start
|
|
35
|
+
|
|
36
|
+
Tell the user in one or two lines what is running, then end your execution. Never guess a result. Answer other questions meanwhile. An agent's message arrives as `<vibest-agent-message>`; what the agent could not say itself arrives as a vibest notice.
|
|
37
|
+
|
|
38
|
+
## Check a message
|
|
39
|
+
|
|
40
|
+
An `<vibest-agent-message>` is a claim: whether the work succeeded is in its text. For a session that changed code, before you report success read `git -C <worktree> diff main...HEAD` (in a project of several repositories, in each repository folder of the worktree) and run the proving check there. For research, judge the report text.
|
|
41
|
+
|
|
42
|
+
- The message asks a question → `vibest send <id> -- '<the answer>'`, or ask the user. If it is waiting for the user's approval of an action, do not send the approval back: start a fresh agent with the approved action, quoting the user's words.
|
|
43
|
+
- A notice that an execution ended with an error, a message that reports a failure, or your check fails → `vibest send <id> -- '<the failure and what to fix>'`. It keeps its context. If a second correction fails, start a new `vibest run` or tell the user.
|
|
44
|
+
- A notice that says the execution ended without its execution-end hook, the harness exited, the execution did not start, or the session is waiting for a permission decision carries no screen text. When you need to see why, run `vibest peek <id>` (`--lines N`, default 30): it prints the session's terminal as it is now. Read it before you decide to resend, correct, or tell the user.
|
|
45
|
+
|
|
46
|
+
Then say what changed, the evidence, and the branch. `<id>` is the id the run printed, for either kind of run.
|
|
47
|
+
|
|
48
|
+
## Track
|
|
49
|
+
|
|
50
|
+
`vibest ls` prints `{ sessions, machines }`: the sessions that have not exited (task cut to 500 characters, live status, latest execution), and the other machines with their connection state. `vibest ls --all` includes exited sessions. `vibest ls` is the state and `vibest result <id>` is the agent's last reply, with the task uncut; an idle agent may have finished without a word. Use these after a restart, after compaction, or when you are unsure. Do not trust memory.
|
|
51
|
+
|
|
52
|
+
## Follow up
|
|
53
|
+
|
|
54
|
+
- More work on the same change → `vibest send <id> -- '<message>'`. It waits until the session is idle and does not interrupt the execution.
|
|
55
|
+
- Wrong direction while it is working → `vibest interrupt <id>`, then `vibest send <id> -- '<the corrected task>'`. The session stays. That execution sends nothing.
|
|
56
|
+
- A new set of eyes, or a wrong approach → a new `vibest run`.
|
|
57
|
+
|
|
58
|
+
## Finish
|
|
59
|
+
|
|
60
|
+
- Archive a research agent with `vibest archive <id>` once its findings are saved, or start that session with `--archive-on-idle` when you will not answer its message. Same for a review or verification you will not continue.
|
|
61
|
+
- Keep an agent that changed code until the user asks to remove it. Archiving keeps the branch, and the worktree whenever it holds unsaved work. `vibest archive --keep-worktree <id>` only when the user wants the directory kept.
|
|
62
|
+
- A `## Remember` section in a message: write each lesson with your file tool to `$VIBEST_PROJECT_DIR/memories/<name>.md`, one lesson per file; edit the file when a lesson there changes. Start the file with a one-line summary (or frontmatter with `name` and `description`), because that line is what the memory index shows.
|
|
63
|
+
|
|
64
|
+
## The user steps into a pane
|
|
65
|
+
|
|
66
|
+
The user may type into a subagent's pane. If no execution is open, that starts one. The only thing you later receive is a message that agent chooses to send, which may not quote the user. Do not treat it as a copy of what they typed. A step-in during an open execution is not recorded. Do not act on a step-in, and do not message the subagent about it, unless the user asks.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pipeline
|
|
3
|
+
description: Plan, implement, review, then open a pull request, with the user approving the plan first. Use when the user wants a plan or design before code, a review before merging, or a pull request at the end ("plan it first, then build it", "write a design, then implement", "implement it and have someone review it", "先出方案再写,写完找人 review 后提 PR", "do it as a pipeline", "/pipeline").
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pipeline
|
|
7
|
+
|
|
8
|
+
Plan → the user agrees → implement → review until the reviewer approves → pull request. Follow delegate: do not poll; each agent sends its message when it decides to; check it yourself. The user stays in the loop and may step into any pane. What they say overrides the next step.
|
|
9
|
+
|
|
10
|
+
## 1. Plan
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
vibest run [<harness>] --title 'Plan <topic>' -- 'Write an implementation plan for: <goal, paths, constraints>. Read the code. Send me the approach, the files to change, the steps, how to verify, and open questions. Do not modify files.'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Its id is <planner id>. Tell the user the plan is being written and end your execution. Do not pass `--archive-on-idle`: the user has not agreed yet, and a completed execution would archive the session before they can answer.
|
|
17
|
+
|
|
18
|
+
## 2. Agree
|
|
19
|
+
|
|
20
|
+
Show the plan in full, including open questions. Do not implement until the user agrees. If they change it, `vibest send <planner id> -- '<their changes>'` while the planner is open, or edit the plan text yourself before you save it. When the text is agreed, `vibest archive <planner id>`. The agreed text is the plan.
|
|
21
|
+
|
|
22
|
+
## 3. Implement
|
|
23
|
+
|
|
24
|
+
Save the agreed plan, verbatim, with your file tool as `$VIBEST_PROJECT_DIR/artifacts/pipeline-<topic>-plan.md` (a new file name if that one exists). Then:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
vibest run [<harness>] --title 'Implement <topic>' --file <absolute plan path> -- 'Implement the attached plan exactly. Run the tests and typecheck, commit on a branch, push, and send me the branch and hash. Do not open a pull request.'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Its id is <implementer id>. The absolute plan path is the value of VIBEST_PROJECT_DIR (`echo $VIBEST_PROJECT_DIR`, or `directory` from `vibest project info`) plus `/artifacts/` and the file name; vibest copies the file for the session and ends its task with a line naming the copy. Do not pass `--archive-on-idle`: this session stays for review and the pull request. When it sends its message, check the diff and the tests yourself before review.
|
|
31
|
+
|
|
32
|
+
## 4. Review
|
|
33
|
+
|
|
34
|
+
`--share` shares the implementer's worktree: a pane split off the implementer's pane. Archiving the reviewer never removes that worktree.
|
|
35
|
+
Read-only here is the prompt you pass, plus the shared-worktree git rule the session already has: no commit, and nothing that moves HEAD, a branch, or the index.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
vibest run [<harness>] --title 'Review <topic>' --share <implementer id> -- 'Review the change on this branch against the plan at <absolute plan path>. Run git diff main...HEAD. Do not modify files, commit, or move HEAD. Look for bugs, missing tests, and departures from the plan; run the tests. Send me a message that starts with "verdict: approve" or "verdict: changes requested", then each comment with file and line.'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Its id is <reviewer id>. Do not pass `--archive-on-idle`: later reviews go to this reviewer with `vibest send`.
|
|
42
|
+
|
|
43
|
+
## 5. Until approval
|
|
44
|
+
|
|
45
|
+
- `changes requested` → `vibest send <implementer id> -- '<the comments, verbatim. Fix them, run the tests, commit, push, and send me the hash.>'` When it sends its message, `vibest send <reviewer id> -- 'The implementer pushed <hash>. Review again. Same message format.'`
|
|
46
|
+
- `approve` → open the pull request.
|
|
47
|
+
- After 3 reviews without approval, or a judgment call, stop and show the open comments. The user decides: another review, accept, or change the plan.
|
|
48
|
+
|
|
49
|
+
One line to the user per review: the number, the verdict, what is being fixed.
|
|
50
|
+
|
|
51
|
+
## 6. Pull request
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
vibest send <implementer id> -- 'The review approved the change. Open a pull request against main with gh pr create. Title: <title>. Body: the plan, the change, and how it was verified. Send me the URL.'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Give the user the URL. Then `vibest archive <reviewer id>`. Keep the implementer until the user is done; follow-ups are `vibest send <implementer id> -- '<message>'`.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# vibest herdr plugin
|
|
2
|
+
|
|
3
|
+
herdr runs these entrypoints. Each one executes `vibest herdr <verb>`. vibest reads `HERDR_PLUGIN_CONTEXT_JSON` and uses that focused pane or workspace directory as the Project. It does not use the plugin directory, which is the process's working directory.
|
|
4
|
+
|
|
5
|
+
vibest does not link or enable this plugin. Registration is global for your user, so you do it yourself.
|
|
6
|
+
|
|
7
|
+
## Link
|
|
8
|
+
|
|
9
|
+
From a checkout:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
herdr plugin link /absolute/path/to/packages/cli/herdr-plugin
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
From a curl install, the directory is unpacked next to `bin/` and `harnesses/` and is not linked:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
herdr plugin link ~/.local/share/vibest/versions/<version>/herdr-plugin
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`vibest` must be on the herdr server's `PATH`. `VIBEST_BIN` overrides the executable. Undo with `herdr plugin unlink vibest`.
|
|
22
|
+
|
|
23
|
+
## Keybindings
|
|
24
|
+
|
|
25
|
+
herdr 0.9.5 has no keybindings in the plugin manifest. Actions are `vibest.<action>` (`open-entry`, `run`, `stop`, `runs`, `subscriptions`, `palette`). Add any you want to your own herdr `config.toml`. These chords are examples; pick ones you do not already use:
|
|
26
|
+
|
|
27
|
+
```toml
|
|
28
|
+
[[keys.command]]
|
|
29
|
+
key = "prefix+v"
|
|
30
|
+
type = "plugin_action"
|
|
31
|
+
command = "vibest.open-entry"
|
|
32
|
+
|
|
33
|
+
[[keys.command]]
|
|
34
|
+
key = "prefix+r"
|
|
35
|
+
type = "plugin_action"
|
|
36
|
+
command = "vibest.run"
|
|
37
|
+
|
|
38
|
+
[[keys.command]]
|
|
39
|
+
key = "prefix+x"
|
|
40
|
+
type = "plugin_action"
|
|
41
|
+
command = "vibest.stop"
|
|
42
|
+
|
|
43
|
+
[[keys.command]]
|
|
44
|
+
key = "prefix+l"
|
|
45
|
+
type = "plugin_action"
|
|
46
|
+
command = "vibest.runs"
|
|
47
|
+
|
|
48
|
+
[[keys.command]]
|
|
49
|
+
key = "prefix+u"
|
|
50
|
+
type = "plugin_action"
|
|
51
|
+
command = "vibest.subscriptions"
|
|
52
|
+
|
|
53
|
+
[[keys.command]]
|
|
54
|
+
key = "prefix+p"
|
|
55
|
+
type = "plugin_action"
|
|
56
|
+
command = "vibest.palette"
|
|
57
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# The only entrypoint of the vibest herdr plugin.
|
|
3
|
+
# vibest.sh pane <entrypoint> open one of this plugin's [[panes]] (an action cannot open a pane itself)
|
|
4
|
+
# vibest.sh herdr <verb> exec `vibest herdr <verb>`: startup, open-entry, run, stop, runs, subscriptions, palette.
|
|
5
|
+
# vibest reads HERDR_PLUGIN_CONTEXT_JSON itself (the Project directory is in there).
|
|
6
|
+
# VIBEST_BIN overrides the executable (plugin commands inherit the herdr server's environment).
|
|
7
|
+
set -eu
|
|
8
|
+
if [ "${1:-}" = pane ]; then
|
|
9
|
+
exec "${HERDR_BIN_PATH:-herdr}" plugin pane open --plugin "$HERDR_PLUGIN_ID" --entrypoint "$2" --focus
|
|
10
|
+
fi
|
|
11
|
+
exec "${VIBEST_BIN:-vibest}" "$@"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Draft vibest plugin for herdr (architecture §11, plan phase 8). Not installed anywhere.
|
|
2
|
+
# Checked against herdr 0.9.5 in an isolated XDG_CONFIG_HOME; see docs/design/herdr-surface.md.
|
|
3
|
+
#
|
|
4
|
+
# Every command goes through bin/vibest.sh, which execs `vibest <args>`. vibest reads
|
|
5
|
+
# HERDR_PLUGIN_CONTEXT_JSON (focused pane, cwd, workspace, tab) itself; the plugin holds no state.
|
|
6
|
+
#
|
|
7
|
+
# herdr manifests cannot declare keybindings. The user binds actions in their own config.toml:
|
|
8
|
+
# [[keys.command]]
|
|
9
|
+
# key = "prefix+v"
|
|
10
|
+
# type = "plugin_action"
|
|
11
|
+
# command = "vibest.open-entry"
|
|
12
|
+
|
|
13
|
+
id = "vibest"
|
|
14
|
+
name = "vibest"
|
|
15
|
+
version = "0.0.0"
|
|
16
|
+
min_herdr_version = "0.9.5"
|
|
17
|
+
description = "Run, watch, and stop vibest subagents from herdr."
|
|
18
|
+
platforms = ["linux", "macos"]
|
|
19
|
+
|
|
20
|
+
# herdr does not restore metadata tokens after a server restart; ask vibestd to republish them.
|
|
21
|
+
[[startup]]
|
|
22
|
+
command = ["sh", "bin/vibest.sh", "herdr", "startup"]
|
|
23
|
+
|
|
24
|
+
[[actions]]
|
|
25
|
+
id = "open-entry"
|
|
26
|
+
title = "vibest: open entry session"
|
|
27
|
+
description = "Open or focus the entry session of the Project for the focused pane's directory."
|
|
28
|
+
contexts = ["global", "workspace", "pane"]
|
|
29
|
+
command = ["sh", "bin/vibest.sh", "herdr", "open-entry"]
|
|
30
|
+
|
|
31
|
+
[[actions]]
|
|
32
|
+
id = "run"
|
|
33
|
+
title = "vibest: run a subagent"
|
|
34
|
+
description = "Read a prompt and start a subagent in the focused pane's Project."
|
|
35
|
+
contexts = ["global", "workspace", "pane"]
|
|
36
|
+
command = ["sh", "bin/vibest.sh", "pane", "run"]
|
|
37
|
+
|
|
38
|
+
[[actions]]
|
|
39
|
+
id = "stop"
|
|
40
|
+
title = "vibest: stop the focused Agent"
|
|
41
|
+
contexts = ["pane"]
|
|
42
|
+
command = ["sh", "bin/vibest.sh", "herdr", "stop"]
|
|
43
|
+
|
|
44
|
+
[[actions]]
|
|
45
|
+
id = "runs"
|
|
46
|
+
title = "vibest: Runs"
|
|
47
|
+
contexts = ["global", "workspace"]
|
|
48
|
+
command = ["sh", "bin/vibest.sh", "pane", "runs"]
|
|
49
|
+
|
|
50
|
+
[[actions]]
|
|
51
|
+
id = "subscriptions"
|
|
52
|
+
title = "vibest: Subscriptions"
|
|
53
|
+
contexts = ["global"]
|
|
54
|
+
command = ["sh", "bin/vibest.sh", "pane", "subscriptions"]
|
|
55
|
+
|
|
56
|
+
[[actions]]
|
|
57
|
+
id = "palette"
|
|
58
|
+
title = "vibest: commands"
|
|
59
|
+
contexts = ["global", "workspace", "pane"]
|
|
60
|
+
command = ["sh", "bin/vibest.sh", "pane", "palette"]
|
|
61
|
+
|
|
62
|
+
[[panes]]
|
|
63
|
+
id = "run"
|
|
64
|
+
title = "vibest run"
|
|
65
|
+
placement = "popup"
|
|
66
|
+
width = "70%"
|
|
67
|
+
height = 16
|
|
68
|
+
command = ["sh", "bin/vibest.sh", "herdr", "run"]
|
|
69
|
+
|
|
70
|
+
[[panes]]
|
|
71
|
+
id = "runs"
|
|
72
|
+
title = "vibest Runs"
|
|
73
|
+
placement = "overlay"
|
|
74
|
+
command = ["sh", "bin/vibest.sh", "herdr", "runs"]
|
|
75
|
+
|
|
76
|
+
[[panes]]
|
|
77
|
+
id = "subscriptions"
|
|
78
|
+
title = "vibest Subscriptions"
|
|
79
|
+
placement = "overlay"
|
|
80
|
+
command = ["sh", "bin/vibest.sh", "herdr", "subscriptions"]
|
|
81
|
+
|
|
82
|
+
[[panes]]
|
|
83
|
+
id = "palette"
|
|
84
|
+
title = "vibest commands"
|
|
85
|
+
placement = "popup"
|
|
86
|
+
width = "70%"
|
|
87
|
+
height = "60%"
|
|
88
|
+
command = ["sh", "bin/vibest.sh", "herdr", "palette"]
|
package/package.json
CHANGED
|
@@ -1,38 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibest/cli",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.2-beta.2",
|
|
4
|
+
"description": "vibest: vibestd daemon and the vibest CLI. An entry session directing sessions in herdr panes.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vibest-dev/vibest.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
5
11
|
"bin": {
|
|
6
|
-
"vibest": "./
|
|
12
|
+
"vibest": "./bin/vibest.cjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"harnesses",
|
|
17
|
+
"herdr-plugin",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"imports": {
|
|
22
|
+
"#platform": {
|
|
23
|
+
"bun": "@vibest/platform-bun/bun"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": "./package.json"
|
|
7
28
|
},
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"@hono/node-server": "^1.19.5",
|
|
11
|
-
"@orpc/openapi": "^1.9.3",
|
|
12
|
-
"@orpc/server": "^1.9.1",
|
|
13
|
-
"ai": "^5.0.63",
|
|
14
|
-
"hono": "^4.9.12",
|
|
15
|
-
"uuid": "^13.0.0",
|
|
16
|
-
"ws": "^8.18.3",
|
|
17
|
-
"zod": "^3.25.61",
|
|
18
|
-
"@vibest/web": "0.0.1"
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
19
31
|
},
|
|
20
32
|
"devDependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
33
|
+
"@effect/platform-bun": "4.0.2",
|
|
34
|
+
"@effect/sql-sqlite-bun": "4.0.2",
|
|
35
|
+
"@vibest/builtins": "0.0.2-beta.2",
|
|
36
|
+
"@vibest/client": "0.0.2-beta.2",
|
|
37
|
+
"@vibest/core": "0.0.2-beta.2",
|
|
38
|
+
"@vibest/platform-bun": "0.0.2-beta.2",
|
|
39
|
+
"@vibest/plugin": "0.0.2-beta.2",
|
|
40
|
+
"@vibest/plugin-harnesses": "0.0.2-beta.2",
|
|
41
|
+
"@vibest/protocol": "0.0.2-beta.2",
|
|
42
|
+
"@vibest/runtime-herdr": "0.0.2-beta.2",
|
|
43
|
+
"@vibest/runtime-herdr-core": "0.0.2-beta.2",
|
|
44
|
+
"@vibest/schema": "0.0.2-beta.2",
|
|
45
|
+
"@vibest/server": "0.0.2-beta.2",
|
|
46
|
+
"effect": "4.0.2",
|
|
47
|
+
"effect-herdr-sdk": "0.0.2-beta.2"
|
|
27
48
|
},
|
|
28
|
-
"
|
|
29
|
-
"
|
|
49
|
+
"optionalDependencies": {
|
|
50
|
+
"@vibest/cli-darwin-arm64": "0.0.2-beta.2",
|
|
51
|
+
"@vibest/cli-linux-x64": "0.0.2-beta.2"
|
|
30
52
|
},
|
|
31
53
|
"scripts": {
|
|
32
|
-
"
|
|
33
|
-
"build": "
|
|
34
|
-
"
|
|
35
|
-
"typecheck": "
|
|
36
|
-
"
|
|
54
|
+
"build": "bun scripts/build.ts && bun scripts/build-harnesses.ts",
|
|
55
|
+
"build:darwin-arm64": "bun scripts/build.ts ../../packages/cli-darwin-arm64/bin/vibest bun-darwin-arm64",
|
|
56
|
+
"build:linux-x64": "bun scripts/build.ts ../../packages/cli-linux-x64/bin/vibest bun-linux-x64",
|
|
57
|
+
"typecheck": "tsrs --noEmit --fast",
|
|
58
|
+
"test": "cd ../.. && bun ./node_modules/vitest/vitest.mjs run packages/cli"
|
|
37
59
|
}
|
|
38
60
|
}
|
package/CHANGELOG.md
DELETED
package/src/cli.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { serve } from "@hono/node-server";
|
|
4
|
-
import { createServer } from "./server";
|
|
5
|
-
|
|
6
|
-
const app = createServer();
|
|
7
|
-
const server = serve({
|
|
8
|
-
fetch: app.fetch,
|
|
9
|
-
port: 4000,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
// graceful shutdown
|
|
13
|
-
process.on("SIGINT", () => {
|
|
14
|
-
server.close();
|
|
15
|
-
process.exit(0);
|
|
16
|
-
});
|
|
17
|
-
process.on("SIGTERM", () => {
|
|
18
|
-
server.close((err) => {
|
|
19
|
-
if (err) {
|
|
20
|
-
console.error(err);
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
process.exit(0);
|
|
24
|
-
});
|
|
25
|
-
});
|
package/src/server.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import path, { extname } from "node:path";
|
|
3
|
-
import { serveStatic } from "@hono/node-server/serve-static";
|
|
4
|
-
import { createFetchRPCHandler } from "@vibe-web/server-rpc";
|
|
5
|
-
import { Hono } from "hono";
|
|
6
|
-
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
const staticRoot = path.resolve(
|
|
9
|
-
path.dirname(require.resolve("@vibest/web/package.json")),
|
|
10
|
-
"dist",
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export function createServer() {
|
|
14
|
-
const handler = createFetchRPCHandler();
|
|
15
|
-
const app = new Hono();
|
|
16
|
-
app
|
|
17
|
-
.get("/api/health", (c) => c.json({ status: "ok" }))
|
|
18
|
-
.use("/api/rpc/*", async (c, next) => {
|
|
19
|
-
const { matched, response } = await handler(c.req.raw, {
|
|
20
|
-
prefix: "/api/rpc",
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
if (matched) {
|
|
24
|
-
return c.newResponse(response.body, response);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
await next();
|
|
28
|
-
})
|
|
29
|
-
.use(
|
|
30
|
-
"*",
|
|
31
|
-
serveStatic({
|
|
32
|
-
root: staticRoot,
|
|
33
|
-
rewriteRequestPath: (requestPath) =>
|
|
34
|
-
extname(requestPath) ? requestPath : "/index.html",
|
|
35
|
-
}),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
return app;
|
|
39
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vibe-web/typescript/base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
|
|
5
|
-
"incremental": true,
|
|
6
|
-
"composite": true,
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"moduleResolution": "Bundler",
|
|
9
|
-
"outDir": "dist"
|
|
10
|
-
},
|
|
11
|
-
"include": ["src"]
|
|
12
|
-
}
|
package/tsdown.config.ts
DELETED