Commit ab34966
feat(agent)!: expose active package policy (#1937)
Exposes the validated active package-broker policy through the
authenticated `GET /v1/policy` route. Clients receive a stable snapshot,
while an unavailable policy returns the shared structured 404 response
without exposing policy source or file-security details.
Uses the official `now-policy` 0.3.0, `now-policy-api` 0.4.0, and
`now-policy-server-template` 0.4.0 releases. Phase 1 remains read-only:
policy management, validation, and replacement routes are not exposed.
Package policy files are now JSON-only. Deployments using `.yaml` or
`.yml` policy files must convert them to `.json`; unsupported extensions
and YAML content are rejected rather than silently parsed.
Coordinated stack: Devolutions/now-libraries#93 defines the shared
contract, this PR implements the Agent endpoint, and
Devolutions/UniGetUI#5292 consumes it. Keep this PR open while Phase 2
#1963 is restacked and the full stack is finalized.
BREAKING CHANGE: Package broker policy files must use JSON; YAML and YML
are no longer discovered or parsed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent 0323437 commit ab34966
16 files changed
Lines changed: 941 additions & 105 deletions
File tree
- .github/workflows
- crates
- agent-policy-tester
- src
- now-package-broker
- src
- evaluator
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1273 | 1332 | | |
1274 | 1333 | | |
1275 | 1334 | | |
| |||
1298 | 1357 | | |
1299 | 1358 | | |
1300 | 1359 | | |
1301 | | - | |
| 1360 | + | |
1302 | 1361 | | |
1303 | 1362 | | |
1304 | 1363 | | |
| |||
0 commit comments