name: bitable-field-shortcut-faas description: Build, debug, and release Feishu/Lark Bitable field shortcut plugins (FaaS). Use when tasks involve basekit.addField, formItems, resultType, execute, context.fetch, authorization modes, domain whitelist, logID-based debugging, local debug helper, local port 8080 startup for testing, optional npm run pack, or runtime constraints for 多维表格 字段捷径.
Bitable Field Shortcut FaaS
Execute Workflow
- Confirm the plugin goal and the final output field type.
- Start from the official template repo and keep the entry structure unchanged.
- Implement
formItems,resultType, andexecuteas one contract. - Add network whitelist and optional authorization config before calling external APIs.
- Add deterministic logs that always include
context.logID. - Validate behavior with the local debug assistant.
- Before ending the task, ensure a local debug service is running on port
8080for user testing. - Package with
npm run packonly when the user explicitly requests packaging/release.
Use this order unless the user explicitly asks for partial work.
Enforce Hard Constraints
- Target runtime constraints: Node.js
14.21.0, single instance1C1G, timeout15 min. - Use
context.fetch; do not rely on unsupported sandbox libraries (axios,got,bcrypt,moment,jsdom,sharp, Nodecryptoin sandbox). - Treat each record execution as isolated; never assume cross-row state.
- Keep external calls on public network; do not assume internal network access.
- Return
datastrictly matchingresultType; mismatch prevents updates.
Build Correct Contracts
- Read
references/formitems.mdto define UI inputs and expected runtime shapes. - Read
references/result-types.mdto map output type toexecutereturn data. - For
FieldType.Object, always provide required grouping/sorting keys.
Use Network, Auth, and Context Safely
- Read
references/network-auth-context.mdbefore external API integration. - Register domains using
basekit.addDomainListwith host-only values. - Select authorization mode that matches upstream API expectations.
- Propagate
context.baseSignatureandcontext.packIDwhen calling your backend.
Debug and Release
- Follow
references/quickstart.mdfor local startup and debug helper flow. - Follow
references/limits-and-ops.mdfor queue, rate, async/sync, and update compatibility. - Default behavior: do not run
npm run packunless the user asks for packaging. - If packaging is requested, package only with
npm run pack; do not hand-edit zip contents.
References
references/quickstart.md: setup, local debug, packaging checklist.references/formitems.md: form components and input data shapes.references/result-types.md: result contract and return examples.references/network-auth-context.md: fetch, whitelist, auth, context, signature verification.references/limits-and-ops.md: runtime limits, queue/rate behavior, logging, rollout safety.