scientify 1.13.5 → 2.0.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/README.en.md +350 -0
- package/README.md +148 -358
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +131 -122
- package/dist/index.js.map +1 -1
- package/dist/src/cli/research.d.ts +1 -6
- package/dist/src/cli/research.d.ts.map +1 -1
- package/dist/src/cli/research.js +227 -123
- package/dist/src/cli/research.js.map +1 -1
- package/dist/src/commands/metabolism-status.d.ts +3 -3
- package/dist/src/commands/metabolism-status.d.ts.map +1 -1
- package/dist/src/commands/metabolism-status.js +72 -75
- package/dist/src/commands/metabolism-status.js.map +1 -1
- package/dist/src/commands.d.ts +1 -1
- package/dist/src/commands.d.ts.map +1 -1
- package/dist/src/commands.js +0 -55
- package/dist/src/commands.js.map +1 -1
- package/dist/src/hooks/cron-skill-inject.d.ts +6 -7
- package/dist/src/hooks/cron-skill-inject.d.ts.map +1 -1
- package/dist/src/hooks/cron-skill-inject.js +6 -15
- package/dist/src/hooks/cron-skill-inject.js.map +1 -1
- package/dist/src/hooks/research-mode.d.ts +1 -1
- package/dist/src/hooks/research-mode.d.ts.map +1 -1
- package/dist/src/hooks/research-mode.js +24 -72
- package/dist/src/hooks/research-mode.js.map +1 -1
- package/dist/src/hooks/scientify-signature.d.ts +1 -1
- package/dist/src/hooks/scientify-signature.d.ts.map +1 -1
- package/dist/src/hooks/scientify-signature.js +2 -5
- package/dist/src/hooks/scientify-signature.js.map +1 -1
- package/dist/src/knowledge-state/render.d.ts +1 -9
- package/dist/src/knowledge-state/render.d.ts.map +1 -1
- package/dist/src/knowledge-state/render.js +33 -158
- package/dist/src/knowledge-state/render.js.map +1 -1
- package/dist/src/knowledge-state/store.d.ts.map +1 -1
- package/dist/src/knowledge-state/store.js +65 -884
- package/dist/src/knowledge-state/store.js.map +1 -1
- package/dist/src/knowledge-state/types.d.ts +0 -69
- package/dist/src/knowledge-state/types.d.ts.map +1 -1
- package/dist/src/literature/subscription-state.d.ts +0 -2
- package/dist/src/literature/subscription-state.d.ts.map +1 -1
- package/dist/src/literature/subscription-state.js +7 -1199
- package/dist/src/literature/subscription-state.js.map +1 -1
- package/dist/src/research-subscriptions/constants.d.ts +1 -1
- package/dist/src/research-subscriptions/constants.js +1 -1
- package/dist/src/research-subscriptions/cron-client.d.ts +1 -1
- package/dist/src/research-subscriptions/cron-client.d.ts.map +1 -1
- package/dist/src/research-subscriptions/delivery.d.ts +1 -1
- package/dist/src/research-subscriptions/delivery.d.ts.map +1 -1
- package/dist/src/research-subscriptions/handlers.d.ts +1 -1
- package/dist/src/research-subscriptions/handlers.d.ts.map +1 -1
- package/dist/src/research-subscriptions/handlers.js +9 -9
- package/dist/src/research-subscriptions/handlers.js.map +1 -1
- package/dist/src/research-subscriptions/parse.d.ts.map +1 -1
- package/dist/src/research-subscriptions/parse.js +0 -10
- package/dist/src/research-subscriptions/parse.js.map +1 -1
- package/dist/src/research-subscriptions/prompt.d.ts +1 -1
- package/dist/src/research-subscriptions/prompt.d.ts.map +1 -1
- package/dist/src/research-subscriptions/prompt.js +196 -191
- package/dist/src/research-subscriptions/prompt.js.map +1 -1
- package/dist/src/research-subscriptions/types.d.ts +1 -2
- package/dist/src/research-subscriptions/types.d.ts.map +1 -1
- package/dist/src/templates/bootstrap.d.ts.map +1 -1
- package/dist/src/templates/bootstrap.js +32 -19
- package/dist/src/templates/bootstrap.js.map +1 -1
- package/dist/src/tools/arxiv-download.d.ts +1 -2
- package/dist/src/tools/arxiv-download.d.ts.map +1 -1
- package/dist/src/tools/arxiv-search.d.ts +1 -2
- package/dist/src/tools/arxiv-search.d.ts.map +1 -1
- package/dist/src/tools/github-search-tool.d.ts +1 -2
- package/dist/src/tools/github-search-tool.d.ts.map +1 -1
- package/dist/src/tools/openalex-search.d.ts +1 -2
- package/dist/src/tools/openalex-search.d.ts.map +1 -1
- package/dist/src/tools/openreview-lookup.d.ts +1 -2
- package/dist/src/tools/openreview-lookup.d.ts.map +1 -1
- package/dist/src/tools/paper-browser.d.ts +1 -2
- package/dist/src/tools/paper-browser.d.ts.map +1 -1
- package/dist/src/tools/result.d.ts +3 -5
- package/dist/src/tools/result.d.ts.map +1 -1
- package/dist/src/tools/result.js +5 -7
- package/dist/src/tools/result.js.map +1 -1
- package/dist/src/tools/scientify-cron.d.ts +4 -9
- package/dist/src/tools/scientify-cron.d.ts.map +1 -1
- package/dist/src/tools/scientify-cron.js +19 -441
- package/dist/src/tools/scientify-cron.js.map +1 -1
- package/dist/src/tools/scientify-literature-state.d.ts +1 -62
- package/dist/src/tools/scientify-literature-state.d.ts.map +1 -1
- package/dist/src/tools/scientify-literature-state.js +46 -312
- package/dist/src/tools/scientify-literature-state.js.map +1 -1
- package/dist/src/tools/unpaywall-download.d.ts +1 -2
- package/dist/src/tools/unpaywall-download.d.ts.map +1 -1
- package/dist/src/types.d.ts +16 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/openclaw.plugin.json +4 -2
- package/package.json +1 -1
- package/skills/metabolism/SKILL.md +2 -0
- package/skills/research-subscription/SKILL.md +1 -29
- package/README.zh.md +0 -494
|
@@ -13,25 +13,36 @@ export function renderBootstrapMd(projectName) {
|
|
|
13
13
|
2. 根据用户回答,提取:
|
|
14
14
|
- 核心域关键词(3-5 个)
|
|
15
15
|
- 建议的 arXiv 分类(如 cs.LG, cs.AI)
|
|
16
|
-
-
|
|
16
|
+
- 建议的监测带相邻领域分类
|
|
17
17
|
3. 向用户确认以上配置,接受调整
|
|
18
18
|
4. 确认后执行以下写入操作:
|
|
19
19
|
- 更新 SOUL.md:填写研究方向、核心域、监测带各字段
|
|
20
|
-
- 生成
|
|
21
|
-
5.
|
|
22
|
-
-
|
|
23
|
-
- 研究状态写入 knowledge_state/
|
|
20
|
+
- 生成 metabolism/config.json(参考下方模板)
|
|
21
|
+
5. 询问用户是否立即执行 Day 0(构建初始知识状态 K(T0))
|
|
22
|
+
- 如果是,使用 arxiv_search 按配置的关键词检索论文,执行 skills/metabolism/SKILL.md 中的四步循环
|
|
24
23
|
6. 删除本文件(BOOTSTRAP.md)
|
|
25
24
|
|
|
26
|
-
##
|
|
25
|
+
## config.json 模板
|
|
27
26
|
|
|
28
27
|
\`\`\`json
|
|
29
28
|
{
|
|
30
29
|
"projectId": "${projectName}",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
"coreQuery": {
|
|
31
|
+
"keywords": ["关键词1", "关键词2"],
|
|
32
|
+
"arxivCategories": ["cs.LG"],
|
|
33
|
+
"dateMode": "daily-new"
|
|
34
|
+
},
|
|
35
|
+
"monitorZone": {
|
|
36
|
+
"categories": ["相邻领域分类"],
|
|
37
|
+
"enabled": true
|
|
38
|
+
},
|
|
39
|
+
"heartbeat": {
|
|
40
|
+
"cronExpression": "0 6 * * *",
|
|
41
|
+
"timezone": "Asia/Shanghai",
|
|
42
|
+
"enabled": true
|
|
43
|
+
},
|
|
44
|
+
"agentId": "research-${projectName}",
|
|
45
|
+
"currentDay": 0,
|
|
35
46
|
"createdAt": "${new Date().toISOString()}"
|
|
36
47
|
}
|
|
37
48
|
\`\`\`
|
|
@@ -64,13 +75,14 @@ export function renderAgentsMd() {
|
|
|
64
75
|
$W/
|
|
65
76
|
├── SOUL.md # 身份 + 研究方向
|
|
66
77
|
├── AGENTS.md # 本文档
|
|
67
|
-
├──
|
|
68
|
-
│ ├──
|
|
69
|
-
│ ├──
|
|
70
|
-
│ ├──
|
|
71
|
-
│
|
|
72
|
-
│ ├──
|
|
73
|
-
│
|
|
78
|
+
├── metabolism/ # 知识新陈代谢
|
|
79
|
+
│ ├── config.json # 项目配置(关键词、分类、heartbeat)
|
|
80
|
+
│ ├── knowledge/ # K(t) 持久知识状态
|
|
81
|
+
│ │ ├── _index.md # 全景索引
|
|
82
|
+
│ │ └── topic-*.md # 主题文件(上限 50)
|
|
83
|
+
│ ├── diffs/ # 每日 diff 报告
|
|
84
|
+
│ ├── hypotheses/ # 生成的假设
|
|
85
|
+
│ └── log/ # 运行日志
|
|
74
86
|
├── survey/ # /research-collect outputs
|
|
75
87
|
│ ├── search_terms.json
|
|
76
88
|
│ └── report.md
|
|
@@ -90,13 +102,14 @@ $W/
|
|
|
90
102
|
├── iterations/ # /research-review: 审查迭代
|
|
91
103
|
│ └── judge_v*.md
|
|
92
104
|
├── experiment_res.md # /research-experiment: 实验报告
|
|
105
|
+
└── skills/ # workspace skills (metabolism 等)
|
|
93
106
|
\`\`\`
|
|
94
107
|
|
|
95
108
|
## Session Context
|
|
96
109
|
|
|
97
110
|
你可能在不同类型的 session 中被唤醒:
|
|
98
111
|
- **Main session**:与人类直接对话,可触发 research-pipeline 等编排 skill
|
|
99
|
-
- **Cron session
|
|
112
|
+
- **Cron session**:定时触发,执行周期性任务(如每日 metabolism)
|
|
100
113
|
- **Spawn session**:被 main session 调度(sessions_spawn),执行一次性重任务
|
|
101
114
|
|
|
102
115
|
任务指令会在 session 启动时注入,按指令执行即可。
|
|
@@ -110,7 +123,7 @@ $W/
|
|
|
110
123
|
产出文件一旦写入不修改,除非用户明确要求。例外:\`project/\` 在 implement-review 迭代中可变。
|
|
111
124
|
|
|
112
125
|
### Knowledge File Rules
|
|
113
|
-
-
|
|
126
|
+
- knowledge/ 下的文件是持久知识状态,修改需谨慎
|
|
114
127
|
- 每次修改必须先读取当前内容再更新
|
|
115
128
|
- _index.md 是全景索引,必须与 topic 文件保持同步
|
|
116
129
|
- topic 文件数上限 50,低活跃主题应合并归档
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../src/templates/bootstrap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,OAAO;;YAEG,WAAW;;;;kBAIL,WAAW
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../src/templates/bootstrap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,OAAO;;YAEG,WAAW;;;;kBAIL,WAAW;;;;;;;;;;;;;;;;;kBAiBX,WAAW;;;;;;;;;;;;;;;yBAeJ,WAAW;;kBAElB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;;CAGzC,CAAC;AACF,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,OAAO,qBAAqB,WAAW;;OAElC,WAAW;;;;;;;;;;;CAWjB,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFR,CAAC;AACF,CAAC"}
|
|
@@ -14,12 +14,11 @@ export declare function createArxivDownloadTool(): {
|
|
|
14
14
|
output_dir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
15
|
}>;
|
|
16
16
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
17
|
-
type: "tool_result";
|
|
18
17
|
content: {
|
|
19
18
|
type: "text";
|
|
20
19
|
text: string;
|
|
21
20
|
}[];
|
|
22
|
-
|
|
21
|
+
details: unknown;
|
|
23
22
|
}>;
|
|
24
23
|
};
|
|
25
24
|
//# sourceMappingURL=arxiv-download.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arxiv-download.d.ts","sourceRoot":"","sources":["../../../src/tools/arxiv-download.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mBAAmB;;;EAO9B,CAAC;AAoIH;;GAEG;AACH,wBAAgB,uBAAuB;;;;;;;;2BAMN,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"arxiv-download.d.ts","sourceRoot":"","sources":["../../../src/tools/arxiv-download.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mBAAmB;;;EAO9B,CAAC;AAoIH;;GAEG;AACH,wBAAgB,uBAAuB;;;;;;;;2BAMN,MAAM,WAAW,OAAO;;;;;;;EA0DxD"}
|
|
@@ -18,12 +18,11 @@ export declare function createArxivSearchTool(): {
|
|
|
18
18
|
date_from: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
19
19
|
}>;
|
|
20
20
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
21
|
-
type: "tool_result";
|
|
22
21
|
content: {
|
|
23
22
|
type: "text";
|
|
24
23
|
text: string;
|
|
25
24
|
}[];
|
|
26
|
-
|
|
25
|
+
details: unknown;
|
|
27
26
|
}>;
|
|
28
27
|
};
|
|
29
28
|
//# sourceMappingURL=arxiv-search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arxiv-search.d.ts","sourceRoot":"","sources":["../../../src/tools/arxiv-search.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;EAmB5B,CAAC;AAkGH;;GAEG;AACH,wBAAgB,qBAAqB;;;;;;;;;;2BAMJ,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"arxiv-search.d.ts","sourceRoot":"","sources":["../../../src/tools/arxiv-search.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;EAmB5B,CAAC;AAkGH;;GAEG;AACH,wBAAgB,qBAAqB;;;;;;;;;;2BAMJ,MAAM,WAAW,OAAO;;;;;;;EA4CxD"}
|
|
@@ -15,12 +15,11 @@ export declare function createGithubSearchTool(): {
|
|
|
15
15
|
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
16
16
|
}>;
|
|
17
17
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
18
|
-
type: "tool_result";
|
|
19
18
|
content: {
|
|
20
19
|
type: "text";
|
|
21
20
|
text: string;
|
|
22
21
|
}[];
|
|
23
|
-
|
|
22
|
+
details: unknown;
|
|
24
23
|
}>;
|
|
25
24
|
};
|
|
26
25
|
//# sourceMappingURL=github-search-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-search-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/github-search-tool.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;EAqBjC,CAAC;AAyCH,wBAAgB,sBAAsB;;;;;;;;;;2BAOL,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"github-search-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/github-search-tool.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;EAqBjC,CAAC;AAyCH,wBAAgB,sBAAsB;;;;;;;;;;2BAOL,MAAM,WAAW,OAAO;;;;;;;EAsExD"}
|
|
@@ -15,12 +15,11 @@ export declare function createOpenAlexSearchTool(): {
|
|
|
15
15
|
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
16
16
|
}>;
|
|
17
17
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
18
|
-
type: "tool_result";
|
|
19
18
|
content: {
|
|
20
19
|
type: "text";
|
|
21
20
|
text: string;
|
|
22
21
|
}[];
|
|
23
|
-
|
|
22
|
+
details: unknown;
|
|
24
23
|
}>;
|
|
25
24
|
};
|
|
26
25
|
//# sourceMappingURL=openalex-search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openalex-search.d.ts","sourceRoot":"","sources":["../../../src/tools/openalex-search.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,wBAAwB;;;;;EAqBnC,CAAC;AA4DH,wBAAgB,wBAAwB;;;;;;;;;;2BAOP,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"openalex-search.d.ts","sourceRoot":"","sources":["../../../src/tools/openalex-search.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,wBAAwB;;;;;EAqBnC,CAAC;AA4DH,wBAAgB,wBAAwB;;;;;;;;;;2BAOP,MAAM,WAAW,OAAO;;;;;;;EA0ExD"}
|
|
@@ -21,12 +21,11 @@ export declare function createOpenReviewLookupTool(): {
|
|
|
21
21
|
review_limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
22
22
|
}>;
|
|
23
23
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
24
|
-
type: "tool_result";
|
|
25
24
|
content: {
|
|
26
25
|
type: "text";
|
|
27
26
|
text: string;
|
|
28
27
|
}[];
|
|
29
|
-
|
|
28
|
+
details: unknown;
|
|
30
29
|
}>;
|
|
31
30
|
};
|
|
32
31
|
//# sourceMappingURL=openreview-lookup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openreview-lookup.d.ts","sourceRoot":"","sources":["../../../src/tools/openreview-lookup.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,sBAAsB;;;;;;;;EAyCjC,CAAC;AA0WH,wBAAgB,0BAA0B;;;;;;;;;;;;;2BAOT,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"openreview-lookup.d.ts","sourceRoot":"","sources":["../../../src/tools/openreview-lookup.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,sBAAsB;;;;;;;;EAyCjC,CAAC;AA0WH,wBAAgB,0BAA0B;;;;;;;;;;;;;2BAOT,MAAM,WAAW,OAAO;;;;;;;EAmFxD"}
|
|
@@ -13,12 +13,11 @@ export declare function createPaperBrowserTool(): {
|
|
|
13
13
|
num_lines: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
14
14
|
}>;
|
|
15
15
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
16
|
-
type: "tool_result";
|
|
17
16
|
content: {
|
|
18
17
|
type: "text";
|
|
19
18
|
text: string;
|
|
20
19
|
}[];
|
|
21
|
-
|
|
20
|
+
details: unknown;
|
|
22
21
|
}>;
|
|
23
22
|
};
|
|
24
23
|
//# sourceMappingURL=paper-browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-browser.d.ts","sourceRoot":"","sources":["../../../src/tools/paper-browser.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;EAiBjC,CAAC;AAqBH,wBAAgB,sBAAsB;;;;;;;;;2BAOL,MAAM,WAAW,OAAO
|
|
1
|
+
{"version":3,"file":"paper-browser.d.ts","sourceRoot":"","sources":["../../../src/tools/paper-browser.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;EAiBjC,CAAC;AAqBH,wBAAgB,sBAAsB;;;;;;;;;2BAOL,MAAM,WAAW,OAAO;;;;;;;EAuFxD"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tool result helpers
|
|
2
|
+
* Tool result helpers compatible with AgentToolResult<T>.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* { type: "tool_result", content: [{ type: "text", text: string }] }
|
|
4
|
+
* AgentToolResult requires: { content: [{type:"text", text}], details: T }
|
|
6
5
|
*/
|
|
7
6
|
type ToolResultContent = {
|
|
8
7
|
type: "text";
|
|
9
8
|
text: string;
|
|
10
9
|
};
|
|
11
10
|
type ToolResult = {
|
|
12
|
-
type: "tool_result";
|
|
13
11
|
content: ToolResultContent[];
|
|
14
|
-
|
|
12
|
+
details: unknown;
|
|
15
13
|
};
|
|
16
14
|
/**
|
|
17
15
|
* Create a successful tool result with JSON data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/tools/result.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/tools/result.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CAKzE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAK7D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAKhD;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;;;;CAAoB,CAAC"}
|
package/dist/src/tools/result.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tool result helpers
|
|
2
|
+
* Tool result helpers compatible with AgentToolResult<T>.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* { type: "tool_result", content: [{ type: "text", text: string }] }
|
|
4
|
+
* AgentToolResult requires: { content: [{type:"text", text}], details: T }
|
|
6
5
|
*/
|
|
7
6
|
/**
|
|
8
7
|
* Create a successful tool result with JSON data.
|
|
9
8
|
*/
|
|
10
9
|
export function ok(data) {
|
|
11
10
|
return {
|
|
12
|
-
type: "tool_result",
|
|
13
11
|
content: [{ type: "text", text: JSON.stringify(data) }],
|
|
12
|
+
details: data,
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
@@ -18,9 +17,8 @@ export function ok(data) {
|
|
|
18
17
|
*/
|
|
19
18
|
export function err(code, message) {
|
|
20
19
|
return {
|
|
21
|
-
type: "tool_result",
|
|
22
20
|
content: [{ type: "text", text: JSON.stringify({ error: code, message }) }],
|
|
23
|
-
|
|
21
|
+
details: { error: code, message },
|
|
24
22
|
};
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
@@ -28,8 +26,8 @@ export function err(code, message) {
|
|
|
28
26
|
*/
|
|
29
27
|
export function text(content) {
|
|
30
28
|
return {
|
|
31
|
-
type: "tool_result",
|
|
32
29
|
content: [{ type: "text", text: content }],
|
|
30
|
+
details: null,
|
|
33
31
|
};
|
|
34
32
|
}
|
|
35
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../src/tools/result.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../src/tools/result.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH;;GAEG;AACH,MAAM,UAAU,EAAE,CAAoC,IAAO;IAC3D,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACvD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,OAAe;IAC/C,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QAC3E,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;KAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC1C,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PluginLogger, PluginRuntime } from "
|
|
1
|
+
import type { PluginLogger, PluginRuntime } from "../types.js";
|
|
2
2
|
export declare const ScientifyCronToolSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
-
action: import("@sinclair/typebox").
|
|
3
|
+
action: import("@sinclair/typebox").TString;
|
|
4
4
|
scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
5
|
schedule: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
6
|
topic: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -19,8 +19,6 @@ export declare const ScientifyCronToolSchema: import("@sinclair/typebox").TObjec
|
|
|
19
19
|
channel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
20
20
|
to: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
21
|
no_deliver: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
22
|
-
metadata_only: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
23
|
-
run_now: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
24
22
|
job_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
23
|
}>;
|
|
26
24
|
type CronToolDeps = {
|
|
@@ -32,7 +30,7 @@ export declare function createScientifyCronTool(deps: CronToolDeps): {
|
|
|
32
30
|
name: string;
|
|
33
31
|
description: string;
|
|
34
32
|
parameters: import("@sinclair/typebox").TObject<{
|
|
35
|
-
action: import("@sinclair/typebox").
|
|
33
|
+
action: import("@sinclair/typebox").TString;
|
|
36
34
|
scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
37
35
|
schedule: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
36
|
topic: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -51,17 +49,14 @@ export declare function createScientifyCronTool(deps: CronToolDeps): {
|
|
|
51
49
|
channel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
50
|
to: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
53
51
|
no_deliver: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
54
|
-
metadata_only: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
55
|
-
run_now: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
56
52
|
job_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
57
53
|
}>;
|
|
58
54
|
execute: (_toolCallId: string, rawArgs: unknown) => Promise<{
|
|
59
|
-
type: "tool_result";
|
|
60
55
|
content: {
|
|
61
56
|
type: "text";
|
|
62
57
|
text: string;
|
|
63
58
|
}[];
|
|
64
|
-
|
|
59
|
+
details: unknown;
|
|
65
60
|
}>;
|
|
66
61
|
};
|
|
67
62
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scientify-cron.d.ts","sourceRoot":"","sources":["../../../src/tools/scientify-cron.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6C,YAAY,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"scientify-cron.d.ts","sourceRoot":"","sources":["../../../src/tools/scientify-cron.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6C,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS1G,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAmFlC,CAAC;AAEH,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAoLF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;2BAWzB,MAAM,WAAW,OAAO;;;;;;;EAwDxD"}
|