feat:移除了弹窗,服务器添加sls

This commit is contained in:
2026-09-08 22:39:45 +08:00
commit 6a295f9a7a
4082 changed files with 1322534 additions and 0 deletions

View File

@ -0,0 +1,38 @@
# task +assign
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Assign or remove members (assignees) from a task.
## Recommended Commands
```bash
# Add an assignee
lark-cli task +assign --task-id "<task_guid>" --add "ou_aaa"
# Add an app assignee
lark-cli task +assign --task-id "<task_guid>" --add "cli_xxx"
# Transfer an assignee (remove old, add new)
lark-cli task +assign --task-id "<task_guid>" --remove "ou_old" --add "ou_new"
# Add multiple assignees
lark-cli task +assign --task-id "<task_guid>" --add "ou_aaa,ou_bbb"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to modify. For Feishu task applinks, use the `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
| `--add <ids>` | No | Comma-separated assignee IDs. Use user `open_id`s like `ou_xxx` for people, or app IDs like `cli_xxx` for apps. |
| `--remove <ids>` | No | Comma-separated assignee IDs. Use user `open_id`s like `ou_xxx` for people, or app IDs like `cli_xxx` for apps. |
## Workflow
1. Confirm the task and members to add/remove.
2. Execute the command.
3. Report success and the new count of assignees.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,28 @@
# task +comment
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Add a comment to an existing task.
## Recommended Commands
```bash
# Add a comment
lark-cli task +comment --task-id "<task_guid>" --content "Looks good!"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to comment on. For Feishu task applinks, use the `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
| `--content <text>` | Yes | The text content of the comment. |
## Workflow
1. Confirm the task and comment content.
2. Execute `lark-cli task +comment --task-id "..." --content "..."`
3. Report success and comment ID.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,31 @@
# task +complete
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Mark a task as completed.
## Recommended Commands
```bash
# Complete a task
lark-cli task +complete --task-id "<task_guid>"
# A task applink is accepted directly; the CLI extracts its guid query value
lark-cli task +complete --task-id "https://applink.larksuite.com/client/todo/task?guid=<task_guid>"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid-or-applink>` | Yes | Task OpenAPI GUID or a task applink containing `guid=`. Display task IDs such as `t104121` / `suite_entity_num` are rejected. |
## Workflow
1. Confirm the task to complete.
2. Execute the command.
3. Read `data.status`, `data.completed_at`, and `data.already_completed` from the result. `already_completed: true` means the shortcut observed an already-completed task and skipped the PATCH.
4. Do not routinely call `task tasks get` when the result already reports `status: done` and a non-zero `completed_at`. Query details only if confirmation fields are absent or the user explicitly asks for a full verification.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,79 @@
# task +create
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Create a new task in Lark.
## Recommended Commands
```bash
# Create a task with all details
lark-cli task +create \
--summary "Quarterly Sales Review" \
--description "Review the sales performance for the last quarter." \
--assignee "ou_xxx" \
--due "2026-03-25" \
--tasklist-id "https://applink.larkoffice.com/client/todo/task_list?guid=a4b00000-000-000-000-00000000036c"
# Create a task assigned to an app
lark-cli task +create \
--summary "Nightly Sync" \
--assignee "cli_xxx"
# Create a simple task
lark-cli task +create \
--summary "Buy milk"
# Create a milestone by passing an API field without a named flag
lark-cli task +create \
--summary "Release v2.0" \
--due "2026-08-15" \
--data '{"is_milestone":true}'
# Preview the API call without executing
lark-cli task +create --summary "Test Task" --dry-run
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--summary <text>` | Yes | The title or summary of the task |
| `--description <text>` | No | Detailed description of the task |
| `--assignee <id>` | No | Assignee ID. Use user `open_id` like `ou_xxx` for people, or app ID like `cli_xxx` for apps. |
| `--follower <id>` | No | Follower ID. Use user `open_id` like `ou_xxx` for people, or app ID like `cli_xxx` for apps. |
| `--due <time>` | No | Due date. Supports ISO 8601, `YYYY-MM-DD`, relative time (e.g., `+2d`), or ms timestamp. `YYYY-MM-DD` and relative time will automatically set it as an all-day task. |
| `--tasklist-id <id>` | No | The GUID of the tasklist, or a full AppLink URL (the CLI will automatically extract the `guid` parameter from the URL). |
| `--idempotency-key <key>` | No | Client token to ensure idempotency of the request. |
| `--data <json>` | No | JSON object merged into the task create request for API fields without dedicated flags, such as `{"is_milestone":true}`. Explicit named flags override same-named fields in this object. |
| `--dry-run` | No | Preview the API call (JSON payload) without actually creating the task. |
Use `lark-cli schema task.tasks.create` to confirm that an extra field is supported before passing it through `--data`. Prefer this shortcut over the raw `tasks create` command when `--data` can express the request. Do not assume that other shortcuts support `--data`; check each shortcut's `--help` output first.
## Workflow
1. Confirm with the user: task summary, due date, assignee, and tasklist if necessary.
- **Crucial Rule for Assignee**: If the user explicitly or implicitly says "create a task for me" (给我创建一个任务), or "help me create a task" (帮我新建/创建一个任务), you MUST assign the task to the current logged-in user. You can get the current user's `open_id` by executing `lark-cli auth status` (it already outputs JSON by default, so do not add `--json`) or `lark-cli contact +get-user` first, extracting `.identities.user.openId` (from `auth status`) or `.data.user.open_id` (from `contact +get-user`), and then passing it to the `--assignee` parameter.
2. Execute `lark-cli task +create --summary "..." ...`
3. Judge success by `ok == true` in the stdout JSON (the success envelope has no `code` field — do not test `code == 0`), then report the result: task ID (`data.guid`) and summary.
Example success response:
```json
{
"ok": true,
"identity": "user",
"data": {
"guid": "e297d3d0-4b60-4a5f-a4d4-xxxxxxxxxxxx",
"url": "https://applink.larkoffice.com/client/todo/detail?guid=e297d3d0-4b60-4a5f-a4d4-xxxxxxxxxxxx"
}
}
```
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.
## References
- [lark-task](../SKILL.md) -- All task commands
- [lark-shared](../../lark-shared/SKILL.md) -- Authentication and global parameters

