@sealant/sdk-next 0.40.0-next.764 → 0.40.0-next.766
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/dist/effect/api-client.d.ts +136 -0
- package/dist/effect/operations.d.ts +67 -0
- package/dist/effect/operations.js +2 -0
- package/dist/facade/workspace.js +15 -1
- package/dist/internal/features.d.ts +2 -0
- package/dist/internal/features.js +6 -0
- package/dist/types.d.ts +28 -0
- package/package.json +3 -3
|
@@ -1031,6 +1031,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
1031
1031
|
readonly connectedAccountDefaults: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
1032
1032
|
readonly connectedAccountLoginClass: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
1033
1033
|
readonly kubernetesPersonLayout: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
1034
|
+
readonly credentialPlacements: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
1034
1035
|
}>>;
|
|
1035
1036
|
}>>, never, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
1036
1037
|
readonly getSetupState: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSetupState", "GET", "/v1/system/setup-state", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -1624,6 +1625,16 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
1624
1625
|
readonly homes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1625
1626
|
readonly home: import("effect/Schema").String;
|
|
1626
1627
|
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
1628
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1629
|
+
readonly placementId: import("effect/Schema").String;
|
|
1630
|
+
readonly accountId: import("effect/Schema").String;
|
|
1631
|
+
readonly revision: import("effect/Schema").Int;
|
|
1632
|
+
readonly login: import("effect/Schema").Struct<{
|
|
1633
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
1634
|
+
}>;
|
|
1635
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
1636
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
1637
|
+
}>>>;
|
|
1627
1638
|
readonly accounts: import("effect/Schema").Struct<{
|
|
1628
1639
|
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1629
1640
|
readonly connectedAccountId: import("effect/Schema").String;
|
|
@@ -1723,6 +1734,52 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
1723
1734
|
readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
1724
1735
|
}>>;
|
|
1725
1736
|
}>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
1737
|
+
readonly pruneWorkspaceCredentials: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"pruneWorkspaceCredentials", "POST", "/v1/workspaces/:workspaceId/credentials/prune", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
1738
|
+
readonly workspaceId: import("effect/Schema").String;
|
|
1739
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
1740
|
+
readonly ownerUserId: import("effect/Schema").String;
|
|
1741
|
+
readonly home: import("effect/Schema").String;
|
|
1742
|
+
readonly live: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
1743
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
1744
|
+
readonly workspaceId: import("effect/Schema").String;
|
|
1745
|
+
readonly runId: import("effect/Schema").String;
|
|
1746
|
+
readonly home: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1747
|
+
readonly home: import("effect/Schema").String;
|
|
1748
|
+
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
1749
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1750
|
+
readonly placementId: import("effect/Schema").String;
|
|
1751
|
+
readonly accountId: import("effect/Schema").String;
|
|
1752
|
+
readonly revision: import("effect/Schema").Int;
|
|
1753
|
+
readonly login: import("effect/Schema").Struct<{
|
|
1754
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
1755
|
+
}>;
|
|
1756
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
1757
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
1758
|
+
}>>>;
|
|
1759
|
+
readonly accounts: import("effect/Schema").Struct<{
|
|
1760
|
+
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1761
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
1762
|
+
readonly name: import("effect/Schema").String;
|
|
1763
|
+
}>>;
|
|
1764
|
+
readonly codex: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1765
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
1766
|
+
readonly name: import("effect/Schema").String;
|
|
1767
|
+
}>>;
|
|
1768
|
+
readonly github: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1769
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
1770
|
+
readonly name: import("effect/Schema").String;
|
|
1771
|
+
}>>;
|
|
1772
|
+
readonly pi: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1773
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
1774
|
+
readonly name: import("effect/Schema").String;
|
|
1775
|
+
}>>;
|
|
1776
|
+
readonly opencode: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1777
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
1778
|
+
readonly name: import("effect/Schema").String;
|
|
1779
|
+
}>>;
|
|
1780
|
+
}>;
|
|
1781
|
+
}>>;
|
|
1782
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceForbiddenError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
1726
1783
|
readonly putWorkspaceCredentials: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"putWorkspaceCredentials", "POST", "/v1/workspaces/:workspaceId/credentials", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
1727
1784
|
readonly workspaceId: import("effect/Schema").String;
|
|
1728
1785
|
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -1737,12 +1794,23 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
1737
1794
|
readonly pi: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
1738
1795
|
readonly opencode: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
1739
1796
|
readonly partial: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
1797
|
+
readonly live: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
1740
1798
|
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
1741
1799
|
readonly workspaceId: import("effect/Schema").String;
|
|
1742
1800
|
readonly runId: import("effect/Schema").String;
|
|
1743
1801
|
readonly home: import("effect/Schema").Struct<{
|
|
1744
1802
|
readonly home: import("effect/Schema").String;
|
|
1745
1803
|
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
1804
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1805
|
+
readonly placementId: import("effect/Schema").String;
|
|
1806
|
+
readonly accountId: import("effect/Schema").String;
|
|
1807
|
+
readonly revision: import("effect/Schema").Int;
|
|
1808
|
+
readonly login: import("effect/Schema").Struct<{
|
|
1809
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
1810
|
+
}>;
|
|
1811
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
1812
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
1813
|
+
}>>>;
|
|
1746
1814
|
readonly accounts: import("effect/Schema").Struct<{
|
|
1747
1815
|
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
1748
1816
|
readonly connectedAccountId: import("effect/Schema").String;
|
|
@@ -2895,6 +2963,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2895
2963
|
readonly connectedAccountDefaults: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
2896
2964
|
readonly connectedAccountLoginClass: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
2897
2965
|
readonly kubernetesPersonLayout: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
2966
|
+
readonly credentialPlacements: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
2898
2967
|
}>>;
|
|
2899
2968
|
}>>, never, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
2900
2969
|
readonly getSetupState: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSetupState", "GET", "/v1/system/setup-state", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -3488,6 +3557,16 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
3488
3557
|
readonly homes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3489
3558
|
readonly home: import("effect/Schema").String;
|
|
3490
3559
|
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
3560
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3561
|
+
readonly placementId: import("effect/Schema").String;
|
|
3562
|
+
readonly accountId: import("effect/Schema").String;
|
|
3563
|
+
readonly revision: import("effect/Schema").Int;
|
|
3564
|
+
readonly login: import("effect/Schema").Struct<{
|
|
3565
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
3566
|
+
}>;
|
|
3567
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
3568
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
3569
|
+
}>>>;
|
|
3491
3570
|
readonly accounts: import("effect/Schema").Struct<{
|
|
3492
3571
|
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3493
3572
|
readonly connectedAccountId: import("effect/Schema").String;
|
|
@@ -3587,6 +3666,52 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
3587
3666
|
readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
3588
3667
|
}>>;
|
|
3589
3668
|
}>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
3669
|
+
readonly pruneWorkspaceCredentials: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"pruneWorkspaceCredentials", "POST", "/v1/workspaces/:workspaceId/credentials/prune", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
3670
|
+
readonly workspaceId: import("effect/Schema").String;
|
|
3671
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
3672
|
+
readonly ownerUserId: import("effect/Schema").String;
|
|
3673
|
+
readonly home: import("effect/Schema").String;
|
|
3674
|
+
readonly live: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
3675
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
3676
|
+
readonly workspaceId: import("effect/Schema").String;
|
|
3677
|
+
readonly runId: import("effect/Schema").String;
|
|
3678
|
+
readonly home: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3679
|
+
readonly home: import("effect/Schema").String;
|
|
3680
|
+
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
3681
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3682
|
+
readonly placementId: import("effect/Schema").String;
|
|
3683
|
+
readonly accountId: import("effect/Schema").String;
|
|
3684
|
+
readonly revision: import("effect/Schema").Int;
|
|
3685
|
+
readonly login: import("effect/Schema").Struct<{
|
|
3686
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
3687
|
+
}>;
|
|
3688
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
3689
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
3690
|
+
}>>>;
|
|
3691
|
+
readonly accounts: import("effect/Schema").Struct<{
|
|
3692
|
+
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3693
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
3694
|
+
readonly name: import("effect/Schema").String;
|
|
3695
|
+
}>>;
|
|
3696
|
+
readonly codex: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3697
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
3698
|
+
readonly name: import("effect/Schema").String;
|
|
3699
|
+
}>>;
|
|
3700
|
+
readonly github: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3701
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
3702
|
+
readonly name: import("effect/Schema").String;
|
|
3703
|
+
}>>;
|
|
3704
|
+
readonly pi: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3705
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
3706
|
+
readonly name: import("effect/Schema").String;
|
|
3707
|
+
}>>;
|
|
3708
|
+
readonly opencode: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3709
|
+
readonly connectedAccountId: import("effect/Schema").String;
|
|
3710
|
+
readonly name: import("effect/Schema").String;
|
|
3711
|
+
}>>;
|
|
3712
|
+
}>;
|
|
3713
|
+
}>>;
|
|
3714
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceForbiddenError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
|
|
3590
3715
|
readonly putWorkspaceCredentials: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"putWorkspaceCredentials", "POST", "/v1/workspaces/:workspaceId/credentials", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
3591
3716
|
readonly workspaceId: import("effect/Schema").String;
|
|
3592
3717
|
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
@@ -3601,12 +3726,23 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
3601
3726
|
readonly pi: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
3602
3727
|
readonly opencode: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
3603
3728
|
readonly partial: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
3729
|
+
readonly live: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
3604
3730
|
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
3605
3731
|
readonly workspaceId: import("effect/Schema").String;
|
|
3606
3732
|
readonly runId: import("effect/Schema").String;
|
|
3607
3733
|
readonly home: import("effect/Schema").Struct<{
|
|
3608
3734
|
readonly home: import("effect/Schema").String;
|
|
3609
3735
|
readonly onBehalfOfUserId: import("effect/Schema").String;
|
|
3736
|
+
readonly placements: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3737
|
+
readonly placementId: import("effect/Schema").String;
|
|
3738
|
+
readonly accountId: import("effect/Schema").String;
|
|
3739
|
+
readonly revision: import("effect/Schema").Int;
|
|
3740
|
+
readonly login: import("effect/Schema").Struct<{
|
|
3741
|
+
readonly kind: import("effect/Schema").Literal<"subscription">;
|
|
3742
|
+
}>;
|
|
3743
|
+
readonly pinned: import("effect/Schema").Boolean;
|
|
3744
|
+
readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
|
|
3745
|
+
}>>>;
|
|
3610
3746
|
readonly accounts: import("effect/Schema").Struct<{
|
|
3611
3747
|
readonly claude: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
3612
3748
|
readonly connectedAccountId: import("effect/Schema").String;
|
|
@@ -562,12 +562,23 @@ export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: {
|
|
|
562
562
|
readonly pi?: string | null | undefined;
|
|
563
563
|
readonly opencode?: string | null | undefined;
|
|
564
564
|
readonly partial?: boolean | undefined;
|
|
565
|
+
readonly live?: readonly string[] | undefined;
|
|
565
566
|
}) => Effect.Effect<{
|
|
566
567
|
readonly workspaceId: string;
|
|
567
568
|
readonly runId: string;
|
|
568
569
|
readonly home: {
|
|
569
570
|
readonly home: string;
|
|
570
571
|
readonly onBehalfOfUserId: string;
|
|
572
|
+
readonly placements?: readonly {
|
|
573
|
+
readonly placementId: string;
|
|
574
|
+
readonly accountId: string;
|
|
575
|
+
readonly revision: number;
|
|
576
|
+
readonly login: {
|
|
577
|
+
readonly kind: "subscription";
|
|
578
|
+
};
|
|
579
|
+
readonly pinned: boolean;
|
|
580
|
+
readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
|
|
581
|
+
}[] | undefined;
|
|
571
582
|
readonly accounts: {
|
|
572
583
|
readonly claude?: {
|
|
573
584
|
readonly connectedAccountId: string;
|
|
@@ -597,6 +608,51 @@ export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: {
|
|
|
597
608
|
readonly message: string;
|
|
598
609
|
}[] | undefined;
|
|
599
610
|
}, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
|
|
611
|
+
/** Remove unused credential placements in one home. */
|
|
612
|
+
export declare const pruneWorkspaceCredentialsOp: (workspaceId: string, payload: {
|
|
613
|
+
readonly ownerUserId: string;
|
|
614
|
+
readonly home: string;
|
|
615
|
+
readonly live: readonly string[];
|
|
616
|
+
}) => Effect.Effect<{
|
|
617
|
+
readonly workspaceId: string;
|
|
618
|
+
readonly runId: string;
|
|
619
|
+
readonly home?: {
|
|
620
|
+
readonly home: string;
|
|
621
|
+
readonly onBehalfOfUserId: string;
|
|
622
|
+
readonly placements?: readonly {
|
|
623
|
+
readonly placementId: string;
|
|
624
|
+
readonly accountId: string;
|
|
625
|
+
readonly revision: number;
|
|
626
|
+
readonly login: {
|
|
627
|
+
readonly kind: "subscription";
|
|
628
|
+
};
|
|
629
|
+
readonly pinned: boolean;
|
|
630
|
+
readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
|
|
631
|
+
}[] | undefined;
|
|
632
|
+
readonly accounts: {
|
|
633
|
+
readonly claude?: {
|
|
634
|
+
readonly connectedAccountId: string;
|
|
635
|
+
readonly name: string;
|
|
636
|
+
} | undefined;
|
|
637
|
+
readonly codex?: {
|
|
638
|
+
readonly connectedAccountId: string;
|
|
639
|
+
readonly name: string;
|
|
640
|
+
} | undefined;
|
|
641
|
+
readonly github?: {
|
|
642
|
+
readonly connectedAccountId: string;
|
|
643
|
+
readonly name: string;
|
|
644
|
+
} | undefined;
|
|
645
|
+
readonly pi?: {
|
|
646
|
+
readonly connectedAccountId: string;
|
|
647
|
+
readonly name: string;
|
|
648
|
+
} | undefined;
|
|
649
|
+
readonly opencode?: {
|
|
650
|
+
readonly connectedAccountId: string;
|
|
651
|
+
readonly name: string;
|
|
652
|
+
} | undefined;
|
|
653
|
+
};
|
|
654
|
+
} | undefined;
|
|
655
|
+
}, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
|
|
600
656
|
export declare const releaseWorkspaceCredentialsOp: (workspaceId: string, query: {
|
|
601
657
|
readonly ownerUserId: string;
|
|
602
658
|
readonly home: string;
|
|
@@ -614,6 +670,16 @@ export declare const listWorkspaceCredentialsOp: (workspaceId: string, query: {
|
|
|
614
670
|
readonly homes: readonly {
|
|
615
671
|
readonly home: string;
|
|
616
672
|
readonly onBehalfOfUserId: string;
|
|
673
|
+
readonly placements?: readonly {
|
|
674
|
+
readonly placementId: string;
|
|
675
|
+
readonly accountId: string;
|
|
676
|
+
readonly revision: number;
|
|
677
|
+
readonly login: {
|
|
678
|
+
readonly kind: "subscription";
|
|
679
|
+
};
|
|
680
|
+
readonly pinned: boolean;
|
|
681
|
+
readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
|
|
682
|
+
}[] | undefined;
|
|
617
683
|
readonly accounts: {
|
|
618
684
|
readonly claude?: {
|
|
619
685
|
readonly connectedAccountId: string;
|
|
@@ -1314,6 +1380,7 @@ export declare const getIndexOp: () => Effect.Effect<{
|
|
|
1314
1380
|
readonly connectedAccountDefaults?: boolean | undefined;
|
|
1315
1381
|
readonly connectedAccountLoginClass?: boolean | undefined;
|
|
1316
1382
|
readonly kubernetesPersonLayout?: boolean | undefined;
|
|
1383
|
+
readonly credentialPlacements?: boolean | undefined;
|
|
1317
1384
|
} | undefined;
|
|
1318
1385
|
}, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
|
|
1319
1386
|
export declare const getSetupStateOp: () => Effect.Effect<{
|
|
@@ -28,6 +28,8 @@ export const recoverWorkspaceOp = (workspaceId, payload) => Effect.flatMap(Seala
|
|
|
28
28
|
export const restartWorkspaceOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.restartWorkspace({ params: { workspaceId }, payload }));
|
|
29
29
|
export const inspectWorkspaceImageOp = (payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.inspectWorkspaceImage({ payload }));
|
|
30
30
|
export const putWorkspaceCredentialsOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.putWorkspaceCredentials({ params: { workspaceId }, payload }));
|
|
31
|
+
/** Remove unused credential placements in one home. */
|
|
32
|
+
export const pruneWorkspaceCredentialsOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.pruneWorkspaceCredentials({ params: { workspaceId }, payload }));
|
|
31
33
|
export const releaseWorkspaceCredentialsOp = (workspaceId, query) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.releaseWorkspaceCredentials({ params: { workspaceId }, query }));
|
|
32
34
|
export const listWorkspaceCredentialsOp = (workspaceId, query) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.listWorkspaceCredentials({ params: { workspaceId }, query }));
|
|
33
35
|
export const expireWorkspaceOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.expireWorkspace({ params: { workspaceId }, payload }));
|
package/dist/facade/workspace.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { sessionArgvIssue } from "@sealant/api-contracts";
|
|
2
2
|
import { applyDotfiles } from "../effect/apply-dotfiles.js";
|
|
3
3
|
import { execWorkspace } from "../effect/exec-workspace.js";
|
|
4
|
-
import { bindWorkspaceOp, flushWorkspaceCaptureOp, getWorkspaceCaptureStatusOp, createSessionAsUserOp, createSessionOp, expireWorkspaceOp, clearWorkspaceSshUserOp, getSessionOp, getWorkspaceOp, listSessionsOp, replanWorkspaceCaptureOp, recoverWorkspaceOp, restartWorkspaceOp, listWorkspaceCredentialsOp, putWorkspaceCredentialsOp, releaseWorkspaceCredentialsOp, stopWorkspaceOp, } from "../effect/operations.js";
|
|
4
|
+
import { bindWorkspaceOp, flushWorkspaceCaptureOp, getWorkspaceCaptureStatusOp, createSessionAsUserOp, createSessionOp, expireWorkspaceOp, clearWorkspaceSshUserOp, getSessionOp, getWorkspaceOp, listSessionsOp, replanWorkspaceCaptureOp, recoverWorkspaceOp, restartWorkspaceOp, listWorkspaceCredentialsOp, putWorkspaceCredentialsOp, pruneWorkspaceCredentialsOp, releaseWorkspaceCredentialsOp, stopWorkspaceOp, } from "../effect/operations.js";
|
|
5
5
|
import { SealantApiError, SealantError, SealantNotImplementedError } from "../errors.js";
|
|
6
6
|
import { elapsed } from "../internal/clock.js";
|
|
7
7
|
import { mapAccountRef } from "../internal/credentials.js";
|
|
8
8
|
import { parseTtlSeconds } from "../internal/duration.js";
|
|
9
|
+
import { requireCredentialPlacements } from "../internal/features.js";
|
|
9
10
|
import { requireProcessUser } from "../internal/process-user.js";
|
|
10
11
|
import { openForward, openForwardV2 } from "./forward.js";
|
|
11
12
|
import { makeInteractiveSession } from "./session.js";
|
|
@@ -201,6 +202,7 @@ export const toWorkspaceImage = (image) => ({
|
|
|
201
202
|
});
|
|
202
203
|
/** Wire → public credential home. */
|
|
203
204
|
const toCredentialHome = (home) => ({
|
|
205
|
+
...(home.placements === undefined ? {} : { placements: home.placements }),
|
|
204
206
|
home: home.home,
|
|
205
207
|
onBehalfOf: home.onBehalfOfUserId,
|
|
206
208
|
accounts: {
|
|
@@ -759,6 +761,8 @@ export const makeWorkspace = (ctx, init) => {
|
|
|
759
761
|
// People's logins, one person per home; the workspace stays the client owner's.
|
|
760
762
|
credentials: {
|
|
761
763
|
put: async (options) => {
|
|
764
|
+
if (options.live !== undefined)
|
|
765
|
+
await requireCredentialPlacements(ctx);
|
|
762
766
|
const choices = {
|
|
763
767
|
claude: accountChoice(options.claude),
|
|
764
768
|
codex: accountChoice(options.codex),
|
|
@@ -778,6 +782,7 @@ export const makeWorkspace = (ctx, init) => {
|
|
|
778
782
|
...(choices.pi === undefined ? {} : { pi: choices.pi }),
|
|
779
783
|
...(choices.opencode === undefined ? {} : { opencode: choices.opencode }),
|
|
780
784
|
...(options.partial === true ? { partial: true } : {}),
|
|
785
|
+
...(options.live === undefined ? {} : { live: options.live }),
|
|
781
786
|
}));
|
|
782
787
|
return {
|
|
783
788
|
...toCredentialHome(answered.home),
|
|
@@ -788,6 +793,15 @@ export const makeWorkspace = (ctx, init) => {
|
|
|
788
793
|
})),
|
|
789
794
|
};
|
|
790
795
|
},
|
|
796
|
+
prune: async (home, live) => {
|
|
797
|
+
await requireCredentialPlacements(ctx);
|
|
798
|
+
const answered = await ctx.runtime.run(pruneWorkspaceCredentialsOp(init.id, {
|
|
799
|
+
ownerUserId: ctx.config.hostLocal.ownerUserId,
|
|
800
|
+
home,
|
|
801
|
+
live,
|
|
802
|
+
}));
|
|
803
|
+
return answered.home === undefined ? undefined : toCredentialHome(answered.home);
|
|
804
|
+
},
|
|
791
805
|
release: async (home) => {
|
|
792
806
|
const answered = await ctx.runtime.run(releaseWorkspaceCredentialsOp(init.id, {
|
|
793
807
|
ownerUserId: ctx.config.hostLocal.ownerUserId,
|
|
@@ -19,6 +19,7 @@ export declare const toFeatures: (index: {
|
|
|
19
19
|
readonly connectedAccountDefaults?: boolean | undefined;
|
|
20
20
|
readonly connectedAccountLoginClass?: boolean | undefined;
|
|
21
21
|
readonly kubernetesPersonLayout?: boolean | undefined;
|
|
22
|
+
readonly credentialPlacements?: boolean | undefined;
|
|
22
23
|
} | undefined;
|
|
23
24
|
}) => SealantFeatures;
|
|
24
25
|
/**
|
|
@@ -28,3 +29,4 @@ export declare const toFeatures: (index: {
|
|
|
28
29
|
export declare const readFeatures: (ctx: SdkContext) => Promise<SealantFeatures>;
|
|
29
30
|
export declare const requireConnectedAccountDefaults: (ctx: SdkContext) => Promise<void>;
|
|
30
31
|
export declare const requireConnectedAccountLoginClass: (ctx: SdkContext) => Promise<void>;
|
|
32
|
+
export declare const requireCredentialPlacements: (ctx: SdkContext) => Promise<void>;
|
|
@@ -20,6 +20,7 @@ export const toFeatures = (index) => {
|
|
|
20
20
|
workspaceSshUser: features?.workspaceSshUser === true,
|
|
21
21
|
personBinding: features?.personBinding === true,
|
|
22
22
|
sshKeyRemovalEndsConnections: features?.sshKeyRemovalEndsConnections === true,
|
|
23
|
+
credentialPlacements: features?.credentialPlacements === true,
|
|
23
24
|
connectedAccountDefaults: features?.connectedAccountDefaults === true,
|
|
24
25
|
connectedAccountLoginClass: features?.connectedAccountLoginClass === true,
|
|
25
26
|
kubernetesPersonLayout: features?.kubernetesPersonLayout === true,
|
|
@@ -57,3 +58,8 @@ export const requireConnectedAccountLoginClass = async (ctx) => {
|
|
|
57
58
|
throw new SealantError("This control plane cannot check a connect's login class (it does not report the feature, or could not be asked), and would store the secret whatever it is; nothing was sent.", { code: "connected-account-login-class-unsupported" });
|
|
58
59
|
}
|
|
59
60
|
};
|
|
61
|
+
export const requireCredentialPlacements = async (ctx) => {
|
|
62
|
+
const supported = await readFeatures(ctx).then((features) => features.credentialPlacements, () => false);
|
|
63
|
+
if (!supported)
|
|
64
|
+
throw new SealantError("This control plane cannot protect live credential placements or prune them; nothing was sent.", { code: "credential-placements-unsupported" });
|
|
65
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1203,6 +1203,11 @@ export interface WorkspaceCredentials {
|
|
|
1203
1203
|
}>;
|
|
1204
1204
|
/** The homes of the running executor and the logins Core keeps in each, oldest first. */
|
|
1205
1205
|
list(): Promise<readonly WorkspaceCredentialHome[]>;
|
|
1206
|
+
/**
|
|
1207
|
+
* Remove every login of `home` that is neither in `live` (the placements running processes hold)
|
|
1208
|
+
* nor the person's default. Answers the home as it is left, or `undefined` when it holds nothing.
|
|
1209
|
+
*/
|
|
1210
|
+
prune(home: string, live: readonly string[]): Promise<WorkspaceCredentialHome | undefined>;
|
|
1206
1211
|
}
|
|
1207
1212
|
/**
|
|
1208
1213
|
* A person's dotfiles in a running workspace (see {@link Workspace.dotfiles}): the same sources as a
|
|
@@ -1313,6 +1318,11 @@ export interface WorkspaceCredentialsPutOptions {
|
|
|
1313
1318
|
* which and why, instead of the whole put rejecting. Any other refusal still rejects.
|
|
1314
1319
|
*/
|
|
1315
1320
|
readonly partial?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* The placements running processes hold in this home: a provider whose file one of them holds is
|
|
1323
|
+
* not written over with another login. Requires `features().credentialPlacements`.
|
|
1324
|
+
*/
|
|
1325
|
+
readonly live?: readonly string[];
|
|
1316
1326
|
}
|
|
1317
1327
|
/** A provider a partial {@link WorkspaceCredentials.put} left out, and why. */
|
|
1318
1328
|
export interface WorkspaceCredentialSkip {
|
|
@@ -1328,6 +1338,20 @@ export interface WorkspaceCredentialsPutResult extends WorkspaceCredentialHome {
|
|
|
1328
1338
|
/** A partial put's left-out providers, in the order named; always empty for a whole put. */
|
|
1329
1339
|
readonly skipped: readonly WorkspaceCredentialSkip[];
|
|
1330
1340
|
}
|
|
1341
|
+
/** One login written into one home: its id stays the same while a refresh moves its revision. */
|
|
1342
|
+
export interface CredentialPlacementReceipt {
|
|
1343
|
+
readonly placementId: string;
|
|
1344
|
+
readonly accountId: string;
|
|
1345
|
+
readonly revision: number;
|
|
1346
|
+
readonly login: {
|
|
1347
|
+
readonly kind: "subscription";
|
|
1348
|
+
};
|
|
1349
|
+
readonly pinned: boolean;
|
|
1350
|
+
}
|
|
1351
|
+
/** A receipt associated with the provider slot it occupies in this home. */
|
|
1352
|
+
export interface WorkspaceCredentialPlacementReceipt extends CredentialPlacementReceipt {
|
|
1353
|
+
readonly provider: "claude" | "codex" | "github" | "pi" | "opencode";
|
|
1354
|
+
}
|
|
1331
1355
|
/** One account whose copy a home holds. */
|
|
1332
1356
|
export interface WorkspaceCredentialHomeAccount {
|
|
1333
1357
|
readonly connectedAccountId: string;
|
|
@@ -1336,6 +1360,8 @@ export interface WorkspaceCredentialHomeAccount {
|
|
|
1336
1360
|
}
|
|
1337
1361
|
/** One home of a running workspace and the logins Core keeps in it. */
|
|
1338
1362
|
export interface WorkspaceCredentialHome {
|
|
1363
|
+
/** One receipt per login written there. Absent from a control plane without placements. */
|
|
1364
|
+
readonly placements?: readonly WorkspaceCredentialPlacementReceipt[];
|
|
1339
1365
|
readonly home: string;
|
|
1340
1366
|
/** The one person whose logins the home holds. */
|
|
1341
1367
|
readonly onBehalfOf: string;
|
|
@@ -1425,6 +1451,8 @@ export interface SealantFeatures {
|
|
|
1425
1451
|
* create with `ownerMap` on Kubernetes is refused.
|
|
1426
1452
|
*/
|
|
1427
1453
|
readonly kubernetesPersonLayout: boolean;
|
|
1454
|
+
/** Credential homes answer placement receipts; a put takes `live`; `prune` exists. */
|
|
1455
|
+
readonly credentialPlacements: boolean;
|
|
1428
1456
|
}
|
|
1429
1457
|
/** A published workspace image. */
|
|
1430
1458
|
export interface WorkspaceImage {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealant/sdk-next",
|
|
3
|
-
"version": "0.40.0-next.
|
|
3
|
+
"version": "0.40.0-next.766",
|
|
4
4
|
"description": "The fluent public SDK for Sealant — create a workspace, run a harness, replay the record.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"node": ">=20"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.
|
|
29
|
+
"@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.766"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"effect": "^4.0.5"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "a8da605cc7a422a896dd2203183561cf62bde351",
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
}
|