@t0u9h/agent-cron 0.2.0 → 0.2.1
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/dist/cli.js +0 -0
- package/package.json +1 -1
- package/dist/mcp/feishu-server.d.ts +0 -2
- package/dist/mcp/feishu-server.d.ts.map +0 -1
- package/dist/mcp/feishu-server.js +0 -170
- package/dist/mcp/feishu-server.js.map +0 -1
- package/dist/outputs/feishu.d.ts +0 -19
- package/dist/outputs/feishu.d.ts.map +0 -1
- package/dist/outputs/feishu.js +0 -93
- package/dist/outputs/feishu.js.map +0 -1
- package/dist/outputs/file.d.ts +0 -5
- package/dist/outputs/file.d.ts.map +0 -1
- package/dist/outputs/file.js +0 -13
- package/dist/outputs/file.js.map +0 -1
- package/dist/outputs/github.d.ts +0 -5
- package/dist/outputs/github.d.ts.map +0 -1
- package/dist/outputs/github.js +0 -51
- package/dist/outputs/github.js.map +0 -1
- package/dist/outputs/index.d.ts +0 -3
- package/dist/outputs/index.d.ts.map +0 -1
- package/dist/outputs/index.js +0 -10
- package/dist/outputs/index.js.map +0 -1
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feishu-server.d.ts","sourceRoot":"","sources":["../../src/mcp/feishu-server.ts"],"names":[],"mappings":""}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
const server = new Server({
|
|
5
|
-
name: 'feishu-sender',
|
|
6
|
-
version: '1.0.0',
|
|
7
|
-
}, {
|
|
8
|
-
capabilities: {
|
|
9
|
-
tools: {},
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
// Feishu webhook from environment
|
|
13
|
-
const FEISHU_WEBHOOK = process.env.FEISHU_WEBHOOK;
|
|
14
|
-
function parseInline(raw) {
|
|
15
|
-
const elements = [];
|
|
16
|
-
const re = /\[([^\]]+)\]\((https?:\/\/[^)]+)\)|\*\*([^*]+)\*\*/g;
|
|
17
|
-
let last = 0;
|
|
18
|
-
let m;
|
|
19
|
-
while ((m = re.exec(raw)) !== null) {
|
|
20
|
-
if (m.index > last) {
|
|
21
|
-
elements.push({ tag: 'text', text: raw.slice(last, m.index) });
|
|
22
|
-
}
|
|
23
|
-
if (m[1] && m[2]) {
|
|
24
|
-
elements.push({ tag: 'a', text: m[1], href: m[2] });
|
|
25
|
-
}
|
|
26
|
-
else if (m[3]) {
|
|
27
|
-
elements.push({ tag: 'text', text: `「${m[3]}」` });
|
|
28
|
-
}
|
|
29
|
-
last = re.lastIndex;
|
|
30
|
-
}
|
|
31
|
-
if (last < raw.length) {
|
|
32
|
-
elements.push({ tag: 'text', text: raw.slice(last) });
|
|
33
|
-
}
|
|
34
|
-
return elements.length > 0 ? elements : [{ tag: 'text', text: raw }];
|
|
35
|
-
}
|
|
36
|
-
function markdownToFeishuPost(markdown) {
|
|
37
|
-
const lines = markdown.split('\n');
|
|
38
|
-
let title = '';
|
|
39
|
-
const content = [];
|
|
40
|
-
for (const raw of lines) {
|
|
41
|
-
const line = raw.trimEnd();
|
|
42
|
-
// h1 → card title
|
|
43
|
-
if (/^#\s+/.test(line)) {
|
|
44
|
-
if (!title)
|
|
45
|
-
title = line.replace(/^#\s+/, '');
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
// h2/h3 → prefix with ▌
|
|
49
|
-
if (/^#{2,3}\s+/.test(line)) {
|
|
50
|
-
const text = '▌ ' + line.replace(/^#{2,3}\s+/, '');
|
|
51
|
-
content.push([{ tag: 'text', text }]);
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
// horizontal rule → empty line
|
|
55
|
-
if (/^---+$/.test(line)) {
|
|
56
|
-
content.push([{ tag: 'text', text: '' }]);
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
// empty line
|
|
60
|
-
if (line === '') {
|
|
61
|
-
content.push([{ tag: 'text', text: '' }]);
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
// list items → bullet prefix
|
|
65
|
-
if (/^[-*]\s+/.test(line)) {
|
|
66
|
-
const text = line.replace(/^[-*]\s+/, '• ');
|
|
67
|
-
content.push(parseInline(text));
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
// regular paragraph
|
|
71
|
-
content.push(parseInline(line));
|
|
72
|
-
}
|
|
73
|
-
return { title: title || 'AI 日报', content };
|
|
74
|
-
}
|
|
75
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
76
|
-
return {
|
|
77
|
-
tools: [
|
|
78
|
-
{
|
|
79
|
-
name: 'send_to_feishu',
|
|
80
|
-
description: 'Send formatted message to Feishu webhook',
|
|
81
|
-
inputSchema: {
|
|
82
|
-
type: 'object',
|
|
83
|
-
properties: {
|
|
84
|
-
content: {
|
|
85
|
-
type: 'string',
|
|
86
|
-
description: 'The markdown content to send to Feishu',
|
|
87
|
-
},
|
|
88
|
-
webhook: {
|
|
89
|
-
type: 'string',
|
|
90
|
-
description: 'Optional webhook URL. If not provided, uses FEISHU_WEBHOOK env var',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
required: ['content'],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
100
|
-
if (request.params.name === 'send_to_feishu') {
|
|
101
|
-
const { content, webhook } = request.params.arguments;
|
|
102
|
-
const targetWebhook = webhook || FEISHU_WEBHOOK;
|
|
103
|
-
if (!targetWebhook) {
|
|
104
|
-
return {
|
|
105
|
-
content: [
|
|
106
|
-
{
|
|
107
|
-
type: 'text',
|
|
108
|
-
text: 'Error: No Feishu webhook configured. Set FEISHU_WEBHOOK env var or provide webhook parameter.',
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
const { title, content: feishuContent } = markdownToFeishuPost(content);
|
|
115
|
-
const body = {
|
|
116
|
-
msg_type: 'post',
|
|
117
|
-
content: {
|
|
118
|
-
post: {
|
|
119
|
-
zh_cn: { title, content: feishuContent },
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
const res = await fetch(targetWebhook, {
|
|
124
|
-
method: 'POST',
|
|
125
|
-
headers: { 'Content-Type': 'application/json' },
|
|
126
|
-
body: JSON.stringify(body),
|
|
127
|
-
});
|
|
128
|
-
if (!res.ok) {
|
|
129
|
-
throw new Error(`Feishu request failed: ${res.status} ${await res.text()}`);
|
|
130
|
-
}
|
|
131
|
-
const json = (await res.json());
|
|
132
|
-
if (json.code !== 0) {
|
|
133
|
-
throw new Error(`Feishu error: code=${json.code} msg=${json.msg}`);
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
content: [
|
|
137
|
-
{
|
|
138
|
-
type: 'text',
|
|
139
|
-
text: `✅ Successfully sent to Feishu with title: "${title}"`,
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
return {
|
|
146
|
-
content: [
|
|
147
|
-
{
|
|
148
|
-
type: 'text',
|
|
149
|
-
text: `❌ Failed to send to Feishu: ${error}`,
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
content: [
|
|
157
|
-
{
|
|
158
|
-
type: 'text',
|
|
159
|
-
text: `Unknown tool: ${request.params.name}`,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
async function main() {
|
|
165
|
-
const transport = new StdioServerTransport();
|
|
166
|
-
await server.connect(transport);
|
|
167
|
-
console.error('Feishu MCP server running');
|
|
168
|
-
}
|
|
169
|
-
main().catch(console.error);
|
|
170
|
-
//# sourceMappingURL=feishu-server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feishu-server.js","sourceRoot":"","sources":["../../src/mcp/feishu-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,kCAAkC;AAClC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AAQlD,SAAS,WAAW,CAAC,GAAW;IAC9B,MAAM,QAAQ,GAA0B,EAAE,CAAC;IAC3C,MAAM,EAAE,GAAG,qDAAqD,CAAC;IACjE,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,CAAyB,CAAC;IAE9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACjB,QAAQ,C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
|
1
|
-
import type { OutputChannel, Task } from '../types.js';
|
|
2
|
-
type FeishuInlineElement = {
|
|
3
|
-
tag: 'text';
|
|
4
|
-
text: string;
|
|
5
|
-
} | {
|
|
6
|
-
tag: 'a';
|
|
7
|
-
text: string;
|
|
8
|
-
href: string;
|
|
9
|
-
};
|
|
10
|
-
type FeishuLine = FeishuInlineElement[];
|
|
11
|
-
export declare function markdownToFeishuPost(markdown: string): {
|
|
12
|
-
title: string;
|
|
13
|
-
content: FeishuLine[];
|
|
14
|
-
};
|
|
15
|
-
export declare class FeishuChannel implements OutputChannel {
|
|
16
|
-
send(result: string, task: Task): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=feishu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feishu.d.ts","sourceRoot":"","sources":["../../src/outputs/feishu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,KAAK,mBAAmB,GACpB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,KAAK,UAAU,GAAG,mBAAmB,EAAE,CAAC;AA4BxC,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,UAAU,EAAE,CAAA;CAAE,CA6C/F;AAED,qBAAa,aAAc,YAAW,aAAa;IAC3C,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAsCtD"}
|
package/dist/outputs/feishu.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
function parseInline(raw) {
|
|
2
|
-
const elements = [];
|
|
3
|
-
// Match [text](url) links and **bold**
|
|
4
|
-
const re = /\[([^\]]+)\]\((https?:\/\/[^)]+)\)|\*\*([^*]+)\*\*/g;
|
|
5
|
-
let last = 0;
|
|
6
|
-
let m;
|
|
7
|
-
while ((m = re.exec(raw)) !== null) {
|
|
8
|
-
if (m.index > last) {
|
|
9
|
-
elements.push({ tag: 'text', text: raw.slice(last, m.index) });
|
|
10
|
-
}
|
|
11
|
-
if (m[1] && m[2]) {
|
|
12
|
-
elements.push({ tag: 'a', text: m[1], href: m[2] });
|
|
13
|
-
}
|
|
14
|
-
else if (m[3]) {
|
|
15
|
-
elements.push({ tag: 'text', text: `「${m[3]}」` });
|
|
16
|
-
}
|
|
17
|
-
last = re.lastIndex;
|
|
18
|
-
}
|
|
19
|
-
if (last < raw.length) {
|
|
20
|
-
elements.push({ tag: 'text', text: raw.slice(last) });
|
|
21
|
-
}
|
|
22
|
-
return elements.length > 0 ? elements : [{ tag: 'text', text: raw }];
|
|
23
|
-
}
|
|
24
|
-
export function markdownToFeishuPost(markdown) {
|
|
25
|
-
const lines = markdown.split('\n');
|
|
26
|
-
let title = '';
|
|
27
|
-
const content = [];
|
|
28
|
-
for (const raw of lines) {
|
|
29
|
-
const line = raw.trimEnd();
|
|
30
|
-
// h1 → card title (first one wins)
|
|
31
|
-
if (/^#\s+/.test(line)) {
|
|
32
|
-
if (!title)
|
|
33
|
-
title = line.replace(/^#\s+/, '');
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
// h2/h3 → prefix with ▌
|
|
37
|
-
if (/^#{2,3}\s+/.test(line)) {
|
|
38
|
-
const text = '▌ ' + line.replace(/^#{2,3}\s+/, '');
|
|
39
|
-
content.push([{ tag: 'text', text }]);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
// horizontal rule → empty line
|
|
43
|
-
if (/^---+$/.test(line)) {
|
|
44
|
-
content.push([{ tag: 'text', text: '' }]);
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
// empty line → empty line
|
|
48
|
-
if (line === '') {
|
|
49
|
-
content.push([{ tag: 'text', text: '' }]);
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
// list items → bullet prefix
|
|
53
|
-
if (/^[-*]\s+/.test(line)) {
|
|
54
|
-
const text = line.replace(/^[-*]\s+/, '• ');
|
|
55
|
-
content.push(parseInline(text));
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
// regular paragraph
|
|
59
|
-
content.push(parseInline(line));
|
|
60
|
-
}
|
|
61
|
-
return { title: title || 'Agent Report', content };
|
|
62
|
-
}
|
|
63
|
-
export class FeishuChannel {
|
|
64
|
-
async send(result, task) {
|
|
65
|
-
const webhook = task.feishuWebhook ?? process.env.FEISHU_WEBHOOK;
|
|
66
|
-
if (!webhook) {
|
|
67
|
-
throw new Error(`[agent-cron] feishu: missing webhook for task "${task.name}". Set feishuWebhook in frontmatter or FEISHU_WEBHOOK env var.`);
|
|
68
|
-
}
|
|
69
|
-
const { title, content } = markdownToFeishuPost(result);
|
|
70
|
-
const body = {
|
|
71
|
-
msg_type: 'post',
|
|
72
|
-
content: {
|
|
73
|
-
post: {
|
|
74
|
-
zh_cn: { title, content },
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
const res = await fetch(webhook, {
|
|
79
|
-
method: 'POST',
|
|
80
|
-
headers: { 'Content-Type': 'application/json' },
|
|
81
|
-
body: JSON.stringify(body),
|
|
82
|
-
});
|
|
83
|
-
if (!res.ok) {
|
|
84
|
-
throw new Error(`[agent-cron] feishu: request failed: ${res.status} ${await res.text()}`);
|
|
85
|
-
}
|
|
86
|
-
const json = (await res.json());
|
|
87
|
-
if (json.code !== 0) {
|
|
88
|
-
throw new Error(`[agent-cron] feishu: error response: code=${json.code} msg=${json.msg}`);
|
|
89
|
-
}
|
|
90
|
-
console.log(`[agent-cron] pushed to Feishu (${task.name})`);
|
|
91
|
-
}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AAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAC,MAAM,IAAI,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC5F,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAoC,CAAC;QACnE,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,6CAA6C,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC5F,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
package/dist/outputs/file.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/outputs/file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,WAAY,YAAW,aAAa;IACzC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAStD"}
|
package/dist/outputs/file.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
export class FileChannel {
|
|
4
|
-
async send(result, task) {
|
|
5
|
-
const outputDir = String(task.outputDir ?? './output');
|
|
6
|
-
fs.mkdirSync(outputDir, { recursive: true });
|
|
7
|
-
const date = new Date().toISOString().split('T')[0];
|
|
8
|
-
const filePath = path.join(outputDir, `${task.slug}-${date}.md`);
|
|
9
|
-
fs.writeFileSync(filePath, result, 'utf-8');
|
|
10
|
-
console.log(`[agent-cron] written to ${filePath} (${task.name})`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=file.js.map
|
package/dist/outputs/file.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/outputs/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,OAAO,WAAW;IACtB,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,IAAU;QACnC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,CAAC;QACvD,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7C,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC;QACjE,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,2BAA2B,QAAQ,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IACpE,CAAC;CACF"}
|
package/dist/outputs/github.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/outputs/github.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,aAAc,YAAW,aAAa;IAC3C,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAyDtD"}
|
package/dist/outputs/github.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Octokit } from '@octokit/rest';
|
|
2
|
-
export class GithubChannel {
|
|
3
|
-
async send(result, task) {
|
|
4
|
-
const repo = task.githubRepo;
|
|
5
|
-
if (!repo) {
|
|
6
|
-
throw new Error(`[agent-cron] github: missing githubRepo for task "${task.name}"`);
|
|
7
|
-
}
|
|
8
|
-
const [owner, repoName] = repo.split('/');
|
|
9
|
-
if (!owner || !repoName) {
|
|
10
|
-
throw new Error(`[agent-cron] github: invalid githubRepo format "${repo}", expected "owner/repo"`);
|
|
11
|
-
}
|
|
12
|
-
const token = task.githubToken ?? process.env.GITHUB_TOKEN;
|
|
13
|
-
if (!token) {
|
|
14
|
-
throw new Error(`[agent-cron] github: missing token for task "${task.name}". Set githubToken in frontmatter or GITHUB_TOKEN env var.`);
|
|
15
|
-
}
|
|
16
|
-
const branch = String(task.githubBranch ?? 'main');
|
|
17
|
-
const dir = task.githubDir ? String(task.githubDir) : '';
|
|
18
|
-
const date = new Date().toISOString().split('T')[0];
|
|
19
|
-
const fileName = `${task.slug}-${date}.md`;
|
|
20
|
-
const filePath = dir ? `${dir}/${fileName}` : fileName;
|
|
21
|
-
const octokit = new Octokit({ auth: token });
|
|
22
|
-
const content = Buffer.from(result, 'utf-8').toString('base64');
|
|
23
|
-
const message = `chore: ${task.name} ${date}`;
|
|
24
|
-
// Check if file exists (to get sha for update)
|
|
25
|
-
let sha;
|
|
26
|
-
try {
|
|
27
|
-
const { data } = await octokit.repos.getContent({
|
|
28
|
-
owner,
|
|
29
|
-
repo: repoName,
|
|
30
|
-
path: filePath,
|
|
31
|
-
ref: branch,
|
|
32
|
-
});
|
|
33
|
-
if (!Array.isArray(data) && data.type === 'file')
|
|
34
|
-
sha = data.sha;
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
// file doesn't exist yet, sha stays undefined
|
|
38
|
-
}
|
|
39
|
-
await octokit.repos.createOrUpdateFileContents({
|
|
40
|
-
owner,
|
|
41
|
-
repo: repoName,
|
|
42
|
-
path: filePath,
|
|
43
|
-
message,
|
|
44
|
-
content,
|
|
45
|
-
branch,
|
|
46
|
-
...(sha ? { sha } : {}),
|
|
47
|
-
});
|
|
48
|
-
console.log(`[agent-cron] pushed to GitHub ${repo}/${filePath} (${task.name})`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=github.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/outputs/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,IAAU;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAgC,CAAC;QACnD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,qDAAqD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,mDAAmD,IAAI,0BAA0B,CAClF,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GACR,IAAI,CAAC,WAAkC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QACvE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,gDAAgD,IAAI,CAAC,IAAI,4DAA4D,CACtH,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,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,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,OAAO;YACP,OAAO;YACP,MAAM;YACN,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,iCAAiC,IAAI,IAAI,QAAQ,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAClF,CAAC;CACF"}
|
package/dist/outputs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/outputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAKlD,CAAC"}
|
package/dist/outputs/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FileChannel } from './file.js';
|
|
2
|
-
import { FeishuChannel } from './feishu.js';
|
|
3
|
-
import { GithubChannel } from './github.js';
|
|
4
|
-
export const channels = {
|
|
5
|
-
file: new FileChannel(),
|
|
6
|
-
feishu: new FeishuChannel(),
|
|
7
|
-
github: new GithubChannel(),
|
|
8
|
-
// future: slack, telegram, discord, webhook, ...
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/outputs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAkC;IACrD,IAAI,EAAI,IAAI,WAAW,EAAE;IACzB,MAAM,EAAE,IAAI,aAAa,EAAE;IAC3B,MAAM,EAAE,IAAI,aAAa,EAAE;IAC3B,iDAAiD;CAClD,CAAC"}
|