View File

@ -0,0 +1,35 @@
# task +followers
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Manage task followers. Add or remove followers from an existing task.
## Recommended Commands
```bash
# Add a follower
lark-cli task +followers --task-id "<task_guid>" --add "ou_aaa"
# Add an app follower
lark-cli task +followers --task-id "<task_guid>" --add "cli_xxx"
# Remove a follower
lark-cli task +followers --task-id "<task_guid>" --remove "ou_aaa"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to modify. For Feishu task applinks, use the `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
| `--add <ids>` | No | Comma-separated follower IDs. Use user `open_id`s like `ou_xxx` for people, or app IDs like `cli_xxx` for apps. |
| `--remove <ids>` | No | Comma-separated follower IDs. Use user `open_id`s like `ou_xxx` for people, or app IDs like `cli_xxx` for apps. |
## Workflow
1. Confirm the task and followers to add/remove.
2. Execute the command.
3. Report success.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,61 @@
# task +get-my-tasks
If the user query only specifies a task name (e.g., "Complete task Lobster No. 1"), use this command to list and search for the task by its summary.
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
>
> **⚠️ Note:** This API must be called with a user identity. **Do NOT use an app identity, otherwise the call will fail.**
>
> **Output rendering note:**
> 1. If you need to present user fields (assignee, creator, etc.), do not only output the raw `id` (e.g. open_id). Also try to resolve and display the user's real name (e.g. via the contact skill) for readability.
> 2. When rendering timestamps (e.g. created time, due time), use the local timezone. Format is 2006-01-02 15:04:05
List tasks assigned to the current user, with support for filtering by completion status, creation time, and due date.
By default, the command will automatically paginate up to 20 times. Use `--page-all` to fetch more (up to 40 pages).
> **Pending vs all tasks:** When `--complete` is not provided, the result contains **both completed and incomplete tasks**.
> For standup / daily-summary / pending-todo scenarios, you **must** pass `--complete=false`; otherwise completed tasks will be surfaced as if they were still pending.
## Recommended Commands
```bash
# Search for a specific task by name
lark-cli task +get-my-tasks --query "Lobster No. 1"
# Get all my tasks, both completed and incomplete (fetches up to 20 pages by default)
lark-cli task +get-my-tasks
# Pending-only: my incomplete tasks (use this for standup/daily-summary)
lark-cli task +get-my-tasks --complete=false
# Pending-only with a due-date upper bound (e.g. end of today / this week)
lark-cli task +get-my-tasks --complete=false --due-end "2026-03-27T23:59:59+08:00"
# Fetch all my tasks (up to 40 pages)
lark-cli task +get-my-tasks --page-all
# Fetch up to 10 pages
lark-cli task +get-my-tasks --page-limit 10
# Resume from a known page token
lark-cli task +get-my-tasks --page-token "pt_xxx"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--query <string>` | No | Search for tasks by summary. Returns exact matches if any; otherwise returns partial matches. |
| `--complete=<bool>` | No | Optional. If not provided, it fetches all tasks (both incomplete and completed). Set to `true` to fetch only completed tasks, or `false` for incomplete tasks. |
| `--created_at <string>` | No | Query tasks created after this time. Supports date: `YYYY-MM-DD`, relative: `-2d`, or ms timestamp. |
| `--due-start <string>` | No | Query tasks with a due date after this time. Supports date: `YYYY-MM-DD`, relative: `-2d`, or ms timestamp. |
| `--due-end <string>` | No | Query tasks with a due date before this time. Supports date: `YYYY-MM-DD`, relative: `-2d`, or ms timestamp. |
| `--page-all` | No | Automatically paginate through all pages (max 40). |
| `--page-limit <int>` | No | Max page limit (default 20). |
| `--page-token <string>` | No | Start from the specified page token (useful for resuming a previous query). |
## Workflow
1. Determine the filters based on the user's request.
2. Execute the command. The CLI will automatically loop up to the specified limit (default 20, or 40 with `--page-all`) to fetch records.
3. Show the results (ID, summary, due time, and created date).

