Extract client SDK package (#1052)

* Extract client SDK package

* Polish SDK client identity defaults

* Build client before dependent CI jobs

* Restore daemon client server export

* Extract protocol and client SDK packages

* Fix provider override schema validation

* Fix app test daemon client imports

* Simplify workspace build targets

* Fix CLI test server build bootstrap

* Run SDK package tests in CI

* Fix rebase package split drift

* Restore lockfile registry metadata

* Update SDK config test for prompt default

* Move terminal stream router test to client package

* Fix rebase drift for protocol imports

* Fix SDK agent capability fixture

* Restore legacy server client exports

* Fix server export compatibility test

* Advertise custom mode icon client capability

* Remove server daemon-client exports

* Format rebased mode control import

* Fix rebase drift for protocol imports

Files added by upstream PRs (#893, #1147, #1154) referenced the pre-split
shared/ paths that this branch moves into @getpaseo/protocol. Redirect
those imports to the protocol package so typecheck stays green after the
rebase.
This commit is contained in:
Mohamed Boudra
2026-05-28 01:58:18 +08:00
committed by GitHub
parent 0ea41378a4
commit 53c14d9855
403 changed files with 3193 additions and 1417 deletions
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";
import type { DaemonClient, FetchAgentsEntry } from "@server/client/daemon-client";
import type { AgentSnapshotPayload } from "@server/shared/messages";
import { PARENT_AGENT_ID_LABEL } from "@server/shared/agent-labels";
import type { DaemonClient, FetchAgentsEntry } from "@getpaseo/client/internal/daemon-client";
import type { AgentSnapshotPayload } from "@getpaseo/protocol/messages";
import { PARENT_AGENT_ID_LABEL } from "@getpaseo/protocol/agent-labels";
import { useSessionStore } from "@/stores/session-store";
import { replaceFetchedAgentDirectory } from "./agent-directory-sync";
@@ -1,4 +1,4 @@
import type { FetchAgentsEntry } from "@server/client/daemon-client";
import type { FetchAgentsEntry } from "@getpaseo/client/internal/daemon-client";
import { type Agent, useSessionStore } from "@/stores/session-store";
import { derivePendingPermissionKey, normalizeAgentSnapshot } from "@/utils/agent-snapshots";
import { resolveProjectPlacement } from "@/utils/project-placement";
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import type { AgentSnapshotPayload } from "@server/shared/messages";
import { PARENT_AGENT_ID_LABEL } from "@server/shared/agent-labels";
import type { AgentSnapshotPayload } from "@getpaseo/protocol/messages";
import { PARENT_AGENT_ID_LABEL } from "@getpaseo/protocol/agent-labels";
import { normalizeAgentSnapshot } from "./agent-snapshots";
function createSnapshot(
+3 -3
View File
@@ -1,6 +1,6 @@
import type { AgentSnapshotPayload } from "@server/shared/messages";
import type { AgentPermissionRequest } from "@server/server/agent/agent-sdk-types";
import { PARENT_AGENT_ID_LABEL } from "@server/shared/agent-labels";
import type { AgentSnapshotPayload } from "@getpaseo/protocol/messages";
import type { AgentPermissionRequest } from "@getpaseo/protocol/agent-types";
import { PARENT_AGENT_ID_LABEL } from "@getpaseo/protocol/agent-labels";
export function derivePendingPermissionKey(
agentId: string,
+2 -2
View File
@@ -10,9 +10,9 @@ import {
serializeConnectionUriForStorage,
shouldUseTlsForDefaultHostedRelay,
type HostPortParts,
} from "@server/shared/daemon-endpoints";
} from "@getpaseo/protocol/daemon-endpoints";
export { decodeOfferFragmentPayload } from "@server/shared/connection-offer";
export { decodeOfferFragmentPayload } from "@getpaseo/protocol/connection-offer";
export type { HostPortParts };
@@ -1,4 +1,4 @@
import type { ToolCallDetail } from "@server/server/agent/agent-sdk-types";
import type { ToolCallDetail } from "@getpaseo/protocol/agent-types";
const SHELL_FILE_COMMANDS = new Set([
"cat",
+1 -1
View File
@@ -1,4 +1,4 @@
import { parseGitHubRemoteUrl } from "@server/shared/git-remote";
import { parseGitHubRemoteUrl } from "@getpaseo/protocol/git-remote";
export type GithubRefKind = "pull" | "issues";
@@ -29,7 +29,7 @@ vi.mock("@react-native-async-storage/async-storage", () => {
};
});
import type { DaemonClient } from "@server/client/daemon-client";
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { useSessionStore, type Agent, type WorkspaceDescriptor } from "@/stores/session-store";
import { useWorkspaceLayoutStore } from "@/stores/workspace-layout-store";
import { navigateToAgent } from "@/utils/navigate-to-agent";
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { PaseoConfigRawSchema } from "@server/utils/paseo-config-schema";
import type { PaseoConfigRaw } from "@server/shared/messages";
import { PaseoConfigRawSchema } from "@getpaseo/protocol/paseo-config-schema";
import type { PaseoConfigRaw } from "@getpaseo/protocol/messages";
import { applyDraftToConfig, configToDraft, type ProjectConfigDraft } from "./project-config-form";
function emptyDraft(): ProjectConfigDraft {
@@ -3,7 +3,7 @@ import type {
PaseoMetadataGeneration,
PaseoMetadataGenerationEntry,
PaseoScriptEntryRaw,
} from "@server/shared/messages";
} from "@getpaseo/protocol/messages";
export type LifecycleOriginalKind = "string" | "array" | "missing";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { ProjectPlacementPayload } from "@server/shared/messages";
import type { ProjectPlacementPayload } from "@getpaseo/protocol/messages";
import { deriveProjectKey, deriveProjectName } from "@/utils/agent-grouping";
function normalizeWorkingDirectory(cwd: string): string {
+1 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import type { ProjectPlacementPayload } from "@server/shared/messages";
import type { ProjectPlacementPayload } from "@getpaseo/protocol/messages";
import type { WorkspaceDescriptor } from "@/stores/session-store";
import { buildProjects } from "./projects";
@@ -1,10 +1,10 @@
import type { ProviderSnapshotEntry } from "@server/server/agent/agent-sdk-types";
import type { ProviderSnapshotEntry } from "@getpaseo/protocol/agent-types";
import {
type AgentModeColorTier,
type AgentModeIcon,
type AgentProviderDefinition,
type AgentProviderModeDefinition,
} from "@server/server/agent/provider-manifest";
} from "@getpaseo/protocol/provider-manifest";
function buildProviderModes(entry: ProviderSnapshotEntry): AgentProviderModeDefinition[] {
const entryModes = entry.modes ?? [];
+1 -1
View File
@@ -1,4 +1,4 @@
import type { AgentAttachment, GitHubSearchItem } from "@server/shared/messages";
import type { AgentAttachment, GitHubSearchItem } from "@getpaseo/protocol/messages";
export function buildGitHubAttachmentFromSearchItem(
item: GitHubSearchItem | null,
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import type { ServerCapabilities } from "@server/shared/messages";
import type { ServerCapabilities } from "@getpaseo/protocol/messages";
import type { DaemonServerInfo } from "@/stores/session-store";
import {
getServerCapabilities,
@@ -1,4 +1,4 @@
import type { ServerCapabilityState } from "@server/shared/messages";
import type { ServerCapabilityState } from "@getpaseo/protocol/messages";
import type { DaemonServerInfo } from "@/stores/session-store";
export type VoiceReadinessMode = "dictation" | "voice";
@@ -2,7 +2,7 @@ import {
deriveAgentStateBucket,
type AgentAttentionReason,
type AgentStateBucketInput,
} from "@server/shared/agent-state-bucket";
} from "@getpaseo/protocol/agent-state-bucket";
export type SidebarStateBucket = "needs_input" | "failed" | "running" | "attention" | "done";
export type SidebarAttentionReason = AgentAttentionReason;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CreateTerminalResponse, ListTerminalsResponse } from "@server/shared/messages";
import type { CreateTerminalResponse, ListTerminalsResponse } from "@getpaseo/protocol/messages";
type TerminalListEntry = ListTerminalsResponse["payload"]["terminals"][number];
type CreatedTerminal = NonNullable<CreateTerminalResponse["payload"]["terminal"]>;
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { DaemonClientConfig } from "@server/client/daemon-client";
import type { DaemonClientConfig } from "@getpaseo/client/internal/daemon-client";
import type { DaemonConnectionDependencies, DaemonProbeClient } from "./test-daemon-connection";
class FakeDaemonClient implements DaemonProbeClient {
@@ -1,5 +1,5 @@
import { DaemonClient } from "@server/client/daemon-client";
import type { DaemonClientConfig } from "@server/client/daemon-client";
import { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import type { DaemonClientConfig } from "@getpaseo/client/internal/daemon-client";
import type { HostConnection } from "@/types/host-connection";
import { getOrCreateClientId } from "./client-id";
import { resolveAppVersion } from "./app-version";
@@ -1,7 +1,7 @@
import assert from "node:assert/strict";
import { describe, it } from "vitest";
import type { ToolCallDetail } from "@server/server/agent/agent-sdk-types";
import type { ToolCallDetail } from "@getpaseo/protocol/agent-types";
import { hasMeaningfulToolCallDetail, isPendingToolCallDetail } from "./tool-call-detail-state";
describe("tool-call detail state", () => {
@@ -1,4 +1,4 @@
import type { ToolCallDetail } from "@server/server/agent/agent-sdk-types";
import type { ToolCallDetail } from "@getpaseo/protocol/agent-types";
function hasMeaningfulUnknownValue(value: unknown): boolean {
if (value === null || value === undefined) {
+1 -1
View File
@@ -2,4 +2,4 @@ export {
buildToolCallDisplayModel,
type ToolCallDisplayInput,
type ToolCallDisplayModel,
} from "@server/shared/tool-call-display";
} from "@getpaseo/protocol/tool-call-display";
+2 -2
View File
@@ -10,8 +10,8 @@ import {
SquareTerminal,
Wrench,
} from "lucide-react-native";
import type { ToolCallDetail, ToolCallIconName } from "@server/server/agent/agent-sdk-types";
import { isPaseoToolName } from "@server/server/agent/tool-name-normalization";
import type { ToolCallDetail, ToolCallIconName } from "@getpaseo/protocol/agent-types";
import { isPaseoToolName } from "@getpaseo/protocol/tool-name-normalization";
import { PaseoLogo } from "@/components/icons/paseo-logo";
export type ToolCallIconComponent = ComponentType<{ size?: number; color?: string }>;
@@ -1,4 +1,4 @@
import type { DaemonClient } from "@server/client/daemon-client";
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { afterEach, describe, expect, it, vi } from "vitest";
import { buildWorkspaceArchiveRedirectRoute } from "@/utils/workspace-archive-navigation";
import type { WorkspaceDescriptor } from "@/stores/session-store";
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import type { WorkspaceScriptPayload } from "@server/shared/messages";
import type { WorkspaceScriptPayload } from "@getpaseo/protocol/messages";
import type { ActiveConnection } from "@/runtime/host-runtime";
import { resolveWorkspaceScriptLink } from "./workspace-script-links";
@@ -1,5 +1,5 @@
import { parseHostPort } from "@server/shared/daemon-endpoints";
import type { WorkspaceScriptPayload } from "@server/shared/messages";
import { parseHostPort } from "@getpaseo/protocol/daemon-endpoints";
import type { WorkspaceScriptPayload } from "@getpaseo/protocol/messages";
import type { ActiveConnection } from "@/runtime/host-runtime";
export interface ResolvedWorkspaceScriptLink {