@zibby/skills 0.1.34 → 0.1.35
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.md +2 -0
- package/dist/browser.d.ts +19 -0
- package/dist/chat-memory.d.ts +355 -0
- package/dist/chat-notify.d.ts +409 -0
- package/dist/core-tools.d.ts +131 -0
- package/dist/function-skill.d.ts +149 -0
- package/dist/git.d.ts +72 -0
- package/dist/github.d.ts +777 -0
- package/dist/gitlab.d.ts +396 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +43 -43
- package/dist/integrations.d.ts +110 -0
- package/dist/jira.d.ts +547 -0
- package/dist/lark.d.ts +161 -0
- package/dist/linear.d.ts +344 -0
- package/dist/llm-billing.d.ts +294 -0
- package/dist/memory.d.ts +137 -0
- package/dist/package.json +67 -19
- package/dist/plane.d.ts +24 -0
- package/dist/report.d.ts +354 -0
- package/dist/report.js +9 -9
- package/dist/sentry.d.ts +43 -0
- package/dist/skill-installer.d.ts +86 -0
- package/dist/slack.d.ts +284 -0
- package/dist/test-runner.d.ts +220 -0
- package/dist/trackers/github-adapter.d.ts +96 -0
- package/dist/trackers/index.d.ts +27 -0
- package/dist/trackers/jira-adapter.d.ts +90 -0
- package/dist/trackers/linear-adapter.d.ts +89 -0
- package/dist/trackers/plane-adapter.d.ts +101 -0
- package/dist/trackers/types.d.ts +335 -0
- package/dist/workflow-builder.d.ts +245 -0
- package/package.json +67 -19
package/dist/slack.d.ts
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export namespace slackSkill {
|
|
2
|
+
let id: string;
|
|
3
|
+
let serverName: string;
|
|
4
|
+
let allowedTools: string[];
|
|
5
|
+
let requiresIntegration: "slack";
|
|
6
|
+
let envKeys: string[];
|
|
7
|
+
let description: string;
|
|
8
|
+
let promptFragment: string;
|
|
9
|
+
/**
|
|
10
|
+
* MCP-style agents (Claude Code / Cursor / Codex / Gemini) call
|
|
11
|
+
* this. Returns the spawn spec for our self-contained MCP binary
|
|
12
|
+
* (bin/mcp-slack.mjs) — replaces the previous
|
|
13
|
+
* `@modelcontextprotocol/server-slack@latest` so we can expose
|
|
14
|
+
* the extra routing tools (lookupByEmail, usergroups, search).
|
|
15
|
+
*
|
|
16
|
+
* Returns null when the binary can't be found (e.g. running
|
|
17
|
+
* outside a node_modules layout) — agent strategy falls back to
|
|
18
|
+
* its built-in tools; the in-process path keeps working for the
|
|
19
|
+
* `assistant` agent via handleToolCall.
|
|
20
|
+
*/
|
|
21
|
+
function resolve(): {
|
|
22
|
+
type: string;
|
|
23
|
+
command: string;
|
|
24
|
+
args: any[];
|
|
25
|
+
env: {};
|
|
26
|
+
alwaysLoad: boolean;
|
|
27
|
+
};
|
|
28
|
+
function handleToolCall(name: any, args: any): Promise<string>;
|
|
29
|
+
let tools: ({
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
input_schema: {
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
channel?: undefined;
|
|
36
|
+
text?: undefined;
|
|
37
|
+
blocks?: undefined;
|
|
38
|
+
thread_ts?: undefined;
|
|
39
|
+
timestamp?: undefined;
|
|
40
|
+
reaction?: undefined;
|
|
41
|
+
limit?: undefined;
|
|
42
|
+
user_id?: undefined;
|
|
43
|
+
email?: undefined;
|
|
44
|
+
usergroup?: undefined;
|
|
45
|
+
query?: undefined;
|
|
46
|
+
};
|
|
47
|
+
required?: undefined;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
input_schema: {
|
|
53
|
+
type: string;
|
|
54
|
+
properties: {
|
|
55
|
+
channel: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
text: {
|
|
60
|
+
type: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
blocks: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
thread_ts?: undefined;
|
|
68
|
+
timestamp?: undefined;
|
|
69
|
+
reaction?: undefined;
|
|
70
|
+
limit?: undefined;
|
|
71
|
+
user_id?: undefined;
|
|
72
|
+
email?: undefined;
|
|
73
|
+
usergroup?: undefined;
|
|
74
|
+
query?: undefined;
|
|
75
|
+
};
|
|
76
|
+
required: string[];
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
input_schema: {
|
|
82
|
+
type: string;
|
|
83
|
+
properties: {
|
|
84
|
+
channel: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
thread_ts: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
text: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
blocks?: undefined;
|
|
97
|
+
timestamp?: undefined;
|
|
98
|
+
reaction?: undefined;
|
|
99
|
+
limit?: undefined;
|
|
100
|
+
user_id?: undefined;
|
|
101
|
+
email?: undefined;
|
|
102
|
+
usergroup?: undefined;
|
|
103
|
+
query?: undefined;
|
|
104
|
+
};
|
|
105
|
+
required: string[];
|
|
106
|
+
};
|
|
107
|
+
} | {
|
|
108
|
+
name: string;
|
|
109
|
+
description: string;
|
|
110
|
+
input_schema: {
|
|
111
|
+
type: string;
|
|
112
|
+
properties: {
|
|
113
|
+
channel: {
|
|
114
|
+
type: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
timestamp: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
reaction: {
|
|
122
|
+
type: string;
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
text?: undefined;
|
|
126
|
+
blocks?: undefined;
|
|
127
|
+
thread_ts?: undefined;
|
|
128
|
+
limit?: undefined;
|
|
129
|
+
user_id?: undefined;
|
|
130
|
+
email?: undefined;
|
|
131
|
+
usergroup?: undefined;
|
|
132
|
+
query?: undefined;
|
|
133
|
+
};
|
|
134
|
+
required: string[];
|
|
135
|
+
};
|
|
136
|
+
} | {
|
|
137
|
+
name: string;
|
|
138
|
+
description: string;
|
|
139
|
+
input_schema: {
|
|
140
|
+
type: string;
|
|
141
|
+
properties: {
|
|
142
|
+
channel: {
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
limit: {
|
|
147
|
+
type: string;
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
text?: undefined;
|
|
151
|
+
blocks?: undefined;
|
|
152
|
+
thread_ts?: undefined;
|
|
153
|
+
timestamp?: undefined;
|
|
154
|
+
reaction?: undefined;
|
|
155
|
+
user_id?: undefined;
|
|
156
|
+
email?: undefined;
|
|
157
|
+
usergroup?: undefined;
|
|
158
|
+
query?: undefined;
|
|
159
|
+
};
|
|
160
|
+
required: string[];
|
|
161
|
+
};
|
|
162
|
+
} | {
|
|
163
|
+
name: string;
|
|
164
|
+
description: string;
|
|
165
|
+
input_schema: {
|
|
166
|
+
type: string;
|
|
167
|
+
properties: {
|
|
168
|
+
channel: {
|
|
169
|
+
type: string;
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
thread_ts: {
|
|
173
|
+
type: string;
|
|
174
|
+
description: string;
|
|
175
|
+
};
|
|
176
|
+
text?: undefined;
|
|
177
|
+
blocks?: undefined;
|
|
178
|
+
timestamp?: undefined;
|
|
179
|
+
reaction?: undefined;
|
|
180
|
+
limit?: undefined;
|
|
181
|
+
user_id?: undefined;
|
|
182
|
+
email?: undefined;
|
|
183
|
+
usergroup?: undefined;
|
|
184
|
+
query?: undefined;
|
|
185
|
+
};
|
|
186
|
+
required: string[];
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
189
|
+
name: string;
|
|
190
|
+
description: string;
|
|
191
|
+
input_schema: {
|
|
192
|
+
type: string;
|
|
193
|
+
properties: {
|
|
194
|
+
user_id: {
|
|
195
|
+
type: string;
|
|
196
|
+
description: string;
|
|
197
|
+
};
|
|
198
|
+
channel?: undefined;
|
|
199
|
+
text?: undefined;
|
|
200
|
+
blocks?: undefined;
|
|
201
|
+
thread_ts?: undefined;
|
|
202
|
+
timestamp?: undefined;
|
|
203
|
+
reaction?: undefined;
|
|
204
|
+
limit?: undefined;
|
|
205
|
+
email?: undefined;
|
|
206
|
+
usergroup?: undefined;
|
|
207
|
+
query?: undefined;
|
|
208
|
+
};
|
|
209
|
+
required: string[];
|
|
210
|
+
};
|
|
211
|
+
} | {
|
|
212
|
+
name: string;
|
|
213
|
+
description: string;
|
|
214
|
+
input_schema: {
|
|
215
|
+
type: string;
|
|
216
|
+
properties: {
|
|
217
|
+
email: {
|
|
218
|
+
type: string;
|
|
219
|
+
description: string;
|
|
220
|
+
};
|
|
221
|
+
channel?: undefined;
|
|
222
|
+
text?: undefined;
|
|
223
|
+
blocks?: undefined;
|
|
224
|
+
thread_ts?: undefined;
|
|
225
|
+
timestamp?: undefined;
|
|
226
|
+
reaction?: undefined;
|
|
227
|
+
limit?: undefined;
|
|
228
|
+
user_id?: undefined;
|
|
229
|
+
usergroup?: undefined;
|
|
230
|
+
query?: undefined;
|
|
231
|
+
};
|
|
232
|
+
required: string[];
|
|
233
|
+
};
|
|
234
|
+
} | {
|
|
235
|
+
name: string;
|
|
236
|
+
description: string;
|
|
237
|
+
input_schema: {
|
|
238
|
+
type: string;
|
|
239
|
+
properties: {
|
|
240
|
+
usergroup: {
|
|
241
|
+
type: string;
|
|
242
|
+
description: string;
|
|
243
|
+
};
|
|
244
|
+
channel?: undefined;
|
|
245
|
+
text?: undefined;
|
|
246
|
+
blocks?: undefined;
|
|
247
|
+
thread_ts?: undefined;
|
|
248
|
+
timestamp?: undefined;
|
|
249
|
+
reaction?: undefined;
|
|
250
|
+
limit?: undefined;
|
|
251
|
+
user_id?: undefined;
|
|
252
|
+
email?: undefined;
|
|
253
|
+
query?: undefined;
|
|
254
|
+
};
|
|
255
|
+
required: string[];
|
|
256
|
+
};
|
|
257
|
+
} | {
|
|
258
|
+
name: string;
|
|
259
|
+
description: string;
|
|
260
|
+
input_schema: {
|
|
261
|
+
type: string;
|
|
262
|
+
properties: {
|
|
263
|
+
query: {
|
|
264
|
+
type: string;
|
|
265
|
+
description: string;
|
|
266
|
+
};
|
|
267
|
+
limit: {
|
|
268
|
+
type: string;
|
|
269
|
+
description: string;
|
|
270
|
+
};
|
|
271
|
+
channel?: undefined;
|
|
272
|
+
text?: undefined;
|
|
273
|
+
blocks?: undefined;
|
|
274
|
+
thread_ts?: undefined;
|
|
275
|
+
timestamp?: undefined;
|
|
276
|
+
reaction?: undefined;
|
|
277
|
+
user_id?: undefined;
|
|
278
|
+
email?: undefined;
|
|
279
|
+
usergroup?: undefined;
|
|
280
|
+
};
|
|
281
|
+
required: string[];
|
|
282
|
+
};
|
|
283
|
+
})[];
|
|
284
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
export namespace testRunnerSkill {
|
|
2
|
+
let id: string;
|
|
3
|
+
let description: string;
|
|
4
|
+
let envKeys: any[];
|
|
5
|
+
let promptFragment: string;
|
|
6
|
+
function resolve(): any;
|
|
7
|
+
function handleToolCall(name: any, args: any, context: any): Promise<any>;
|
|
8
|
+
let tools: ({
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
input_schema: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
ticket: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
description: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
input: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
repo: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
agent: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
output: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
spec?: undefined;
|
|
39
|
+
ticketKey?: undefined;
|
|
40
|
+
headless?: undefined;
|
|
41
|
+
workflow?: undefined;
|
|
42
|
+
runId?: undefined;
|
|
43
|
+
type?: undefined;
|
|
44
|
+
node?: undefined;
|
|
45
|
+
query?: undefined;
|
|
46
|
+
tail?: undefined;
|
|
47
|
+
directory?: undefined;
|
|
48
|
+
};
|
|
49
|
+
required?: undefined;
|
|
50
|
+
};
|
|
51
|
+
} | {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
input_schema: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
spec: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
ticketKey: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
agent: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
headless: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
workflow: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
ticket?: undefined;
|
|
78
|
+
description?: undefined;
|
|
79
|
+
input?: undefined;
|
|
80
|
+
repo?: undefined;
|
|
81
|
+
output?: undefined;
|
|
82
|
+
runId?: undefined;
|
|
83
|
+
type?: undefined;
|
|
84
|
+
node?: undefined;
|
|
85
|
+
query?: undefined;
|
|
86
|
+
tail?: undefined;
|
|
87
|
+
directory?: undefined;
|
|
88
|
+
};
|
|
89
|
+
required: string[];
|
|
90
|
+
};
|
|
91
|
+
} | {
|
|
92
|
+
name: string;
|
|
93
|
+
description: string;
|
|
94
|
+
input_schema: {
|
|
95
|
+
type: string;
|
|
96
|
+
properties: {
|
|
97
|
+
runId: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
ticket?: undefined;
|
|
102
|
+
description?: undefined;
|
|
103
|
+
input?: undefined;
|
|
104
|
+
repo?: undefined;
|
|
105
|
+
agent?: undefined;
|
|
106
|
+
output?: undefined;
|
|
107
|
+
spec?: undefined;
|
|
108
|
+
ticketKey?: undefined;
|
|
109
|
+
headless?: undefined;
|
|
110
|
+
workflow?: undefined;
|
|
111
|
+
type?: undefined;
|
|
112
|
+
node?: undefined;
|
|
113
|
+
query?: undefined;
|
|
114
|
+
tail?: undefined;
|
|
115
|
+
directory?: undefined;
|
|
116
|
+
};
|
|
117
|
+
required: string[];
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
name: string;
|
|
121
|
+
description: string;
|
|
122
|
+
input_schema: {
|
|
123
|
+
type: string;
|
|
124
|
+
properties: {
|
|
125
|
+
runId: {
|
|
126
|
+
type: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
type: {
|
|
130
|
+
type: string;
|
|
131
|
+
enum: string[];
|
|
132
|
+
description: string;
|
|
133
|
+
};
|
|
134
|
+
node: {
|
|
135
|
+
type: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
query: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
tail: {
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
ticket?: undefined;
|
|
147
|
+
description?: undefined;
|
|
148
|
+
input?: undefined;
|
|
149
|
+
repo?: undefined;
|
|
150
|
+
agent?: undefined;
|
|
151
|
+
output?: undefined;
|
|
152
|
+
spec?: undefined;
|
|
153
|
+
ticketKey?: undefined;
|
|
154
|
+
headless?: undefined;
|
|
155
|
+
workflow?: undefined;
|
|
156
|
+
directory?: undefined;
|
|
157
|
+
};
|
|
158
|
+
required: string[];
|
|
159
|
+
};
|
|
160
|
+
} | {
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
input_schema: {
|
|
164
|
+
type: string;
|
|
165
|
+
properties: {
|
|
166
|
+
runId: {
|
|
167
|
+
type: string;
|
|
168
|
+
description: string;
|
|
169
|
+
};
|
|
170
|
+
tail: {
|
|
171
|
+
type: string;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
ticket?: undefined;
|
|
175
|
+
description?: undefined;
|
|
176
|
+
input?: undefined;
|
|
177
|
+
repo?: undefined;
|
|
178
|
+
agent?: undefined;
|
|
179
|
+
output?: undefined;
|
|
180
|
+
spec?: undefined;
|
|
181
|
+
ticketKey?: undefined;
|
|
182
|
+
headless?: undefined;
|
|
183
|
+
workflow?: undefined;
|
|
184
|
+
type?: undefined;
|
|
185
|
+
node?: undefined;
|
|
186
|
+
query?: undefined;
|
|
187
|
+
directory?: undefined;
|
|
188
|
+
};
|
|
189
|
+
required?: undefined;
|
|
190
|
+
};
|
|
191
|
+
} | {
|
|
192
|
+
name: string;
|
|
193
|
+
description: string;
|
|
194
|
+
input_schema: {
|
|
195
|
+
type: string;
|
|
196
|
+
properties: {
|
|
197
|
+
directory: {
|
|
198
|
+
type: string;
|
|
199
|
+
description: string;
|
|
200
|
+
};
|
|
201
|
+
ticket?: undefined;
|
|
202
|
+
description?: undefined;
|
|
203
|
+
input?: undefined;
|
|
204
|
+
repo?: undefined;
|
|
205
|
+
agent?: undefined;
|
|
206
|
+
output?: undefined;
|
|
207
|
+
spec?: undefined;
|
|
208
|
+
ticketKey?: undefined;
|
|
209
|
+
headless?: undefined;
|
|
210
|
+
workflow?: undefined;
|
|
211
|
+
runId?: undefined;
|
|
212
|
+
type?: undefined;
|
|
213
|
+
node?: undefined;
|
|
214
|
+
query?: undefined;
|
|
215
|
+
tail?: undefined;
|
|
216
|
+
};
|
|
217
|
+
required?: undefined;
|
|
218
|
+
};
|
|
219
|
+
})[];
|
|
220
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export namespace githubAdapter {
|
|
2
|
+
export let id: string;
|
|
3
|
+
export { toStateCategory };
|
|
4
|
+
export { toNeutral };
|
|
5
|
+
export { IN_PROGRESS_LABEL };
|
|
6
|
+
export { BLOCKED_LABEL };
|
|
7
|
+
/**
|
|
8
|
+
* listCandidates — list a repo's issues by state/labels/since cursor.
|
|
9
|
+
* Needs {owner, repo} via opts.ctx or env. `opts.query` is ignored (GitHub
|
|
10
|
+
* issue search is a separate endpoint; the contract's listCandidates is the
|
|
11
|
+
* repo-scoped poll).
|
|
12
|
+
* @param {import('./types.js').ListCandidatesOptions & {ctx?: object}} [opts]
|
|
13
|
+
* @returns {Promise<import('./types.js').NeutralTicket[]>}
|
|
14
|
+
*/
|
|
15
|
+
export function listCandidates(opts?: import("./types.js").ListCandidatesOptions & {
|
|
16
|
+
ctx?: object;
|
|
17
|
+
}): Promise<import("./types.js").NeutralTicket[]>;
|
|
18
|
+
/** getTicket — one issue by number (key may be `owner/repo#N` or just `N`). */
|
|
19
|
+
export function getTicket(key: any, ctx?: {}): Promise<{
|
|
20
|
+
id: string;
|
|
21
|
+
key: string;
|
|
22
|
+
title: any;
|
|
23
|
+
body: any;
|
|
24
|
+
state: any;
|
|
25
|
+
stateCategory: "unknown" | "todo" | "in_progress" | "done" | "blocked";
|
|
26
|
+
assignee: any;
|
|
27
|
+
url: any;
|
|
28
|
+
_raw: any;
|
|
29
|
+
}>;
|
|
30
|
+
/** getComments — chronological; we reverse to newest-first for contract parity. */
|
|
31
|
+
export function getComments(key: any, ctx?: {}): Promise<any>;
|
|
32
|
+
/** addComment — markdown body. */
|
|
33
|
+
export function addComment(key: any, body: any, ctx?: {}): Promise<{
|
|
34
|
+
ok: boolean;
|
|
35
|
+
id: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* transition — map a neutral target NAME onto GitHub's open/close + labels
|
|
39
|
+
* convention (see the file header). Returns ok:false for names GitHub can't
|
|
40
|
+
* represent — that's a real seam, not a swallowed error.
|
|
41
|
+
*/
|
|
42
|
+
export function transition(key: any, targetStateName: any, ctx?: {}): Promise<{
|
|
43
|
+
ok: boolean;
|
|
44
|
+
stateAfter: any;
|
|
45
|
+
stateCategoryAfter: string;
|
|
46
|
+
_raw: any;
|
|
47
|
+
via?: undefined;
|
|
48
|
+
error?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
ok: boolean;
|
|
51
|
+
stateAfter: string;
|
|
52
|
+
stateCategoryAfter: string;
|
|
53
|
+
via: string;
|
|
54
|
+
_raw: any;
|
|
55
|
+
error?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
error: string;
|
|
59
|
+
stateAfter?: undefined;
|
|
60
|
+
stateCategoryAfter?: undefined;
|
|
61
|
+
_raw?: undefined;
|
|
62
|
+
via?: undefined;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* linkPullRequest — post a comment with the PR link. GitHub's native issue↔PR
|
|
66
|
+
* association is driven by closing keywords in the PR body, not an issue API
|
|
67
|
+
* write, so a comment is the portable, always-works path.
|
|
68
|
+
*/
|
|
69
|
+
export function linkPullRequest(key: any, prUrl: any, title: any, ctx?: {}): Promise<{
|
|
70
|
+
ok: boolean;
|
|
71
|
+
via: string;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
74
|
+
export default githubAdapter;
|
|
75
|
+
/**
|
|
76
|
+
* Map a GitHub issue's open|closed state + its labels onto a neutral bucket.
|
|
77
|
+
* @param {string} state 'open' | 'closed'
|
|
78
|
+
* @param {string[]} [labels] label names on the issue
|
|
79
|
+
* @returns {'todo'|'in_progress'|'done'|'blocked'|'unknown'}
|
|
80
|
+
*/
|
|
81
|
+
declare function toStateCategory(state: string, labels?: string[]): "todo" | "in_progress" | "done" | "blocked" | "unknown";
|
|
82
|
+
/** Build a NeutralTicket from the github.js issue tool projection. */
|
|
83
|
+
declare function toNeutral(issue: any, ctx?: {}): {
|
|
84
|
+
id: string;
|
|
85
|
+
key: string;
|
|
86
|
+
title: any;
|
|
87
|
+
body: any;
|
|
88
|
+
state: any;
|
|
89
|
+
stateCategory: "unknown" | "todo" | "in_progress" | "done" | "blocked";
|
|
90
|
+
assignee: any;
|
|
91
|
+
url: any;
|
|
92
|
+
_raw: any;
|
|
93
|
+
};
|
|
94
|
+
/** Conventional label names this adapter writes for the two open sub-states. */
|
|
95
|
+
declare const IN_PROGRESS_LABEL: "in progress";
|
|
96
|
+
declare const BLOCKED_LABEL: "blocked";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a tracker adapter.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} [provider]
|
|
5
|
+
* Provider id ('jira' | 'linear' | 'github' | 'plane'). When omitted, falls
|
|
6
|
+
* back to the TRACKER_PROVIDER env var, then to DEFAULT_TRACKER_PROVIDER.
|
|
7
|
+
* @returns {import('./types.js').TrackerAdapter}
|
|
8
|
+
* @throws {Error} if the resolved provider is not registered.
|
|
9
|
+
*/
|
|
10
|
+
export function getAdapter(provider?: string): import("./types.js").TrackerAdapter;
|
|
11
|
+
export { jiraAdapter } from "./jira-adapter.js";
|
|
12
|
+
export { linearAdapter } from "./linear-adapter.js";
|
|
13
|
+
export { githubAdapter } from "./github-adapter.js";
|
|
14
|
+
export { planeAdapter } from "./plane-adapter.js";
|
|
15
|
+
export { TRACKER_STATE_CATEGORIES } from "./types.js";
|
|
16
|
+
export namespace TRACKER_ADAPTERS {
|
|
17
|
+
export { jiraAdapter as jira };
|
|
18
|
+
export { linearAdapter as linear };
|
|
19
|
+
export { githubAdapter as github };
|
|
20
|
+
export { planeAdapter as plane };
|
|
21
|
+
}
|
|
22
|
+
/** Default provider when none is specified and TRACKER_PROVIDER is unset. */
|
|
23
|
+
export const DEFAULT_TRACKER_PROVIDER: "jira";
|
|
24
|
+
import { jiraAdapter } from './jira-adapter.js';
|
|
25
|
+
import { linearAdapter } from './linear-adapter.js';
|
|
26
|
+
import { githubAdapter } from './github-adapter.js';
|
|
27
|
+
import { planeAdapter } from './plane-adapter.js';
|