View File

@ -0,0 +1,53 @@
# task +get-related-tasks
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
>
> **⚠️ Note:** This API must be called with a user identity. **Do NOT use an app identity, otherwise the call will fail.**
>
> **Pagination / Time Cursor Rule:**
> In `+get-related-tasks`, `page_token` is the task `updated_at` cursor in microseconds.
>
> **Execution Priority:**
> 1. If the request contains a start/end time boundary (for example, "今年以来", "最近一个月", "从 3 月 1 日开始"), first convert the **start time** boundary to a microsecond `page_token` and query from that token.
> 2. Continue pagination using returned `page_token` until `has_more=false`, but never exceed 40 total page fetches.
> 3. Do NOT default to `--page-all` for time-bounded queries.
>
> Only use `--page-all` from the beginning when:
> 1. the user explicitly asks for a full scan of all related tasks, or
> 2. no time boundary can be inferred from the request.
List tasks related to the current user.
## Recommended Commands
```bash
# List all related tasks
lark-cli task +get-related-tasks
# List incomplete related tasks starting from a page token
lark-cli task +get-related-tasks --include-complete=false --page-token "1752730590582902"
# Show only tasks created by me
lark-cli task +get-related-tasks --created-by-me
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--include-complete=<bool>` | No | Default behavior includes completed tasks. Set to `false` to keep only incomplete tasks. |
| `--page-all` | No | Automatically paginate through all pages (max 40). |
| `--page-limit <int>` | No | Max page limit (default 20). |
| `--page-token <string>` | No | Start from the specified page token. This token is the task's last update time cursor in microseconds. |
| `--created-by-me` | No | Keep only tasks whose creator is the current user. This is a client-side filter applied after fetching related-task pages. |
| `--followed-by-me` | No | Keep only tasks followed by the current user. This is a client-side filter applied after fetching related-task pages. |
> **Page Token Note:** In `+get-related-tasks`, the `page_token` is a microsecond-level cursor representing the task's last update time. For example, `1752730590582902` should be treated as an updated-at cursor, not a task ID.
>
> **Pagination Note for Client-side Filters:** When `--created-by-me` or `--followed-by-me` is used, filtering happens locally after each upstream related-task page is fetched. The returned `has_more` and `page_token` still describe the upstream cursor, so later pages may contain more matching tasks, or may contain none.
## Workflow
1. Determine whether the user needs all related tasks or a filtered subset.
2. Execute `lark-cli task +get-related-tasks ...`
3. Report the matching tasks and, if present, the next `page_token`.

