midsomar 0.1.11 → 0.1.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 (41) hide show
  1. package/dist/index.js +20 -4
  2. package/package.json +4 -2
  3. package/scripts/postinstall.js +19 -0
  4. package/web-ui/_headers 2 +17 -0
  5. package/web-ui/_headers 3 +17 -0
  6. package/web-ui/apple-touch-icon 2.png +0 -0
  7. package/web-ui/apple-touch-icon 3.png +0 -0
  8. package/web-ui/apple-touch-icon-v3 2.png +0 -0
  9. package/web-ui/apple-touch-icon-v3 3.png +0 -0
  10. package/web-ui/favicon 2.ico +0 -0
  11. package/web-ui/favicon 2.svg +0 -0
  12. package/web-ui/favicon 3.ico +0 -0
  13. package/web-ui/favicon 3.svg +0 -0
  14. package/web-ui/favicon-96x96 2.png +0 -0
  15. package/web-ui/favicon-96x96 3.png +0 -0
  16. package/web-ui/favicon-96x96-v3 2.png +0 -0
  17. package/web-ui/favicon-96x96-v3 3.png +0 -0
  18. package/web-ui/favicon-v3 2.ico +0 -0
  19. package/web-ui/favicon-v3 2.svg +0 -0
  20. package/web-ui/favicon-v3 3.ico +0 -0
  21. package/web-ui/favicon-v3 3.svg +0 -0
  22. package/web-ui/index 2.html +81 -0
  23. package/web-ui/index 3.html +82 -0
  24. package/web-ui/midsomar_black 2.png +0 -0
  25. package/web-ui/midsomar_black 3.png +0 -0
  26. package/web-ui/midsomar_logo 2.png +0 -0
  27. package/web-ui/midsomar_logo 3.png +0 -0
  28. package/web-ui/midsomar_white 2.png +0 -0
  29. package/web-ui/midsomar_white 3.png +0 -0
  30. package/web-ui/oc-theme-preload 2.js +40 -0
  31. package/web-ui/oc-theme-preload 3.js +40 -0
  32. package/web-ui/site 2.webmanifest +24 -0
  33. package/web-ui/site 3.webmanifest +24 -0
  34. package/web-ui/social-share 2.png +0 -0
  35. package/web-ui/social-share 3.png +0 -0
  36. package/web-ui/social-share-zen 2.png +0 -0
  37. package/web-ui/social-share-zen 3.png +0 -0
  38. package/web-ui/web-app-manifest-192x192 2.png +0 -0
  39. package/web-ui/web-app-manifest-192x192 3.png +0 -0
  40. package/web-ui/web-app-manifest-512x512 2.png +0 -0
  41. package/web-ui/web-app-manifest-512x512 3.png +0 -0
package/dist/index.js CHANGED
@@ -2,11 +2,22 @@
2
2
  import { startEngine, serveUI } from "./server.js";
3
3
  const defaultPort = 3000;
4
4
  const defaultHost = "127.0.0.1";
5
+ const art = `
6
+ __ ___ ___ ___ __ _ ___ __ _ _ __ ___
7
+ / _|/ __/ __|/ _ \\ / _\` | / _ \\ / _\` || '_ \` _ \\
8
+ \\__ \\__ \\__ \\ (_) | (_| || (_) | (_| || | | | | |
9
+ |___/___/___/\\___/ \\__,_| \\___/ \\__,_||_| |_| |_|
10
+ `;
5
11
  function help() {
6
- process.stdout.write(`midsomar — AI coding agent
12
+ process.stdout.write(`${art}
13
+
14
+ AI coding agent — open-source
7
15
 
8
16
  Usage:
9
- midsomar web [options]
17
+ npx midsomar web [options]
18
+
19
+ Next step:
20
+ npx midsomar web
10
21
 
11
22
  Options:
12
23
  --port <number> Port to listen on (default: ${defaultPort})
@@ -37,7 +48,7 @@ async function cmdWeb(args) {
37
48
  return;
38
49
  }
39
50
  }
40
- process.stdout.write("midsomar starting...\n");
51
+ process.stdout.write("starting...\n");
41
52
  const engine = await startEngine({ password });
42
53
  process.stdout.write(`\n engine: ${engine.url}\n`);
43
54
  const uiDir = new URL("../web-ui", import.meta.url).pathname;
@@ -48,7 +59,12 @@ async function cmdWeb(args) {
48
59
  hostname: host,
49
60
  });
