umadev 1.0.0
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/README.md +58 -0
- package/bin/cli.js +127 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# UmaDev
|
|
2
|
+
|
|
3
|
+
> **AI 编码的项目总监 Agent** — drives the Claude Code / Codex you already
|
|
4
|
+
> logged into through a 9-phase commercial delivery pipeline.
|
|
5
|
+
> **No API key needed.**
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g umadev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
umadev # launch the interactive TUI
|
|
17
|
+
# (auto-detects logged-in claude / codex)
|
|
18
|
+
|
|
19
|
+
umadev init # write umadev.yaml spec manifest
|
|
20
|
+
|
|
21
|
+
umadev run "做一个登录系统" \
|
|
22
|
+
--backend claude-code # scripted form, no TUI
|
|
23
|
+
umadev continue # approve the active gate
|
|
24
|
+
umadev revise "去掉 OAuth" # request a revision
|
|
25
|
+
|
|
26
|
+
umadev verify # workspace conformance report
|
|
27
|
+
umadev doctor # self-test
|
|
28
|
+
umadev spec [--clauses] # print UMADEV_HOST_SPEC_V1
|
|
29
|
+
umadev report # emit UD-EVID-004 compliance map
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Why this exists
|
|
33
|
+
|
|
34
|
+
UmaDev is **not** an LLM client. It does not call any AI API.
|
|
35
|
+
Instead it **drives** the host CLI you already use (`claude`, `codex`)
|
|
36
|
+
through a deterministic 9-phase pipeline:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
research → docs → ⏸ docs_confirm → spec → frontend → ⏸ preview_confirm → backend → quality → delivery
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
At each `⏸ gate`, UmaDev pauses and surfaces the artifacts (PRD,
|
|
43
|
+
architecture, UIUX, …) for you to review. After every code-producing
|
|
44
|
+
phase it runs the project's build / test command (e.g. `cargo check`,
|
|
45
|
+
`npm install`) and records the outcome in `.umadev/audit/verify.jsonl`
|
|
46
|
+
so a non-technical user can ship stable code without writing any.
|
|
47
|
+
|
|
48
|
+
The result is a `release/proof-pack-*.zip` containing every artifact,
|
|
49
|
+
every gate decision, and every audit row.
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
Full docs, design rationale, and the UMADEV_HOST_SPEC_V1 spec:
|
|
54
|
+
<https://github.com/umacloud/umadev>
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
//
|
|
4
|
+
// umadev — thin JS shim. npm picks the matching `@umacloud/cli-*`
|
|
5
|
+
// platform sub-package (via optionalDependencies + the `os` / `cpu`
|
|
6
|
+
// fields in each sub-package). This shim resolves that sub-package's
|
|
7
|
+
// prebuilt Rust binary and exec's it with the user's argv.
|
|
8
|
+
//
|
|
9
|
+
// The shim is deliberately minimal:
|
|
10
|
+
// - no dependencies (zero install-time cost beyond node itself)
|
|
11
|
+
// - no parsing of argv (every flag goes straight to the binary)
|
|
12
|
+
// - stdio is inherited so the ratatui TUI gets a real TTY
|
|
13
|
+
|
|
14
|
+
'use strict';
|
|
15
|
+
|
|
16
|
+
const { spawnSync } = require('node:child_process');
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
|
+
|
|
20
|
+
// Node platform/arch → our sub-package name.
|
|
21
|
+
const PLATFORM_PACKAGES = {
|
|
22
|
+
'darwin-arm64': '@umacloud/cli-darwin-arm64',
|
|
23
|
+
'darwin-x64': '@umacloud/cli-darwin-x64',
|
|
24
|
+
'linux-x64': '@umacloud/cli-linux-x64',
|
|
25
|
+
'linux-arm64': '@umacloud/cli-linux-arm64',
|
|
26
|
+
'win32-x64': '@umacloud/cli-win32-x64',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function platformKey() {
|
|
30
|
+
return `${process.platform}-${process.arch}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function binaryName() {
|
|
34
|
+
return process.platform === 'win32' ? 'umadev.exe' : 'umadev';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function findBinary() {
|
|
38
|
+
const key = platformKey();
|
|
39
|
+
const pkg = PLATFORM_PACKAGES[key];
|
|
40
|
+
if (!pkg) {
|
|
41
|
+
const supported = Object.keys(PLATFORM_PACKAGES).join(', ');
|
|
42
|
+
console.error(
|
|
43
|
+
`umadev: unsupported platform ${key}. Supported: ${supported}.`,
|
|
44
|
+
);
|
|
45
|
+
console.error(
|
|
46
|
+
'Open an issue at https://github.com/umacloud/umadev/issues',
|
|
47
|
+
);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
const bin = binaryName();
|
|
51
|
+
|
|
52
|
+
// 1) Published case — npm installed the sibling platform package.
|
|
53
|
+
try {
|
|
54
|
+
return require.resolve(`${pkg}/bin/${bin}`);
|
|
55
|
+
} catch (_) {
|
|
56
|
+
/* fall through */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 2) Local dev — both packages live as siblings under npm/.
|
|
60
|
+
const sibling = path.resolve(
|
|
61
|
+
__dirname,
|
|
62
|
+
'..',
|
|
63
|
+
'..',
|
|
64
|
+
`cli-${process.platform}-${process.arch}`,
|
|
65
|
+
'bin',
|
|
66
|
+
bin,
|
|
67
|
+
);
|
|
68
|
+
if (fs.existsSync(sibling)) return sibling;
|
|
69
|
+
|
|
70
|
+
console.error(
|
|
71
|
+
`umadev: ${pkg} not installed.\n` +
|
|
72
|
+
'Try: npm install -g umadev --force\n' +
|
|
73
|
+
"(npm 'optionalDependencies' should normally pick the right one.)",
|
|
74
|
+
);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Resolve the platform-independent bundled embedding model (a regular
|
|
79
|
+
// dependency, shipped once for all platforms). Pointing the binary at it via
|
|
80
|
+
// UMADEV_EMBED_MODEL_DIR enables offline local embeddings with zero user setup.
|
|
81
|
+
// Fail-open: if the model package is absent the binary degrades to BM25.
|
|
82
|
+
function findModelDir() {
|
|
83
|
+
try {
|
|
84
|
+
return path.dirname(require.resolve('@umacloud/model-e5-small/package.json'));
|
|
85
|
+
} catch (_) {
|
|
86
|
+
const sibling = path.resolve(__dirname, '..', '..', 'model-e5-small');
|
|
87
|
+
if (fs.existsSync(path.join(sibling, 'tokenizer.json'))) return sibling;
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Resolve the platform-independent bundled knowledge corpus (a regular
|
|
93
|
+
// dependency). Pointing the binary at it via UMADEV_KNOWLEDGE_DIR means end
|
|
94
|
+
// users get the full curated 400+ file KB even in a bare project; the project's
|
|
95
|
+
// own knowledge/ (if any) still wins. Fail-open: absent -> BM25 over nothing.
|
|
96
|
+
function findKnowledgeDir() {
|
|
97
|
+
try {
|
|
98
|
+
return path.dirname(require.resolve('@umacloud/knowledge/package.json'));
|
|
99
|
+
} catch (_) {
|
|
100
|
+
const sibling = path.resolve(__dirname, '..', '..', '..', 'knowledge');
|
|
101
|
+
if (fs.existsSync(path.join(sibling, 'frontend'))) return sibling;
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const binary = findBinary();
|
|
107
|
+
const extraEnv = {};
|
|
108
|
+
const modelDir = findModelDir();
|
|
109
|
+
if (modelDir && !process.env.UMADEV_EMBED_MODEL_DIR) {
|
|
110
|
+
extraEnv.UMADEV_EMBED_MODEL_DIR = modelDir;
|
|
111
|
+
}
|
|
112
|
+
const knowledgeDir = findKnowledgeDir();
|
|
113
|
+
if (knowledgeDir && !process.env.UMADEV_KNOWLEDGE_DIR) {
|
|
114
|
+
extraEnv.UMADEV_KNOWLEDGE_DIR = knowledgeDir;
|
|
115
|
+
}
|
|
116
|
+
const spawnOpts = { stdio: 'inherit' };
|
|
117
|
+
if (Object.keys(extraEnv).length > 0) {
|
|
118
|
+
spawnOpts.env = { ...process.env, ...extraEnv };
|
|
119
|
+
}
|
|
120
|
+
const result = spawnSync(binary, process.argv.slice(2), spawnOpts);
|
|
121
|
+
|
|
122
|
+
if (result.error) {
|
|
123
|
+
console.error(`umadev: failed to exec binary: ${result.error.message}`);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "umadev",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A project-director Agent for AI coding hosts — drives your logged-in Claude Code / Codex through a 9-phase commercial delivery pipeline with governance. No API key needed.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"codex",
|
|
9
|
+
"tui",
|
|
10
|
+
"rust",
|
|
11
|
+
"agent",
|
|
12
|
+
"orchestrator",
|
|
13
|
+
"spec-driven",
|
|
14
|
+
"audit"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/umacloud/umadev",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/umacloud/umadev.git"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/umacloud/umadev/issues"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Shangyan Technology <11964948@qq.com>",
|
|
26
|
+
"bin": {
|
|
27
|
+
"umadev": "bin/cli.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin/",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"optionalDependencies": {
|
|
37
|
+
"@umacloud/cli-darwin-arm64": "1.0.0",
|
|
38
|
+
"@umacloud/cli-darwin-x64": "1.0.0",
|
|
39
|
+
"@umacloud/cli-linux-x64": "1.0.0",
|
|
40
|
+
"@umacloud/cli-linux-arm64": "1.0.0",
|
|
41
|
+
"@umacloud/cli-win32-x64": "1.0.0",
|
|
42
|
+
"@umacloud/model-e5-small": "1.0.0",
|
|
43
|
+
"@umacloud/knowledge": "1.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|