View File

@ -0,0 +1,36 @@
# task +reminder
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
> **Priority:** For creating or modifying task reminder times, prioritize using this `+reminder` shortcut over other task update methods. It provides a more reliable and direct way to manage reminders.
Manage task reminders. Set new reminders or remove existing ones. Note that setting a task reminder requires a due date.
## Recommended Commands
```bash
# Set a reminder (e.g., 30 minutes before due)
lark-cli task +reminder --task-id "<task_guid>" --set "30"
# Set a reminder (e.g., 1 hour before due)
lark-cli task +reminder --task-id "<task_guid>" --set "1h"
# Remove all reminders
lark-cli task +reminder --task-id "<task_guid>" --remove "true"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to modify. For Feishu task applinks, use the `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
| `--set <val>` | No | Relative fire minutes before the due time. Supports numbers (e.g., `30`) or units (e.g., `15m`, `1h`, `1d`). |
| `--remove <bool>` | No | If set to `true`, removes all existing reminders from the task. |
## Workflow
1. Confirm the task and reminder action.
2. Execute the command.
3. Report success.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,27 @@
# task +reopen
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Reopen a previously completed task.
## Recommended Commands
```bash
# Reopen a task
lark-cli task +reopen --task-id "<task_guid>"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to reopen. For Feishu task applinks, use the `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
## Workflow
1. Confirm the task to reopen.
2. Execute the command.
3. Report success.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,41 @@
# task +search
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
>
> **⚠️ Note:** This API must be called with a user identity. **Do NOT use an app identity, otherwise the call will fail.**
Search tasks by keyword and optional filters.
## Recommended Commands
```bash
# Search by keyword
lark-cli task +search --query "test"
# Search incomplete tasks assigned to specific users
lark-cli task +search --assignee "ou_xxx,ou_yyy" --completed=false
# Search by due time range
lark-cli task +search --query "release" --due "-1d,+7d"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--query <string>` | No | Search keyword. If omitted, at least one filter must be provided. |
| `--creator <ids>` | No | Creator open_ids, comma-separated. |
| `--assignee <ids>` | No | Assignee open_ids, comma-separated. |
| `--follower <ids>` | No | Follower open_ids, comma-separated. |
| `--completed=<bool>` | No | Filter by completion state. |
| `--due <range>` | No | Due time range in `start,end` form. Each side supports ISO/date/relative/ms input. |
| `--page-token <string>` | No | Page token for pagination. |
| `--page-all` | No | Automatically paginate through all pages (max 40). |
| `--page-limit <int>` | No | Max page limit (default 20). |
## Workflow
1. Build the keyword and filters from the user's request.
2. Execute `lark-cli task +search ...`
3. Report the matched tasks and include the next `page_token` if more results exist.

View File

