lumiverse-spindle-types 0.6.17 → 0.6.18
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/package.json
CHANGED
package/src/permissions.ts
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
* (eval / new Function) for runtime-compiling frameworks.
|
|
29
29
|
* - "final_response" — replace the authoritative assistant response from
|
|
30
30
|
* an interceptor (privileged; never auto-granted)
|
|
31
|
+
* - "regex_scripts_unrestricted" — update/delete any regex script in the user's
|
|
32
|
+
* library (privileged; additive to "regex_scripts")
|
|
31
33
|
*/
|
|
32
34
|
export type SpindlePermission =
|
|
33
35
|
| "generation"
|
|
@@ -46,6 +48,7 @@ export type SpindlePermission =
|
|
|
46
48
|
| "presets"
|
|
47
49
|
| "world_books"
|
|
48
50
|
| "regex_scripts"
|
|
51
|
+
| "regex_scripts_unrestricted"
|
|
49
52
|
| "databanks"
|
|
50
53
|
| "memories"
|
|
51
54
|
| "media"
|
|
@@ -76,6 +79,7 @@ export const ALL_PERMISSIONS: readonly SpindlePermission[] = [
|
|
|
76
79
|
"presets",
|
|
77
80
|
"world_books",
|
|
78
81
|
"regex_scripts",
|
|
82
|
+
"regex_scripts_unrestricted",
|
|
79
83
|
"databanks",
|
|
80
84
|
"memories",
|
|
81
85
|
"media",
|
package/src/spindle-api.ts
CHANGED
|
@@ -1022,6 +1022,9 @@ export interface SpindleAPI {
|
|
|
1022
1022
|
* access to unbound scripts created by the calling extension. Legacy or
|
|
1023
1023
|
* unattributed scripts, preset-bound scripts, and scripts owned by another
|
|
1024
1024
|
* extension remain readable and executable but cannot be updated or deleted.
|
|
1025
|
+
* Extensions that also hold the privileged "regex_scripts_unrestricted"
|
|
1026
|
+
* permission may update or delete any script in the user's library. The
|
|
1027
|
+
* elevated permission is additive and does not replace "regex_scripts".
|
|
1025
1028
|
* Check `RegexScriptDTO.can_mutate` before presenting mutation controls.
|
|
1026
1029
|
* Set `RegexScriptCreateDTO.folder_version` alongside a non-empty `folder`
|
|
1027
1030
|
* to render a version badge for an extension-installed regex folder.
|
|
@@ -10,6 +10,11 @@ test("final-response permission is valid and publicly declared", () => {
|
|
|
10
10
|
expect(isValidPermission("final_response")).toBe(true);
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
+
test("unrestricted regex mutation permission is valid and publicly declared", () => {
|
|
14
|
+
expect(ALL_PERMISSIONS).toContain("regex_scripts_unrestricted");
|
|
15
|
+
expect(isValidPermission("regex_scripts_unrestricted")).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
|
|
13
18
|
test("host compatibility constants are canonical and immutable", () => {
|
|
14
19
|
expect(SPINDLE_COMPATIBILITY_ERROR_CODE).toBe("SPINDLE_COMPATIBILITY_ERROR");
|
|
15
20
|
expect(SPINDLE_HOST_CAPABILITIES).toEqual({
|