@secure-exec/registry-types 0.0.0-main.bccb3a2
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/.turbo/turbo-build.log +4 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +1 -0
- package/package.json +22 -0
- package/src/index.ts +53 -0
- package/tsconfig.json +13 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission tier for WASM command execution.
|
|
3
|
+
* Shared runtime permission tiers for registry command metadata.
|
|
4
|
+
*
|
|
5
|
+
* - full: spawn processes, network I/O, file read/write
|
|
6
|
+
* - read-write: file read/write, no network or process spawning
|
|
7
|
+
* - read-only: file read-only, no writes, no spawn, no network
|
|
8
|
+
* - isolated: restricted to cwd subtree reads only
|
|
9
|
+
*/
|
|
10
|
+
export type PermissionTier = "full" | "read-write" | "read-only" | "isolated";
|
|
11
|
+
/**
|
|
12
|
+
* Descriptor for a single command within a WASM command package.
|
|
13
|
+
*/
|
|
14
|
+
export interface WasmCommandEntry {
|
|
15
|
+
/** Command name as invoked (e.g., "grep", "egrep"). */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Default permission tier for this command. */
|
|
18
|
+
permissionTier: PermissionTier;
|
|
19
|
+
/** If set, this command is an alias for another command in the same package. */
|
|
20
|
+
aliasOf?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Descriptor for a WASM command package.
|
|
24
|
+
* Each @secure-exec/* software package exports a default value satisfying this type.
|
|
25
|
+
*/
|
|
26
|
+
export interface WasmCommandPackage {
|
|
27
|
+
/** Package name without scope (e.g., "coreutils", "grep"). */
|
|
28
|
+
name: string;
|
|
29
|
+
/** Apt/Debian equivalent package name. */
|
|
30
|
+
aptName: string;
|
|
31
|
+
/** Human-readable description. */
|
|
32
|
+
description: string;
|
|
33
|
+
/** Build source: "rust" or "c". */
|
|
34
|
+
source: "rust" | "c";
|
|
35
|
+
/** Commands provided by this package. */
|
|
36
|
+
commands: WasmCommandEntry[];
|
|
37
|
+
/** Absolute path to the directory containing WASM command binaries. */
|
|
38
|
+
readonly commandDir: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Descriptor for a meta-package that aggregates other WASM command packages.
|
|
42
|
+
*/
|
|
43
|
+
export interface WasmMetaPackage {
|
|
44
|
+
/** Package name without scope. */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Human-readable description. */
|
|
47
|
+
description: string;
|
|
48
|
+
/** Package names (without scope) included in this meta-package. */
|
|
49
|
+
includes: string[];
|
|
50
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@secure-exec/registry-types",
|
|
3
|
+
"version": "0.0.0-main.bccb3a2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"check-types": "tsc --noEmit"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^22.10.2",
|
|
20
|
+
"typescript": "^5.7.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission tier for WASM command execution.
|
|
3
|
+
* Shared runtime permission tiers for registry command metadata.
|
|
4
|
+
*
|
|
5
|
+
* - full: spawn processes, network I/O, file read/write
|
|
6
|
+
* - read-write: file read/write, no network or process spawning
|
|
7
|
+
* - read-only: file read-only, no writes, no spawn, no network
|
|
8
|
+
* - isolated: restricted to cwd subtree reads only
|
|
9
|
+
*/
|
|
10
|
+
export type PermissionTier = "full" | "read-write" | "read-only" | "isolated";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Descriptor for a single command within a WASM command package.
|
|
14
|
+
*/
|
|
15
|
+
export interface WasmCommandEntry {
|
|
16
|
+
/** Command name as invoked (e.g., "grep", "egrep"). */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Default permission tier for this command. */
|
|
19
|
+
permissionTier: PermissionTier;
|
|
20
|
+
/** If set, this command is an alias for another command in the same package. */
|
|
21
|
+
aliasOf?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Descriptor for a WASM command package.
|
|
26
|
+
* Each @secure-exec/* software package exports a default value satisfying this type.
|
|
27
|
+
*/
|
|
28
|
+
export interface WasmCommandPackage {
|
|
29
|
+
/** Package name without scope (e.g., "coreutils", "grep"). */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Apt/Debian equivalent package name. */
|
|
32
|
+
aptName: string;
|
|
33
|
+
/** Human-readable description. */
|
|
34
|
+
description: string;
|
|
35
|
+
/** Build source: "rust" or "c". */
|
|
36
|
+
source: "rust" | "c";
|
|
37
|
+
/** Commands provided by this package. */
|
|
38
|
+
commands: WasmCommandEntry[];
|
|
39
|
+
/** Absolute path to the directory containing WASM command binaries. */
|
|
40
|
+
readonly commandDir: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Descriptor for a meta-package that aggregates other WASM command packages.
|
|
45
|
+
*/
|
|
46
|
+
export interface WasmMetaPackage {
|
|
47
|
+
/** Package name without scope. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** Human-readable description. */
|
|
50
|
+
description: string;
|
|
51
|
+
/** Package names (without scope) included in this meta-package. */
|
|
52
|
+
includes: string[];
|
|
53
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"outDir": "./dist",
|
|
9
|
+
"rootDir": "./src"
|
|
10
|
+
},
|
|
11
|
+
"include": ["src/**/*"],
|
|
12
|
+
"exclude": ["node_modules", "dist"]
|
|
13
|
+
}
|