@dazitech/cli 3.0.5 → 3.0.7
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 +1 -1
- package/dist/clis/dazi-app.js +16 -13
- package/dist/clis/dazi-flow.js +48 -28
- package/dist/clis/dazi-onto.js +7 -6
- package/dist/clis/dazi.js +9 -8
- package/dist/docs/flow/ai-workflow-playbook.md +4 -2
- package/dist/docs/flow/flow-project-guide.md +9 -5
- package/dist/docs/flow/flows-guide.md +2 -2
- package/dist/docs/flow/node-code-guide.md +408 -401
- package/dist/docs/flow/run-guide.md +13 -6
- package/dist/docs/flow/variables-guide.md +407 -406
- package/dist/docs/guides/troubleshooting.md +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/examples/index.json +1 -1
- package/dist/prompts/flow/ai-workflow-playbook.md +4 -2
- package/dist/prompts/flow/flow-design.md +12 -9
- package/dist/prompts/flow/run-fix-loop.md +37 -22
- package/dist/prompts/index.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/clis/dazi-app.js
CHANGED
|
@@ -3057,7 +3057,7 @@ function fromLegacyAuthFile() {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
return null;
|
|
3059
3059
|
}
|
|
3060
|
-
function
|
|
3060
|
+
function loadAuth2() {
|
|
3061
3061
|
return fromV3AuthFile() ?? fromLegacyAuthFile();
|
|
3062
3062
|
}
|
|
3063
3063
|
function saveAuth(cfg) {
|
|
@@ -12827,7 +12827,7 @@ __export(templateRemote_exports, {
|
|
|
12827
12827
|
fetchRemoteTemplateToDir: () => fetchRemoteTemplateToDir
|
|
12828
12828
|
});
|
|
12829
12829
|
async function fetchTemplateBodyZip(templateId, version) {
|
|
12830
|
-
const auth =
|
|
12830
|
+
const auth = loadAuth2();
|
|
12831
12831
|
if (!auth?.accessToken) {
|
|
12832
12832
|
throw new Error("\u8BF7\u5148 dazi-app auth login\uFF08\u62C9\u53D6\u670D\u52A1\u7AEF\u6B63\u6587\u9700\u8981\u767B\u5F55\uFF09");
|
|
12833
12833
|
}
|
|
@@ -13076,10 +13076,13 @@ var {
|
|
|
13076
13076
|
Help
|
|
13077
13077
|
} = import_index.default;
|
|
13078
13078
|
|
|
13079
|
+
// cli/shared/src/version.ts
|
|
13080
|
+
var DAZI_VERSION = true ? "3.0.7" : readDevVersion();
|
|
13081
|
+
|
|
13079
13082
|
// cli/dazi-app/src/lib/httpClient.ts
|
|
13080
13083
|
init_config();
|
|
13081
13084
|
async function apiRequest(method, path31, opts) {
|
|
13082
|
-
const auth =
|
|
13085
|
+
const auth = loadAuth2();
|
|
13083
13086
|
const base = (opts?.baseUrl || auth?.baseUrl || "http://localhost:8001/api").replace(
|
|
13084
13087
|
/\/$/,
|
|
13085
13088
|
""
|
|
@@ -14622,7 +14625,7 @@ function collectSourceSnapshot(cwd) {
|
|
|
14622
14625
|
// cli/dazi-app/src/commands/upload.ts
|
|
14623
14626
|
function registerUpload(program3) {
|
|
14624
14627
|
program3.command("upload").description("\u6253\u5305\u5E76\u4E0A\u4F20\u5230 Registry\uFF08\u65E0 app \u5219\u5148 create\uFF09").option("--cwd <dir>", "DRAP \u9879\u76EE\u76EE\u5F55\uFF08\u9ED8\u8BA4\u81EA\u52A8\u8BC6\u522B\uFF1Ashell \u76EE\u5F55\u6216\u542B manifest.json \u7684\u7956\u5148\uFF09").option("--space <id>", "\u6570\u636E\u7A7A\u95F4 id\uFF08\u5FC5\u586B\uFF0C\u9996\u6B21 create\uFF09").option("--activate", "\u4E0A\u4F20\u540E\u6FC0\u6D3B", false).option("--changelog <text>", "\u53D8\u66F4\u8BF4\u660E").option("--file <path>", "\u5DF2\u6709 .dazi-app\uFF0C\u8DF3\u8FC7 package").option("--skip-validate", "\u8DF3\u8FC7 manifest \u6821\u9A8C\uFF08\u4E0D\u63A8\u8350\uFF09").option("--no-source", "\u4E0D\u4E0A\u4F20\u6E90\u7801\u5FEB\u7167\uFF08\u9ED8\u8BA4\u4E0A\u4F20\uFF0C\u4F9B release \u8F6C\u6A21\u677F\uFF09").option("--json").action(async (opts) => {
|
|
14625
|
-
if (!
|
|
14628
|
+
if (!loadAuth2()) throw new Error("\u8BF7\u5148 dazi-app auth login");
|
|
14626
14629
|
const cwd = requireProjectCwd(opts.cwd);
|
|
14627
14630
|
const manifestEarly = JSON.parse(
|
|
14628
14631
|
import_node_fs13.default.readFileSync(import_node_path12.default.join(cwd, "manifest.json"), "utf8")
|
|
@@ -14740,7 +14743,7 @@ function readAppId(explicitCwd) {
|
|
|
14740
14743
|
}
|
|
14741
14744
|
function attachReleaseCommands(rel) {
|
|
14742
14745
|
rel.command("list").option("--cwd <dir>", "DRAP \u9879\u76EE\u76EE\u5F55\uFF08\u9ED8\u8BA4\u8BC6\u522B shell \u76EE\u5F55\uFF09").option("--json").action(async (opts) => {
|
|
14743
|
-
if (!
|
|
14746
|
+
if (!loadAuth2()) throw new Error("\u8BF7\u5148\u767B\u5F55");
|
|
14744
14747
|
const appId = readAppId(opts.cwd);
|
|
14745
14748
|
const out = await apiRequest(
|
|
14746
14749
|
"GET",
|
|
@@ -14749,7 +14752,7 @@ function attachReleaseCommands(rel) {
|
|
|
14749
14752
|
printJsonSummary({ ok: true, app_id: appId, ...out }, !!opts.json);
|
|
14750
14753
|
});
|
|
14751
14754
|
rel.command("activate").argument("<semver>", "\u7248\u672C\u53F7").option("--cwd <dir>", "DRAP \u9879\u76EE\u76EE\u5F55\uFF08\u9ED8\u8BA4\u8BC6\u522B shell \u76EE\u5F55\uFF09").option("--json").action(async (semver, opts) => {
|
|
14752
|
-
if (!
|
|
14755
|
+
if (!loadAuth2()) throw new Error("\u8BF7\u5148\u767B\u5F55");
|
|
14753
14756
|
const appId = readAppId(opts.cwd);
|
|
14754
14757
|
const listed = await apiRequest(
|
|
14755
14758
|
"GET",
|
|
@@ -14764,7 +14767,7 @@ function attachReleaseCommands(rel) {
|
|
|
14764
14767
|
printJsonSummary({ ok: true, activated }, !!opts.json);
|
|
14765
14768
|
});
|
|
14766
14769
|
rel.command("revoke").argument("<semver>", "\u7248\u672C\u53F7").option("--cwd <dir>", "DRAP \u9879\u76EE\u76EE\u5F55\uFF08\u9ED8\u8BA4\u8BC6\u522B shell \u76EE\u5F55\uFF09").option("--json").action(async (semver, opts) => {
|
|
14767
|
-
if (!
|
|
14770
|
+
if (!loadAuth2()) throw new Error("\u8BF7\u5148\u767B\u5F55");
|
|
14768
14771
|
const appId = readAppId(opts.cwd);
|
|
14769
14772
|
const listed = await apiRequest(
|
|
14770
14773
|
"GET",
|
|
@@ -14857,7 +14860,7 @@ function registerTemplates(program3) {
|
|
|
14857
14860
|
source_ref: t.dirName
|
|
14858
14861
|
}));
|
|
14859
14862
|
let remote = [];
|
|
14860
|
-
if (opts.remote &&
|
|
14863
|
+
if (opts.remote && loadAuth2()) {
|
|
14861
14864
|
try {
|
|
14862
14865
|
const out = await apiRequest("GET", "/runtime-apps/templates");
|
|
14863
14866
|
remote = (out.items || []).map((r) => ({
|
|
@@ -14887,7 +14890,7 @@ function registerTemplates(program3) {
|
|
|
14887
14890
|
printJsonSummary({ ok: true, items: merged, total: merged.length }, !!opts.json);
|
|
14888
14891
|
});
|
|
14889
14892
|
tpl.command("from-release").description("\u4ECE Registry release \u6E90\u7801\u5FEB\u7167\u521B\u5EFA\u52A8\u6001\u5E94\u7528\u6A21\u677F\uFF08\u670D\u52A1\u7AEF\u5B58\u50A8\uFF09").requiredOption("--id <template_id>", "\u65B0\u6A21\u677F id\uFF08\u5C0F\u5199\u8FDE\u5B57\u7B26\uFF09").requiredOption("--name <n>", "\u6A21\u677F\u663E\u793A\u540D\u79F0").option("--release-id <id>", "\u6307\u5B9A release id\uFF08\u9ED8\u8BA4\u7528 app \u6FC0\u6D3B\u7248\u672C\uFF09").option("--app-id <id>", "\u5E94\u7528 id\uFF08\u4E0E --release-id \u4E8C\u9009\u4E00\uFF09").option("--category <c>", "\u5206\u7C7B\uFF1A\u5206\u6790 / \u7BA1\u7406 / \u76D1\u63A7 / \u804A\u5929").option("--scene-tag <t>", "\u573A\u666F tag").option("--description <d>", "\u7B80\u4ECB").option("--version <v>", "\u6A21\u677F\u7248\u672C", "0.1.0").option("--json").action(async (opts) => {
|
|
14890
|
-
if (!
|
|
14893
|
+
if (!loadAuth2()) throw new Error("\u8BF7\u5148 dazi-app auth login");
|
|
14891
14894
|
if (!opts.releaseId && !opts.appId) {
|
|
14892
14895
|
throw new Error("\u8BF7\u63D0\u4F9B --release-id \u6216 --app-id");
|
|
14893
14896
|
}
|
|
@@ -15546,7 +15549,7 @@ function registerInit(program3) {
|
|
|
15546
15549
|
init_config();
|
|
15547
15550
|
function registerWhoami(program3) {
|
|
15548
15551
|
program3.command("whoami").description("\u5F53\u524D\u767B\u5F55\u7528\u6237\u4E0E API \u57FA\u5740").option("--json").action(async (opts) => {
|
|
15549
|
-
const auth =
|
|
15552
|
+
const auth = loadAuth2();
|
|
15550
15553
|
if (!auth?.accessToken) {
|
|
15551
15554
|
throw new Error("\u672A\u767B\u5F55\uFF0C\u8BF7\u5148 dazi-app auth login");
|
|
15552
15555
|
}
|
|
@@ -15933,7 +15936,7 @@ var import_node_path27 = __toESM(require("node:path"), 1);
|
|
|
15933
15936
|
init_config();
|
|
15934
15937
|
function runDoctor(cwd) {
|
|
15935
15938
|
const checks = [];
|
|
15936
|
-
const auth =
|
|
15939
|
+
const auth = loadAuth2();
|
|
15937
15940
|
if (auth) {
|
|
15938
15941
|
checks.push({
|
|
15939
15942
|
id: "auth",
|
|
@@ -16222,7 +16225,7 @@ async function postPreview(kind, body) {
|
|
|
16222
16225
|
return res.dataset;
|
|
16223
16226
|
}
|
|
16224
16227
|
async function runInlinePreview(opts) {
|
|
16225
|
-
if (!
|
|
16228
|
+
if (!loadAuth2()) {
|
|
16226
16229
|
throw new Error("\u8BF7\u5148 dazi-app auth login");
|
|
16227
16230
|
}
|
|
16228
16231
|
const { text, sizeBytes } = readInlineAssetFile(opts.appDir, opts.decl.source);
|
|
@@ -16753,7 +16756,7 @@ function registerLegacyCompatCommands(program3) {
|
|
|
16753
16756
|
var program2 = new Command();
|
|
16754
16757
|
program2.name("dazi-app").description(
|
|
16755
16758
|
"\u642D\u5B50 App CLI \u2014 DRAP \u524D\u7AEF\u5E94\u7528\uFF08manifest / build / upload / preview\uFF09"
|
|
16756
|
-
).version(
|
|
16759
|
+
).version(DAZI_VERSION, "-v, --version");
|
|
16757
16760
|
registerAuth(program2);
|
|
16758
16761
|
registerBuild(program2);
|
|
16759
16762
|
registerDev(program2);
|
package/dist/clis/dazi-flow.js
CHANGED
|
@@ -3578,6 +3578,7 @@ function buildFlowConsistencyMarkdown(audit, localFilesSpecLink = "../../\u8D44\
|
|
|
3578
3578
|
'| **\u65B0\u589E\u4EE3\u7801\u8282\u70B9** | `dazi flow node new --type <type> --dir . --label "<\u540D>"` \u2192 \u6539\u914D\u7F6E \u2192 `push --canvas` \u2192 \u5199 code \u2192 `node push` |',
|
|
3579
3579
|
"",
|
|
3580
3580
|
"> \u7981\u6B62\u53EA\u6539 `flow.json` \u800C\u4E0D\u66F4\u65B0 `flow.meta.json`\uFF08\u987B `node new` / `pull` / `repair-meta`\uFF09\u3002",
|
|
3581
|
+
"> \u6539 `code.*` \u540E\u9A8C\u8BC1\u987A\u5E8F\uFF1A**`node push` \u2192 `node-exec` \u2192 `variable pull`**\uFF08\u6709\u8F93\u51FA\u53D8\u91CF\u65F6\uFF09\uFF1B`node-exec` \u6267\u884C\u5E73\u53F0\u5DF2 push \u7684\u4EE3\u7801\u3002",
|
|
3581
3582
|
""
|
|
3582
3583
|
);
|
|
3583
3584
|
return lines;
|
|
@@ -3707,11 +3708,15 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3707
3708
|
"",
|
|
3708
3709
|
"\u4E0D\u4F9D\u8D56\u7EC8\u7AEF\u5F53\u524D\u76EE\u5F55\uFF0C\u907F\u514D `cd` \u5230\u9519\u8BEF\u6D41\u7A0B\uFF1A",
|
|
3709
3710
|
"",
|
|
3711
|
+
"> \u6539 `code.*` \u540E\u6D4B\u8BD5\u987A\u5E8F\uFF1A**`node push` \u2192 `node-exec` \u2192 `variable pull`**\uFF08\u6709 `output_variable_name` \u65F6\uFF09\uFF1B`node-exec` \u4E0D\u8BFB\u672C\u5730\u672A\u63D0\u4EA4\u4EE3\u7801\u3002",
|
|
3712
|
+
"",
|
|
3710
3713
|
"```powershell",
|
|
3711
3714
|
(0, flowCliText_1.psFlowLine)(`project status --dir "${absDir}"`),
|
|
3712
3715
|
(0, flowCliText_1.psFlowLine)(`project pull --flow ${opts.flowId} --dir "${absDir}"`),
|
|
3713
3716
|
(0, flowCliText_1.psFlowLine)(`project push --dir "${absDir}" --canvas`),
|
|
3717
|
+
(0, flowCliText_1.psFlowLine)(`node push --node <node_uuid> --dir "${absDir}"`),
|
|
3714
3718
|
(0, flowCliText_1.psFlowLine)(`run node-exec --node <node_uuid> --dir "${absDir}"`),
|
|
3719
|
+
(0, flowCliText_1.psFlowLine)(`variable pull --name <output_variable_name> --dir "${absDir}"`),
|
|
3715
3720
|
(0, flowCliText_1.psFlowLine)(`run flow-exec --dir "${absDir}" --type debug`),
|
|
3716
3721
|
(0, flowCliText_1.psFlowLine)(`variable sync --dir "${absDir}"`),
|
|
3717
3722
|
"```",
|
|
@@ -3745,7 +3750,7 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3745
3750
|
"",
|
|
3746
3751
|
"| \u8DEF\u5F84 | \u8BF4\u660E |",
|
|
3747
3752
|
"|------|------|",
|
|
3748
|
-
"|
|
|
3753
|
+
"| `plans/` | \u6D41\u7A0B\u8BBE\u8BA1\u6587\u6863\uFF08\u6570\u636E\u6E90\u3001\u62D3\u6251\u8349\u6848\u7B49\uFF09 |",
|
|
3749
3754
|
"| `flows/` | \u5404\u6D41\u7A0B\u5B9E\u4F8B\u76EE\u5F55\uFF08`flow.json`\u3001`\u8282\u70B9/`\u3001`\u53D8\u91CF/`\uFF09 |",
|
|
3750
3755
|
"",
|
|
3751
3756
|
"\u5355\u4E2A\u6D41\u7A0B\u4F4D\u4E8E `flows/<\u6D41\u7A0B\u540D>/`\uFF1A",
|
|
@@ -3784,9 +3789,10 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3784
3789
|
"## 3. \u5F00\u53D1\u4E0E\u63D0\u4EA4",
|
|
3785
3790
|
"",
|
|
3786
3791
|
"1. \u7F16\u8F91 `\u8282\u70B9/<\u540D>/code.sql` \u6216 `code.py`",
|
|
3787
|
-
"2. \u53F3\u952E **\
|
|
3788
|
-
"3. \u53F3\u952E **\
|
|
3789
|
-
"4. \u67E5\u770B\u8868\u53D8\u91CF\uFF1A\u8BBE\u8BA1\u5668 **output_variable_name** \u65C1 \u{1F4CA}\uFF0C\u6216 `flow variable pull --name <\u540D
|
|
3792
|
+
"2. \u53F3\u952E **\u63D0\u4EA4\u8282\u70B9** \u6216 `flow node push`\uFF08**\u5148\u4E8E\u6D4B\u8BD5**\uFF1B`node-exec` \u8DD1\u5E73\u53F0\u5DF2 push \u7684\u4EE3\u7801\uFF09",
|
|
3793
|
+
"3. \u53F3\u952E **\u6D4B\u8BD5\u8FD0\u884C\u8282\u70B9** / \u8BBE\u8BA1\u5668 **\u642D\u5B50\u6267\u884C**\uFF0C\u6216 `flow run node-exec --node <uuid>`",
|
|
3794
|
+
"4. \u67E5\u770B\u8868\u53D8\u91CF\uFF1A\u8BBE\u8BA1\u5668 **output_variable_name** \u65C1 \u{1F4CA}\uFF0C\u6216 `flow variable pull --name <\u540D>`\uFF08\u6709\u8F93\u51FA\u53D8\u91CF\u65F6\u5EFA\u8BAE\u5FC5\u505A\uFF09",
|
|
3795
|
+
"5. \u6539\u8FDE\u7EBF/\u914D\u7F6E\uFF1A\u53F3\u952E **\u63D0\u4EA4\u6D41\u7A0B** \u6216 `flow project push --canvas`",
|
|
3790
3796
|
"",
|
|
3791
3797
|
"\u547D\u4EE4\u524D\u7F00\uFF1A" + cliPrefix(),
|
|
3792
3798
|
"",
|
|
@@ -3803,7 +3809,7 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3803
3809
|
"| \u5206\u6790\u7528\u6237\u7C98\u8D34\u7684\u9519\u8BEF | `flow/run-debug` |",
|
|
3804
3810
|
"",
|
|
3805
3811
|
"\u4FA7\u680F **\u5E2E\u52A9 \u2192 \u{1F916} \u63D0\u793A\u8BCD** \u4E2D \u2B50 \u4E3A\u6D41\u7A0B\u63A8\u8350\u3002\u53F3\u952E **`flow.json`** \u2192 **\u6253\u5F00 AI \u6539\u9519\u63D0\u793A\u8BCD**\u3002",
|
|
3806
|
-
"\u7ED9 AI \u7684\u4EFB\u52A1\u793A\u4F8B\uFF1A\u300C\u6539 XX \u8282\u70B9\uFF0C\
|
|
3812
|
+
"\u7ED9 AI \u7684\u4EFB\u52A1\u793A\u4F8B\uFF1A\u300C\u6539 XX \u8282\u70B9\uFF0C**\u5148 node push \u518D\u6D4B**\uFF0C\u5931\u8D25\u6309 last-error \u6539\u5230\u6EE1\u8DB3\u6210\u529F\u5224\u636E\uFF08\u542B variable pull\uFF09\u300D\u3002",
|
|
3807
3813
|
"",
|
|
3808
3814
|
...buildDocsTable("project-root")
|
|
3809
3815
|
].join("\n");
|
|
@@ -3902,7 +3908,9 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3902
3908
|
(0, flowCliText_1.psFlowLine)('project status --dir "<FLOW_DIR>"'),
|
|
3903
3909
|
(0, flowCliText_1.psFlowLine)(`project pull --flow ${opts.flowId} --dir "<FLOW_DIR>"`),
|
|
3904
3910
|
(0, flowCliText_1.psFlowLine)('project push --dir "<FLOW_DIR>" --canvas'),
|
|
3911
|
+
(0, flowCliText_1.psFlowLine)('node push --node <node_uuid> --dir "<FLOW_DIR>"'),
|
|
3905
3912
|
(0, flowCliText_1.psFlowLine)('run node-exec --node <node_uuid> --dir "<FLOW_DIR>"'),
|
|
3913
|
+
(0, flowCliText_1.psFlowLine)('variable pull --name <output_variable_name> --dir "<FLOW_DIR>"'),
|
|
3906
3914
|
(0, flowCliText_1.psFlowLine)('run flow-exec --dir "<FLOW_DIR>" --type debug'),
|
|
3907
3915
|
(0, flowCliText_1.psFlowLine)('variable sync --dir "<FLOW_DIR>"'),
|
|
3908
3916
|
"```",
|
|
@@ -3918,14 +3926,17 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3918
3926
|
`2. **\u5FC5\u987B**\u7528 CLI \u65B0\u5EFA\u8282\u70B9\uFF08\u7981\u6B62\u624B\u6413 uuid\uFF09\uFF1A${(0, flowCliText_1.mdFlowCmd)('node new --type <node_type> --dir . --label "<\u8282\u70B9\u540D>"')}`,
|
|
3919
3927
|
"3. \u5728 `flow.json` \u91CC\u8865 `nodes/edges`\uFF08\u9075\u5B88\u951A\u70B9\uFF1A`sourceHandle` \u4EC5 `r/b/true/false`\uFF0C`targetHandle` \u4EC5 `l/t`\uFF09",
|
|
3920
3928
|
"4. \u7F16\u8F91 `\u8282\u70B9/<\u540D>/code.sql|py`\uFF08`node new` \u4F1A\u521B\u5EFA\u76EE\u5F55\u4E0E meta \u7D22\u5F15\uFF09",
|
|
3921
|
-
`5. \
|
|
3922
|
-
`6. \
|
|
3929
|
+
`5. \u63D0\u4EA4\u4EE3\u7801\uFF1A${(0, flowCliText_1.mdFlowCmd)("node push --node <node_uuid> --dir .")}\uFF08\u5148\u4E8E\u6D4B\u8BD5\uFF09`,
|
|
3930
|
+
`6. \u5355\u8282\u70B9\u6D4B\u8BD5\uFF1A${(0, flowCliText_1.mdFlowCmd)("run node-exec --node <node_uuid> --dir .")}`,
|
|
3931
|
+
`7. \u6838\u5BF9\u53D8\u91CF\uFF08\u82E5\u914D\u7F6E\u4E86 output_variable_name\uFF09\uFF1A${(0, flowCliText_1.mdFlowCmd)("variable pull --name <\u540D> --dir .")}`,
|
|
3932
|
+
`8. \u63D0\u4EA4\u753B\u5E03\uFF08\u542B\u8FDE\u7EBF/\u914D\u7F6E\uFF09\uFF1A${(0, flowCliText_1.mdFlowCmd)("project push --dir . --canvas")}`,
|
|
3923
3933
|
"",
|
|
3924
3934
|
"### \u573A\u666F B\uFF1A\u4EC5\u6539\u8282\u70B9\u4EE3\u7801",
|
|
3925
3935
|
"",
|
|
3926
3936
|
"1. \u7F16\u8F91 `\u8282\u70B9/<\u540D>/code.sql|py`\uFF08\u4E0D\u8981\u628A\u6B63\u6587\u5199\u56DE `flow.json`\uFF09",
|
|
3927
|
-
`2. \
|
|
3928
|
-
`3. \
|
|
3937
|
+
`2. \u63D0\u4EA4\u4EE3\u7801\uFF08\u5148\u4E8E\u6D4B\u8BD5\uFF09\uFF1A${(0, flowCliText_1.mdFlowCmd)("node push --node <node_uuid> --dir .")}`,
|
|
3938
|
+
`3. \u8FD0\u884C\u8282\u70B9\uFF1A${(0, flowCliText_1.mdFlowCmd)("run node-exec --node <node_uuid> --dir .")}`,
|
|
3939
|
+
`4. \u6838\u5BF9\u8F93\u51FA\u53D8\u91CF\uFF08\u82E5\u9002\u7528\uFF09\uFF1A${(0, flowCliText_1.mdFlowCmd)("variable pull --name <output_variable_name> --dir .")}`,
|
|
3929
3940
|
"",
|
|
3930
3941
|
"### \u573A\u666F C\uFF1A\u753B\u5E03\u548C\u4EE3\u7801\u4E0D\u540C\u6B65",
|
|
3931
3942
|
"",
|
|
@@ -3941,13 +3952,18 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3941
3952
|
"- `code.*` \u662F\u5426\u4E0E\u8282\u70B9\u4E1A\u52A1\u7C7B\u578B\u4E00\u81F4\uFF08SQL \u8282\u70B9 `code.sql`\uFF0CPython \u8282\u70B9 `code.py`\uFF09",
|
|
3942
3953
|
"- \u6761\u4EF6\u8282\u70B9\u51FA\u8FB9\u662F\u5426\u4EC5\u4F7F\u7528 `true/false`\uFF0C\u672A\u8BEF\u7528 `r/b`",
|
|
3943
3954
|
"- \u82E5\u6539\u52A8\u753B\u5E03\uFF0C\u662F\u5426\u6267\u884C\u4E86 `flow project push --canvas`",
|
|
3955
|
+
"- \u6539 `code.*` \u540E\u662F\u5426 **\u5148\u4E8E `node-exec` \u6267\u884C\u4E86 `node push`**",
|
|
3956
|
+
"- `node-exec` \u662F\u5426 JSON `success: true`",
|
|
3957
|
+
"- \u6709 `output_variable_name` \u65F6\u662F\u5426 **`variable pull` \u4E14\u53D8\u91CF\u5408\u7406**",
|
|
3958
|
+
"- \u662F\u5426\u7981\u6B62\u672A push \u5C31\u6D4B\u4EE3\u7801\u3001\u7981\u6B62\u4EC5\u51ED exit code \u58F0\u79F0\u901A\u8FC7",
|
|
3944
3959
|
"",
|
|
3945
3960
|
"## \u5E38\u89C1\u9519\u8BEF\u4E0E\u4FEE\u590D",
|
|
3946
3961
|
"",
|
|
3947
3962
|
"| \u73B0\u8C61 | \u5E38\u89C1\u539F\u56E0 | \u4FEE\u590D |",
|
|
3948
3963
|
"|------|----------|------|",
|
|
3949
3964
|
`| \u547D\u4EE4\u627E\u4E0D\u5230 | \u672A\u88C5\u5168\u5C40 CLI \u6216\u4E0D\u5728 dazi-work | \`pnpm add -g @dazitech/cli\` \u6216 ${(0, flowCliText_1.mdFlowCmd)("...")} / \`.scriptsdazi.ps1 flow ...\` |`,
|
|
3950
|
-
"| \u8282\u70B9\u6D4B\u8BD5\u62A5\u4E0A\u6E38\u53D8\u91CF\u4E0D\u5B58\u5728 | \u672A\u5148\u8FD0\u884C\u4E0A\u6E38\u8282\u70B9\u4EA7\u51FA\u53D8\u91CF | \
|
|
3965
|
+
"| \u8282\u70B9\u6D4B\u8BD5\u62A5\u4E0A\u6E38\u53D8\u91CF\u4E0D\u5B58\u5728 | \u672A\u5148\u8FD0\u884C\u4E0A\u6E38\u8282\u70B9\u4EA7\u51FA\u53D8\u91CF | \u4E0A\u6E38 **`node push` \u2192 `node-exec`**\uFF0C\u6216\u6574\u6D41\u7A0B `flow-exec --type debug`\uFF0C\u518D `variable pull` \u540E\u6D4B\u76EE\u6807\u8282\u70B9 |",
|
|
3966
|
+
"| \u672C\u5730\u5DF2\u6539\u4EE3\u7801\u4F46\u6D4B\u8BD5\u4ECD\u50CF\u65E7\u7248 | \u672A `node push` \u5C31 `node-exec` | **\u5148 `node push`\uFF0C\u518D `node-exec`** |",
|
|
3951
3967
|
"| excel-python \u627E\u4E0D\u5230\u6587\u4EF6 | code.py \u5199\u4E86\u6587\u4EF6\u540D/\u672C\u5730\u8DEF\u5F84 | \u753B\u5E03\u914D `managed_file_id`\uFF08UUID\uFF09\uFF1B\u4EE3\u7801\u7528 `excel_source_path` |",
|
|
3952
3968
|
"| Excel \u7528\u4E86 file-source | file-source \u4E0D\u89E3\u6790 xlsx | \u6539\u4E3A **`excel-python`** + `managed_file_id` |",
|
|
3953
3969
|
"| excel-python \u65E0\u4E3B\u8F93\u51FA | \u672A `set_table_output` \u6216\u540D\u79F0\u4E0E `output_variable_name` \u4E0D\u4E00\u81F4 | \u89C1 node-code-guide \xA75 |",
|
|
@@ -3957,13 +3973,13 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3957
3973
|
"",
|
|
3958
3974
|
"## AI \u81EA\u4E3B\u8FD0\u884C\u4E0E\u6539\u9519\u95ED\u73AF\uFF08Agent \u5FC5\u8BFB\uFF09",
|
|
3959
3975
|
"",
|
|
3960
|
-
"> **\u6269\u5C55/\u83DC\u5355\u4E0D\u4F1A\u81EA\u52A8\u6539\u4EE3\u7801**\uFF08\u5E73\u53F0 D6\uFF09\uFF1B\u7528\u6237\u59D4\u6258\u4F60\u6539\u6D41\u7A0B\u65F6\uFF0C\u4F60**\u5FC5\u987B\u4E3B\u52A8**\u6267\u884C\u300C\u6539 \u2192 \u8DD1 \u2192 \
|
|
3976
|
+
"> **\u6269\u5C55/\u83DC\u5355\u4E0D\u4F1A\u81EA\u52A8\u6539\u4EE3\u7801**\uFF08\u5E73\u53F0 D6\uFF09\uFF1B\u7528\u6237\u59D4\u6258\u4F60\u6539\u6D41\u7A0B\u65F6\uFF0C\u4F60**\u5FC5\u987B\u4E3B\u52A8**\u6267\u884C\u300C\u6539 \u2192 **push** \u2192 \u8DD1 \u2192 **variable pull**\uFF08\u82E5\u9002\u7528\uFF09\u2192 \u8BFB\u9519 \u2192 \u518D\u6539\u300D\uFF0C\u76F4\u5230\u6EE1\u8DB3\u6210\u529F\u5224\u636E\u6216\u8FBE\u5230\u91CD\u8BD5\u4E0A\u9650\u3002",
|
|
3961
3977
|
"",
|
|
3962
3978
|
"### \u9519\u8BEF\u843D\u5728\u54EA\u91CC\uFF08\u8DD1\u5B8C\u5FC5\u67E5\uFF09",
|
|
3963
3979
|
"",
|
|
3964
3980
|
"| \u8FD0\u884C\u65B9\u5F0F | \u5931\u8D25\u65F6\u8BFB | \u6210\u529F/\u6B65\u9AA4\u6458\u8981 |",
|
|
3965
3981
|
"|----------|----------|---------------|",
|
|
3966
|
-
"| \u5355\u8282\u70B9 `run node-exec` | `_run/<\u8282\u70B9\u540D>.last-error.md` | \
|
|
3982
|
+
"| \u5355\u8282\u70B9 `run node-exec` | `_run/<\u8282\u70B9\u540D>.last-error.md` | push \u6210\u529F + JSON `success:true` +\uFF08\u6709\u8F93\u51FA\u53D8\u91CF\u65F6\uFF09`variable pull` \u6838\u5BF9 |",
|
|
3967
3983
|
"| \u6574\u6D41\u7A0B `run flow-exec` | `_run/flow.last-error.md` | `_run/flow.last-run.md`\uFF08\u6B65\u9AA4+\u65E5\u5FD7\uFF09 |",
|
|
3968
3984
|
"",
|
|
3969
3985
|
"CLI \u5E26 `--json` \u65F6\uFF1A\u770B\u8FD4\u56DE `success: false` \u6216 `errorFile` \u5B57\u6BB5\uFF0C**\u518D\u6253\u5F00\u5BF9\u5E94 md \u6587\u4EF6**\uFF0C\u4E0D\u8981\u53EA\u770B\u7EC8\u7AEF\u4E00\u884C\u62A5\u9519\u3002",
|
|
@@ -3972,12 +3988,14 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3972
3988
|
"",
|
|
3973
3989
|
"1. **\u5B9A\u4F4D**\uFF1A\u8BFB `flow.json` + \u76EE\u6807 `\u8282\u70B9/<\u540D>/code.*` + `flow.meta.json`\uFF08\u53D6 `node_uuid`\uFF09",
|
|
3974
3990
|
"2. **\u4FEE\u6539**\uFF1A\u53EA\u6539\u5FC5\u8981\u6587\u4EF6\uFF08\u4EE3\u7801 \u2192 `code.*`\uFF1B\u8FDE\u7EBF/\u914D\u7F6E \u2192 `flow.json`\uFF09",
|
|
3975
|
-
"3. **\
|
|
3991
|
+
"3. **\u63D0\u4EA4**\uFF08\u5148\u4E8E\u6D4B\u8BD5\uFF09\uFF1A\u6539 `code.*` \u2192 `node push`\uFF1B\u6539\u753B\u5E03/\u914D\u7F6E \u2192 `project push --canvas`",
|
|
3992
|
+
"4. **\u9A8C\u8BC1**\uFF08\u5148\u5C0F\u540E\u5927\uFF09\uFF1A",
|
|
3976
3993
|
` - \u5355\u8282\u70B9\uFF1A${(0, flowCliText_1.mdFlowCmd)("run node-exec --node <node_uuid> --dir .")}`,
|
|
3977
3994
|
` - \u6574\u6D41\u7A0B\uFF1A${(0, flowCliText_1.mdFlowCmd)("run flow-exec --dir . --type debug")}`,
|
|
3978
|
-
|
|
3979
|
-
"5. **\
|
|
3980
|
-
"6. **\
|
|
3995
|
+
` - \u6709 output_variable_name\uFF1A${(0, flowCliText_1.mdFlowCmd)("variable pull --name <\u540D> --dir .")}`,
|
|
3996
|
+
"5. **\u6210\u529F\u5224\u636E**\uFF1Apush \u6210\u529F \u2192 node-exec `success:true` \u2192 \u53D8\u91CF\u5408\u7406\uFF08\u82E5\u9002\u7528\uFF09\uFF1B\u7981\u6B62\u4EC5\u51ED exit code",
|
|
3997
|
+
"6. **\u5224\u9519**\uFF1AJSON `success:false` \u2192 \u6253\u5F00 `_run/*.last-error.md`\uFF0C\u6309**\u9519\u8BEF\u5206\u7C7B**\u4E0E traceback \u4FEE\u590D",
|
|
3998
|
+
"7. **\u91CD\u8BD5**\uFF1A\u56DE\u5230\u6B65\u9AA4 2\uFF1B\u82E5 3 \u8F6E\u4ECD\u5931\u8D25\uFF0C\u6C47\u603B\u5DF2\u5C1D\u8BD5\u4FEE\u590D\u70B9\u5E76\u8BF7\u6C42\u7528\u6237\u4ECB\u5165",
|
|
3981
3999
|
"",
|
|
3982
4000
|
"### \u5E38\u89C1\u5931\u8D25 \u2192 \u4F18\u5148\u52A8\u4F5C",
|
|
3983
4001
|
"",
|
|
@@ -3985,14 +4003,15 @@ var require_flowScaffoldDocs = __commonJS({
|
|
|
3985
4003
|
"|-----------------|----------|",
|
|
3986
4004
|
"| \u7F3A\u4E0A\u6E38\u53D8\u91CF | \u5148\u8DD1\u4E0A\u6E38\u8282\u70B9\u6216\u6574\u6D41\u7A0B debug\uFF0C\u518D `variable pull` \u770B schema |",
|
|
3987
4005
|
"| \u914D\u7F6E\u7F3A\u5931 | `flow.json` \u8BE5\u8282\u70B9 `data`\uFF08connectionId / output_variable_name \u7B49\uFF09 |",
|
|
3988
|
-
"| \u4EE3\u7801\u9519\u8BEF | `code.*` \u4E0E traceback\uFF1B\u6539\u540E\
|
|
4006
|
+
"| \u4EE3\u7801\u9519\u8BEF | `code.*` \u4E0E traceback\uFF1B\u6539\u540E **`node push` \u2192 `node-exec` \u2192 `variable pull`**\uFF08\u82E5\u9002\u7528\uFF09 |",
|
|
3989
4007
|
"| \u8FDE\u63A5/\u6570\u636E\u6E90 | connectionId / spaceId \u662F\u5426\u6709\u6548 |",
|
|
3990
4008
|
"",
|
|
3991
4009
|
"### Agent \u7981\u6B62\u9879",
|
|
3992
4010
|
"",
|
|
3993
4011
|
"- **\u7981\u6B62**\u672A\u5B9E\u9645\u8FD0\u884C\u5C31\u58F0\u79F0\u300C\u5DF2\u4FEE\u590D/\u5DF2\u901A\u8FC7\u300D",
|
|
3994
4012
|
"- **\u7981\u6B62**\u4E0D\u8BFB `_run/*.last-error.md` \u5C31\u731C\u6D4B\u539F\u56E0",
|
|
3995
|
-
"- **\u7981\u6B62**\
|
|
4013
|
+
"- **\u7981\u6B62**\u672A `node push` \u5C31 `node-exec` \u9A8C\u8BC1\u4EE3\u7801",
|
|
4014
|
+
"- **\u7981\u6B62**\u4EC5\u51ED exit code \u901A\u8FC7\u5C31\u58F0\u79F0\u5B8C\u6210\uFF08\u987B variable pull\uFF0C\u82E5\u9002\u7528\uFF09",
|
|
3996
4015
|
"- **\u7981\u6B62**\u628A SQL/Python \u6B63\u6587\u5199\u56DE `flow.json`",
|
|
3997
4016
|
"",
|
|
3998
4017
|
"\u4FA7\u680F\u63D0\u793A\u8BCD\u53EF\u9009\u7528 **`flow/run-fix-loop`**\uFF08\u81EA\u4E3B\u6539\u9519\u4E13\u7528\uFF09\u3002",
|
|
@@ -4454,7 +4473,7 @@ var require_flowWorkspaceAudit = __commonJS({
|
|
|
4454
4473
|
lines.push(`- ${w}`);
|
|
4455
4474
|
lines.push("", "\u4FEE\u590D\uFF08\u5728\u6D41\u7A0B\u76EE\u5F55\uFF09\uFF1A", "", "```powershell", "dazi flow project repair-meta --dir .", "dazi flow project doctor --dir .", "```", "", `\u8BE6\u89C1 [\u6D41\u7A0B\u672C\u5730\u6587\u4EF6\u89C4\u8303](${localFilesSpecLink})\u3002`, "");
|
|
4456
4475
|
}
|
|
4457
|
-
lines.push("## \u53D8\u66F4\u63D0\u4EA4\u547D\u4EE4\u77E9\u9635", "", "| \u6539\u4E86\u4EC0\u4E48 | \u547D\u4EE4 |", "|----------|------|", "| `managed_file_id`\u3001`output_variable_name`\u3001\u8FDE\u7EBF\u3001\u589E\u5220\u8282\u70B9 | `dazi flow project push --dir . --canvas` |", "| `\u8282\u70B9/<\u540D>/code.py` \u6216 `code.sql` | `dazi flow node push --node <uuid> --dir .` |", '| **\u65B0\u589E\u4EE3\u7801\u8282\u70B9** | `dazi flow node new --type <type> --dir . --label "<\u540D>"` \u2192 \u6539\u914D\u7F6E \u2192 `push --canvas` \u2192 \u5199 code \u2192 `node push` |', "", "> \u7981\u6B62\u53EA\u6539 `flow.json` \u800C\u4E0D\u66F4\u65B0 `flow.meta.json`\uFF08\u987B `node new` / `pull` / `repair-meta`\uFF09\u3002", "");
|
|
4476
|
+
lines.push("## \u53D8\u66F4\u63D0\u4EA4\u547D\u4EE4\u77E9\u9635", "", "| \u6539\u4E86\u4EC0\u4E48 | \u547D\u4EE4 |", "|----------|------|", "| `managed_file_id`\u3001`output_variable_name`\u3001\u8FDE\u7EBF\u3001\u589E\u5220\u8282\u70B9 | `dazi flow project push --dir . --canvas` |", "| `\u8282\u70B9/<\u540D>/code.py` \u6216 `code.sql` | `dazi flow node push --node <uuid> --dir .` |", '| **\u65B0\u589E\u4EE3\u7801\u8282\u70B9** | `dazi flow node new --type <type> --dir . --label "<\u540D>"` \u2192 \u6539\u914D\u7F6E \u2192 `push --canvas` \u2192 \u5199 code \u2192 `node push` |', "", "> \u7981\u6B62\u53EA\u6539 `flow.json` \u800C\u4E0D\u66F4\u65B0 `flow.meta.json`\uFF08\u987B `node new` / `pull` / `repair-meta`\uFF09\u3002", "> \u6539 `code.*` \u540E\u9A8C\u8BC1\u987A\u5E8F\uFF1A**`node push` \u2192 `node-exec` \u2192 `variable pull`**\uFF08\u6709\u8F93\u51FA\u53D8\u91CF\u65F6\uFF09\uFF1B`node-exec` \u6267\u884C\u5E73\u53F0\u5DF2 push \u7684\u4EE3\u7801\u3002", "");
|
|
4458
4477
|
return lines;
|
|
4459
4478
|
}
|
|
4460
4479
|
exports2.buildFlowConsistencyMarkdown = buildFlowConsistencyMarkdown2;
|
|
@@ -4480,7 +4499,7 @@ var require_flowDirResolve = __commonJS({
|
|
|
4480
4499
|
if (m)
|
|
4481
4500
|
return m[1];
|
|
4482
4501
|
m = norm.match(/(?:^|\/)项目\/([^/]+)\/流程\/([^/]+)(?:\/|$)/);
|
|
4483
|
-
if (m && m[2] !== "flows" && m[2] !== "\u89C4\u5212")
|
|
4502
|
+
if (m && m[2] !== "flows" && m[2] !== "plans" && m[2] !== "\u89C4\u5212")
|
|
4484
4503
|
return m[1];
|
|
4485
4504
|
m = norm.match(/(?:^|\/)项目\/(flow_[^/]+)\/流程(?:\/|$)/);
|
|
4486
4505
|
if (m)
|
|
@@ -4517,12 +4536,12 @@ var require_flowDirResolve = __commonJS({
|
|
|
4517
4536
|
return false;
|
|
4518
4537
|
const norm = path_1.default.resolve(dir).replace(/\\/g, "/");
|
|
4519
4538
|
const base = path_1.default.basename(norm.replace(/\/$/, ""));
|
|
4520
|
-
if (["flows", "\u89C4\u5212", "\u6D41\u7A0B", "\u9879\u76EE", "\u8282\u70B9", "\u53D8\u91CF", "_run"].includes(base))
|
|
4539
|
+
if (["flows", "plans", "\u89C4\u5212", "\u6D41\u7A0B", "\u9879\u76EE", "\u8282\u70B9", "\u53D8\u91CF", "_run"].includes(base))
|
|
4521
4540
|
return false;
|
|
4522
4541
|
if (/(?:^|\/)项目\/[^/]+\/流程\/flows\/[^/]+(?:\/|$)/.test(norm))
|
|
4523
4542
|
return true;
|
|
4524
4543
|
const legacy = norm.match(/(?:^|\/)项目\/([^/]+)\/流程\/([^/]+)(?:\/|$)/);
|
|
4525
|
-
if (legacy && legacy[2] !== "flows" && legacy[2] !== "\u89C4\u5212")
|
|
4544
|
+
if (legacy && legacy[2] !== "flows" && legacy[2] !== "plans" && legacy[2] !== "\u89C4\u5212")
|
|
4526
4545
|
return true;
|
|
4527
4546
|
if (/(?:^|\/)项目\/flow_[^/]+\/流程\/[^/]+(?:\/|$)/.test(norm))
|
|
4528
4547
|
return true;
|
|
@@ -4783,10 +4802,6 @@ var {
|
|
|
4783
4802
|
Help
|
|
4784
4803
|
} = import_index.default;
|
|
4785
4804
|
|
|
4786
|
-
// cli/dazi-flow/src/commands/flows.ts
|
|
4787
|
-
var import_path3 = __toESM(require("path"), 1);
|
|
4788
|
-
var import_fs2 = __toESM(require("fs"), 1);
|
|
4789
|
-
|
|
4790
4805
|
// cli/shared/src/auth.js
|
|
4791
4806
|
var import_os = __toESM(require("os"), 1);
|
|
4792
4807
|
var import_path = __toESM(require("path"), 1);
|
|
@@ -4966,7 +4981,12 @@ function resolveWorkspace(cwd = process.cwd()) {
|
|
|
4966
4981
|
};
|
|
4967
4982
|
}
|
|
4968
4983
|
|
|
4984
|
+
// cli/shared/src/version.ts
|
|
4985
|
+
var DAZI_VERSION = true ? "3.0.7" : readDevVersion();
|
|
4986
|
+
|
|
4969
4987
|
// cli/dazi-flow/src/commands/flows.ts
|
|
4988
|
+
var import_path3 = __toESM(require("path"), 1);
|
|
4989
|
+
var import_fs2 = __toESM(require("fs"), 1);
|
|
4970
4990
|
function makeFlowsCommand() {
|
|
4971
4991
|
const cmd = new Command("flows").description("Flow \u7BA1\u7406");
|
|
4972
4992
|
cmd.command("list").description("\u5217\u51FA\u6240\u6709 Flow").option("--space <spaceId>", "\u8FC7\u6EE4\u7A7A\u95F4").option("--status <status>", "\u8FC7\u6EE4\u72B6\u6001\uFF08active/draft/archived\uFF09").option("--json", "\u8F93\u51FA JSON").action(async (opts) => {
|
|
@@ -5607,7 +5627,7 @@ function makeProjectCommand() {
|
|
|
5607
5627
|
process.exit(1);
|
|
5608
5628
|
}
|
|
5609
5629
|
import_fs8.default.mkdirSync(import_path9.default.join(projectRoot, "\u6D41\u7A0B", "flows"), { recursive: true });
|
|
5610
|
-
import_fs8.default.mkdirSync(import_path9.default.join(projectRoot, "\u6D41\u7A0B", "
|
|
5630
|
+
import_fs8.default.mkdirSync(import_path9.default.join(projectRoot, "\u6D41\u7A0B", "plans"), { recursive: true });
|
|
5611
5631
|
import_fs8.default.writeFileSync(
|
|
5612
5632
|
import_path9.default.join(projectRoot, "README.md"),
|
|
5613
5633
|
`# ${folder}
|
|
@@ -7237,7 +7257,7 @@ function makeManagedFilesCommand() {
|
|
|
7237
7257
|
|
|
7238
7258
|
// cli/dazi-flow/src/index.ts
|
|
7239
7259
|
var program2 = new Command();
|
|
7240
|
-
program2.name("dazi-flow").description("\u642D\u5B50 Flow CLI \u2014 \u5DE5\u4F5C\u6D41\u7BA1\u7406").version(
|
|
7260
|
+
program2.name("dazi-flow").description("\u642D\u5B50 Flow CLI \u2014 \u5DE5\u4F5C\u6D41\u7BA1\u7406").version(DAZI_VERSION, "-v, --version");
|
|
7241
7261
|
program2.addCommand(makeFlowsCommand());
|
|
7242
7262
|
program2.addCommand(makeSnapshotCommand());
|
|
7243
7263
|
program2.addCommand(makeProjectCommand());
|
package/dist/clis/dazi-onto.js
CHANGED
|
@@ -3036,10 +3036,6 @@ var {
|
|
|
3036
3036
|
Help
|
|
3037
3037
|
} = import_index.default;
|
|
3038
3038
|
|
|
3039
|
-
// cli/dazi-onto/src/commands/space.ts
|
|
3040
|
-
var import_path3 = __toESM(require("path"), 1);
|
|
3041
|
-
var import_fs2 = __toESM(require("fs"), 1);
|
|
3042
|
-
|
|
3043
3039
|
// cli/shared/src/auth.js
|
|
3044
3040
|
var import_os = __toESM(require("os"), 1);
|
|
3045
3041
|
var import_path = __toESM(require("path"), 1);
|
|
@@ -3219,7 +3215,12 @@ function resolveWorkspace(cwd = process.cwd()) {
|
|
|
3219
3215
|
};
|
|
3220
3216
|
}
|
|
3221
3217
|
|
|
3218
|
+
// cli/shared/src/version.ts
|
|
3219
|
+
var DAZI_VERSION = true ? "3.0.7" : readDevVersion();
|
|
3220
|
+
|
|
3222
3221
|
// cli/dazi-onto/src/commands/space.ts
|
|
3222
|
+
var import_path3 = __toESM(require("path"), 1);
|
|
3223
|
+
var import_fs2 = __toESM(require("fs"), 1);
|
|
3223
3224
|
function makeSpaceCommand() {
|
|
3224
3225
|
const cmd = new Command("space").description("\u5DE5\u4F5C\u7A7A\u95F4\u7BA1\u7406");
|
|
3225
3226
|
cmd.command("list").description("\u5217\u51FA\u6240\u6709\u7A7A\u95F4").option("--json", "\u8F93\u51FA JSON").action(async (opts) => {
|
|
@@ -3978,7 +3979,7 @@ function makeMcpCommand() {
|
|
|
3978
3979
|
result: {
|
|
3979
3980
|
protocolVersion: "2024-11-05",
|
|
3980
3981
|
capabilities: { tools: {} },
|
|
3981
|
-
serverInfo: { name: "dazi-onto", version:
|
|
3982
|
+
serverInfo: { name: "dazi-onto", version: DAZI_VERSION }
|
|
3982
3983
|
}
|
|
3983
3984
|
};
|
|
3984
3985
|
process.stdout.write(JSON.stringify(response) + "\n");
|
|
@@ -4001,7 +4002,7 @@ function makeMcpCommand() {
|
|
|
4001
4002
|
|
|
4002
4003
|
// cli/dazi-onto/src/index.ts
|
|
4003
4004
|
var program2 = new Command();
|
|
4004
|
-
program2.name("dazi-onto").description("\u642D\u5B50 Onto CLI \u2014 \u672C\u4F53\uFF08Ontology\uFF09\u7BA1\u7406").version(
|
|
4005
|
+
program2.name("dazi-onto").description("\u642D\u5B50 Onto CLI \u2014 \u672C\u4F53\uFF08Ontology\uFF09\u7BA1\u7406").version(DAZI_VERSION, "-v, --version");
|
|
4005
4006
|
program2.addCommand(makeSpaceCommand());
|
|
4006
4007
|
program2.addCommand(makeFunctionCommand());
|
|
4007
4008
|
program2.addCommand(makeActionCommand());
|
package/dist/clis/dazi.js
CHANGED
|
@@ -3633,11 +3633,6 @@ var {
|
|
|
3633
3633
|
Help
|
|
3634
3634
|
} = import_index.default;
|
|
3635
3635
|
|
|
3636
|
-
// cli/dazi/src/commands/auth.ts
|
|
3637
|
-
var import_os3 = __toESM(require("os"), 1);
|
|
3638
|
-
var import_path4 = __toESM(require("path"), 1);
|
|
3639
|
-
var import_fs3 = __toESM(require("fs"), 1);
|
|
3640
|
-
|
|
3641
3636
|
// cli/shared/src/auth.js
|
|
3642
3637
|
var import_os = __toESM(require("os"), 1);
|
|
3643
3638
|
var import_path = __toESM(require("path"), 1);
|
|
@@ -3856,7 +3851,13 @@ function resolveWorkspace(cwd = process.cwd()) {
|
|
|
3856
3851
|
};
|
|
3857
3852
|
}
|
|
3858
3853
|
|
|
3854
|
+
// cli/shared/src/version.ts
|
|
3855
|
+
var DAZI_VERSION = true ? "3.0.7" : readDevVersion();
|
|
3856
|
+
|
|
3859
3857
|
// cli/dazi/src/commands/auth.ts
|
|
3858
|
+
var import_os3 = __toESM(require("os"), 1);
|
|
3859
|
+
var import_path4 = __toESM(require("path"), 1);
|
|
3860
|
+
var import_fs3 = __toESM(require("fs"), 1);
|
|
3860
3861
|
function makeAuthCommand() {
|
|
3861
3862
|
const cmd = new Command("auth").description("\u8D26\u53F7\u8BA4\u8BC1");
|
|
3862
3863
|
cmd.command("login").description("\u767B\u5F55\u642D\u5B50\u5E73\u53F0").option("-s, --server <url>", "\u5E73\u53F0\u5730\u5740", getServerUrl()).option("--token <token>", "\u76F4\u63A5\u4F7F\u7528 token \u767B\u5F55\uFF08CI / Token \u6A21\u5F0F\uFF09").option("-u, --username <username>", "\u7528\u6237\u540D\u6216\u90AE\u7BB1\uFF08\u8D26\u53F7\u5BC6\u7801\u6A21\u5F0F\uFF09").option("-p, --password <password>", "\u5BC6\u7801\uFF08\u8D26\u53F7\u5BC6\u7801\u6A21\u5F0F\uFF09").action(async (opts) => {
|
|
@@ -4024,7 +4025,7 @@ function makeEnvCommand() {
|
|
|
4024
4025
|
return new Command("env").description("\u663E\u793A\u73AF\u5883\u4FE1\u606F").action(() => {
|
|
4025
4026
|
const auth = tryLoadAuth();
|
|
4026
4027
|
const env = {
|
|
4027
|
-
version:
|
|
4028
|
+
version: DAZI_VERSION,
|
|
4028
4029
|
node: process.version,
|
|
4029
4030
|
platform: `${import_os5.default.type()} ${import_os5.default.arch()}`,
|
|
4030
4031
|
serverUrl: getServerUrl(),
|
|
@@ -5694,7 +5695,7 @@ function dispatch(msg) {
|
|
|
5694
5695
|
result: {
|
|
5695
5696
|
protocolVersion: "2024-11-05",
|
|
5696
5697
|
capabilities: { tools: {} },
|
|
5697
|
-
serverInfo: { name: "dazi", version:
|
|
5698
|
+
serverInfo: { name: "dazi", version: DAZI_VERSION }
|
|
5698
5699
|
}
|
|
5699
5700
|
};
|
|
5700
5701
|
case "initialized":
|
|
@@ -5817,7 +5818,7 @@ function forwardToCli(cliName, extraArgs) {
|
|
|
5817
5818
|
process.exit(result.status ?? 1);
|
|
5818
5819
|
}
|
|
5819
5820
|
var program2 = new Command();
|
|
5820
|
-
program2.name("dazi").description("\u642D\u5B50 v3 \u2014 Onto / Flow / App \u7EDF\u4E00 CLI").version(
|
|
5821
|
+
program2.name("dazi").description("\u642D\u5B50 v3 \u2014 Onto / Flow / App \u7EDF\u4E00 CLI").version(DAZI_VERSION, "-v, --version");
|
|
5821
5822
|
program2.addCommand(makeAuthCommand());
|
|
5822
5823
|
program2.addCommand(makeDoctorCommand());
|
|
5823
5824
|
program2.addCommand(makeEnvCommand());
|
|
@@ -59,9 +59,11 @@ dazi flow run flow-exec --dir $flowDir --type debug
|
|
|
59
59
|
|
|
60
60
|
- [ ] `doctor` 为 ✅
|
|
61
61
|
- [ ] 配置变更已 `push --canvas`
|
|
62
|
-
- [ ]
|
|
62
|
+
- [ ] 改 `code.*` 后已 **`node push`**(先于 `node-exec`)
|
|
63
|
+
- [ ] `node-exec` JSON `success: true`
|
|
64
|
+
- [ ] 有 `output_variable_name` 时已 **`variable pull`** 且 `变量/<名>.json` 合理
|
|
63
65
|
- [ ] `flow.json` 无代码正文
|
|
64
|
-
- [ ]
|
|
66
|
+
- [ ] 以上均满足后再声称完成(禁止仅凭 exit code、禁止未 push 就测代码)
|
|
65
67
|
|
|
66
68
|
---
|
|
67
69
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 数据流程项目开发指南
|
|
2
2
|
|
|
3
3
|
**文档 ID**: `flow/flow-project-guide`
|
|
4
|
-
**适用**: `dazi-vscode` v3.0.
|
|
4
|
+
**适用**: `dazi-vscode` v3.0.5+、`dazi-work` 工作区、业务项目 `项目/<业务名>/`
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -128,15 +128,19 @@ dazi flow node push --node <node_uuid> --dir "D:\path\to\dazi-work\项目\财务
|
|
|
128
128
|
右键 flow.json → 打开流程设计器 → 保存 flow.json
|
|
129
129
|
(AI 手改拓扑须遵守 [§6.2 画布节点与连线规范](#62-画布节点与连线规范ai-创建--编辑-flowjson-必读))
|
|
130
130
|
|
|
131
|
-
4.
|
|
132
|
-
右键
|
|
131
|
+
4. 提交节点代码(改 code.* 后、测试前必做)
|
|
132
|
+
右键 code.* → 提交节点
|
|
133
|
+
CLI: flow node push --node <uuid> --dir .
|
|
134
|
+
|
|
135
|
+
5. 单节点测试(平台执行已 push 的代码)
|
|
136
|
+
设计器/运行面板「搭子执行」,或右键 节点/ / code.*
|
|
133
137
|
CLI: flow run node-exec --node <uuid> --dir .
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
6. 查看变量(表变量 schema + 前 10 行;有 output_variable_name 时建议必做)
|
|
136
140
|
设计器属性面板 output_variable_name 旁 📊
|
|
137
141
|
或: flow variable pull --name <变量名> --dir .
|
|
138
142
|
|
|
139
|
-
|
|
143
|
+
7. 提交画布(改连线/配置/增删节点时)
|
|
140
144
|
右键 → 提交流程(智能:代码脏节点 + 画布变更)
|
|
141
145
|
CLI: flow project push --dir . --canvas
|
|
142
146
|
|
|
@@ -52,8 +52,8 @@ dazi flow project status --dir "D:\path\to\dazi-work\项目\财务分析02\流
|
|
|
52
52
|
| 目录一致性检查 | `flow project doctor --dir <flows/<名>/绝对路径>` |
|
|
53
53
|
| 修复 meta 索引 | `flow project repair-meta --dir <flows/<名>/绝对路径>` |
|
|
54
54
|
| 查看本地改动 | `flow project status --dir <flows/<名>/绝对路径>` |
|
|
55
|
-
| 提交单个节点代码 | `flow node push --node <uuid> --dir <flows
|
|
56
|
-
| 单节点测试 | `flow run node-exec --node <uuid> --dir <flows
|
|
55
|
+
| 提交单个节点代码 | `flow node push --node <uuid> --dir <flows/<名>/绝对路径>`(改 `code.*` 后**先于测试**) |
|
|
56
|
+
| 单节点测试 | `flow run node-exec --node <uuid> --dir <flows/<名>/绝对路径>`(执行**平台已 push** 的代码) |
|
|
57
57
|
| 整流程运行 | `flow run flow-exec --dir <flows/<名>/绝对路径> --type debug` |
|
|
58
58
|
| 拉取变量 | `flow variable pull --name <名> --dir <flows/<名>/绝对路径>` |
|
|
59
59
|
|