@hyperdrive.bot/paseo-protocol 0.2.5
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/README.md +12 -0
- package/dist/agent-attention-notification.d.ts +41 -0
- package/dist/agent-attention-notification.js +140 -0
- package/dist/agent-labels.d.ts +9 -0
- package/dist/agent-labels.js +23 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-state-bucket.d.ts +24 -0
- package/dist/agent-state-bucket.js +45 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +461 -0
- package/dist/agent-types.js +22 -0
- package/dist/binary-frames/chunk-size.d.ts +2 -0
- package/dist/binary-frames/chunk-size.js +7 -0
- package/dist/binary-frames/demux.d.ts +11 -0
- package/dist/binary-frames/demux.js +23 -0
- package/dist/binary-frames/file-transfer.d.ts +50 -0
- package/dist/binary-frames/file-transfer.js +114 -0
- package/dist/binary-frames/index.d.ts +4 -0
- package/dist/binary-frames/index.js +4 -0
- package/dist/binary-frames/terminal.d.ts +31 -0
- package/dist/binary-frames/terminal.js +99 -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 +1112 -0
- package/dist/browser-automation/rpc-schemas.js +462 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +103 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +22 -0
- package/dist/client-capabilities.d.ts +8 -0
- package/dist/client-capabilities.js +16 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-endpoints.d.ts +47 -0
- package/dist/daemon-endpoints.js +201 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +2 -0
- package/dist/generated/validation/ws-outbound.aot.js +46936 -0
- package/dist/git-remote.d.ts +16 -0
- package/dist/git-remote.js +72 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -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 +163 -0
- package/dist/messages.d.ts +36565 -0
- package/dist/messages.js +4703 -0
- package/dist/paseo-config-schema.d.ts +117 -0
- package/dist/paseo-config-schema.js +79 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/provider-config.d.ts +136 -0
- package/dist/provider-config.js +119 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +52 -0
- package/dist/provider-manifest.d.ts +114 -0
- package/dist/provider-manifest.js +344 -0
- package/dist/schedule/cron-expression.d.ts +13 -0
- package/dist/schedule/cron-expression.js +97 -0
- package/dist/schedule/rpc-schemas.d.ts +574 -0
- package/dist/schedule/rpc-schemas.js +151 -0
- package/dist/schedule/types.d.ts +202 -0
- package/dist/schedule/types.js +75 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +26 -0
- package/dist/terminal-input-mode.js +151 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +201 -0
- package/dist/terminal-profiles.d.ts +6 -0
- package/dist/terminal-profiles.js +28 -0
- package/dist/terminal-snapshot.d.ts +3 -0
- package/dist/terminal-snapshot.js +178 -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/tool-call-display.d.ts +11 -0
- package/dist/tool-call-display.js +135 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +6828 -0
- package/dist/validation/ws-outbound-schema-metadata.js +3 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +8 -0
- package/package.json +42 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface GitRemoteLocation {
|
|
2
|
+
transport: "scp" | "ssh" | "http" | "https";
|
|
3
|
+
host: string;
|
|
4
|
+
path: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GitHubRemoteIdentity {
|
|
7
|
+
owner: string;
|
|
8
|
+
name: string;
|
|
9
|
+
repo: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseGitHubRemoteUrl(remoteUrl: string): GitHubRemoteIdentity | null;
|
|
12
|
+
export declare function parseGitRemoteLocation(remoteUrl: string): GitRemoteLocation | null;
|
|
13
|
+
export declare function parseGitHubRemoteIdentity(path: string): GitHubRemoteIdentity | null;
|
|
14
|
+
export declare function isGitHubHost(host: string): boolean;
|
|
15
|
+
export declare function normalizeHost(host: string): string;
|
|
16
|
+
//# sourceMappingURL=git-remote.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const GITHUB_HOSTS = new Set(["github.com", "ssh.github.com"]);
|
|
2
|
+
const TRANSPORT_BY_PROTOCOL = {
|
|
3
|
+
"https:": "https",
|
|
4
|
+
"http:": "http",
|
|
5
|
+
"ssh:": "ssh",
|
|
6
|
+
};
|
|
7
|
+
export function parseGitHubRemoteUrl(remoteUrl) {
|
|
8
|
+
const location = parseGitRemoteLocation(remoteUrl);
|
|
9
|
+
if (!location || !isGitHubHost(location.host))
|
|
10
|
+
return null;
|
|
11
|
+
return parseGitHubRemoteIdentity(location.path);
|
|
12
|
+
}
|
|
13
|
+
export function parseGitRemoteLocation(remoteUrl) {
|
|
14
|
+
const trimmed = remoteUrl.trim();
|
|
15
|
+
if (!trimmed)
|
|
16
|
+
return null;
|
|
17
|
+
const scpLike = trimmed.match(/^[^@]+@([^:]+):(.+)$/u);
|
|
18
|
+
if (scpLike) {
|
|
19
|
+
const host = normalizeHost(scpLike[1] ?? "");
|
|
20
|
+
const path = normalizeRemotePath(scpLike[2] ?? "");
|
|
21
|
+
if (!isValidRemoteHost(host) || !path)
|
|
22
|
+
return null;
|
|
23
|
+
return { transport: "scp", host, path };
|
|
24
|
+
}
|
|
25
|
+
let parsed;
|
|
26
|
+
try {
|
|
27
|
+
parsed = new URL(trimmed);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const transport = TRANSPORT_BY_PROTOCOL[parsed.protocol.toLowerCase()];
|
|
33
|
+
if (!transport)
|
|
34
|
+
return null;
|
|
35
|
+
const host = normalizeHost(parsed.hostname);
|
|
36
|
+
let path;
|
|
37
|
+
try {
|
|
38
|
+
path = decodeURIComponent(parsed.pathname);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const normalizedPath = normalizeRemotePath(path);
|
|
44
|
+
if (!isValidRemoteHost(host) || !normalizedPath)
|
|
45
|
+
return null;
|
|
46
|
+
return { transport, host, path: normalizedPath };
|
|
47
|
+
}
|
|
48
|
+
export function parseGitHubRemoteIdentity(path) {
|
|
49
|
+
const segments = path.split("/").filter(Boolean);
|
|
50
|
+
if (segments.length !== 2)
|
|
51
|
+
return null;
|
|
52
|
+
const [owner, name] = segments;
|
|
53
|
+
if (!owner || !name)
|
|
54
|
+
return null;
|
|
55
|
+
return { owner, name, repo: `${owner}/${name}` };
|
|
56
|
+
}
|
|
57
|
+
export function isGitHubHost(host) {
|
|
58
|
+
return GITHUB_HOSTS.has(host);
|
|
59
|
+
}
|
|
60
|
+
export function normalizeHost(host) {
|
|
61
|
+
return host.trim().replace(/\.+$/u, "").toLowerCase();
|
|
62
|
+
}
|
|
63
|
+
function normalizeRemotePath(path) {
|
|
64
|
+
let normalized = path.trim().replace(/^\/+|\/+$/gu, "");
|
|
65
|
+
if (normalized.endsWith(".git"))
|
|
66
|
+
normalized = normalized.slice(0, -4);
|
|
67
|
+
return normalized || null;
|
|
68
|
+
}
|
|
69
|
+
function isValidRemoteHost(host) {
|
|
70
|
+
return /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/u.test(host);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=git-remote.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DirectTcpHostConnectionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"directTcp">;
|
|
5
|
+
endpoint: z.ZodString;
|
|
6
|
+
useTls: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
password: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type DirectTcpHostConnection = z.input<typeof DirectTcpHostConnectionSchema>;
|
|
10
|
+
export type NormalizedDirectTcpHostConnection = z.output<typeof DirectTcpHostConnectionSchema>;
|
|
11
|
+
//# sourceMappingURL=host-connection-schema.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const DirectTcpHostConnectionSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
type: z.literal("directTcp"),
|
|
5
|
+
endpoint: z.string(),
|
|
6
|
+
useTls: z.boolean().optional().default(false),
|
|
7
|
+
password: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=host-connection-schema.js.map
|