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

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