overmux 0.0.4 → 0.0.6

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 (151) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +16 -2
  3. package/dist/bin.js +140 -127
  4. package/dist/bin.js.map +1 -1
  5. package/dist/docs/000-index.md +2 -4
  6. package/dist/docs/100-introduction/200-how-overmux-works.md +126 -2
  7. package/dist/docs/100-introduction/{300-why-overmux.md → 300-why-i-built-overmux.md} +1 -1
  8. package/dist/docs/200-getting-started/100-install-and-run-overmux.md +2 -2
  9. package/dist/docs/200-getting-started/400-secure-with-https/200-tailscale-serve.md +3 -3
  10. package/dist/docs/200-getting-started/400-secure-with-https/300-cloudflare-tunnel.md +2 -2
  11. package/dist/docs/200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md +2 -2
  12. package/dist/docs/200-getting-started/500-set-up-overmux-with-packages.md +42 -0
  13. package/dist/docs/400-reference/100-project-structure.md +83 -0
  14. package/dist/docs/400-reference/200-configuration.md +257 -0
  15. package/dist/docs/400-reference/300-storage-locations.md +46 -0
  16. package/dist/docs/400-reference/400-authentication-and-security.md +37 -0
  17. package/dist/docs/400-reference/500-server/000-index.md +13 -0
  18. package/dist/docs/400-reference/500-server/100-resources.md +191 -0
  19. package/dist/docs/400-reference/500-server/200-operations.md +111 -0
  20. package/dist/docs/400-reference/500-server/300-streams.md +140 -0
  21. package/dist/docs/400-reference/500-server/400-notifications.md +32 -0
  22. package/dist/docs/400-reference/500-server/500-api.md +118 -0
  23. package/dist/docs/400-reference/600-client/000-index.md +9 -0
  24. package/dist/docs/400-reference/600-client/005-setting-up-your-ui.md +137 -0
  25. package/dist/docs/400-reference/600-client/007-deep-links.md +87 -0
  26. package/dist/docs/400-reference/600-client/010-commands.md +189 -0
  27. package/dist/docs/400-reference/600-client/020-shortcuts.md +171 -0
  28. package/dist/docs/400-reference/600-client/100-api.md +370 -0
  29. package/dist/docs/400-reference/600-client/200-theming.md +209 -0
  30. package/dist/docs/400-reference/600-client/300-tech-stack-recommendations.md +12 -0
  31. package/dist/docs/400-reference/{400-cli → 700-cli}/050-init.md +2 -4
  32. package/{docs/400-reference/400-cli → dist/docs/400-reference/700-cli}/100-serve.md +9 -4
  33. package/{docs/400-reference/400-cli → dist/docs/400-reference/700-cli}/200-auth.md +1 -4
  34. package/dist/docs/400-reference/{400-cli → 700-cli}/300-call.md +1 -4
  35. package/dist/docs/400-reference/{400-cli → 700-cli}/350-instance.md +1 -4
  36. package/dist/docs/400-reference/700-cli/600-docs.md +128 -0
  37. package/dist/docs/400-reference/{400-cli → 700-cli}/700-desktop.md +1 -3
  38. package/dist/docs/500-hosted-pages.md +0 -1
  39. package/dist/exports/client.d.ts +5 -14
  40. package/dist/exports/client.d.ts.map +1 -1
  41. package/dist/exports/client.js +141 -46
  42. package/dist/exports/client.js.map +1 -1
  43. package/dist/exports/{index-DS70rKzo.d.ts → index-Cz3xkCa4.d.ts} +50 -36
  44. package/dist/exports/index-Cz3xkCa4.d.ts.map +1 -0
  45. package/dist/exports/index.d.ts +1 -1
  46. package/dist/exports/index.js +19 -5
  47. package/dist/exports/index.js.map +1 -1
  48. package/dist/exports/{notifications-av0FK0yZ.js → notifications-BFAD3QQl.js} +29 -4
  49. package/dist/exports/notifications-BFAD3QQl.js.map +1 -0
  50. package/dist/exports/server.d.ts +1 -44
  51. package/dist/exports/server.d.ts.map +1 -1
  52. package/dist/exports/server.js +9 -1061
  53. package/dist/exports/server.js.map +1 -1
  54. package/dist/internal/server/coordinator/server-child.js +47 -43
  55. package/dist/internal/server/coordinator/server-child.js.map +1 -1
  56. package/docs/000-index.md +2 -4
  57. package/docs/100-introduction/200-how-overmux-works.md +126 -2
  58. package/docs/100-introduction/{300-why-overmux.md → 300-why-i-built-overmux.md} +1 -1
  59. package/docs/200-getting-started/100-install-and-run-overmux.md +2 -2
  60. package/docs/200-getting-started/400-secure-with-https/200-tailscale-serve.md +3 -3
  61. package/docs/200-getting-started/400-secure-with-https/300-cloudflare-tunnel.md +2 -2
  62. package/docs/200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md +2 -2
  63. package/docs/200-getting-started/500-set-up-overmux-with-packages.md +42 -0
  64. package/docs/400-reference/100-project-structure.md +83 -0
  65. package/docs/400-reference/200-configuration.md +257 -0
  66. package/docs/400-reference/300-storage-locations.md +46 -0
  67. package/docs/400-reference/400-authentication-and-security.md +37 -0
  68. package/docs/400-reference/500-server/000-index.md +13 -0
  69. package/docs/400-reference/500-server/100-resources.md +191 -0
  70. package/docs/400-reference/500-server/200-operations.md +111 -0
  71. package/docs/400-reference/500-server/300-streams.md +140 -0
  72. package/docs/400-reference/500-server/400-notifications.md +32 -0
  73. package/docs/400-reference/500-server/500-api.md +118 -0
  74. package/docs/400-reference/600-client/000-index.md +9 -0
  75. package/docs/400-reference/600-client/005-setting-up-your-ui.md +137 -0
  76. package/docs/400-reference/600-client/007-deep-links.md +87 -0
  77. package/docs/400-reference/600-client/010-commands.md +189 -0
  78. package/docs/400-reference/600-client/020-shortcuts.md +171 -0
  79. package/docs/400-reference/600-client/100-api.md +370 -0
  80. package/docs/400-reference/600-client/200-theming.md +209 -0
  81. package/docs/400-reference/600-client/300-tech-stack-recommendations.md +12 -0
  82. package/docs/400-reference/{400-cli → 700-cli}/050-init.md +2 -4
  83. package/{dist/docs/400-reference/400-cli → docs/400-reference/700-cli}/100-serve.md +9 -4
  84. package/{dist/docs/400-reference/400-cli → docs/400-reference/700-cli}/200-auth.md +1 -4
  85. package/docs/400-reference/{400-cli → 700-cli}/300-call.md +1 -4
  86. package/docs/400-reference/{400-cli → 700-cli}/350-instance.md +1 -4
  87. package/docs/400-reference/700-cli/600-docs.md +128 -0
  88. package/docs/400-reference/{400-cli → 700-cli}/700-desktop.md +1 -3
  89. package/docs/500-hosted-pages.md +0 -1
  90. package/package.json +4 -3
  91. package/src/internal/cli/app.ts +3 -5
  92. package/src/internal/cli/commands/docs-ai-context.ts +33 -0
  93. package/src/internal/cli/commands/docs.ts +19 -2
  94. package/src/internal/cli/commands/init-template.ts +1 -1
  95. package/src/internal/cli/commands/serve.ts +3 -0
  96. package/src/internal/cli/login.ts +9 -9
  97. package/src/internal/client/client-definition.ts +6 -8
  98. package/src/internal/client/host/deep-link-navigation.ts +75 -0
  99. package/src/internal/client/host/overmux-host.tsx +9 -0
  100. package/src/internal/client/index.ts +0 -6
  101. package/src/internal/client/overmux-react.ts +71 -40
  102. package/src/internal/server/auth/auth-service.ts +2 -2
  103. package/src/internal/server/auth/instance-control.ts +65 -14
  104. package/src/internal/server/coordinator/ipc-protocol.ts +0 -1
  105. package/src/internal/server/runtime/create-runtime.ts +5 -3
  106. package/src/internal/server/runtime/runtime-instance.ts +5 -4
  107. package/src/internal/server/runtime/runtime-operations.ts +9 -3
  108. package/src/internal/server/runtime/runtime-resources.ts +12 -32
  109. package/src/internal/server/runtime/runtime-streams.ts +5 -6
  110. package/src/internal/server/server-logger.ts +5 -10
  111. package/src/internal/server/server-startup-options.ts +5 -10
  112. package/src/internal/server/start-application-server.ts +4 -7
  113. package/src/public/ai-context.ts +7 -29
  114. package/src/public/client.ts +0 -6
  115. package/src/public/config.ts +156 -31
  116. package/src/public/server.ts +1 -16
  117. package/dist/docs/100-introduction/100-what-is-overmux.md +0 -7
  118. package/dist/docs/300-fundamentals/100-project-structure.md +0 -23
  119. package/dist/docs/300-fundamentals/200-configuration.md +0 -3
  120. package/dist/docs/300-fundamentals/300-theming.md +0 -54
  121. package/dist/docs/300-fundamentals/400-server.md +0 -3
  122. package/dist/docs/300-fundamentals/500-client.md +0 -3
  123. package/dist/docs/300-fundamentals/600-operations.md +0 -3
  124. package/dist/docs/300-fundamentals/700-resources.md +0 -3
  125. package/dist/docs/300-fundamentals/800-streams.md +0 -3
  126. package/dist/docs/300-fundamentals/900-authentication-and-security.md +0 -3
  127. package/dist/docs/400-reference/100-configuration.md +0 -23
  128. package/dist/docs/400-reference/200-server-api.md +0 -21
  129. package/dist/docs/400-reference/300-client-api.md +0 -39
  130. package/dist/docs/400-reference/400-cli/400-check.md +0 -20
  131. package/dist/docs/400-reference/400-cli/500-ai-context.md +0 -102
  132. package/dist/docs/400-reference/400-cli/600-docs.md +0 -23
  133. package/dist/exports/index-DS70rKzo.d.ts.map +0 -1
  134. package/dist/exports/notifications-av0FK0yZ.js.map +0 -1
  135. package/docs/100-introduction/100-what-is-overmux.md +0 -7
  136. package/docs/300-fundamentals/100-project-structure.md +0 -23
  137. package/docs/300-fundamentals/200-configuration.md +0 -3
  138. package/docs/300-fundamentals/300-theming.md +0 -54
  139. package/docs/300-fundamentals/400-server.md +0 -3
  140. package/docs/300-fundamentals/500-client.md +0 -3
  141. package/docs/300-fundamentals/600-operations.md +0 -3
  142. package/docs/300-fundamentals/700-resources.md +0 -3
  143. package/docs/300-fundamentals/800-streams.md +0 -3
  144. package/docs/300-fundamentals/900-authentication-and-security.md +0 -3
  145. package/docs/400-reference/100-configuration.md +0 -23
  146. package/docs/400-reference/200-server-api.md +0 -21
  147. package/docs/400-reference/300-client-api.md +0 -39
  148. package/docs/400-reference/400-cli/400-check.md +0 -20
  149. package/docs/400-reference/400-cli/500-ai-context.md +0 -102
  150. package/docs/400-reference/400-cli/600-docs.md +0 -23
  151. package/src/internal/cli/commands/ai.ts +0 -44
