@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.
- package/LICENSE +211 -0
- package/README.md +11 -2
- package/dist/addresses.d.ts +6 -0
- package/dist/addresses.js +2 -0
- package/dist/agent-attention-notification.d.ts +57 -0
- package/dist/agent-attention-notification.js +177 -0
- package/dist/agent-deep-link.d.ts +8 -0
- package/dist/agent-deep-link.js +49 -0
- package/dist/agent-labels.d.ts +14 -0
- package/dist/agent-labels.js +38 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-message.d.ts +20 -0
- package/dist/agent-message.js +12 -0
- package/dist/agent-profile.d.ts +31 -0
- package/dist/agent-profile.js +32 -0
- package/dist/agent-runtime-config.d.ts +4 -0
- package/dist/agent-runtime-config.js +5 -0
- package/dist/agent-shells.d.ts +25 -0
- package/dist/agent-shells.js +17 -0
- package/dist/agent-state-bucket.d.ts +15 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +484 -0
- package/dist/agent-types.js +33 -0
- package/dist/binary-frames/demux.d.ts +15 -0
- package/dist/binary-frames/demux.js +28 -0
- package/dist/binary-frames/file-transfer.d.ts +51 -0
- package/dist/binary-frames/file-transfer.js +108 -0
- package/dist/binary-frames/host-route.d.ts +13 -0
- package/dist/binary-frames/host-route.js +39 -0
- package/dist/binary-frames/index.d.ts +5 -0
- package/dist/binary-frames/index.js +5 -0
- package/dist/binary-frames/terminal.d.ts +35 -0
- package/dist/binary-frames/terminal.js +100 -0
- package/dist/branch-slug.d.ts +14 -0
- package/dist/branch-slug.js +49 -0
- package/dist/browser-automation/capabilities.d.ts +7 -0
- package/dist/browser-automation/capabilities.js +31 -0
- package/dist/browser-automation/rpc-schemas.d.ts +1224 -0
- package/dist/browser-automation/rpc-schemas.js +497 -0
- package/dist/browser-download-rules.d.ts +21 -0
- package/dist/browser-download-rules.js +54 -0
- package/dist/build-metadata.d.ts +17 -0
- package/dist/build-metadata.js +61 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +104 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +23 -0
- package/dist/check-traits.d.ts +11 -0
- package/dist/check-traits.js +10 -0
- package/dist/chunked-transport.d.ts +42 -0
- package/dist/chunked-transport.js +277 -0
- package/dist/client-capabilities.d.ts +24 -0
- package/dist/client-capabilities.js +52 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-auth.d.ts +548 -0
- package/dist/daemon-auth.js +152 -0
- package/dist/daemon-endpoints.d.ts +54 -0
- package/dist/daemon-endpoints.js +243 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/fleet.d.ts +381 -0
- package/dist/fleet.js +134 -0
- package/dist/forge-manifest.d.ts +66 -0
- package/dist/forge-manifest.js +92 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +14187 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.js +262 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +520 -0
- package/dist/generated/validation/ws-outbound.aot.js +106677 -0
- package/dist/git-remote.d.ts +33 -0
- package/dist/git-remote.js +94 -0
- package/dist/gitea-status.d.ts +10 -0
- package/dist/gitea-status.js +23 -0
- package/dist/gitlab-pipeline.d.ts +10 -0
- package/dist/gitlab-pipeline.js +17 -0
- package/dist/global-terminal.d.ts +3 -0
- package/dist/global-terminal.js +8 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/host-target.d.ts +20 -0
- package/dist/host-target.js +137 -0
- package/dist/hosts.d.ts +133 -0
- package/dist/hosts.js +82 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +636 -0
- package/dist/loop/rpc-schemas.js +164 -0
- package/dist/mateo-config-schema.d.ts +138 -0
- package/dist/mateo-config-schema.js +98 -0
- package/dist/mateo-tool-call-detail.d.ts +2 -0
- package/dist/mateo-tool-call-detail.js +3 -0
- package/dist/mateo-tool-presentation/agent-message.d.ts +10 -0
- package/dist/mateo-tool-presentation/agent-message.js +23 -0
- package/dist/mateo-tool-presentation/catalog.d.ts +321 -0
- package/dist/mateo-tool-presentation/catalog.js +319 -0
- package/dist/mateo-tool-presentation/detail-sections.d.ts +15 -0
- package/dist/mateo-tool-presentation/detail-sections.js +161 -0
- package/dist/mateo-tool-presentation/index.d.ts +22 -0
- package/dist/mateo-tool-presentation/index.js +62 -0
- package/dist/mateo-tool-presentation/summary-text.d.ts +7 -0
- package/dist/mateo-tool-presentation/summary-text.js +22 -0
- package/dist/messages.d.ts +70260 -0
- package/dist/messages.js +6740 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/plugin-browser-consent-copy.d.ts +193 -0
- package/dist/plugin-browser-consent-copy.js +109 -0
- package/dist/plugin-browser-grants.d.ts +48 -0
- package/dist/plugin-browser-grants.js +56 -0
- package/dist/plugin-browser.d.ts +321 -0
- package/dist/plugin-browser.js +109 -0
- package/dist/plugin-config.d.ts +18 -0
- package/dist/plugin-config.js +13 -0
- package/dist/plugin-overview.d.ts +12 -0
- package/dist/plugin-overview.js +50 -0
- package/dist/plugin-registry.d.ts +153 -0
- package/dist/plugin-registry.js +83 -0
- package/dist/plugin-requirements.d.ts +11 -0
- package/dist/plugin-requirements.js +26 -0
- package/dist/plugin-source-reference.d.ts +11 -0
- package/dist/plugin-source-reference.js +68 -0
- package/dist/provider-config.d.ts +141 -0
- package/dist/provider-config.js +113 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +54 -0
- package/dist/provider-manifest.d.ts +30 -0
- package/dist/provider-manifest.js +247 -0
- package/dist/provider-snapshot-codec.d.ts +18 -0
- package/dist/provider-snapshot-codec.js +71 -0
- package/dist/schedule/cadence.d.ts +6 -0
- package/dist/schedule/cadence.js +28 -0
- package/dist/schedule/cron-expression.d.ts +14 -0
- package/dist/schedule/cron-expression.js +107 -0
- package/dist/schedule/rpc-schemas.d.ts +570 -0
- package/dist/schedule/rpc-schemas.js +158 -0
- package/dist/schedule/types.d.ts +201 -0
- package/dist/schedule/types.js +68 -0
- package/dist/search/text-match.d.ts +78 -0
- package/dist/search/text-match.js +330 -0
- package/dist/service-defaults.d.ts +3 -0
- package/dist/service-defaults.js +5 -0
- package/dist/ssh-transport.d.ts +11 -0
- package/dist/ssh-transport.js +72 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +30 -0
- package/dist/terminal-input-mode.js +180 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +210 -0
- package/dist/terminal-profile.d.ts +10 -0
- package/dist/terminal-profile.js +11 -0
- package/dist/terminal-profiles.d.ts +41 -0
- package/dist/terminal-profiles.js +276 -0
- package/dist/terminal-snapshot.d.ts +4 -0
- package/dist/terminal-snapshot.js +220 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/dist/timeline-identity.d.ts +3 -0
- package/dist/timeline-identity.js +8 -0
- package/dist/tool-call-display.d.ts +13 -0
- package/dist/tool-call-display.js +144 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/user-agent.d.ts +26 -0
- package/dist/user-agent.js +101 -0
- package/dist/validation/ws-outbound-envelope.d.ts +13413 -0
- package/dist/validation/ws-outbound-envelope.js +17 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +38 -0
- package/dist/websocket-message-limit.d.ts +5 -0
- package/dist/websocket-message-limit.js +5 -0
- package/dist/workspace-labels.d.ts +9 -0
- package/dist/workspace-labels.js +19 -0
- 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
|