@ai-sdk/policy-opa 0.0.0 → 1.0.0-beta.14

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/CHANGELOG.md ADDED
@@ -0,0 +1,147 @@
1
+ # @ai-sdk/policy
2
+
3
+ ## 1.0.0-beta.14
4
+
5
+ ### Patch Changes
6
+
7
+ - b8396f0: trigger initial beta release
8
+ - Updated dependencies [b8396f0]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.49
10
+ - @ai-sdk/provider@4.0.0-beta.19
11
+ - ai@7.0.0-beta.177
12
+
13
+ ## 1.0.0-canary.13
14
+
15
+ ### Patch Changes
16
+
17
+ - ai@7.0.0-canary.176
18
+
19
+ ## 1.0.0-canary.12
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [6ec57f5]
24
+ - ai@7.0.0-canary.175
25
+
26
+ ## 1.0.0-canary.11
27
+
28
+ ### Patch Changes
29
+
30
+ - ai@7.0.0-canary.174
31
+
32
+ ## 1.0.0-canary.10
33
+
34
+ ### Patch Changes
35
+
36
+ - ai@7.0.0-canary.173
37
+
38
+ ## 1.0.0-canary.9
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [aeda373]
43
+ - Updated dependencies [25a64f8]
44
+ - Updated dependencies [375fdd7]
45
+ - Updated dependencies [f18b08f]
46
+ - Updated dependencies [b4507d5]
47
+ - @ai-sdk/provider-utils@5.0.0-canary.48
48
+ - ai@7.0.0-canary.172
49
+
50
+ ## 1.0.0-canary.8
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [89ad56f]
55
+ - Updated dependencies [f9a496f]
56
+ - Updated dependencies [3295831]
57
+ - ai@7.0.0-canary.171
58
+
59
+ ## 1.0.0-canary.7
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [bae5e2b]
64
+ - Updated dependencies [69d7128]
65
+ - ai@7.0.0-canary.170
66
+ - @ai-sdk/provider-utils@5.0.0-canary.47
67
+
68
+ ## 1.0.0-canary.6
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [a5018ab]
73
+ - Updated dependencies [21d3d60]
74
+ - Updated dependencies [426dbbb]
75
+ - Updated dependencies [7fd3360]
76
+ - ai@7.0.0-canary.169
77
+
78
+ ## 1.0.0-canary.5
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [1e4b350]
83
+ - ai@7.0.0-canary.168
84
+
85
+ ## 1.0.0-canary.4
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [4757690]
90
+ - Updated dependencies [eeefc3f]
91
+ - Updated dependencies [b79b6a8]
92
+ - ai@7.0.0-canary.167
93
+
94
+ ## 1.0.0-canary.3
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [19736ee]
99
+ - Updated dependencies [d66ae02]
100
+ - Updated dependencies [e4182bd]
101
+ - ai@7.0.0-canary.166
102
+
103
+ ## 1.0.0-canary.2
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [ce769dd]
108
+ - @ai-sdk/provider@4.0.0-canary.18
109
+ - ai@7.0.0-canary.165
110
+ - @ai-sdk/provider-utils@5.0.0-canary.46
111
+
112
+ ## 1.0.0-canary.1
113
+
114
+ ### Patch Changes
115
+
116
+ - 9a1b0ea: Initial release
117
+ - ai@7.0.0-canary.164
118
+
119
+ ## 1.0.0-canary.0
120
+
121
+ ### Major Changes
122
+
123
+ - a94c258: Introduce `@ai-sdk/policy-opa`, an Open Policy Agent adapter for the
124
+ `toolApproval` callback on `generateText` / `streamText` / `ToolLoopAgent`.
125
+
126
+ Everything is exported from the package root. The engine-neutral core is a
127
+ `PolicyClient` interface, `shadow()` for safe policy rollout with
128
+ fire-and-forget telemetry, and `wrapMcpTools()` for making approval
129
+ configuration total over a discovered tool surface. The OPA layer ships
130
+ `opaPolicy` / `optionalOpaPolicy` (Rego-as-code authorization),
131
+ `wasmPolicyClient` and `httpPolicyClient` backends (lazy-loaded optional peer
132
+ deps), `opaCapabilityMiddleware` for fail-closed model-level tool filtering,
133
+ and `normalizeOpaDecision` for users who call OPA themselves.
134
+
135
+ Sits entirely on top of the public SDK surface, with no changes to `ai`,
136
+ `@ai-sdk/provider`, or `@ai-sdk/provider-utils`. Transitive enforcement
137
+ (coarse dispatchers like `bash` / `http.request` / MCP proxies) is handled
138
+ inside the user's `toolApproval` by parsing the dispatcher input and routing
139
+ to the same Rego rule that gates the direct tool.
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [ee798eb]
144
+ - Updated dependencies [daf6637]
145
+ - Updated dependencies [c907622]
146
+ - @ai-sdk/provider-utils@5.0.0-canary.45
147
+ - ai@7.0.0-canary.163
package/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2023 Vercel, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.