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,8 +1,4 @@
1
1
  import { z } from "zod";
2
- declare const packageSourceSnippet: "package-source";
3
- declare const techStackRecommendationsSnippet: "tech-stack-recommendations";
4
- declare const aiContextSnippets: readonly ["package-source", "tech-stack-recommendations"];
5
- type AiContextSnippet = (typeof aiContextSnippets)[number];
6
2
  declare const overmuxSettingsPath = "/_overmux/settings";
7
3
  declare const overmuxLogoutPath = "/_overmux/logout";
8
4
  declare const resolveOvermuxReturnTo: (candidate?: string | null) => string;
@@ -20,6 +16,10 @@ type InstanceIdentity = {
20
16
  instanceId: string;
21
17
  deepLinkPrefix: string;
22
18
  };
19
+ declare const packageSourceSnippet: "package-source";
20
+ declare const techStackRecommendationsSnippet: "tech-stack-recommendations";
21
+ declare const aiContextSnippets: readonly ["package-source", "tech-stack-recommendations"];
22
+ type AiContextSnippet = (typeof aiContextSnippets)[number];
23
23
  type AiContextSnippetDefinition = readonly AiContextSnippet[];
24
24
  declare const coreAiContextSnippets: readonly ["package-source"];
25
25
  declare const defaultAiContextSnippets: readonly ["package-source", "tech-stack-recommendations"];
@@ -47,34 +47,36 @@ type InstanceContext = {
47
47
  getInstanceId: () => string;
48
48
  getDeepLinkPrefix: () => string;
49
49
  };
