@agentprismform/agent-plugin 1.3.1 → 1.4.0
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/bin/form-agent-mcp.cjs +233 -37
- package/bin/form-agent.cjs +245 -54
- package/package.json +2 -2
- package/preview/modern-preview.css +1 -1
- package/preview/modern-preview.iife.js +6 -6
- package/skills/form-schema-author/SKILL.md +12 -0
|
@@ -74,6 +74,18 @@ metadata:
|
|
|
74
74
|
- **轻量导出**:`schema-export --schema form.json --out dist/form.schema.json --theme theme.json --theme-out dist/theme.config.json`。
|
|
75
75
|
9. **MCP 宿主一键接入**:能力包同级内置 `bin/form-agent-mcp.cjs`(标准 stdio MCP Server)与 `bin/install-host.cjs`(支持 `--host antigravity|deepseek-harness|claude|cursor|all` 一键安装 Skill 并生成 MCP 配置)。
|
|
76
76
|
|
|
77
|
+
## Agent-First 端到端交付决策流(不预设用户职业)
|
|
78
|
+
|
|
79
|
+
本插件是面向 Agent 的完整闭环能力入口。不要把“选框架 / 选包 / 配构建”的负担推给人类:
|
|
80
|
+
1. **多源需求输入**:用户可以直接口述需求,也可以直接给出 **PRD、后端 OpenAPI / JSON 示例、SQL DDL 或 TypeScript Interface**;请自动抽取字段 `key`、类型、必填、枚举码表与联动逻辑写入 `FormSchema`,并优先用 `form_contract_verify` 核对后端字段键名一致。
|
|
81
|
+
2. **确定性自测门禁**:每次修改后执行 `form_schema_validate` 与 `form_schema_selftest`,确认联动显隐、必填校验与输出载荷全部通过后再交付。
|
|
82
|
+
3. **自动决策交付载体(`form_scaffold_host` 默认 `platform: "auto"`)**:
|
|
83
|
+
- 直接调用 `form_scaffold_host`(或 CLI `scaffold-host --schema ... --out-dir ...`,**无需手填 `--platform`**),工具会自动向上扫描工作区:
|
|
84
|
+
- 检测到 Vue 3 / Nuxt 工程 → 自动生成 `<CompName>.vue` + `@agentprismform/render-vue` 单包接入;
|
|
85
|
+
- 检测到 React 18 / Next.js 工程 → 自动生成 `<CompName>.tsx` + `@agentprismform/render-web` 单包接入;
|
|
86
|
+
- 检测到微信小程序工程 → 自动生成原生 `index.wxml/js/json` + `@agentprismform/render-miniapp` 单包接入;
|
|
87
|
+
- 无前端框架仓库(运营/产品/后端/空目录)→ 自动降级为 `standalone`,直接产出零依赖可部署的 `index.html`(如用户提供了接收接口或 Webhook,传入 `submitUrl` 即可直接 POST JSON 上线收数据)。
|
|
88
|
+
|
|
77
89
|
## 精确 JSON 契约速查(避免首次调用踩坑)
|
|
78
90
|
|
|
79
91
|
### 1. `schema-patch` / `form_schema_patch` 的 `ops` 结构
|