@agent-corpus/policy-manager 0.9.0 → 0.11.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 (47) hide show
  1. package/README.md +126 -29
  2. package/dist/adapters.d.ts +3 -1
  3. package/dist/adapters.js +37 -18
  4. package/dist/classifier.d.ts +98 -0
  5. package/dist/classifier.js +343 -0
  6. package/dist/cli.js +66 -7
  7. package/dist/config.d.ts +2 -0
  8. package/dist/config.js +6 -2
  9. package/dist/evidence.d.ts +1 -0
  10. package/dist/evidence.js +60 -0
  11. package/dist/flow.d.ts +4 -0
  12. package/dist/flow.js +91 -18
  13. package/dist/gitalias.d.ts +13 -0
  14. package/dist/gitalias.js +33 -0
  15. package/dist/grants.d.ts +9 -9
  16. package/dist/grants.js +46 -30
  17. package/dist/hard.d.ts +63 -0
  18. package/dist/hard.js +1637 -0
  19. package/dist/helpers.d.ts +59 -0
  20. package/dist/helpers.js +304 -0
  21. package/dist/merged.d.ts +6 -0
  22. package/dist/merged.js +23 -0
  23. package/dist/nativerules.d.ts +44 -0
  24. package/dist/nativerules.js +653 -0
  25. package/dist/permissive.js +179 -7
  26. package/dist/policy.d.ts +12 -0
  27. package/dist/policy.js +228 -45
  28. package/dist/profile.d.ts +7 -0
  29. package/dist/profile.js +32 -1
  30. package/dist/prompt.d.ts +32 -0
  31. package/dist/prompt.js +334 -0
  32. package/dist/reads.d.ts +46 -0
  33. package/dist/reads.js +812 -0
  34. package/dist/replay.d.ts +42 -0
  35. package/dist/replay.js +174 -1
  36. package/dist/service.d.ts +12 -1
  37. package/dist/service.js +23 -6
  38. package/dist/session.d.ts +76 -13
  39. package/dist/session.js +373 -116
  40. package/dist/shell.d.ts +2 -0
  41. package/dist/shell.js +1 -1
  42. package/dist/shellscan.d.ts +58 -0
  43. package/dist/shellscan.js +395 -0
  44. package/dist/statepaths.d.ts +41 -0
  45. package/dist/statepaths.js +706 -0
  46. package/dist/types.d.ts +11 -1
  47. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -36,7 +36,15 @@ export interface Decision {
36
36
  tier?: "ambiguous";
37
37
  classification?: ClassificationStage;
38
38
  /** Why a human was asked after classification could not decide. */
39
- fallbackReason?: "unavailable" | "invalid-result" | "limit";
39
+ fallbackReason?: "unavailable" | "invalid-result" | "disabled" | "too-long" | "missing" | "not-logged-in" | "exit" | "timeout" | "bad-json" | "schema";
40
+ /** A hard human item: never classified, and no classification approves it. The rule it hit. */
41
+ hard?: string;
42
+ /** What the classifier said when it did not approve, shown to the person who is asked. */
43
+ classifierNote?: string;
44
+ /** Approved by the user's own harness permission rule: the rule, as written. */
45
+ userAllowRule?: string;
46
+ /** No decision because the user's own deny or ask rule matched: the rule, as written. */
47
+ userRule?: string;
40
48
  ai?: Classification;
41
49
  /** A human decision the user may approve for the rest of the session (`approve --session`). */
42
50
  sessionGrantable?: boolean;
@@ -44,6 +52,8 @@ export interface Decision {
44
52
  sessionScopeLabel?: string;
45
53
  /** A harness tool approved by default (not a shell, file, patch or MCP tool), by name. */
46
54
  defaultTool?: string;
55
+ /** Listed credential helpers this request runs, as `<path>#<shape index>`. */
56
+ credentialHelpers?: string[];
47
57
  /** The agent tried to approve a request itself: no approval instruction is offered for it. */
48
58
  userOnly?: boolean;
49
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-corpus/policy-manager",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Deterministic, session-scoped permission decisions with audit logs and bounded AI classification.",
5
5
  "keywords": [
6
6
  "coding-agent",