@sealant/sdk-next 0.40.0-next.766 → 0.40.0-next.768

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.
@@ -1032,6 +1032,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
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
1034
  readonly credentialPlacements: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1035
+ readonly connectedAccountApiKeys: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1035
1036
  }>>;
1036
1037
  }>>, never, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
1037
1038
  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<{
@@ -1629,9 +1630,13 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
1629
1630
  readonly placementId: import("effect/Schema").String;
1630
1631
  readonly accountId: import("effect/Schema").String;
1631
1632
  readonly revision: import("effect/Schema").Int;
1632
- readonly login: import("effect/Schema").Struct<{
1633
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
1633
1634
  readonly kind: import("effect/Schema").Literal<"subscription">;
1634
- }>;
1635
+ }>, import("effect/Schema").Struct<{
1636
+ readonly kind: import("effect/Schema").Literal<"api-key">;
1637
+ readonly suffix: import("effect/Schema").String;
1638
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
1639
+ }>]>;
1635
1640
  readonly pinned: import("effect/Schema").Boolean;
1636
1641
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
1637
1642
  }>>>;
@@ -1750,9 +1755,13 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
1750
1755
  readonly placementId: import("effect/Schema").String;
1751
1756
  readonly accountId: import("effect/Schema").String;
1752
1757
  readonly revision: import("effect/Schema").Int;
1753
- readonly login: import("effect/Schema").Struct<{
1758
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
1754
1759
  readonly kind: import("effect/Schema").Literal<"subscription">;
1755
- }>;
1760
+ }>, import("effect/Schema").Struct<{
1761
+ readonly kind: import("effect/Schema").Literal<"api-key">;
1762
+ readonly suffix: import("effect/Schema").String;
1763
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
1764
+ }>]>;
1756
1765
  readonly pinned: import("effect/Schema").Boolean;
1757
1766
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
1758
1767
  }>>>;
@@ -1805,9 +1814,13 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
1805
1814
  readonly placementId: import("effect/Schema").String;
1806
1815
  readonly accountId: import("effect/Schema").String;
1807
1816
  readonly revision: import("effect/Schema").Int;
1808
- readonly login: import("effect/Schema").Struct<{
1817
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
1809
1818
  readonly kind: import("effect/Schema").Literal<"subscription">;
1810
- }>;
1819
+ }>, import("effect/Schema").Struct<{
1820
+ readonly kind: import("effect/Schema").Literal<"api-key">;
1821
+ readonly suffix: import("effect/Schema").String;
1822
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
1823
+ }>]>;
1811
1824
  readonly pinned: import("effect/Schema").Boolean;
1812
1825
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
1813
1826
  }>>>;
@@ -2964,6 +2977,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
2964
2977
  readonly connectedAccountLoginClass: import("effect/Schema").optional<import("effect/Schema").Boolean>;
2965
2978
  readonly kubernetesPersonLayout: import("effect/Schema").optional<import("effect/Schema").Boolean>;
2966
2979
  readonly credentialPlacements: import("effect/Schema").optional<import("effect/Schema").Boolean>;
2980
+ readonly connectedAccountApiKeys: import("effect/Schema").optional<import("effect/Schema").Boolean>;
2967
2981
  }>>;
2968
2982
  }>>, never, import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
2969
2983
  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<{
@@ -3561,9 +3575,13 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
3561
3575
  readonly placementId: import("effect/Schema").String;
3562
3576
  readonly accountId: import("effect/Schema").String;
3563
3577
  readonly revision: import("effect/Schema").Int;
3564
- readonly login: import("effect/Schema").Struct<{
3578
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
3565
3579
  readonly kind: import("effect/Schema").Literal<"subscription">;
3566
- }>;
3580
+ }>, import("effect/Schema").Struct<{
3581
+ readonly kind: import("effect/Schema").Literal<"api-key">;
3582
+ readonly suffix: import("effect/Schema").String;
3583
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
3584
+ }>]>;
3567
3585
  readonly pinned: import("effect/Schema").Boolean;
3568
3586
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
3569
3587
  }>>>;
@@ -3682,9 +3700,13 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
3682
3700
  readonly placementId: import("effect/Schema").String;
