@stina/extension-api 1.3.1 → 1.6.0

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.
@@ -64,7 +64,7 @@ declare const ExtensionManifestSchema: z.ZodObject<{
64
64
  }>>;
65
65
  platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<["web", "electron", "tui"]>, "many">>;
66
66
  main: z.ZodString;
67
- permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
67
+ permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
68
68
  contributes: z.ZodOptional<z.ZodObject<{
69
69
  toolSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
70
  id: z.ZodString;
@@ -1228,7 +1228,7 @@ type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
1228
1228
  /**
1229
1229
  * Valid exact permission values
1230
1230
  */
1231
- declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
1231
+ declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
1232
1232
  /**
1233
1233
  * Permission patterns for dynamic permissions (network with host/port)
1234
1234
  */
@@ -1244,7 +1244,7 @@ declare const StoragePermissionSchema: z.ZodEnum<["storage.collections", "secret
1244
1244
  /**
1245
1245
  * User data permission schema
1246
1246
  */
1247
- declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read"]>;
1247
+ declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read"]>;
1248
1248
  /**
1249
1249
  * Capability permission schema
1250
1250
  */
@@ -1257,7 +1257,7 @@ declare const SystemPermissionSchema: z.ZodEnum<["files.read", "files.write", "c
1257
1257
  * Combined permission schema - validates against all permission types
1258
1258
  * Uses z.union with z.enum and z.string().regex() for better JSON Schema generation
1259
1259
  */
1260
- declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
1260
+ declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
1261
1261
  /**
1262
1262
  * Check if a permission string is valid
1263
1263
  */
@@ -64,7 +64,7 @@ declare const ExtensionManifestSchema: z.ZodObject<{
64
64
  }>>;
65
65
  platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<["web", "electron", "tui"]>, "many">>;
66
66
  main: z.ZodString;
67
- permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
67
+ permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
68
68
  contributes: z.ZodOptional<z.ZodObject<{
69
69
  toolSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
70
  id: z.ZodString;
@@ -1228,7 +1228,7 @@ type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
1228
1228
  /**
1229
1229
  * Valid exact permission values
1230
1230
  */
1231
- declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
1231
+ declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
1232
1232
  /**
1233
1233
  * Permission patterns for dynamic permissions (network with host/port)
1234
1234
  */
@@ -1244,7 +1244,7 @@ declare const StoragePermissionSchema: z.ZodEnum<["storage.collections", "secret
1244
1244
  /**
1245
1245
  * User data permission schema
1246
1246
  */
1247
- declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read"]>;
1247
+ declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read"]>;
1248
1248
  /**
1249
1249
  * Capability permission schema
1250
1250
  */
@@ -1257,7 +1257,7 @@ declare const SystemPermissionSchema: z.ZodEnum<["files.read", "files.write", "c
1257
1257
  * Combined permission schema - validates against all permission types
1258
1258
  * Uses z.union with z.enum and z.string().regex() for better JSON Schema generation
1259
1259
  */
1260
- declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
1260
+ declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
1261
1261
  /**
1262
1262
  * Check if a permission string is valid
1263
1263
  */
@@ -15,6 +15,7 @@ var VALID_PERMISSIONS = [
15
15
  "user.location.read",
16
16
  "chat.history.read",
17
17
  "chat.current.read",
18
+ "attachments.read",
18
19
  "chat.message.write",
19
20
  "provider.register",
20
21
  "tools.register",
@@ -51,7 +52,14 @@ var NetworkPermissionSchema = z.string().refine(
51
52
  { message: "Invalid network permission format" }
52
53
  ).describe('Network access permission (e.g., "network:*", "network:localhost:11434")');
53
54
  var StoragePermissionSchema = z.enum(["storage.collections", "secrets.manage"]).describe("Storage permission");
54
- var UserDataPermissionSchema = z.enum(["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read"]).describe("User data access permission");
55
+ var UserDataPermissionSchema = z.enum([
56
+ "user.profile.read",
57
+ "user.list",
58
+ "user.location.read",
59
+ "chat.history.read",
60
+ "chat.current.read",
61
+ "attachments.read"
62
+ ]).describe("User data access permission");
55
63
  var CapabilityPermissionSchema = z.enum([
56
64
  "provider.register",
57
65
  "tools.register",