@stalfh233/omc-cli 0.5.0 → 0.5.2
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 -21
- package/README.md +359 -359
- package/coverage/m1-coverage-manifest-v1.json +1414 -1414
- package/dist/approval-flow.js +0 -0
- package/dist/approval-token.js +102 -0
- package/dist/args.js +0 -0
- package/dist/artifacts.js +0 -0
- package/dist/batch-call.js +0 -0
- package/dist/bench/call-face-eval.js +0 -0
- package/dist/bench/context-attribution.js +0 -0
- package/dist/bench/discovery-cost-eval.js +0 -0
- package/dist/bench/driver.js +0 -0
- package/dist/bench/evals.js +0 -0
- package/dist/bench/fake-http-server.js +65 -0
- package/dist/bench/instrument.js +0 -0
- package/dist/bench/intent-face-eval.js +40 -40
- package/dist/bench/run.js +0 -0
- package/dist/bench/scenario.js +0 -0
- package/dist/bench/types.js +0 -0
- package/dist/bi-wire.js +0 -0
- package/dist/bizservice-config.js +0 -0
- package/dist/call.js +0 -0
- package/dist/capability-absences.js +0 -0
- package/dist/capability-overview.js +0 -0
- package/dist/capability-shape.js +0 -0
- package/dist/cli-contract.js +38 -1
- package/dist/cli-output.js +8 -2
- package/dist/cli.js +9 -1
- package/dist/closest-match.js +0 -0
- package/dist/code-rules.js +0 -0
- package/dist/command-transport.js +0 -0
- package/dist/compound-writes.js +0 -0
- package/dist/compute.js +0 -0
- package/dist/config-store.js +0 -0
- package/dist/context.js +0 -0
- package/dist/contract-consistency.js +0 -0
- package/dist/contract-resources.js +0 -0
- package/dist/coverage-consistency.js +0 -0
- package/dist/coverage-registry.js +0 -0
- package/dist/coverage.js +0 -0
- package/dist/data-list-filter.js +0 -0
- package/dist/describe-cache.js +0 -0
- package/dist/discovery.js +0 -0
- package/dist/endpoints.js +0 -0
- package/dist/environment-policy.js +0 -0
- package/dist/execution-metadata.js +0 -0
- package/dist/fake/app.js +45 -0
- package/dist/fake/b2-registration.js +594 -0
- package/dist/fake/businessrule.js +242 -0
- package/dist/fake/datarule.js +72 -0
- package/dist/fake/dictionary.js +108 -0
- package/dist/fake/environment.js +30 -0
- package/dist/fake/field.js +167 -0
- package/dist/fake/form.js +101 -0
- package/dist/fake/index.js +121 -0
- package/dist/fake/list-view.js +289 -0
- package/dist/fake/model.js +136 -0
- package/dist/fake/online-js.js +18 -0
- package/dist/fake/report.js +253 -0
- package/dist/fake/routes.js +47 -0
- package/dist/fake/rule-lifecycle.js +37 -0
- package/dist/fake/runtime-data.js +367 -0
- package/dist/fake/state.js +67 -0
- package/dist/fake/workflow.js +364 -0
- package/dist/field-change.js +75 -7
- package/dist/field-families.js +59 -9
- package/dist/form-default.js +0 -0
- package/dist/form-layout.js +0 -0
- package/dist/form-support.js +0 -0
- package/dist/formula-lint.js +0 -0
- package/dist/goal-routes.js +16 -16
- package/dist/governed-execution.js +0 -0
- package/dist/graph.js +29 -29
- package/dist/human-summary.js +0 -0
- package/dist/identity.js +0 -0
- package/dist/intent/baseline.js +0 -0
- package/dist/intent/capabilities/bizservice.js +0 -0
- package/dist/intent/capabilities/businessrule.js +0 -0
- package/dist/intent/capabilities/datarule.js +0 -0
- package/dist/intent/capabilities/field.js +0 -0
- package/dist/intent/capabilities/form.js +0 -0
- package/dist/intent/capabilities/index.js +0 -0
- package/dist/intent/capabilities/listview.js +0 -0
- package/dist/intent/capabilities/model.js +0 -0
- package/dist/intent/capabilities/onlinejs.js +0 -0
- package/dist/intent/capabilities/report.js +0 -0
- package/dist/intent/capabilities/workflow.js +0 -0
- package/dist/intent/capability.js +0 -0
- package/dist/intent/cli.js +0 -0
- package/dist/intent/compare.js +0 -0
- package/dist/intent/compiler.js +0 -0
- package/dist/intent/dsl.js +0 -0
- package/dist/intent/plan-apply.js +0 -0
- package/dist/intent/plan-file.js +0 -0
- package/dist/intent/readback.js +0 -0
- package/dist/intent/schema.js +0 -0
- package/dist/intent/validation.js +0 -0
- package/dist/intent/yaml.js +0 -0
- package/dist/journal.js +0 -0
- package/dist/json-column.js +0 -0
- package/dist/lanes/app-contract.js +0 -0
- package/dist/lanes/app-coverage.js +0 -0
- package/dist/lanes/app.js +0 -0
- package/dist/lanes/apply-changes.js +0 -0
- package/dist/lanes/b2-registration-contract.js +0 -0
- package/dist/lanes/b2-registration-coverage.js +0 -0
- package/dist/lanes/b2-registration.js +0 -0
- package/dist/lanes/businessrule-contract.js +0 -0
- package/dist/lanes/businessrule-coverage.js +0 -0
- package/dist/lanes/businessrule.js +0 -0
- package/dist/lanes/contract-support.js +0 -0
- package/dist/lanes/coverage-declaration.js +0 -0
- package/dist/lanes/custom-page.js +0 -0
- package/dist/lanes/datarule-contract.js +0 -0
- package/dist/lanes/datarule-coverage.js +0 -0
- package/dist/lanes/datarule-protocol.js +0 -0
- package/dist/lanes/datarule.js +0 -0
- package/dist/lanes/dictionary-contract.js +0 -0
- package/dist/lanes/dictionary-coverage.js +0 -0
- package/dist/lanes/dictionary.js +0 -0
- package/dist/lanes/environment-contract.js +0 -0
- package/dist/lanes/environment-coverage.js +0 -0
- package/dist/lanes/environment.js +0 -0
- package/dist/lanes/field-contract.js +0 -0
- package/dist/lanes/field-coverage.js +0 -0
- package/dist/lanes/field.js +6 -1
- package/dist/lanes/folder-contract.js +0 -0
- package/dist/lanes/folder-coverage.js +0 -0
- package/dist/lanes/folder.js +0 -0
- package/dist/lanes/form-contract.js +0 -0
- package/dist/lanes/form-coverage.js +0 -0
- package/dist/lanes/form.js +0 -0
- package/dist/lanes/lane-ids.js +0 -0
- package/dist/lanes/list-view-contract.js +0 -0
- package/dist/lanes/list-view-coverage.js +0 -0
- package/dist/lanes/list-view-shapes.js +0 -0
- package/dist/lanes/list-view.js +0 -0
- package/dist/lanes/meta-contract.js +0 -0
- package/dist/lanes/meta.js +6 -0
- package/dist/lanes/model-contract.js +0 -0
- package/dist/lanes/model-coverage.js +0 -0
- package/dist/lanes/model.js +14 -29
- package/dist/lanes/online-js-contract.js +0 -0
- package/dist/lanes/online-js-coverage.js +0 -0
- package/dist/lanes/online-js.js +0 -0
- package/dist/lanes/org-tree.js +0 -0
- package/dist/lanes/organization.js +0 -0
- package/dist/lanes/report-contract.js +0 -0
- package/dist/lanes/report-coverage.js +0 -0
- package/dist/lanes/report.js +0 -0
- package/dist/lanes/rule-graph.js +0 -0
- package/dist/lanes/rule-lifecycle-contract.js +0 -0
- package/dist/lanes/rule-lifecycle-coverage.js +0 -0
- package/dist/lanes/rule-lifecycle.js +0 -0
- package/dist/lanes/runtime-data-contract.js +0 -0
- package/dist/lanes/runtime-data-coverage.js +0 -0
- package/dist/lanes/runtime-data.js +0 -0
- package/dist/lanes/workflow-contract.js +0 -0
- package/dist/lanes/workflow-coverage.js +0 -0
- package/dist/lanes/workflow.js +0 -0
- package/dist/model-purge.js +2 -2
- package/dist/model-record.js +40 -0
- package/dist/model-scaffold.js +0 -0
- package/dist/omc-core-lazy.js +0 -0
- package/dist/online-js-layout.js +0 -0
- package/dist/online-js-source.js +28 -28
- package/dist/package-tool.js +0 -0
- package/dist/package.js +0 -0
- package/dist/path-projection.js +0 -0
- package/dist/plan.js +0 -0
- package/dist/read.js +0 -0
- package/dist/recipes/b2-registration.js +0 -0
- package/dist/recipes/businessrule.js +0 -0
- package/dist/recipes/datarule.js +0 -0
- package/dist/recipes/dictionary.js +0 -0
- package/dist/recipes/field.js +0 -0
- package/dist/recipes/form.js +0 -0
- package/dist/recipes/list-view.js +0 -0
- package/dist/recipes/model.js +0 -0
- package/dist/recipes/online-js.js +0 -0
- package/dist/recipes/runtime-data.js +0 -0
- package/dist/recipes/shared.js +0 -0
- package/dist/recipes/workflow.js +0 -0
- package/dist/redact.js +0 -0
- package/dist/refusal-guidance.js +0 -0
- package/dist/rollback-spec.js +0 -0
- package/dist/rollback.js +0 -0
- package/dist/rule-support.js +5 -11
- package/dist/rule-when.js +0 -0
- package/dist/runtime-support.js +0 -0
- package/dist/script.js +0 -0
- package/dist/server.js +92 -0
- package/dist/service-doctor.js +0 -0
- package/dist/session-manager.js +0 -0
- package/dist/session.js +12 -0
- package/dist/skills.js +12 -2
- package/dist/sqlite-warning-filter.js +0 -0
- package/dist/support.js +0 -0
- package/dist/token-cache.js +0 -0
- package/dist/tool-types.js +0 -0
- package/dist/tools.js +0 -0
- package/dist/usage-log.js +0 -0
- package/dist/wire.js +0 -0
- package/dist/workflow-support.js +0 -0
- package/dist/write-lease.js +0 -0
- package/dist/write-lock.js +0 -0
- package/dist/write.js +0 -0
- package/dist/zip.js +0 -0
- package/docs/images/omc-nixi/README.md +41 -41
- package/docs/omc-introduction.md +851 -851
- package/docs/tool-surface-map.md +42 -42
- package/package.json +4 -4
- package/skills/omc-acceptance-criteria.md +50 -50
- package/skills/omc-business-configuration.md +334 -334
- package/skills/omc-capabilities.md +214 -214
- package/skills/omc-capability-scouting.md +55 -55
- package/skills/omc-config-draft-review.md +175 -175
- package/skills/omc-five-piece-flow.md +35 -35
- package/skills/omc-glossary.md +86 -86
- package/skills/omc-refusals.md +127 -127
- package/skills/omc-requirement-analysis.md +161 -161
- package/skills/omc-requirement-vocabulary.md +61 -61
- package/skills/omc-start-here.md +106 -106
- package/skills/omc-tool-selection.md +119 -119
- package/skills/omc-write-hazards.md +200 -200
- package/dist/lanes/organization-coverage.js +0 -27
package/dist/redact.js
CHANGED
|
File without changes
|
package/dist/refusal-guidance.js
CHANGED
|
File without changes
|
package/dist/rollback-spec.js
CHANGED
|
File without changes
|
package/dist/rollback.js
CHANGED
|
File without changes
|
package/dist/rule-support.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { wireCall, wireRows, WireError } from "./wire.js";
|
|
3
3
|
import { ENDPOINTS } from "./endpoints.js";
|
|
4
|
+
import { readModelRecord } from "./model-record.js";
|
|
4
5
|
import { ToolRefusalError } from "./tool-types.js";
|
|
5
6
|
import { decodeJsonColumn, JSON_COLUMN_NULL_COALESCE } from "./json-column.js";
|
|
6
7
|
import { RULE_BIZ_RULE_TYPE_DESCRIPTION, RULE_CREATE_BODY, RULE_ROUTES_DESCRIPTION, ruleNodeGraphDescription, schedulerSettingDescription, } from "./lanes/businessrule-contract.js";
|
|
@@ -602,17 +603,10 @@ export async function assertRuleSchemaExists(session, schemaCode) {
|
|
|
602
603
|
// SCHEMA_NOT_FOUNT_ERR (10011 业务模型不存在) on miss — the same facade
|
|
603
604
|
// primitive the rule faces rely on. The fake answers ok+null for an absent
|
|
604
605
|
// schema, so BOTH signals decode as a miss.
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
610
|
-
catch (error) {
|
|
611
|
-
if (error instanceof WireError && error.kind === "business" && error.errcode === 10011)
|
|
612
|
-
missing = true;
|
|
613
|
-
else
|
|
614
|
-
throw error;
|
|
615
|
-
}
|
|
606
|
+
// Version-tolerant: 8.1 has no `/bizmodels/get_all` (404) and serves the same
|
|
607
|
+
// rows from `/bizmodels/list_schema`; see model-record.ts.
|
|
608
|
+
const record = await readModelRecord(session, schemaCode);
|
|
609
|
+
const missing = record === null;
|
|
616
610
|
if (missing) {
|
|
617
611
|
throw new ToolRefusalError({
|
|
618
612
|
status: "refused",
|
package/dist/rule-when.js
CHANGED
|
File without changes
|
package/dist/runtime-support.js
CHANGED
|
File without changes
|
package/dist/script.js
CHANGED
|
File without changes
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { randomBytes } from "node:crypto";
|
|
5
|
+
import { realpathSync } from "node:fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { buildToolRegistry, makeToolContext } from "./tools.js";
|
|
8
|
+
import { SessionManager } from "./session-manager.js";
|
|
9
|
+
import { redact, redactError } from "./redact.js";
|
|
10
|
+
import { ConfigStore } from "./config-store.js";
|
|
11
|
+
import { contractMarkdown, contractResourceUri, LANE_CONTRACTS, shortToolDescription } from "./contract-resources.js";
|
|
12
|
+
import { listSkills, readSkill } from "./skills.js";
|
|
13
|
+
export function createMcpServer(options = {}) {
|
|
14
|
+
const context = makeToolContext({
|
|
15
|
+
sessions: options.sessions ?? new SessionManager(new ConfigStore()),
|
|
16
|
+
artifactsDir: options.artifactsDir,
|
|
17
|
+
tokenKey: options.tokenKey ?? randomBytes(32).toString("base64"),
|
|
18
|
+
tokenTtlMs: options.tokenTtlMs,
|
|
19
|
+
});
|
|
20
|
+
const secrets = options.secrets ?? (() => []);
|
|
21
|
+
const server = new McpServer({ name: "omc-cli", version: "0.1.0" }, {
|
|
22
|
+
capabilities: { tools: {}, resources: {} },
|
|
23
|
+
instructions: "Governed CloudPivot 8.6 configuration server. Tool schemas are self-describing (field families, relation options, rule nodeGraph, workflow template, formData, and the two-step approval flow). Methodology is served as MCP resources under omc://skills/ (five-piece flow, tool selection, acceptance criteria, requirement analysis, capability scouting, glossary, config draft review); read them with resources/list + resources/read rather than reading repository source. Before ANY write, read omc://skills/omc-config-draft-review: present the design (exact names/codes/types, layout, rule graph, view) as a plain-language draft and get explicit human approval first — the conversational human gate (approval granularity is the enumerated change package; an interrupted package loses its approval and resuming needs a fresh draft and go-ahead). Then: call without approvalToken to preview the plan, approval.request to get a token (the machine gate — it carries no human check), re-call with it. Production environments refuse writes by default (dual-key grant). Deliver ONE closing report per run — never interrupt per step.",
|
|
24
|
+
});
|
|
25
|
+
const register = server.tool.bind(server);
|
|
26
|
+
for (const definition of buildToolRegistry()) {
|
|
27
|
+
register(definition.name, shortToolDescription(definition.name, definition.kind, definition.lane) ?? definition.description, definition.inputSchema, async (args) => {
|
|
28
|
+
try {
|
|
29
|
+
const result = await definition.handler(context, args, definition);
|
|
30
|
+
return { content: [{ type: "text", text: redact(result, secrets()) }] };
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const refusal = error.payload;
|
|
34
|
+
if (refusal)
|
|
35
|
+
return { content: [{ type: "text", text: redact(refusal, secrets()) }] };
|
|
36
|
+
const redacted = redactError(error, secrets());
|
|
37
|
+
return { content: [{ type: "text", text: redact({ status: "error", message: redacted.message }, secrets()) }], isError: true };
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
registerSkillResources(server);
|
|
42
|
+
registerContractResources(server);
|
|
43
|
+
return { server, context };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Serve the package's methodology notes as MCP resources so any client can
|
|
47
|
+
* read them on demand (host-agnostic) instead of the agent globbing the
|
|
48
|
+
* filesystem for them. Each skill file's YAML frontmatter supplies its name
|
|
49
|
+
* and description.
|
|
50
|
+
*/
|
|
51
|
+
function registerSkillResources(server) {
|
|
52
|
+
for (const entry of listSkills()) {
|
|
53
|
+
const document = readSkill(entry.name);
|
|
54
|
+
if (document === undefined)
|
|
55
|
+
continue;
|
|
56
|
+
server.registerResource(entry.name, entry.uri, { title: entry.name, description: entry.description, mimeType: "text/markdown" }, async (uri) => ({ contents: [{ uri: uri.href, mimeType: "text/markdown", text: document.content }] }));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function registerContractResources(server) {
|
|
60
|
+
for (const contract of LANE_CONTRACTS) {
|
|
61
|
+
const text = contractMarkdown(contract);
|
|
62
|
+
server.registerResource(`contract-${contract.lane}`, contractResourceUri(contract), {
|
|
63
|
+
title: `${contract.lane} contract`,
|
|
64
|
+
description: `CloudPivot ${contract.family} contract for ${contract.lane}; reference ${contract.referenceVersion}`,
|
|
65
|
+
mimeType: "text/markdown",
|
|
66
|
+
}, async (uri) => ({ contents: [{ uri: uri.href, mimeType: "text/markdown", text }] }));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export async function runStdioServer(options = {}) {
|
|
70
|
+
const { server } = createMcpServer(options);
|
|
71
|
+
const transport = new StdioServerTransport();
|
|
72
|
+
await server.connect(transport);
|
|
73
|
+
}
|
|
74
|
+
function isProcessEntryPoint() {
|
|
75
|
+
const entry = process.argv[1];
|
|
76
|
+
if (!entry)
|
|
77
|
+
return false;
|
|
78
|
+
try {
|
|
79
|
+
return realpathSync(entry) === fileURLToPath(import.meta.url);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (isProcessEntryPoint()) {
|
|
86
|
+
runStdioServer().catch((error) => {
|
|
87
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
88
|
+
process.exit(1);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export { buildToolRegistry, makeToolContext };
|
|
92
|
+
//# sourceMappingURL=server.js.map
|
package/dist/service-doctor.js
CHANGED
|
File without changes
|
package/dist/session-manager.js
CHANGED
|
File without changes
|
package/dist/session.js
CHANGED
|
@@ -21,6 +21,13 @@ export class CloudPivotSession {
|
|
|
21
21
|
tokenCache;
|
|
22
22
|
loginResult;
|
|
23
23
|
version;
|
|
24
|
+
/**
|
|
25
|
+
* Non-fatal login caveats (e.g. the `client` blob in system/config was
|
|
26
|
+
* absent or unreadable, so the token request carried no client_secret).
|
|
27
|
+
* Doctor reports these as WARN so a deployment shape difference never reads
|
|
28
|
+
* as "环境不可达".
|
|
29
|
+
*/
|
|
30
|
+
loginNotesValue = [];
|
|
24
31
|
httpAdapter;
|
|
25
32
|
fingerprintOf;
|
|
26
33
|
constructor(environmentName, profile, credential, http, systemConfig = undefined, requestTimeoutMs = defaultRequestTimeoutMs(), tokenCache) {
|
|
@@ -101,6 +108,7 @@ export class CloudPivotSession {
|
|
|
101
108
|
password: this.credential.password,
|
|
102
109
|
...(systemConfig ? { systemConfig } : {}),
|
|
103
110
|
});
|
|
111
|
+
this.loginNotesValue = authenticator.loginNotes();
|
|
104
112
|
this.version = detectVersion(systemConfig);
|
|
105
113
|
this.tokenCache?.save({
|
|
106
114
|
token: this.loginResult.token,
|
|
@@ -115,6 +123,10 @@ export class CloudPivotSession {
|
|
|
115
123
|
detectedVersion() {
|
|
116
124
|
return this.version;
|
|
117
125
|
}
|
|
126
|
+
/** Non-fatal login caveats; empty when the login was fully nominal. */
|
|
127
|
+
loginNotes() {
|
|
128
|
+
return this.loginNotesValue;
|
|
129
|
+
}
|
|
118
130
|
token() {
|
|
119
131
|
if (!this.loginResult)
|
|
120
132
|
throw new Error("session is not logged in");
|
package/dist/skills.js
CHANGED
|
@@ -11,6 +11,16 @@ import { fileURLToPath } from "node:url";
|
|
|
11
11
|
* makes `git help <concept>` reliable and a docs-site link unreliable.
|
|
12
12
|
*/
|
|
13
13
|
const skillsDir = join(dirname(fileURLToPath(import.meta.url)), "..", "skills");
|
|
14
|
+
/**
|
|
15
|
+
* Methodology files are read as text on every platform, so normalize the line
|
|
16
|
+
* ending at the read boundary. A Windows checkout (`core.autocrlf`) otherwise
|
|
17
|
+
* adds one byte per line: the `omc help` bodies drift from the golden masters,
|
|
18
|
+
* the context-cost budgets inflate by ~1.2 KB, and every help payload carries
|
|
19
|
+
* stray `\r` into JSON. The shipped bytes are LF; make every host agree.
|
|
20
|
+
*/
|
|
21
|
+
function normalizeLineEndings(text) {
|
|
22
|
+
return text.includes("\r\n") ? text.replace(/\r\n/g, "\n") : text;
|
|
23
|
+
}
|
|
14
24
|
function frontmatterDescription(text) {
|
|
15
25
|
const match = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text);
|
|
16
26
|
const line = match?.[1]?.split(/\r?\n/).find((entry) => entry.startsWith("description:"));
|
|
@@ -30,7 +40,7 @@ export function listSkills() {
|
|
|
30
40
|
const name = file.replace(/\.md$/, "");
|
|
31
41
|
let description = `OMC methodology: ${name}`;
|
|
32
42
|
try {
|
|
33
|
-
description = frontmatterDescription(readFileSync(join(skillsDir, file), "utf8")) ?? description;
|
|
43
|
+
description = frontmatterDescription(normalizeLineEndings(readFileSync(join(skillsDir, file), "utf8"))) ?? description;
|
|
34
44
|
}
|
|
35
45
|
catch {
|
|
36
46
|
// Unreadable file still lists by name; reading it reports the error.
|
|
@@ -46,7 +56,7 @@ export function readSkill(name) {
|
|
|
46
56
|
if (entry === undefined)
|
|
47
57
|
return undefined;
|
|
48
58
|
try {
|
|
49
|
-
return { ...entry, content: readFileSync(join(skillsDir, `${name}.md`), "utf8") };
|
|
59
|
+
return { ...entry, content: normalizeLineEndings(readFileSync(join(skillsDir, `${name}.md`), "utf8")) };
|
|
50
60
|
}
|
|
51
61
|
catch {
|
|
52
62
|
return undefined;
|
|
File without changes
|
package/dist/support.js
CHANGED
|
File without changes
|
package/dist/token-cache.js
CHANGED
|
File without changes
|
package/dist/tool-types.js
CHANGED
|
File without changes
|
package/dist/tools.js
CHANGED
|
File without changes
|
package/dist/usage-log.js
CHANGED
|
File without changes
|
package/dist/wire.js
CHANGED
|
File without changes
|
package/dist/workflow-support.js
CHANGED
|
File without changes
|
package/dist/write-lease.js
CHANGED
|
File without changes
|
package/dist/write-lock.js
CHANGED
|
File without changes
|
package/dist/write.js
CHANGED
|
File without changes
|
package/dist/zip.js
CHANGED
|
File without changes
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# 截图占位目录(尼西实战案例)
|
|
2
|
-
|
|
3
|
-
`omc-introduction.md` 的「15. 实战一:尼西双表单与流程搭建」章节里引用了 9 张截图。
|
|
4
|
-
把截图按下面文件名放进本目录即可,文档中的占位说明可逐条删除。
|
|
5
|
-
|
|
6
|
-
## 客户源需求(3 张)
|
|
7
|
-
|
|
8
|
-
| 文件名 | 内容 |
|
|
9
|
-
|---|---|
|
|
10
|
-
| `01-requirement-ft-sheet.png` | 客户 Excel 的 `FT` Sheet(字段清单 / 必填 / LotClass 显隐) |
|
|
11
|
-
| `02-requirement-fp-sheet.png` | 客户 Excel 的 `FP` Sheet |
|
|
12
|
-
| `03-requirement-flow.png` | 客户给的流程图(FT/FP,含 `SubConRootCause=1` 分支) |
|
|
13
|
-
|
|
14
|
-
## 对话截图(6 张)
|
|
15
|
-
|
|
16
|
-
| 文件名 | 内容 |
|
|
17
|
-
|---|---|
|
|
18
|
-
| `04-chat-app-create.png` | 确认新建应用 + `app.create ok` |
|
|
19
|
-
| `05-chat-intent-apply.png` | `intent apply` 返回 `DELIVERED` + `equivalent: true`(89 个动作) |
|
|
20
|
-
| `06-chat-workflow-role.png` | 流程节点与角色路由(PIC→蔡依涛 / MOS→赵益 / AOSIT / AOSENG) |
|
|
21
|
-
| `07-chat-permission-matrix.png` | 节点字段权限矩阵(本节点 + 之前所有节点可见) |
|
|
22
|
-
| `08-chat-biz-integration.png` | `service.register` 注册 productType 服务 + `method.test` 返回 `PRODUCT_TYPE=MOS` |
|
|
23
|
-
| `09-chat-onlinejs-publish.png` | `onlinejs.compose` 返回 `published: true` |
|
|
24
|
-
|
|
25
|
-
## 替换方式
|
|
26
|
-
|
|
27
|
-
文档里每处占位是:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
> **[截图 01|客户源需求:FT 表单规格]**
|
|
31
|
-
> 占位文件:`docs/images/omc-nixi/01-requirement-ft-sheet.png`
|
|
32
|
-
> 建议内容:...
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
落地后改成标准图片引用即可:
|
|
36
|
-
|
|
37
|
-
```markdown
|
|
38
|
-

|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
建议截图宽度 ≥ 1200px,避免中文文字模糊。
|
|
1
|
+
# 截图占位目录(尼西实战案例)
|
|
2
|
+
|
|
3
|
+
`omc-introduction.md` 的「15. 实战一:尼西双表单与流程搭建」章节里引用了 9 张截图。
|
|
4
|
+
把截图按下面文件名放进本目录即可,文档中的占位说明可逐条删除。
|
|
5
|
+
|
|
6
|
+
## 客户源需求(3 张)
|
|
7
|
+
|
|
8
|
+
| 文件名 | 内容 |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `01-requirement-ft-sheet.png` | 客户 Excel 的 `FT` Sheet(字段清单 / 必填 / LotClass 显隐) |
|
|
11
|
+
| `02-requirement-fp-sheet.png` | 客户 Excel 的 `FP` Sheet |
|
|
12
|
+
| `03-requirement-flow.png` | 客户给的流程图(FT/FP,含 `SubConRootCause=1` 分支) |
|
|
13
|
+
|
|
14
|
+
## 对话截图(6 张)
|
|
15
|
+
|
|
16
|
+
| 文件名 | 内容 |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `04-chat-app-create.png` | 确认新建应用 + `app.create ok` |
|
|
19
|
+
| `05-chat-intent-apply.png` | `intent apply` 返回 `DELIVERED` + `equivalent: true`(89 个动作) |
|
|
20
|
+
| `06-chat-workflow-role.png` | 流程节点与角色路由(PIC→蔡依涛 / MOS→赵益 / AOSIT / AOSENG) |
|
|
21
|
+
| `07-chat-permission-matrix.png` | 节点字段权限矩阵(本节点 + 之前所有节点可见) |
|
|
22
|
+
| `08-chat-biz-integration.png` | `service.register` 注册 productType 服务 + `method.test` 返回 `PRODUCT_TYPE=MOS` |
|
|
23
|
+
| `09-chat-onlinejs-publish.png` | `onlinejs.compose` 返回 `published: true` |
|
|
24
|
+
|
|
25
|
+
## 替换方式
|
|
26
|
+
|
|
27
|
+
文档里每处占位是:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
> **[截图 01|客户源需求:FT 表单规格]**
|
|
31
|
+
> 占位文件:`docs/images/omc-nixi/01-requirement-ft-sheet.png`
|
|
32
|
+
> 建议内容:...
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
落地后改成标准图片引用即可:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+

|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
建议截图宽度 ≥ 1200px,避免中文文字模糊。
|