@sealant/sdk-next 0.40.0-next.784 → 0.40.0-next.786
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 +7 -2
- package/dist/effect/api-client.d.ts +190 -187
- package/dist/effect/api-client.js +9 -5
- package/dist/effect/operations.d.ts +64 -64
- package/dist/effect/operations.js +11 -11
- package/dist/effect/run-harness.js +23 -14
- package/dist/errors.d.ts +32 -2
- package/dist/errors.js +38 -0
- package/dist/facade/forward.d.ts +2 -1
- package/dist/facade/forward.js +24 -11
- package/dist/facade/session.js +15 -2
- package/dist/facade/workspace.js +10 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/config.d.ts +4 -1
- package/dist/internal/config.js +3 -0
- package/dist/internal/map-error.d.ts +0 -6
- package/dist/internal/map-error.js +15 -1
- package/dist/scope-instances.d.ts +1 -1
- package/dist/scope-instances.js +9 -1
- package/dist/types.d.ts +7 -0
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { archiveConnectedAccountOp, archiveSshKeyOp, cancelWorkspaceCreateOp, createAccessTokenOp, createConnectedAccountOp, createSshKeyOp, createWorkspaceOp, ensureUserOp, getRunOp, getSetupStateOp, getUserOp, bindUserPersonOp, getWorkspaceCreateOp, getWorkspaceOp, inferenceRespondOp, inspectWorkspaceImageOp, listConnectedAccountsOp, listSshKeysOp, listWorkspacesOp, markConnectedAccountInvalidOp, setConnectedAccountDefaultOp, } from "./effect/operations.js";
|
|
2
2
|
import { runHarness, startHarness } from "./effect/run-harness.js";
|
|
3
3
|
import { makeSdkRuntime } from "./effect/runtime.js";
|
|
4
|
-
import { SealantError } from "./errors.js";
|
|
4
|
+
import { SealantBudgetExceededError, SealantError } from "./errors.js";
|
|
5
5
|
import { makeRun } from "./facade/run.js";
|
|
6
6
|
import { makeWorkspace, registerHarnessExecutors, toRuntimeInfo, toWorkspaceImage, } from "./facade/workspace.js";
|
|
7
7
|
import { buildCreateWorkspaceRequest } from "./internal/blueprint.js";
|
|
@@ -116,7 +116,12 @@ export class Sealant {
|
|
|
116
116
|
}
|
|
117
117
|
})();
|
|
118
118
|
}
|
|
119
|
-
return workspace.ready()
|
|
119
|
+
return workspace.ready().catch((error) => {
|
|
120
|
+
if (error instanceof SealantBudgetExceededError) {
|
|
121
|
+
throw new SealantError(`Workspace ${created.workspaceId} was created, but a readiness request reached its budget. Resume this workspace instead of creating it again.`, { code: "workspace_readiness_refused", cause: error });
|
|
122
|
+
}
|
|
123
|
+
throw error;
|
|
124
|
+
});
|
|
120
125
|
},
|
|
121
126
|
get: async (id) => {
|
|
122
127
|
const details = await this.#runtime.run(getWorkspaceOp(id, this.#ctx.config.hostLocal.ownerUserId));
|