@ -0,0 +1,32 @@
# task +set-ancestor
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Set a parent task for a task, or clear the parent to make it independent.
## Recommended Commands
```bash
# Set a parent task
lark-cli task +set-ancestor --task-id "guid_1" --ancestor-id "guid_2"
# Clear the parent task
lark-cli task +set-ancestor --task-id "guid_1"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid>` | Yes | The task GUID to update. |
| `--ancestor-id <guid>` | No | The parent task GUID. Omit it to clear the ancestor. |
## Workflow
1. Confirm the child task and, if applicable, the ancestor task.
2. Execute `lark-cli task +set-ancestor ...`
3. Report the updated task GUID and whether the ancestor was set or cleared.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,35 @@
# task +tasklist-create
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Create a new tasklist, and optionally batch create tasks within it.
## Recommended Commands
```bash
# Create an empty tasklist
lark-cli task +tasklist-create --name "Q1 Goals"
# Create a tasklist and add members
lark-cli task +tasklist-create --name "Project A" --member "ou_xxx,ou_yyy"
# Create a tasklist and batch create tasks within it
lark-cli task +tasklist-create --name "Launch Checklist" --data '[{"summary": "Code Review", "assignee": "ou_aaa"}, {"summary": "Deploy", "assignee": "ou_bbb"}]'
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--name <text>` | Yes | The name of the tasklist. |
| `--member <ids>` | No | Comma-separated list of user `open_id`s to add as editors. |
| `--data <json>` | No | JSON array of task definitions to create and add to the tasklist automatically. |
## Workflow
1. Confirm the tasklist name, members, and tasks (if any).
2. Execute the command `lark-cli task +tasklist-create ...`.
3. Report success, including the new tasklist ID and the result of the batch task creation.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,36 @@
# task +tasklist-members
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Manage tasklist members (editors/owners).
## Recommended Commands
```bash
# Add a member
lark-cli task +tasklist-members --tasklist-id "tl_xxx" --add "ou_aaa"
# Remove a member
lark-cli task +tasklist-members --tasklist-id "tl_xxx" --remove "ou_aaa"
# Replace all members exactly
lark-cli task +tasklist-members --tasklist-id "tl_xxx" --set "ou_aaa,ou_bbb"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--tasklist-id <id>` | Yes | The GUID of the tasklist, or a full AppLink URL. |
| `--add <ids>` | No | Comma-separated list of user `open_id`s to add as members. |
| `--remove <ids>` | No | Comma-separated list of user `open_id`s to remove from members. |
| `--set <ids>` | No | Comma-separated list of user `open_id`s to exactly set as members (replaces all existing). |
## Workflow
1. Confirm the tasklist and members to add/remove/set.
2. Execute the command.
3. Report success.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,38 @@
# task +tasklist-search
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
>
> **⚠️ Note:** This shortcut uses tasklist search followed by tasklist detail queries to render the final output.
Search tasklists by keyword and optional filters.
## Recommended Commands
```bash
# Search by keyword
lark-cli task +tasklist-search --query "测试"
# Search tasklists created by specific users
lark-cli task +tasklist-search --creator "ou_xxx,ou_yyy"
# Search by creation time range
lark-cli task +tasklist-search --query "Q2" --create-time "-30d,+0d"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--query <string>` | No | Search keyword. If omitted, at least one filter must be provided. |
| `--creator <ids>` | No | Creator open_ids, comma-separated. |
| `--create-time <range>` | No | Creation time range in `start,end` form. Each side supports ISO/date/relative/ms input. |
| `--page-token <string>` | No | Page token for pagination. |
| `--page-all` | No | Automatically paginate through all pages (max 40). |
| `--page-limit <int>` | No | Max page limit (default 20). |
## Workflow
1. Build the search keyword and filters from the user's request.
2. Execute `lark-cli task +tasklist-search ...`
3. Report the matched tasklists and the next `page_token` if more results exist.

View File

@ -0,0 +1,38 @@
# task +tasklist-task-add
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Add existing tasks to a tasklist.
## Recommended Commands
```bash
# Add a single task to a tasklist
lark-cli task +tasklist-task-add --tasklist-id "<tasklist_guid>" --task-id "<task_guid>"
# Add multiple tasks to a tasklist
lark-cli task +tasklist-task-add --tasklist-id "<tasklist_guid>" --task-id "<task_guid>,<another_task_guid>,<third_task_guid>"
# Add a task to a specific section in the tasklist
lark-cli task +tasklist-task-add \
--tasklist-id "<tasklist_guid>" \
--task-id "<task_guid>" \
--section-guid "<section_guid>"
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--tasklist-id <guid>` | Yes | The GUID of the tasklist, or a full AppLink URL. |
| `--task-id <guids>` | Yes | Comma-separated list of task GUIDs to add to the tasklist. For Feishu task applinks, use each task's `guid` query parameter, not the `suite_entity_num` / display task ID like `t104121`. |
| `--section-guid <guid>` | No | The GUID of the custom section to add the tasks to. If omitted, tasks will be added to the default section. |
## Workflow
1. Confirm the tasklist and the tasks to add.
2. Execute the command `lark-cli task +tasklist-task-add ...`.
3. Report the result (successful vs failed tasks).
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,41 @@
# task +update
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Update an existing task in Lark.
## Recommended Commands
```bash
# Update task summary
lark-cli task +update --task-id "<task_guid>" --summary "New Summary"
# Update multiple tasks' due dates
lark-cli task +update --task-id "<task_guid>,<another_task_guid>" --due "+2d"
# A task applink is accepted directly; the CLI extracts its guid query value
lark-cli task +update --task-id "https://applink.larksuite.com/client/todo/task?guid=<task_guid>" --summary "New Summary"
# Update with JSON data
lark-cli task +update --task-id "<task_guid>" --data '{"description": "New description"}'
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--task-id <guid-or-applink>` | Yes | Task OpenAPI GUID or a task applink containing `guid=`. Comma-separated GUIDs/applinks are supported for multiple tasks. Display task IDs such as `t104121` / `suite_entity_num` are rejected. |
| `--summary <text>` | No | New summary/title for the task. |
| `--description <text>` | No | New description for the task. |
| `--due <time>` | No | New due date (supports relative time). |
| `--data <json>` | No | JSON payload for fields to update. |
## Workflow
1. Confirm with the user the tasks to update and the fields.
2. Execute `lark-cli task +update --task-id "..." ...`
3. Read `data.updated_fields` and `data.tasks[].confirmed` from the result and report only the fields confirmed by the server.
4. Do not routinely call `task tasks get` after the update when `confirmed` already contains the required state. Query details only if a required field is absent or the user explicitly asks for a full verification.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.

