@sealant/sdk-next 0.40.0-next.870 → 0.40.0-next.872
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/client.js +12 -2
- package/dist/effect/api-client.d.ts +2476 -4
- package/dist/effect/operations.d.ts +1171 -0
- package/dist/effect/operations.js +3 -0
- package/dist/errors.d.ts +26 -1
- package/dist/errors.js +31 -0
- package/dist/facade/workspace.js +7 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/internal/map-error.js +12 -1
- package/dist/types.d.ts +38 -4
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { archiveConnectedAccountOp, archiveSshKeyOp, cancelWorkspaceCreateOp, createAccessTokenOp, createBoatAccountOp, createConnectedAccountOp, createSshKeyOp, createWorkspaceOp, ensureUserOp, getRunOp, getSetupStateOp, getUserOp, bindUserPersonOp, getWorkspaceCreateOp, getWorkspaceOp, inferenceRespondOp, inspectWorkspaceImageOp, listWorkspaceRuntimesOp, listBoatAccountsOp, listConnectedAccountsOp, listSshKeysOp, listWorkspacesOp, markConnectedAccountInvalidOp, removeBoatAccountOp, rotateBoatAccountKeyOp, setConnectedAccountDefaultOp, } from "./effect/operations.js";
|
|
1
|
+
import { archiveConnectedAccountOp, archiveSshKeyOp, cancelWorkspaceCreateOp, createAccessTokenOp, checkBoatAccountOp, checkBoatInstallKeyOp, getBoatInstallKeyOp, createBoatAccountOp, createConnectedAccountOp, createSshKeyOp, createWorkspaceOp, ensureUserOp, getRunOp, getSetupStateOp, getUserOp, bindUserPersonOp, getWorkspaceCreateOp, getWorkspaceOp, inferenceRespondOp, inspectWorkspaceImageOp, listWorkspaceRuntimesOp, listBoatAccountsOp, listConnectedAccountsOp, listSshKeysOp, listWorkspacesOp, markConnectedAccountInvalidOp, removeBoatAccountOp, rotateBoatAccountKeyOp, setConnectedAccountDefaultOp, } from "./effect/operations.js";
|
|
2
2
|
import { runHarness, startHarness } from "./effect/run-harness.js";
|
|
3
3
|
import { makeSdkRuntime } from "./effect/runtime.js";
|
|
4
4
|
import { SealantBudgetExceededError, SealantError } from "./errors.js";
|
|
@@ -27,6 +27,9 @@ const mapBoatAccount = (wire) => ({
|
|
|
27
27
|
state: wire.state,
|
|
28
28
|
createdAt: wire.createdAt,
|
|
29
29
|
keyRotatedAt: wire.keyRotatedAt,
|
|
30
|
+
// An older control plane sends neither: no organization named, no report.
|
|
31
|
+
organization: wire.organization ?? null,
|
|
32
|
+
report: wire.report ?? null,
|
|
30
33
|
});
|
|
31
34
|
const mapConnectedAccount = (wire) => ({
|
|
32
35
|
connectedAccountId: wire.connectedAccountId,
|
|
@@ -289,9 +292,16 @@ export class Sealant {
|
|
|
289
292
|
* the workspaces created with `boatAccountId`. With a service key; keys go in, none come out.
|
|
290
293
|
*/
|
|
291
294
|
boatAccounts = {
|
|
292
|
-
create: async (options) => mapBoatAccount(await this.#runtime.run(createBoatAccountOp({
|
|
295
|
+
create: async (options) => mapBoatAccount(await this.#runtime.run(createBoatAccountOp({
|
|
296
|
+
label: options.label,
|
|
297
|
+
apiKey: options.apiKey,
|
|
298
|
+
...(options.organization === undefined ? {} : { organization: options.organization }),
|
|
299
|
+
}))),
|
|
293
300
|
list: async () => (await this.#runtime.run(listBoatAccountsOp())).items.map(mapBoatAccount),
|
|
294
301
|
rotateKey: async (boatAccountId, apiKey) => mapBoatAccount(await this.#runtime.run(rotateBoatAccountKeyOp(boatAccountId, { apiKey }))),
|
|
302
|
+
check: async (boatAccountId) => mapBoatAccount(await this.#runtime.run(checkBoatAccountOp(boatAccountId))),
|
|
303
|
+
installKey: async () => await this.#runtime.run(getBoatInstallKeyOp()),
|
|
304
|
+
checkInstallKey: async () => await this.#runtime.run(checkBoatInstallKeyOp()),
|
|
295
305
|
remove: async (boatAccountId) => mapBoatAccount(await this.#runtime.run(removeBoatAccountOp(boatAccountId))),
|
|
296
306
|
};
|
|
297
307
|
/** This client's owner's Claude / Codex / GitHub accounts. Secrets go in; none come out. */
|