@marktoflow/integrations 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +612 -0
- package/dist/adapters/github-copilot.d.ts +78 -0
- package/dist/adapters/github-copilot.d.ts.map +1 -0
- package/dist/adapters/github-copilot.js +161 -0
- package/dist/adapters/github-copilot.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/README.md
ADDED
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
# @marktoflow/integrations
|
|
2
|
+
|
|
3
|
+
Standard integrations for marktoflow - connect to Slack, GitHub, Jira, Gmail, and more.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`@marktoflow/integrations` provides ready-to-use service integrations and AI agent adapters for the marktoflow automation framework.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
### Service Integrations (11)
|
|
12
|
+
|
|
13
|
+
- **Slack** - Send messages, manage channels, socket mode
|
|
14
|
+
- **GitHub** - Create PRs, issues, comments, manage repos
|
|
15
|
+
- **Jira** - Create/update issues, transitions, search
|
|
16
|
+
- **Gmail** - Send emails, read inbox, manage labels, webhook triggers
|
|
17
|
+
- **Outlook** - Send emails, read calendar/inbox, webhook triggers
|
|
18
|
+
- **Linear** - Issue tracking and project management
|
|
19
|
+
- **Notion** - Database operations, page management
|
|
20
|
+
- **Discord** - Bot interactions, message management
|
|
21
|
+
- **Airtable** - Spreadsheet database operations
|
|
22
|
+
- **Confluence** - Wiki page management
|
|
23
|
+
- **HTTP** - Generic HTTP requests with auth
|
|
24
|
+
|
|
25
|
+
### AI Agent Adapters (4)
|
|
26
|
+
|
|
27
|
+
- **Ollama** - Local LLM integration
|
|
28
|
+
- **Claude Code** - Anthropic Claude integration
|
|
29
|
+
- **OpenCode** - OpenCode AI integration
|
|
30
|
+
- **GitHub Copilot** - GitHub Copilot CLI integration
|
|
31
|
+
- **GitHub Copilot** - GitHub Copilot CLI integration
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @marktoflow/integrations
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This package depends on `@marktoflow/core` which will be installed automatically.
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### Using in Workflows
|
|
44
|
+
|
|
45
|
+
Integrations are designed to work seamlessly in workflow YAML definitions:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
workflow:
|
|
49
|
+
id: slack-notification
|
|
50
|
+
name: Send Slack Notification
|
|
51
|
+
|
|
52
|
+
tools:
|
|
53
|
+
slack:
|
|
54
|
+
sdk: '@slack/web-api'
|
|
55
|
+
auth:
|
|
56
|
+
token: '${SLACK_BOT_TOKEN}'
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
- action: slack.chat.postMessage
|
|
60
|
+
inputs:
|
|
61
|
+
channel: '#general'
|
|
62
|
+
text: 'Hello from marktoflow!'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Programmatic Usage
|
|
66
|
+
|
|
67
|
+
You can also use integrations directly in TypeScript:
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { SlackInitializer } from '@marktoflow/integrations';
|
|
71
|
+
import { SDKRegistry } from '@marktoflow/core';
|
|
72
|
+
|
|
73
|
+
// Register Slack integration
|
|
74
|
+
const registry = new SDKRegistry();
|
|
75
|
+
await registry.registerSDK(SlackInitializer);
|
|
76
|
+
|
|
77
|
+
// Load and use SDK
|
|
78
|
+
const slack = await registry.loadSDK('slack', {
|
|
79
|
+
auth: { token: process.env.SLACK_BOT_TOKEN },
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Execute action
|
|
83
|
+
const result = await registry.executeAction('slack', 'chat.postMessage', slack, {
|
|
84
|
+
channel: '#general',
|
|
85
|
+
text: 'Hello World!',
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Available Integrations
|
|
90
|
+
|
|
91
|
+
### Slack
|
|
92
|
+
|
|
93
|
+
Send messages, manage channels, handle events.
|
|
94
|
+
|
|
95
|
+
**Setup**:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Set environment variable
|
|
99
|
+
export SLACK_BOT_TOKEN=xoxb-your-token
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Actions**:
|
|
103
|
+
|
|
104
|
+
- `chat.postMessage` - Send a message
|
|
105
|
+
- `conversations.list` - List channels
|
|
106
|
+
- `conversations.create` - Create channel
|
|
107
|
+
- `users.list` - List workspace users
|
|
108
|
+
|
|
109
|
+
**Example**:
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
action: slack.chat.postMessage
|
|
113
|
+
inputs:
|
|
114
|
+
channel: '#general'
|
|
115
|
+
text: 'Deployment complete!'
|
|
116
|
+
blocks:
|
|
117
|
+
- type: section
|
|
118
|
+
text:
|
|
119
|
+
type: mrkdwn
|
|
120
|
+
text: '*Status:* ✅ Success'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### GitHub
|
|
124
|
+
|
|
125
|
+
Manage repositories, PRs, issues, and more.
|
|
126
|
+
|
|
127
|
+
**Setup**:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
export GITHUB_TOKEN=ghp_your-token
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Actions**:
|
|
134
|
+
|
|
135
|
+
- `repos.get` - Get repository info
|
|
136
|
+
- `pulls.create` - Create pull request
|
|
137
|
+
- `issues.create` - Create issue
|
|
138
|
+
- `issues.createComment` - Comment on issue
|
|
139
|
+
|
|
140
|
+
**Example**:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
action: github.pulls.create
|
|
144
|
+
inputs:
|
|
145
|
+
owner: scottgl9
|
|
146
|
+
repo: marktoflow
|
|
147
|
+
title: 'Add new feature'
|
|
148
|
+
head: feature-branch
|
|
149
|
+
base: main
|
|
150
|
+
body: 'This PR adds...'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Jira
|
|
154
|
+
|
|
155
|
+
Issue tracking and project management.
|
|
156
|
+
|
|
157
|
+
**Setup**:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
export JIRA_HOST=your-domain.atlassian.net
|
|
161
|
+
export JIRA_EMAIL=your@email.com
|
|
162
|
+
export JIRA_API_TOKEN=your-token
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Actions**:
|
|
166
|
+
|
|
167
|
+
- `issues.createIssue` - Create issue
|
|
168
|
+
- `issues.updateIssue` - Update issue
|
|
169
|
+
- `issues.searchIssues` - Search issues
|
|
170
|
+
- `issues.getIssue` - Get issue details
|
|
171
|
+
|
|
172
|
+
**Example**:
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
action: jira.issues.createIssue
|
|
176
|
+
inputs:
|
|
177
|
+
fields:
|
|
178
|
+
project:
|
|
179
|
+
key: PROJ
|
|
180
|
+
summary: 'Bug: Login fails'
|
|
181
|
+
description: 'Users cannot log in'
|
|
182
|
+
issuetype:
|
|
183
|
+
name: Bug
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Gmail
|
|
187
|
+
|
|
188
|
+
Email operations with webhook support.
|
|
189
|
+
|
|
190
|
+
**Setup**:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
export GMAIL_CLIENT_ID=your-client-id
|
|
194
|
+
export GMAIL_CLIENT_SECRET=your-secret
|
|
195
|
+
export GMAIL_REFRESH_TOKEN=your-refresh-token
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Actions**:
|
|
199
|
+
|
|
200
|
+
- `users.messages.send` - Send email
|
|
201
|
+
- `users.messages.list` - List messages
|
|
202
|
+
- `users.labels.list` - List labels
|
|
203
|
+
- `users.messages.get` - Get message details
|
|
204
|
+
|
|
205
|
+
**Example**:
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
action: gmail.users.messages.send
|
|
209
|
+
inputs:
|
|
210
|
+
to: user@example.com
|
|
211
|
+
subject: 'Daily Report'
|
|
212
|
+
body: 'Here is your daily report...'
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Outlook
|
|
216
|
+
|
|
217
|
+
Microsoft 365 email and calendar.
|
|
218
|
+
|
|
219
|
+
**Setup**:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
export OUTLOOK_CLIENT_ID=your-client-id
|
|
223
|
+
export OUTLOOK_CLIENT_SECRET=your-secret
|
|
224
|
+
export OUTLOOK_TENANT_ID=your-tenant-id
|
|
225
|
+
export OUTLOOK_REFRESH_TOKEN=your-refresh-token
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Actions**:
|
|
229
|
+
|
|
230
|
+
- `sendMail` - Send email
|
|
231
|
+
- `listMessages` - List inbox messages
|
|
232
|
+
- `listCalendarEvents` - List calendar events
|
|
233
|
+
- `createCalendarEvent` - Create calendar event
|
|
234
|
+
|
|
235
|
+
**Example**:
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
action: outlook.sendMail
|
|
239
|
+
inputs:
|
|
240
|
+
to: [user@example.com]
|
|
241
|
+
subject: 'Meeting Reminder'
|
|
242
|
+
body: 'Don't forget our meeting at 2pm'
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Linear
|
|
246
|
+
|
|
247
|
+
Modern issue tracking.
|
|
248
|
+
|
|
249
|
+
**Setup**:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
export LINEAR_API_KEY=your-api-key
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Actions**:
|
|
256
|
+
|
|
257
|
+
- `createIssue` - Create issue
|
|
258
|
+
- `updateIssue` - Update issue
|
|
259
|
+
- `listIssues` - List issues
|
|
260
|
+
|
|
261
|
+
### Notion
|
|
262
|
+
|
|
263
|
+
Database and page management.
|
|
264
|
+
|
|
265
|
+
**Setup**:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
export NOTION_TOKEN=secret_your-token
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Actions**:
|
|
272
|
+
|
|
273
|
+
- `databases.query` - Query database
|
|
274
|
+
- `pages.create` - Create page
|
|
275
|
+
- `blocks.children.append` - Add content blocks
|
|
276
|
+
|
|
277
|
+
### Discord
|
|
278
|
+
|
|
279
|
+
Bot interactions and messaging.
|
|
280
|
+
|
|
281
|
+
**Setup**:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
export DISCORD_BOT_TOKEN=your-bot-token
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Actions**:
|
|
288
|
+
|
|
289
|
+
- `sendMessage` - Send message to channel
|
|
290
|
+
- `editMessage` - Edit message
|
|
291
|
+
- `deleteMessage` - Delete message
|
|
292
|
+
|
|
293
|
+
### Airtable
|
|
294
|
+
|
|
295
|
+
Spreadsheet database operations.
|
|
296
|
+
|
|
297
|
+
**Setup**:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
export AIRTABLE_API_KEY=your-api-key
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Actions**:
|
|
304
|
+
|
|
305
|
+
- `select` - Query records
|
|
306
|
+
- `create` - Create records
|
|
307
|
+
- `update` - Update records
|
|
308
|
+
- `delete` - Delete records
|
|
309
|
+
|
|
310
|
+
### Confluence
|
|
311
|
+
|
|
312
|
+
Wiki page management.
|
|
313
|
+
|
|
314
|
+
**Setup**:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
export CONFLUENCE_HOST=your-domain.atlassian.net
|
|
318
|
+
export CONFLUENCE_EMAIL=your@email.com
|
|
319
|
+
export CONFLUENCE_API_TOKEN=your-token
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Actions**:
|
|
323
|
+
|
|
324
|
+
- `getPage` - Get page content
|
|
325
|
+
- `createPage` - Create page
|
|
326
|
+
- `updatePage` - Update page
|
|
327
|
+
- `deletePage` - Delete page
|
|
328
|
+
|
|
329
|
+
### HTTP
|
|
330
|
+
|
|
331
|
+
Generic HTTP requests with authentication.
|
|
332
|
+
|
|
333
|
+
**Actions**:
|
|
334
|
+
|
|
335
|
+
- `request` - Make HTTP request
|
|
336
|
+
|
|
337
|
+
**Example**:
|
|
338
|
+
|
|
339
|
+
```yaml
|
|
340
|
+
action: http.request
|
|
341
|
+
inputs:
|
|
342
|
+
method: POST
|
|
343
|
+
url: https://api.example.com/endpoint
|
|
344
|
+
headers:
|
|
345
|
+
Authorization: 'Bearer ${API_TOKEN}'
|
|
346
|
+
body:
|
|
347
|
+
key: value
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## AI Agent Adapters
|
|
351
|
+
|
|
352
|
+
### Ollama
|
|
353
|
+
|
|
354
|
+
Run local LLMs via Ollama.
|
|
355
|
+
|
|
356
|
+
**Setup**:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
export OLLAMA_BASE_URL=http://localhost:11434
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Example**:
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
tools:
|
|
366
|
+
ollama:
|
|
367
|
+
adapter: ollama
|
|
368
|
+
|
|
369
|
+
steps:
|
|
370
|
+
- action: ollama.generate
|
|
371
|
+
inputs:
|
|
372
|
+
model: llama2
|
|
373
|
+
prompt: 'Explain quantum computing'
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Claude Code
|
|
377
|
+
|
|
378
|
+
Anthropic Claude integration.
|
|
379
|
+
|
|
380
|
+
**Setup**:
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
export ANTHROPIC_API_KEY=sk-ant-your-key
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### OpenCode
|
|
387
|
+
|
|
388
|
+
OpenCode AI integration.
|
|
389
|
+
|
|
390
|
+
**Setup**:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
export OPENCODE_API_KEY=your-key
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### GitHub Copilot
|
|
397
|
+
|
|
398
|
+
GitHub Copilot CLI integration with advanced agentic capabilities.
|
|
399
|
+
|
|
400
|
+
**Requirements**:
|
|
401
|
+
|
|
402
|
+
- GitHub Copilot subscription (Individual, Business, or Enterprise)
|
|
403
|
+
- Copilot CLI installed: [Installation Guide](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)
|
|
404
|
+
|
|
405
|
+
**Installation**:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
# Install Copilot CLI
|
|
409
|
+
npm install -g @githubnext/github-copilot-cli
|
|
410
|
+
|
|
411
|
+
# Verify installation
|
|
412
|
+
copilot --version
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Authentication**:
|
|
416
|
+
|
|
417
|
+
The GitHub Copilot adapter uses **OAuth authentication** managed by the Copilot CLI, not API keys. Authentication is a one-time setup:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
# Authenticate with GitHub via OAuth
|
|
421
|
+
copilot auth login
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
This command will:
|
|
425
|
+
|
|
426
|
+
1. Open your browser to GitHub's OAuth consent page
|
|
427
|
+
2. Prompt you to authorize GitHub Copilot CLI
|
|
428
|
+
3. Save the OAuth token locally in `~/.copilot/`
|
|
429
|
+
|
|
430
|
+
**No API keys are required** - the adapter automatically uses the CLI's stored OAuth token. Your GitHub Copilot subscription determines your access level.
|
|
431
|
+
|
|
432
|
+
**Verify Authentication**:
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
# Test CLI connectivity
|
|
436
|
+
copilot --version
|
|
437
|
+
copilot ping
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**Basic Usage**:
|
|
441
|
+
|
|
442
|
+
```yaml
|
|
443
|
+
tools:
|
|
444
|
+
copilot:
|
|
445
|
+
adapter: github-copilot
|
|
446
|
+
config:
|
|
447
|
+
model: gpt-4.1 # Optional, defaults to gpt-4.1
|
|
448
|
+
|
|
449
|
+
steps:
|
|
450
|
+
- action: copilot.send
|
|
451
|
+
inputs:
|
|
452
|
+
prompt: 'Explain TypeScript generics'
|
|
453
|
+
output_variable: explanation
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Streaming Responses**:
|
|
457
|
+
|
|
458
|
+
```yaml
|
|
459
|
+
steps:
|
|
460
|
+
- action: copilot.stream
|
|
461
|
+
inputs:
|
|
462
|
+
prompt: 'Write a function to calculate fibonacci'
|
|
463
|
+
onChunk: '${print_chunk}' # Callback for each chunk
|
|
464
|
+
output_variable: code
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**With File Attachments**:
|
|
468
|
+
|
|
469
|
+
```yaml
|
|
470
|
+
steps:
|
|
471
|
+
- action: copilot.send
|
|
472
|
+
inputs:
|
|
473
|
+
prompt: 'Review this code for security issues'
|
|
474
|
+
attachments:
|
|
475
|
+
- type: file
|
|
476
|
+
path: ./src/app.ts
|
|
477
|
+
displayName: app.ts
|
|
478
|
+
output_variable: review
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
**System Message Customization**:
|
|
482
|
+
|
|
483
|
+
```yaml
|
|
484
|
+
steps:
|
|
485
|
+
- action: copilot.send
|
|
486
|
+
inputs:
|
|
487
|
+
prompt: 'Help me optimize this function'
|
|
488
|
+
systemMessage: |
|
|
489
|
+
You are a performance optimization expert.
|
|
490
|
+
Focus on time and space complexity.
|
|
491
|
+
output_variable: suggestions
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**External CLI Server**:
|
|
495
|
+
|
|
496
|
+
For development or shared CLI instances:
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
# Terminal 1: Start CLI in server mode
|
|
500
|
+
copilot --server --port 4321
|
|
501
|
+
|
|
502
|
+
# Terminal 2: Use in workflow
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
```yaml
|
|
506
|
+
tools:
|
|
507
|
+
copilot:
|
|
508
|
+
adapter: github-copilot
|
|
509
|
+
auth:
|
|
510
|
+
cli_url: localhost:4321 # Connect to external server
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**Configuration Options**:
|
|
514
|
+
|
|
515
|
+
- `model`: Model to use (gpt-4.1, gpt-5, claude-sonnet-4.5, etc.)
|
|
516
|
+
- `cli_path`: Custom path to CLI binary (default: 'copilot')
|
|
517
|
+
- `cli_url`: External CLI server URL (mutually exclusive with cli_path)
|
|
518
|
+
- `autoStart`: Auto-start CLI (default: true)
|
|
519
|
+
- `logLevel`: Log verbosity (info, debug, error, warning, none, all)
|
|
520
|
+
|
|
521
|
+
**Troubleshooting Authentication**:
|
|
522
|
+
|
|
523
|
+
If you encounter authentication issues:
|
|
524
|
+
|
|
525
|
+
```bash
|
|
526
|
+
# Check if authenticated
|
|
527
|
+
copilot ping
|
|
528
|
+
|
|
529
|
+
# Re-authenticate if needed
|
|
530
|
+
copilot auth logout
|
|
531
|
+
copilot auth login
|
|
532
|
+
|
|
533
|
+
# Verify subscription status at https://github.com/settings/copilot
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Note**: The adapter does **not** require or use API keys. All authentication is handled through the CLI's OAuth flow.
|
|
537
|
+
|
|
538
|
+
**Advanced Features** (See [COPILOT_SDK_ANALYSIS.md](../../docs/COPILOT_SDK_ANALYSIS.md)):
|
|
539
|
+
|
|
540
|
+
- Custom tool definitions
|
|
541
|
+
- MCP server integration
|
|
542
|
+
- Session persistence
|
|
543
|
+
- Infinite sessions (automatic context compaction)
|
|
544
|
+
- Multi-turn conversations
|
|
545
|
+
|
|
546
|
+
## Advanced Usage
|
|
547
|
+
|
|
548
|
+
### Custom Integration
|
|
549
|
+
|
|
550
|
+
Create your own integration:
|
|
551
|
+
|
|
552
|
+
```typescript
|
|
553
|
+
import type { SDKInitializer } from '@marktoflow/core';
|
|
554
|
+
|
|
555
|
+
export const MyServiceInitializer: SDKInitializer = {
|
|
556
|
+
name: 'myservice',
|
|
557
|
+
async initialize(config) {
|
|
558
|
+
return new MyServiceClient(config.auth.apiKey);
|
|
559
|
+
},
|
|
560
|
+
actions: {
|
|
561
|
+
doSomething: async (sdk, inputs) => {
|
|
562
|
+
return sdk.doSomething(inputs);
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
};
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Error Handling
|
|
569
|
+
|
|
570
|
+
All integrations support automatic retry and error handling:
|
|
571
|
+
|
|
572
|
+
```yaml
|
|
573
|
+
steps:
|
|
574
|
+
- action: slack.chat.postMessage
|
|
575
|
+
inputs:
|
|
576
|
+
channel: '#general'
|
|
577
|
+
text: 'Message'
|
|
578
|
+
retry:
|
|
579
|
+
max_attempts: 3
|
|
580
|
+
backoff: exponential
|
|
581
|
+
initial_delay: 1000
|
|
582
|
+
on_error: continue # or 'fail', 'retry'
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
## OAuth Setup Guides
|
|
586
|
+
|
|
587
|
+
For Gmail and Outlook, use the CLI to set up OAuth:
|
|
588
|
+
|
|
589
|
+
```bash
|
|
590
|
+
# Gmail OAuth
|
|
591
|
+
npx @marktoflow/cli@alpha connect gmail
|
|
592
|
+
|
|
593
|
+
# Outlook OAuth
|
|
594
|
+
npx @marktoflow/cli@alpha connect outlook
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
## Testing
|
|
598
|
+
|
|
599
|
+
```bash
|
|
600
|
+
npm test
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
## Links
|
|
604
|
+
|
|
605
|
+
- [Main Repository](https://github.com/scottgl9/marktoflow)
|
|
606
|
+
- [Documentation](https://github.com/scottgl9/marktoflow#readme)
|
|
607
|
+
- [Core Package](@marktoflow/core)
|
|
608
|
+
- [CLI Package](@marktoflow/cli)
|
|
609
|
+
|
|
610
|
+
## License
|
|
611
|
+
|
|
612
|
+
Apache-2.0
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
2
|
+
type LogLevel = 'info' | 'none' | 'error' | 'warning' | 'debug' | 'all';
|
|
3
|
+
/**
|
|
4
|
+
* GitHub Copilot adapter client that wraps CopilotClient
|
|
5
|
+
* and provides a simplified interface for marktoflow workflows.
|
|
6
|
+
*/
|
|
7
|
+
export declare class GitHubCopilotClient {
|
|
8
|
+
private client;
|
|
9
|
+
private defaultModel;
|
|
10
|
+
constructor(options?: {
|
|
11
|
+
cliPath?: string;
|
|
12
|
+
model?: string;
|
|
13
|
+
cliUrl?: string;
|
|
14
|
+
autoStart?: boolean;
|
|
15
|
+
logLevel?: LogLevel;
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Send a message to Copilot and wait for the complete response.
|
|
19
|
+
*/
|
|
20
|
+
send(inputs: {
|
|
21
|
+
prompt: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
attachments?: Array<{
|
|
24
|
+
type: 'file' | 'directory';
|
|
25
|
+
path: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
}>;
|
|
28
|
+
systemMessage?: string;
|
|
29
|
+
}): Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Send a message to Copilot and stream the response.
|
|
32
|
+
* Returns the full response after streaming completes.
|
|
33
|
+
*/
|
|
34
|
+
stream(inputs: {
|
|
35
|
+
prompt: string;
|
|
36
|
+
model?: string;
|
|
37
|
+
attachments?: Array<{
|
|
38
|
+
type: 'file' | 'directory';
|
|
39
|
+
path: string;
|
|
40
|
+
displayName?: string;
|
|
41
|
+
}>;
|
|
42
|
+
systemMessage?: string;
|
|
43
|
+
onChunk?: (chunk: string) => void;
|
|
44
|
+
onComplete?: (fullResponse: string) => void;
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Create a persistent session for multi-turn conversations.
|
|
48
|
+
* Caller is responsible for managing session lifecycle.
|
|
49
|
+
*/
|
|
50
|
+
createSession(options?: {
|
|
51
|
+
model?: string;
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
systemMessage?: string;
|
|
54
|
+
}): Promise<import("@github/copilot-sdk").CopilotSession>;
|
|
55
|
+
/**
|
|
56
|
+
* Stop the Copilot CLI client.
|
|
57
|
+
*/
|
|
58
|
+
stop(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Ping the Copilot CLI to check connectivity.
|
|
61
|
+
*/
|
|
62
|
+
ping(): Promise<{
|
|
63
|
+
message: string;
|
|
64
|
+
timestamp: number;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Check if the Copilot CLI is authenticated and ready.
|
|
68
|
+
* Returns true if ping succeeds, false otherwise.
|
|
69
|
+
*/
|
|
70
|
+
checkAuth(): Promise<boolean>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* SDK Initializer for GitHub Copilot.
|
|
74
|
+
* Supports both authentication via CLI path and external CLI server URL.
|
|
75
|
+
*/
|
|
76
|
+
export declare const GitHubCopilotInitializer: SDKInitializer;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=github-copilot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot.d.ts","sourceRoot":"","sources":["../../src/adapters/github-copilot.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;AAExE;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,YAAY,CAAS;gBAG3B,OAAO,GAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EA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;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAI7D;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAQpC;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAatC,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { CopilotClient } from '@github/copilot-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* GitHub Copilot adapter client that wraps CopilotClient
|
|
4
|
+
* and provides a simplified interface for marktoflow workflows.
|
|
5
|
+
*/
|
|
6
|
+
export class GitHubCopilotClient {
|
|
7
|
+
client;
|
|
8
|
+
defaultModel;
|
|
9
|
+
constructor(options = {}) {
|
|
10
|
+
// cliUrl and cliPath are mutually exclusive
|
|
11
|
+
const clientConfig = {
|
|
12
|
+
autoStart: options.autoStart ?? true,
|
|
13
|
+
logLevel: options.logLevel || 'info',
|
|
14
|
+
};
|
|
15
|
+
if (options.cliUrl) {
|
|
16
|
+
// When connecting to external server, don't set cliPath
|
|
17
|
+
clientConfig.cliUrl = options.cliUrl;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
// When spawning CLI, set cliPath
|
|
21
|
+
clientConfig.cliPath = options.cliPath || 'copilot';
|
|
22
|
+
}
|
|
23
|
+
this.client = new CopilotClient(clientConfig);
|
|
24
|
+
this.defaultModel = options.model || 'gpt-4.1';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Send a message to Copilot and wait for the complete response.
|
|
28
|
+
*/
|
|
29
|
+
async send(inputs) {
|
|
30
|
+
const session = await this.client.createSession({
|
|
31
|
+
model: inputs.model || this.defaultModel,
|
|
32
|
+
systemMessage: inputs.systemMessage
|
|
33
|
+
? {
|
|
34
|
+
content: inputs.systemMessage,
|
|
35
|
+
}
|
|
36
|
+
: undefined,
|
|
37
|
+
});
|
|
38
|
+
try {
|
|
39
|
+
const response = await session.sendAndWait({
|
|
40
|
+
prompt: inputs.prompt,
|
|
41
|
+
attachments: inputs.attachments,
|
|
42
|
+
});
|
|
43
|
+
return response?.data.content || '';
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
await session.destroy();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Send a message to Copilot and stream the response.
|
|
51
|
+
* Returns the full response after streaming completes.
|
|
52
|
+
*/
|
|
53
|
+
async stream(inputs) {
|
|
54
|
+
const session = await this.client.createSession({
|
|
55
|
+
model: inputs.model || this.defaultModel,
|
|
56
|
+
streaming: true,
|
|
57
|
+
systemMessage: inputs.systemMessage
|
|
58
|
+
? {
|
|
59
|
+
content: inputs.systemMessage,
|
|
60
|
+
}
|
|
61
|
+
: undefined,
|
|
62
|
+
});
|
|
63
|
+
let fullResponse = '';
|
|
64
|
+
return new Promise((resolve, reject) => {
|
|
65
|
+
session.on((event) => {
|
|
66
|
+
if (event.type === 'assistant.message_delta') {
|
|
67
|
+
const chunk = event.data.deltaContent;
|
|
68
|
+
fullResponse += chunk;
|
|
69
|
+
if (inputs.onChunk) {
|
|
70
|
+
inputs.onChunk(chunk);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (event.type === 'assistant.message') {
|
|
74
|
+
// Final message received
|
|
75
|
+
fullResponse = event.data.content || fullResponse;
|
|
76
|
+
}
|
|
77
|
+
else if (event.type === 'session.idle') {
|
|
78
|
+
// Session finished processing
|
|
79
|
+
if (inputs.onComplete) {
|
|
80
|
+
inputs.onComplete(fullResponse);
|
|
81
|
+
}
|
|
82
|
+
session
|
|
83
|
+
.destroy()
|
|
84
|
+
.then(() => resolve(fullResponse))
|
|
85
|
+
.catch(reject);
|
|
86
|
+
}
|
|
87
|
+
else if (event.type === 'session.error') {
|
|
88
|
+
reject(new Error(event.data.message || 'Session error occurred'));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// Send the message
|
|
92
|
+
session
|
|
93
|
+
.send({
|
|
94
|
+
prompt: inputs.prompt,
|
|
95
|
+
attachments: inputs.attachments,
|
|
96
|
+
})
|
|
97
|
+
.catch(reject);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Create a persistent session for multi-turn conversations.
|
|
102
|
+
* Caller is responsible for managing session lifecycle.
|
|
103
|
+
*/
|
|
104
|
+
async createSession(options = {}) {
|
|
105
|
+
return this.client.createSession({
|
|
106
|
+
model: options.model || this.defaultModel,
|
|
107
|
+
sessionId: options.sessionId,
|
|
108
|
+
systemMessage: options.systemMessage
|
|
109
|
+
? {
|
|
110
|
+
content: options.systemMessage,
|
|
111
|
+
}
|
|
112
|
+
: undefined,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Stop the Copilot CLI client.
|
|
117
|
+
*/
|
|
118
|
+
async stop() {
|
|
119
|
+
const errors = await this.client.stop();
|
|
120
|
+
if (errors.length > 0) {
|
|
121
|
+
throw new Error(`Errors during stop: ${errors.map((e) => e.message).join(', ')}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Ping the Copilot CLI to check connectivity.
|
|
126
|
+
*/
|
|
127
|
+
async ping() {
|
|
128
|
+
return this.client.ping();
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Check if the Copilot CLI is authenticated and ready.
|
|
132
|
+
* Returns true if ping succeeds, false otherwise.
|
|
133
|
+
*/
|
|
134
|
+
async checkAuth() {
|
|
135
|
+
try {
|
|
136
|
+
await this.ping();
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* SDK Initializer for GitHub Copilot.
|
|
146
|
+
* Supports both authentication via CLI path and external CLI server URL.
|
|
147
|
+
*/
|
|
148
|
+
export const GitHubCopilotInitializer = {
|
|
149
|
+
async initialize(_module, config) {
|
|
150
|
+
const options = config.options || {};
|
|
151
|
+
const auth = config.auth || {};
|
|
152
|
+
return new GitHubCopilotClient({
|
|
153
|
+
cliPath: auth['cli_path'] || options['cliPath'],
|
|
154
|
+
cliUrl: auth['cli_url'] || options['cliUrl'],
|
|
155
|
+
model: options['model'] || 'gpt-4.1',
|
|
156
|
+
autoStart: options['autoStart'] ?? true,
|
|
157
|
+
logLevel: options['logLevel'] || 'info',
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=github-copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot.js","sourceRoot":"","sources":["../../src/adapters/github-copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAKlE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IACtB,MAAM,CAAgB;IACtB,YAAY,CAAS;IAE7B,YACE,UAMI,EAAE;QAEN,4CAA4C;QAC5C,MAAM,YAAY,GAKd;YACF,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;YACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,MAAM;SACrC,CAAC;QAEF,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,wDAAwD;YACxD,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,iCAAiC;YACjC,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;QACtD,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,IAAI,SAAS,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,MASV;QACC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAC9C,KAAK,EAA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,UAAU,CAAc,IAAI,MAAM;SACtD,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,5 +17,6 @@ export { SlackSocketTrigger } from './services/slack-socket.js';
|
|
|
17
17
|
export * from './adapters/ollama.js';
|
|
18
18
|
export * from './adapters/claude-code.js';
|
|
19
19
|
export * from './adapters/opencode.js';
|
|
20
|
+
export * from './adapters/github-copilot.js';
|
|
20
21
|
export * from './tools/script.js';
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwB/C,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,QAkCzD;AAGD,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,KAAK,gBAAgB,IAAI,qBAAqB,EAC9C,KAAK,eAAe,IAAI,oBAAoB,EAC5C,KAAK,gBAAgB,IAAI,qBAAqB,EAC9C,KAAK,kBAAkB,IAAI,uBAAuB,GACnD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,KAAK,gBAAgB,IAAI,uBAAuB,EAChD,KAAK,eAAe,IAAI,sBAAsB,EAC9C,KAAK,gBAAgB,IAAI,uBAAuB,EAChD,KAAK,kBAAkB,IAAI,yBAAyB,GACrD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,WAAW,EACX,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,KAAK,oBAAoB,EACzB,KAAK,aAAa,IAAI,mBAAmB,GAC1C,MAAM,sBAAsB,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAG7C,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { HttpInitializer } from './services/http.js';
|
|
|
14
14
|
import { OllamaInitializer } from './adapters/ollama.js';
|
|
15
15
|
import { ClaudeCodeInitializer } from './adapters/claude-code.js';
|
|
16
16
|
import { OpenCodeInitializer } from './adapters/opencode.js';
|
|
17
|
+
import { GitHubCopilotInitializer } from './adapters/github-copilot.js';
|
|
17
18
|
// Tools
|
|
18
19
|
import { ScriptInitializer } from './tools/script.js';
|
|
19
20
|
export function registerIntegrations(registry) {
|
|
@@ -39,6 +40,7 @@ export function registerIntegrations(registry) {
|
|
|
39
40
|
registry.registerInitializer('ollama', OllamaInitializer);
|
|
40
41
|
registry.registerInitializer('claude-code', ClaudeCodeInitializer);
|
|
41
42
|
registry.registerInitializer('opencode', OpenCodeInitializer);
|
|
43
|
+
registry.registerInitializer('github-copilot', GitHubCopilotInitializer);
|
|
42
44
|
// Tools
|
|
43
45
|
registry.registerInitializer('script', ScriptInitializer);
|
|
44
46
|
}
|
|
@@ -62,6 +64,7 @@ export { SlackSocketTrigger } from './services/slack-socket.js';
|
|
|
62
64
|
export * from './adapters/ollama.js';
|
|
63
65
|
export * from './adapters/claude-code.js';
|
|
64
66
|
export * from './adapters/opencode.js';
|
|
67
|
+
export * from './adapters/github-copilot.js';
|
|
65
68
|
// Export tools
|
|
66
69
|
export * from './tools/script.js';
|
|
67
70
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,WAAW;AACX,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,cAAc;AACd,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;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M,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EACd,kBAAkB,GAOnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EAKd,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,iBAAiB,GAOlB,MAAM,sBAAsB,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AAEnC,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAqB;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAE7C,eAAe;AACf,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktoflow/integrations",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"description": "Standard integrations for marktoflow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"clean": "rm -rf dist"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
30
|
+
"@github/copilot-sdk": "^0.1.18",
|
|
31
|
+
"@marktoflow/core": "workspace:*",
|
|
31
32
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
32
33
|
"@octokit/rest": "^22.0.1",
|
|
33
34
|
"@opencode-ai/sdk": "^1.1.34",
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
"typescript": "^5.0.0"
|
|
42
43
|
},
|
|
43
44
|
"files": [
|
|
44
|
-
"dist"
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md"
|
|
45
47
|
],
|
|
46
48
|
"keywords": [
|
|
47
49
|
"marktoflow",
|