@getmateo/protocol 0.0.0-stage → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/LICENSE +211 -0
  2. package/README.md +11 -2
  3. package/dist/addresses.d.ts +6 -0
  4. package/dist/addresses.js +2 -0
  5. package/dist/agent-attention-notification.d.ts +57 -0
  6. package/dist/agent-attention-notification.js +177 -0
  7. package/dist/agent-deep-link.d.ts +8 -0
  8. package/dist/agent-deep-link.js +49 -0
  9. package/dist/agent-labels.d.ts +14 -0
  10. package/dist/agent-labels.js +38 -0
  11. package/dist/agent-lifecycle.d.ts +3 -0
  12. package/dist/agent-lifecycle.js +8 -0
  13. package/dist/agent-message.d.ts +20 -0
  14. package/dist/agent-message.js +12 -0
  15. package/dist/agent-profile.d.ts +31 -0
  16. package/dist/agent-profile.js +32 -0
  17. package/dist/agent-runtime-config.d.ts +4 -0
  18. package/dist/agent-runtime-config.js +5 -0
  19. package/dist/agent-shells.d.ts +25 -0
  20. package/dist/agent-shells.js +17 -0
  21. package/dist/agent-state-bucket.d.ts +15 -0
  22. package/dist/agent-state-bucket.js +41 -0
  23. package/dist/agent-title-limits.d.ts +2 -0
  24. package/dist/agent-title-limits.js +2 -0
  25. package/dist/agent-types.d.ts +484 -0
  26. package/dist/agent-types.js +33 -0
  27. package/dist/binary-frames/demux.d.ts +15 -0
  28. package/dist/binary-frames/demux.js +28 -0
  29. package/dist/binary-frames/file-transfer.d.ts +51 -0
  30. package/dist/binary-frames/file-transfer.js +108 -0
  31. package/dist/binary-frames/host-route.d.ts +13 -0
  32. package/dist/binary-frames/host-route.js +39 -0
  33. package/dist/binary-frames/index.d.ts +5 -0
  34. package/dist/binary-frames/index.js +5 -0
  35. package/dist/binary-frames/terminal.d.ts +35 -0
  36. package/dist/binary-frames/terminal.js +100 -0
  37. package/dist/branch-slug.d.ts +14 -0
  38. package/dist/branch-slug.js +49 -0
  39. package/dist/browser-automation/capabilities.d.ts +7 -0
  40. package/dist/browser-automation/capabilities.js +31 -0
  41. package/dist/browser-automation/rpc-schemas.d.ts +1224 -0
  42. package/dist/browser-automation/rpc-schemas.js +497 -0
  43. package/dist/browser-download-rules.d.ts +21 -0
  44. package/dist/browser-download-rules.js +54 -0
  45. package/dist/build-metadata.d.ts +17 -0
  46. package/dist/build-metadata.js +61 -0
  47. package/dist/chat/rpc-schemas.d.ts +158 -0
  48. package/dist/chat/rpc-schemas.js +104 -0
  49. package/dist/chat/types.d.ts +30 -0
  50. package/dist/chat/types.js +23 -0
  51. package/dist/check-traits.d.ts +11 -0
  52. package/dist/check-traits.js +10 -0
  53. package/dist/chunked-transport.d.ts +42 -0
  54. package/dist/chunked-transport.js +277 -0
  55. package/dist/client-capabilities.d.ts +24 -0
  56. package/dist/client-capabilities.js +52 -0
  57. package/dist/connection-offer.d.ts +36 -0
  58. package/dist/connection-offer.js +53 -0
  59. package/dist/daemon-auth.d.ts +548 -0
  60. package/dist/daemon-auth.js +152 -0
  61. package/dist/daemon-endpoints.d.ts +54 -0
  62. package/dist/daemon-endpoints.js +243 -0
  63. package/dist/error-utils.d.ts +11 -0
  64. package/dist/error-utils.js +27 -0
  65. package/dist/fleet.d.ts +381 -0
  66. package/dist/fleet.js +134 -0
  67. package/dist/forge-manifest.d.ts +66 -0
  68. package/dist/forge-manifest.js +92 -0
  69. package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +14187 -0
  70. package/dist/generated/validation/ws-outbound-schema-metadata.js +262 -0
  71. package/dist/generated/validation/ws-outbound.aot.d.ts +520 -0
  72. package/dist/generated/validation/ws-outbound.aot.js +106677 -0
  73. package/dist/git-remote.d.ts +33 -0
  74. package/dist/git-remote.js +94 -0
  75. package/dist/gitea-status.d.ts +10 -0
  76. package/dist/gitea-status.js +23 -0
  77. package/dist/gitlab-pipeline.d.ts +10 -0
  78. package/dist/gitlab-pipeline.js +17 -0
  79. package/dist/global-terminal.d.ts +3 -0
  80. package/dist/global-terminal.js +8 -0
  81. package/dist/host-connection-schema.d.ts +11 -0
  82. package/dist/host-connection-schema.js +9 -0
  83. package/dist/host-target.d.ts +20 -0
  84. package/dist/host-target.js +137 -0
  85. package/dist/hosts.d.ts +133 -0
  86. package/dist/hosts.js +82 -0
  87. package/dist/literal-union.d.ts +2 -0
  88. package/dist/literal-union.js +2 -0
  89. package/dist/loop/rpc-schemas.d.ts +636 -0
  90. package/dist/loop/rpc-schemas.js +164 -0
  91. package/dist/mateo-config-schema.d.ts +138 -0
  92. package/dist/mateo-config-schema.js +98 -0
  93. package/dist/mateo-tool-call-detail.d.ts +2 -0
  94. package/dist/mateo-tool-call-detail.js +3 -0
  95. package/dist/mateo-tool-presentation/agent-message.d.ts +10 -0
  96. package/dist/mateo-tool-presentation/agent-message.js +23 -0
  97. package/dist/mateo-tool-presentation/catalog.d.ts +321 -0
  98. package/dist/mateo-tool-presentation/catalog.js +319 -0
  99. package/dist/mateo-tool-presentation/detail-sections.d.ts +15 -0
  100. package/dist/mateo-tool-presentation/detail-sections.js +161 -0
  101. package/dist/mateo-tool-presentation/index.d.ts +22 -0
  102. package/dist/mateo-tool-presentation/index.js +62 -0
  103. package/dist/mateo-tool-presentation/summary-text.d.ts +7 -0
  104. package/dist/mateo-tool-presentation/summary-text.js +22 -0
  105. package/dist/messages.d.ts +70260 -0
  106. package/dist/messages.js +6740 -0
  107. package/dist/path-utils.d.ts +2 -0
  108. package/dist/path-utils.js +16 -0
  109. package/dist/plugin-browser-consent-copy.d.ts +193 -0
  110. package/dist/plugin-browser-consent-copy.js +109 -0
  111. package/dist/plugin-browser-grants.d.ts +48 -0
  112. package/dist/plugin-browser-grants.js +56 -0
  113. package/dist/plugin-browser.d.ts +321 -0
  114. package/dist/plugin-browser.js +109 -0
  115. package/dist/plugin-config.d.ts +18 -0
  116. package/dist/plugin-config.js +13 -0
  117. package/dist/plugin-overview.d.ts +12 -0
  118. package/dist/plugin-overview.js +50 -0
  119. package/dist/plugin-registry.d.ts +153 -0
  120. package/dist/plugin-registry.js +83 -0
  121. package/dist/plugin-requirements.d.ts +11 -0
  122. package/dist/plugin-requirements.js +26 -0
  123. package/dist/plugin-source-reference.d.ts +11 -0
  124. package/dist/plugin-source-reference.js +68 -0
  125. package/dist/provider-config.d.ts +141 -0
  126. package/dist/provider-config.js +113 -0
  127. package/dist/provider-icon-names.d.ts +5 -0
  128. package/dist/provider-icon-names.js +54 -0
  129. package/dist/provider-manifest.d.ts +30 -0
  130. package/dist/provider-manifest.js +247 -0
  131. package/dist/provider-snapshot-codec.d.ts +18 -0
  132. package/dist/provider-snapshot-codec.js +71 -0
  133. package/dist/schedule/cadence.d.ts +6 -0
  134. package/dist/schedule/cadence.js +28 -0
  135. package/dist/schedule/cron-expression.d.ts +14 -0
  136. package/dist/schedule/cron-expression.js +107 -0
  137. package/dist/schedule/rpc-schemas.d.ts +570 -0
  138. package/dist/schedule/rpc-schemas.js +158 -0
  139. package/dist/schedule/types.d.ts +201 -0
  140. package/dist/schedule/types.js +68 -0
  141. package/dist/search/text-match.d.ts +78 -0
  142. package/dist/search/text-match.js +330 -0
  143. package/dist/service-defaults.d.ts +3 -0
  144. package/dist/service-defaults.js +5 -0
  145. package/dist/ssh-transport.d.ts +11 -0
  146. package/dist/ssh-transport.js +72 -0
  147. package/dist/terminal-activity.d.ts +21 -0
  148. package/dist/terminal-activity.js +25 -0
  149. package/dist/terminal-input-mode.d.ts +30 -0
  150. package/dist/terminal-input-mode.js +180 -0
  151. package/dist/terminal-key-input.d.ts +13 -0
  152. package/dist/terminal-key-input.js +210 -0
  153. package/dist/terminal-profile.d.ts +10 -0
  154. package/dist/terminal-profile.js +11 -0
  155. package/dist/terminal-profiles.d.ts +41 -0
  156. package/dist/terminal-profiles.js +276 -0
  157. package/dist/terminal-snapshot.d.ts +4 -0
  158. package/dist/terminal-snapshot.js +220 -0
  159. package/dist/terminal-stream-protocol.d.ts +2 -0
  160. package/dist/terminal-stream-protocol.js +2 -0
  161. package/dist/terminal-subscription-key.d.ts +2 -0
  162. package/dist/terminal-subscription-key.js +9 -0
  163. package/dist/timeline-identity.d.ts +3 -0
  164. package/dist/timeline-identity.js +8 -0
  165. package/dist/tool-call-display.d.ts +13 -0
  166. package/dist/tool-call-display.js +144 -0
  167. package/dist/tool-name-normalization.d.ts +9 -0
  168. package/dist/tool-name-normalization.js +82 -0
  169. package/dist/user-agent.d.ts +26 -0
  170. package/dist/user-agent.js +101 -0
  171. package/dist/validation/ws-outbound-envelope.d.ts +13413 -0
  172. package/dist/validation/ws-outbound-envelope.js +17 -0
  173. package/dist/validation/ws-outbound.d.ts +12 -0
  174. package/dist/validation/ws-outbound.js +38 -0
  175. package/dist/websocket-message-limit.d.ts +5 -0
  176. package/dist/websocket-message-limit.js +5 -0
  177. package/dist/workspace-labels.d.ts +9 -0
  178. package/dist/workspace-labels.js +19 -0
  179. package/package.json +48 -4
