← 返回
未分类 Key

mofang-records

Magicflu/Mofang web-table records and BPM workflow CLI skill. Use when users ask about 魔方网表, Magicflu/Mofang spaces, forms, fields, records, data query/searc...
Magicflu/Mofang 网页表记录和 BPM 工作流 CLI 技能。在用户询问魔方网表、Magicflu/Mofang 的空间、表单、字段、记录、数据查询/搜索等相关问题时使用。
magicscape magicscape 来源
未分类 clawhub v3.1.3 1 版本 100000 Key: 需要
★ 1
Stars
📥 503
下载
💾 0
安装
1
版本
#latest

概述

魔方网表记录与流程 CLI

Use this skill to operate Magicflu/Mofang web-table records and BPM tasks through the bundled CLI. Do not hand-write HTTP requests for supported operations; the CLI handles token refresh, field mapping, space/form resolution, filters, and BPM cookies.

Install Locations

Copy the whole mofang-records/ folder, not only SKILL.md.

ClientProject installGlobal install
---------
OpenClaw.openclaw/skills/mofang-records/~/.openclaw/skills/mofang-records/
Claude Code.claude/skills/mofang-records/~/.claude/skills/mofang-records/
Codex.codex/skills/mofang-records/~/.codex/skills/mofang-records/
Trae.trae/skills/mofang-records/~/.trae/skills/mofang-records/
Trae CN.trae/skills/mofang-records/~/.trae-cn/skills/mofang-records/

Required runtime: Node.js 18+.

Configuration

The CLI reads these environment variables, with MOFANG_* taking priority:

  • MOFANG_BASE_URL or BASE_URL
  • MOFANG_USERNAME or USERNAME
  • MOFANG_PASSWORD or PASSWORD
  • Optional: FETCH_TIMEOUT_MS in milliseconds, default 120000

If a .env file exists beside cli.mjs, values are loaded only when the variable is not already set in the environment.

CLI Contract

Run commands from the skill directory:

node cli.mjs <command> '<json-params>'

Every command prints JSON:

{"success":true,"message":"...","data":{}}

If a command fails, keep the JSON output and report message to the user. Do not expose tokens or passwords.

Bash Examples

export MOFANG_BASE_URL="http://appdev.com.magicflu.com:9999"
export MOFANG_USERNAME="admin"
export MOFANG_PASSWORD="***"
node cli.mjs mofang_list_spaces '{}'
node cli.mjs mofang_list_spaces '{"q":"前端编程"}'
node cli.mjs mofang_list_forms '{"spaceHint":"AI前端编程演示"}'
node cli.mjs mofang_query_records '{"spaceHint":"AI前端编程演示","formHint":"采购申请主表","pageSize":10}'

PowerShell Examples

$env:MOFANG_BASE_URL='http://appdev.com.magicflu.com:9999'
$env:MOFANG_USERNAME='admin'
$env:MOFANG_PASSWORD='***'
node cli.mjs mofang_list_spaces '{}'
node cli.mjs mofang_list_spaces '{\"q\":\"前端编程\"}'
node cli.mjs mofang_list_forms '{\"spaceHint\":\"AI前端编程演示\"}'
node cli.mjs mofang_query_records '{\"spaceHint\":\"AI前端编程演示\",\"formHint\":\"采购申请主表\",\"pageSize\":10}'

Required Workflow

  1. Prefer read-only commands first: list spaces, list forms, get field definitions, query records.
  2. Always pass spaceHint when the user provides or implies a target space. This prevents cross-space ambiguity.
  3. Before create or update, run mofang_get_field_definitions for the target form and use real field name or label values.
  4. Show a concise preview before write operations and get user confirmation, unless the user already explicitly confirmed the exact write.
  5. Treat delete and BPM actions as high risk. Confirm the target record/task and explain the consequence before running them.
  6. Use the CLI for supported operations. Do not import handler modules directly or build custom fetch/requests calls for records/BPM.

Commands

Records and Forms

CommandPurposeKey params
---------
mofang_test_connectionTest base URL and credentials{}
mofang_list_spacesList or search accessible spacesq?, spaceHint?, page?, pageSize?, all?
mofang_list_formsList forms in a spacespaceHint?
mofang_get_field_definitionsGet fields, names, types, optionsformHint, spaceHint?
mofang_query_recordsQuery records with pagination/filter/orderformHint, spaceHint?, filters?, page?, pageSize?, all?
mofang_create_recordCreate one recordformHint, spaceHint?, data
mofang_update_recordUpdate one recordformHint, spaceHint?, recordId, data
mofang_delete_recordDelete one recordformHint, spaceHint?, recordId

BPM

CommandPurposeKey params
---------
mofang_bpm_list_tasksList assignee/candidate/delegated tasksmode?, page?, pageSize?
mofang_bpm_query_tasksLocate BPM tasks by form/record/processformHint?, spaceHint?, recordId?, taskName?
mofang_bpm_get_taskGet one task and variablestaskId
mofang_bpm_complete_taskComplete/submit a tasktaskId, simple?, variables?
mofang_bpm_delegate_taskDelegate a tasktaskId, assignee
mofang_bpm_claim_taskClaim a group tasktaskId, assignee?
mofang_bpm_resolve_taskResolve delegated tasktaskId
mofang_bpm_jump_taskAbort, rollback, or recovertaskId, kind, jumpTargetId?, targetTaskName?
mofang_bpm_open_transactionOpen transaction such as COSIGNtaskAction, processName?, taskName?
mofang_bpm_close_transactionClose transactiontransactionId

Field Value Rules

  • Text, multiline text, URL: string
  • Number: number, never ""
  • Date: YYYY-MM-DD
  • Datetime: YYYY-MM-DD HH:mm:ss
  • Dropdown/tree: option value shown by mofang_get_field_definitions
  • Checkbox: comma-separated option values, such as "1,2"
  • Main reference: {"id":"recordId"}
  • Embed field: do not create child records inside the main create call. Create child records first, then update the main embed field with {"entry":[{"id":"childId"}]}

The CLI accepts either Chinese label or English name for data keys and filters[].fieldName, but using field name is safest for generated code.

Filters

Use filters as an array. Do not use frontend-only filterType, value2, or filterGroup unless you are relying on the CLI's best-effort legacy conversion.

{
  "formHint": "采购申请主表",
  "spaceHint": "AI前端编程演示",
  "filters": [
    {"fieldName": "申请日期", "operator": "between", "value": "2026-03-01,2026-04-01"}
  ],
  "pageSize": 50
}

Supported operators include eq, noteq, like, like_and, like_or, lt, gt, lte, gte, between, isnull, isnotnull, in, notin, checkbox_in, checkbox_eq, tree, and rddl.

Troubleshooting

  • If a form name resolves incorrectly, rerun with explicit spaceHint.
  • mofang_list_spaces {} lists spaces by created time descending. To locate a specific space faster, search directly with {"q":"关键词"} or {"spaceHint":"空间名"}.
  • If a request hangs or times out, check MOFANG_BASE_URL, network/VPN, and optionally set FETCH_TIMEOUT_MS.
  • If numeric fields fail with NumberFormatException, remove empty string values and check field definitions.
  • If dropdown values become empty, inspect mofang_get_field_definitions options and submit the shown option value, not the display label unless they are the same.
  • If PowerShell JSON parsing fails, escape inner quotes as \" or run from bash with normal single-quoted JSON.

版本历史

共 1 个版本

  • v3.1.3 当前
    2026-05-21 13:10 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 75 📥 182,287
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 196 📥 67,876
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 328,894