View File

@ -0,0 +1,59 @@
# task +upload-attachment
> **Prerequisites:** Please read `../lark-shared/SKILL.md` to understand authentication, global parameters, and security rules.
Upload a single local file as an attachment to a task (or any resource type accepted by the Task attachment endpoint). Max file size per upload is **50 MB**. For task agents, use `--resource-type=task_delivery`.
## Recommended Commands
```bash
# Upload a local file as a task attachment (relative path required)
lark-cli task +upload-attachment \
--resource-id "<task_guid>" \
--file "./report.pdf"
# Pass a Feishu task applink instead of a raw guid — the guid is extracted automatically
lark-cli task +upload-attachment \
--resource-id "https://applink.feishu.cn/client/todo/task?guid=<task_guid>" \
--file "./note.md"
# Explicit resource type / user id type
lark-cli task +upload-attachment \
--resource-id "<task_guid>" \
--resource-type task \
--user-id-type open_id \
--file "./design.png"
# Upload a local file to a task agent
lark-cli task +upload-attachment \
--resource-id "4b113c53-a68b-419f-8bd0-c9c532a3285a" \
--file "./飞书.zip" \
--resource-type task_delivery
```
## Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--resource-id <guid_or_applink>` | Yes | Target resource GUID. Accepts a raw task GUID or a Feishu task applink URL (`.../client/todo/task?guid=...`); the `guid` query parameter is extracted automatically. Do not use `suite_entity_num` / display IDs like `t104121`. |
| `--file <path>` | Yes | Local file path to upload. Must be a relative path within the current working directory; absolute paths and paths escaping the cwd are rejected. Single file only, ≤ 50 MB. |
| `--resource-type <type>` | No | Owning resource type. Defaults to `task`. Use `task_delivery` when uploading to task agents. |
| `--user-id-type <type>` | No | User ID type for the request. Defaults to `open_id`. |
## Workflow
1. Confirm the target task GUID (or applink) and the local file path with the user.
2. Ensure the file is within the current working directory and its size is ≤ 50 MB; otherwise ask the user to move/split the file.
3. Determine if this is a task agent: if yes, add `--resource-type task_delivery`.
4. Execute `lark-cli task +upload-attachment --resource-id "..." --file "..."`.
5. Report the returned attachment record. The output exposes all fields returned by the API (e.g. `guid`, `name`, `size`, `url`, `uploader`, ...); always surface the attachment `guid` and, if present, the `url` so the user can jump to the attachment directly.
## Output
The command returns the single created attachment record as a flat JSON object — every field returned by the API (`guid`, `name`, `size`, `url`, `resource_type`, `resource_id`, `uploader`, ...) is preserved verbatim. Pretty mode also prints a human-readable summary with the resource, file name, size, and attachment GUID.
> [!CAUTION]
> This is a **Write Operation** -- You must confirm the user's intent before executing.
> [!NOTE]
> The Task attachment upload endpoint accepts exactly one file per call. To upload multiple files, invoke the shortcut once per file.