@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.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +25 -0
  3. package/README.md +86 -3
  4. package/bin/vyen.mjs +3 -0
  5. package/dist/cli.d.ts +13 -0
  6. package/dist/cli.js +2337 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/config.d.ts +63 -0
  9. package/dist/config.js +164 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/context.d.ts +64 -0
  12. package/dist/context.js +491 -0
  13. package/dist/context.js.map +1 -0
  14. package/dist/errors.d.ts +1 -0
  15. package/dist/errors.js +7 -0
  16. package/dist/errors.js.map +1 -0
  17. package/dist/files.d.ts +57 -0
  18. package/dist/files.js +685 -0
  19. package/dist/files.js.map +1 -0
  20. package/dist/harness.d.ts +94 -0
  21. package/dist/harness.js +586 -0
  22. package/dist/harness.js.map +1 -0
  23. package/dist/index.d.ts +25 -0
  24. package/dist/index.js +15 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/mcp.d.ts +139 -0
  27. package/dist/mcp.js +932 -0
  28. package/dist/mcp.js.map +1 -0
  29. package/dist/migrate.d.ts +24 -0
  30. package/dist/migrate.js +109 -0
  31. package/dist/migrate.js.map +1 -0
  32. package/dist/process.d.ts +11 -0
  33. package/dist/process.js +106 -0
  34. package/dist/process.js.map +1 -0
  35. package/dist/provider.d.ts +19 -0
  36. package/dist/provider.js +247 -0
  37. package/dist/provider.js.map +1 -0
  38. package/dist/reasoning.d.ts +31 -0
  39. package/dist/reasoning.js +130 -0
  40. package/dist/reasoning.js.map +1 -0
  41. package/dist/session.d.ts +141 -0
  42. package/dist/session.js +307 -0
  43. package/dist/session.js.map +1 -0
  44. package/dist/setup.d.ts +17 -0
  45. package/dist/setup.js +181 -0
  46. package/dist/setup.js.map +1 -0
  47. package/dist/subagents.d.ts +89 -0
  48. package/dist/subagents.js +720 -0
  49. package/dist/subagents.js.map +1 -0
  50. package/dist/tools.d.ts +99 -0
  51. package/dist/tools.js +545 -0
  52. package/dist/tools.js.map +1 -0
  53. package/dist/tui.d.ts +278 -0
  54. package/dist/tui.js +2507 -0
  55. package/dist/tui.js.map +1 -0
  56. package/dist/version.d.ts +1 -0
  57. package/dist/version.js +5 -0
  58. package/dist/version.js.map +1 -0
  59. package/docs/MCP.md +84 -0
  60. package/docs/REFERENCE_REVIEW.md +134 -0
  61. package/docs/SPEC.md +98 -0
  62. package/docs/VALIDATION.md +160 -0
  63. package/npm-shrinkwrap.json +1824 -0
  64. package/package.json +65 -6
  65. package/scripts/pack-release.mjs +60 -0
  66. package/scripts/publish-release.mjs +72 -0
  67. package/scripts/release-version.mjs +34 -0
  68. package/src/cli.ts +2212 -0
  69. package/src/config.ts +160 -0
  70. package/src/context.ts +533 -0
  71. package/src/errors.ts +5 -0
  72. package/src/files.ts +631 -0
  73. package/src/harness.ts +572 -0
  74. package/src/index.ts +42 -0
  75. package/src/mcp.ts +962 -0
  76. package/src/migrate.ts +116 -0
  77. package/src/process.ts +91 -0
  78. package/src/provider.ts +269 -0
  79. package/src/reasoning.ts +106 -0
  80. package/src/session.ts +259 -0
  81. package/src/setup.ts +225 -0
  82. package/src/subagents.ts +851 -0
  83. package/src/tools.ts +532 -0
  84. package/src/tui.ts +2552 -0
  85. package/src/version.ts +5 -0
  86. 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
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { main } from '../dist/cli.js';
3
+ await main();
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>;