larksuite / larksuite/cli

[Feature Request] 支持通过 API/CLI 创建 tripGroup 出差审批,或提供预填草稿接口

Open
#2,704 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain/core enhancement
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

功能需求

请支持通过飞书开放平台及官方 lark-cli 创建包含 tripGroup(出差控件组)的原生出差审批,让用户可以用自然语言提供行程后,由 AI Agent 填写并提交,无需回到客户端逐项录入。

实际遇到的阻塞

环境:Windows PowerShell,lark-cli 1.0.94,用户身份 --as user

  1. lark-cli approval approvals search 能找到可发起的原生「出差申请」(is_external=false)。
  2. lark-cli approval approvals get 成功返回定义,但表单只暴露以下控件,没有用于创建的子字段结构:
[{"id":"widgetTripGroup","name":"出差控件组","type":"tripGroup","required":false,"visible":true}]
  1. 随附 lark-approval Skill 的创建实例控件说明明确把 tripGroup 列为不支持的控件,因此自动化流程在提交前中断。

这是按当前能力文档发现的功能缺口;没有尝试提交不受支持的 payload,也没有创建空白审批实例。

最小业务场景(脱敏)

用户给出:某日从 A 城市去 B 城市拜访客户,当天高铁往返,共一天、无需住宿。对于这样简单的出差,仍然无法通过官方 CLI/API 完成表单填写与提交,用户必须重复手工录入已经提供的信息。

希望支持

  • 开放平台创建审批实例接口支持 tripGroup,并提供行程日期、出发地、目的地、交通方式、往返类型、事由、同行人及多段行程的稳定字段结构和示例。
  • CLI/Skill 同步支持解析表单子字段、准备及校验提交数据,并沿用正常审批人和权限校验。
  • 提供必要的城市/地区选项查询或名称解析,避免用户手工寻找内部 ID。
  • 如果短期无法直接创建,提供官方可预填草稿的接口,让用户只需补充缺失字段并最终提交。

验收期望

Agent 能查询定义、补齐必要信息并通过受支持接口创建一张真实出差审批,返回实例链接;或至少创建包含已知行程的草稿。整个流程不依赖浏览器自动化,不要求用户重填已有内容。

Related: #2240 关注现有出差审批的读取/解析;本需求关注新出差申请的创建/提交。若阻塞来自开放平台而非 CLI,请协助转交审批产品/API 团队,并反馈可行方案或计划。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lark-cli approval approvals search and get entry points and the lark-approval Skill's control support, focusing on how tripGroup is represented. Check whether the limitation is in the CLI or the Open Platform API. Done means a supported API or CLI flow can create a trip approval or a prefilled draft with the stated itinerary and return its instance link.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.