@downcity/shell 0.1.4
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/bin/Shell.d.ts +55 -0
- package/bin/Shell.d.ts.map +1 -0
- package/bin/Shell.js +171 -0
- package/bin/Shell.js.map +1 -0
- package/bin/approval/ShellApprovalRuntime.d.ts +62 -0
- package/bin/approval/ShellApprovalRuntime.d.ts.map +1 -0
- package/bin/approval/ShellApprovalRuntime.js +214 -0
- package/bin/approval/ShellApprovalRuntime.js.map +1 -0
- package/bin/index.d.ts +27 -0
- package/bin/index.d.ts.map +1 -0
- package/bin/index.js +26 -0
- package/bin/index.js.map +1 -0
- package/bin/sandbox/LinuxBubblewrapSandbox.d.ts +19 -0
- package/bin/sandbox/LinuxBubblewrapSandbox.d.ts.map +1 -0
- package/bin/sandbox/LinuxBubblewrapSandbox.js +186 -0
- package/bin/sandbox/LinuxBubblewrapSandbox.js.map +1 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.d.ts +16 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.d.ts.map +1 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.js +154 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.js.map +1 -0
- package/bin/sandbox/SandboxConfigResolver.d.ts +37 -0
- package/bin/sandbox/SandboxConfigResolver.d.ts.map +1 -0
- package/bin/sandbox/SandboxConfigResolver.js +130 -0
- package/bin/sandbox/SandboxConfigResolver.js.map +1 -0
- package/bin/sandbox/SandboxPreflight.d.ts +73 -0
- package/bin/sandbox/SandboxPreflight.d.ts.map +1 -0
- package/bin/sandbox/SandboxPreflight.js +122 -0
- package/bin/sandbox/SandboxPreflight.js.map +1 -0
- package/bin/sandbox/SandboxRunner.d.ts +61 -0
- package/bin/sandbox/SandboxRunner.d.ts.map +1 -0
- package/bin/sandbox/SandboxRunner.js +107 -0
- package/bin/sandbox/SandboxRunner.js.map +1 -0
- package/bin/sandbox/UnrestrictedSandbox.d.ts +16 -0
- package/bin/sandbox/UnrestrictedSandbox.d.ts.map +1 -0
- package/bin/sandbox/UnrestrictedSandbox.js +39 -0
- package/bin/sandbox/UnrestrictedSandbox.js.map +1 -0
- package/bin/sandbox/types/Sandbox.d.ts +130 -0
- package/bin/sandbox/types/Sandbox.d.ts.map +1 -0
- package/bin/sandbox/types/Sandbox.js +10 -0
- package/bin/sandbox/types/Sandbox.js.map +1 -0
- package/bin/sandbox/types/SandboxRuntime.d.ts +370 -0
- package/bin/sandbox/types/SandboxRuntime.d.ts.map +1 -0
- package/bin/sandbox/types/SandboxRuntime.js +10 -0
- package/bin/sandbox/types/SandboxRuntime.js.map +1 -0
- package/bin/session/Paths.d.ts +12 -0
- package/bin/session/Paths.d.ts.map +1 -0
- package/bin/session/Paths.js +21 -0
- package/bin/session/Paths.js.map +1 -0
- package/bin/session/ShellActionResponse.d.ts +52 -0
- package/bin/session/ShellActionResponse.d.ts.map +1 -0
- package/bin/session/ShellActionResponse.js +73 -0
- package/bin/session/ShellActionResponse.js.map +1 -0
- package/bin/session/ShellActionRuntime.d.ts +15 -0
- package/bin/session/ShellActionRuntime.d.ts.map +1 -0
- package/bin/session/ShellActionRuntime.js +15 -0
- package/bin/session/ShellActionRuntime.js.map +1 -0
- package/bin/session/ShellActionRuntimeSupport.d.ts +88 -0
- package/bin/session/ShellActionRuntimeSupport.d.ts.map +1 -0
- package/bin/session/ShellActionRuntimeSupport.js +305 -0
- package/bin/session/ShellActionRuntimeSupport.js.map +1 -0
- package/bin/session/ShellProcessEvents.d.ts +22 -0
- package/bin/session/ShellProcessEvents.d.ts.map +1 -0
- package/bin/session/ShellProcessEvents.js +41 -0
- package/bin/session/ShellProcessEvents.js.map +1 -0
- package/bin/session/ShellRunScope.d.ts +43 -0
- package/bin/session/ShellRunScope.d.ts.map +1 -0
- package/bin/session/ShellRunScope.js +29 -0
- package/bin/session/ShellRunScope.js.map +1 -0
- package/bin/session/ShellRuntimeEnvironment.d.ts +21 -0
- package/bin/session/ShellRuntimeEnvironment.d.ts.map +1 -0
- package/bin/session/ShellRuntimeEnvironment.js +69 -0
- package/bin/session/ShellRuntimeEnvironment.js.map +1 -0
- package/bin/session/ShellRuntimeTypes.d.ts +160 -0
- package/bin/session/ShellRuntimeTypes.d.ts.map +1 -0
- package/bin/session/ShellRuntimeTypes.js +10 -0
- package/bin/session/ShellRuntimeTypes.js.map +1 -0
- package/bin/session/actions/ShellActionShared.d.ts +76 -0
- package/bin/session/actions/ShellActionShared.d.ts.map +1 -0
- package/bin/session/actions/ShellActionShared.js +100 -0
- package/bin/session/actions/ShellActionShared.js.map +1 -0
- package/bin/session/actions/ShellApprovalActions.d.ts +34 -0
- package/bin/session/actions/ShellApprovalActions.d.ts.map +1 -0
- package/bin/session/actions/ShellApprovalActions.js +37 -0
- package/bin/session/actions/ShellApprovalActions.js.map +1 -0
- package/bin/session/actions/ShellExecActions.d.ts +15 -0
- package/bin/session/actions/ShellExecActions.d.ts.map +1 -0
- package/bin/session/actions/ShellExecActions.js +117 -0
- package/bin/session/actions/ShellExecActions.js.map +1 -0
- package/bin/session/actions/ShellLifecycleActions.d.ts +18 -0
- package/bin/session/actions/ShellLifecycleActions.d.ts.map +1 -0
- package/bin/session/actions/ShellLifecycleActions.js +53 -0
- package/bin/session/actions/ShellLifecycleActions.js.map +1 -0
- package/bin/session/actions/ShellQueryActions.d.ts +27 -0
- package/bin/session/actions/ShellQueryActions.d.ts.map +1 -0
- package/bin/session/actions/ShellQueryActions.js +151 -0
- package/bin/session/actions/ShellQueryActions.js.map +1 -0
- package/bin/session/actions/ShellStartActions.d.ts +15 -0
- package/bin/session/actions/ShellStartActions.d.ts.map +1 -0
- package/bin/session/actions/ShellStartActions.js +167 -0
- package/bin/session/actions/ShellStartActions.js.map +1 -0
- package/bin/session/actions/ShellWriteActions.d.ts +15 -0
- package/bin/session/actions/ShellWriteActions.d.ts.map +1 -0
- package/bin/session/actions/ShellWriteActions.js +85 -0
- package/bin/session/actions/ShellWriteActions.js.map +1 -0
- package/bin/tool/ShellToolFormatting.d.ts +12 -0
- package/bin/tool/ShellToolFormatting.d.ts.map +1 -0
- package/bin/tool/ShellToolFormatting.js +31 -0
- package/bin/tool/ShellToolFormatting.js.map +1 -0
- package/bin/tool/ShellToolSchemas.d.ts +61 -0
- package/bin/tool/ShellToolSchemas.d.ts.map +1 -0
- package/bin/tool/ShellToolSchemas.js +130 -0
- package/bin/tool/ShellToolSchemas.js.map +1 -0
- package/bin/tool/ShellTools.d.ts +32 -0
- package/bin/tool/ShellTools.d.ts.map +1 -0
- package/bin/tool/ShellTools.js +296 -0
- package/bin/tool/ShellTools.js.map +1 -0
- package/bin/types/Shell.d.ts +115 -0
- package/bin/types/Shell.d.ts.map +1 -0
- package/bin/types/Shell.js +9 -0
- package/bin/types/Shell.js.map +1 -0
- package/bin/types/ShellAction.d.ts +258 -0
- package/bin/types/ShellAction.d.ts.map +1 -0
- package/bin/types/ShellAction.js +9 -0
- package/bin/types/ShellAction.js.map +1 -0
- package/bin/types/ShellHostContext.d.ts +78 -0
- package/bin/types/ShellHostContext.d.ts.map +1 -0
- package/bin/types/ShellHostContext.js +9 -0
- package/bin/types/ShellHostContext.js.map +1 -0
- package/bin/types/ShellRuntime.d.ts +128 -0
- package/bin/types/ShellRuntime.d.ts.map +1 -0
- package/bin/types/ShellRuntime.js +9 -0
- package/bin/types/ShellRuntime.js.map +1 -0
- package/bin/types/ShellRuntimeOptions.d.ts +103 -0
- package/bin/types/ShellRuntimeOptions.d.ts.map +1 -0
- package/bin/types/ShellRuntimeOptions.js +10 -0
- package/bin/types/ShellRuntimeOptions.js.map +1 -0
- package/bin/utils/Id.d.ts +11 -0
- package/bin/utils/Id.d.ts.map +1 -0
- package/bin/utils/Id.js +14 -0
- package/bin/utils/Id.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Id.d.ts","sourceRoot":"","sources":["../../src/utils/Id.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/bin/utils/Id.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell 内部 ID 生成工具。
|
|
3
|
+
*
|
|
4
|
+
* 关键点(中文)
|
|
5
|
+
* - shell 包不依赖 agent internal utils,因此在本包内保留一个轻量实现。
|
|
6
|
+
*/
|
|
7
|
+
import { randomBytes } from "node:crypto";
|
|
8
|
+
/**
|
|
9
|
+
* 生成短随机 ID。
|
|
10
|
+
*/
|
|
11
|
+
export function generateId() {
|
|
12
|
+
return randomBytes(10).toString("base64url");
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Id.js","sourceRoot":"","sources":["../../src/utils/Id.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@downcity/shell",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Downcity Shell — local command execution, sandboxing, shell sessions, and approvals",
|
|
6
|
+
"main": "./bin/index.js",
|
|
7
|
+
"types": "./bin/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"bin"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/wangenius/downcity.git",
|
|
17
|
+
"directory": "packages/shell"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://downcity.ai",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/wangenius/downcity/issues"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"downcity",
|
|
25
|
+
"shell",
|
|
26
|
+
"sandbox",
|
|
27
|
+
"agent"
|
|
28
|
+
],
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./bin/index.d.ts",
|
|
32
|
+
"import": "./bin/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./approval/*.js": {
|
|
35
|
+
"types": "./bin/approval/*.d.ts",
|
|
36
|
+
"import": "./bin/approval/*.js"
|
|
37
|
+
},
|
|
38
|
+
"./sandbox/*.js": {
|
|
39
|
+
"types": "./bin/sandbox/*.d.ts",
|
|
40
|
+
"import": "./bin/sandbox/*.js"
|
|
41
|
+
},
|
|
42
|
+
"./sandbox/types/*.js": {
|
|
43
|
+
"types": "./bin/sandbox/types/*.d.ts",
|
|
44
|
+
"import": "./bin/sandbox/types/*.js"
|
|
45
|
+
},
|
|
46
|
+
"./session/*.js": {
|
|
47
|
+
"types": "./bin/session/*.d.ts",
|
|
48
|
+
"import": "./bin/session/*.js"
|
|
49
|
+
},
|
|
50
|
+
"./tool/*.js": {
|
|
51
|
+
"types": "./bin/tool/*.d.ts",
|
|
52
|
+
"import": "./bin/tool/*.js"
|
|
53
|
+
},
|
|
54
|
+
"./types/*.js": {
|
|
55
|
+
"types": "./bin/types/*.d.ts",
|
|
56
|
+
"import": "./bin/types/*.js"
|
|
57
|
+
},
|
|
58
|
+
"./*": {
|
|
59
|
+
"types": "./bin/*",
|
|
60
|
+
"import": "./bin/*"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"ai": "^6.0.193",
|
|
66
|
+
"fs-extra": "^11.3.5",
|
|
67
|
+
"zod": "^4.4.3"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/fs-extra": "^11.0.4",
|
|
71
|
+
"@types/node": "^25.9.1",
|
|
72
|
+
"tsc-alias": "^1.8.17",
|
|
73
|
+
"typescript": "^6.0.3"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "rm -rf bin tsconfig.tsbuildinfo && tsc && tsc-alias -f",
|
|
77
|
+
"dev": "tsc --watch",
|
|
78
|
+
"typecheck": "tsc --noEmit",
|
|
79
|
+
"version:patch": "node ../../scripts/bump-package-version.mjs ./package.json"
|
|
80
|
+
}
|
|
81
|
+
}
|