@elizaos/plugin-shell 2.0.0-alpha.4 → 2.0.0-alpha.6
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/dist/actions/clearHistory.d.ts.map +1 -1
- package/dist/actions/executeCommand.d.ts +1 -1
- package/dist/actions/executeCommand.d.ts.map +1 -1
- package/dist/actions/processAction.d.ts.map +1 -1
- package/dist/approvals/allowlist.d.ts.map +1 -1
- package/dist/approvals/analysis.d.ts.map +1 -1
- package/dist/approvals/index.d.ts.map +1 -1
- package/dist/approvals/service.d.ts.map +1 -1
- package/dist/approvals/types.d.ts.map +1 -1
- package/dist/generated/specs/spec-helpers.d.ts.map +1 -1
- package/dist/generated/specs/specs.d.ts.map +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +183 -86
- package/dist/index.js.map +20 -21
- package/dist/providers/shellHistoryProvider.d.ts.map +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/processRegistry.d.ts.map +1 -1
- package/dist/services/shellService.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/pathUtils.d.ts.map +1 -1
- package/dist/utils/processQueue.d.ts.map +1 -1
- package/dist/utils/ptyKeys.d.ts.map +1 -1
- package/dist/utils/shellUtils.d.ts.map +1 -1
- package/package.json +125 -125
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearHistory.d.ts","sourceRoot":"","sources":["../../actions/clearHistory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"clearHistory.d.ts","sourceRoot":"","sources":["../../actions/clearHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,MAAM,EASX,MAAM,eAAe,CAAC;AAMvB,eAAO,MAAM,YAAY,EAAE,MAwE1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Action } from "@elizaos/core";
|
|
2
|
-
|
|
2
|
+
declare const commandExtractionTemplate = "# Extracting shell command from request\n{{recentMessages}}\n\n# Instructions: {{senderName}} wants to execute a shell command. Extract the COMPLETE shell command they want to run.\n\nIMPORTANT:\n1. Always return the FULL executable shell command, not just the content or partial command.\n2. If the user mentions installing something, create the appropriate brew/npm/apt command.\n3. If the user directly provides a command (like \"brew install X\"), use it exactly as provided.\n4. ALWAYS extract a command if the user is asking for ANY kind of system operation.\n\nExecution Options:\n- background: Set to true if the user asks to run it in the background or completely asynchronously.\n- pty: Set to true if the command is interactive (like \"top\", \"vim\", \"python\" shell) or requires a TTY. Defaults to TRUE for almost all commands to enable interaction.\n- wait: Timeout in seconds (default 30).\n- yield: Time in milliseconds to wait before yielding to background (default 1000). Set to 1000 (1 second) to allow quick interaction.\n\nYour response must be formatted as a JSON block:\n```json\n{\n \"command\": \"<complete shell command to execute>\",\n \"background\": false,\n \"pty\": true,\n \"wait\": 30,\n \"yield\": 1000\n}\n```";
|
|
3
3
|
export { commandExtractionTemplate };
|
|
4
4
|
export declare const executeCommand: Action;
|
|
5
5
|
export default executeCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeCommand.d.ts","sourceRoot":"","sources":["../../actions/executeCommand.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"executeCommand.d.ts","sourceRoot":"","sources":["../../actions/executeCommand.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,MAAM,EAUX,MAAM,eAAe,CAAC;AAKvB,QAAA,MAAM,yBAAyB,uuCA0BxB,CAAC;AAER,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAiDrC,eAAO,MAAM,cAAc,EAAE,MAqK5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processAction.d.ts","sourceRoot":"","sources":["../../actions/processAction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"processAction.d.ts","sourceRoot":"","sources":["../../actions/processAction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,MAAM,EAKN,MAAM,eAAe,CAAC;AA0DvB,eAAO,MAAM,aAAa,EAAE,MA6J3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowlist.d.ts","sourceRoot":"","sources":["../../approvals/allowlist.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"allowlist.d.ts","sourceRoot":"","sources":["../../approvals/allowlist.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAElB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,YAAY,EACZ,MAAM,SAAS,CAAC;AAgCjB;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAmED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,CAqC7E;AASD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,qBAAqB,CA8C7D;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,iBAAiB,CAyCjD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAsB3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,iBAAiB,CAiCnD;AAyBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,CAAC,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,GACxC,qBAAqB,CAuBvB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE;IAChD,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,qBAAqB,CA+DxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,kBAAkB,EAAE,EAC7B,UAAU,EAAE,iBAAiB,GAAG,IAAI,GAClC,kBAAkB,GAAG,IAAI,CAqB3B;AAqFD;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CA+BT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,GACb,OAAO,CA8CT;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,GAAG,YAAY,CAO1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAGtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../approvals/analysis.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../approvals/analysis.ts"],"names":[],"mappings":"AAAA;;;;;GAK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;AAwED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAC7C,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,uBAAuB,CAuC1B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,GAAG,qBAAqB,CAwFxB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC5C,GAAG,EAAE,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC5B,GAAG,OAAO,CAOV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../approvals/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../approvals/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACN,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzE,YAAY,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EACR,YAAY,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../approvals/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAQ,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAgC,OAAO,EAAE,MAAM,eAAe,CAAC;AAyBtE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../approvals/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAQ,IAAI,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AO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,MAAM,EAAE,IAAI,CAAC;IACb,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,wBAAwB;IACxB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,UAAU,CAAC,EAAE,IAAI,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,4EAUpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,sBAAsB;uBACd,YAAY;kBACd,OAAO;0BACF,YAAY;;;CAG1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-helpers.d.ts","sourceRoot":"","sources":["../../../generated/specs/spec-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"spec-helpers.d.ts","sourceRoot":"","sources":["../../../generated/specs/spec-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACN,KAAK,SAAS,EAOd,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,MAAM,SAAS,CAAC;AAsBjB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAM7D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEvE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAM/D;AAGD,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAqClB,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAqCjB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;;;;;CAUpB,CAAC;AACX,eAAO,MAAM,gBAAgB;;;;;;;CAUnB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAA4B,CAAC;AAC5E,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAA2B,CAAC;AAC1E,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EACvB,CAAC;AAC7B,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EACvB,CAAC;AAC5B,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EACvB,CAAC;AAC/B,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../index.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAK3D,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../index.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAK3D,eAAO,MAAM,WAAW,EAAE,MAQzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAM5C,eAAO,MAAM,WAAW,EAAE,MAOzB,CAAC;AAEF,eAAe,WAAW,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,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;AAGrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACN,UAAU,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,4BAA4B,EAC5B,WAAW,EACX,IAAI,EACJ,WAAW,GACX,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,YAAY,EACX,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,YAAY,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,EACjB,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAW,EACX,GAAG,EACH,UAAU,EACV,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,GACd,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// node_modules/@lydell/node-pty/eventEmitter2.js
|
|
22
22
|
var require_eventEmitter2 = __commonJS((exports) => {
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
var EventEmitter2 = function() {
|
|
@@ -63,7 +63,7 @@ var require_eventEmitter2 = __commonJS((exports) => {
|
|
|
63
63
|
exports.EventEmitter2 = EventEmitter2;
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
//
|
|
66
|
+
// node_modules/@lydell/node-pty/terminal.js
|
|
67
67
|
var require_terminal = __commonJS((exports) => {
|
|
68
68
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
69
|
var events_1 = __require("events");
|
|
@@ -251,7 +251,7 @@ var require_terminal = __commonJS((exports) => {
|
|
|
251
251
|
exports.Terminal = Terminal;
|
|
252
252
|
});
|
|
253
253
|
|
|
254
|
-
//
|
|
254
|
+
// node_modules/@lydell/node-pty/shared/conout.js
|
|
255
255
|
var require_conout = __commonJS((exports) => {
|
|
256
256
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
257
257
|
function getWorkerPipeName(conoutPipeName) {
|
|
@@ -260,9 +260,9 @@ var require_conout = __commonJS((exports) => {
|
|
|
260
260
|
exports.getWorkerPipeName = getWorkerPipeName;
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
//
|
|
263
|
+
// node_modules/@lydell/node-pty/windowsConoutConnection.js
|
|
264
264
|
var require_windowsConoutConnection = __commonJS((exports) => {
|
|
265
|
-
var __dirname = "/Users/shawwalters/eliza-
|
|
265
|
+
var __dirname = "/Users/shawwalters/eliza-workspace/plugins/plugin-shell/typescript/node_modules/@lydell/node-pty";
|
|
266
266
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
267
267
|
function adopt(value) {
|
|
268
268
|
return value instanceof P ? value : new P(function(resolve) {
|
|
@@ -435,7 +435,7 @@ var require_windowsConoutConnection = __commonJS((exports) => {
|
|
|
435
435
|
exports.ConoutConnection = ConoutConnection;
|
|
436
436
|
});
|
|
437
437
|
|
|
438
|
-
//
|
|
438
|
+
// node_modules/@lydell/node-pty/package.json
|
|
439
439
|
var require_package = __commonJS((exports, module) => {
|
|
440
440
|
module.exports = {
|
|
441
441
|
name: "@lydell/node-pty",
|
|
@@ -470,7 +470,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
470
470
|
};
|
|
471
471
|
});
|
|
472
472
|
|
|
473
|
-
//
|
|
473
|
+
// node_modules/@lydell/node-pty/requireBinary.js
|
|
474
474
|
var require_requireBinary = __commonJS((exports) => {
|
|
475
475
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
476
476
|
var PACKAGE_NAME = "@lydell/node-pty-" + process.platform + "-" + process.arch;
|
|
@@ -511,9 +511,9 @@ Your platform (` + process.platform + "-" + process.arch + ") might not be suppo
|
|
|
511
511
|
}
|
|
512
512
|
});
|
|
513
513
|
|
|
514
|
-
//
|
|
514
|
+
// node_modules/@lydell/node-pty/windowsPtyAgent.js
|
|
515
515
|
var require_windowsPtyAgent = __commonJS((exports) => {
|
|
516
|
-
var __dirname = "/Users/shawwalters/eliza-
|
|
516
|
+
var __dirname = "/Users/shawwalters/eliza-workspace/plugins/plugin-shell/typescript/node_modules/@lydell/node-pty";
|
|
517
517
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
518
518
|
var fs5 = __require("fs");
|
|
519
519
|
var path6 = __require("path");
|
|
@@ -729,7 +729,7 @@ var require_windowsPtyAgent = __commonJS((exports) => {
|
|
|
729
729
|
}
|
|
730
730
|
});
|
|
731
731
|
|
|
732
|
-
//
|
|
732
|
+
// node_modules/@lydell/node-pty/utils.js
|
|
733
733
|
var require_utils = __commonJS((exports) => {
|
|
734
734
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
735
735
|
function assign(target) {
|
|
@@ -747,7 +747,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
747
747
|
exports.assign = assign;
|
|
748
748
|
});
|
|
749
749
|
|
|
750
|
-
//
|
|
750
|
+
// node_modules/@lydell/node-pty/windowsTerminal.js
|
|
751
751
|
var require_windowsTerminal = __commonJS((exports) => {
|
|
752
752
|
var __extends = exports && exports.__extends || function() {
|
|
753
753
|
var extendStatics = function(d, b) {
|
|
@@ -925,7 +925,7 @@ var require_windowsTerminal = __commonJS((exports) => {
|
|
|
925
925
|
exports.WindowsTerminal = WindowsTerminal;
|
|
926
926
|
});
|
|
927
927
|
|
|
928
|
-
//
|
|
928
|
+
// node_modules/@lydell/node-pty/unixTerminal.js
|
|
929
929
|
var require_unixTerminal = __commonJS((exports) => {
|
|
930
930
|
var __extends = exports && exports.__extends || function() {
|
|
931
931
|
var extendStatics = function(d, b) {
|
|
@@ -1171,7 +1171,7 @@ var require_unixTerminal = __commonJS((exports) => {
|
|
|
1171
1171
|
exports.UnixTerminal = UnixTerminal;
|
|
1172
1172
|
});
|
|
1173
1173
|
|
|
1174
|
-
//
|
|
1174
|
+
// node_modules/@lydell/node-pty/index.js
|
|
1175
1175
|
var require_node_pty = __commonJS((exports) => {
|
|
1176
1176
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1177
1177
|
var terminalCtor;
|
|
@@ -1210,7 +1210,12 @@ var coreActionsSpec = {
|
|
|
1210
1210
|
{
|
|
1211
1211
|
name: "CLEAR_SHELL_HISTORY",
|
|
1212
1212
|
description: "Clears the recorded history of shell commands for the current conversation",
|
|
1213
|
-
similes: [
|
|
1213
|
+
similes: [
|
|
1214
|
+
"RESET_SHELL",
|
|
1215
|
+
"CLEAR_TERMINAL",
|
|
1216
|
+
"CLEAR_HISTORY",
|
|
1217
|
+
"RESET_HISTORY"
|
|
1218
|
+
],
|
|
1214
1219
|
parameters: []
|
|
1215
1220
|
},
|
|
1216
1221
|
{
|
|
@@ -1241,7 +1246,12 @@ var allActionsSpec = {
|
|
|
1241
1246
|
{
|
|
1242
1247
|
name: "CLEAR_SHELL_HISTORY",
|
|
1243
1248
|
description: "Clears the recorded history of shell commands for the current conversation",
|
|
1244
|
-
similes: [
|
|
1249
|
+
similes: [
|
|
1250
|
+
"RESET_SHELL",
|
|
1251
|
+
"CLEAR_TERMINAL",
|
|
1252
|
+
"CLEAR_HISTORY",
|
|
1253
|
+
"RESET_HISTORY"
|
|
1254
|
+
],
|
|
1245
1255
|
parameters: []
|
|
1246
1256
|
},
|
|
1247
1257
|
{
|
|
@@ -1389,58 +1399,33 @@ import {
|
|
|
1389
1399
|
ModelType,
|
|
1390
1400
|
parseJSONObjectFromText
|
|
1391
1401
|
} from "@elizaos/core";
|
|
1392
|
-
|
|
1393
|
-
// generated/prompts/typescript/prompts.ts
|
|
1394
1402
|
var commandExtractionTemplate = `# Extracting shell command from request
|
|
1395
1403
|
{{recentMessages}}
|
|
1396
1404
|
|
|
1397
1405
|
# Instructions: {{senderName}} wants to execute a shell command. Extract the COMPLETE shell command they want to run.
|
|
1398
1406
|
|
|
1399
|
-
IMPORTANT:
|
|
1407
|
+
IMPORTANT:
|
|
1400
1408
|
1. Always return the FULL executable shell command, not just the content or partial command.
|
|
1401
1409
|
2. If the user mentions installing something, create the appropriate brew/npm/apt command.
|
|
1402
1410
|
3. If the user directly provides a command (like "brew install X"), use it exactly as provided.
|
|
1403
1411
|
4. ALWAYS extract a command if the user is asking for ANY kind of system operation.
|
|
1404
1412
|
|
|
1405
|
-
|
|
1406
|
-
-
|
|
1407
|
-
-
|
|
1408
|
-
-
|
|
1409
|
-
-
|
|
1410
|
-
- "check git status" -> command: "git status"
|
|
1411
|
-
- "navigate to src folder" -> command: "cd src"
|
|
1412
|
-
- "create a file called test.txt" -> command: "touch test.txt"
|
|
1413
|
-
- "write hello world to a file" -> command: "echo 'hello world' > file.txt"
|
|
1414
|
-
- "create hello.js with javascript code" -> command: "echo 'console.log(\\"Hello, World!\\");' > hello.js"
|
|
1415
|
-
- "create hello_world.py and write a python hello world script inside" -> command: "echo 'print(\\"Hello, World!\\")' > hello_world.py"
|
|
1416
|
-
- "make a new directory" -> command: "mkdir newdir"
|
|
1417
|
-
- "list files inside your filesystem" -> command: "ls -la"
|
|
1418
|
-
- "install orbstack" or "brew install orbstack" -> command: "brew install orbstack"
|
|
1419
|
-
- "install mullvad vpn" -> command: "brew install --cask mullvad-vpn"
|
|
1420
|
-
- "get system info" -> command: "system_profiler SPHardwareDataType"
|
|
1421
|
-
- "check memory usage" -> command: "vm_stat"
|
|
1422
|
-
- "install package" -> command: "brew install <package>"
|
|
1423
|
-
|
|
1424
|
-
Special cases:
|
|
1425
|
-
- "Run it in your shell" or "execute it" -> Extract the command from previous context
|
|
1426
|
-
- "Install these" -> Look for package names in previous messages
|
|
1427
|
-
- Direct commands should be used exactly as provided
|
|
1428
|
-
|
|
1429
|
-
Key rules:
|
|
1430
|
-
1. For file creation with content, use: echo 'content' > filename
|
|
1431
|
-
2. For listing files, use: ls -la (not just ls)
|
|
1432
|
-
3. Always include the echo command when writing to files
|
|
1433
|
-
4. Include all flags and arguments
|
|
1434
|
-
5. When user says "run it", "execute it", or similar, they want you to run the command
|
|
1413
|
+
Execution Options:
|
|
1414
|
+
- background: Set to true if the user asks to run it in the background or completely asynchronously.
|
|
1415
|
+
- pty: Set to true if the command is interactive (like "top", "vim", "python" shell) or requires a TTY. Defaults to TRUE for almost all commands to enable interaction.
|
|
1416
|
+
- wait: Timeout in seconds (default 30).
|
|
1417
|
+
- yield: Time in milliseconds to wait before yielding to background (default 1000). Set to 1000 (1 second) to allow quick interaction.
|
|
1435
1418
|
|
|
1436
1419
|
Your response must be formatted as a JSON block:
|
|
1437
1420
|
\`\`\`json
|
|
1438
1421
|
{
|
|
1439
|
-
"command": "<complete shell command to execute>"
|
|
1422
|
+
"command": "<complete shell command to execute>",
|
|
1423
|
+
"background": false,
|
|
1424
|
+
"pty": true,
|
|
1425
|
+
"wait": 30,
|
|
1426
|
+
"yield": 1000
|
|
1440
1427
|
}
|
|
1441
1428
|
\`\`\``;
|
|
1442
|
-
|
|
1443
|
-
// actions/executeCommand.ts
|
|
1444
1429
|
var extractCommand = async (runtime, _message, state) => {
|
|
1445
1430
|
const prompt = composePromptFromState({
|
|
1446
1431
|
state,
|
|
@@ -1452,7 +1437,13 @@ var extractCommand = async (runtime, _message, state) => {
|
|
|
1452
1437
|
});
|
|
1453
1438
|
const parsedResponse = parseJSONObjectFromText(response);
|
|
1454
1439
|
if (parsedResponse?.command) {
|
|
1455
|
-
return {
|
|
1440
|
+
return {
|
|
1441
|
+
command: parsedResponse.command,
|
|
1442
|
+
background: parsedResponse.background === true || String(parsedResponse.background) === "true",
|
|
1443
|
+
pty: parsedResponse.pty !== false && String(parsedResponse.pty) !== "false",
|
|
1444
|
+
wait: parsedResponse.wait ? Number(parsedResponse.wait) : undefined,
|
|
1445
|
+
yield: parsedResponse.yield ? Number(parsedResponse.yield) : 1000
|
|
1446
|
+
};
|
|
1456
1447
|
}
|
|
1457
1448
|
}
|
|
1458
1449
|
return null;
|
|
@@ -1525,44 +1516,71 @@ var executeCommand = {
|
|
|
1525
1516
|
logger2.info(`Extracted command: "${commandInfo.command}"`);
|
|
1526
1517
|
try {
|
|
1527
1518
|
const conversationId = message.roomId || message.agentId;
|
|
1528
|
-
const result = await shellService.
|
|
1519
|
+
const result = await shellService.exec(commandInfo.command, {
|
|
1520
|
+
conversationId,
|
|
1521
|
+
background: commandInfo.background,
|
|
1522
|
+
pty: commandInfo.pty,
|
|
1523
|
+
timeout: commandInfo.wait,
|
|
1524
|
+
yieldMs: commandInfo.yield
|
|
1525
|
+
});
|
|
1529
1526
|
let responseText = "";
|
|
1530
|
-
if (result.
|
|
1531
|
-
responseText = `
|
|
1527
|
+
if (result.status === "running") {
|
|
1528
|
+
responseText = `Started background process (Session ID: ${result.sessionId})
|
|
1529
|
+
`;
|
|
1530
|
+
responseText += `PID: ${result.pid}
|
|
1531
|
+
`;
|
|
1532
|
+
if (result.tail) {
|
|
1533
|
+
responseText += `
|
|
1534
|
+
Output limit reached/yielded. Current tail:
|
|
1535
|
+
\`\`\`
|
|
1536
|
+
${result.tail}
|
|
1537
|
+
\`\`\``;
|
|
1538
|
+
}
|
|
1539
|
+
responseText += `
|
|
1540
|
+
Use 'check process <sessionId>' to monitor status.`;
|
|
1541
|
+
callback?.({
|
|
1542
|
+
text: responseText,
|
|
1543
|
+
source: message.content.source,
|
|
1544
|
+
action: "MANAGE_PROCESS"
|
|
1545
|
+
});
|
|
1546
|
+
return { success: true, text: responseText, data: result };
|
|
1547
|
+
}
|
|
1548
|
+
if (result.status === "completed") {
|
|
1549
|
+
responseText = `Command executed successfully (Duration: ${result.durationMs}ms)
|
|
1532
1550
|
|
|
1533
1551
|
`;
|
|
1534
|
-
if (result.
|
|
1552
|
+
if (result.aggregated) {
|
|
1535
1553
|
responseText += `Output:
|
|
1536
1554
|
\`\`\`
|
|
1537
|
-
${result.
|
|
1555
|
+
${result.aggregated}
|
|
1538
1556
|
\`\`\``;
|
|
1539
1557
|
} else {
|
|
1540
1558
|
responseText += "Command completed with no output.";
|
|
1541
1559
|
}
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1560
|
+
callback?.({
|
|
1561
|
+
text: responseText,
|
|
1562
|
+
source: message.content.source
|
|
1563
|
+
});
|
|
1564
|
+
return { success: true, text: responseText, data: result };
|
|
1565
|
+
}
|
|
1566
|
+
responseText = `Command failed (Exit Code: ${result.exitCode})
|
|
1545
1567
|
`;
|
|
1546
|
-
|
|
1547
|
-
|
|
1568
|
+
if (result.reason) {
|
|
1569
|
+
responseText += `Reason: ${result.reason}
|
|
1548
1570
|
`;
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1571
|
+
}
|
|
1572
|
+
if (result.aggregated) {
|
|
1573
|
+
responseText += `
|
|
1574
|
+
Output:
|
|
1553
1575
|
\`\`\`
|
|
1554
|
-
${result.
|
|
1576
|
+
${result.aggregated}
|
|
1555
1577
|
\`\`\``;
|
|
1556
|
-
}
|
|
1557
1578
|
}
|
|
1558
|
-
|
|
1579
|
+
callback?.({
|
|
1559
1580
|
text: responseText,
|
|
1560
1581
|
source: message.content.source
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
await callback(response);
|
|
1564
|
-
}
|
|
1565
|
-
return { success: result.success, text: responseText };
|
|
1582
|
+
});
|
|
1583
|
+
return { success: false, error: responseText, data: result };
|
|
1566
1584
|
} catch (error) {
|
|
1567
1585
|
logger2.error("Error executing command:", error);
|
|
1568
1586
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -2172,7 +2190,11 @@ function addAllowlistEntry(approvals, agentId, pattern) {
|
|
|
2172
2190
|
}
|
|
2173
2191
|
}
|
|
2174
2192
|
function minSecurity(a, b) {
|
|
2175
|
-
const order = {
|
|
2193
|
+
const order = {
|
|
2194
|
+
deny: 0,
|
|
2195
|
+
allowlist: 1,
|
|
2196
|
+
full: 2
|
|
2197
|
+
};
|
|
2176
2198
|
return order[a] <= order[b] ? a : b;
|
|
2177
2199
|
}
|
|
2178
2200
|
function maxAsk(a, b) {
|
|
@@ -2182,8 +2204,16 @@ function maxAsk(a, b) {
|
|
|
2182
2204
|
// approvals/analysis.ts
|
|
2183
2205
|
import fs2 from "node:fs";
|
|
2184
2206
|
import path2 from "node:path";
|
|
2185
|
-
var DISALLOWED_PIPELINE_TOKENS = new Set([
|
|
2186
|
-
|
|
2207
|
+
var DISALLOWED_PIPELINE_TOKENS = new Set([
|
|
2208
|
+
">",
|
|
2209
|
+
"<",
|
|
2210
|
+
"`",
|
|
2211
|
+
`
|
|
2212
|
+
`,
|
|
2213
|
+
"\r",
|
|
2214
|
+
"(",
|
|
2215
|
+
")"
|
|
2216
|
+
]);
|
|
2187
2217
|
var DOUBLE_QUOTE_ESCAPES = new Set(["\\", '"', "$", "`", `
|
|
2188
2218
|
`, "\r"]);
|
|
2189
2219
|
var WINDOWS_UNSUPPORTED_TOKENS = new Set([
|
|
@@ -2494,7 +2524,11 @@ function analyzeShellCommand(params) {
|
|
|
2494
2524
|
}
|
|
2495
2525
|
const segments2 = parseSegmentsFromParts(pipelineSplit.segments, params.cwd, params.env);
|
|
2496
2526
|
if (!segments2) {
|
|
2497
|
-
return {
|
|
2527
|
+
return {
|
|
2528
|
+
ok: false,
|
|
2529
|
+
reason: "unable to parse shell segment",
|
|
2530
|
+
segments: []
|
|
2531
|
+
};
|
|
2498
2532
|
}
|
|
2499
2533
|
chains.push(segments2);
|
|
2500
2534
|
allSegments.push(...segments2);
|
|
@@ -2525,7 +2559,11 @@ function analyzeWindowsCommand(params) {
|
|
|
2525
2559
|
}
|
|
2526
2560
|
const argv = tokenizeWindowsSegment(params.command);
|
|
2527
2561
|
if (!argv || argv.length === 0) {
|
|
2528
|
-
return {
|
|
2562
|
+
return {
|
|
2563
|
+
ok: false,
|
|
2564
|
+
reason: "unable to parse windows command",
|
|
2565
|
+
segments: []
|
|
2566
|
+
};
|
|
2529
2567
|
}
|
|
2530
2568
|
return {
|
|
2531
2569
|
ok: true,
|
|
@@ -2780,7 +2818,10 @@ function evaluateExecAllowlist(params) {
|
|
|
2780
2818
|
skillBins: params.skillBins,
|
|
2781
2819
|
autoAllowSkills: params.autoAllowSkills
|
|
2782
2820
|
});
|
|
2783
|
-
return {
|
|
2821
|
+
return {
|
|
2822
|
+
allowlistSatisfied: result.satisfied,
|
|
2823
|
+
allowlistMatches: result.matches
|
|
2824
|
+
};
|
|
2784
2825
|
}
|
|
2785
2826
|
function evaluateShellAllowlist(params) {
|
|
2786
2827
|
const chainParts = isWindowsPlatform(params.platform) ? null : splitCommandChain(params.command);
|
|
@@ -3043,7 +3084,11 @@ class ExecApprovalService extends Service {
|
|
|
3043
3084
|
timedOut: false
|
|
3044
3085
|
};
|
|
3045
3086
|
}
|
|
3046
|
-
const descriptionLines = [
|
|
3087
|
+
const descriptionLines = [
|
|
3088
|
+
"**Exec Approval Required**",
|
|
3089
|
+
"",
|
|
3090
|
+
`Command: \`${request.command}\``
|
|
3091
|
+
];
|
|
3047
3092
|
if (request.cwd) {
|
|
3048
3093
|
descriptionLines.push(`CWD: \`${request.cwd}\``);
|
|
3049
3094
|
}
|
|
@@ -3091,7 +3136,11 @@ class ExecApprovalService extends Service {
|
|
|
3091
3136
|
}
|
|
3092
3137
|
throw new Error("ApprovalService not available");
|
|
3093
3138
|
}
|
|
3094
|
-
const descriptionLines = [
|
|
3139
|
+
const descriptionLines = [
|
|
3140
|
+
"**Exec Approval Required**",
|
|
3141
|
+
"",
|
|
3142
|
+
`Command: \`${request.command}\``
|
|
3143
|
+
];
|
|
3095
3144
|
if (request.cwd) {
|
|
3096
3145
|
descriptionLines.push(`CWD: \`${request.cwd}\``);
|
|
3097
3146
|
}
|
|
@@ -3365,7 +3414,9 @@ function loadShellConfig() {
|
|
|
3365
3414
|
const defaultBackgroundMs = parseInt(process.env.SHELL_BACKGROUND_MS || "10000", 10);
|
|
3366
3415
|
const allowBackground = process.env.SHELL_ALLOW_BACKGROUND !== "false";
|
|
3367
3416
|
const customForbidden = process.env.SHELL_FORBIDDEN_COMMANDS ? process.env.SHELL_FORBIDDEN_COMMANDS.split(",").map((cmd) => cmd.trim()) : [];
|
|
3368
|
-
const forbiddenCommands = [
|
|
3417
|
+
const forbiddenCommands = [
|
|
3418
|
+
...new Set([...DEFAULT_FORBIDDEN_COMMANDS, ...customForbidden])
|
|
3419
|
+
];
|
|
3369
3420
|
const config = {
|
|
3370
3421
|
enabled: true,
|
|
3371
3422
|
allowedDirectory,
|
|
@@ -3411,7 +3462,14 @@ function validatePath(commandPath, allowedDir, currentDir) {
|
|
|
3411
3462
|
}
|
|
3412
3463
|
function isSafeCommand(command) {
|
|
3413
3464
|
const pathTraversalPatterns = [/\.\.\//g, /\.\.\\/g, /\/\.\./g, /\\\.\./g];
|
|
3414
|
-
const dangerousPatterns = [
|
|
3465
|
+
const dangerousPatterns = [
|
|
3466
|
+
/\$\(/g,
|
|
3467
|
+
/`[^']*`/g,
|
|
3468
|
+
/\|\s*sudo/g,
|
|
3469
|
+
/;\s*sudo/g,
|
|
3470
|
+
/&\s*&/g,
|
|
3471
|
+
/\|\s*\|/g
|
|
3472
|
+
];
|
|
3415
3473
|
for (const pattern of pathTraversalPatterns) {
|
|
3416
3474
|
if (pattern.test(command)) {
|
|
3417
3475
|
logger8.warn(`Path traversal detected in command: ${command}`);
|
|
@@ -4159,7 +4217,10 @@ function randomChoice(values, fallback) {
|
|
|
4159
4217
|
return values[Math.floor(Math.random() * values.length)] ?? fallback;
|
|
4160
4218
|
}
|
|
4161
4219
|
function createSlugBase(words = 2) {
|
|
4162
|
-
const parts = [
|
|
4220
|
+
const parts = [
|
|
4221
|
+
randomChoice(SLUG_ADJECTIVES, "steady"),
|
|
4222
|
+
randomChoice(SLUG_NOUNS, "harbor")
|
|
4223
|
+
];
|
|
4163
4224
|
if (words > 2) {
|
|
4164
4225
|
parts.push(randomChoice(SLUG_NOUNS, "reef"));
|
|
4165
4226
|
}
|
|
@@ -4412,6 +4473,42 @@ class ShellService extends Service2 {
|
|
|
4412
4473
|
executedIn: this.currentDirectory
|
|
4413
4474
|
};
|
|
4414
4475
|
}
|
|
4476
|
+
if (this.runtime && this.runtime.sandboxMode) {
|
|
4477
|
+
const hostApiUrl = this.runtime.getSetting("SANDBOX_HOST_API_URL") ?? "http://localhost:2138";
|
|
4478
|
+
const runtimeFetch = this.runtime.fetch ?? globalThis.fetch;
|
|
4479
|
+
logger9.info(`[shell:sandbox] routing exec to ${hostApiUrl}: ${command.substring(0, 100)}`);
|
|
4480
|
+
try {
|
|
4481
|
+
const response = await runtimeFetch(`${hostApiUrl}/api/sandbox/exec`, {
|
|
4482
|
+
method: "POST",
|
|
4483
|
+
headers: { "Content-Type": "application/json" },
|
|
4484
|
+
body: JSON.stringify({
|
|
4485
|
+
command,
|
|
4486
|
+
workdir: this.currentDirectory,
|
|
4487
|
+
timeoutMs: 30000
|
|
4488
|
+
})
|
|
4489
|
+
});
|
|
4490
|
+
const result2 = await response.json();
|
|
4491
|
+
logger9.info(`[shell:sandbox] exec completed: exit=${result2.exitCode} duration=${result2.durationMs}ms`);
|
|
4492
|
+
return {
|
|
4493
|
+
success: result2.exitCode === 0,
|
|
4494
|
+
stdout: result2.stdout,
|
|
4495
|
+
stderr: result2.stderr,
|
|
4496
|
+
exitCode: result2.exitCode,
|
|
4497
|
+
executedIn: this.currentDirectory
|
|
4498
|
+
};
|
|
4499
|
+
} catch (err) {
|
|
4500
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
4501
|
+
logger9.error(`[shell:sandbox] exec failed: ${errMsg}`);
|
|
4502
|
+
return {
|
|
4503
|
+
success: false,
|
|
4504
|
+
stdout: "",
|
|
4505
|
+
stderr: `Sandbox exec failed: ${errMsg}`,
|
|
4506
|
+
exitCode: 1,
|
|
4507
|
+
error: "Sandbox remote execution failed",
|
|
4508
|
+
executedIn: this.currentDirectory
|
|
4509
|
+
};
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4415
4512
|
const trimmedCommand = command.trim();
|
|
4416
4513
|
if (!isSafeCommand(trimmedCommand)) {
|
|
4417
4514
|
return {
|
|
@@ -5559,4 +5656,4 @@ export {
|
|
|
5559
5656
|
BRACKETED_PASTE_END
|
|
5560
5657
|
};
|
|
5561
5658
|
|
|
5562
|
-
//# debugId=
|
|
5659
|
+
//# debugId=6BFC18D74F82D0A464756E2164756E21
|