3683
3701
  readonly accountId: import("effect/Schema").String;
3684
3702
  readonly revision: import("effect/Schema").Int;
3685
- readonly login: import("effect/Schema").Struct<{
3703
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
3686
3704
  readonly kind: import("effect/Schema").Literal<"subscription">;
3687
- }>;
3705
+ }>, import("effect/Schema").Struct<{
3706
+ readonly kind: import("effect/Schema").Literal<"api-key">;
3707
+ readonly suffix: import("effect/Schema").String;
3708
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
3709
+ }>]>;
3688
3710
  readonly pinned: import("effect/Schema").Boolean;
3689
3711
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
3690
3712
  }>>>;
@@ -3737,9 +3759,13 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
3737
3759
  readonly placementId: import("effect/Schema").String;
3738
3760
  readonly accountId: import("effect/Schema").String;
3739
3761
  readonly revision: import("effect/Schema").Int;
3740
- readonly login: import("effect/Schema").Struct<{
3762
+ readonly login: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
3741
3763
  readonly kind: import("effect/Schema").Literal<"subscription">;
3742
- }>;
3764
+ }>, import("effect/Schema").Struct<{
3765
+ readonly kind: import("effect/Schema").Literal<"api-key">;
3766
+ readonly suffix: import("effect/Schema").String;
3767
+ readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
3768
+ }>]>;
3743
3769
  readonly pinned: import("effect/Schema").Boolean;
3744
3770
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
3745
3771
  }>>>;
