@ai-sdk/policy-opa 1.0.0-canary.8 → 1.0.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,147 @@
1
1
  # @ai-sdk/policy
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - a94c258: Introduce `@ai-sdk/policy-opa`, an Open Policy Agent adapter for the
8
+ `toolApproval` callback on `generateText` / `streamText` / `ToolLoopAgent`.
9
+
10
+ Everything is exported from the package root. The engine-neutral core is a
11
+ `PolicyClient` interface, `shadow()` for safe policy rollout with
12
+ fire-and-forget telemetry, and `wrapMcpTools()` for making approval
13
+ configuration total over a discovered tool surface. The OPA layer ships
14
+ `opaPolicy` / `optionalOpaPolicy` (Rego-as-code authorization),
15
+ `wasmPolicyClient` and `httpPolicyClient` backends (lazy-loaded optional peer
16
+ deps), `opaCapabilityMiddleware` for fail-closed model-level tool filtering,
17
+ and `normalizeOpaDecision` for users who call OPA themselves.
18
+
19
+ Sits entirely on top of the public SDK surface, with no changes to `ai`,
20
+ `@ai-sdk/provider`, or `@ai-sdk/provider-utils`. Transitive enforcement
21
+ (coarse dispatchers like `bash` / `http.request` / MCP proxies) is handled
22
+ inside the user's `toolApproval` by parsing the dispatcher input and routing
23
+ to the same Rego rule that gates the direct tool.
24
+
25
+ ### Patch Changes
26
+
27
+ - 9a1b0ea: Initial release
28
+ - b8396f0: trigger initial beta release
29
+
30
+ ## 1.0.0-beta.24
31
+
32
+ ### Patch Changes
33
+
34
+ - ai@7.0.0-beta.187
35
+
36
+ ## 1.0.0-beta.23
37
+
38
+ ### Patch Changes
39
+
40
+ - ai@7.0.0-beta.186
41
+
42
+ ## 1.0.0-beta.22
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [75763b0]
47
+ - ai@7.0.0-beta.185
48
+
49
+ ## 1.0.0-beta.21
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [0416e3e]
54
+ - @ai-sdk/provider@4.0.0-beta.20
55
+ - ai@7.0.0-beta.184
56
+ - @ai-sdk/provider-utils@5.0.0-beta.50
57
+
58
+ ## 1.0.0-beta.20
59
+
60
+ ### Patch Changes
61
+
62
+ - ai@7.0.0-beta.183
63
+
64
+ ## 1.0.0-beta.19
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [cc6ab90]
69
+ - ai@7.0.0-beta.182
70
+
71
+ ## 1.0.0-beta.18
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [6a2caf9]
76
+ - ai@7.0.0-beta.181
77
+
78
+ ## 1.0.0-beta.17
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [81a284b]
83
+ - ai@7.0.0-beta.180
84
+
85
+ ## 1.0.0-beta.16
86
+
87
+ ### Patch Changes
88
+
89
+ - ai@7.0.0-beta.179
90
+
91
+ ## 1.0.0-beta.15
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [b097c52]
96
+ - ai@7.0.0-beta.178
97
+
98
+ ## 1.0.0-beta.14
99
+
100
+ ### Patch Changes
101
+
102
+ - b8396f0: trigger initial beta release
103
+ - Updated dependencies [b8396f0]
104
+ - @ai-sdk/provider-utils@5.0.0-beta.49
105
+ - @ai-sdk/provider@4.0.0-beta.19
106
+ - ai@7.0.0-beta.177
107
+
108
+ ## 1.0.0-canary.13
109
+
110
+ ### Patch Changes
111
+
112
+ - ai@7.0.0-canary.176
113
+
114
+ ## 1.0.0-canary.12
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [6ec57f5]
119
+ - ai@7.0.0-canary.175
120
+
121
+ ## 1.0.0-canary.11
122
+
123
+ ### Patch Changes
124
+
125
+ - ai@7.0.0-canary.174
126
+
127
+ ## 1.0.0-canary.10
128
+
129
+ ### Patch Changes
130
+
131
+ - ai@7.0.0-canary.173
132
+
133
+ ## 1.0.0-canary.9
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [aeda373]
138
+ - Updated dependencies [25a64f8]
139
+ - Updated dependencies [375fdd7]
140
+ - Updated dependencies [f18b08f]
141
+ - Updated dependencies [b4507d5]
142
+ - @ai-sdk/provider-utils@5.0.0-canary.48
143
+ - ai@7.0.0-canary.172
144
+
3
145
  ## 1.0.0-canary.8
4
146
 
5
147
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/policy-opa",
3
- "version": "1.0.0-canary.8",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -25,20 +25,20 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@ai-sdk/provider": "4.0.0-canary.18",
29
- "@ai-sdk/provider-utils": "5.0.0-canary.47"
28
+ "@ai-sdk/provider": "4.0.0",
29
+ "@ai-sdk/provider-utils": "5.0.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "22.19.19",
33
33
  "tsup": "^8.5.1",
34
34
  "typescript": "5.8.3",
35
35
  "@vercel/ai-tsconfig": "0.0.0",
36
- "ai": "7.0.0-canary.171"
36
+ "ai": "7.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@open-policy-agent/opa": "^1.0.0",
40
40
  "@open-policy-agent/opa-wasm": "^1.0.0",
41
- "ai": "7.0.0-canary.171"
41
+ "ai": "7.0.0"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@open-policy-agent/opa": {