@mugwork/mug 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +251 -0
  3. package/dist/explorer.js +3 -0
  4. package/dist/packages/email-template/src/email-template.d.ts +18 -0
  5. package/dist/packages/email-template/src/email-template.js +74 -0
  6. package/dist/packages/email-template/src/index.d.ts +1 -0
  7. package/dist/packages/email-template/src/index.js +1 -0
  8. package/dist/packages/surface-renderer/src/form-renderer.d.ts +117 -0
  9. package/dist/packages/surface-renderer/src/form-renderer.js +719 -0
  10. package/dist/packages/surface-renderer/src/index.d.ts +4 -0
  11. package/dist/packages/surface-renderer/src/index.js +2 -0
  12. package/dist/packages/surface-renderer/src/portal-renderer.d.ts +177 -0
  13. package/dist/packages/surface-renderer/src/portal-renderer.js +1089 -0
  14. package/dist/packages/surface-renderer/src/workspace-home.d.ts +46 -0
  15. package/dist/packages/surface-renderer/src/workspace-home.js +345 -0
  16. package/dist/runtime/agent-types.d.ts +48 -0
  17. package/dist/runtime/agent-types.js +3 -0
  18. package/dist/runtime/ai-router.d.ts +32 -0
  19. package/dist/runtime/ai-router.js +112 -0
  20. package/dist/runtime/app.d.ts +6 -0
  21. package/dist/runtime/app.js +399 -0
  22. package/dist/runtime/chunker.d.ts +6 -0
  23. package/dist/runtime/chunker.js +30 -0
  24. package/dist/runtime/context.d.ts +115 -0
  25. package/dist/runtime/context.js +440 -0
  26. package/dist/runtime/do/workspace-database.d.ts +10 -0
  27. package/dist/runtime/do/workspace-database.js +199 -0
  28. package/dist/runtime/form-types.d.ts +143 -0
  29. package/dist/runtime/form-types.js +1 -0
  30. package/dist/runtime/runtime.d.ts +9 -0
  31. package/dist/runtime/runtime.js +7 -0
  32. package/dist/runtime/source-types.d.ts +15 -0
  33. package/dist/runtime/source-types.js +1 -0
  34. package/dist/runtime/source.d.ts +70 -0
  35. package/dist/runtime/source.js +21 -0
  36. package/dist/runtime/sync-runtime.d.ts +10 -0
  37. package/dist/runtime/sync-runtime.js +185 -0
  38. package/dist/runtime/types.d.ts +21 -0
  39. package/dist/runtime/types.js +1 -0
  40. package/dist/runtime/workflow-entrypoint.d.ts +31 -0
  41. package/dist/runtime/workflow-entrypoint.js +1297 -0
  42. package/dist/runtime/workflow.d.ts +285 -0
  43. package/dist/runtime/workflow.js +1008 -0
  44. package/dist/src/cli.d.ts +2 -0
  45. package/dist/src/cli.js +44116 -0
  46. package/dist/src/commands/ai-gateway-route.d.ts +24 -0
  47. package/dist/src/commands/ai-gateway-route.js +192 -0
  48. package/dist/src/commands/auth.d.ts +1 -0
  49. package/dist/src/commands/auth.js +42 -0
  50. package/dist/src/commands/billing.d.ts +6 -0
  51. package/dist/src/commands/billing.js +76 -0
  52. package/dist/src/commands/brain.d.ts +1 -0
  53. package/dist/src/commands/brain.js +194 -0
  54. package/dist/src/commands/demo.d.ts +12 -0
  55. package/dist/src/commands/demo.js +147 -0
  56. package/dist/src/commands/deploy.d.ts +1 -0
  57. package/dist/src/commands/deploy.js +1052 -0
  58. package/dist/src/commands/dev.d.ts +14 -0
  59. package/dist/src/commands/dev.js +2818 -0
  60. package/dist/src/commands/form.d.ts +8 -0
  61. package/dist/src/commands/form.js +396 -0
  62. package/dist/src/commands/init.d.ts +1 -0
  63. package/dist/src/commands/init.js +139 -0
  64. package/dist/src/commands/issue.d.ts +7 -0
  65. package/dist/src/commands/issue.js +191 -0
  66. package/dist/src/commands/login.d.ts +9 -0
  67. package/dist/src/commands/login.js +163 -0
  68. package/dist/src/commands/logs.d.ts +8 -0
  69. package/dist/src/commands/logs.js +113 -0
  70. package/dist/src/commands/portal.d.ts +2 -0
  71. package/dist/src/commands/portal.js +111 -0
  72. package/dist/src/commands/pull.d.ts +3 -0
  73. package/dist/src/commands/pull.js +184 -0
  74. package/dist/src/commands/push.d.ts +4 -0
  75. package/dist/src/commands/push.js +183 -0
  76. package/dist/src/commands/run.d.ts +6 -0
  77. package/dist/src/commands/run.js +91 -0
  78. package/dist/src/commands/secret.d.ts +7 -0
  79. package/dist/src/commands/secret.js +105 -0
  80. package/dist/src/commands/shutdown.d.ts +1 -0
  81. package/dist/src/commands/shutdown.js +46 -0
  82. package/dist/src/commands/sql.d.ts +8 -0
  83. package/dist/src/commands/sql.js +142 -0
  84. package/dist/src/commands/status.d.ts +5 -0
  85. package/dist/src/commands/status.js +39 -0
  86. package/dist/src/commands/sync.d.ts +7 -0
  87. package/dist/src/commands/sync.js +991 -0
  88. package/dist/src/commands/usage.d.ts +6 -0
  89. package/dist/src/commands/usage.js +78 -0
  90. package/dist/src/commands/webhooks.d.ts +1 -0
  91. package/dist/src/commands/webhooks.js +102 -0
  92. package/dist/src/commands/workspace.d.ts +23 -0
  93. package/dist/src/commands/workspace.js +590 -0
  94. package/dist/src/connector-migration.d.ts +20 -0
  95. package/dist/src/connector-migration.js +43 -0
  96. package/dist/src/connector-parser.d.ts +14 -0
  97. package/dist/src/connector-parser.js +94 -0
  98. package/dist/src/connector-service/discover.d.ts +37 -0
  99. package/dist/src/connector-service/discover.js +79 -0
  100. package/dist/src/connector-service/gather.d.ts +22 -0
  101. package/dist/src/connector-service/gather.js +89 -0
  102. package/dist/src/connector-service/init.d.ts +14 -0
  103. package/dist/src/connector-service/init.js +109 -0
  104. package/dist/src/connector-service/scaffold.d.ts +17 -0
  105. package/dist/src/connector-service/scaffold.js +194 -0
  106. package/dist/src/connector-service/spec-storage.d.ts +8 -0
  107. package/dist/src/connector-service/spec-storage.js +48 -0
  108. package/dist/src/connector-service/types.d.ts +57 -0
  109. package/dist/src/connector-service/types.js +2 -0
  110. package/dist/src/connector-service/verify.d.ts +24 -0
  111. package/dist/src/connector-service/verify.js +575 -0
  112. package/dist/src/email-template.d.ts +2 -0
  113. package/dist/src/email-template.js +1 -0
  114. package/dist/src/manifest.d.ts +31 -0
  115. package/dist/src/manifest.js +25 -0
  116. package/dist/src/mug-icon.d.ts +1 -0
  117. package/dist/src/mug-icon.js +12 -0
  118. package/dist/src/slack-manifest.d.ts +119 -0
  119. package/dist/src/slack-manifest.js +163 -0
  120. package/dist/src/source-migration.d.ts +20 -0
  121. package/dist/src/source-migration.js +43 -0
  122. package/dist/src/surface-renderer.d.ts +5 -0
  123. package/dist/src/surface-renderer.js +3 -0
  124. package/dist/src/templates.d.ts +3 -0
  125. package/dist/src/templates.js +48 -0
  126. package/dist/src/version-check.d.ts +1 -0
  127. package/dist/src/version-check.js +28 -0
  128. package/dist/src/workflow-parser.d.ts +95 -0
  129. package/dist/src/workflow-parser.js +526 -0
  130. package/dist/worker/src/agent-types.d.ts +27 -0
  131. package/dist/worker/src/agent-types.js +3 -0
  132. package/dist/worker/src/source-types.d.ts +14 -0
  133. package/dist/worker/src/source-types.js +1 -0
  134. package/package.json +90 -0
  135. package/src/data/model-capabilities.json +171 -0