@@ -0,0 +1,52 @@
1
+ export const CLIENT_CAPS = {
2
+ binaryChunkingV1: "binary_chunking_v1",
3
+ helloRejection: "hello_rejection",
4
+ // COMPAT(ownedSubscriptions): added in v0.8.0, remove legacy ownership after 2027-03-09.
5
+ ownedSubscriptions: "owned_subscriptions",
6
+ // Clients outside the Mateo app version series can explicitly accept provider IDs.
7
+ // COMPAT(explicitEventSubscriptions): added in v0.8.0, remove legacy broadcasts after 2027-03-08.
8
+ explicitEventSubscriptions: "explicit_event_subscriptions",
9
+ allProviders: "all_providers",
10
+ // COMPAT(selectiveAgentTimeline): added in v0.1.106. Capable clients receive
11
+ // agent streams only for their explicit viewed set. Remove after 2027-01-12
12
+ // once the supported client floor is >= v0.1.106.
13
+ selectiveAgentTimeline: "selective_agent_timeline",
14
+ reasoningMergeEnum: "reasoning_merge_enum",
15
+ // COMPAT(customModeIcons): added in v0.1.84. Old clients pin AgentModeIcon to
16
+ // a closed enum and crash rendering unknown values; daemon downgrades icons
17
+ // outside the legacy set to "ShieldCheck" when this cap is absent. Drop the
18
+ // gate when floor >= v0.1.84.
19
+ customModeIcons: "custom_mode_icons",
20
+ // COMPAT(terminalReflowableSnapshot): added in v0.1.88. The daemon attaches
21
+ // per-row soft-wrap flags (gridWrapped/scrollbackWrapped) to terminal snapshots
22
+ // only when the client advertises this, so restored content can reflow on resize.
23
+ // Old clients use a strict TerminalState schema and would reject the extra fields.
24
+ // Drop the gate (always send the flags) when floor >= v0.1.88.
25
+ terminalReflowableSnapshot: "terminal_reflowable_snapshot",
26
+ // COMPAT(providerSubagents): added in v0.1.107. The daemon emits provider-owned
27
+ // child descriptors and timelines only to clients that understand the new messages.
28
+ providerSubagents: "provider_subagents",
29
+ // COMPAT(projectedSubagentTimeline): added after v0.8.0, remove gates after 2027-03-14; retain wire capability.
30
+ projectedSubagentTimeline: "projected_subagent_timeline",
31
+ // COMPAT(projectUpdates): added in v0.1.109, remove gate after 2027-01-15.
32
+ projectUpdates: "project_updates",
33
+ // COMPAT(compactProviderSnapshots): added in v0.2.X. Capable clients receive
34
+ // provider catalogs with shared thinking sets and may revalidate by content hash.
35
+ // Remove the legacy snapshot encoding after 2027-02-04.
36
+ compactProviderSnapshots: "compact_provider_snapshots",
37
+ providerSnapshotReferences: "provider_snapshot_references",
38
+ // COMPAT(timelineReplacementInvalidation): added in v0.5.0, remove legacy
39
+ // reconstructed timeline replay after 2027-02-21 once the client floor supports invalidation.
40
+ timelineReplacementInvalidation: "timeline_replacement_invalidation",
41
+ // COMPAT(timelineNotifications): added in v0.7.2. The daemon omits notification
42
+ // timeline items for older clients whose strict timeline union rejects them.
43
+ // Remove after 2027-03-03 once the supported client floor is >= v0.7.2.
44
+ timelineNotifications: "timeline_notifications",
45
+ // COMPAT(pluginTimelineItems): added in v0.8.0, remove after 2027-03-07 once client floor >= v0.8.0.
46
+ pluginTimelineItems: "plugin_timeline_items",
47
+ workspaceSetupObservation: "workspace_setup_observation",
48
+ // COMPAT(workspaceSetupBlocked): added in v0.8.0, remove after 2027-03-07 once client floor >= v0.8.0.
49
+ workspaceSetupBlocked: "workspace_setup_blocked",
50
+ browserHost: "browser_host",
51
+ };
52
+ //# sourceMappingURL=client-capabilities.js.map
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Relay-only pairing offer.
4
+ *
5
+ * `serverId` is a stable daemon identifier scoped to `MATEO_HOME`, and is also
6
+ * used as the relay session identifier.
7
+ */
8
+ export declare const ConnectionOfferV2Schema: z.ZodObject<{
9
+ v: z.ZodLiteral<2>;
10
+ serverId: z.ZodString;
11
+ daemonPublicKeyB64: z.ZodString;
12
+ relay: z.ZodObject<{
13
+ endpoint: z.ZodString;
14
+ useTls: z.ZodOptional<z.ZodBoolean>;
15
+ }, z.core.$strip>;
16
+ }, z.core.$strip>;
17
+ export type ConnectionOfferV2 = z.infer<typeof ConnectionOfferV2Schema>;
18
+ export declare const ConnectionOfferSchema: z.ZodObject<{
19
+ v: z.ZodLiteral<2>;
20
+ serverId: z.ZodString;
21
+ daemonPublicKeyB64: z.ZodString;
22
+ relay: z.ZodObject<{
23
+ endpoint: z.ZodString;
24
+ useTls: z.ZodOptional<z.ZodBoolean>;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ export type ConnectionOffer = ConnectionOfferV2;
28
+ export declare function decodeOfferFragmentPayload(encoded: string): unknown;
29
+ /**
30
+ * Parse a pairing-offer URL of the form `https://app.paseo.sh/#offer=<base64url>`.
31
+ *
32
+ * Returns `null` if the input has no `#offer=` fragment. Throws if the fragment
33
+ * exists but the payload is malformed or fails schema validation.
34
+ */
35
+ export declare function parseConnectionOfferFromUrl(input: string): ConnectionOffer | null;
36
+ //# sourceMappingURL=connection-offer.d.ts.map
@@ -0,0 +1,53 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Relay-only pairing offer.
4
+ *
5
+ * `serverId` is a stable daemon identifier scoped to `MATEO_HOME`, and is also
6
+ * used as the relay session identifier.
7
+ */
8
+ export const ConnectionOfferV2Schema = z.object({
9
+ v: z.literal(2),
10
+ serverId: z.string().min(1),
11
+ daemonPublicKeyB64: z.string().min(1),
12
+ relay: z.object({
13
+ endpoint: z.string().min(1),
14
+ useTls: z.boolean().optional(),
15
+ }),
16
+ });
17
+ export const ConnectionOfferSchema = ConnectionOfferV2Schema;
18
+ function decodeBase64UrlToUtf8(input) {
19
+ const base64 = input.replace(/-/g, "+").replace(/_/g, "/");
20
+ const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), "=");
21
+ const binary = globalThis.atob(padded);
22
+ const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
23
+ return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
24
+ }
25
+ export function decodeOfferFragmentPayload(encoded) {
26
+ const json = decodeBase64UrlToUtf8(encoded);
27
+ return JSON.parse(json);
28
+ }
29
+ const OFFER_FRAGMENT_PREFIX = "#offer=";
30
+ function extractOfferFragmentEncoded(input) {
31
+ const trimmed = input.trim();
32
+ if (!trimmed)
33
+ return null;
34
+ const fragmentIndex = trimmed.indexOf(OFFER_FRAGMENT_PREFIX);
35
+ if (fragmentIndex === -1)
36
+ return null;
37
+ const encoded = trimmed.slice(fragmentIndex + OFFER_FRAGMENT_PREFIX.length).trim();
38
+ return encoded.length > 0 ? encoded : null;
39
+ }
40
+ /**
41
+ * Parse a pairing-offer URL of the form `https://app.paseo.sh/#offer=<base64url>`.
42
+ *
43
+ * Returns `null` if the input has no `#offer=` fragment. Throws if the fragment
44
+ * exists but the payload is malformed or fails schema validation.
45
+ */
46
+ export function parseConnectionOfferFromUrl(input) {
47
+ const encoded = extractOfferFragmentEncoded(input);
48
+ if (!encoded)
49
+ return null;
50
+ const payload = decodeOfferFragmentPayload(encoded);
51
+ return ConnectionOfferSchema.parse(payload);
52
+ }
53
+ //# sourceMappingURL=connection-offer.js.map