50
61
  const url = `http://${host}:${ui.port}`;
51
- process.stdout.write(`\nmidsomar ready at ${url}\n`);
62
+ process.stdout.write(`${art}
63
+ ─────────────────────────────────────
64
+ midsomar ready at ${url}
65
+ ─────────────────────────────────────
66
+ Next: open ${url} in your browser
67
+ `);
52
68
  const { default: open } = await import("open");
53
69
  open(url).catch(() => { });
54
70
  process.on("SIGINT", () => { engine.kill(); ui.close(); process.exit(0); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midsomar",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "AI coding agent — open-source, bring your own API key",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "scripts": {
10
10
  "build": "tsc -p tsconfig.json && node scripts/fix-shebang.js",
11
11
  "build:ui": "node scripts/build-ui.js",
12
+ "postinstall": "node scripts/postinstall.js",
12
13
  "dev": "tsx src/index.ts",
13
14
  "start": "node dist/index.js"
14
15
  },
@@ -26,7 +27,8 @@
26
27
  },
27
28
  "files": [
28
29
  "dist",
29
- "web-ui"
30
+ "web-ui",
31
+ "scripts/postinstall.js"
30
32
  ],
31
33
  "keywords": [
32
34
  "ai",
@@ -0,0 +1,19 @@
1
+ console.log(`
2
+ __ ___ ___ ___ __ _ ___ __ _ _ __ ___
3
+ / _|/ __/ __|/ _ \\ / _\` | / _ \\ / _\` || '_ \` _ \\
4
+ \\__ \\__ \\__ \\ (_) | (_| || (_) | (_| || | | | | |
5
+ |___/___/___/\\___/ \\__,_| \\___/ \\__,_||_| |_| |_|
6
+
7
+ ──────────────────────────────
8
+ AI coding agent - open-source
9
+ ──────────────────────────────
10
+
11
+ Next step:
12
+ npx midsomar web
13
+
14
+ Documentation:
15
+ https://opencode.ai
16
+
17
+ Report issues:
18
+ https://github.com/anomalyco/opencode/issues
19
+ `)
@@ -0,0 +1,17 @@
1
+ /assets/*.js
2
+ Content-Type: application/javascript
3
+
4
+ /assets/*.mjs
5
+ Content-Type: application/javascript
6
+
7
+ /assets/*.css
8
+ Content-Type: text/css
9
+
10
+ /*.js
11
+ Content-Type: application/javascript
12
+
13
+ /*.mjs
14
+ Content-Type: application/javascript
15
+
16
+ /*.css
17
+ Content-Type: text/css
@@ -0,0 +1,17 @@
1
+ /assets/*.js
2
+ Content-Type: application/javascript
3
+
4
+ /assets/*.mjs
5
+ Content-Type: application/javascript
6
+
7
+ /assets/*.css
8
+ Content-Type: text/css
9
+
10
+ /*.js
11
+ Content-Type: application/javascript
12
+
13
+ /*.mjs
14
+ Content-Type: application/javascript
15
+
16
+ /*.css
17
+ Content-Type: text/css
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,81 @@
1
+ <!doctype html>
2
+ <html lang="en" style="background-color: var(--v2-background-bg-deep, #fafafa)">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1, interactive-widget=resizes-content, viewport-fit=cover"
8
+ />
9
+ <title>midsomar</title>
10
+ <link rel="icon" type="image/png" href="/midsomar_logo.png">
11
+ <link rel="icon" type="image/svg+xml" href="/favicon-v3.svg" />
12
+
13
+ <link rel="apple-touch-icon" sizes="180x180" href="/midsomar_logo.png">
14
+ <link rel="manifest" href="/site.webmanifest" />
15
+ <meta name="theme-color" content="#fafafa" />
16
+ <meta name="mobile-web-app-capable" content="yes" />
17
+ <meta name="apple-mobile-web-app-capable" content="yes" />
18
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
19
+ <meta property="og:image" content="/social-share.png" />
20
+ <meta property="twitter:image" content="/social-share.png" />
21
+ <script id="oc-theme-preload-script">;(function () {
22
+ var key = "opencode-theme-id"
23
+ var themeId = localStorage.getItem(key) || "oc-2"
24
+
25
+ if (themeId === "oc-1") {
26
+ themeId = "oc-2"
27
+ localStorage.setItem(key, themeId)
28
+ localStorage.removeItem("opencode-theme-css-light")
29
+ localStorage.removeItem("opencode-theme-css-dark")
30
+ }
31
+
32
+ var scheme = localStorage.getItem("opencode-color-scheme") || "system"
33
+ var isDark = scheme === "dark" || (scheme === "system" && matchMedia("(prefers-color-scheme: dark)").matches)
34
+ var mode = isDark ? "dark" : "light"
35
+
36
+ document.documentElement.dataset.theme = themeId
37
+ document.documentElement.dataset.colorScheme = mode
38
+ document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa"
39
+
40
+ // Update theme-color meta tag to match app color scheme
41
+ var metas = document.querySelectorAll("meta[name='theme-color']")
42
+ if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#080808" : "#fafafa")
43
+
44
+ if (themeId === "oc-2") return
45
+
46
+ var css = localStorage.getItem("opencode-theme-css-" + mode)
47
+ if (css) {
48
+ var style = document.createElement("style")
49
+ style.id = "oc-theme-preload"
50
+ style.textContent =
51
+ ":root{color-scheme:" +
52
+ mode +
53
+ ";--text-mix-blend-mode:" +
54
+ (isDark ? "plus-lighter" : "multiply") +
55
+ ";" +
56
+ css +
57
+ "}"
58
+ document.head.appendChild(style)
59
+ }
60
+ })()
61
+ </script>
62
+ <script type="module" crossorigin src="/assets/index-BfNxi3ev.js"></script>
63
+ <link rel="stylesheet" crossorigin href="/assets/index-S3QimprQ.css">
64
+ <script>;(function(){
65
+ var s=document.createElement('style');
66
+ s.textContent='[data-component="logo-mark"],[data-component="logo-splash"],[data-component="logo-wordmark"],[data-action="prompt-model"]{display:none!important}';
67
+ document.head.appendChild(s);
68
+ var o=new MutationObserver(function(){
69
+ document.querySelectorAll('[data-component="logo-mark"],[data-component="logo-splash"],[data-component="logo-wordmark"],[data-action="prompt-model"]').forEach(function(e){e.style.display='none'});
70
+ document.querySelectorAll('[id="opencode"],[id="opencode-go"]').forEach(function(e){
71
+ var p=e.closest('button,div,[role="option"],[data-provider-id]');
72
+ if(p){p.style.display='none'}
73
+ });
74
+ });
75
+ o.observe(document.documentElement,{childList:true,subtree:true})
76
+ })()</script></head>
77
+ <body class="antialiased overscroll-none text-12-regular overflow-hidden bg-v2-background-bg-deep">
78
+ <noscript>You need to enable JavaScript to run this app.</noscript>
79
+ <div id="root" class="flex flex-col h-dvh bg-v2-background-bg-deep p-px"></div>
80
+ </body>
81
+ </html>
@@ -0,0 +1,82 @@
1
+ <!doctype html>
2
+ <html lang="en" style="background-color: var(--v2-background-bg-deep, #fafafa)">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1, interactive-widget=resizes-content, viewport-fit=cover"
8
+ />
9
+ <title>midsomar</title>
10
+ <link rel="icon" type="image/png" href="/midsomar_logo.png">
11
+ <link rel="icon" type="image/svg+xml" href="/favicon-v3.svg" />
12
+
13
+ <link rel="apple-touch-icon" sizes="180x180" href="/midsomar_logo.png">
14
+ <link rel="manifest" href="/site.webmanifest" />
15
+ <meta name="theme-color" content="#fafafa" />
16
+ <meta name="mobile-web-app-capable" content="yes" />
17
+ <meta name="apple-mobile-web-app-capable" content="yes" />
18
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
19
+ <meta property="og:image" content="/social-share.png" />
20
+ <meta property="twitter:image" content="/social-share.png" />
21
+ <script id="oc-theme-preload-script">;(function () {
22
+ var key = "opencode-theme-id"
23
+ var themeId = localStorage.getItem(key) || "oc-2"
24
+
25
+ if (themeId === "oc-1") {
26
+ themeId = "oc-2"
27
+ localStorage.setItem(key, themeId)
28
+ localStorage.removeItem("opencode-theme-css-light")
29
+ localStorage.removeItem("opencode-theme-css-dark")
30
+ }
31
+
32
+ var scheme = localStorage.getItem("opencode-color-scheme") || "system"
33
+ var isDark = scheme === "dark" || (scheme === "system" && matchMedia("(prefers-color-scheme: dark)").matches)
34
+ var mode = isDark ? "dark" : "light"
35
+
36
+ document.documentElement.dataset.theme = themeId
37
+ document.documentElement.dataset.colorScheme = mode
38
+ document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa"
39
+
40
+ // Update theme-color meta tag to match app color scheme
41
+ var metas = document.querySelectorAll("meta[name='theme-color']")
42
+ if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#080808" : "#fafafa")
43
+
44
+ if (themeId === "oc-2") return
45
+
46
+ var css = localStorage.getItem("opencode-theme-css-" + mode)
47
+ if (css) {
48
+ var style = document.createElement("style")
49
+ style.id = "oc-theme-preload"
50
+ style.textContent =
51
+ ":root{color-scheme:" +
52
+ mode +
53
+ ";--text-mix-blend-mode:" +
54
+ (isDark ? "plus-lighter" : "multiply") +
55
+ ";" +
56
+ css +
57
+ "}"
58
+ document.head.appendChild(style)
59
+ }
60
+ })()
61
+ </script>
62
+ <script type="module" crossorigin src="/assets/index-BfNxi3ev.js"></script>
63
+ <link rel="stylesheet" crossorigin href="/assets/index-S3QimprQ.css">
64
+ <script>;(function(){
65
+ var s=document.createElement('style');
66
+ s.textContent='[data-component="logo-mark"],[data-component="logo-splash"],[data-component="logo-wordmark"],[data-action="prompt-model"]{display:none!important}';
67
+ document.head.appendChild(s);
68
+ var o=new MutationObserver(function(){
69
+ document.querySelectorAll('[data-component="logo-mark"],[data-component="logo-splash"],[data-component="logo-wordmark"],[data-action="prompt-model"]').forEach(function(e){e.style.display='none'});
70
+ document.querySelectorAll('[id="opencode"],[id="opencode-go"]').forEach(function(e){
71
+ var p=e.closest('button,div,[role="option"],[data-provider-id]');
72
+ if(p){p.style.display='none'}
73
+ });
74
+ document.querySelectorAll('svg[viewBox="0 0 720 129"]').forEach(function(e){e.style.display="none"});
75
+ });
76
+ o.observe(document.documentElement,{childList:true,subtree:true})
77
+ })()</script></head>
78
+ <body class="antialiased overscroll-none text-12-regular overflow-hidden bg-v2-background-bg-deep">
79
+ <noscript>You need to enable JavaScript to run this app.</noscript>
80
+ <div id="root" class="flex flex-col h-dvh bg-v2-background-bg-deep p-px"></div>
81
+ </body>
82
+ </html>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,40 @@
1
+ ;(function () {
2
+ var key = "opencode-theme-id"
3
+ var themeId = localStorage.getItem(key) || "oc-2"
4
+
5
+ if (themeId === "oc-1") {
6
+ themeId = "oc-2"
7
+ localStorage.setItem(key, themeId)
8
+ localStorage.removeItem("opencode-theme-css-light")
9
+ localStorage.removeItem("opencode-theme-css-dark")
10
+ }
11
+
12
+ var scheme = localStorage.getItem("opencode-color-scheme") || "system"
13
+ var isDark = scheme === "dark" || (scheme === "system" && matchMedia("(prefers-color-scheme: dark)").matches)
14
+ var mode = isDark ? "dark" : "light"
15
+
16
+ document.documentElement.dataset.theme = themeId
17
+ document.documentElement.dataset.colorScheme = mode
18
+ document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa"
19
+
20
+ // Update theme-color meta tag to match app color scheme
21
+ var metas = document.querySelectorAll("meta[name='theme-color']")
22
+ if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#080808" : "#fafafa")
23
+
24
+ if (themeId === "oc-2") return
25
+
26
+ var css = localStorage.getItem("opencode-theme-css-" + mode)
27
+ if (css) {
28
+ var style = document.createElement("style")
29
+ style.id = "oc-theme-preload"
30
+ style.textContent =
31
+ ":root{color-scheme:" +
32
+ mode +
33
+ ";--text-mix-blend-mode:" +
34
+ (isDark ? "plus-lighter" : "multiply") +
35
+ ";" +
36
+ css +
37
+ "}"
38
+ document.head.appendChild(style)
39
+ }
40
+ })()
@@ -0,0 +1,40 @@
1
+ ;(function () {
2
+ var key = "opencode-theme-id"
3
+ var themeId = localStorage.getItem(key) || "oc-2"
4
+
5
+ if (themeId === "oc-1") {
6
+ themeId = "oc-2"
7
+ localStorage.setItem(key, themeId)
8
+ localStorage.removeItem("opencode-theme-css-light")
9
+ localStorage.removeItem("opencode-theme-css-dark")
10
+ }
11
+
12
+ var scheme = localStorage.getItem("opencode-color-scheme") || "system"
13
+ var isDark = scheme === "dark" || (scheme === "system" && matchMedia("(prefers-color-scheme: dark)").matches)
14
+ var mode = isDark ? "dark" : "light"
15
+
16
+ document.documentElement.dataset.theme = themeId
17
+ document.documentElement.dataset.colorScheme = mode
18
+ document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa"
19
+
20
+ // Update theme-color meta tag to match app color scheme
21
+ var metas = document.querySelectorAll("meta[name='theme-color']")
22
+ if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#080808" : "#fafafa")
23
+
24
+ if (themeId === "oc-2") return
25
+
26
+ var css = localStorage.getItem("opencode-theme-css-" + mode)
27
+ if (css) {
28
+ var style = document.createElement("style")
29
+ style.id = "oc-theme-preload"
30
+ style.textContent =
31
+ ":root{color-scheme:" +
32
+ mode +
33
+ ";--text-mix-blend-mode:" +
34
+ (isDark ? "plus-lighter" : "multiply") +
35
+ ";" +
36
+ css +
37
+ "}"
38
+ document.head.appendChild(style)
39
+ }
40
+ })()
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "midsomar",
3
+ "short_name": "midsomar",
4
+ "id": "/",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "icons": [
8
+ {
9
+ "src": "/web-app-manifest-192x192.png",
10
+ "sizes": "192x192",
11
+ "type": "image/png",
12
+ "purpose": "maskable"
13
+ },
14
+ {
15
+ "src": "/web-app-manifest-512x512.png",
16
+ "sizes": "512x512",
17
+ "type": "image/png",
18
+ "purpose": "maskable"
19
+ }
20
+ ],
21
+ "theme_color": "#080808",
22
+ "background_color": "#080808",
23
+ "display": "standalone"
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "midsomar",
3
+ "short_name": "midsomar",
4
+ "id": "/",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "icons": [
8
+ {
9
+ "src": "/web-app-manifest-192x192.png",
10
+ "sizes": "192x192",
11
+ "type": "image/png",
12
+ "purpose": "maskable"
13
+ },
14
+ {
15
+ "src": "/web-app-manifest-512x512.png",
16
+ "sizes": "512x512",
17
+ "type": "image/png",
18
+ "purpose": "maskable"
19
+ }
20
+ ],
21
+ "theme_color": "#080808",
22
+ "background_color": "#080808",
23
+ "display": "standalone"
24
+ }
Binary file
Binary file
Binary file
Binary file