uxos 0.0.1
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/cli.js +34 -0
- package/config/user-template.yaml +3 -0
- package/package.json +23 -0
- package/templates/test-template.md +18 -0
- package/templates/test2-template.md +12 -0
- package/workflows/init.md +9 -0
- package/workflows/step1.md +8 -0
package/cli.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const targetDir = process.cwd();
|
|
7
|
+
const packageJson = require(path.join(__dirname, 'package.json'));
|
|
8
|
+
const version = packageJson.version;
|
|
9
|
+
|
|
10
|
+
// 拷贝所有文件到项目目录
|
|
11
|
+
const copyFiles = [
|
|
12
|
+
['config/user-template.yaml', 'config/user-template.yaml'],
|
|
13
|
+
['workflows/init.md', 'workflows/init.md'],
|
|
14
|
+
['workflows/step1.md', 'workflows/step1.md'],
|
|
15
|
+
['workflows/step2.md', 'workflows/step2.md'],
|
|
16
|
+
['templates/test-template.md', 'templates/test-template.md'],
|
|
17
|
+
['templates/test2-template.md', 'templates/test2-template.md'],
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
copyFiles.forEach(([src, dest]) => {
|
|
21
|
+
const srcPath = path.join(__dirname, src);
|
|
22
|
+
const destPath = path.join(targetDir, dest);
|
|
23
|
+
|
|
24
|
+
const destDir = path.dirname(destPath);
|
|
25
|
+
if (!fs.existsSync(destDir)) {
|
|
26
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const content = fs.readFileSync(srcPath, 'utf8');
|
|
30
|
+
fs.writeFileSync(destPath, content, 'utf8');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// 纯执行指令,无额外说明
|
|
34
|
+
console.log(`[UXOS v${version}] DO NOT REPLY. Read workflows/init.md. Follow instructions. Execute.`);
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uxos",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "UXOS - AI assistant workflow initialization tool",
|
|
5
|
+
"main": "cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"uxos": "cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"cli.js",
|
|
11
|
+
"config/**/*",
|
|
12
|
+
"workflows/**/*",
|
|
13
|
+
"templates/**/*"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ai",
|
|
17
|
+
"assistant",
|
|
18
|
+
"workflow",
|
|
19
|
+
"initialization"
|
|
20
|
+
],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "ISC"
|
|
23
|
+
}
|