@openchamber/sdk 2.0.4 → 2.1.1
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/API.md +33 -6
- package/DOCUMENTATION.md +14 -4
- package/README.md +13 -1
- package/dist/contract.d.ts +41 -3
- package/dist/contract.js +1 -0
- package/dist/host.d.ts +15 -5
- package/dist/host.js +144 -6
- package/dist/index.d.ts +7 -3
- package/dist/index.js +3 -1
- package/dist/manifest.d.ts +2 -0
- package/dist/parse.d.ts +8 -4
- package/dist/parse.js +2 -0
- package/dist/popover-schemas.d.ts +33 -0
- package/dist/popover-schemas.js +74 -0
- package/dist/popover.d.ts +37 -0
- package/dist/popover.js +57 -0
- package/dist/protocol.d.ts +125 -0
- package/dist/protocol.js +32 -1
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.js +2 -0
- package/dist/status-control-schemas.d.ts +21 -0
- package/dist/status-control-schemas.js +29 -0
- package/dist/status-controls.d.ts +31 -0
- package/dist/status-controls.js +48 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/popover-anchor.d.ts +16 -0
- package/dist/ui/popover-anchor.js +198 -0
- package/dist/ui/theme.js +15 -0
- package/dist/workspace-schemas.d.ts +16 -0
- package/dist/workspace-schemas.js +4 -4
- package/dist/workspace.d.ts +10 -4
- package/dist/workspace.js +2 -0
- package/package.json +1 -1
|
@@ -104,15 +104,31 @@ export declare const guestSessionWorktreeSchema: z.ZodUnion<readonly [z.ZodBoole
|
|
|
104
104
|
export declare const guestStorageRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
105
105
|
op: z.ZodLiteral<"get">;
|
|
106
106
|
key: z.ZodString;
|
|
107
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
instance: "instance";
|
|
109
|
+
device: "device";
|
|
110
|
+
}>>;
|
|
107
111
|
}, z.core.$strict>, z.ZodObject<{
|
|
108
112
|
op: z.ZodLiteral<"delete">;
|
|
109
113
|
key: z.ZodString;
|
|
114
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
115
|
+
instance: "instance";
|
|
116
|
+
device: "device";
|
|
117
|
+
}>>;
|
|
110
118
|
}, z.core.$strict>, z.ZodObject<{
|
|
111
119
|
op: z.ZodLiteral<"set">;
|
|
112
120
|
key: z.ZodString;
|
|
113
121
|
value: z.ZodJSONSchema;
|
|
122
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
instance: "instance";
|
|
124
|
+
device: "device";
|
|
125
|
+
}>>;
|
|
114
126
|
}, z.core.$strict>, z.ZodObject<{
|
|
115
127
|
op: z.ZodLiteral<"keys">;
|
|
128
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
instance: "instance";
|
|
130
|
+
device: "device";
|
|
131
|
+
}>>;
|
|
116
132
|
}, z.core.$strict>], "op">;
|
|
117
133
|
export declare const guestStorageResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
118
134
|
storage: z.ZodLiteral<true>;
|
|
@@ -31,10 +31,10 @@ export const guestSessionWorktreeSchema = z.union([
|
|
|
31
31
|
]);
|
|
32
32
|
const storageKey = z.string().min(1).max(GUEST_STORAGE_KEY_MAX);
|
|
33
33
|
export const guestStorageRequestSchema = z.discriminatedUnion('op', [
|
|
34
|
-
z.object({ op: z.literal('get'), key: storageKey }).strict(),
|
|
35
|
-
z.object({ op: z.literal('delete'), key: storageKey }).strict(),
|
|
36
|
-
z.object({ op: z.literal('set'), key: storageKey, value: z.json().refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= GUEST_STORAGE_VALUE_BYTES) }).strict(),
|
|
37
|
-
z.object({ op: z.literal('keys') }).strict(),
|
|
34
|
+
z.object({ op: z.literal('get'), key: storageKey, scope: z.enum(['instance', 'device']).optional() }).strict(),
|
|
35
|
+
z.object({ op: z.literal('delete'), key: storageKey, scope: z.enum(['instance', 'device']).optional() }).strict(),
|
|
36
|
+
z.object({ op: z.literal('set'), key: storageKey, value: z.json().refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= GUEST_STORAGE_VALUE_BYTES), scope: z.enum(['instance', 'device']).optional() }).strict(),
|
|
37
|
+
z.object({ op: z.literal('keys'), scope: z.enum(['instance', 'device']).optional() }).strict(),
|
|
38
38
|
]);
|
|
39
39
|
export const guestStorageResultSchema = z.union([
|
|
40
40
|
z.object({ storage: z.literal(true), op: z.literal('get'), found: z.literal(false) }),
|
package/dist/workspace.d.ts
CHANGED
|
@@ -74,17 +74,23 @@ export type GuestWorkspaceUpdate = {
|
|
|
74
74
|
export declare const GUEST_STORAGE_KEY_MAX = 128;
|
|
75
75
|
export declare const GUEST_STORAGE_VALUE_BYTES = 65536;
|
|
76
76
|
export declare const GUEST_STORAGE_TOTAL_BYTES = 2097152;
|
|
77
|
+
/** Maximum bytes retained across all device-scoped guest storage namespaces. */
|
|
78
|
+
export declare const GUEST_DEVICE_STORAGE_TOTAL_BYTES = 16777216;
|
|
77
79
|
export declare const GUEST_STORAGE_KEYS_MAX = 2000;
|
|
78
|
-
export type
|
|
80
|
+
export type GuestStorageScope = 'instance' | 'device';
|
|
81
|
+
export type GuestStorageOptions = {
|
|
82
|
+
scope?: GuestStorageScope;
|
|
83
|
+
};
|
|
84
|
+
export type GuestStorageRequest = ({
|
|
79
85
|
op: 'get' | 'delete';
|
|
80
86
|
key: string;
|
|
81
|
-
} | {
|
|
87
|
+
} & GuestStorageOptions) | ({
|
|
82
88
|
op: 'set';
|
|
83
89
|
key: string;
|
|
84
90
|
value: JsonValue;
|
|
85
|
-
} | {
|
|
91
|
+
} & GuestStorageOptions) | ({
|
|
86
92
|
op: 'keys';
|
|
87
|
-
};
|
|
93
|
+
} & GuestStorageOptions);
|
|
88
94
|
export type GuestStorageResult = {
|
|
89
95
|
storage: true;
|
|
90
96
|
} & ({
|
package/dist/workspace.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const GUEST_STORAGE_KEY_MAX = 128;
|
|
2
2
|
export const GUEST_STORAGE_VALUE_BYTES = 65_536;
|
|
3
3
|
export const GUEST_STORAGE_TOTAL_BYTES = 2_097_152;
|
|
4
|
+
/** Maximum bytes retained across all device-scoped guest storage namespaces. */
|
|
5
|
+
export const GUEST_DEVICE_STORAGE_TOTAL_BYTES = 16_777_216;
|
|
4
6
|
export const GUEST_STORAGE_KEYS_MAX = 2_000;
|