50
- type HandlerContext = {
50
+ type ResourceInputMap = Readonly<Record<string, unknown>>;
51
+ type InvalidationArguments<TInputs extends ResourceInputMap> = { [TId in keyof TInputs & string]: [resourceId: TId, input?: TInputs[TId]]; }[keyof TInputs & string];
52
+ type HandlerContext<TInputs extends ResourceInputMap = {}> = {
51
53
  instance: InstanceContext;
52
- invalidate: (contract: ResourceContract, input?: unknown) => void;
54
+ invalidate: (...args: InvalidationArguments<TInputs>) => void;
53
55
  signal: AbortSignal;
54
56
  };
55
- type OperationContext = HandlerContext & {
57
+ type OperationContext<TInputs extends ResourceInputMap = {}> = HandlerContext<TInputs> & {
56
58
  notifications: Notifications;
57
59
  };
58
- type OperationDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodVoid> = {
59
- handle: (input: z.output<TInput>, context: OperationContext) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;
60
+ type OperationDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodVoid, TContext = OperationContext> = {
61
+ handle: (input: z.output<TInput>, context: TContext) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;
60
62
  input: TInput;
61
63
  output: TOutput;
62
64
  };
63
- declare const defineOperation: <TInput extends z.ZodType, TOutput extends z.ZodType = z.ZodVoid>({ handle, input, output }: {
64
- handle: OperationDefinition<TInput, TOutput>["handle"];
65
+ declare const defineOperation: <TInput extends z.ZodType, TOutput extends z.ZodType = z.ZodVoid, TContext = OperationContext>({ handle, input, output }: {
66
+ handle: OperationDefinition<TInput, TOutput, TContext>["handle"];
65
67
  input: TInput;
66
68
  output?: TOutput;
67
- }) => OperationDefinition<TInput, TOutput>;
68
- type QueryResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodType> = {
69
+ }) => OperationDefinition<NoInfer<TInput>, NoInfer<TOutput>, TContext>;
70
+ type QueryResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodType, TContext = HandlerContext> = {
69
71
  contract: ResourceContract<TInput, TOutput>;
70
72
  kind: "query";
71
- read: (input: z.output<TInput>, context: HandlerContext) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;
73
+ read: (input: z.output<TInput>, context: TContext) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;
72
74
  };
73
- type SubscriptionResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodType> = {
75
+ type SubscriptionResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodType, TContext = HandlerContext> = {
74
76
  contract: ResourceContract<TInput, TOutput>;
75
77
  kind: "subscription";
76
- read: QueryResourceDefinition<TInput, TOutput>["read"];
77
- subscribe: (input: z.output<TInput>, invalidate: () => void, context: HandlerContext) => RuntimeDisposer;
78
+ read: QueryResourceDefinition<TInput, TOutput, TContext>["read"];
79
+ subscribe: (input: z.output<TInput>, invalidate: () => void, context: TContext) => RuntimeDisposer;
78
80
  };
79
81
  type DerivedResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput extends z.ZodType = z.ZodType, TDependencies extends Readonly<Record<string, string>> = Readonly<Record<string, string>>, TDependencyOutputs = Readonly<Record<string, unknown>>> = {
80
82
  combine: (dependencies: TDependencyOutputs) => z.input<NoInfer<TOutput>>;
@@ -83,56 +85,68 @@ type DerivedResourceDefinition<TInput extends z.ZodType = z.ZodType, TOutput ext
83
85
  kind: "derived";
84
86
  };
85
87
  type AnyZodType = z.ZodType<any, any, any>;
86
- type ResourceDefinition = QueryResourceDefinition<AnyZodType, AnyZodType> | SubscriptionResourceDefinition<AnyZodType, AnyZodType> | DerivedResourceDefinition<AnyZodType, AnyZodType, any, any>;
88
+ type ResourceDefinition = QueryResourceDefinition<AnyZodType, AnyZodType, HandlerContext<ResourceInputMap>> | SubscriptionResourceDefinition<AnyZodType, AnyZodType, HandlerContext<ResourceInputMap>> | DerivedResourceDefinition<AnyZodType, AnyZodType, any, any>;
87
89
  type StreamSession<TClientMessage = unknown> = {
88
90
  dispose?: RuntimeDisposer;
89
91
  onMessage?: (message: TClientMessage) => Promise<void> | void;
90
92
  };
91
- type StreamHandlerDefinition<TInput extends z.ZodType = z.ZodType, TClientMessage extends z.ZodType = z.ZodType, TServerMessage extends z.ZodType = z.ZodType> = {
93
+ type StreamHandlerDefinition<TInput extends z.ZodType = z.ZodType, TClientMessage extends z.ZodType = z.ZodType, TServerMessage extends z.ZodType = z.ZodType, TContext = HandlerContext> = {
92
94
  contract: StreamContract<TInput, TClientMessage, TServerMessage>;
93
- open: (input: z.output<TInput>, context: HandlerContext & {
95
+ open: (input: z.output<TInput>, context: TContext & {
94
96
  emit: (message: z.input<NoInfer<TServerMessage>>) => void;
95
97
  fail: (cause: unknown) => void;
96
98
  }) => Promise<StreamSession<z.output<TClientMessage>>> | StreamSession<z.output<TClientMessage>>;
97
99
  };
98
- declare const defineStreamHandler: <TInput extends z.ZodType, TClientMessage extends z.ZodType, TServerMessage extends z.ZodType>(contract: StreamContract<TInput, TClientMessage, TServerMessage>, open: StreamHandlerDefinition<TInput, TClientMessage, TServerMessage>["open"]) => StreamHandlerDefinition<TInput, TClientMessage, TServerMessage>;
100
+ declare const defineStreamHandler: <TInput extends z.ZodType, TClientMessage extends z.ZodType, TServerMessage extends z.ZodType, TContext = HandlerContext>(contract: StreamContract<TInput, TClientMessage, TServerMessage>, open: StreamHandlerDefinition<TInput, TClientMessage, TServerMessage, TContext>["open"]) => StreamHandlerDefinition<TInput, TClientMessage, TServerMessage, TContext>;
99
101
  type ResourceContracts = Record<string, ResourceContract<AnyZodType, AnyZodType>>;
102
+ type ResourceInputs<TContracts extends ResourceContracts> = { [TId in keyof TContracts]: z.input<TContracts[TId]["input"]>; };
100
103
  type DependencyOutputs<TContracts extends ResourceContracts, TDependencies extends Record<string, unknown>> = { [TName in keyof TDependencies]: TDependencies[TName] extends keyof TContracts ? z.output<TContracts[TDependencies[TName]]["output"]> : never; };
101
104
  type DependencySource<TDependencies> = { [TId in keyof TDependencies]: TDependencies[TId] extends Record<string, string> ? {
102
105
  dependencies: TDependencies[TId];
103
106
  } : {
104
107
  dependencies?: never;
105
108
  }; };
106
- type QueryFor<TContract extends ResourceContract<AnyZodType, AnyZodType>> = {
109
+ type QueryFor<TContract extends ResourceContract<AnyZodType, AnyZodType>, TContracts extends ResourceContracts> = {
107
110
  contract: TContract;
108
- } & Omit<QueryResourceDefinition<TContract["input"], TContract["output"]>, "contract">;
109
- type SubscriptionFor<TContract extends ResourceContract<AnyZodType, AnyZodType>> = {
111
+ } & Omit<QueryResourceDefinition<TContract["input"], TContract["output"], HandlerContext<ResourceInputs<NoInfer<TContracts>>>>, "contract">;
112
+ type SubscriptionFor<TContract extends ResourceContract<AnyZodType, AnyZodType>, TContracts extends ResourceContracts> = {
110
113
  contract: TContract;
111
- } & Omit<SubscriptionResourceDefinition<TContract["input"], TContract["output"]>, "contract">;
114
+ } & Omit<SubscriptionResourceDefinition<TContract["input"], TContract["output"], HandlerContext<ResourceInputs<NoInfer<TContracts>>>>, "contract">;
112
115
  type DerivedFor<TContract extends ResourceContract<AnyZodType, AnyZodType>, TDependencies extends Record<string, string>, TDependencyOutputs> = {
113
116
  combine: (dependencies: TDependencyOutputs) => z.input<NoInfer<TContract["output"]>>;
114
117
  contract: TContract;
115
118
  dependencies: TDependencies;
116
119
  kind: "derived";
117
120
  };
118
- type ConfiguredResource<TContracts extends ResourceContracts, TDependencies, TId extends keyof TContracts> = QueryFor<TContracts[TId]> | SubscriptionFor<TContracts[TId]> | (TId extends keyof TDependencies ? TDependencies[TId] extends Record<string, Exclude<keyof TContracts, TId> & string> ? DerivedFor<TContracts[TId], TDependencies[TId], DependencyOutputs<TContracts, NoInfer<TDependencies[TId]>>> : never : never);
121
+ type ConfiguredResource<TContracts extends ResourceContracts, TDependencies, TId extends keyof TContracts> = QueryFor<TContracts[TId], TContracts> | SubscriptionFor<TContracts[TId], TContracts> | (TId extends keyof TDependencies ? TDependencies[TId] extends Record<string, Exclude<keyof TContracts, TId> & string> ? DerivedFor<TContracts[TId], TDependencies[TId], DependencyOutputs<TContracts, NoInfer<TDependencies[TId]>>> : never : never);
119
122
  type ConfiguredResources<TContracts extends ResourceContracts, TDependencies> = { [TId in keyof TContracts]: ConfiguredResource<TContracts, TDependencies, TId>; } & DependencySource<TDependencies>;
120
123
  type AuthDuration = `${number}${"m" | "h" | "d"}`;
121
124
  type AuthConfigDefinition = {
122
125
  mode: "cli-login";
123
126
  origins?: string[];
124
- sessionLifetime?: "never" | AuthDuration;
127
+ sessionLifetime?: "forever" | AuthDuration;
125
128
  trustedProxyPeer?: string;
126
129
  };
127
130
  type ServerConfigDefinition = {
128
131
  host?: string;
129
- logFile?: string;
130
132
  port?: number;
131
133
  productionWebAssetsDir?: string;
132
134
  watch?: boolean;
133
135
  };
134
- type StreamDefinitions = Readonly<Record<string, StreamHandlerDefinition<AnyZodType, AnyZodType, AnyZodType>>>;
135
- type OperationDefinitions = Readonly<Record<string, OperationDefinition<AnyZodType, AnyZodType>>>;
136
+ type StreamDefinitions<TContext = HandlerContext<ResourceInputMap>> = Readonly<Record<string, StreamHandlerDefinition<AnyZodType, AnyZodType, AnyZodType, TContext>>>;
137
+ type OperationDefinitions = Readonly<Record<string, OperationDefinition<AnyZodType, AnyZodType, OperationContext<ResourceInputMap>>>>;
138
+ type OperationInputs = Record<string, AnyZodType>;
139
+ type OperationOutputSchema<TOutputs, TId extends PropertyKey> = TId extends keyof TOutputs ? TOutputs[TId] extends z.ZodType ? TOutputs[TId] : z.ZodVoid : z.ZodVoid;
140
+ type ConfiguredOperations<TInputs extends OperationInputs, TOutputs, TContracts extends ResourceContracts> = { [TId in keyof TInputs]: {
141
+ input: TInputs[TId];
142
+ output?: OperationOutputSchema<TOutputs, TId>;
143
+ handle: OperationDefinition<TInputs[TId], OperationOutputSchema<TOutputs, TId>, OperationContext<ResourceInputs<TContracts>>>["handle"];
144
+ }; } & { [TId in keyof TOutputs]: TOutputs[TId] extends z.ZodType ? {
145
+ output: TOutputs[TId];
146
+ } : {
147
+ output?: never;
148
+ }; };
149
+ type NormalizedOperations<TInputs extends OperationInputs, TOutputs, TContracts extends ResourceContracts> = { [TId in keyof TInputs]: OperationDefinition<TInputs[TId], OperationOutputSchema<TOutputs, TId>, OperationContext<ResourceInputs<TContracts>>>; };
136
150
  type ConfigDefinition<TResources extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResourceDefinition>>, TStreams extends StreamDefinitions = StreamDefinitions, TOperations extends OperationDefinitions = OperationDefinitions> = {
137
151
  operations?: TOperations;
138
152
  resources: TResources;
@@ -157,11 +171,11 @@ type OvermuxServerStreams<TServer> = TServer extends {
157
171
  type OvermuxServerOperations<TServer> = TServer extends {
158
172
  operations?: infer TOperations;
159
173
  } ? NonNullable<TOperations> : never;
160
- declare const defineOvermuxServer: <const TContracts extends ResourceContracts = {}, const TDependencies = {}, const TStreams extends StreamDefinitions = {}, const TOperations extends OperationDefinitions = {}>(definition: {
161
- operations?: TOperations;
174
+ declare const defineOvermuxServer: <const TContracts extends ResourceContracts = {}, const TDependencies = {}, const TStreams extends StreamDefinitions = {}, const TInputs extends OperationInputs = {}, const TOutputs = {}>(definition: {
175
+ operations?: ConfiguredOperations<TInputs, TOutputs, NoInfer<TContracts>>;
162
176
  resources: ConfiguredResources<TContracts, TDependencies>;
163
- streams?: TStreams;
164
- }) => ConfigDefinition<ConfiguredResources<TContracts, TDependencies>, TStreams, TOperations>;
177
+ streams?: TStreams & StreamDefinitions<HandlerContext<ResourceInputs<NoInfer<TContracts>>>>;
178
+ }) => ConfigDefinition<ConfiguredResources<TContracts, TDependencies>, TStreams, NormalizedOperations<TInputs, TOutputs, TContracts>>;
165
179
  declare const defineOvermuxConfig: <const TServer extends ConfigDefinition>(definition: OvermuxConfigDefinition<TServer>) => OvermuxConfigDefinition<TServer>;
166
- export { noInputSchema as A, createOvermuxSettingsPath as B, defineStreamHandler as C, defineResourceContract as D, StreamContract as E, coreAiContextSnippets as F, packageSourceSnippet as G, notificationSchema as H, defaultAiContextSnippets as I, resolveOvermuxReturnTo as K, AiContextSnippet as L, Notifications as M, AiContextSnippetDefinition as N, defineStreamContract as O, composeAiContext as P, InstanceIdentity as R, defineOvermuxServer as S, ResourceContract as T, overmuxLogoutPath as U, notificationLinkSchema as V, overmuxSettingsPath as W, StreamHandlerDefinition as _, HandlerContext as a, defineOperation as b, OperationDefinition as c, OvermuxServerResources as d, OvermuxServerStreams as f, ServerConfigDefinition as g, RuntimeDisposer as h, DerivedResourceDefinition as i, parseJsonValue as j, jsonValueSchema as k, OvermuxConfigDefinition as l, ResourceDefinition as m, AuthDuration as n, InstanceContext as o, QueryResourceDefinition as p, techStackRecommendationsSnippet as q, ConfigDefinition as r, OperationContext as s, AuthConfigDefinition as t, OvermuxServerOperations as u, StreamSession as v, ContractInputArguments as w, defineOvermuxConfig as x, SubscriptionResourceDefinition as y, Notification as z };
167
- //# sourceMappingURL=index-DS70rKzo.d.ts.map
180
+ export { noInputSchema as A, InstanceIdentity as B, defineStreamHandler as C, defineResourceContract as D, StreamContract as E, AiContextSnippetDefinition as F, overmuxLogoutPath as G, createOvermuxSettingsPath as H, coreAiContextSnippets as I, overmuxSettingsPath as K, defaultAiContextSnippets as L, Notifications as M, composeAiContext as N, defineStreamContract as O, AiContextSnippet as P, packageSourceSnippet as R, defineOvermuxServer as S, ResourceContract as T, notificationLinkSchema as U, Notification as V, notificationSchema as W, StreamHandlerDefinition as _, HandlerContext as a, defineOperation as b, OperationDefinition as c, OvermuxServerResources as d, OvermuxServerStreams as f, ServerConfigDefinition as g, RuntimeDisposer as h, DerivedResourceDefinition as i, parseJsonValue as j, jsonValueSchema as k, OvermuxConfigDefinition as l, ResourceDefinition as m, AuthDuration as n, InstanceContext as o, QueryResourceDefinition as p, resolveOvermuxReturnTo as q, ConfigDefinition as r, OperationContext as s, AuthConfigDefinition as t, OvermuxServerOperations as u, StreamSession as v, ContractInputArguments as w, defineOvermuxConfig as x, SubscriptionResourceDefinition as y, techStackRecommendationsSnippet as z };
181
+ //# sourceMappingURL=index-Cz3xkCa4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Cz3xkCa4.d.ts","names":[],"sources":["../../../shared/dist/index.d.ts","../../../ai-context/dist/index.d.ts","../../src/public/ai-context.ts","../../src/public/notifications.ts","../../src/public/contracts.ts","../../src/public/config.ts"],"mappings":";;;cAEc;cACA;cACA,yBAAyB;cACzB,4BAA4B;;;cAG5B,wBAAwB,EAAE,mBAAmB,EAAE,WAAW,EAAE;cAC5D,oBAAoB,EAAE;EAClC,MAAM,EAAE,YAAY,EAAE;EACtB,MAAM,EAAE,YAAY,EAAE;IACpB,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE;KACzC,EAAE,KAAK;EACV,OAAO,EAAE;GACR,EAAE,KAAK;KACL,eAAe,EAAE,aAAa;KAa9B;EACH;EACA;;;;;cC9BY;cACA;cACA;KACT,2BAA2B;KAC3B,sCAAsC;cAC7B;cACA;;;cCOD,mBAAoB,UAAU;;;KCP/B;EACV,OAAO,cAAc,iBAAiB;;;;cCN3B,eAAa,EAAA;cAEb,iBAAiB,EAAE;cAWnB,iBAAkB,GAAG,OAAO,MAAI;KAGjC,uBAAuB,eAAe,EAAE,6BAChC,EAAE,MAAM,WACrB,QAAQ,QAAQ,EAAE,MAAM,wBACxB,OAAO,EAAE,MAAM;KAEV,iBACV,eAAe,EAAE,UAA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,oBACN,QAAQ,MACR,sBAAsB,UAAU,MAChC,iBAAiB,eAAe;UAInC,aAAa,WAAW,SAAS,aAAa,EAAE;EAC3C,QAAQ,SAAS;;EACjB;;KAGH,qBACH,gBAAgB,iBAChB,UACA,mBAAmB,wBAElB,aAAa,UAAU,oBACtB,QAAQ,MACR,sBAAsB,UAAU,MAChC,iBAAiB,eAAe;KAuBxB,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,gBAAgB,4BAChB,eACN;EACA,aAAa,qBAAqB,SAAS,UAAU,QAAQ;EAC7D,WAAW,oBAAoB,YAAY;EAC3C,UAAU,WACR,kBAAkB,eAAe,eAAe,QAAQ;MACxD,iBACF,oBAAoB,YAAY,gBAChC,UACA,qBAAqB,SAAS,UAAU;cAM7B,4BAA6B,gBAAgB,kBACxD,YAAY,wBAAwB,aACnC,wBAAwB"}
@@ -1,2 +1,2 @@
1
- import { A as noInputSchema, B as createOvermuxSettingsPath, C as defineStreamHandler, D as defineResourceContract, E as StreamContract, F as coreAiContextSnippets, G as packageSourceSnippet, H as notificationSchema, I as defaultAiContextSnippets, K as resolveOvermuxReturnTo, L as AiContextSnippet, M as Notifications, N as AiContextSnippetDefinition, O as defineStreamContract, P as composeAiContext, R as InstanceIdentity, S as defineOvermuxServer, T as ResourceContract, U as overmuxLogoutPath, V as notificationLinkSchema, W as overmuxSettingsPath, _ as StreamHandlerDefinition, a as HandlerContext, b as defineOperation, c as OperationDefinition, d as OvermuxServerResources, f as OvermuxServerStreams, g as ServerConfigDefinition, h as RuntimeDisposer, i as DerivedResourceDefinition, j as parseJsonValue, k as jsonValueSchema, l as OvermuxConfigDefinition, m as ResourceDefinition, n as AuthDuration, o as InstanceContext, p as QueryResourceDefinition, q as techStackRecommendationsSnippet, r as ConfigDefinition, s as OperationContext, t as AuthConfigDefinition, u as OvermuxServerOperations, v as StreamSession, w as ContractInputArguments, x as defineOvermuxConfig, y as SubscriptionResourceDefinition, z as Notification } from "./index-DS70rKzo.js";
1
+ import { A as noInputSchema, B as InstanceIdentity, C as defineStreamHandler, D as defineResourceContract, E as StreamContract, F as AiContextSnippetDefinition, G as overmuxLogoutPath, H as createOvermuxSettingsPath, I as coreAiContextSnippets, K as overmuxSettingsPath, L as defaultAiContextSnippets, M as Notifications, N as composeAiContext, O as defineStreamContract, P as AiContextSnippet, R as packageSourceSnippet, S as defineOvermuxServer, T as ResourceContract, U as notificationLinkSchema, V as Notification, W as notificationSchema, _ as StreamHandlerDefinition, a as HandlerContext, b as defineOperation, c as OperationDefinition, d as OvermuxServerResources, f as OvermuxServerStreams, g as ServerConfigDefinition, h as RuntimeDisposer, i as DerivedResourceDefinition, j as parseJsonValue, k as jsonValueSchema, l as OvermuxConfigDefinition, m as ResourceDefinition, n as AuthDuration, o as InstanceContext, p as QueryResourceDefinition, q as resolveOvermuxReturnTo, r as ConfigDefinition, s as OperationContext, t as AuthConfigDefinition, u as OvermuxServerOperations, v as StreamSession, w as ContractInputArguments, x as defineOvermuxConfig, y as SubscriptionResourceDefinition, z as techStackRecommendationsSnippet } from "./index-Cz3xkCa4.js";
2
2
  export { type AiContextSnippet, type AiContextSnippetDefinition, type AuthConfigDefinition, type AuthDuration, type ConfigDefinition, type ContractInputArguments, type DerivedResourceDefinition, type HandlerContext, type InstanceContext, type InstanceIdentity, type Notification, type Notifications, type OperationContext, type OperationDefinition, type OvermuxConfigDefinition, type OvermuxServerOperations, type OvermuxServerResources, type OvermuxServerStreams, type QueryResourceDefinition, type ResourceContract, type ResourceDefinition, type RuntimeDisposer, type ServerConfigDefinition, type StreamContract, type StreamHandlerDefinition, type StreamSession, type SubscriptionResourceDefinition, composeAiContext, coreAiContextSnippets, createOvermuxSettingsPath, defaultAiContextSnippets, defineOperation, defineOvermuxConfig, defineOvermuxServer, defineResourceContract, defineStreamContract, defineStreamHandler, jsonValueSchema, noInputSchema, notificationLinkSchema, notificationSchema, overmuxLogoutPath, overmuxSettingsPath, packageSourceSnippet, parseJsonValue, resolveOvermuxReturnTo, techStackRecommendationsSnippet };
@@ -1,13 +1,15 @@
1
- import { a as notificationSchema, c as packageSourceSnippet, i as notificationLinkSchema, l as resolveOvermuxReturnTo, n as createOvermuxSettingsPath, o as overmuxLogoutPath, s as overmuxSettingsPath, u as techStackRecommendationsSnippet } from "./notifications-av0FK0yZ.js";
1
+ import { a as notificationSchema, i as notificationLinkSchema, l as resolveOvermuxReturnTo, n as createOvermuxSettingsPath, o as overmuxLogoutPath, s as overmuxSettingsPath } from "./notifications-BFAD3QQl.js";
2
2
  import { z } from "zod";
3
- //#region src/public/ai-context.ts
3
+ //#region ../ai-context/dist/index.js
4
+ const packageSourceSnippet = "package-source";
5
+ const techStackRecommendationsSnippet = "tech-stack-recommendations";
4
6
  const coreAiContextSnippets = [packageSourceSnippet];
5
7
  const defaultAiContextSnippets = [...coreAiContextSnippets, techStackRecommendationsSnippet];
6
8
  const packageSourceSnippetContent = `Overmux ships with documentation and TypeScript source.
7
9
 
8
- Run \`overmux docs\` to find the installed documentation and source for the overmux cli.
10
+ Run \`overmux docs path\` to find the installed documentation directory for the Overmux CLI. This prints a documentation directory, not source paths.
9
11
 
10
- E.g. \`node_modules/overmux\` and \`node_modules/@overmux/xterm\`.
12
+ Inspect TypeScript source in installed packages, e.g. \`node_modules/overmux/src\` and \`node_modules/@overmux/xterm/src\`.
11
13
 
12
14
  Inspect these files so guidance matches the versions used by the application.`;
13
15
  const techStackRecommendationsSnippetContent = `Prefer pnpm as the package manager, TanStack Router for routing, shadcn/ui for UI components, and Zod for schemas and runtime validation. Follow the application's established stack when it already differs.`;
@@ -15,6 +17,8 @@ const aiContextContentBySnippet = {
15
17
  [packageSourceSnippet]: packageSourceSnippetContent,
16
18
  [techStackRecommendationsSnippet]: techStackRecommendationsSnippetContent
17
19
  };
20
+ //#endregion
21
+ //#region src/public/ai-context.ts
18
22
  const composeAiContext = (snippets) => snippets.length === 0 ? "" : `${snippets.map((snippet) => `## ${snippet}\n\n${aiContextContentBySnippet[snippet]}`).join("\n\n")}\n`;
19
23
  //#endregion
20
24
  //#region src/public/config.ts
@@ -27,7 +31,17 @@ const defineStreamHandler = (contract, open) => ({
27
31
  contract,
28
32
  open
29
33
  });
30
- const defineOvermuxServer = (definition) => definition;
34
+ const normalizeOperations = (operations) => {
35
+ if (operations === void 0) return;
36
+ return Object.fromEntries(Object.entries(operations).map(([id, definition]) => [id, {
37
+ ...definition,
38
+ output: definition.output ?? z.void()
39
+ }]));
40
+ };
41
+ const defineOvermuxServer = (definition) => ({
42
+ ...definition,
43
+ operations: normalizeOperations(definition.operations)
44
+ });
31
45
  const defineOvermuxConfig = (definition) => definition;
32
46
  //#endregion
33
47
  //#region src/public/contracts.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/public/ai-context.ts","../../src/public/config.ts","../../src/public/contracts.ts"],"sourcesContent":["import {\n packageSourceSnippet,\n techStackRecommendationsSnippet,\n type AiContextSnippet,\n} from \"@overmux/shared\";\n\nexport {\n packageSourceSnippet,\n techStackRecommendationsSnippet,\n type AiContextSnippet,\n};\nexport type AiContextSnippetDefinition = readonly AiContextSnippet[];\n\nexport const coreAiContextSnippets = [\n packageSourceSnippet,\n] as const satisfies AiContextSnippetDefinition;\nexport const defaultAiContextSnippets = [\n ...coreAiContextSnippets,\n techStackRecommendationsSnippet,\n] as const satisfies AiContextSnippetDefinition;\n\nconst packageSourceSnippetContent = `Overmux ships with documentation and TypeScript source.\n\nRun \\`overmux docs\\` to find the installed documentation and source for the overmux cli.\n\nE.g. \\`node_modules/overmux\\` and \\`node_modules/@overmux/xterm\\`.\n\nInspect these files so guidance matches the versions used by the application.`;\n\nconst techStackRecommendationsSnippetContent = `Prefer pnpm as the package manager, TanStack Router for routing, shadcn/ui for UI components, and Zod for schemas and runtime validation. Follow the application's established stack when it already differs.`;\n\nconst aiContextContentBySnippet: Record<AiContextSnippet, string> = {\n [packageSourceSnippet]: packageSourceSnippetContent,\n [techStackRecommendationsSnippet]: techStackRecommendationsSnippetContent,\n};\n\nexport const composeAiContext = (snippets: AiContextSnippetDefinition) =>\n snippets.length === 0\n ? \"\"\n : `${snippets\n .map(\n (snippet) => `## ${snippet}\\n\\n${aiContextContentBySnippet[snippet]}`,\n )\n .join(\"\\n\\n\")}\\n`;\n","import { z } from \"zod\";\n\nimport type { AiContextSnippetDefinition } from \"./ai-context\";\nimport type { Notifications } from \"./notifications\";\nimport type { ResourceContract, StreamContract } from \"./contracts\";\n\nexport type RuntimeDisposer = () => Promise<void> | void;\n\nexport type InstanceContext = {\n getInstanceId: () => string;\n getDeepLinkPrefix: () => string;\n};\n\nexport type HandlerContext = {\n instance: InstanceContext;\n invalidate: (contract: ResourceContract, input?: unknown) => void;\n signal: AbortSignal;\n};\n\nexport type OperationContext = HandlerContext & {\n notifications: Notifications;\n};\n\nexport type OperationDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodVoid,\n> = {\n handle: (\n input: z.output<TInput>,\n context: OperationContext,\n ) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;\n input: TInput;\n output: TOutput;\n};\n\nexport const defineOperation = <\n TInput extends z.ZodType,\n TOutput extends z.ZodType = z.ZodVoid,\n>({\n handle,\n input,\n output,\n}: {\n handle: OperationDefinition<TInput, TOutput>[\"handle\"];\n input: TInput;\n output?: TOutput;\n}): OperationDefinition<TInput, TOutput> => ({\n handle,\n input,\n output: (output ?? z.void()) as TOutput,\n});\n\nexport type QueryResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n> = {\n contract: ResourceContract<TInput, TOutput>;\n kind: \"query\";\n read: (\n input: z.output<TInput>,\n context: HandlerContext,\n ) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;\n};\n\nexport type SubscriptionResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n> = {\n contract: ResourceContract<TInput, TOutput>;\n kind: \"subscription\";\n read: QueryResourceDefinition<TInput, TOutput>[\"read\"];\n subscribe: (\n input: z.output<TInput>,\n invalidate: () => void,\n context: HandlerContext,\n ) => RuntimeDisposer;\n};\n\nexport type DerivedResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n TDependencies extends Readonly<Record<string, string>> = Readonly<\n Record<string, string>\n >,\n TDependencyOutputs = Readonly<Record<string, unknown>>,\n> = {\n combine: (dependencies: TDependencyOutputs) => z.input<NoInfer<TOutput>>;\n contract: ResourceContract<TInput, TOutput>;\n dependencies: TDependencies;\n kind: \"derived\";\n};\n\ntype AnyZodType = z.ZodType<any, any, any>;\n\nexport type ResourceDefinition =\n | QueryResourceDefinition<AnyZodType, AnyZodType>\n | SubscriptionResourceDefinition<AnyZodType, AnyZodType>\n | DerivedResourceDefinition<AnyZodType, AnyZodType, any, any>;\n\nexport type StreamSession<TClientMessage = unknown> = {\n dispose?: RuntimeDisposer;\n onMessage?: (message: TClientMessage) => Promise<void> | void;\n};\n\nexport type StreamHandlerDefinition<\n TInput extends z.ZodType = z.ZodType,\n TClientMessage extends z.ZodType = z.ZodType,\n TServerMessage extends z.ZodType = z.ZodType,\n> = {\n contract: StreamContract<TInput, TClientMessage, TServerMessage>;\n open: (\n input: z.output<TInput>,\n context: HandlerContext & {\n emit: (message: z.input<NoInfer<TServerMessage>>) => void;\n fail: (cause: unknown) => void;\n },\n ) =>\n | Promise<StreamSession<z.output<TClientMessage>>>\n | StreamSession<z.output<TClientMessage>>;\n};\n\nexport const defineStreamHandler = <\n TInput extends z.ZodType,\n TClientMessage extends z.ZodType,\n TServerMessage extends z.ZodType,\n>(\n contract: StreamContract<TInput, TClientMessage, TServerMessage>,\n open: StreamHandlerDefinition<TInput, TClientMessage, TServerMessage>[\"open\"],\n): StreamHandlerDefinition<TInput, TClientMessage, TServerMessage> => ({\n contract,\n open,\n});\n\ntype ResourceContracts = Record<\n string,\n ResourceContract<AnyZodType, AnyZodType>\n>;\n\ntype DependencyOutputs<\n TContracts extends ResourceContracts,\n TDependencies extends Record<string, unknown>,\n> = {\n [TName in keyof TDependencies]: TDependencies[TName] extends keyof TContracts\n ? z.output<TContracts[TDependencies[TName]][\"output\"]>\n : never;\n};\n\ntype DependencySource<TDependencies> = {\n [TId in keyof TDependencies]: TDependencies[TId] extends Record<\n string,\n string\n >\n ? { dependencies: TDependencies[TId] }\n : { dependencies?: never };\n};\n\ntype QueryFor<TContract extends ResourceContract<AnyZodType, AnyZodType>> = {\n contract: TContract;\n} & Omit<\n QueryResourceDefinition<TContract[\"input\"], TContract[\"output\"]>,\n \"contract\"\n>;\n\ntype SubscriptionFor<\n TContract extends ResourceContract<AnyZodType, AnyZodType>,\n> = { contract: TContract } & Omit<\n SubscriptionResourceDefinition<TContract[\"input\"], TContract[\"output\"]>,\n \"contract\"\n>;\n\ntype DerivedFor<\n TContract extends ResourceContract<AnyZodType, AnyZodType>,\n TDependencies extends Record<string, string>,\n TDependencyOutputs,\n> = {\n combine: (\n dependencies: TDependencyOutputs,\n ) => z.input<NoInfer<TContract[\"output\"]>>;\n contract: TContract;\n dependencies: TDependencies;\n kind: \"derived\";\n};\n\ntype ConfiguredResource<\n TContracts extends ResourceContracts,\n TDependencies,\n TId extends keyof TContracts,\n> =\n | QueryFor<TContracts[TId]>\n | SubscriptionFor<TContracts[TId]>\n | (TId extends keyof TDependencies\n ? TDependencies[TId] extends Record<\n string,\n Exclude<keyof TContracts, TId> & string\n >\n ? DerivedFor<\n TContracts[TId],\n TDependencies[TId],\n DependencyOutputs<TContracts, NoInfer<TDependencies[TId]>>\n >\n : never\n : never);\n\ntype ConfiguredResources<\n TContracts extends ResourceContracts,\n TDependencies,\n> = {\n [TId in keyof TContracts]: ConfiguredResource<TContracts, TDependencies, TId>;\n} & DependencySource<TDependencies>;\n\nexport type AuthDuration = `${number}${\"m\" | \"h\" | \"d\"}`;\n\nexport type AuthConfigDefinition = {\n mode: \"cli-login\";\n origins?: string[];\n sessionLifetime?: \"never\" | AuthDuration;\n trustedProxyPeer?: string;\n};\n\nexport type ServerConfigDefinition = {\n host?: string;\n logFile?: string;\n port?: number;\n productionWebAssetsDir?: string;\n watch?: boolean;\n};\n\ntype StreamDefinitions = Readonly<\n Record<string, StreamHandlerDefinition<AnyZodType, AnyZodType, AnyZodType>>\n>;\n\ntype OperationDefinitions = Readonly<\n Record<string, OperationDefinition<AnyZodType, AnyZodType>>\n>;\n\nexport type ConfigDefinition<\n TResources extends Readonly<Record<string, unknown>> = Readonly<\n Record<string, ResourceDefinition>\n >,\n TStreams extends StreamDefinitions = StreamDefinitions,\n TOperations extends OperationDefinitions = OperationDefinitions,\n> = {\n operations?: TOperations;\n resources: TResources;\n streams?: TStreams;\n};\n\nexport type OvermuxConfigDefinition<\n TServer extends ConfigDefinition = ConfigDefinition,\n> = ServerConfigDefinition & {\n aiContextSnippets?: AiContextSnippetDefinition;\n auth: AuthConfigDefinition;\n debug?: boolean;\n instanceId?: string | ((context: { port: number }) => string);\n server: TServer;\n vite?: string;\n};\n\nexport type OvermuxServerResources<TServer> = TServer extends {\n resources: infer TResources;\n}\n ? TResources\n : never;\n\nexport type OvermuxServerStreams<TServer> = TServer extends {\n streams?: infer TStreams;\n}\n ? NonNullable<TStreams>\n : never;\n\nexport type OvermuxServerOperations<TServer> = TServer extends {\n operations?: infer TOperations;\n}\n ? NonNullable<TOperations>\n : never;\n\nexport const defineOvermuxServer = <\n const TContracts extends ResourceContracts = {},\n const TDependencies = {},\n const TStreams extends StreamDefinitions = {},\n const TOperations extends OperationDefinitions = {},\n>(definition: {\n operations?: TOperations;\n resources: ConfiguredResources<TContracts, TDependencies>;\n streams?: TStreams;\n}): ConfigDefinition<\n ConfiguredResources<TContracts, TDependencies>,\n TStreams,\n TOperations\n> => definition;\n\nexport const defineOvermuxConfig = <const TServer extends ConfigDefinition>(\n definition: OvermuxConfigDefinition<TServer>,\n): OvermuxConfigDefinition<TServer> => definition;\n","import { z } from \"zod\";\n\nexport const noInputSchema = z.void();\n\nexport const jsonValueSchema: z.ZodType<unknown> = z.lazy(() =>\n z.union([\n z.string(),\n z.number().finite(),\n z.boolean(),\n z.null(),\n z.array(jsonValueSchema),\n z.record(z.string(), jsonValueSchema),\n ]),\n);\n\nexport const parseJsonValue = <T>(value: T): T =>\n jsonValueSchema.parse(value) as T;\n\nexport type ContractInputArguments<TInput extends z.ZodType> =\n undefined extends z.input<TInput>\n ? [input?: Exclude<z.input<TInput>, undefined>]\n : [input: z.input<TInput>];\n\nexport type ResourceContract<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n> = {\n input: TInput;\n output: TOutput;\n};\n\nexport const defineResourceContract = <\n TInput extends z.ZodType,\n TOutput extends z.ZodType,\n>(\n contract: ResourceContract<TInput, TOutput>,\n): ResourceContract<TInput, TOutput> => contract;\n\nexport type StreamContract<\n TInput extends z.ZodType = z.ZodType,\n TClientMessage extends z.ZodType = z.ZodType,\n TServerMessage extends z.ZodType = z.ZodType,\n> = {\n clientMessage: TClientMessage;\n input: TInput;\n serverMessage: TServerMessage;\n};\n\nexport const defineStreamContract = <\n TInput extends z.ZodType,\n TClientMessage extends z.ZodType,\n TServerMessage extends z.ZodType,\n>(\n contract: StreamContract<TInput, TClientMessage, TServerMessage>,\n): StreamContract<TInput, TClientMessage, TServerMessage> => contract;\n"],"mappings":";;;AAaA,MAAa,wBAAwB,CACnC,oBACF;AACA,MAAa,2BAA2B,CACtC,GAAG,uBACH,+BACF;AAEA,MAAM,8BAA8B;;;;;;;AAQpC,MAAM,yCAAyC;AAE/C,MAAM,4BAA8D;EACjE,uBAAuB;EACvB,kCAAkC;AACrC;AAEA,MAAa,oBAAoB,aAC/B,SAAS,WAAW,IAChB,KACA,GAAG,SACA,KACE,YAAY,MAAM,QAAQ,MAAM,0BAA0B,UAC7D,CAAC,CACA,KAAK,MAAM,EAAE;;;ACRtB,MAAa,mBAGX,EACA,QACA,OACA,cAK2C;CAC3C;CACA;CACA,QAAS,UAAU,EAAE,KAAK;AAC5B;AAuEA,MAAa,uBAKX,UACA,UACqE;CACrE;CACA;AACF;AAiJA,MAAa,uBAKX,eAQG;AAEL,MAAa,uBACX,eACqC;;;ACnSvC,MAAa,gBAAgB,EAAE,KAAK;AAEpC,MAAa,kBAAsC,EAAE,WACnD,EAAE,MAAM;CACN,EAAE,OAAO;CACT,EAAE,OAAO,CAAC,CAAC,OAAO;CAClB,EAAE,QAAQ;CACV,EAAE,KAAK;CACP,EAAE,MAAM,eAAe;CACvB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AACtC,CAAC,CACH;AAEA,MAAa,kBAAqB,UAChC,gBAAgB,MAAM,KAAK;AAe7B,MAAa,0BAIX,aACsC;AAYxC,MAAa,wBAKX,aAC2D"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../ai-context/dist/index.js","../../src/public/ai-context.ts","../../src/public/config.ts","../../src/public/contracts.ts"],"sourcesContent":["//#region src/index.ts\nconst packageSourceSnippet = \"package-source\";\nconst techStackRecommendationsSnippet = \"tech-stack-recommendations\";\nconst aiContextSnippets = [packageSourceSnippet, techStackRecommendationsSnippet];\nconst coreAiContextSnippets = [packageSourceSnippet];\nconst defaultAiContextSnippets = [...coreAiContextSnippets, techStackRecommendationsSnippet];\nconst packageSourceSnippetContent = `Overmux ships with documentation and TypeScript source.\n\nRun \\`overmux docs path\\` to find the installed documentation directory for the Overmux CLI. This prints a documentation directory, not source paths.\n\nInspect TypeScript source in installed packages, e.g. \\`node_modules/overmux/src\\` and \\`node_modules/@overmux/xterm/src\\`.\n\nInspect these files so guidance matches the versions used by the application.`;\nconst techStackRecommendationsSnippetContent = `Prefer pnpm as the package manager, TanStack Router for routing, shadcn/ui for UI components, and Zod for schemas and runtime validation. Follow the application's established stack when it already differs.`;\nconst aiContextContentBySnippet = {\n\t[packageSourceSnippet]: packageSourceSnippetContent,\n\t[techStackRecommendationsSnippet]: techStackRecommendationsSnippetContent\n};\n//#endregion\nexport { aiContextContentBySnippet, aiContextSnippets, coreAiContextSnippets, defaultAiContextSnippets, packageSourceSnippet, techStackRecommendationsSnippet };\n\n//# sourceMappingURL=index.js.map","import {\n aiContextContentBySnippet,\n type AiContextSnippetDefinition,\n} from \"@overmux/ai-context\";\n\nexport {\n coreAiContextSnippets,\n defaultAiContextSnippets,\n packageSourceSnippet,\n techStackRecommendationsSnippet,\n type AiContextSnippet,\n type AiContextSnippetDefinition,\n} from \"@overmux/ai-context\";\n\nexport const composeAiContext = (snippets: AiContextSnippetDefinition) =>\n snippets.length === 0\n ? \"\"\n : `${snippets\n .map(\n (snippet) => `## ${snippet}\\n\\n${aiContextContentBySnippet[snippet]}`,\n )\n .join(\"\\n\\n\")}\\n`;\n","import { z } from \"zod\";\n\nimport type { AiContextSnippetDefinition } from \"./ai-context\";\nimport type { Notifications } from \"./notifications\";\nimport type { ResourceContract, StreamContract } from \"./contracts\";\n\nexport type RuntimeDisposer = () => Promise<void> | void;\n\nexport type InstanceContext = {\n getInstanceId: () => string;\n getDeepLinkPrefix: () => string;\n};\n\ntype ResourceInputMap = Readonly<Record<string, unknown>>;\n\n// Keep IDs paired with their raw inputs when checking calls and reusable handlers.\ntype InvalidationArguments<TInputs extends ResourceInputMap> = {\n [TId in keyof TInputs & string]: [resourceId: TId, input?: TInputs[TId]];\n}[keyof TInputs & string];\n\nexport type HandlerContext<TInputs extends ResourceInputMap = {}> = {\n instance: InstanceContext;\n invalidate: (...args: InvalidationArguments<TInputs>) => void;\n signal: AbortSignal;\n};\n\nexport type OperationContext<TInputs extends ResourceInputMap = {}> =\n HandlerContext<TInputs> & {\n notifications: Notifications;\n };\n\nexport type OperationDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodVoid,\n TContext = OperationContext,\n> = {\n handle: (\n input: z.output<TInput>,\n context: TContext,\n ) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;\n input: TInput;\n output: TOutput;\n};\n\n// Infer schemas from this definition, not a surrounding operation map's broad constraint.\nexport const defineOperation = <\n TInput extends z.ZodType,\n TOutput extends z.ZodType = z.ZodVoid,\n TContext = OperationContext,\n>({\n handle,\n input,\n output,\n}: {\n handle: OperationDefinition<TInput, TOutput, TContext>[\"handle\"];\n input: TInput;\n output?: TOutput;\n}): OperationDefinition<NoInfer<TInput>, NoInfer<TOutput>, TContext> => ({\n handle,\n input,\n output: (output ?? z.void()) as TOutput,\n});\n\nexport type QueryResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n TContext = HandlerContext,\n> = {\n contract: ResourceContract<TInput, TOutput>;\n kind: \"query\";\n read: (\n input: z.output<TInput>,\n context: TContext,\n ) => Promise<z.input<NoInfer<TOutput>>> | z.input<NoInfer<TOutput>>;\n};\n\nexport type SubscriptionResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n TContext = HandlerContext,\n> = {\n contract: ResourceContract<TInput, TOutput>;\n kind: \"subscription\";\n read: QueryResourceDefinition<TInput, TOutput, TContext>[\"read\"];\n subscribe: (\n input: z.output<TInput>,\n invalidate: () => void,\n context: TContext,\n ) => RuntimeDisposer;\n};\n\nexport type DerivedResourceDefinition<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n TDependencies extends Readonly<Record<string, string>> = Readonly<\n Record<string, string>\n >,\n TDependencyOutputs = Readonly<Record<string, unknown>>,\n> = {\n combine: (dependencies: TDependencyOutputs) => z.input<NoInfer<TOutput>>;\n contract: ResourceContract<TInput, TOutput>;\n dependencies: TDependencies;\n kind: \"derived\";\n};\n\ntype AnyZodType = z.ZodType<any, any, any>;\n\nexport type ResourceDefinition =\n | QueryResourceDefinition<\n AnyZodType,\n AnyZodType,\n HandlerContext<ResourceInputMap>\n >\n | SubscriptionResourceDefinition<\n AnyZodType,\n AnyZodType,\n HandlerContext<ResourceInputMap>\n >\n | DerivedResourceDefinition<AnyZodType, AnyZodType, any, any>;\n\nexport type StreamSession<TClientMessage = unknown> = {\n dispose?: RuntimeDisposer;\n onMessage?: (message: TClientMessage) => Promise<void> | void;\n};\n\nexport type StreamHandlerDefinition<\n TInput extends z.ZodType = z.ZodType,\n TClientMessage extends z.ZodType = z.ZodType,\n TServerMessage extends z.ZodType = z.ZodType,\n TContext = HandlerContext,\n> = {\n contract: StreamContract<TInput, TClientMessage, TServerMessage>;\n open: (\n input: z.output<TInput>,\n context: TContext & {\n emit: (message: z.input<NoInfer<TServerMessage>>) => void;\n fail: (cause: unknown) => void;\n },\n ) =>\n | Promise<StreamSession<z.output<TClientMessage>>>\n | StreamSession<z.output<TClientMessage>>;\n};\n\nexport const defineStreamHandler = <\n TInput extends z.ZodType,\n TClientMessage extends z.ZodType,\n TServerMessage extends z.ZodType,\n TContext = HandlerContext,\n>(\n contract: StreamContract<TInput, TClientMessage, TServerMessage>,\n open: StreamHandlerDefinition<\n TInput,\n TClientMessage,\n TServerMessage,\n TContext\n >[\"open\"],\n): StreamHandlerDefinition<\n TInput,\n TClientMessage,\n TServerMessage,\n TContext\n> => ({\n contract,\n open,\n});\n\ntype ResourceContracts = Record<\n string,\n ResourceContract<AnyZodType, AnyZodType>\n>;\n\ntype ResourceInputs<TContracts extends ResourceContracts> = {\n [TId in keyof TContracts]: z.input<TContracts[TId][\"input\"]>;\n};\n\ntype DependencyOutputs<\n TContracts extends ResourceContracts,\n TDependencies extends Record<string, unknown>,\n> = {\n [TName in keyof TDependencies]: TDependencies[TName] extends keyof TContracts\n ? z.output<TContracts[TDependencies[TName]][\"output\"]>\n : never;\n};\n\ntype DependencySource<TDependencies> = {\n [TId in keyof TDependencies]: TDependencies[TId] extends Record<\n string,\n string\n >\n ? { dependencies: TDependencies[TId] }\n : { dependencies?: never };\n};\n\ntype QueryFor<\n TContract extends ResourceContract<AnyZodType, AnyZodType>,\n TContracts extends ResourceContracts,\n> = {\n contract: TContract;\n} & Omit<\n QueryResourceDefinition<\n TContract[\"input\"],\n TContract[\"output\"],\n HandlerContext<ResourceInputs<NoInfer<TContracts>>>\n >,\n \"contract\"\n>;\n\ntype SubscriptionFor<\n TContract extends ResourceContract<AnyZodType, AnyZodType>,\n TContracts extends ResourceContracts,\n> = { contract: TContract } & Omit<\n SubscriptionResourceDefinition<\n TContract[\"input\"],\n TContract[\"output\"],\n HandlerContext<ResourceInputs<NoInfer<TContracts>>>\n >,\n \"contract\"\n>;\n\ntype DerivedFor<\n TContract extends ResourceContract<AnyZodType, AnyZodType>,\n TDependencies extends Record<string, string>,\n TDependencyOutputs,\n> = {\n combine: (\n dependencies: TDependencyOutputs,\n ) => z.input<NoInfer<TContract[\"output\"]>>;\n contract: TContract;\n dependencies: TDependencies;\n kind: \"derived\";\n};\n\ntype ConfiguredResource<\n TContracts extends ResourceContracts,\n TDependencies,\n TId extends keyof TContracts,\n> =\n | QueryFor<TContracts[TId], TContracts>\n | SubscriptionFor<TContracts[TId], TContracts>\n | (TId extends keyof TDependencies\n ? TDependencies[TId] extends Record<\n string,\n Exclude<keyof TContracts, TId> & string\n >\n ? DerivedFor<\n TContracts[TId],\n TDependencies[TId],\n DependencyOutputs<TContracts, NoInfer<TDependencies[TId]>>\n >\n : never\n : never);\n\ntype ConfiguredResources<\n TContracts extends ResourceContracts,\n TDependencies,\n> = {\n [TId in keyof TContracts]: ConfiguredResource<TContracts, TDependencies, TId>;\n} & DependencySource<TDependencies>;\n\nexport type AuthDuration = `${number}${\"m\" | \"h\" | \"d\"}`;\n\nexport type AuthConfigDefinition = {\n mode: \"cli-login\";\n origins?: string[];\n sessionLifetime?: \"forever\" | AuthDuration;\n trustedProxyPeer?: string;\n};\n\nexport type ServerConfigDefinition = {\n host?: string;\n port?: number;\n productionWebAssetsDir?: string;\n watch?: boolean;\n};\n\ntype StreamDefinitions<TContext = HandlerContext<ResourceInputMap>> = Readonly<\n Record<\n string,\n StreamHandlerDefinition<AnyZodType, AnyZodType, AnyZodType, TContext>\n >\n>;\n\ntype OperationDefinitions = Readonly<\n Record<\n string,\n OperationDefinition<\n AnyZodType,\n AnyZodType,\n OperationContext<ResourceInputMap>\n >\n >\n>;\n\ntype OperationInputs = Record<string, AnyZodType>;\n\ntype OperationOutputSchema<\n TOutputs,\n TId extends PropertyKey,\n> = TId extends keyof TOutputs\n ? TOutputs[TId] extends z.ZodType\n ? TOutputs[TId]\n : z.ZodVoid\n : z.ZodVoid;\n\ntype ConfiguredOperations<\n TInputs extends OperationInputs,\n TOutputs,\n TContracts extends ResourceContracts,\n> = {\n [TId in keyof TInputs]: {\n input: TInputs[TId];\n output?: OperationOutputSchema<TOutputs, TId>;\n handle: OperationDefinition<\n TInputs[TId],\n OperationOutputSchema<TOutputs, TId>,\n OperationContext<ResourceInputs<TContracts>>\n >[\"handle\"];\n };\n} & {\n [TId in keyof TOutputs]: TOutputs[TId] extends z.ZodType\n ? { output: TOutputs[TId] }\n : { output?: never };\n};\n\ntype NormalizedOperations<\n TInputs extends OperationInputs,\n TOutputs,\n TContracts extends ResourceContracts,\n> = {\n [TId in keyof TInputs]: OperationDefinition<\n TInputs[TId],\n OperationOutputSchema<TOutputs, TId>,\n OperationContext<ResourceInputs<TContracts>>\n >;\n};\n\nconst normalizeOperations = <\n TInputs extends OperationInputs,\n TOutputs,\n TContracts extends ResourceContracts,\n>(\n operations: ConfiguredOperations<TInputs, TOutputs, TContracts> | undefined,\n): NormalizedOperations<TInputs, TOutputs, TContracts> | undefined => {\n if (operations === undefined) {\n return undefined;\n }\n // Preserve every key and handler; only absent output schemas become ZodVoid.\n return Object.fromEntries(\n Object.entries(operations).map(([id, definition]) => [\n id,\n { ...definition, output: definition.output ?? z.void() },\n ]),\n ) as NormalizedOperations<TInputs, TOutputs, TContracts>;\n};\n\nexport type ConfigDefinition<\n TResources extends Readonly<Record<string, unknown>> = Readonly<\n Record<string, ResourceDefinition>\n >,\n TStreams extends StreamDefinitions = StreamDefinitions,\n TOperations extends OperationDefinitions = OperationDefinitions,\n> = {\n operations?: TOperations;\n resources: TResources;\n streams?: TStreams;\n};\n\nexport type OvermuxConfigDefinition<\n TServer extends ConfigDefinition = ConfigDefinition,\n> = ServerConfigDefinition & {\n aiContextSnippets?: AiContextSnippetDefinition;\n auth: AuthConfigDefinition;\n debug?: boolean;\n instanceId?: string | ((context: { port: number }) => string);\n server: TServer;\n vite?: string;\n};\n\nexport type OvermuxServerResources<TServer> = TServer extends {\n resources: infer TResources;\n}\n ? TResources\n : never;\n\nexport type OvermuxServerStreams<TServer> = TServer extends {\n streams?: infer TStreams;\n}\n ? NonNullable<TStreams>\n : never;\n\nexport type OvermuxServerOperations<TServer> = TServer extends {\n operations?: infer TOperations;\n}\n ? NonNullable<TOperations>\n : never;\n\nexport const defineOvermuxServer = <\n const TContracts extends ResourceContracts = {},\n const TDependencies = {},\n const TStreams extends StreamDefinitions = {},\n const TInputs extends OperationInputs = {},\n const TOutputs = {},\n>(definition: {\n operations?: ConfiguredOperations<TInputs, TOutputs, NoInfer<TContracts>>;\n resources: ConfiguredResources<TContracts, TDependencies>;\n streams?: TStreams &\n StreamDefinitions<HandlerContext<ResourceInputs<NoInfer<TContracts>>>>;\n}): ConfigDefinition<\n ConfiguredResources<TContracts, TDependencies>,\n TStreams,\n NormalizedOperations<TInputs, TOutputs, TContracts>\n> => ({\n ...definition,\n operations: normalizeOperations(definition.operations),\n});\n\nexport const defineOvermuxConfig = <const TServer extends ConfigDefinition>(\n definition: OvermuxConfigDefinition<TServer>,\n): OvermuxConfigDefinition<TServer> => definition;\n","import { z } from \"zod\";\n\nexport const noInputSchema = z.void();\n\nexport const jsonValueSchema: z.ZodType<unknown> = z.lazy(() =>\n z.union([\n z.string(),\n z.number().finite(),\n z.boolean(),\n z.null(),\n z.array(jsonValueSchema),\n z.record(z.string(), jsonValueSchema),\n ]),\n);\n\nexport const parseJsonValue = <T>(value: T): T =>\n jsonValueSchema.parse(value) as T;\n\nexport type ContractInputArguments<TInput extends z.ZodType> =\n undefined extends z.input<TInput>\n ? [input?: Exclude<z.input<TInput>, undefined>]\n : [input: z.input<TInput>];\n\nexport type ResourceContract<\n TInput extends z.ZodType = z.ZodType,\n TOutput extends z.ZodType = z.ZodType,\n> = {\n input: TInput;\n output: TOutput;\n};\n\nexport const defineResourceContract = <\n TInput extends z.ZodType,\n TOutput extends z.ZodType,\n>(\n contract: ResourceContract<TInput, TOutput>,\n): ResourceContract<TInput, TOutput> => contract;\n\nexport type StreamContract<\n TInput extends z.ZodType = z.ZodType,\n TClientMessage extends z.ZodType = z.ZodType,\n TServerMessage extends z.ZodType = z.ZodType,\n> = {\n clientMessage: TClientMessage;\n input: TInput;\n serverMessage: TServerMessage;\n};\n\nexport const defineStreamContract = <\n TInput extends z.ZodType,\n TClientMessage extends z.ZodType,\n TServerMessage extends z.ZodType,\n>(\n contract: StreamContract<TInput, TClientMessage, TServerMessage>,\n): StreamContract<TInput, TClientMessage, TServerMessage> => contract;\n"],"mappings":";;;AACA,MAAM,uBAAuB;AAC7B,MAAM,kCAAkC;AAExC,MAAM,wBAAwB,CAAC,oBAAoB;AACnD,MAAM,2BAA2B,CAAC,GAAG,uBAAuB,+BAA+B;AAC3F,MAAM,8BAA8B;;;;;;;AAOpC,MAAM,yCAAyC;AAC/C,MAAM,4BAA4B;EAChC,uBAAuB;EACvB,kCAAkC;AACpC;;;ACHA,MAAa,oBAAoB,aAC/B,SAAS,WAAW,IAChB,KACA,GAAG,SACA,KACE,YAAY,MAAM,QAAQ,MAAM,0BAA0B,UAC7D,CAAC,CACA,KAAK,MAAM,EAAE;;;ACwBtB,MAAa,mBAIX,EACA,QACA,OACA,cAKuE;CACvE;CACA;CACA,QAAS,UAAU,EAAE,KAAK;AAC5B;AAkFA,MAAa,uBAMX,UACA,UAWI;CACJ;CACA;AACF;AA4KA,MAAM,uBAKJ,eACoE;CACpE,IAAI,eAAe,KAAA,GACjB;CAGF,OAAO,OAAO,YACZ,OAAO,QAAQ,UAAU,CAAC,CAAC,KAAK,CAAC,IAAI,gBAAgB,CACnD,IACA;EAAE,GAAG;EAAY,QAAQ,WAAW,UAAU,EAAE,KAAK;CAAE,CACzD,CAAC,CACH;AACF;AA2CA,MAAa,uBAMX,gBASI;CACJ,GAAG;CACH,YAAY,oBAAoB,WAAW,UAAU;AACvD;AAEA,MAAa,uBACX,eACqC;;;AChavC,MAAa,gBAAgB,EAAE,KAAK;AAEpC,MAAa,kBAAsC,EAAE,WACnD,EAAE,MAAM;CACN,EAAE,OAAO;CACT,EAAE,OAAO,CAAC,CAAC,OAAO;CAClB,EAAE,QAAQ;CACV,EAAE,KAAK;CACP,EAAE,MAAM,eAAe;CACvB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AACtC,CAAC,CACH;AAEA,MAAa,kBAAqB,UAChC,gBAAgB,MAAM,KAAK;AAe7B,MAAa,0BAIX,aACsC;AAYxC,MAAa,wBAKX,aAC2D"}
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
2
  //#region ../shared/dist/index.js
3
- const packageSourceSnippet = "package-source";
4
- const techStackRecommendationsSnippet = "tech-stack-recommendations";
5
3
  const overmuxSettingsPath = "/_overmux/settings";
6
4
  const overmuxLogoutPath = "/_overmux/logout";
7
5
  const reservedPathPrefixes = [
@@ -55,7 +53,34 @@ const createInstanceIdentity = (instanceId) => ({
55
53
  instanceId: instanceIdSchema.parse(instanceId),
56
54
  deepLinkPrefix: `overmux://${instanceId}`
57
55
  });
56
+ var UrlPolicyError = class extends Error {};
57
+ const validateDeepLinkPath = (input) => {
58
+ let decoded;
59
+ try {
60
+ decoded = decodeURIComponent(input);
61
+ } catch {
62
+ throw new UrlPolicyError("Deep link path must be a safe relative path.");
63
+ }
64
+ const hasControlCharacter = [...decoded].some((character) => {
65
+ const codePoint = character.codePointAt(0) ?? 0;
66
+ return codePoint < 32 || codePoint === 127;
67
+ });
68
+ if (!input.startsWith("/") || decoded.startsWith("//") || decoded.includes("\\") || hasControlCharacter) throw new UrlPolicyError("Deep link path must be a safe relative path.");
69
+ return input;
70
+ };
71
+ const parseDeepLink = (input) => {
72
+ const match = /^overmux:\/\/([^/?#]+)(.*)$/i.exec(input);
73
+ const identity = instanceIdSchema.safeParse(match?.[1]);
74
+ if (!match || !identity.success || /\s/.test(input)) throw new UrlPolicyError("Deep link must contain a canonical Overmux instance ID.");
75
+ const suffix = match[2];
76
+ const route = validateDeepLinkPath(suffix.startsWith("/") ? suffix : `/${suffix}`);
77
+ if (route.split(/[?#]/, 1)[0].split("/").some((segment) => /^\.{1,2}$/.test(decodeURIComponent(segment)))) throw new UrlPolicyError("Deep link path cannot contain dot segments.");
78
+ return {
79
+ instanceId: identity.data,
80
+ route
81
+ };
82
+ };
58
83
  //#endregion
59
- export { notificationSchema as a, packageSourceSnippet as c, notificationLinkSchema as i, resolveOvermuxReturnTo as l, createOvermuxSettingsPath as n, overmuxLogoutPath as o, instanceIdSchema as r, overmuxSettingsPath as s, createInstanceIdentity as t, techStackRecommendationsSnippet as u };
84
+ export { notificationSchema as a, parseDeepLink as c, notificationLinkSchema as i, resolveOvermuxReturnTo as l, createOvermuxSettingsPath as n, overmuxLogoutPath as o, instanceIdSchema as r, overmuxSettingsPath as s, createInstanceIdentity as t };
60
85
 
61
- //# sourceMappingURL=notifications-av0FK0yZ.js.map
86
+ //# sourceMappingURL=notifications-BFAD3QQl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications-BFAD3QQl.js","names":[],"sources":["../../../shared/dist/index.js"],"sourcesContent":["import { z } from \"zod\";\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\n//#region src/deep-links.ts\nvar UrlPolicyError = class extends Error {};\nconst validateDeepLinkPath = (input) => {\n\tlet decoded;\n\ttry {\n\t\tdecoded = decodeURIComponent(input);\n\t} catch {\n\t\tthrow new UrlPolicyError(\"Deep link path must be a safe relative path.\");\n\t}\n\tconst hasControlCharacter = [...decoded].some((character) => {\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\t\treturn codePoint < 32 || codePoint === 127;\n\t});\n\tif (!input.startsWith(\"/\") || decoded.startsWith(\"//\") || decoded.includes(\"\\\\\") || hasControlCharacter) throw new UrlPolicyError(\"Deep link path must be a safe relative path.\");\n\treturn input;\n};\nconst parseDeepLink = (input) => {\n\tconst match = /^overmux:\\/\\/([^/?#]+)(.*)$/i.exec(input);\n\tconst identity = instanceIdSchema.safeParse(match?.[1]);\n\tif (!match || !identity.success || /\\s/.test(input)) throw new UrlPolicyError(\"Deep link must contain a canonical Overmux instance ID.\");\n\tconst suffix = match[2];\n\tconst route = validateDeepLinkPath(suffix.startsWith(\"/\") ? suffix : `/${suffix}`);\n\tif (route.split(/[?#]/, 1)[0].split(\"/\").some((segment) => /^\\.{1,2}$/.test(decodeURIComponent(segment)))) throw new UrlPolicyError(\"Deep link path cannot contain dot segments.\");\n\treturn {\n\t\tinstanceId: identity.data,\n\t\troute\n\t};\n};\n//#endregion\nexport { UrlPolicyError, createInstanceIdentity, createOvermuxSettingsPath, instanceIdSchema, notificationLinkSchema, notificationSchema, overmuxLogoutPath, overmuxSettingsPath, parse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O;AACR;AACA,MAAM,iBAAiB,UAAU;CAChC,MAAM,QAAQ,+BAA+B,KAAK,KAAK;CACvD,MAAM,WAAW,iBAAiB,UAAU,QAAQ,EAAE;CACtD,IAAI,CAAC,SAAS,CAAC,SAAS,WAAW,KAAK,KAAK,KAAK,GAAG,MAAM,IAAI,eAAe,yDAAyD;CACvI,MAAM,SAAS,MAAM;CACrB,MAAM,QAAQ,qBAAqB,OAAO,WAAW,GAAG,IAAI,SAAS,IAAI,QAAQ;CACjF,IAAI,MAAM,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,YAAY,YAAY,KAAK,mBAAmB,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,eAAe,6CAA6C;CACjL,OAAO;EACN,YAAY,SAAS;EACrB;CACD;AACD"}
@@ -1,27 +1,4 @@
1
1
  import { z } from "zod";
2
- type CheckDiagnostic = {
3
- code?: number | string;
4
- column?: number;
5
- file?: string;
6
- line?: number;
7
- message: string;
8
- path?: string;
9
- phase: "config" | "imports" | "runtime" | "types" | "ui";
10
- };
11
- type CheckResult = {
12
- operations?: number;
13
- config: string;
14
- diagnostics: CheckDiagnostic[];
15
- files: number;
16
- ok: boolean;
17
- };
18
- type CheckOvermuxOptions = {
19
- aliases?: Record<string, string>;
20
- configPath: string;
21
- typeAliases?: Record<string, string>;
22
- typesOnly?: boolean;
23
- };
24
- declare const checkOvermux: (options: CheckOvermuxOptions) => Promise<CheckResult>;
25
2
  type GetOvermuxPathsOptions = {
26
3
  environment?: NodeJS.ProcessEnv;
27
4
  homeDir?: string;
@@ -39,25 +16,5 @@ type OvermuxPaths = {
39
16
  stateDir: string;
40
17
  };
41
18
  declare const getOvermuxPaths: ({ environment, homeDir, xdgCacheHome, xdgConfigHome, xdgDataHome, xdgRuntimeDir, xdgStateHome }?: GetOvermuxPathsOptions) => OvermuxPaths;
42
- type ServerConfigDefinition = {
43
- host?: string;
44
- logFile?: string;
45
- port?: number;
46
- productionWebAssetsDir?: string;
47
- watch?: boolean;
48
- };
49
- type OvermuxServerOptions = ServerConfigDefinition & {
50
- configAliases?: Record<string, string>;
51
- debug?: boolean;
52
- developmentWebTarget?: string;
53
- configPath: string;
54
- };
55
- type OvermuxServer = {
56
- announceUpdateAvailable: () => void;
57
- close: () => Promise<void>;
58
- port: number;
59
- url: string;
60
- };
61
- declare const startOvermuxServer: (options: OvermuxServerOptions) => Promise<OvermuxServer>;
62
- export { type CheckDiagnostic, type CheckOvermuxOptions, type CheckResult, type GetOvermuxPathsOptions, type OvermuxPaths, type OvermuxServer, type OvermuxServerOptions, checkOvermux, getOvermuxPaths, startOvermuxServer };
19
+ export { getOvermuxPaths };
63
20
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","names":[],"sources":["../../src/internal/server/check-overmux.ts","../../../shared/dist/node/index.d.ts","../../src/public/config.ts","../../src/internal/server/start-overmux-server.ts"],"mappings":";;KAOY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA,aAAa;EACb;EACA;;KAGU;EACV,UAAU;EACV;EACA,cAAc;EACd;;cAyRW,eACX,SAAS,wBACR,QAAQ;;;;;KCpHN;EACH,cAAc,OAAO;EACrB;EACA;EACA;EACA;EACA;EACA;;KAEG;EACH;EACA;EACA;EACA;EACA;;cAEY,oBAAoB,aAAa,SAAS,cAAc,eAAe,aAAa,eAAe,iBAAiB,2BAA2B;;;KCOjJ;EACV;EACA;EACA;EACA;EACA;;;;KC3NU,uBAAuB;EACjC,gBAAgB;EAChB;EACA;EACA;;KAGU;EACV;EACA,aAAa;EACb;EACA;;cAGW,qBACX,SAAS,yBACR,QAAQ"}
1
+ {"version":3,"file":"server.d.ts","names":[],"sources":["../../../shared/dist/node/index.d.ts"],"mappings":";;;;KAiMK;EACH,cAAc,OAAO;EACrB;EACA;EACA;EACA;EACA;EACA;;KAEG;EACH;EACA;EACA;EACA;EACA;;cAEY,oBAAoB,aAAa,SAAS,cAAc,eAAe,aAAa,eAAe,iBAAiB,2BAA2B"}