@capybara-hq/plugin-sdk 0.1.0-rc.48 → 0.1.0-rc.49

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.
@@ -457,7 +457,7 @@ export type DeviceResponse = Exclude<DeviceRes, {
457
457
  * `invalid` never proves the operation had no effect (a skewed device may have parsed
458
458
  * part of it): it must never join the not-run refusals (`isRefusal`, `failureKindOf`).
459
459
  */
460
- kind: "gone" | "fs_gone" | "policy" | "error" | "denied" | "unsupported" | "unknown" | "invalid";
460
+ kind: "gone" | "fs_gone" | "policy" | "error" | "denied" | "unsupported" | "unsettled" | "unknown" | "invalid";
461
461
  message: string;
462
462
  };
463
463
  };
@@ -980,6 +980,7 @@ export function parseDeviceFrame(raw, from, maxFrameBytes) {
980
980
  "error",
981
981
  "denied",
982
982
  "unsupported",
983
+ "unsettled",
983
984
  "unknown",
984
985
  "invalid",
985
986
  ].includes(String(e.kind)))
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "0.1.0-rc.48";
1
+ export declare const SDK_VERSION = "0.1.0-rc.49";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./bootstrap.js";
4
4
  export * from "./cards.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.48";
1
+ export const SDK_VERSION = "0.1.0-rc.49";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./bootstrap.js";
4
4
  export * from "./cards.js";
@@ -8,8 +8,22 @@ export declare class SandboxPermissionUnsupportedError extends Error {
8
8
  readonly sandboxPermissionUnsupported: true;
9
9
  constructor(message: string, opts?: ErrorOptions);
10
10
  }
11
- /** Recognizes the name and tag across SDK copies without requiring this class's identity. */
11
+ /**
12
+ * Recognizes the inherited tag across SDK copies without requiring this class's identity, so every
13
+ * subclass counts too (for example {@link SandboxWorkUnsettledError}: the same definite refusal).
14
+ */
12
15
  export declare function isSandboxPermissionUnsupportedError(e: unknown): e is SandboxPermissionUnsupportedError;
16
+ /**
17
+ * Earlier work on the device has not settled, so it refused to start a new operation. It extends
18
+ * {@link SandboxPermissionUnsupportedError} so every check that treats that error as a definite
19
+ * refusal (nothing ran) treats this one the same way.
20
+ */
21
+ export declare class SandboxWorkUnsettledError extends SandboxPermissionUnsupportedError {
22
+ readonly sandboxWorkUnsettled: true;
23
+ constructor(message: string, opts?: ErrorOptions);
24
+ }
25
+ /** Recognizes the name and tag across SDK copies without requiring this class's identity. */
26
+ export declare function isSandboxWorkUnsettledError(e: unknown): e is SandboxWorkUnsettledError;
13
27
  /** The requested operation is outside the permitted scope. */
14
28
  export declare class SandboxScopeDeniedError extends Error {
15
29
  readonly sandboxScopeDenied: true;
@@ -11,12 +11,32 @@ export class SandboxPermissionUnsupportedError extends Error {
11
11
  this.name = "SandboxPermissionUnsupportedError";
12
12
  }
13
13
  }
14
- /** Recognizes the name and tag across SDK copies without requiring this class's identity. */
14
+ /**
15
+ * Recognizes the inherited tag across SDK copies without requiring this class's identity, so every
16
+ * subclass counts too (for example {@link SandboxWorkUnsettledError}: the same definite refusal).
17
+ */
15
18
  export function isSandboxPermissionUnsupportedError(e) {
16
19
  return (e instanceof Error &&
17
- e.name === "SandboxPermissionUnsupportedError" &&
18
20
  e.sandboxPermissionUnsupported === true);
19
21
  }
22
+ /**
23
+ * Earlier work on the device has not settled, so it refused to start a new operation. It extends
24
+ * {@link SandboxPermissionUnsupportedError} so every check that treats that error as a definite
25
+ * refusal (nothing ran) treats this one the same way.
26
+ */
27
+ export class SandboxWorkUnsettledError extends SandboxPermissionUnsupportedError {
28
+ sandboxWorkUnsettled = true;
29
+ constructor(message, opts) {
30
+ super(message, opts);
31
+ this.name = "SandboxWorkUnsettledError";
32
+ }
33
+ }
34
+ /** Recognizes the name and tag across SDK copies without requiring this class's identity. */
35
+ export function isSandboxWorkUnsettledError(e) {
36
+ return (e instanceof Error &&
37
+ e.name === "SandboxWorkUnsettledError" &&
38
+ e.sandboxWorkUnsettled === true);
39
+ }
20
40
  /** The requested operation is outside the permitted scope. */
21
41
  export class SandboxScopeDeniedError extends Error {
22
42
  sandboxScopeDenied = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.48",
3
+ "version": "0.1.0-rc.49",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {