diffcat-cli 0.2.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/.agents/plugins/marketplace.json +20 -0
- package/README.md +135 -0
- package/connectors/workbuddy/cli.json +11 -0
- package/connectors/workbuddy/connector-meta.json +22 -0
- package/connectors/workbuddy/icon.svg +11 -0
- package/connectors/workbuddy/skills/diffcat/SKILL.md +94 -0
- package/connectors/workbuddy/skills/diffcat/references/operations.md +64 -0
- package/connectors/workbuddy/skills/diffcat/references/safety.md +37 -0
- package/dist/client.d.ts +38 -0
- package/dist/client.js +199 -0
- package/dist/client.js.map +1 -0
- package/dist/config-store.d.ts +8 -0
- package/dist/config-store.js +100 -0
- package/dist/config-store.js.map +1 -0
- package/dist/credential-store.d.ts +4 -0
- package/dist/credential-store.js +37 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/deployment.d.ts +5 -0
- package/dist/deployment.js +6 -0
- package/dist/deployment.js.map +1 -0
- package/dist/device-login.d.ts +6 -0
- package/dist/device-login.js +93 -0
- package/dist/device-login.js.map +1 -0
- package/dist/dpop.d.ts +12 -0
- package/dist/dpop.js +25 -0
- package/dist/dpop.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +296 -0
- package/dist/index.js.map +1 -0
- package/dist/json-input.d.ts +1 -0
- package/dist/json-input.js +28 -0
- package/dist/json-input.js.map +1 -0
- package/dist/output.d.ts +2 -0
- package/dist/output.js +7 -0
- package/dist/output.js.map +1 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
- package/plugins/diffcat/.codex-plugin/plugin.json +24 -0
- package/plugins/diffcat/README.md +45 -0
- package/plugins/diffcat/skills/diffcat/SKILL.md +41 -0
- package/plugins/diffcat/skills/diffcat/agents/openai.yaml +6 -0
- package/plugins/diffcat/skills/diffcat/references/authentication.md +75 -0
- package/plugins/diffcat/skills/diffcat/references/capabilities.md +75 -0
- package/plugins/diffcat/skills/diffcat/references/drafts-and-approvals.md +58 -0
- package/plugins/diffcat/skills/diffcat/references/querying.md +74 -0
- package/plugins/diffcat/skills/diffcat/references/recovery.md +44 -0
- package/scripts/codex-plugin.mjs +116 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkBxC,MAAM,cAAc,GAClB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAG7E,CAAC,OAAO,CAAC;AAEV,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;KAC1B,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,uBAAuB,CAAC;KACpC,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1,28 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
async function readStdin() {
|
|
3
|
+
const chunks = [];
|
|
4
|
+
for await (const chunk of process.stdin)
|
|
5
|
+
chunks.push(Buffer.from(chunk));
|
|
6
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
7
|
+
}
|
|
8
|
+
export async function parseJsonInput(value) {
|
|
9
|
+
if (!value)
|
|
10
|
+
return {};
|
|
11
|
+
const source = value === '-'
|
|
12
|
+
? await readStdin()
|
|
13
|
+
: value.startsWith('@')
|
|
14
|
+
? await readFile(value.slice(1), 'utf8')
|
|
15
|
+
: value;
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = JSON.parse(source);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new Error(`无法解析 JSON 输入:${String(error)}`);
|
|
22
|
+
}
|
|
23
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
24
|
+
throw new Error('能力输入必须是 JSON 对象');
|
|
25
|
+
}
|
|
26
|
+
return parsed;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=json-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-input.js","sourceRoot":"","sources":["../src/json-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,UAAU,SAAS;IACtB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAyB;IAC5D,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,MAAM,GACV,KAAK,KAAK,GAAG;QACX,CAAC,CAAC,MAAM,SAAS,EAAE;QACnB,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;YACrB,CAAC,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;YACxC,CAAC,CAAC,KAAK,CAAC;IACd,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gBAAgB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,MAAiC,CAAC;AAC3C,CAAC"}
|
package/dist/output.d.ts
ADDED
package/dist/output.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,MAAe;IACvD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { JWK } from 'jose';
|
|
2
|
+
export interface PendingOperation {
|
|
3
|
+
capabilityId: string;
|
|
4
|
+
input: Record<string, unknown>;
|
|
5
|
+
idempotencyKey: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
}
|
|
8
|
+
export interface StoredCredential {
|
|
9
|
+
privateJwk: JWK;
|
|
10
|
+
publicJwk: JWK;
|
|
11
|
+
refreshToken: string;
|
|
12
|
+
accessToken: string;
|
|
13
|
+
accessExpiresAt: string;
|
|
14
|
+
scope: string[];
|
|
15
|
+
pendingOperations: Record<string, PendingOperation>;
|
|
16
|
+
}
|
|
17
|
+
export interface CliProfileConfig {
|
|
18
|
+
server: string;
|
|
19
|
+
keyringAccount: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CliConfig {
|
|
22
|
+
profiles: Record<string, CliProfileConfig>;
|
|
23
|
+
}
|
|
24
|
+
export interface OAuthTokenResponse {
|
|
25
|
+
access_token: string;
|
|
26
|
+
token_type: 'DPoP';
|
|
27
|
+
expires_in: number;
|
|
28
|
+
refresh_token: string;
|
|
29
|
+
scope: string;
|
|
30
|
+
}
|
|
31
|
+
export interface OperationResponse {
|
|
32
|
+
operationId: string;
|
|
33
|
+
status: string;
|
|
34
|
+
confirmationUrl?: string | null;
|
|
35
|
+
result?: unknown;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "diffcat-cli",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Security-first CLI for AI agents to invoke registered Diffcat capabilities",
|
|
5
|
+
"homepage": "https://diffcat.howcat.cn",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"diffcat": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
".agents/plugins/marketplace.json",
|
|
14
|
+
"connectors/workbuddy",
|
|
15
|
+
"plugins/diffcat",
|
|
16
|
+
"scripts/codex-plugin.mjs",
|
|
17
|
+
"!dist/**/*.test.*"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc -p tsconfig.json",
|
|
27
|
+
"test": "node --test dist/**/*.test.js",
|
|
28
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
29
|
+
"postinstall": "node scripts/codex-plugin.mjs install --automatic",
|
|
30
|
+
"preuninstall": "node scripts/codex-plugin.mjs uninstall --automatic"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@napi-rs/keyring": "^2.0.0",
|
|
34
|
+
"commander": "^14.0.0",
|
|
35
|
+
"jose": "^6.2.12"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^24.0.0",
|
|
39
|
+
"prettier": "^3.9.6",
|
|
40
|
+
"typescript": "^5.7.3"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "diffcat",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Use the DiffCat CLI with capability discovery, least-privilege authorization, controlled business reads, draft creation, and verified approvals.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "DiffCat"
|
|
7
|
+
},
|
|
8
|
+
"keywords": ["diffcat", "erp", "cli", "business-automation", "agent"],
|
|
9
|
+
"skills": "./skills/",
|
|
10
|
+
"interface": {
|
|
11
|
+
"displayName": "DiffCat",
|
|
12
|
+
"shortDescription": "安全查询 DiffCat 数据并办理受控业务操作",
|
|
13
|
+
"longDescription": "通过 DiffCat CLI 发现已登记能力,以最小权限查询基础资料、项目、统计和业务单据,创建草稿,并在用户二次确认后办理受支持的高风险操作。",
|
|
14
|
+
"developerName": "DiffCat",
|
|
15
|
+
"category": "Productivity",
|
|
16
|
+
"capabilities": ["Read", "Write"],
|
|
17
|
+
"defaultPrompt": [
|
|
18
|
+
"查询我在 DiffCat 中有权查看的客户和最近销售订单。",
|
|
19
|
+
"根据现有基础资料创建一张 DiffCat 单据草稿,并核对创建结果。",
|
|
20
|
+
"查看我的 DiffCat 待办;只有我明确指定后才发起受支持的审批。"
|
|
21
|
+
],
|
|
22
|
+
"brandColor": "#165DFF"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# DiffCat Codex Plugin
|
|
2
|
+
|
|
3
|
+
这个插件随 `diffcat-cli` npm 包发布,为 Codex 提供 `$diffcat` Companion Skill。它不会绕过 DiffCat 的服务端权限,也不包含 MCP Server;所有业务操作都由同一 npm 包安装的 `diffcat` CLI 调用服务端登记能力。
|
|
4
|
+
|
|
5
|
+
## 安装 CLI
|
|
6
|
+
|
|
7
|
+
要求 Node.js 22 或更高版本,以及可用的系统凭据库。
|
|
8
|
+
|
|
9
|
+
正常安装会同时携带并自动登记这个插件:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
npm install -g diffcat-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
如果 npm 禁用了 lifecycle scripts、安装 CLI 时 Codex 尚不存在,或者自动登记失败,可在 Codex 可用后显式重试:
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
diffcat setup codex
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
安装或更新后新建一个 Codex 会话,让 Codex 重新加载 Skill。CLI 默认连接 `https://diffcat-api.howcat.cn`,并通过 `https://diffcat.howcat.cn` 完成浏览器设备授权;第一次连接或切换环境时需要重新授权。
|
|
22
|
+
|
|
23
|
+
## 从仓库验证 npm 安装物
|
|
24
|
+
|
|
25
|
+
在 `cli` 目录执行:
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
pnpm install
|
|
29
|
+
pnpm typecheck
|
|
30
|
+
pnpm build
|
|
31
|
+
pnpm test
|
|
32
|
+
$package = npm pack --silent
|
|
33
|
+
npm install -g ".\$package"
|
|
34
|
+
diffcat setup codex
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 开发校验
|
|
38
|
+
|
|
39
|
+
从仓库根目录执行:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
$codexSkillRoot = Join-Path $env:USERPROFILE '.codex\skills\.system'
|
|
43
|
+
python "$codexSkillRoot\skill-creator\scripts\quick_validate.py" plugins\diffcat\skills\diffcat
|
|
44
|
+
python "$codexSkillRoot\plugin-creator\scripts\validate_plugin.py" plugins\diffcat
|
|
45
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diffcat
|
|
3
|
+
description: Use the installed DiffCat CLI to query authorized business data, discover capability schemas, create supported document drafts, or handle supported workflow approvals. Trigger for DiffCat users, departments, roles, companies, currencies, exchange rates, dictionaries, accounts, units, customers, suppliers, products, materials, warehouses, projects, statistics, documents, and workflow tasks; do not use for arbitrary HTTP, SQL, or unrelated repository development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DiffCat CLI
|
|
7
|
+
|
|
8
|
+
Use `diffcat` as the only business execution surface. The server capability catalog, the current grant, the user's live menu/action permissions, policy constraints, and object-level checks jointly determine access. Never bypass the CLI with internal REST endpoints, database access, browser form automation, GraphQL, SQL, or scripts.
|
|
9
|
+
|
|
10
|
+
## Start safely
|
|
11
|
+
|
|
12
|
+
1. Check that `diffcat` is on `PATH` with `diffcat --version`. If it is missing, explain that Node.js 22+ and `npm install -g diffcat-cli` are required, or ask permission to install the local packed CLI. Do not install packages implicitly.
|
|
13
|
+
2. Use the requested profile with the global `--profile <name>` option. Keep environments in separate profiles and never silently switch a request from test to production.
|
|
14
|
+
3. Run `diffcat --pretty auth status`. If the profile is not logged in, read [references/authentication.md](references/authentication.md). Request only the capabilities needed for the user's current and reasonably stated recurring workflow.
|
|
15
|
+
4. Run `diffcat --pretty capability list` and, before constructing unfamiliar input, `diffcat --pretty capability describe <capability-id>`. Treat the returned capability definition and `inputSchema` as authoritative over examples or cached knowledge.
|
|
16
|
+
|
|
17
|
+
## Route the task
|
|
18
|
+
|
|
19
|
+
- For base/master data, identifiers, projects, documents, workflow tasks, or statistics, read [references/querying.md](references/querying.md).
|
|
20
|
+
- For creating a business document draft, read [references/drafts-and-approvals.md](references/drafts-and-approvals.md#creating-a-draft).
|
|
21
|
+
- For approving a workflow task, read [references/drafts-and-approvals.md](references/drafts-and-approvals.md#approving-a-task).
|
|
22
|
+
- For the implemented capability/resource map, read [references/capabilities.md](references/capabilities.md). The live catalog remains authoritative.
|
|
23
|
+
- For errors, interrupted writes, pending confirmations, idempotent retries, revocation, or verification failures, read [references/recovery.md](references/recovery.md).
|
|
24
|
+
|
|
25
|
+
## Universal operating rules
|
|
26
|
+
|
|
27
|
+
- Interpret authorization narrowly. A capability appearing in the public catalog does not mean the user has granted it. A login grant also does not replace live DiffCat permissions or object-level access.
|
|
28
|
+
- Preserve least privilege. Prefer individual `--capability` requests. Use a preset only when the user asks for the corresponding broad, recurring access; never request every preset by default.
|
|
29
|
+
- Reads may run when they are needed to answer the user's request. Mutations require clear user intent to create or approve the specific business object; a request to inspect, explain, plan, validate, or preview does not authorize a write.
|
|
30
|
+
- Resolve human names to IDs through authorized read capabilities. Never guess an ID, company, department, customer, supplier, product, material, warehouse, currency, account, project, amount, date, or workflow decision. Ask the user when multiple valid matches remain or a business choice is missing.
|
|
31
|
+
- Keep decimal quantities, prices, rates, and money values as JSON strings. Do not convert them through floating-point arithmetic.
|
|
32
|
+
- Use `--input @file` or `--input -` for nontrivial JSON. Do not expose credentials in arguments, files, stdout, chat, logs, or generated artifacts.
|
|
33
|
+
- Treat stdout as one JSON result document and stderr as human progress. Require exit code zero and inspect the JSON operation `status`; never infer success from prose or from an HTTP 200 alone.
|
|
34
|
+
- Never report a write as successful when its status is `running`, `unknown`, `awaiting_confirmation`, `failed`, `verification_failed`, `rejected`, or `expired`.
|
|
35
|
+
- Do not export or copy access tokens, refresh tokens, or DPoP keys. Do not adapt personal credentials for CI or containers. Use `diffcat auth logout` or `diffcat grant revoke` when the user asks to disconnect.
|
|
36
|
+
|
|
37
|
+
## Complete the result
|
|
38
|
+
|
|
39
|
+
For a read, summarize only the requested facts, retain returned identifiers needed for follow-up, and state when pagination or authorization limits make the result incomplete.
|
|
40
|
+
|
|
41
|
+
For a write, use a stable idempotency key from the first attempt through every retry. After a `succeeded` result, independently read the created or affected object and verify its ID, status, company/department scope, business parties, currency, amounts, and line count as applicable. Report both the operation ID and the verification outcome.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# DiffCat authentication and profiles
|
|
2
|
+
|
|
3
|
+
Read this reference when a profile is not logged in, the requested capability is absent from the current grant, the user wants to change environments, or authorization must be revoked.
|
|
4
|
+
|
|
5
|
+
## Discover before requesting access
|
|
6
|
+
|
|
7
|
+
The public catalog does not require a login:
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
diffcat --pretty capability catalog
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use its capability IDs and presets instead of inventing names. The catalog describes what the server can offer, not what the current user is entitled to receive.
|
|
14
|
+
|
|
15
|
+
The CLI defaults to the production API at `https://diffcat-api.howcat.cn`. Use `--server <url>` only when the user explicitly chooses another deployment; keep different deployments in separate profiles.
|
|
16
|
+
|
|
17
|
+
## Request minimum access
|
|
18
|
+
|
|
19
|
+
Request individual capabilities for a narrow task:
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
diffcat --profile default auth login `
|
|
23
|
+
--capability md.customers.read `
|
|
24
|
+
--capability sales.orders.read
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For a clearly requested recurring workflow, the server currently advertises these convenience presets:
|
|
28
|
+
|
|
29
|
+
- `master-data-read`: all registered base/master-data reads.
|
|
30
|
+
- `document-read`: all 15 registered document reads.
|
|
31
|
+
- `document-draft`: all 15 registered document draft-create abilities; no submit or approval.
|
|
32
|
+
|
|
33
|
+
Do not request a preset merely to avoid deciding which capability is needed. Device authorization accepts at most 32 capability IDs; always use the live catalog to see what a preset expands to.
|
|
34
|
+
|
|
35
|
+
The CLI prints the verification URL and progress to stderr. Production authorization opens on `https://diffcat.howcat.cn`. The user must open the DiffCat authorization page, inspect the device name, requested capabilities, constraints, and duration, then approve or deny them. Never approve the browser page for the user or ask for their password, verification code, token, cookie, or DPoP key in chat.
|
|
36
|
+
|
|
37
|
+
The server grants only the intersection of:
|
|
38
|
+
|
|
39
|
+
- registered client capabilities;
|
|
40
|
+
- capabilities explicitly approved by the user;
|
|
41
|
+
- the user's current menu and action permissions;
|
|
42
|
+
- global, department, and role policies;
|
|
43
|
+
- authorization constraints and object-level business checks.
|
|
44
|
+
|
|
45
|
+
Some requested capabilities can therefore be omitted from the final grant. Verify the result:
|
|
46
|
+
|
|
47
|
+
```powershell
|
|
48
|
+
diffcat --pretty auth status
|
|
49
|
+
diffcat --pretty grant list
|
|
50
|
+
diffcat --pretty capability list
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If a needed capability is absent, explain which operation cannot proceed. Start another login only after the user agrees to request that specific additional access.
|
|
54
|
+
|
|
55
|
+
## Profiles and environments
|
|
56
|
+
|
|
57
|
+
Use named profiles to isolate environments:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
diffcat --profile test --pretty auth status
|
|
61
|
+
diffcat --profile production --pretty auth status
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Repeat the same global `--profile` on every command in a multi-step workflow. Do not infer that two profiles represent the same tenant, and do not copy credentials between them.
|
|
65
|
+
|
|
66
|
+
## Disconnect
|
|
67
|
+
|
|
68
|
+
`auth logout` revokes the refresh token and deletes the local profile credentials. `grant revoke` revokes the current DPoP-bound grant and also clears the local profile:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
diffcat --profile default auth logout
|
|
72
|
+
diffcat --profile default grant revoke
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Revocation is an external state change. Execute it only when the user asks to disconnect or revoke access.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# DiffCat implemented capabilities
|
|
2
|
+
|
|
3
|
+
This is a routing snapshot of the current implementation. Always confirm availability, risk level, operations, and input schema with `capability list` and `capability describe` because server deployments and grants can differ.
|
|
4
|
+
|
|
5
|
+
## Base and master data
|
|
6
|
+
|
|
7
|
+
Use `diffcat resource list <resource>` and, where the described schema allows `get`, `diffcat resource get <resource> <id>`.
|
|
8
|
+
|
|
9
|
+
| Resource | Business object |
|
|
10
|
+
| ------------------------------ | ------------------------ |
|
|
11
|
+
| `sys.users` | 用户 |
|
|
12
|
+
| `sys.departments` | 部门 |
|
|
13
|
+
| `sys.roles` | 角色 |
|
|
14
|
+
| `sys.dict_types` | 字典类型 |
|
|
15
|
+
| `sys.dict_entries` | 字典项 |
|
|
16
|
+
| `md.companies` | 公司 |
|
|
17
|
+
| `md.currencies` | 币种 |
|
|
18
|
+
| `fin.exchange_rates` | 汇率 |
|
|
19
|
+
| `md.uoms` | 计量单位 |
|
|
20
|
+
| `md.encoding_rules` | 编码规则 |
|
|
21
|
+
| `md.fee_subjects` | 费用科目 |
|
|
22
|
+
| `md.customers` | 客户 |
|
|
23
|
+
| `md.customer_contacts` | 客户联系人 |
|
|
24
|
+
| `md.customer_invoice_profiles` | 客户开票资料 |
|
|
25
|
+
| `md.stores` | 门店 |
|
|
26
|
+
| `md.contracts` | 合同 |
|
|
27
|
+
| `md.products` | 商品 |
|
|
28
|
+
| `md.price_lists` | 价目表 |
|
|
29
|
+
| `md.price_list_lines` | 价目行 |
|
|
30
|
+
| `md.warehouses` | 仓库 |
|
|
31
|
+
| `md.warehouse_members` | 仓库成员;当前只支持列表 |
|
|
32
|
+
| `md.suppliers` | 供应商 |
|
|
33
|
+
| `md.supplier_contacts` | 供应商联系人 |
|
|
34
|
+
| `md.materials` | 物料 |
|
|
35
|
+
| `md.bom_lines` | 物料清单行 |
|
|
36
|
+
| `adm.supplies` | 行政用品 |
|
|
37
|
+
| `fin.bank_accounts` | 银行账户 |
|
|
38
|
+
| `sales.crowdfunding_platforms` | 众筹平台 |
|
|
39
|
+
|
|
40
|
+
The capability ID is `<resource>.read`.
|
|
41
|
+
|
|
42
|
+
## Business documents
|
|
43
|
+
|
|
44
|
+
Each resource currently has `<resource>.read` and `<resource>.create_draft`. Use `document list`, `document get`, and `document create-draft` only after the live description confirms the operation.
|
|
45
|
+
|
|
46
|
+
| Resource | Document |
|
|
47
|
+
| ----------------------------------- | ------------ |
|
|
48
|
+
| `sales.orders` | 销售订单 |
|
|
49
|
+
| `sales.direct_orders` | 直销订单 |
|
|
50
|
+
| `sales.consignment_reconciliations` | 代销对账单 |
|
|
51
|
+
| `sales.crowdfunding_orders` | 众筹履约订单 |
|
|
52
|
+
| `inv.purchase_requests` | 采购申请 |
|
|
53
|
+
| `inv.inbound_orders` | 入库单 |
|
|
54
|
+
| `inv.outbound_orders` | 出库单 |
|
|
55
|
+
| `inv.stocktake_orders` | 盘存单 |
|
|
56
|
+
| `fin.expense_requests` | 费用申请 |
|
|
57
|
+
| `fin.invoice_requests` | 开票申请 |
|
|
58
|
+
| `fin.refund_requests` | 退款申请 |
|
|
59
|
+
| `adm.supply_entry_orders` | 用品录入单 |
|
|
60
|
+
| `adm.supply_issue_requests` | 用品领用申请 |
|
|
61
|
+
| `adm.supply_purchase_requests` | 用品采购申请 |
|
|
62
|
+
| `adm.supply_stocktake_orders` | 用品盘点单 |
|
|
63
|
+
|
|
64
|
+
All current create abilities create `DRAFT` only. They do not submit, start approval, post finance, or change inventory.
|
|
65
|
+
|
|
66
|
+
## Specialized capabilities
|
|
67
|
+
|
|
68
|
+
| Capability | CLI route | Current boundary |
|
|
69
|
+
| ------------------------ | ----------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `pm.projects.read` | `project list/get` | Authorized project list and detail |
|
|
71
|
+
| `data_center.stats.read` | `stats list/query` | Registered widgets only; no arbitrary SQL |
|
|
72
|
+
| `flow.tasks.read` | `task list/get` when schema permits | Tasks visible to the current handler user |
|
|
73
|
+
| `flow.tasks.approve` | `task approve` | Current user's pending purchase-request APPROVE/APPROVAL task only; high-risk confirmation required |
|
|
74
|
+
|
|
75
|
+
`sales.orders.read` and `sales.orders.create_draft` also have specialized `sales-order` commands, but the generic `document` commands use the same capability IDs.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# DiffCat drafts and approvals
|
|
2
|
+
|
|
3
|
+
Read only the relevant section for the requested mutation.
|
|
4
|
+
|
|
5
|
+
## Creating a draft
|
|
6
|
+
|
|
7
|
+
A request to research, list, inspect, prepare, preview, explain, or validate a document does not authorize creation. Proceed only when the user clearly asks to create the specific document draft.
|
|
8
|
+
|
|
9
|
+
1. Confirm `<resource>.create_draft` is in the current grant and run `capability describe`.
|
|
10
|
+
2. Resolve every referenced business object through authorized reads. Do not infer IDs from names or reuse an ID from a different profile/environment.
|
|
11
|
+
3. Build input from the returned schema and its `inputModel`. The server additionally validates the corresponding business Create DTO, so schema acceptance alone does not prove business validity.
|
|
12
|
+
4. Present unresolved business choices to the user. Do not invent missing company, party, warehouse, account, currency, tax, date, quantity, price, exchange rate, or line data.
|
|
13
|
+
5. Generate one stable idempotency key before the first invocation and retain it until the operation has a terminal status.
|
|
14
|
+
6. Put nontrivial JSON in a temporary input file without credentials, or pass it on stdin. Execute:
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
diffcat --pretty document create-draft <resource> `
|
|
18
|
+
--input @draft.json `
|
|
19
|
+
--idempotency-key <stable-key>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
7. Require exit code zero and operation status `succeeded`.
|
|
23
|
+
8. Read the returned entity by ID. Confirm at least `status === "DRAFT"`, then compare the scope, parties, currency, totals, and line count/identifiers relevant to the user's request.
|
|
24
|
+
|
|
25
|
+
The current handlers create a draft and internally re-read it to verify `DRAFT`. This does not replace the Agent's external comparison of the returned business fields. Draft creation never implies permission to submit, approve, post finance, or change inventory.
|
|
26
|
+
|
|
27
|
+
If execution is interrupted or the status is not terminal, do not issue a fresh write with a new key. Read [recovery.md](recovery.md).
|
|
28
|
+
|
|
29
|
+
## Approving a task
|
|
30
|
+
|
|
31
|
+
Approval is irreversible and always requires both explicit user intent for the identified task and DiffCat's browser step-up confirmation. The currently implemented capability is intentionally narrow: it accepts only a `PENDING` purchase-request task whose grant function is `APPROVE`, node type is `APPROVAL`, and handler is the current user.
|
|
32
|
+
|
|
33
|
+
1. Query the task and related purchase request. Show the user the task ID, document ID/number, requester, company/department, material lines, quantities, amounts, and any anomaly relevant to the decision.
|
|
34
|
+
2. If the user has not explicitly chosen approval, stop after presenting the information. Never infer approval from “处理一下”“看看待办” or similar wording.
|
|
35
|
+
3. Generate a stable idempotency key and invoke once:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
diffcat --pretty task approve 456 `
|
|
39
|
+
--comment "同意" `
|
|
40
|
+
--idempotency-key <stable-key>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
4. The first response should be `awaiting_confirmation` with an operation ID and confirmation URL. Present those to the user. Do not open or operate the confirmation page for them, do not enter a password, and do not claim the approval occurred.
|
|
44
|
+
5. After the user says they completed confirmation, check:
|
|
45
|
+
|
|
46
|
+
```powershell
|
|
47
|
+
diffcat --pretty operation status <operation-id>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
6. Only when the operation is confirmed and the same local profile still contains its pending input, continue:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
diffcat --pretty operation resume <operation-id>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
7. Require `succeeded`, then read the task and related purchase request again. Verify the task is completed by the current user and report the resulting document/workflow state.
|
|
57
|
+
|
|
58
|
+
Never replace `operation resume` with another `task approve` call. Reject, expiry, missing local pending input, changed business state, or `verification_failed` requires recovery, not an improvised bypass.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Querying DiffCat safely
|
|
2
|
+
|
|
3
|
+
Read this reference for authorized base/master data, document, project, statistics, and workflow-task reads.
|
|
4
|
+
|
|
5
|
+
## Inspect the contract
|
|
6
|
+
|
|
7
|
+
Before using a resource for the first time in the task:
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
diffcat --pretty capability describe md.customers.read
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use only fields allowed by `inputSchema`. Query fields vary by resource. `include` accepts only named relation fields supported by the underlying resource model; do not invent them from database names.
|
|
14
|
+
|
|
15
|
+
List requests default to 20 rows and are capped by both the capability schema and authorization constraints. The generic handlers cap a page at 100 even when a lower grant limit does not apply. Follow pagination deliberately and stop once the user's question is answered.
|
|
16
|
+
|
|
17
|
+
## Base/master data
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
diffcat --pretty resource list md.customers --query '{"page":1,"pageSize":20,"keyword":"示例"}'
|
|
21
|
+
diffcat --pretty resource get md.materials 123 --include bomLines
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use list queries to resolve a human name or business number to an ID. If the result has multiple plausible matches, show a compact disambiguation using stable identifiers and relevant scope fields, then ask the user to choose.
|
|
25
|
+
|
|
26
|
+
## Documents
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
diffcat --pretty document list inv.purchase_requests --query '{"page":1,"pageSize":20,"status":"DRAFT"}'
|
|
30
|
+
diffcat --pretty document get inv.purchase_requests 123
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Do not assume all document types share filter fields or relation names. Describe each capability and use its deployed schema.
|
|
34
|
+
|
|
35
|
+
## Projects
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
diffcat --pretty project list --query '{"page":1,"pageSize":20,"keyword":"新品"}'
|
|
39
|
+
diffcat --pretty project get 123
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If the grant contains `allowedProjectIds`, list access can be rejected and the project must be queried by a permitted primary key. If it contains `allowedDepartmentIds`, project lists must specify an allowed `departmentId`.
|
|
43
|
+
|
|
44
|
+
## Statistics
|
|
45
|
+
|
|
46
|
+
First list the registered widgets for the current or target authorized role:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
diffcat --pretty stats list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then query only returned widget codes:
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
diffcat --pretty stats query --input @widgets.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The input contains `roleId` and one to 24 `widgets`. Supported filters include an ISO date-time `dateRange`, a natural month/year period, `departmentId`, and a three-letter uppercase `currencyCode`, as allowed by the described schema. This ability never accepts SQL. Under a department constraint, every requested widget must specify an allowed department.
|
|
59
|
+
|
|
60
|
+
## Workflow tasks
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
diffcat --pretty task list --query '{"page":1,"pageSize":20,"status":"PENDING"}'
|
|
64
|
+
diffcat --pretty task get 456
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `task get` only if the live input schema permits `get`. Reading a task does not authorize completing it.
|
|
68
|
+
|
|
69
|
+
## Interpret responses
|
|
70
|
+
|
|
71
|
+
- A successful list may still be empty because no authorized rows match.
|
|
72
|
+
- Keep strings such as IDs, decimals, currencies, and status codes in their returned representation.
|
|
73
|
+
- If the response includes `total`, `page`, and `pageSize`, state whether all pages were examined.
|
|
74
|
+
- A nonzero exit code or a JSON failure is not an empty result; report the failure and follow recovery guidance.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# DiffCat recovery and failure handling
|
|
2
|
+
|
|
3
|
+
Read this reference for nonzero exits, authorization failures, network interruption, pending confirmation, an unknown/running operation, result verification failure, or revocation.
|
|
4
|
+
|
|
5
|
+
## Classify before retrying
|
|
6
|
+
|
|
7
|
+
- `401` or an expired access token: the CLI performs one synchronized refresh automatically. If it still fails, do not extract tokens or repeatedly retry; inspect `auth status` and ask the user to reauthorize if necessary.
|
|
8
|
+
- Missing capability/access denied: inspect `auth status`, `grant list`, and `capability list`. Do not request broader access without user agreement, switch profiles, or bypass the CLI.
|
|
9
|
+
- Schema/DTO validation failure: run `capability describe`, correct only fields supported by the user's intent and authoritative source data, then reuse the original idempotency key for the same logical write.
|
|
10
|
+
- Rate limit/slow down: reduce pagination/concurrency and wait for the indicated server window. Do not rotate profiles or credentials to evade limits.
|
|
11
|
+
- Business conflict or stale state: re-read the affected object. Ask the user before changing the intended business action.
|
|
12
|
+
|
|
13
|
+
## Operations and idempotency
|
|
14
|
+
|
|
15
|
+
Every write must have a stable idempotency key chosen before the first attempt. Reuse it only for the identical capability and identical logical input. Never reuse it for edited input or a different object.
|
|
16
|
+
|
|
17
|
+
When an operation ID is known, inspect it before any retry:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
diffcat --pretty operation status <operation-id>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Interpret states conservatively:
|
|
24
|
+
|
|
25
|
+
- `succeeded`: independently re-read and compare the business object before reporting completion.
|
|
26
|
+
- `awaiting_confirmation`: wait for the user to complete or reject the browser confirmation; do not recreate the operation.
|
|
27
|
+
- `running` or externally reported `unknown`: poll status at a reasonable interval. The server treats work running longer than two minutes as unknown to callers; do not replay it as a fresh write.
|
|
28
|
+
- `failed`: report the bounded error and operation/request IDs. Re-read business state before deciding whether an identical idempotent retry is safe.
|
|
29
|
+
- `verification_failed`: state that execution may have changed data but verification did not pass. Do not report success or automatically retry; read the target entity and escalate for human review if state remains uncertain.
|
|
30
|
+
- `rejected` or `expired`: do not resume. A new attempt requires renewed explicit user intent and a new idempotency key.
|
|
31
|
+
|
|
32
|
+
For a confirmed high-risk operation, use only:
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
diffcat --pretty operation resume <operation-id>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`resume` depends on encrypted pending input retained in the same profile's operating-system credential store. If it is missing, do not reconstruct or execute the operation silently.
|
|
39
|
+
|
|
40
|
+
## Safe diagnostics
|
|
41
|
+
|
|
42
|
+
Capture the CLI's generated `requestId` and server `operationId` when reporting a problem. Output only bounded, redacted error details. Never print profile credential-store records, authorization headers, tokens, cookies, DPoP proofs/keys, passwords, or full sensitive inputs.
|
|
43
|
+
|
|
44
|
+
Use `auth logout` or `grant revoke` only when requested or when the user explicitly chooses revocation as the recovery action; both disconnect the profile.
|