@@ -575,6 +575,10 @@ export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: {
575
575
  readonly revision: number;
576
576
  readonly login: {
577
577
  readonly kind: "subscription";
578
+ } | {
579
+ readonly kind: "api-key";
580
+ readonly suffix: string;
581
+ readonly keyPath?: string | undefined;
578
582
  };
579
583
  readonly pinned: boolean;
580
584
  readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
@@ -625,6 +629,10 @@ export declare const pruneWorkspaceCredentialsOp: (workspaceId: string, payload:
625
629
  readonly revision: number;
626
630
  readonly login: {
627
631
  readonly kind: "subscription";
632
+ } | {
633
+ readonly kind: "api-key";
634
+ readonly suffix: string;
635
+ readonly keyPath?: string | undefined;
628
636
  };
629
637
  readonly pinned: boolean;
630
638
  readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
@@ -676,6 +684,10 @@ export declare const listWorkspaceCredentialsOp: (workspaceId: string, query: {
676
684
  readonly revision: number;
677
685
  readonly login: {
678
686
  readonly kind: "subscription";
687
+ } | {
688
+ readonly kind: "api-key";
689
+ readonly suffix: string;
690
+ readonly keyPath?: string | undefined;
679
691
  };
680
692
  readonly pinned: boolean;
681
693
  readonly provider: "claude" | "codex" | "github" | "opencode" | "pi";
@@ -1381,6 +1393,7 @@ export declare const getIndexOp: () => Effect.Effect<{
1381
1393
  readonly connectedAccountLoginClass?: boolean | undefined;
1382
1394
  readonly kubernetesPersonLayout?: boolean | undefined;
1383
1395
  readonly credentialPlacements?: boolean | undefined;
1396
+ readonly connectedAccountApiKeys?: boolean | undefined;
1384
1397
  } | undefined;
1385
1398
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1386
1399
  export declare const getSetupStateOp: () => Effect.Effect<{
@@ -200,9 +200,23 @@ export const toWorkspaceImage = (image) => ({
200
200
  },
201
201
  }),
202
202
  });
203
+ const toPlacementLogin = (login) => login.kind === "subscription"
204
+ ? login
205
+ : {
206
+ kind: "api-key",
207
+ suffix: login.suffix,
208
+ ...(login.keyPath === undefined ? {} : { keyPath: login.keyPath }),
209
+ };
203
210
  /** Wire → public credential home. */
204
211
  const toCredentialHome = (home) => ({
205
- ...(home.placements === undefined ? {} : { placements: home.placements }),
212
+ ...(home.placements === undefined
213
+ ? {}
214
+ : {
215
+ placements: home.placements.map((receipt) => ({
216
+ ...receipt,
217
+ login: toPlacementLogin(receipt.login),
218
+ })),
219
+ }),
206
220
  home: home.home,
207
221
  onBehalfOf: home.onBehalfOfUserId,
208
222
  accounts: {
@@ -20,6 +20,7 @@ export declare const toFeatures: (index: {
20
20
  readonly connectedAccountLoginClass?: boolean | undefined;
21
21
  readonly kubernetesPersonLayout?: boolean | undefined;
22
22
  readonly credentialPlacements?: boolean | undefined;
23
+ readonly connectedAccountApiKeys?: boolean | undefined;
23
24
  } | undefined;
24
25
  }) => SealantFeatures;
25
26
  /**
@@ -24,6 +24,7 @@ export const toFeatures = (index) => {
24
24
  connectedAccountDefaults: features?.connectedAccountDefaults === true,
25
25
  connectedAccountLoginClass: features?.connectedAccountLoginClass === true,
26
26
  kubernetesPersonLayout: features?.kubernetesPersonLayout === true,
27
+ connectedAccountApiKeys: features?.connectedAccountApiKeys === true,
27
28
  };
28
29
  };
29
30
  /**
package/dist/types.d.ts CHANGED
@@ -1343,11 +1343,20 @@ export interface CredentialPlacementReceipt {
1343
1343
  readonly placementId: string;
1344
1344
  readonly accountId: string;
1345
1345
  readonly revision: number;
1346
- readonly login: {
1347
- readonly kind: "subscription";
1348
- };
1346
+ readonly login: CredentialPlacementLogin;
1349
1347
  readonly pinned: boolean;
1350
1348
  }
1349
+ /**
1350
+ * What a placed login spends. A key carries its last four characters; a Claude key also the
1351
+ * absolute path of its file in the home, for an `apiKeyHelper` such as `cat <keyPath>`.
1352
+ */
1353
+ export type CredentialPlacementLogin = {
1354
+ readonly kind: "subscription";
1355
+ } | {
1356
+ readonly kind: "api-key";
1357
+ readonly suffix: string;
1358
+ readonly keyPath?: string;
1359
+ };
1351
1360
  /** A receipt associated with the provider slot it occupies in this home. */
1352
1361
  export interface WorkspaceCredentialPlacementReceipt extends CredentialPlacementReceipt {
1353
1362
  readonly provider: "claude" | "codex" | "github" | "pi" | "opencode";
@@ -1365,7 +1374,12 @@ export interface WorkspaceCredentialHome {
1365
1374
  readonly home: string;
1366
1375
  /** The one person whose logins the home holds. */
1367
1376
  readonly onBehalfOf: string;
1377
+ /**
1378
+ * By provider, the account whose login holds the provider's one file. Claude keys are not here:
1379
+ * the receipts in `placements` say which logins a home holds.
1380
+ */
1368
1381
  readonly accounts: {
1382
+ /** The account of Claude's subscription file, never a Claude key's. */
1369
1383
  readonly claude?: WorkspaceCredentialHomeAccount;
1370
1384
  readonly codex?: WorkspaceCredentialHomeAccount;
1371
1385
  readonly github?: WorkspaceCredentialHomeAccount;
@@ -1453,6 +1467,11 @@ export interface SealantFeatures {
1453
1467
  readonly kubernetesPersonLayout: boolean;
1454
1468
  /** Credential homes answer placement receipts; a put takes `live`; `prune` exists. */
1455
1469
  readonly credentialPlacements: boolean;
1470
+ /**
1471
+ * Claude and Codex API keys are placed into homes: a Claude key's receipt carries `keyPath`, the
1472
+ * file an `apiKeyHelper` reads. A launch at `$HOME` still refuses a Claude key.
1473
+ */
1474
+ readonly connectedAccountApiKeys: boolean;
1456
1475
  }
1457
1476
  /** A published workspace image. */
1458
1477
  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.766",
3
+ "version": "0.40.0-next.768",
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.766"
29
+ "@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.768"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "effect": "^4.0.5"
33
33
  },
34
- "gitHead": "a8da605cc7a422a896dd2203183561cf62bde351",
34
+ "gitHead": "f1e27d77cf3498dcd6eab47bd2fa9619094b2b63",
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  }