@@ -0,0 +1,14 @@
1
+ export interface SourceAuth {
2
+ type: "bearer" | "api-key" | "basic" | "oauth2";
3
+ value: string;
4
+ }
5
+ export interface SyncEntry {
6
+ database: string;
7
+ schedule?: string;
8
+ }
9
+ export interface SourceConfig {
10
+ auth?: SourceAuth;
11
+ baseUrl?: string;
12
+ syncs: Record<string, SyncEntry>;
13
+ }
14
+ export type SourcesConfig = Record<string, SourceConfig>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@mugwork/mug",
3
+ "version": "0.1.0",
4
+ "description": "Mug CLI — AI-native business operations runtime",
5
+ "author": "Mug.work <support@mug.work>",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=18"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "bin": {
15
+ "mug": "./dist/src/cli.js"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/runtime/runtime.d.ts",
20
+ "import": "./dist/runtime/runtime.js"
21
+ }
22
+ },
23
+ "types": "./dist/runtime/runtime.d.ts",
24
+ "main": "./dist/runtime/runtime.js",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/mugwork/mug.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/mugwork/mug/issues"
31
+ },
32
+ "homepage": "https://mug.work",
33
+ "keywords": [
34
+ "ai-automation",
35
+ "workflow",
36
+ "ai-agents",
37
+ "cloudflare-workers",
38
+ "cli",
39
+ "business-automation",
40
+ "typescript",
41
+ "saas",
42
+ "sqlite",
43
+ "api-integration",
44
+ "slack",
45
+ "email",
46
+ "sms",
47
+ "headless"
48
+ ],
49
+ "files": [
50
+ "dist/",
51
+ "src/data/"
52
+ ],
53
+ "scripts": {
54
+ "templates": "tsx scripts/build-templates.ts",
55
+ "build": "npm run templates && tsx scripts/build-cli.ts && tsc -p tsconfig.runtime.json && npm run build:explorer",
56
+ "build:explorer": "tsx scripts/build-explorer.ts",
57
+ "prepack": "cp mug-repo/README.md README.md && cp mug-repo/LICENSE LICENSE",
58
+ "postpack": "rm -f README.md LICENSE",
59
+ "dev": "tsx src/cli.ts"
60
+ },
61
+ "dependencies": {
62
+ "@stoplight/spectral-core": "^1.22.0",
63
+ "@stoplight/spectral-rulesets": "^1.22.1",
64
+ "acorn": "^8.16.0",
65
+ "acorn-walk": "^8.3.5",
66
+ "better-sqlite3": "^12.10.0",
67
+ "commander": "^14.0.3",
68
+ "har-to-openapi": "^2.5.0",
69
+ "swagger2openapi": "^7.0.8",
70
+ "wrangler": "^4.90.0",
71
+ "ws": "^8.18.0",
72
+ "yaml": "^2.9.0"
73
+ },
74
+ "optionalDependencies": {
75
+ "sharp": "^0.34.5"
76
+ },
77
+ "devDependencies": {
78
+ "@cloudflare/workers-types": "^4.20260603.1",
79
+ "@types/acorn": "^4.0.6",
80
+ "@types/better-sqlite3": "^7.6.13",
81
+ "@types/node": "^22.15.17",
82
+ "@types/ws": "^8.18.1",
83
+ "esbuild": "^0.28.1",
84
+ "preact": "^10.29.2",
85
+ "preact-router": "^4.1.2",
86
+ "puppeteer": "^25.1.0",
87
+ "tsx": "^4.19.4",
88
+ "typescript": "^5.8.3"
89
+ }
90
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "lastUpdated": "2026-06-09",
3
+ "sources": [
4
+ "cloudflare-rest-api",
5
+ "litellm"
6
+ ],
7
+ "models": {
8
+ "@cf/aisingapore/gemma-sea-lion-v4-27b-it": {
9
+ "toolCalling": false
10
+ },
11
+ "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": {
12
+ "toolCalling": false
13
+ },
14
+ "@cf/google/gemma-2b-it-lora": {
15
+ "toolCalling": false
16
+ },
17
+ "@cf/google/gemma-4-26b-a4b-it": {
18
+ "toolCalling": true
19
+ },
20
+ "@cf/google/gemma-7b-it-lora": {
21
+ "toolCalling": false
22
+ },
23
+ "@cf/ibm-granite/granite-4.0-h-micro": {
24
+ "toolCalling": true
25
+ },
26
+ "@cf/meta-llama/llama-2-7b-chat-hf-lora": {
27
+ "toolCalling": false
28
+ },
29
+ "@cf/meta/llama-3.1-8b-instruct-fp8": {
30
+ "toolCalling": false
31
+ },
32
+ "@cf/meta/llama-3.2-11b-vision-instruct": {
33
+ "toolCalling": false
34
+ },
35
+ "@cf/meta/llama-3.2-1b-instruct": {
36
+ "toolCalling": false
37
+ },
38
+ "@cf/meta/llama-3.2-3b-instruct": {
39
+ "toolCalling": false
40
+ },
41
+ "@cf/meta/llama-3.3-70b-instruct-fp8-fast": {
42
+ "toolCalling": true
43
+ },
44
+ "@cf/meta/llama-4-scout-17b-16e-instruct": {
45
+ "toolCalling": true
46
+ },
47
+ "@cf/meta/llama-guard-3-8b": {
48
+ "toolCalling": false
49
+ },
50
+ "@cf/mistral/mistral-7b-instruct-v0.2-lora": {
51
+ "toolCalling": false
52
+ },
53
+ "@cf/mistralai/mistral-small-3.1-24b-instruct": {
54
+ "toolCalling": true
55
+ },
56
+ "@cf/moonshotai/kimi-k2.6": {
57
+ "toolCalling": true
58
+ },
59
+ "@cf/nvidia/nemotron-3-120b-a12b": {
60
+ "toolCalling": true
61
+ },
62
+ "@cf/openai/gpt-oss-120b": {
63
+ "toolCalling": true
64
+ },
65
+ "@cf/openai/gpt-oss-20b": {
66
+ "toolCalling": true
67
+ },
68
+ "@cf/qwen/qwen2.5-coder-32b-instruct": {
69
+ "toolCalling": false
70
+ },
71
+ "@cf/qwen/qwen3-30b-a3b-fp8": {
72
+ "toolCalling": true
73
+ },
74
+ "@cf/qwen/qwq-32b": {
75
+ "toolCalling": false
76
+ },
77
+ "@cf/zai-org/glm-4.7-flash": {
78
+ "toolCalling": true
79
+ },
80
+ "claude-haiku": {
81
+ "toolCalling": true
82
+ },
83
+ "claude-haiku-4-5": {
84
+ "toolCalling": true
85
+ },
86
+ "claude-opus": {
87
+ "toolCalling": true
88
+ },
89
+ "claude-opus-4-5": {
90
+ "toolCalling": true
91
+ },
92
+ "claude-opus-4-6": {
93
+ "toolCalling": true
94
+ },
95
+ "claude-opus-4-7": {
96
+ "toolCalling": true
97
+ },
98
+ "claude-opus-4-8": {
99
+ "toolCalling": true
100
+ },
101
+ "claude-sonnet": {
102
+ "toolCalling": true
103
+ },
104
+ "claude-sonnet-4-5": {
105
+ "toolCalling": true
106
+ },
107
+ "claude-sonnet-4-6": {
108
+ "toolCalling": true
109
+ },
110
+ "gemini-2.0-flash": {
111
+ "toolCalling": true
112
+ },
113
+ "gemini-2.5-flash": {
114
+ "toolCalling": true
115
+ },
116
+ "gemini-2.5-pro": {
117
+ "toolCalling": true
118
+ },
119
+ "gemini-3.5-flash": {
120
+ "toolCalling": true
121
+ },
122
+ "gpt-4.1": {
123
+ "toolCalling": true
124
+ },
125
+ "gpt-4.1-mini": {
126
+ "toolCalling": true
127
+ },
128
+ "gpt-4.1-nano": {
129
+ "toolCalling": true
130
+ },
131
+ "gpt-4o": {
132
+ "toolCalling": true
133
+ },
134
+ "gpt-4o-mini": {
135
+ "toolCalling": true
136
+ },
137
+ "gpt-5.4": {
138
+ "toolCalling": true
139
+ },
140
+ "gpt-5.4-mini": {
141
+ "toolCalling": true
142
+ },
143
+ "gpt-5.4-nano": {
144
+ "toolCalling": true
145
+ },
146
+ "gpt-5.4-pro": {
147
+ "toolCalling": true
148
+ },
149
+ "gpt-5.5": {
150
+ "toolCalling": true
151
+ },
152
+ "gpt-5.5-pro": {
153
+ "toolCalling": true
154
+ },
155
+ "xai/grok-4.1-fast-non-reasoning": {
156
+ "toolCalling": true
157
+ },
158
+ "xai/grok-4.1-fast-reasoning": {
159
+ "toolCalling": true
160
+ },
161
+ "xai/grok-4.20-non-reasoning": {
162
+ "toolCalling": true
163
+ },
164
+ "xai/grok-4.20-reasoning": {
165
+ "toolCalling": true
166
+ },
167
+ "xai/grok-4.3": {
168
+ "toolCalling": true
169
+ }
170
+ }
171
+ }