@nguyenhuumanh/vyen 0.0.0-stage → 0.2.23
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/NOTICE.md +25 -0
- package/README.md +86 -3
- package/bin/vyen.mjs +3 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.js +2337 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +63 -0
- package/dist/config.js +164 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +64 -0
- package/dist/context.js +491 -0
- package/dist/context.js.map +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -0
- package/dist/files.d.ts +57 -0
- package/dist/files.js +685 -0
- package/dist/files.js.map +1 -0
- package/dist/harness.d.ts +94 -0
- package/dist/harness.js +586 -0
- package/dist/harness.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +139 -0
- package/dist/mcp.js +932 -0
- package/dist/mcp.js.map +1 -0
- package/dist/migrate.d.ts +24 -0
- package/dist/migrate.js +109 -0
- package/dist/migrate.js.map +1 -0
- package/dist/process.d.ts +11 -0
- package/dist/process.js +106 -0
- package/dist/process.js.map +1 -0
- package/dist/provider.d.ts +19 -0
- package/dist/provider.js +247 -0
- package/dist/provider.js.map +1 -0
- package/dist/reasoning.d.ts +31 -0
- package/dist/reasoning.js +130 -0
- package/dist/reasoning.js.map +1 -0
- package/dist/session.d.ts +141 -0
- package/dist/session.js +307 -0
- package/dist/session.js.map +1 -0
- package/dist/setup.d.ts +17 -0
- package/dist/setup.js +181 -0
- package/dist/setup.js.map +1 -0
- package/dist/subagents.d.ts +89 -0
- package/dist/subagents.js +720 -0
- package/dist/subagents.js.map +1 -0
- package/dist/tools.d.ts +99 -0
- package/dist/tools.js +545 -0
- package/dist/tools.js.map +1 -0
- package/dist/tui.d.ts +278 -0
- package/dist/tui.js +2507 -0
- package/dist/tui.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/docs/MCP.md +84 -0
- package/docs/REFERENCE_REVIEW.md +134 -0
- package/docs/SPEC.md +98 -0
- package/docs/VALIDATION.md +160 -0
- package/npm-shrinkwrap.json +1824 -0
- package/package.json +65 -6
- package/scripts/pack-release.mjs +60 -0
- package/scripts/publish-release.mjs +72 -0
- package/scripts/release-version.mjs +34 -0
- package/src/cli.ts +2212 -0
- package/src/config.ts +160 -0
- package/src/context.ts +533 -0
- package/src/errors.ts +5 -0
- package/src/files.ts +631 -0
- package/src/harness.ts +572 -0
- package/src/index.ts +42 -0
- package/src/mcp.ts +962 -0
- package/src/migrate.ts +116 -0
- package/src/process.ts +91 -0
- package/src/provider.ts +269 -0
- package/src/reasoning.ts +106 -0
- package/src/session.ts +259 -0
- package/src/setup.ts +225 -0
- package/src/subagents.ts +851 -0
- package/src/tools.ts +532 -0
- package/src/tui.ts +2552 -0
- package/src/version.ts +5 -0
- package/tsconfig.json +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vyen contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Project identity and references
|
|
2
|
+
|
|
3
|
+
Vyen CLI is an independent implementation. It is not an official Z.ai,
|
|
4
|
+
DeepSeek, Anthropic or OpenAI product. No ZCode or DeepSeek Harness runtime
|
|
5
|
+
source is copied into this distribution or used as a dependency.
|
|
6
|
+
|
|
7
|
+
Design references inspected for version 0.1.0:
|
|
8
|
+
|
|
9
|
+
- [ZCode](https://github.com/zai-org/ZCode), commit
|
|
10
|
+
`aac4755666d09fdcd70272fcf063c077a639015f` (Apache-2.0): separation of
|
|
11
|
+
model/provider, runtime, permission, tool and persistence boundaries;
|
|
12
|
+
explicit ownership of session history and configuration.
|
|
13
|
+
- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), commit
|
|
14
|
+
`86a402200d95fecef4529d969836f1fe13c6cb0d` (MIT): replaceable capability
|
|
15
|
+
interfaces, bounded parallel-safe tool scheduling, exclusive mutation
|
|
16
|
+
barriers, ordered results and conservative recovery after interruption.
|
|
17
|
+
|
|
18
|
+
Vyen uses the Vercel AI SDK and its provider adapters for protocol handling.
|
|
19
|
+
Dependencies retain their own licenses in their installed package directories.
|
|
20
|
+
The implementation and build process use no official Claude Code binary.
|
|
21
|
+
|
|
22
|
+
A deeper stream/subagent review for 0.2.1 rechecked ZCode at the same commit
|
|
23
|
+
and DeepSeek Harness at `1517a4dbca0a2789ff1d41ba439600f8547d23fa`.
|
|
24
|
+
See [docs/REFERENCE_REVIEW.md](docs/REFERENCE_REVIEW.md) for exact source links,
|
|
25
|
+
contracts adopted, independent compatibility choices and remaining scope.
|
package/README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# vyen
|
|
2
|
+
|
|
3
|
+
An independent terminal coding agent. It talks to OpenAI-compatible, OpenAI
|
|
4
|
+
Responses and Anthropic endpoints, reads and edits files in your workspace,
|
|
5
|
+
runs shell commands with your approval, speaks MCP, and can delegate work to
|
|
6
|
+
subagents.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g vyen
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Requires Node.js >= 22.16.0. Verified on Linux; the primary target is Termux on
|
|
15
|
+
Android.
|
|
16
|
+
|
|
17
|
+
A release tarball with the same contents is also attached to every GitHub
|
|
18
|
+
release, for machines that cannot reach the npm registry.
|
|
19
|
+
|
|
20
|
+
## Configure
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
vyen setup
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`vyen setup` writes `~/.config/vyen/config.json`. The API key is never written
|
|
27
|
+
to the config file — it is read from the environment variable named by
|
|
28
|
+
`keyEnv` (default `VYEN_API_KEY`) or from `~/.config/vyen/credentials.json`.
|
|
29
|
+
|
|
30
|
+
## Run
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
vyen # interactive
|
|
34
|
+
vyen "fix the failing test" # one shot
|
|
35
|
+
vyen --read-only # no writes, no shell
|
|
36
|
+
vyen --plan # plan first, then implement
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
| Variable | Meaning | Default |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `VYEN_API_KEY` | API key | — |
|
|
44
|
+
| `VYEN_BASE_URL` | Gateway base URL | `https://api.yuristore.xyz/v1` |
|
|
45
|
+
| `VYEN_MODEL` | Model id | — |
|
|
46
|
+
| `VYEN_PROVIDER` | `openai-compatible`, `openai-responses`, `anthropic` | `openai-compatible` |
|
|
47
|
+
| `VYEN_EFFORT` | `low`, `medium`, `high`, `xhigh`, `max` | provider default |
|
|
48
|
+
| `VYEN_CONTEXT_WINDOW` | Context window in tokens | `128000` |
|
|
49
|
+
| `VYEN_MAX_OUTPUT_TOKENS` | Output cap per response | `16384` |
|
|
50
|
+
| `VYEN_TIMEOUT_MS` | Per-request timeout | `300000` |
|
|
51
|
+
| `VYEN_RUN_TOKEN_BUDGET` | Token cap for one run, `0` disables | `0` |
|
|
52
|
+
| `VYEN_INLINE_REASONING` | `leading-think` or `off` | `leading-think` |
|
|
53
|
+
| `VYEN_BASH` | Path to bash on Windows | auto-detected |
|
|
54
|
+
|
|
55
|
+
The older `GOON_*` names still work, so existing shell profiles keep running.
|
|
56
|
+
A `goon` installation's `~/.config/goon` and `~/.local/share/goon` are copied
|
|
57
|
+
into their `vyen` counterparts on the first launch; the old directories are left
|
|
58
|
+
in place.
|
|
59
|
+
|
|
60
|
+
## Permissions
|
|
61
|
+
|
|
62
|
+
Mutating tools and shell commands need approval. `--yes` approves everything
|
|
63
|
+
for that run; `--read-only` removes them entirely; `--plan` allows exploration
|
|
64
|
+
first. A denied tool ends the run with exit code 2.
|
|
65
|
+
|
|
66
|
+
## MCP
|
|
67
|
+
|
|
68
|
+
Servers live in `~/.config/vyen/mcp.json`, separate from the main config. See
|
|
69
|
+
[docs/MCP.md](docs/MCP.md).
|
|
70
|
+
|
|
71
|
+
## Sessions
|
|
72
|
+
|
|
73
|
+
Sessions are stored as JSON under `~/.local/share/vyen/sessions/`. `vyen
|
|
74
|
+
sessions` lists them and `vyen resume` reopens one.
|
|
75
|
+
|
|
76
|
+
## Documentation
|
|
77
|
+
|
|
78
|
+
- [docs/SPEC.md](docs/SPEC.md) — boundaries and contracts
|
|
79
|
+
- [docs/MCP.md](docs/MCP.md) — MCP configuration and limits
|
|
80
|
+
- [docs/VALIDATION.md](docs/VALIDATION.md) — what the test suite covers
|
|
81
|
+
- [docs/REFERENCE_REVIEW.md](docs/REFERENCE_REVIEW.md) — design references and
|
|
82
|
+
the reasoning behind the stream and subagent contracts
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT
|
package/bin/vyen.mjs
ADDED
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type EffortLevel } from './config.js';
|
|
2
|
+
import type { PermissionMode } from './tools.js';
|
|
3
|
+
export declare function welcomeBanner(model: string, provider: string, baseUrl: string, effort: EffortLevel | undefined, cwd: string, sessionId: string, mode: PermissionMode): string;
|
|
4
|
+
/** Reads the current git branch (or short detached SHA) without spawning git; undefined outside a repo. */
|
|
5
|
+
export declare function readGitBranch(cwd: string): string | undefined;
|
|
6
|
+
export declare function extractCopyableFromMessages(messages: Array<{
|
|
7
|
+
role: string;
|
|
8
|
+
content: unknown;
|
|
9
|
+
}>, selector?: string): {
|
|
10
|
+
text: string;
|
|
11
|
+
label: string;
|
|
12
|
+
} | undefined;
|
|
13
|
+
export declare function main(argv?: string[]): Promise<void>;
|