@@ -1,23 +0,0 @@
1
- ---
2
- title: "overmux docs"
3
- description: "Print the installed documentation directory"
4
- ---
5
-
6
- # `overmux docs`
7
-
8
- Print the installed documentation directory.
9
-
10
- ## Usage
11
-
12
- ```text
13
- overmux docs
14
- ```
15
-
16
- ## Example
17
-
18
- ```console
19
- $ overmux docs
20
- /path/to/project/node_modules/overmux/docs
21
- ```
22
-
23
- The command prints the absolute path to the documentation shipped with the installed `overmux` package.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DS70rKzo.d.ts","names":[],"sources":["../../../shared/dist/index.d.ts","../../src/public/ai-context.ts","../../src/public/notifications.ts","../../src/public/contracts.ts","../../src/public/config.ts"],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iBACV,mBAAmB,SAAS,2BAA2B,SACrD,eAAe,sBAEjB,iBAAiB,oBAAoB,mBACrC,oBAAoB,uBAAuB;EAE3C,aAAa;EACb,WAAW;EACX,UAAU;;KAGA,wBACV,gBAAgB,mBAAmB,oBACjC;EACF,oBAAoB;EACpB,MAAM;EACN;EACA,wBAAwB;IAAW;;EACnC,QAAQ;EACR;;KAGU,uBAAuB,WAAW;EAC5C,iBAAiB;IAEf;KAGQ,qBAAqB,WAAW;EAC1C,gBAAgB;IAEd,YAAY;KAGJ,wBAAwB,WAAW;EAC7C,mBAAmB;IAEjB,YAAY;cAGH,4BACL,mBAAmB,8BACnB,0BACA,iBAAiB,8BACjB,oBAAoB,2BAC1B;EACA,aAAa;EACb,WAAW,oBAAoB,YAAY;EAC3C,UAAU;MACR,iBACF,oBAAoB,YAAY,gBAChC,UACA;cAGW,4BAA6B,gBAAgB,kBACxD,YAAY,wBAAwB,aACnC,wBAAwB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"notifications-av0FK0yZ.js","names":[],"sources":["../../../shared/dist/index.js"],"sourcesContent":["import { z } from \"zod\";\n//#region src/ai-context.ts\nconst packageSourceSnippet = \"package-source\";\nconst techStackRecommendationsSnippet = \"tech-stack-recommendations\";\nconst aiContextSnippets = [packageSourceSnippet, techStackRecommendationsSnippet];\n//#endregion\n//#region src/hosted-routes.ts\nconst overmuxSettingsPath = \"/_overmux/settings\";\nconst overmuxLogoutPath = \"/_overmux/logout\";\nconst reservedPathPrefixes = [\n\t\"/_overmux\",\n\t\"/api\",\n\t\"/login\"\n];\nconst returnToBase = \"https://overmux.invalid\";\nconst isReservedPath = (pathname) => reservedPathPrefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`));\nconst resolveOvermuxReturnTo = (candidate) => {\n\tif (!candidate?.startsWith(\"/\") || candidate.startsWith(\"//\")) return \"/\";\n\ttry {\n\t\tconst url = new URL(candidate, returnToBase);\n\t\tconst decodedPathname = decodeURIComponent(url.pathname);\n\t\tif (url.origin !== returnToBase || isReservedPath(decodedPathname)) return \"/\";\n\t\treturn `${url.pathname}${url.search}${url.hash}`;\n\t} catch {\n\t\treturn \"/\";\n\t}\n};\nconst createOvermuxSettingsPath = (returnTo) => {\n\tconst safeReturnTo = resolveOvermuxReturnTo(returnTo);\n\tif (safeReturnTo === \"/\") return overmuxSettingsPath;\n\tconst search = new URLSearchParams({ returnTo: safeReturnTo });\n\treturn `${overmuxSettingsPath}?${search.toString()}`;\n};\n//#endregion\n//#region src/notifications.ts\nconst safeRelativeNotificationLink = (link) => {\n\tlet decoded;\n\ttry {\n\t\tdecoded = decodeURIComponent(link);\n\t} catch {\n\t\treturn false;\n\t}\n\treturn !decoded.startsWith(\"//\") && !decoded.includes(\"\\\\\") && ![...decoded].some((character) => {\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\t\treturn codePoint < 32 || codePoint === 127;\n\t});\n};\nconst notificationLinkSchema = z.union([z.string().max(4096).startsWith(\"/\").refine(safeRelativeNotificationLink), z.string().max(4096).url().refine((link) => {\n\tif (!URL.canParse(link)) return false;\n\tconst url = new URL(link);\n\treturn [\"http:\", \"https:\"].includes(url.protocol) && !url.username && !url.password;\n})]);\nconst notificationSchema = z.object({\n\tbody: z.string().max(4096).optional(),\n\topen: z.object({ link: notificationLinkSchema }).strict().optional(),\n\ttitle: z.string().min(1).max(4096)\n}).strict();\n//#endregion\n//#region src/instance.ts\nconst instanceIdSchema = z.string().max(253).regex(/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?![\\s\\S])/, \"Expected a lowercase instance ID with only ASCII letters, digits, internal dots and hyphens\");\nconst createInstanceIdentity = (instanceId) => ({\n\tinstanceId: instanceIdSchema.parse(instanceId),\n\tdeepLinkPrefix: `overmux://${instanceId}`\n});\n//#endregion\nexport { aiContextSnippets, createInstanceIdentity, createOvermuxSettingsPath, instanceIdSchema, notificationLinkSchema, notificationSchema, overmuxLogoutPath, overmuxSettingsPath, packageSourceSnippet, resolveOvermu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AC,CAAC,WAAW,GAAG,CAAC,CAAC,OAAO,4BAA4B,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,SAAS;CAC9J,IAAI,CAAC,IAAI,SAAS,IAAI,GAAG,OAAO;CAChC,MAAM,MAAM,IAAI,IAAI,IAAI;CACxB,OAAO,CAAC,SAAS,QAAQ,CAAC,CAAC,SAAS,IAAI,QAAQ,KAAK,CAAC,IAAI,YAAY,CAAC,IAAI;AAC5E,CAAC,CAAC,CAAC;AACH,MAAM,qBAAqB,EAAE,OAAO;CACnC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS;CACpC,MAAM,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS;CACnE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI;AAClC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,+CAA+C,6FAA6F;AAC/L,MAAM,0BAA0B,gBAAgB;CAC/C,YAAY,iBAAiB,MAAM,UAAU;CAC7C,gBAAgB,aAAa;AAC9B"}
@@ -1,7 +0,0 @@
1
- ---
2
- title: What is Overmux?
3
- ---
4
-
5
- Overmux is a web-based, customizable dev environment. Designed for coding using Agents.
6
-
7
-
@@ -1,23 +0,0 @@
1
- ---
2
- title: Project Structure
3
- ---
4
-
5
- `overmux init` creates this minimal userland application:
6
-
7
- ```text
8
- .gitignore
9
- mise.toml Mise installations only
10
- package.json
11
- pnpm-lock.yaml
12
- overmux.config.ts authentication, server, Vite, and production settings
13
- src/server/index.ts trusted resources, streams, and operations
14
- src/ui/app.tsx browser application definition
15
- src/ui/index.html browser document
16
- src/ui/main.tsx React and Overmux host entry point
17
- src/ui/styles.css application styles
18
- vite.config.ts browser development and production build configuration
19
- ```
20
-
21
- The server and UI are separate trust boundaries. `src/server/index.ts` runs as trusted Node.js code. Files under `src/ui` run in the browser and communicate with the server through Overmux's public APIs.
22
-
23
- The generated application has no shared directory. Add browser-safe shared schemas only when both sides need them.
@@ -1,3 +0,0 @@
1
- ---
2
- title: Configuration
3
- ---
@@ -1,54 +0,0 @@
1
- ---
2
- title: Theming
3
- ---
4
-
5
- ## Host and platform selectors
6
-
7
- Overmux sets two independent attributes on the hosted application's `<html>` element before React mounts:
8
-
9
- ```html
10
- <html data-om-host="desktop" data-om-platform="macos">
11
- ```
12
-
13
- Use these public CSS selectors to adapt your application to its environment:
14
-
15
- ```css
16
- /* Hide browser-only installation guidance in native and installed apps. */
17
- html:not([data-om-host="browser"]) .install-prompt {
18
- display: none;
19
- }
20
-
21
- /* OS-specific styling also works when using Overmux in a browser. */
22
- html[data-om-platform="macos"] .shortcut-hint {
23
- font-family: system-ui;
24
- }
25
-
26
- /* Combine the independent host and platform selectors. */
27
- html[data-om-host="desktop"][data-om-platform="windows"] .app-toolbar {
28
- padding-inline: 1rem;
29
- }
30
- ```
31
-
32
- ### Host values
33
-
34
- | `data-om-host` | Meaning |
35
- | --- | --- |
36
- | `desktop` | Running inside the native Overmux desktop host, regardless of window size. |
37
- | `browser` | Running in a regular browser tab or window. |
38
- | `pwa` | Running as an installed web app in `standalone`, `minimal-ui`, or `window-controls-overlay` display mode, including Safari's installed standalone mode. |
39
-
40
- A progressive web app (PWA) is a website that can run as an installed application. Visiting an installable website does not make the host `pwa`. Ordinary browser fullscreen does not qualify either. Native desktop detection takes precedence over display mode. Browser/PWA selectors update when the supported display modes change.
41
-
42
- `desktop` describes the host, not a desktop-sized layout. Use CSS media or container queries for responsive layout. The native host's implementation technology is not a CSS value.
43
-
44
- ### Platform values
45
-
46
- `data-om-platform` is always one of `macos`, `windows`, `linux`, `android`, `ios`, or `unknown`.
47
-
48
- The native desktop host supplies its OS identity through versioned preload metadata. Browsers use best-effort detection from browser-provided platform and user-agent information, including touch-capable iPads presenting a Mac identity. Missing, obscured, or unrecognized information can yield `unknown`; do not use these selectors for security decisions or feature detection.
49
-
50
- ### Scope
51
-
52
- These attributes belong to the hosted application document, independently of `OvermuxThemeScope`. They do not change theme tokens, color scheme, contrast, nested theme scopes, or portal inheritance. Selectors anchored at `html` also match portal content in the same document, including caller-owned external portal containers.
53
-
54
- This API does not theme native window controls or the desktop connection screen. It requires no public JavaScript API; use the attributes directly in your application's CSS.
@@ -1,3 +0,0 @@
1
- ---
2
- title: Server
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- title: Client
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- title: Operations
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- title: Resources
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- title: Streams
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- title: Authentication and Security
3
- ---
@@ -1,23 +0,0 @@
1
- ---
2
- title: Configuration
3
- ---
4
-
5
- ## Instance identity
6
-
7
- ```ts
8
- import { defineOvermuxConfig } from "overmux";
9
- import { server } from "./server";
10
-
11
- export default defineOvermuxConfig({
12
- server,
13
- instanceId: ({ port }) => `rich-work-${port}`,
14
- });
15
- ```
16
-
17
- `instanceId` accepts a fixed string (for example `instanceId: "rich-work"`) or a function of `{ port }`. It is resolved once at server startup using the actual listening port. Every hostname serving this running instance reports the same ID. Changing the port intentionally changes a port-dependent ID.
18
-
19
- `port` in `overmux.config.ts` must be an integer from `1` through `65535`. Internal listeners and tests may use `0` to ask the OS for a free port; this is not a user configuration value.
20
-
21
- The default is the machine hostname followed by `-<port>`. IDs are canonical lowercase ASCII: 1-253 characters, start and end with a letter or digit, and may contain dots or hyphens internally. Explicit IDs are validated, never silently normalized. Set an explicit ID if the machine hostname does not meet these rules.
22
-
23
- Distinct instances require distinct IDs. IDs are names, not credentials; authentication is still required. Deep links use `overmux://<instance-id>/<application-route>`. Their authority is only a lookup key, never a network address. Use the live runtime helpers or `overmux instance --json` to produce a prefix rather than guessing it from a browser URL.
@@ -1,21 +0,0 @@
1
- ---
2
- title: Server API
3
- ---
4
-
5
- ## Instance identity in handlers
6
-
7
- Operation, resource, and stream handler contexts expose the running instance:
8
-
9
- ```ts
10
- import { defineOperation } from "overmux";
11
- import { z } from "zod";
12
-
13
- export const paneLink = defineOperation({
14
- input: z.object({ paneId: z.string() }),
15
- output: z.string(),
16
- handle: ({ paneId }, context) =>
17
- `${context.instance.getDeepLinkPrefix()}/panes/${encodeURIComponent(paneId)}`,
18
- });
19
- ```
20
-
21
- `context.instance.getInstanceId(): string` and `context.instance.getDeepLinkPrefix(): string` are synchronous and ready before handlers execute. They belong to this server runtime, not process-global state. The prefix is exactly `overmux://<instance-id>` without a trailing slash. Encode route segments once, not the whole assembled URL.
@@ -1,39 +0,0 @@
1
- ---
2
- title: Client API
3
- ---
4
-
5
- ## Instance identity
6
-
7
- ```tsx
8
- import { createOvermuxHooks } from "overmux/client";
9
- import type { serverConfig } from "./server";
10
-
11
- const { useInstance } = createOvermuxHooks<typeof serverConfig>();
12
-
13
- const PaneLink = ({ paneId }: { paneId: string }) => {
14
- const instance = useInstance();
15
- if (!instance) return null;
16
- return <a href={`${instance.deepLinkPrefix}/panes/${encodeURIComponent(paneId)}`}>Open pane in desktop</a>;
17
- };
18
- ```
19
-
20
- Use these hooks under the existing Overmux provider. `useInstance()` returns `{ instanceId, deepLinkPrefix } | undefined` and rerenders when authenticated discovery arrives or changes after reconnecting.
21
-
22
- The same scoped `overmuxServerApi` object passed to command handlers for operations also provides `overmuxServerApi.getInstanceId()` and `overmuxServerApi.getDeepLinkPrefix()`. Both return `undefined` until the authenticated server announces its identity. The prefix is exactly `overmux://<instance-id>`, without a trailing slash. Browser addresses are not instance identities. Desktop hosts receive discovery through a narrow identity bridge automatically; application code does not need to forward it.
23
-
24
- ## Clipboard
25
-
26
- ```ts
27
- import { readClipboardText, writeClipboardText } from "overmux/client";
28
-
29
- await writeClipboardText("Text to copy");
30
- const text = await readClipboardText();
31
- ```
32
-
33
- `readClipboardText(): Promise<string>` reads the system clipboard through `navigator.clipboard.readText()`. It never reads through the desktop bridge.
34
-
35
- `writeClipboardText(text: string): Promise<void>` uses Overmux's version-1 desktop write bridge when present, otherwise `navigator.clipboard.writeText()`. Desktop writes are fire-and-forget: resolution confirms dispatch, not completion or acceptance by the host. Existing host origin and active-frame checks still apply.
36
-
37
- Both reject on unavailable browser APIs, browser permission failures, or synchronous desktop dispatch failures. Browser secure-context, focus, permissions, and user-activation restrictions still apply. These APIs target the system clipboard, not the X11 primary selection. Only read clipboard data you need and trust the source of text you write.
38
-
39
- For terminal-program access via OSC 52, use the opt-in factories from `@overmux/xterm/client` rather than wiring platform bridges in application code.
@@ -1,20 +0,0 @@
1
- ---
2
- title: "overmux check"
3
- description: "Validate an Overmux configuration"
4
- ---
5
-
6
- # `overmux check`
7
-
8
- Validate an Overmux configuration.
9
-
10
- ## Usage
11
-
12
- ```text
13
- overmux check [--config path]
14
- ```
15
-
16
- ## Options
17
-
18
- | Flag | Description | Default |
19
- | --- | --- | --- |
20
- | `--config <path>, -c <path>` | Configuration file | `$XDG_CONFIG_HOME/overmux/overmux.config.ts` |
@@ -1,102 +0,0 @@
1
- ---
2
- title: "overmux ai context"
3
- description: "Set up your coding agent and configure its Overmux context"
4
- ---
5
-
6
- # `overmux ai context`
7
-
8
- Print version-aware Overmux guidance for coding agents as Markdown.
9
-
10
- ## Usage
11
-
12
- ```text
13
- overmux ai context [--config path]
14
- ```
15
-
16
- ## Set up your coding agent
17
-
18
- Add a short instruction that tells your agent how to load the context when it needs Overmux guidance:
19
-
20
- <CodeBlockTabs defaultValue="agents">
21
- <CodeBlockTabsList>
22
- <CodeBlockTabsTrigger value="agents">AGENTS.md</CodeBlockTabsTrigger>
23
- <CodeBlockTabsTrigger value="claude">CLAUDE.md</CodeBlockTabsTrigger>
24
- </CodeBlockTabsList>
25
- <CodeBlockTab value="agents">
26
-
27
- ```bash
28
- echo 'Run `overmux ai context` for help configuring Overmux.' >> AGENTS.md
29
- ```
30
-
31
- </CodeBlockTab>
32
- <CodeBlockTab value="claude">
33
-
34
- ```bash
35
- echo 'Run `overmux ai context` for help configuring Overmux.' >> CLAUDE.md
36
- ```
37
-
38
- </CodeBlockTab>
39
- </CodeBlockTabs>
40
-
41
- ## Configure context snippets
42
-
43
- Set `aiContextSnippets` in `$XDG_CONFIG_HOME/overmux/overmux.config.ts` to choose the guidance included in the command output:
44
-
45
- ```ts
46
- import {
47
- coreAiContextSnippets,
48
- defineOvermuxConfig,
49
- } from "overmux";
50
-
51
- export default defineOvermuxConfig({
52
- aiContextSnippets: coreAiContextSnippets,
53
- // ...
54
- });
55
- ```
56
-
57
- When `aiContextSnippets` is omitted, Overmux uses `defaultAiContextSnippets`. Set it to an empty array to emit no context.
58
-
59
- ## Options
60
-
61
- | Flag | Description | Default |
62
- | --- | --- | --- |
63
- | `--config <path>, -c <path>` | Configuration file | `$XDG_CONFIG_HOME/overmux/overmux.config.ts` |
64
-
65
- ## Preset groups
66
-
67
- | Export | Included snippets |
68
- | --- | --- |
69
- | `defaultAiContextSnippets` | `package-source`, `tech-stack-recommendations` |
70
- | `coreAiContextSnippets` | `package-source` |
71
-
72
- ## Snippet reference
73
-
74
- ### `package-source`
75
-
76
- Export: `packageSourceSnippet`
77
-
78
- Included in the core and default presets. Tells agents to inspect the documentation and TypeScript source shipped in installed Overmux packages so their guidance matches the versions used by the application.
79
-
80
- ### `tech-stack-recommendations`
81
-
82
- Export: `techStackRecommendationsSnippet`
83
-
84
- Included in the default preset. Recommends pnpm, TanStack Router, shadcn/ui, and Zod while deferring to the application's established stack.
85
-
86
- You can compose an explicit selection from the individual exports:
87
-
88
- ```ts
89
- import {
90
- defineOvermuxConfig,
91
- packageSourceSnippet,
92
- techStackRecommendationsSnippet,
93
- } from "overmux";
94
-
95
- export default defineOvermuxConfig({
96
- aiContextSnippets: [
97
- packageSourceSnippet,
98
- techStackRecommendationsSnippet,
99
- ],
100
- // ...
101
- });
102
- ```
@@ -1,23 +0,0 @@
1
- ---
2
- title: "overmux docs"
3
- description: "Print the installed documentation directory"
4
- ---
5
-
6
- # `overmux docs`
7
-
8
- Print the installed documentation directory.
9
-
10
- ## Usage
11
-
12
- ```text
13
- overmux docs
14
- ```
15
-
16
- ## Example
17
-
18
- ```console
19
- $ overmux docs
20
- /path/to/project/node_modules/overmux/docs
21
- ```
22
-
23
- The command prints the absolute path to the documentation shipped with the installed `overmux` package.
@@ -1,44 +0,0 @@
1
- import { loadOvermuxConfig } from "@overmux/shared/node";
2
- import { buildCommand, buildRouteMap } from "@stricli/core";
3
-
4
- import {
5
- composeAiContext,
6
- defaultAiContextSnippets,
7
- } from "../../../public/ai-context";
8
- import { getDefaultConfigPath } from "../../server/paths";
9
-
10
- type AiContextFlags = { config: string };
11
-
12
- const printAiContext = async (
13
- flags: AiContextFlags,
14
- process: NodeJS.Process,
15
- ) => {
16
- const { config } = await loadOvermuxConfig({ configPath: flags.config });
17
- process.stdout.write(
18
- composeAiContext(config.aiContextSnippets ?? defaultAiContextSnippets),
19
- );
20
- };
21
-
22
- const createAiContextCommand = (process: NodeJS.Process) =>
23
- buildCommand({
24
- func: (flags: AiContextFlags) => printAiContext(flags, process),
25
- parameters: {
26
- aliases: { c: "config" },
27
- flags: {
28
- config: {
29
- brief: "Configuration file",
30
- default: getDefaultConfigPath(),
31
- kind: "parsed",
32
- parse: String,
33
- placeholder: "path",
34
- },
35
- },
36
- },
37
- docs: { brief: "Print the configured Overmux AI context" },
38
- });
39
-
40
- export const createAiRoute = (process: NodeJS.Process) =>
41
- buildRouteMap({
42
- docs: { brief: "Print Overmux AI context" },
43
- routes: { context: createAiContextCommand(process) },
44
- });