@marktoflow/marktoflow 2.0.0-alpha.13

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.
Files changed (2) hide show
  1. package/README.md +462 -0
  2. package/package.json +43 -0
package/README.md ADDED
@@ -0,0 +1,462 @@
1
+ # marktoflow - Agent Automation Framework
2
+
3
+ **Write once, run anywhere.**
4
+
5
+ > A powerful CLI-first automation framework for developers and teams. Define workflows in Markdown + YAML, execute across 30+ services, and leverage AI agents you already pay for.
6
+
7
+ ## Why marktoflow?
8
+
9
+ ### 🖥️ CLI-First Design
10
+ Write workflows as code in your favorite editor. No GUI required. Version control with Git. Deploy with CI/CD.
11
+
12
+ ### 📝 Workflows as Markdown
13
+ Human-readable, portable workflow files. Not proprietary JSON or locked-in platforms. Just Markdown + YAML.
14
+
15
+ ### 🔌 Native SDK Integration
16
+ Direct method calls to official SDKs. Full TypeScript type safety. No wrapper APIs. No learning curve if you already know the SDK.
17
+
18
+ ### 🤖 AI Agents Without Extra Cost
19
+ Use your **existing** GitHub Copilot, Claude Code, or OpenAI Codex subscriptions. No separate API keys. No duplicate charges.
20
+
21
+ ### 🌐 Universal REST Client
22
+ Connect to **any REST API** without custom integrations. Bearer auth, Basic auth, API keys, GraphQL - all built-in.
23
+
24
+ ### 🎨 Optional Visual Designer
25
+ Prefer visual editing? Launch the web UI with `marktoflow gui`. Drag-and-drop workflows. AI assistance. Live execution.
26
+
27
+ ### 🏢 Enterprise Ready
28
+ RBAC, approval workflows, audit logging, cost tracking, distributed execution, retry logic, circuit breakers.
29
+
30
+ ## What's Included
31
+
32
+ This complete installation package includes all marktoflow components:
33
+
34
+ - **@marktoflow/cli** - Command-line interface and workflow runner
35
+ - **@marktoflow/core** - Core engine (parser, executor, state management)
36
+ - **@marktoflow/gui** - Visual workflow designer (web UI)
37
+ - **@marktoflow/integrations** - 30+ service integrations and AI adapters
38
+
39
+ ## Quick Start
40
+
41
+ ### Installation
42
+
43
+ Install globally:
44
+
45
+ ```bash
46
+ npm install -g @marktoflow/marktoflow
47
+ ```
48
+
49
+ Verify installation:
50
+
51
+ ```bash
52
+ marktoflow version
53
+ marktoflow gui --help
54
+ ```
55
+
56
+ Or use with npx (no installation):
57
+
58
+ ```bash
59
+ npx @marktoflow/marktoflow --help
60
+ ```
61
+
62
+ ### Initialize a Project
63
+
64
+ ```bash
65
+ marktoflow init
66
+ ```
67
+
68
+ ### Create Your First Workflow
69
+
70
+ Create `.marktoflow/workflows/hello-world.md`:
71
+
72
+ ```markdown
73
+ ---
74
+ workflow:
75
+ id: hello-world
76
+ name: 'Hello World'
77
+
78
+ tools:
79
+ slack:
80
+ sdk: '@slack/web-api'
81
+ auth:
82
+ token: '${SLACK_BOT_TOKEN}'
83
+
84
+ steps:
85
+ - id: send
86
+ action: slack.chat.postMessage
87
+ inputs:
88
+ channel: '#general'
89
+ text: 'Hello from marktoflow!'
90
+ ---
91
+
92
+ # Hello World
93
+
94
+ This workflow sends a message to Slack using the official SDK.
95
+ ```
96
+
97
+ ### Run the Workflow
98
+
99
+ ```bash
100
+ # Run the workflow from the command line
101
+ marktoflow run hello-world.md
102
+
103
+ # With custom inputs
104
+ marktoflow run hello-world.md --input message="Custom message"
105
+
106
+ # Override AI agent at runtime
107
+ marktoflow run hello-world.md --agent copilot
108
+
109
+ # Override model name at runtime
110
+ marktoflow run hello-world.md --model claude-sonnet-4
111
+
112
+ # Verbose output
113
+ marktoflow run hello-world.md --verbose
114
+ ```
115
+
116
+ **That's it!** marktoflow is CLI-first - create workflows as markdown files and run them from your terminal.
117
+
118
+ ### Start Visual Designer (Optional)
119
+
120
+ ```bash
121
+ marktoflow gui
122
+ ```
123
+
124
+ Features:
125
+ - **Drag-and-Drop Editor** - Visual node-based workflow canvas
126
+ - **AI Assistance** - Natural language commands to modify workflows
127
+ - **Real-time Execution** - Run and debug workflows with live status
128
+ - **Live File Sync** - Changes sync automatically with workflow files
129
+
130
+ ## Core Features
131
+
132
+ ### 🚀 Powerful Workflow Engine
133
+
134
+ **Control Flow**
135
+ - ✅ If/Else conditionals
136
+ - ✅ Switch/Case branching
137
+ - ✅ For-each loops with break/continue
138
+ - ✅ While loops with conditions
139
+ - ✅ Parallel execution with throttling
140
+ - ✅ Map/Filter/Reduce operations
141
+ - ✅ Try/Catch error handling
142
+
143
+ **Template System**
144
+ - ✅ Jinja2-compatible pipeline syntax: `{{ value | split('/') | first }}`
145
+ - ✅ 50+ custom helpers (date, math, string, regex)
146
+ - ✅ Regex filters with capture groups
147
+ - ✅ Dynamic variable substitution
148
+ - ✅ Nested template expressions
149
+
150
+ **Workflow Composition**
151
+ - ✅ Sub-workflows with unlimited nesting
152
+ - ✅ Reusable workflow libraries
153
+ - ✅ Input/output parameter passing
154
+ - ✅ Shared state management
155
+ - ✅ Cross-workflow data flow
156
+
157
+ **Script Execution**
158
+ - ✅ Inline bash commands
159
+ - ✅ Python scripts
160
+ - ✅ Node.js scripts
161
+ - ✅ Custom script interpreters
162
+ - ✅ Environment variable injection
163
+
164
+ ### 🔗 Integration Ecosystem
165
+
166
+ **30+ Native SDK Integrations**
167
+
168
+ All integrations use official SDKs with full TypeScript type safety:
169
+
170
+ **Communication** (7 integrations)
171
+ - Slack - Messages, channels, Socket Mode webhooks
172
+ - Microsoft Teams - Teams, channels, messages, meetings
173
+ - Discord - Messages, threads, webhooks, guild management
174
+ - Telegram - Bot API, inline keyboards, webhooks
175
+ - WhatsApp - Business API, templates, interactive messages
176
+ - Twilio - SMS, voice, WhatsApp messaging
177
+ - Email - Gmail, Outlook, SendGrid
178
+
179
+ **Productivity** (8 integrations)
180
+ - Google Sheets - CRUD, batch updates, formulas
181
+ - Google Calendar - Events, free/busy, webhooks
182
+ - Google Drive - Files, folders, permissions, search
183
+ - Google Docs - Document creation, formatting, images
184
+ - Notion - Pages, databases, blocks, search
185
+ - Confluence - Pages, spaces, CQL search
186
+ - Mailchimp - Campaign management, automation
187
+ - Airtable - Records, pagination, batch ops
188
+
189
+ **Project Management** (4 integrations)
190
+ - Jira - Issues, sprints, JQL search, transitions
191
+ - Linear - Issues, projects, GraphQL API
192
+ - Asana - Tasks, projects, workspaces, portfolios
193
+ - Trello - Boards, lists, cards, automation
194
+
195
+ **Developer Tools** (2 integrations)
196
+ - GitHub - PRs, issues, repos, webhooks
197
+ - Zendesk - Tickets, users, organizations
198
+
199
+ **Commerce** (2 integrations)
200
+ - Stripe - Payments, subscriptions, customers
201
+ - Shopify - Products, orders, inventory
202
+
203
+ **Storage & Data** (5 integrations)
204
+ - Dropbox - Files, folders, sharing
205
+ - AWS S3 - Object storage, buckets
206
+ - Supabase - Database, auth, storage, RPC
207
+ - PostgreSQL - Direct SQL queries, transactions
208
+ - MySQL - Direct SQL queries, connection pooling
209
+
210
+ **Universal** (1 integration)
211
+ - HTTP Client - Connect to **any REST API**
212
+ - All HTTP methods (GET, POST, PUT, PATCH, DELETE)
213
+ - Multiple auth types (Bearer, Basic, API Key)
214
+ - GraphQL query support
215
+ - Custom headers and query params
216
+
217
+ ### 🤖 AI Agent Integration
218
+
219
+ **Use Your Existing Subscriptions - No Extra API Costs**
220
+
221
+ If you already pay for GitHub Copilot, Claude Code, or OpenAI in your IDE, use them in workflows for free:
222
+
223
+ | Agent | Setup | Cost |
224
+ |-------|-------|------|
225
+ | **GitHub Copilot** | `copilot auth` | Use existing subscription |
226
+ | **Claude Code** | Claude CLI | Use existing subscription |
227
+ | **OpenAI Codex** | OpenAI CLI | Use existing subscription |
228
+ | **OpenCode** | SDK install | 75+ backends (GPT-4, Claude, Gemini) |
229
+ | **Ollama** | Local install | 100% free (runs locally) |
230
+
231
+ **Runtime Flexibility**
232
+
233
+ Switch AI providers without editing workflow files:
234
+
235
+ ```bash
236
+ # Test with different AI providers
237
+ marktoflow run workflow.md --agent claude
238
+ marktoflow run workflow.md --agent copilot
239
+ marktoflow run workflow.md --agent ollama
240
+
241
+ # Override model at runtime
242
+ marktoflow run workflow.md --model claude-sonnet-4
243
+ marktoflow run workflow.md --model gpt-4o
244
+
245
+ # Combine overrides
246
+ marktoflow run workflow.md --agent copilot --model gpt-4o
247
+ marktoflow run workflow.md --agent claude --model claude-opus-4
248
+ ```
249
+
250
+ **Capabilities**
251
+ - ✅ Natural language task execution
252
+ - ✅ Code generation and review
253
+ - ✅ Data analysis and transformation
254
+ - ✅ Content creation and summarization
255
+ - ✅ Tool use and function calling
256
+ - ✅ Multi-turn conversations
257
+
258
+ ### 🏢 Enterprise & Production Features
259
+
260
+ **Security & Compliance**
261
+ - ✅ **RBAC** - Role-based access control for teams
262
+ - ✅ **Approval Workflows** - Multi-stage approval chains
263
+ - ✅ **Audit Logging** - Complete execution history with timestamps
264
+ - ✅ **Credential Encryption** - Secure storage for API keys and tokens
265
+ - ✅ **Secret Management** - Environment-based credential injection
266
+
267
+ **Scalability & Reliability**
268
+ - ✅ **Distributed Execution** - Scale with Redis/RabbitMQ/InMemory queues
269
+ - ✅ **Automatic Retry** - Configurable retry policies with exponential backoff
270
+ - ✅ **Circuit Breakers** - Prevent cascade failures
271
+ - ✅ **Rate Limiting** - Respect API rate limits automatically
272
+ - ✅ **Parallel Execution** - Run steps concurrently with throttling
273
+
274
+ **Monitoring & Observability**
275
+ - ✅ **Cost Tracking** - Monitor API usage and costs per workflow
276
+ - ✅ **Execution History** - SQLite persistence for all workflow runs
277
+ - ✅ **Error Handling** - Try/catch blocks with detailed error context
278
+ - ✅ **Metrics & Prometheus** - Export workflow metrics
279
+ - ✅ **Logging** - Structured JSON logs with Pino
280
+
281
+ **Triggering & Automation**
282
+ - ✅ **Webhook Server** - Built-in HTTP server for external events
283
+ - ✅ **Slack Socket Mode** - Receive Slack events without public URLs
284
+ - ✅ **File Watchers** - Auto-trigger workflows on file changes
285
+ - ✅ **Cron Schedules** - Schedule recurring workflows
286
+ - ✅ **Manual Triggers** - CLI-based execution
287
+
288
+ **Developer Experience**
289
+ - ✅ **Full TypeScript Support** - End-to-end type safety
290
+ - ✅ **Hot Reload** - Live workflow updates during development
291
+ - ✅ **Dry Run Mode** - Test workflows without executing actions
292
+ - ✅ **Debug Mode** - Detailed output with stack traces
293
+ - ✅ **Validation** - Syntax checking before execution
294
+
295
+ ## Example Workflows
296
+
297
+ ### AI Agent Workflows
298
+
299
+ **Codebase Q&A** - Answer questions about codebases via Slack/Telegram webhooks
300
+ ```bash
301
+ marktoflow run examples/codebase-qa/workflow.md
302
+ ```
303
+
304
+ **Agent Task Executor** - Execute agent tasks from messages with pass/fail reporting
305
+ ```bash
306
+ marktoflow run examples/agent-task-executor/workflow.md
307
+ ```
308
+
309
+ **Copilot Code Review** - AI code review with GitHub Copilot
310
+ ```bash
311
+ marktoflow run examples/copilot-code-review/workflow.md
312
+ ```
313
+
314
+ **Sprint Planning** - AI-powered sprint planning
315
+ ```bash
316
+ marktoflow run examples/sprint-planning/workflow.md
317
+ ```
318
+
319
+ ### Automation Workflows
320
+
321
+ **Sub-Workflows** - Reusable workflow composition
322
+ ```bash
323
+ marktoflow run examples/sub-workflows/main.md
324
+ ```
325
+
326
+ **Daily Standup** - Team update aggregation (scheduled)
327
+ ```bash
328
+ marktoflow run examples/daily-standup/workflow.md
329
+ ```
330
+
331
+ **Incident Response** - Incident coordination (webhook-triggered)
332
+ ```bash
333
+ marktoflow run examples/incident-response/workflow.md
334
+ ```
335
+
336
+ All examples are production-ready templates you can customize for your needs.
337
+
338
+ ## Documentation
339
+
340
+ ### Getting Started
341
+ - [Main Repository](https://github.com/marktoflow/marktoflow)
342
+ - [Installation Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/INSTALLATION.md)
343
+ - [Detailed Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/DETAILED-GUIDE.md)
344
+ - [REST API Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/REST-API-GUIDE.md)
345
+
346
+ ### Core Concepts
347
+ - [Template Expressions Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/TEMPLATE-EXPRESSIONS.md)
348
+ - [Control Flow Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/CONTROL-FLOW-GUIDE.md)
349
+
350
+ ### Visual Designer
351
+ - [GUI User Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/GUI_USER_GUIDE.md)
352
+ - [GUI Developer Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/GUI_DEVELOPER_GUIDE.md)
353
+
354
+ ### Advanced Topics
355
+ - [Playwright Guide](https://github.com/marktoflow/marktoflow/blob/main/docs/PLAYWRIGHT-GUIDE.md)
356
+ - [Setup Guides](https://github.com/marktoflow/marktoflow/tree/main/docs)
357
+
358
+ ## Commands
359
+
360
+ Once installed, you have access to both CLI commands:
361
+
362
+ ```bash
363
+ # Initialize project
364
+ marktoflow init
365
+
366
+ # Run workflows
367
+ marktoflow run workflow.md
368
+ marktoflow run workflow.md --input key=value
369
+ marktoflow run workflow.md --agent copilot
370
+ marktoflow run workflow.md --verbose
371
+
372
+ # Validate workflow syntax
373
+ marktoflow workflow validate workflow.md
374
+
375
+ # Start webhook server
376
+ marktoflow serve --port 3000
377
+ marktoflow serve --socket # Slack Socket Mode
378
+
379
+ # Start visual designer
380
+ marktoflow gui
381
+
382
+ # Or use the direct GUI command
383
+ marktoflow-gui
384
+ ```
385
+
386
+ ## What Makes marktoflow Different?
387
+
388
+ ### vs. Zapier/Make.com/n8n
389
+
390
+ | Feature | marktoflow | Cloud Platforms |
391
+ |---------|------------|-----------------|
392
+ | **Workflow Format** | Markdown + YAML (portable) | Proprietary JSON (locked-in) |
393
+ | **Version Control** | Git-native | External versioning |
394
+ | **AI Integration** | Use existing subscriptions | Pay extra for AI features |
395
+ | **SDK Access** | Direct method calls | Wrapper APIs only |
396
+ | **TypeScript Support** | Full type safety | Limited/none |
397
+ | **Local Development** | CLI-first | Web-based only |
398
+ | **Cost** | Open source | Per-task pricing |
399
+ | **Self-Hosted** | Built-in | Enterprise plans only |
400
+
401
+ ### vs. GitHub Actions/GitLab CI
402
+
403
+ | Feature | marktoflow | CI/CD Platforms |
404
+ |---------|------------|-----------------|
405
+ | **Use Case** | General automation | CI/CD focused |
406
+ | **AI Agents** | First-class support | Limited |
407
+ | **Visual Editor** | Optional GUI | YAML only |
408
+ | **Integrations** | 30+ native SDKs | Marketplace actions |
409
+ | **Triggering** | Webhooks, cron, files, CLI | Git events primarily |
410
+ | **Execution** | Distributed queues | Runner-based |
411
+ | **State Management** | Built-in SQLite | External storage |
412
+
413
+ ### vs. Custom Scripts
414
+
415
+ | Feature | marktoflow | Custom Scripts |
416
+ |---------|------------|-----------------|
417
+ | **Learning Curve** | Markdown + YAML | Full programming |
418
+ | **Error Handling** | Built-in retry/circuit breaker | Manual implementation |
419
+ | **Monitoring** | Audit logs, cost tracking | DIY |
420
+ | **Integrations** | 30+ SDKs ready | Install/configure each |
421
+ | **Visual Debugging** | Optional GUI | None |
422
+ | **Team Collaboration** | Workflow libraries | Copy/paste |
423
+
424
+ ## Who Should Use marktoflow?
425
+
426
+ ### ✅ Individual Developers
427
+
428
+ - **Quick automation** - Write workflows in minutes, not hours
429
+ - **No vendor lock-in** - Portable markdown files, not proprietary formats
430
+ - **Use what you have** - Leverage existing AI subscriptions and SDKs
431
+ - **Version control** - Git-friendly workflow files
432
+ - **Free visual editor** - Optional GUI for visual workflow design
433
+
434
+ ### ✅ Development Teams
435
+
436
+ - **Collaboration** - Share workflows as code in your repository
437
+ - **Code review** - Standard PR process for workflow changes
438
+ - **Reusability** - Build libraries of sub-workflows
439
+ - **Observability** - Audit logs and execution history
440
+ - **Cost control** - Track API usage across workflows
441
+
442
+ ### ✅ Enterprises
443
+
444
+ - **Security** - RBAC, approval workflows, credential encryption
445
+ - **Compliance** - Complete audit trail of all executions
446
+ - **Scalability** - Distributed execution with queue systems
447
+ - **Reliability** - Automatic retries, circuit breakers, error handling
448
+ - **Integration** - Connect to existing systems via REST APIs
449
+
450
+ ## Author
451
+
452
+ **Scott Glover** <scottgl@gmail.com>
453
+
454
+ ## License
455
+
456
+ Apache License 2.0
457
+
458
+ ## Support
459
+
460
+ - [GitHub Issues](https://github.com/marktoflow/marktoflow/issues)
461
+ - [Documentation](https://github.com/marktoflow/marktoflow)
462
+ - [Examples](https://github.com/marktoflow/marktoflow/tree/main/examples)
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@marktoflow/marktoflow",
3
+ "version": "2.0.0-alpha.13",
4
+ "description": "Complete marktoflow installation - agent automation framework with native MCP support",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/marktoflow/marktoflow.git",
9
+ "directory": "packages/marktoflow"
10
+ },
11
+ "homepage": "https://github.com/marktoflow/marktoflow#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/marktoflow/marktoflow/issues"
14
+ },
15
+ "scripts": {},
16
+ "dependencies": {
17
+ "@marktoflow/cli": "workspace:*",
18
+ "@marktoflow/core": "workspace:*",
19
+ "@marktoflow/gui": "workspace:*",
20
+ "@marktoflow/integrations": "workspace:*"
21
+ },
22
+ "files": [
23
+ "README.md"
24
+ ],
25
+ "keywords": [
26
+ "marktoflow",
27
+ "automation",
28
+ "workflow",
29
+ "cli",
30
+ "gui",
31
+ "mcp",
32
+ "slack",
33
+ "github",
34
+ "jira",
35
+ "ai-agents",
36
+ "metapackage"
37
+ ],
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "author": "Scott Glover",
42
+ "license": "Apache-2.0"
43
+ }