@to11ai/sdk 2.1.0-rc.1 → 2.1.0-rc.2
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/README.md +1 -2
- package/dist/errors.d.ts +3 -7
- package/dist/gateway.cjs +0 -3
- package/dist/gateway.d.ts +0 -3
- package/dist/gateway.js +0 -3
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/types.gen.d.ts +31 -1001
- package/dist/generated/zod.gen.d.ts +15 -698
- package/dist/prompts/resource.cjs +0 -3
- package/dist/prompts/resource.js +0 -3
- package/dist/prompts/shape.d.ts +0 -1
- package/dist/prompts/types.d.ts +0 -1
- package/package.json +1 -1
- package/src/errors.ts +3 -7
- package/src/gateway.ts +0 -7
- package/src/generated/index.ts +1 -1
- package/src/generated/types.gen.ts +13 -1026
- package/src/generated/zod.gen.ts +3 -582
- package/src/prompts/resource.ts +1 -15
- package/src/prompts/shape.ts +0 -3
- package/src/prompts/types.ts +0 -1
- package/src/transport.ts +5 -16
package/src/transport.ts
CHANGED
|
@@ -53,23 +53,12 @@ const PROMPT_NOT_FOUND_DETAILS_CODES = new Set([
|
|
|
53
53
|
]);
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Prompt-resolution policy violation codes
|
|
57
|
-
* `
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* 403 policy violation is not swallowed as an auth error (D3, AC6).
|
|
56
|
+
* Prompt-resolution policy violation codes. `POLICY_VIOLATION` maps to
|
|
57
|
+
* `PromptPolicyViolationError`. This set is matched on `details.code` BEFORE
|
|
58
|
+
* the generic `401 || 403 → auth` guard so a 403 policy violation is not
|
|
59
|
+
* swallowed as an auth error (D3, AC6).
|
|
61
60
|
*/
|
|
62
|
-
const PROMPT_POLICY_VIOLATION_DETAILS_CODES = new Set([
|
|
63
|
-
"POLICY_VIOLATION",
|
|
64
|
-
"ENV_POLICY_REQUIRED_SOURCE_ENV",
|
|
65
|
-
"ENV_POLICY_MINIMUM_DWELL_TIME",
|
|
66
|
-
"ENV_POLICY_NO_ROLLBACK_IN_SOURCE",
|
|
67
|
-
"ENV_POLICY_REQUIRES_APPROVAL",
|
|
68
|
-
"ENV_POLICY_SEPARATION_OF_DUTIES",
|
|
69
|
-
"ENV_POLICY_SOURCE_ENV_UNAVAILABLE",
|
|
70
|
-
"ENV_POLICY_ENV_NOT_FOUND",
|
|
71
|
-
"ENV_POLICY_INVALID_CONFIG",
|
|
72
|
-
]);
|
|
61
|
+
const PROMPT_POLICY_VIOLATION_DETAILS_CODES = new Set(["POLICY_VIOLATION"]);
|
|
73
62
|
|
|
74
63
|
/**
|
|
75
64
|
* Map a prompt-resolution envelope (keyed on `details.code`) to a typed S9
|