@getpaseo/protocol 0.1.84
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 +2 -0
- package/dist/agent-labels.js +2 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-state-bucket.d.ts +13 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +3 -0
- package/dist/agent-title-limits.js +3 -0
- package/dist/agent-types.d.ts +421 -0
- package/dist/agent-types.js +22 -0
- package/dist/binary-frames/file-transfer.d.ts +56 -0
- package/dist/binary-frames/file-transfer.js +108 -0
- package/dist/binary-frames/index.d.ts +3 -0
- package/dist/binary-frames/index.js +3 -0
- package/dist/binary-frames/terminal.d.ts +37 -0
- package/dist/binary-frames/terminal.js +101 -0
- package/dist/chat/rpc-schemas.d.ts +728 -0
- package/dist/chat/rpc-schemas.js +103 -0
- package/dist/chat/types.d.ts +75 -0
- package/dist/chat/types.js +22 -0
- package/dist/client-capabilities.d.ts +6 -0
- package/dist/client-capabilities.js +9 -0
- package/dist/connection-offer.d.ts +80 -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/git-remote.d.ts +16 -0
- package/dist/git-remote.js +72 -0
- package/dist/host-connection-schema.d.ts +23 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/importable-providers.d.ts +7 -0
- package/dist/importable-providers.js +7 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +3005 -0
- package/dist/loop/rpc-schemas.js +163 -0
- package/dist/messages.d.ts +144995 -0
- package/dist/messages.js +3338 -0
- package/dist/paseo-config-schema.d.ts +915 -0
- package/dist/paseo-config-schema.js +77 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/provider-config.d.ts +602 -0
- package/dist/provider-config.js +123 -0
- package/dist/provider-manifest.d.ts +33 -0
- package/dist/provider-manifest.js +219 -0
- package/dist/schedule/rpc-schemas.d.ts +3993 -0
- package/dist/schedule/rpc-schemas.js +151 -0
- package/dist/schedule/types.d.ts +745 -0
- package/dist/schedule/types.js +74 -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-snapshot.d.ts +3 -0
- package/dist/terminal-snapshot.js +165 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -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/package.json +34 -0
|
@@ -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,23 @@
|
|
|
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
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
type: "directTcp";
|
|
10
|
+
id: string;
|
|
11
|
+
endpoint: string;
|
|
12
|
+
useTls: boolean;
|
|
13
|
+
password?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
type: "directTcp";
|
|
16
|
+
id: string;
|
|
17
|
+
endpoint: string;
|
|
18
|
+
useTls?: boolean | undefined;
|
|
19
|
+
password?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export type DirectTcpHostConnection = z.input<typeof DirectTcpHostConnectionSchema>;
|
|
22
|
+
export type NormalizedDirectTcpHostConnection = z.output<typeof DirectTcpHostConnectionSchema>;
|
|
23
|
+
//# 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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Providers eligible for "import recent session" discovery. ACP-based
|
|
3
|
+
* providers (gemini, copilot, generic acp) are excluded because they either
|
|
4
|
+
* don't expose persisted history quickly or duplicate other providers.
|
|
5
|
+
*/
|
|
6
|
+
export declare const IMPORTABLE_PROVIDERS: readonly ["claude", "codex", "opencode", "pi"];
|
|
7
|
+
//# sourceMappingURL=importable-providers.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Providers eligible for "import recent session" discovery. ACP-based
|
|
3
|
+
* providers (gemini, copilot, generic acp) are excluded because they either
|
|
4
|
+
* don't expose persisted history quickly or duplicate other providers.
|
|
5
|
+
*/
|
|
6
|
+
export const IMPORTABLE_PROVIDERS = ["claude", "codex", "opencode", "pi"];
|
|
7
|
+
//# sourceMappingURL=importable-providers.js.map
|