@qilin-agent/tool-schedule 0.0.0-stage → 3.1.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 kkutysllb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,70 @@
1
+ # Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/schedule/tool-schedule/README.md
5
+ /:
6
+ en: 5bcd39034f505033
7
+ zh: 9bfd85a1ad52bc67
8
+ /qilin-agent-tool-schedule:
9
+ en: dfe42b83b9653579
10
+ zh: d8c6ba57ad58aef4
11
+ /qilin-agent-tool-schedule/summary:
12
+ en: 360650da0a6f1873
13
+ zh: 722fd650df68beed
14
+ /qilin-agent-tool-schedule/table-of-contents:
15
+ en: d152484eb41ac6b4
16
+ zh: 09388d293f9be9cb
17
+ /qilin-agent-tool-schedule/use-this-package:
18
+ en: a692cac1bda0f1bc
19
+ zh: 3cc2e4bff8062e4e
20
+ /qilin-agent-tool-schedule/use-this-package/when-to-choose-it:
21
+ en: 553d58f6946fc4e1
22
+ zh: f3681e61ec8eb11d
23
+ /qilin-agent-tool-schedule/use-this-package/the-four-tools:
24
+ en: f8aae686d0531c29
25
+ zh: 3cccd1ba81aae48d
26
+ /qilin-agent-tool-schedule/use-this-package/minimal-configuration:
27
+ en: eef3a83c0ffb2931
28
+ zh: 9b527abfde4c3406
29
+ /qilin-agent-tool-schedule/understand-the-implementation:
30
+ en: 065702b7a82b8fa1
31
+ zh: 642037baaa2c0f1d
32
+ /qilin-agent-tool-schedule/understand-the-implementation/source-map:
33
+ en: 676c4e0595fcc8dd
34
+ zh: f02ed861f66e7747
35
+ /qilin-agent-tool-schedule/further-exploration:
36
+ en: 2c34a1d697bc1938
37
+ zh: 4dcc29a2f8a4b61c
38
+ /qilin-agent-tool-schedule/model-experience:
39
+ en: 215e7ba838619b7b
40
+ zh: a311da3843709f90
41
+ /qilin-agent-tool-schedule/model-experience/tool-schemas:
42
+ en: 3039bc5e7a796b21
43
+ zh: 6b7a9eaf69c9ea53
44
+ /qilin-agent-tool-schedule/model-experience/tool-schemas/what-the-model-sees:
45
+ en: d4c220f98fbddede
46
+ zh: 87c7a231b07cde17
47
+ /qilin-agent-tool-schedule/model-experience/tool-schemas/token-effect:
48
+ en: 70fb9094859d0804
49
+ zh: 30726b045484713c
50
+ /qilin-agent-tool-schedule/model-experience/tool-schemas/kv-cache-effect:
51
+ en: 332231fb9f1b8146
52
+ zh: eace0b2e789d1c0f
53
+ /qilin-agent-tool-schedule/model-experience/reminder-results:
54
+ en: ffeb087f9476fddf
55
+ zh: 94569d39555d5192
56
+ /qilin-agent-tool-schedule/model-experience/reminder-results/what-the-model-sees:
57
+ en: 68ce690c2d5c2312
58
+ zh: d3a9fca950518702
59
+ /qilin-agent-tool-schedule/model-experience/reminder-results/token-effect:
60
+ en: a08931b2c5048399
61
+ zh: 758ea2131adb23e4
62
+ /qilin-agent-tool-schedule/model-experience/reminder-results/kv-cache-effect:
63
+ en: 2fbf2175168e8244
64
+ zh: 9c4c1964ae59e661
65
+ /qilin-agent-tool-schedule/known-limitations-and-deferred-work:
66
+ en: 502ddc2c0c8f0a24
67
+ zh: d1354984a6c036d9
68
+ /qilin-agent-tool-schedule/known-limitations-and-deferred-work/dev-note:
69
+ en: e67f633dc6fe7773
70
+ zh: b2ee0fbaa165910d
package/README.md CHANGED
@@ -1,3 +1,131 @@
1
- # Temporary Holding Version
1
+ ---
2
+ description: "Preset-scoped reminder management tools (schedule_create, schedule_list, schedule_update, schedule_delete) over the Host ctx.schedule service, for deployments choosing which agents may keep durable reminders."
3
+ kind: "package-reference"
4
+ ---
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ # @qilin-agent/tool-schedule
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ Use `dsh-tool-schedule` to let an agent create, list, edit, and delete durable Host reminders through `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete`. The package registers the four tools in the preset or Agent scope that mounts it, so the composition decides which agents receive them; `minimal` keeps none. Each call acts on the calling Agent's Session and only manages stored reminders — the Host `@qilin-agent/schedule` service owns storage, scheduling, and delivery. Failures return one structured error code instead of storage details.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Further Exploration](#further-exploration)
19
+ - [Model Experience](#model-experience)
20
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
21
+ - [Dev Note](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## Use this package
27
+
28
+ Add the row below to a preset's plugin list when that preset's agents should manage durable reminders. The shipped Web `standard`, `cordis`, and `ptc` presets mount it; `minimal` does not.
29
+
30
+ ### When to choose it
31
+
32
+ Choose it for any preset whose agents need to schedule future work in their own Session, and load `@qilin-agent/schedule` in the same process: this package is only the model-facing consumer of that service. A preset that should stay capability-poor — `minimal` is the shipped example — omits the row, and its agents see no reminder tool at all.
33
+
34
+ ### The four tools
35
+
36
+ - `schedule_create(prompt, title, <one selector>)` — Create one reminder. Supply a non-empty prompt, a title of at most 120 characters, and exactly one of `after_seconds`, `at`, `every_seconds`, `daily`, `weekly`, or `cron`. Returns the canonical reminder view.
37
+ - `schedule_list()` — List every active reminder of the calling Session with its id, title, UTC target, state, and delivery mode.
38
+ - `schedule_update(id, <title|prompt|one selector>)` — Replace the name, instruction, or timing in place, or a combination of them. An unknown or ended reminder returns `updated: false` with the reason code; `after_seconds` is create-only.
39
+ - `schedule_delete(id)` — Remove one retained reminder, active or ended. Unknown or already-deleted ids return `deleted: false`.
40
+
41
+ ### Minimal configuration
42
+
43
+ ```yaml
44
+ - name: '@qilin-agent/tool-schedule'
45
+ ```
46
+
47
+ The package declares no `Config` fields. It injects `ctx.tools` and registers the four tools once the scope resolves the Host `ctx.schedule` service, so a composition that keeps that service off mounts no reminder tool. Each call acts on the Session of the Agent that dispatched it.
48
+
49
+ -----
50
+
51
+ <a id="understand-the-implementation"></a>
52
+ ## Understand the implementation
53
+
54
+ <details>
55
+ <summary>Implementation internals — click to expand</summary>
56
+
57
+ The plugin registers four `defineTool` definitions through the context that loads it, so a preset mount decides visibility and Cordis effect ownership disposes them with the mount. Execution reads `exec.agent` for the Session binding and the injected `ctx.schedule` service for storage; the delegation-depth guard runs before selector and identity checks, all before the service call, and any failure the service raises that is not a `ScheduleInputError` collapses to `internal_error` so storage details never reach the model. Model content is the canonical JSON of the returned value, and the Host service owns persistence, scheduling, Session restoration, and delivery.
58
+
59
+ ### Source map
60
+
61
+ | File | Role |
62
+ |---|---|
63
+ | [`src/index.ts`](src/index.ts) | Plugin entry: the four registrations, selector validation, and the render/present helpers |
64
+
65
+ </details>
66
+
67
+ -----
68
+
69
+ <a id="further-exploration"></a>
70
+ ## Further Exploration
71
+
72
+ - [Schedule service](../schedule/README.md) — the Host task store, runtime, and delivery behavior these tools manage.
73
+ - [Schedule group map](../README.md) — the sibling packages in this group.
74
+ - [Generated tool catalog](../../../docs/tool-catalog.md#qilin-agenttool-schedule) — the exact four schemas the model receives.
75
+ - [Schedule subsystem](../../../docs/subsystems/schedule.md) — the `ctx.schedule` Cordis surface and stored types.
76
+ - [Schedule user guide](../../../docs/user/guide/schedule.md) — the user-facing reminder workflow.
77
+
78
+ -----
79
+
80
+ <a id="model-experience"></a>
81
+ ## Model Experience
82
+
83
+ ### Tool schemas
84
+
85
+ #### What the model sees
86
+
87
+ The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#qilin-agenttool-schedule) whenever this package is visible in the calling Agent's scope.
88
+
89
+ #### Token effect
90
+
91
+ A fixed schema cost on every request from an Agent whose preset mounts the package. Agents under a preset that omits the row pay nothing.
92
+
93
+ #### KV Cache effect
94
+
95
+ Prefix-stable while tool definitions and visibility are unchanged. Mounting, disposal, or a scope change may invalidate reuse from the first changed schema token.
96
+
97
+ ### Reminder results
98
+
99
+ #### What the model sees
100
+
101
+ One lossless JSON text block per call: a reminder view for `schedule_create`, an array of views for `schedule_list`, `{ id, deleted }` for `schedule_delete`, and a reminder view or `{ id, updated: false, code }` for `schedule_update`. A rejected call returns `{ code, message }` carrying one published error code.
102
+
103
+ #### Token effect
104
+
105
+ Results remain in the calling Session's history until compaction and repeat the stored reminder fields; a long reminder list costs its full rendered length on every later request.
106
+
107
+ #### KV Cache effect
108
+
109
+ Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV Cache entries.
110
+
111
+ ## Known Limitations and Deferred Work
112
+
113
+ <a id="known-limitations-and-deferred-work"></a>
114
+
115
+ - **No tools without the Host service** — a composition that mounts this package without `ctx.schedule` leaves the plugin pending, so none of the four tools register.
116
+ - **Every call needs a calling Agent** — a call dispatched without one returns `internal_error` rather than guessing a Session.
117
+ - **Deletion does not retract a queued message** — a reminder the Host already delivered stays in the Session inbox after `schedule_delete`.
118
+ - **Reminder timing belongs to the Host** — the tools expose no target-time correction, clock source, or delivery retry; those limits are the service's.
119
+ - **Every tool refuses a delegated caller** — each of `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` reads the calling Agent's delegation depth before dispatch and returns `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }` when that depth is above zero. The guard lives in this package and reads `delegationDepthOf` from `@qilin-agent/subagent`, the same accounting the delegation cap enforces, so it holds under any preset that mounts the tools.
120
+ - **A preset's delegation rows remove the four tools from a child's prompt** — the `standard`, `cordis`, and `ptc` presets declare `toolFilter.deny` for `schedule_create`, `schedule_delete`, `schedule_list`, and `schedule_update` on both the `tool-subagent` and `tool-subagent-fork` rows. The provider applies that filter through `ctx.tools.restrict()` in the child scope, so the four tools leave a delegated child's prompt; delegating further on that chain intersects the same restriction.
121
+ - **A Session a delegated child owns cannot arm a reminder** — `ScheduleService.create` throws `ScheduleInputError` with code `subagent_session`, and `ScheduleService.update` returns the non-mutating `subagent_session` result, when the Session's Agent has a delegation depth above zero. The delegation depth is the accounting the delegation cap itself reads, and the persisted session header carries it across a cold resume. The rule sits in the service, not in these tools, so other in-process consumers reach it too: the Automation surface included. `schedule_list` and `schedule_delete` still serve that Session, so a reminder stored before this rule stays removable.
122
+
123
+ <a id="dev-note"></a>
124
+ ### Dev Note
125
+
126
+ <details>
127
+ <summary>Working context for maintainers — click to expand</summary>
128
+
129
+ None.
130
+
131
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,131 @@
1
+ ---
2
+ description: "预设作用域的提醒管理工具(schedule_create、schedule_list、schedule_update、schedule_delete),基于宿主 ctx.schedule 服务,供选择哪些 agent 可以维护持久提醒的部署使用。"
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @qilin-agent/tool-schedule
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 使用 `dsh-tool-schedule`,可通过 `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` 让 agent(智能体)创建、列出、编辑和删除宿主持久提醒。本包把四个工具注册进挂载它的 preset 或 Agent 作用域,因此由组合决定哪些 agent 获得这些工具;`minimal` 不获得。每次调用都作用于调用方 Agent 的 Session,并且只管理已存储的提醒——存储、调度与投递由宿主 `@qilin-agent/schedule` 服务负责。失败时返回一个结构化错误码,而不是存储细节。
13
+
14
+ ## 目录
15
+
16
+ - [使用本包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [进一步探索](#further-exploration)
19
+ - [模型体验](#model-experience)
20
+ - [已知限制与延期工作](#known-limitations-and-deferred-work)
21
+ - [开发备注](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## 使用本包
27
+
28
+ 当某个 preset 的 agent 需要管理持久提醒时,把下面这一行加入该 preset 的插件列表。随产品发布的 Web `standard`、`cordis` 与 `ptc` preset 会挂载它;`minimal` 不会。
29
+
30
+ ### 何时选用
31
+
32
+ 当 preset 的 agent 需要在自己的 Session 中安排未来工作时选用它,并在同一进程内加载 `@qilin-agent/schedule`:本包只是该服务面向模型的消费方。需要保持能力精简的 preset——随产品发布的例子是 `minimal`——会省略该行,其 agent 完全看不到提醒工具。
33
+
34
+ ### 四个工具
35
+
36
+ - `schedule_create(prompt, title, <一个选择器>)` —— 创建一条提醒。需提供非空提示文本、不超过 120 个字符的标题,以及 `after_seconds`、`at`、`every_seconds`、`daily`、`weekly`、`cron` 中的恰好一个。返回规范提醒视图。
37
+ - `schedule_list()` —— 列出调用方 Session 的全部活动提醒及其 id、标题、UTC 目标、状态与投递模式。
38
+ - `schedule_update(id, <title|prompt|一个选择器>)` —— 原地替换名称、指令或时间,或它们的组合。未知或已结束的提醒返回 `updated: false` 及原因码;`after_seconds` 仅限创建时使用。
39
+ - `schedule_delete(id)` —— 删除一条保留的提醒,无论活动还是已结束。未知或已删除的 id 返回 `deleted: false`。
40
+
41
+ ### 最小配置
42
+
43
+ ```yaml
44
+ - name: '@qilin-agent/tool-schedule'
45
+ ```
46
+
47
+ 本包不声明任何 `Config` 字段。它注入 `ctx.tools`,并在作用域解析到宿主 `ctx.schedule` 服务后注册这四个工具,因此保持该服务关闭的组合不会挂载任何提醒工具。每次调用都作用于派发该调用的 Agent 的 Session。
48
+
49
+ -----
50
+
51
+ <a id="understand-the-implementation"></a>
52
+ ## 理解实现
53
+
54
+ <details>
55
+ <summary>实现内部细节——点击展开</summary>
56
+
57
+ 插件通过加载它的上下文注册四个 `defineTool` 定义,因此由 preset 挂载决定可见性,并由 Cordis effect 的所有权随挂载一并释放。执行时读取 `exec.agent` 作为 Session 绑定,并读取注入的 `ctx.schedule` 服务进行存储;委派深度守卫先于选择器与身份校验运行,二者均在服务调用之前完成,服务抛出的任何非 `ScheduleInputError` 失败都收敛为 `internal_error`,因此存储细节不会到达模型。模型内容为返回值的规范 JSON,而持久化、调度、Session 恢复与投递都由宿主服务负责。
58
+
59
+ ### 源码映射
60
+
61
+ | 文件 | 作用 |
62
+ |---|---|
63
+ | [`src/index.ts`](src/index.ts) | 插件入口:四个注册、选择器校验,以及 render/present 辅助函数 |
64
+
65
+ </details>
66
+
67
+ -----
68
+
69
+ <a id="further-exploration"></a>
70
+ ## 进一步探索
71
+
72
+ - [Schedule 服务](../schedule/README.zh.md) —— 这些工具所管理的宿主任务存储、运行时与投递行为。
73
+ - [Schedule 分组映射](../README.zh.md) —— 本组内的同级包。
74
+ - [生成的工具目录](../../../docs/tool-catalog.zh.md#qilin-agenttool-schedule) —— 模型接收的确切四个 schema。
75
+ - [Schedule 子系统](../../../docs/subsystems/schedule.zh.md) —— `ctx.schedule` 的 Cordis 接线区域与存储类型。
76
+ - [Schedule 用户指南](../../../docs/user/guide/schedule.zh.md) —— 面向用户的提醒工作流。
77
+
78
+ -----
79
+
80
+ <a id="model-experience"></a>
81
+ ## 模型体验
82
+
83
+ ### 工具 schema
84
+
85
+ #### What the model sees
86
+
87
+ 只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#qilin-agenttool-schedule)。
88
+
89
+ #### Token effect
90
+
91
+ 凡是 preset 挂载了本包的 Agent,其每次请求都有固定的 schema 开销。省略该行的 preset 下的 Agent 不付出任何开销。
92
+
93
+ #### KV Cache effect
94
+
95
+ 只要工具定义与可见性不变,前缀保持稳定。挂载、释放或作用域变化都可能使从首个变化 schema token 起的复用失效。
96
+
97
+ ### 提醒结果
98
+
99
+ #### What the model sees
100
+
101
+ 每次调用返回一个无损 JSON 文本块:`schedule_create` 返回提醒视图,`schedule_list` 返回视图数组,`schedule_delete` 返回 `{ id, deleted }`,`schedule_update` 返回提醒视图或 `{ id, updated: false, code }`。被拒绝的调用返回带有某个已发布错误码的 `{ code, message }`。
102
+
103
+ #### Token effect
104
+
105
+ 结果会留在调用方 Session 的历史中直到压缩,并重复存储的提醒字段;较长的提醒列表在之后每次请求中都付出其全部渲染长度。
106
+
107
+ #### KV Cache effect
108
+
109
+ 只追加;新可见内容跟在可复用的请求前缀之后,不会使既有 KV Cache 条目失效。
110
+
111
+ ## Known Limitations and Deferred Work
112
+
113
+ <a id="known-limitations-and-deferred-work"></a>
114
+
115
+ - **没有宿主服务就没有工具** —— 在缺少 `ctx.schedule` 的组合中挂载本包会让插件保持挂起,四个工具都不会注册。
116
+ - **每次调用都需要调用方 Agent** —— 未携带 Agent 的派发返回 `internal_error`,而不会猜测某个 Session。
117
+ - **删除不会撤回已排队的消息** —— 宿主已经投递的提醒在 `schedule_delete` 之后仍留在 Session 收件箱中。
118
+ - **提醒时间由宿主负责** —— 这些工具不提供目标时间校正、时钟来源或投递重试;这些限制属于该服务。
119
+ - **每个工具都拒绝被委派的调用方** —— `schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` 都会在派发前读取调用方 Agent 的委派深度,当该深度大于零时返回 `{ code: 'subagent_session', message: 'A delegated subagent cannot use reminders.' }`。该守卫位于本包内,读取来自 `@qilin-agent/subagent` 的 `delegationDepthOf`,即委派封顶本身执行的同一份记账,因此在任何挂载这些工具的 preset 下都成立。
120
+ - **preset 的委派行让这四个工具从子 agent 的 prompt 中消失** —— `standard`、`cordis` 与 `ptc` preset 在 `tool-subagent` 与 `tool-subagent-fork` 两行上都声明 `toolFilter.deny`,拒绝 `schedule_create`、`schedule_delete`、`schedule_list` 和 `schedule_update`。provider 会在子作用域内通过 `ctx.tools.restrict()` 应用该过滤,因此这四个工具会从被委派子 agent 的 prompt 中消失;在子链上继续委派会沿链求交同一限制。
121
+ - **被委派子 agent 拥有的 Session 不能设置提醒** —— 当 Session 的 Agent 委派深度大于零时,`ScheduleService.create` 会抛出 `ScheduleInputError`(code 为 `subagent_session`),`ScheduleService.update` 则返回非变更的 `subagent_session` 结果。委派深度正是委派封顶本身读取的同一份记账,持久化 session header 让它在冷恢复后仍然成立。这条规则在服务层而非这些工具里,因此其它进程内消费方(包括自动化任务页面)也会命中。`schedule_list` 与 `schedule_delete` 仍可服务该 Session,所以在这条规则之前存储的提醒仍可删除。
122
+
123
+ <a id="dev-note"></a>
124
+ ### 开发备注
125
+
126
+ <details>
127
+ <summary>维护者工作上下文——点击展开</summary>
128
+
129
+ None.
130
+
131
+ </details>
package/lib/index.js ADDED
@@ -0,0 +1,660 @@
1
+ import { delegationDepthOf } from "@qilin-agent/subagent";
2
+ import { defineTool } from "@qilin-agent/tools";
3
+ import { MAX_TITLE_LENGTH, MIN_EVERY_INTERVAL_SECONDS, REQUIRED_TITLE_MESSAGE, ScheduleId, ScheduleInputError, scheduleView } from "@qilin-agent/schedule";
4
+ //#region lib/types/index.js
5
+ /**
6
+ * Model-facing `schedule_create`, `schedule_list`, `schedule_update`, and
7
+ * `schedule_delete` tools over the Host `ctx.schedule` service. Mounting the
8
+ * plugin registers them in the mounting scope, so a preset decides which
9
+ * agents receive them; every call acts on the calling Agent's Session.
10
+ * @module @qilin-agent/tool-schedule
11
+ */
12
+ /** Plugin name registered with the Loader. */
13
+ const name = "tool-schedule";
14
+ /** Host services this plugin consumes. The Schedule service is resolved per
15
+ * scope, so a preset that declares this plugin stays inert while the shipped
16
+ * composition keeps that service off. */
17
+ const inject = ["tools"];
18
+ const SHARED_VIEW_PROPERTIES = {
19
+ id: {
20
+ type: "string",
21
+ required: true
22
+ },
23
+ title: {
24
+ type: "string",
25
+ required: true
26
+ },
27
+ prompt: {
28
+ type: "string",
29
+ required: true
30
+ },
31
+ scheduledAt: {
32
+ type: "string",
33
+ required: true
34
+ },
35
+ state: {
36
+ type: "string",
37
+ required: true,
38
+ enum: ["scheduled", "overdue"]
39
+ },
40
+ deliveryMode: {
41
+ type: "string",
42
+ required: true,
43
+ const: "host"
44
+ }
45
+ };
46
+ const VIEW_SCHEMA = { oneOf: [
47
+ {
48
+ type: "object",
49
+ additionalProperties: false,
50
+ properties: {
51
+ ...SHARED_VIEW_PROPERTIES,
52
+ kind: {
53
+ type: "string",
54
+ required: true,
55
+ const: "after"
56
+ },
57
+ afterSeconds: {
58
+ type: "integer",
59
+ required: true
60
+ }
61
+ }
62
+ },
63
+ {
64
+ type: "object",
65
+ additionalProperties: false,
66
+ properties: {
67
+ ...SHARED_VIEW_PROPERTIES,
68
+ kind: {
69
+ type: "string",
70
+ required: true,
71
+ const: "at"
72
+ }
73
+ }
74
+ },
75
+ {
76
+ type: "object",
77
+ additionalProperties: false,
78
+ properties: {
79
+ ...SHARED_VIEW_PROPERTIES,
80
+ kind: {
81
+ type: "string",
82
+ required: true,
83
+ const: "every"
84
+ },
85
+ everySeconds: {
86
+ type: "integer",
87
+ required: true
88
+ }
89
+ }
90
+ },
91
+ {
92
+ type: "object",
93
+ additionalProperties: false,
94
+ properties: {
95
+ ...SHARED_VIEW_PROPERTIES,
96
+ kind: {
97
+ type: "string",
98
+ required: true,
99
+ const: "daily"
100
+ },
101
+ time: {
102
+ type: "string",
103
+ required: true
104
+ },
105
+ timeZone: {
106
+ type: "string",
107
+ required: true
108
+ }
109
+ }
110
+ },
111
+ {
112
+ type: "object",
113
+ additionalProperties: false,
114
+ properties: {
115
+ ...SHARED_VIEW_PROPERTIES,
116
+ kind: {
117
+ type: "string",
118
+ required: true,
119
+ const: "weekly"
120
+ },
121
+ time: {
122
+ type: "string",
123
+ required: true
124
+ },
125
+ timeZone: {
126
+ type: "string",
127
+ required: true
128
+ },
129
+ weekdays: {
130
+ type: "array",
131
+ required: true,
132
+ items: { type: "integer" }
133
+ }
134
+ }
135
+ },
136
+ {
137
+ type: "object",
138
+ additionalProperties: false,
139
+ properties: {
140
+ ...SHARED_VIEW_PROPERTIES,
141
+ kind: {
142
+ type: "string",
143
+ required: true,
144
+ const: "cron"
145
+ },
146
+ expression: {
147
+ type: "string",
148
+ required: true
149
+ },
150
+ timeZone: {
151
+ type: "string",
152
+ required: true
153
+ }
154
+ }
155
+ }
156
+ ] };
157
+ /** Build one exact two-field error schema while preserving its literal code. */
158
+ function basicErrorSchema(code) {
159
+ return {
160
+ type: "object",
161
+ additionalProperties: false,
162
+ properties: {
163
+ code: {
164
+ type: "string",
165
+ required: true,
166
+ const: code
167
+ },
168
+ message: {
169
+ type: "string",
170
+ required: true
171
+ }
172
+ }
173
+ };
174
+ }
175
+ const ERROR_SCHEMAS = [
176
+ basicErrorSchema("invalid_prompt"),
177
+ basicErrorSchema("invalid_selector"),
178
+ basicErrorSchema("invalid_rule"),
179
+ basicErrorSchema("invalid_time_zone"),
180
+ basicErrorSchema("not_future"),
181
+ basicErrorSchema("time_out_of_range"),
182
+ basicErrorSchema("frequency_too_high"),
183
+ basicErrorSchema("subagent_session"),
184
+ basicErrorSchema("internal_error")
185
+ ];
186
+ const CREATE_OUTPUT_SCHEMA = { oneOf: [VIEW_SCHEMA, ...ERROR_SCHEMAS] };
187
+ const LIST_OUTPUT_SCHEMA = { oneOf: [{
188
+ type: "array",
189
+ items: VIEW_SCHEMA
190
+ }, ...ERROR_SCHEMAS] };
191
+ const DELETE_OUTPUT_SCHEMA = { oneOf: [
192
+ {
193
+ type: "object",
194
+ additionalProperties: false,
195
+ properties: {
196
+ id: {
197
+ type: "string",
198
+ required: true
199
+ },
200
+ deleted: {
201
+ type: "boolean",
202
+ required: true,
203
+ const: true
204
+ }
205
+ }
206
+ },
207
+ {
208
+ type: "object",
209
+ additionalProperties: false,
210
+ properties: {
211
+ id: {
212
+ type: "string",
213
+ required: true
214
+ },
215
+ deleted: {
216
+ type: "boolean",
217
+ required: true,
218
+ const: false
219
+ },
220
+ code: {
221
+ type: "string",
222
+ required: true,
223
+ const: "schedule_not_found"
224
+ }
225
+ }
226
+ },
227
+ ...ERROR_SCHEMAS
228
+ ] };
229
+ const UPDATE_OUTPUT_SCHEMA = { oneOf: [
230
+ VIEW_SCHEMA,
231
+ {
232
+ type: "object",
233
+ additionalProperties: false,
234
+ properties: {
235
+ id: {
236
+ type: "string",
237
+ required: true
238
+ },
239
+ updated: {
240
+ type: "boolean",
241
+ required: true,
242
+ const: false
243
+ },
244
+ code: {
245
+ type: "string",
246
+ required: true,
247
+ enum: [
248
+ "schedule_not_found",
249
+ "schedule_ended",
250
+ "schedule_conflict"
251
+ ]
252
+ }
253
+ }
254
+ },
255
+ ...ERROR_SCHEMAS
256
+ ] };
257
+ const CREATE_DESCRIPTION = "Create a reminder in the current session that delivers prompt when it becomes due. Supply exactly one timing parameter: after_seconds, at, every_seconds, daily, weekly, or cron. Local times that do not exist in the zone are skipped; repeated local times fire once, at the earlier instant. After downtime, a recurring reminder delivers only its latest missed occurrence. Delivery can repeat after a crash.";
258
+ const LIST_DESCRIPTION = "List the active reminders in the current session.";
259
+ const DELETE_DESCRIPTION = "Delete a reminder in the current session, active or inactive. Deletion does not retract a reminder message that is already queued.";
260
+ const UPDATE_DESCRIPTION = "Change a reminder in place, keeping its id. Supply a new title, prompt, or at most one timing parameter; omitted fields keep their stored values. To change a relative delay, create a new reminder.";
261
+ /** Deterministic model content for every canonical Schedule value. */
262
+ function renderValue(_args, value) {
263
+ return [{
264
+ type: "text",
265
+ text: JSON.stringify(value)
266
+ }];
267
+ }
268
+ /** Pure generic pending card. */
269
+ function present(title, kind, rawInput) {
270
+ return {
271
+ card: "generic",
272
+ title,
273
+ kind,
274
+ ...rawInput === void 0 ? {} : { rawInput }
275
+ };
276
+ }
277
+ /** Stable error for failures not safe to expose. */
278
+ function internalError() {
279
+ return {
280
+ code: "internal_error",
281
+ message: "The schedule operation failed."
282
+ };
283
+ }
284
+ /** Translate invalid input while withholding internal storage failures. */
285
+ function operationError(error) {
286
+ return error instanceof ScheduleInputError ? {
287
+ code: error.code,
288
+ message: error.message
289
+ } : internalError();
290
+ }
291
+ /**
292
+ * Refuse a caller that is a delegated child. A subagent cannot use reminders at
293
+ * all, so every tool rejects before dispatch instead of relying on the mounting
294
+ * preset's tool filter alone.
295
+ * @param agent - the calling agent, when the outer call has one.
296
+ * @returns the stable refusal, or undefined for a top-level caller.
297
+ */
298
+ function subagentCallerRefusal(agent) {
299
+ if (agent === void 0 || delegationDepthOf(agent) === 0) return void 0;
300
+ return {
301
+ code: "subagent_session",
302
+ message: "A delegated subagent cannot use reminders."
303
+ };
304
+ }
305
+ /** One supplied fixed-rate interval: a safe integer at or above the Host floor, or undefined. */
306
+ function invalidInterval(everySeconds) {
307
+ if (everySeconds === void 0) return void 0;
308
+ if (!Number.isSafeInteger(everySeconds)) return {
309
+ code: "invalid_rule",
310
+ message: "every_seconds must be a safe integer."
311
+ };
312
+ if (everySeconds < MIN_EVERY_INTERVAL_SECONDS) return {
313
+ code: "frequency_too_high",
314
+ message: `every_seconds must be at least ${MIN_EVERY_INTERVAL_SECONDS}.`
315
+ };
316
+ }
317
+ /** Validate selector constraints that the open parameter root cannot express. */
318
+ function validateCreateArgs(args) {
319
+ if (Object.keys(args).some((key) => key !== "prompt" && key !== "title" && key !== "after_seconds" && key !== "at" && key !== "every_seconds" && key !== "daily" && key !== "weekly" && key !== "cron") || Number(args.after_seconds !== void 0) + Number(args.at !== void 0) + Number(args.every_seconds !== void 0) + Number(args.daily !== void 0) + Number(args.weekly !== void 0) + Number(args.cron !== void 0) !== 1) return {
320
+ code: "invalid_selector",
321
+ message: "schedule_create accepts exactly one of after_seconds, at, every_seconds, daily, weekly, or cron."
322
+ };
323
+ if (args.prompt.trim().length === 0) return {
324
+ code: "invalid_prompt",
325
+ message: "prompt must be non-empty after trimming."
326
+ };
327
+ if (args.title.trim().length === 0) return {
328
+ code: "invalid_prompt",
329
+ message: REQUIRED_TITLE_MESSAGE
330
+ };
331
+ if (args.title.trim().length > MAX_TITLE_LENGTH) return {
332
+ code: "invalid_prompt",
333
+ message: `title must be at most ${MAX_TITLE_LENGTH} characters.`
334
+ };
335
+ if (args.after_seconds !== void 0 && (!Number.isSafeInteger(args.after_seconds) || args.after_seconds <= 0)) return {
336
+ code: "invalid_rule",
337
+ message: "after_seconds must be a positive safe integer."
338
+ };
339
+ return invalidInterval(args.every_seconds);
340
+ }
341
+ /** Validate the in-place update's selector count, id, and any supplied name, instruction, or interval. */
342
+ function validateUpdateArgs(args) {
343
+ const selectors = [
344
+ args.at !== void 0,
345
+ args.every_seconds !== void 0,
346
+ args.daily !== void 0,
347
+ args.weekly !== void 0,
348
+ args.cron !== void 0
349
+ ].filter(Boolean).length;
350
+ if (Object.keys(args).some((key) => key !== "id" && key !== "title" && key !== "prompt" && key !== "at" && key !== "every_seconds" && key !== "daily" && key !== "weekly" && key !== "cron") || selectors > 1) return {
351
+ code: "invalid_selector",
352
+ message: "schedule_update accepts at most one of at, every_seconds, daily, weekly, or cron."
353
+ };
354
+ if (args.id.length === 0 || args.id.trim() !== args.id) return {
355
+ code: "invalid_rule",
356
+ message: "schedule_update id must be non-empty without surrounding whitespace."
357
+ };
358
+ if (selectors === 0 && args.title === void 0 && args.prompt === void 0) return {
359
+ code: "invalid_selector",
360
+ message: "schedule_update needs a new title, prompt, or one of at, every_seconds, daily, weekly, or cron."
361
+ };
362
+ if (args.title !== void 0 && args.title.trim().length === 0) return {
363
+ code: "invalid_prompt",
364
+ message: REQUIRED_TITLE_MESSAGE
365
+ };
366
+ if (args.title !== void 0 && args.title.trim().length > MAX_TITLE_LENGTH) return {
367
+ code: "invalid_prompt",
368
+ message: `title must be at most ${MAX_TITLE_LENGTH} characters.`
369
+ };
370
+ if (args.prompt !== void 0 && args.prompt.trim().length === 0) return {
371
+ code: "invalid_prompt",
372
+ message: "prompt must be non-empty after trimming."
373
+ };
374
+ return invalidInterval(args.every_seconds);
375
+ }
376
+ /** The one timing replacement the update carries, or undefined when the request keeps the committed target. */
377
+ function timingChangeFrom(args) {
378
+ if (args.at !== void 0) return {
379
+ kind: "at",
380
+ at: args.at
381
+ };
382
+ if (args.every_seconds !== void 0) return {
383
+ kind: "every",
384
+ every_seconds: args.every_seconds
385
+ };
386
+ if (args.daily !== void 0) return {
387
+ kind: "daily",
388
+ daily: args.daily
389
+ };
390
+ if (args.weekly !== void 0) return {
391
+ kind: "weekly",
392
+ weekly: args.weekly
393
+ };
394
+ if (args.cron !== void 0) return {
395
+ kind: "cron",
396
+ cron: args.cron
397
+ };
398
+ }
399
+ /**
400
+ * Selector parameters shared by `schedule_create` and `schedule_update`, in the order the
401
+ * generated tool catalog states them.
402
+ */
403
+ const SELECTOR_PARAMETERS = {
404
+ every_seconds: {
405
+ type: "number",
406
+ description: `Fixed-rate interval in whole seconds, at least ${MIN_EVERY_INTERVAL_SECONDS}, aligned to the creation time; changing it with schedule_update re-aligns it to the save time.`
407
+ },
408
+ daily: {
409
+ type: "object",
410
+ additionalProperties: false,
411
+ description: "Every day at a local time.",
412
+ properties: {
413
+ time: {
414
+ type: "string",
415
+ required: true,
416
+ description: "HH:mm:ss with optional 1-3 fractional digits, for example 23:00:00."
417
+ },
418
+ time_zone: {
419
+ type: "string",
420
+ required: true,
421
+ description: "UTC or IANA Area/Location, for example Asia/Shanghai."
422
+ }
423
+ }
424
+ },
425
+ weekly: {
426
+ type: "object",
427
+ additionalProperties: false,
428
+ description: "On the given weekdays at a local time.",
429
+ properties: {
430
+ time: {
431
+ type: "string",
432
+ required: true,
433
+ description: "HH:mm:ss with optional 1-3 fractional digits, for example 09:00:00."
434
+ },
435
+ time_zone: {
436
+ type: "string",
437
+ required: true,
438
+ description: "UTC or IANA Area/Location, for example Asia/Shanghai."
439
+ },
440
+ weekdays: {
441
+ type: "array",
442
+ required: true,
443
+ description: "ISO weekdays, Monday 1 through Sunday 7, without repetitions.",
444
+ items: { type: "integer" }
445
+ }
446
+ }
447
+ },
448
+ cron: {
449
+ type: "object",
450
+ additionalProperties: false,
451
+ description: "Five-field Vixie cron expression in a time zone.",
452
+ properties: {
453
+ expression: {
454
+ type: "string",
455
+ required: true,
456
+ description: "minute hour day-of-month month day-of-week, for example \"*/15 9-17 * * 1-5\". When both day fields are restricted, a date matches if either one matches."
457
+ },
458
+ time_zone: {
459
+ type: "string",
460
+ required: true,
461
+ description: "UTC or IANA Area/Location, for example Asia/Shanghai."
462
+ }
463
+ }
464
+ },
465
+ at: {
466
+ description: "Absolute target: an RFC 3339 date-time with offset, or a local date, time, and IANA time_zone.",
467
+ oneOf: [{ type: "string" }, {
468
+ type: "object",
469
+ additionalProperties: false,
470
+ properties: {
471
+ date: {
472
+ type: "string",
473
+ required: true
474
+ },
475
+ time: {
476
+ type: "string",
477
+ required: true
478
+ },
479
+ time_zone: {
480
+ type: "string",
481
+ required: true
482
+ }
483
+ }
484
+ }]
485
+ }
486
+ };
487
+ /**
488
+ * Register the four Schedule tools in the mounting scope.
489
+ *
490
+ * Each call mutates the Session of the Agent that dispatched it, so a mount
491
+ * outside an agent scope still registers the tools but every call without a
492
+ * caller Agent is refused as an internal failure.
493
+ * @param ctx - Context owning the `tools` registry and the Host `schedule` service.
494
+ */
495
+ function apply(ctx) {
496
+ ctx.inject(["schedule"], (scheduleCtx) => {
497
+ registerScheduleTools(scheduleCtx);
498
+ });
499
+ }
500
+ /**
501
+ * Register the four reminder tools in the scope that resolved the Schedule
502
+ * service.
503
+ * @param ctx - Scope whose `schedule` service the tools act through.
504
+ */
505
+ function registerScheduleTools(ctx) {
506
+ ctx.tools.register(defineTool({
507
+ name: "schedule_create",
508
+ description: CREATE_DESCRIPTION,
509
+ parameters: {
510
+ prompt: {
511
+ type: "string",
512
+ required: true,
513
+ description: "Reminder content to present when the target becomes due."
514
+ },
515
+ title: {
516
+ type: "string",
517
+ required: true,
518
+ description: `Task name of at most ${MAX_TITLE_LENGTH} characters, shown on the task card and in task lists.`
519
+ },
520
+ after_seconds: {
521
+ type: "number",
522
+ description: "Delay in whole seconds."
523
+ },
524
+ ...SELECTOR_PARAMETERS
525
+ },
526
+ output: {
527
+ schema: CREATE_OUTPUT_SCHEMA,
528
+ render: renderValue
529
+ },
530
+ async execute(args, exec) {
531
+ const agent = exec.agent;
532
+ if (agent === void 0) return internalError();
533
+ const refusal = subagentCallerRefusal(agent);
534
+ if (refusal !== void 0) return refusal;
535
+ const invalid = validateCreateArgs(args);
536
+ if (invalid !== void 0) return invalid;
537
+ if (exec.signal.aborted) return internalError();
538
+ try {
539
+ return scheduleView(await ctx.schedule.create(agent.session.id, args, exec.signal), Date.now());
540
+ } catch (error) {
541
+ return operationError(error);
542
+ }
543
+ },
544
+ presentCall: (args) => present("Create reminder", "other", args.prompt)
545
+ }));
546
+ ctx.tools.register(defineTool({
547
+ name: "schedule_list",
548
+ description: LIST_DESCRIPTION,
549
+ parameters: {},
550
+ output: {
551
+ schema: LIST_OUTPUT_SCHEMA,
552
+ render: renderValue
553
+ },
554
+ async execute(_args, exec) {
555
+ const agent = exec.agent;
556
+ if (agent === void 0) return internalError();
557
+ const refusal = subagentCallerRefusal(agent);
558
+ if (refusal !== void 0) return refusal;
559
+ if (exec.signal.aborted) return internalError();
560
+ try {
561
+ return (await ctx.schedule.list({ sessionId: agent.session.id })).map((record) => scheduleView(record, Date.now()));
562
+ } catch (error) {
563
+ return operationError(error);
564
+ }
565
+ },
566
+ presentCall: () => present("List reminders", "read")
567
+ }));
568
+ ctx.tools.register(defineTool({
569
+ name: "schedule_delete",
570
+ description: DELETE_DESCRIPTION,
571
+ parameters: { id: {
572
+ type: "string",
573
+ required: true,
574
+ description: "Exact schedule id."
575
+ } },
576
+ output: {
577
+ schema: DELETE_OUTPUT_SCHEMA,
578
+ render: renderValue
579
+ },
580
+ async execute(args, exec) {
581
+ if (args.id.length === 0 || args.id.trim() !== args.id) return {
582
+ code: "invalid_rule",
583
+ message: "schedule_delete id must be non-empty without surrounding whitespace."
584
+ };
585
+ const id = ScheduleId(args.id);
586
+ const agent = exec.agent;
587
+ if (agent === void 0) return internalError();
588
+ const refusal = subagentCallerRefusal(agent);
589
+ if (refusal !== void 0) return refusal;
590
+ if (exec.signal.aborted) return internalError();
591
+ try {
592
+ return await ctx.schedule.delete({
593
+ sessionId: agent.session.id,
594
+ id
595
+ }, exec.signal);
596
+ } catch (error) {
597
+ return operationError(error);
598
+ }
599
+ },
600
+ presentCall: (args) => present("Delete reminder", "other", args.id)
601
+ }));
602
+ ctx.tools.register(defineTool({
603
+ name: "schedule_update",
604
+ description: UPDATE_DESCRIPTION,
605
+ parameters: {
606
+ id: {
607
+ type: "string",
608
+ required: true,
609
+ description: "Schedule id returned by schedule_list."
610
+ },
611
+ title: {
612
+ type: "string",
613
+ description: `New task name of at most ${MAX_TITLE_LENGTH} characters.`
614
+ },
615
+ prompt: {
616
+ type: "string",
617
+ description: "New reminder content."
618
+ },
619
+ ...SELECTOR_PARAMETERS
620
+ },
621
+ output: {
622
+ schema: UPDATE_OUTPUT_SCHEMA,
623
+ render: renderValue
624
+ },
625
+ async execute(args, exec) {
626
+ const agent = exec.agent;
627
+ if (agent === void 0) return internalError();
628
+ const refusal = subagentCallerRefusal(agent);
629
+ if (refusal !== void 0) return refusal;
630
+ const invalid = validateUpdateArgs(args);
631
+ if (invalid !== void 0) return invalid;
632
+ if (exec.signal.aborted) return internalError();
633
+ const id = ScheduleId(args.id);
634
+ try {
635
+ const sessionId = agent.session.id;
636
+ const expected = (await ctx.schedule.list({ sessionId })).find((record) => record.id === id);
637
+ if (expected === void 0) return {
638
+ id,
639
+ updated: false,
640
+ code: (await ctx.schedule.catalog()).some((entry) => entry.sessionId === sessionId && entry.id === id) ? "schedule_ended" : "schedule_not_found"
641
+ };
642
+ const change = timingChangeFrom(args);
643
+ const result = await ctx.schedule.update({
644
+ sessionId,
645
+ id,
646
+ expected,
647
+ ...change === void 0 ? {} : { change },
648
+ ...args.title === void 0 ? {} : { title: args.title },
649
+ ...args.prompt === void 0 ? {} : { prompt: args.prompt }
650
+ }, exec.signal);
651
+ return "record" in result ? scheduleView(result.record, Date.now()) : result;
652
+ } catch (error) {
653
+ return operationError(error);
654
+ }
655
+ },
656
+ presentCall: (args) => present("Update reminder", "other", args.id)
657
+ }));
658
+ }
659
+ //#endregion
660
+ export { apply, inject, name };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Model-facing `schedule_create`, `schedule_list`, `schedule_update`, and
3
+ * `schedule_delete` tools over the Host `ctx.schedule` service. Mounting the
4
+ * plugin registers them in the mounting scope, so a preset decides which
5
+ * agents receive them; every call acts on the calling Agent's Session.
6
+ * @module @qilin-agent/tool-schedule
7
+ */
8
+ import type { Context } from '@qilin-agent/kylin';
9
+ /** Plugin name registered with the Loader. */
10
+ export declare const name = "tool-schedule";
11
+ /** Host services this plugin consumes. The Schedule service is resolved per
12
+ * scope, so a preset that declares this plugin stays inert while the shipped
13
+ * composition keeps that service off. */
14
+ export declare const inject: string[];
15
+ /**
16
+ * Register the four Schedule tools in the mounting scope.
17
+ *
18
+ * Each call mutates the Session of the Agent that dispatched it, so a mount
19
+ * outside an agent scope still registers the tools but every call without a
20
+ * caller Agent is refused as an internal failure.
21
+ * @param ctx - Context owning the `tools` registry and the Host `schedule` service.
22
+ */
23
+ export declare function apply(ctx: Context): void;
24
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@qilin-agent/tool-schedule",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Model-facing reminder management tools (schedule_create, schedule_list, schedule_update, schedule_delete) over the Host ctx.schedule service",
4
+ "version": "3.1.4",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kkutysllb/QiLin.git",
11
+ "directory": "packages/schedule/tool-schedule"
12
+ },
13
+ "engines": {
14
+ "node": "^22.19.0 || >=24.0.0"
15
+ },
16
+ "type": "module",
17
+ "main": "lib/index.js",
18
+ "types": "lib/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./lib/types/index.d.ts",
22
+ "default": "./lib/index.js"
23
+ },
24
+ "./src/*": "./src/*",
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "lib/index.js",
29
+ "lib/types/**/*.d.ts"
30
+ ],
31
+ "license": "MIT",
32
+ "peerDependencies": {
33
+ "@qilin-agent/kylin": "~4.0.3",
34
+ "@qilin-agent/schedule": "3.1.4",
35
+ "@qilin-agent/llm": "3.1.4",
36
+ "@qilin-agent/subagent": "3.1.4",
37
+ "@qilin-agent/tools": "3.1.4"
38
+ },
39
+ "devDependencies": {
40
+ "@qilin-agent/llm": "3.1.4",
41
+ "@qilin-agent/schedule": "3.1.4",
42
+ "@qilin-agent/agent": "3.1.4",
43
+ "@qilin-agent/kylin": "~4.0.3",
44
+ "@qilin-agent/scope": "3.1.4",
45
+ "@qilin-agent/session": "3.1.4",
46
+ "@qilin-agent/subagent": "3.1.4",
47
+ "@qilin-agent/tools": "3.1.4"
48
+ }
6
49
  }