@veruna/api-contracts 20.1.0 → 20.2.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.
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/tool/sandbox/code-execution.errors.d.ts +2 -1
- package/build/v1/tool/sandbox/code-execution.errors.js +5 -0
- package/build/v1/tool/sandbox/code-execution.errors.js.map +1 -1
- package/build/v1/tool/sandbox/sandbox.errors.d.ts +10 -3
- package/build/v1/tool/sandbox/sandbox.errors.js +26 -3
- package/build/v1/tool/sandbox/sandbox.errors.js.map +1 -1
- package/build-esm/.tsbuildinfo +1 -1
- package/build-esm/v1/tool/sandbox/code-execution.errors.js +5 -0
- package/build-esm/v1/tool/sandbox/code-execution.errors.js.map +1 -1
- package/build-esm/v1/tool/sandbox/sandbox.errors.js +26 -3
- package/build-esm/v1/tool/sandbox/sandbox.errors.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,8 +21,13 @@ export var CodeExecutionErrorCode;
|
|
|
21
21
|
CodeExecutionErrorCode["CODE_EXECUTION_INPUT_FILE_FORBIDDEN"] = "CODE_EXECUTION_INPUT_FILE_FORBIDDEN";
|
|
22
22
|
/** Failed to upload an input file into the sandbox filesystem. */
|
|
23
23
|
CodeExecutionErrorCode["CODE_EXECUTION_FILE_UPLOAD_FAILED"] = "CODE_EXECUTION_FILE_UPLOAD_FAILED";
|
|
24
|
+
CodeExecutionErrorCode["CODE_EXECUTION_TEMPORARILY_UNAVAILABLE"] = "CODE_EXECUTION_TEMPORARILY_UNAVAILABLE";
|
|
24
25
|
})(CodeExecutionErrorCode || (CodeExecutionErrorCode = {}));
|
|
25
26
|
export const CODE_EXECUTION_ERRORS = {
|
|
27
|
+
[CodeExecutionErrorCode.CODE_EXECUTION_TEMPORARILY_UNAVAILABLE]: {
|
|
28
|
+
code: CodeExecutionErrorCode.CODE_EXECUTION_TEMPORARILY_UNAVAILABLE,
|
|
29
|
+
statusCode: 503,
|
|
30
|
+
},
|
|
26
31
|
[CodeExecutionErrorCode.CODE_EXECUTION_FAILED]: {
|
|
27
32
|
code: CodeExecutionErrorCode.CODE_EXECUTION_FAILED,
|
|
28
33
|
statusCode: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-execution.errors.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/code-execution.errors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"code-execution.errors.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/code-execution.errors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAC9B,2EAA2E;IAC3E,yEAA+C,CAAA;IAC/C,4DAA4D;IAC5D,2EAAiD,CAAA;IACjD,qEAAqE;IACrE,iGAAuE,CAAA;IACvE,gEAAgE;IAChE,qGAA2E,CAAA;IAC3E,kEAAkE;IAClE,iGAAuE,CAAA;IACvE,2GAAiF,CAAA;AACrF,CAAC,EAZW,sBAAsB,KAAtB,sBAAsB,QAYjC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAkD;IAChF,CAAC,sBAAsB,CAAC,sCAAsC,CAAC,EAAE;QAC7D,IAAI,EAAE,sBAAsB,CAAC,sCAAsC;QACnE,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,EAAE;QAC5C,IAAI,EAAE,sBAAsB,CAAC,qBAAqB;QAClD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,EAAE;QAC7C,IAAI,EAAE,sBAAsB,CAAC,sBAAsB;QACnD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,sBAAsB,CAAC,iCAAiC,CAAC,EAAE;QACxD,IAAI,EAAE,sBAAsB,CAAC,iCAAiC;QAC9D,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,sBAAsB,CAAC,mCAAmC,CAAC,EAAE;QAC1D,IAAI,EAAE,sBAAsB,CAAC,mCAAmC;QAChE,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,sBAAsB,CAAC,iCAAiC,CAAC,EAAE;QACxD,IAAI,EAAE,sBAAsB,CAAC,iCAAiC;QAC9D,UAAU,EAAE,GAAG;KAClB;CACK,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Error codes for sandbox primitive tool operations (bash, file read/write/list).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* by the infrastructure handlers in PR #1 for file-not-found mapping.
|
|
4
|
+
* Used by sandbox tools for validation and infrastructure handlers for lifecycle and file errors.
|
|
6
5
|
*/
|
|
7
6
|
export var SandboxErrorCode;
|
|
8
7
|
(function (SandboxErrorCode) {
|
|
@@ -31,7 +30,9 @@ export var SandboxErrorCode;
|
|
|
31
30
|
* whose actual content is not a PNG. View refused to process it.
|
|
32
31
|
*/
|
|
33
32
|
SandboxErrorCode["SANDBOX_CONTENT_TYPE_MISMATCH"] = "SANDBOX_CONTENT_TYPE_MISMATCH";
|
|
34
|
-
/**
|
|
33
|
+
/** No verified public skill document exists at the requested reserved path. */
|
|
34
|
+
SandboxErrorCode["SANDBOX_SKILL_NOT_FOUND"] = "SANDBOX_SKILL_NOT_FOUND";
|
|
35
|
+
/** The generated manifest disagrees with the shipped public Markdown bundle. */
|
|
35
36
|
SandboxErrorCode["SANDBOX_SKILL_INTEGRITY_FAILED"] = "SANDBOX_SKILL_INTEGRITY_FAILED";
|
|
36
37
|
/**
|
|
37
38
|
* The caller does not own the sandbox session they are trying to access.
|
|
@@ -43,6 +44,12 @@ export var SandboxErrorCode;
|
|
|
43
44
|
* Indicates data corruption that must be investigated.
|
|
44
45
|
*/
|
|
45
46
|
SandboxErrorCode["SANDBOX_STATUS_CORRUPT"] = "SANDBOX_STATUS_CORRUPT";
|
|
47
|
+
/** The provider could not verify the sandbox network configuration. */
|
|
48
|
+
SandboxErrorCode["SANDBOX_NETWORK_CHECK_UNAVAILABLE"] = "SANDBOX_NETWORK_CHECK_UNAVAILABLE";
|
|
49
|
+
/** The requested sandbox no longer exists at the provider. */
|
|
50
|
+
SandboxErrorCode["SANDBOX_NOT_FOUND"] = "SANDBOX_NOT_FOUND";
|
|
51
|
+
/** The sandbox network configuration does not meet the required policy. */
|
|
52
|
+
SandboxErrorCode["SANDBOX_NETWORK_POSTURE_UNSAFE"] = "SANDBOX_NETWORK_POSTURE_UNSAFE";
|
|
46
53
|
/**
|
|
47
54
|
* The bash command matched a denylist pattern (e.g. writes to ~/.bashrc,
|
|
48
55
|
* /etc/, eval+curl exfiltration). The command was rejected before execution.
|
|
@@ -102,6 +109,10 @@ export const SANDBOX_ERRORS = {
|
|
|
102
109
|
code: SandboxErrorCode.SANDBOX_CONTENT_TYPE_MISMATCH,
|
|
103
110
|
statusCode: 400,
|
|
104
111
|
},
|
|
112
|
+
[SandboxErrorCode.SANDBOX_SKILL_NOT_FOUND]: {
|
|
113
|
+
code: SandboxErrorCode.SANDBOX_SKILL_NOT_FOUND,
|
|
114
|
+
statusCode: 404,
|
|
115
|
+
},
|
|
105
116
|
[SandboxErrorCode.SANDBOX_SKILL_INTEGRITY_FAILED]: {
|
|
106
117
|
code: SandboxErrorCode.SANDBOX_SKILL_INTEGRITY_FAILED,
|
|
107
118
|
statusCode: 500,
|
|
@@ -114,6 +125,18 @@ export const SANDBOX_ERRORS = {
|
|
|
114
125
|
code: SandboxErrorCode.SANDBOX_STATUS_CORRUPT,
|
|
115
126
|
statusCode: 500,
|
|
116
127
|
},
|
|
128
|
+
[SandboxErrorCode.SANDBOX_NETWORK_CHECK_UNAVAILABLE]: {
|
|
129
|
+
code: SandboxErrorCode.SANDBOX_NETWORK_CHECK_UNAVAILABLE,
|
|
130
|
+
statusCode: 503,
|
|
131
|
+
},
|
|
132
|
+
[SandboxErrorCode.SANDBOX_NOT_FOUND]: {
|
|
133
|
+
code: SandboxErrorCode.SANDBOX_NOT_FOUND,
|
|
134
|
+
statusCode: 404,
|
|
135
|
+
},
|
|
136
|
+
[SandboxErrorCode.SANDBOX_NETWORK_POSTURE_UNSAFE]: {
|
|
137
|
+
code: SandboxErrorCode.SANDBOX_NETWORK_POSTURE_UNSAFE,
|
|
138
|
+
statusCode: 503,
|
|
139
|
+
},
|
|
117
140
|
[SandboxErrorCode.BASH_COMMAND_DENIED]: {
|
|
118
141
|
code: SandboxErrorCode.BASH_COMMAND_DENIED,
|
|
119
142
|
statusCode: 400,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.errors.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/sandbox.errors.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"sandbox.errors.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/sandbox.errors.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAmEX;AAnED,WAAY,gBAAgB;IACxB,qEAAqE;IACrE,qEAAiD,CAAA;IACjD,qEAAqE;IACrE,yDAAqC,CAAA;IACrC,uEAAuE;IACvE,iEAA6C,CAAA;IAC7C,oFAAoF;IACpF,iFAA6D,CAAA;IAC7D,yDAAyD;IACzD,+DAA2C,CAAA;IAC3C,8EAA8E;IAC9E,qEAAiD,CAAA;IACjD,sFAAsF;IACtF,+EAA2D,CAAA;IAC3D;;;;OAIG;IACH,6FAAyE,CAAA;IACzE;;;OAGG;IACH,mFAA+D,CAAA;IAC/D,+EAA+E;IAC/E,uEAAmD,CAAA;IACnD,gFAAgF;IAChF,qFAAiE,CAAA;IACjE;;;OAGG;IACH,2DAAuC,CAAA;IACvC;;;OAGG;IACH,qEAAiD,CAAA;IACjD,uEAAuE;IACvE,2FAAuE,CAAA;IACvE,8DAA8D;IAC9D,2DAAuC,CAAA;IACvC,2EAA2E;IAC3E,qFAAiE,CAAA;IACjE;;;OAGG;IACH,+DAA2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