@lannguyensi/harness 0.49.0 → 0.50.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 (88) hide show
  1. package/CHANGELOG.md +683 -0
  2. package/dist/cli/add/index.js +15 -3
  3. package/dist/cli/add/index.js.map +1 -1
  4. package/dist/cli/apply/apply.js +19 -3
  5. package/dist/cli/apply/apply.js.map +1 -1
  6. package/dist/cli/approve/risk.d.ts +28 -2
  7. package/dist/cli/approve/risk.js +14 -4
  8. package/dist/cli/approve/risk.js.map +1 -1
  9. package/dist/cli/diff/index.js +22 -1
  10. package/dist/cli/diff/index.js.map +1 -1
  11. package/dist/cli/doctor/format.js +12 -2
  12. package/dist/cli/doctor/format.js.map +1 -1
  13. package/dist/cli/doctor/index.js +26 -1
  14. package/dist/cli/doctor/index.js.map +1 -1
  15. package/dist/cli/doctor/types.d.ts +26 -0
  16. package/dist/cli/explain-policy.d.ts +4 -1
  17. package/dist/cli/explain-policy.js +12 -2
  18. package/dist/cli/explain-policy.js.map +1 -1
  19. package/dist/cli/export.js +12 -1
  20. package/dist/cli/export.js.map +1 -1
  21. package/dist/cli/index.js +29 -7
  22. package/dist/cli/index.js.map +1 -1
  23. package/dist/cli/init/templates.d.ts +1 -1
  24. package/dist/cli/init/templates.js +65 -1
  25. package/dist/cli/init/templates.js.map +1 -1
  26. package/dist/cli/list.js +6 -0
  27. package/dist/cli/list.js.map +1 -1
  28. package/dist/cli/loader.js +15 -0
  29. package/dist/cli/loader.js.map +1 -1
  30. package/dist/cli/pack/hook-codex-pre-tool-use.js +11 -6
  31. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
  32. package/dist/cli/pack/hook-post-tool-use.d.ts +6 -4
  33. package/dist/cli/pack/hook-post-tool-use.js.map +1 -1
  34. package/dist/cli/pack/hook-pre-tool-use.js +23 -22
  35. package/dist/cli/pack/hook-pre-tool-use.js.map +1 -1
  36. package/dist/cli/remove/index.d.ts +12 -0
  37. package/dist/cli/remove/index.js +89 -0
  38. package/dist/cli/remove/index.js.map +1 -1
  39. package/dist/cli/validate/checks.d.ts +48 -0
  40. package/dist/cli/validate/checks.js +231 -0
  41. package/dist/cli/validate/checks.js.map +1 -1
  42. package/dist/cli/validate/index.js +11 -0
  43. package/dist/cli/validate/index.js.map +1 -1
  44. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +2 -2
  45. package/dist/policy-packs/builtin/understanding-before-execution/index.js +33 -27
  46. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +1 -1
  47. package/dist/policy-packs/builtin/understanding-before-execution/markers.js +2 -2
  48. package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +1 -1
  49. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +46 -8
  50. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +71 -12
  51. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +1 -1
  52. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +6 -3
  53. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +1 -1
  54. package/dist/policy-packs/builtin/understanding-before-execution.js +9 -8
  55. package/dist/policy-packs/builtin/understanding-before-execution.js.map +1 -1
  56. package/dist/runtime/command-normalize.d.ts +112 -0
  57. package/dist/runtime/command-normalize.js +169 -55
  58. package/dist/runtime/command-normalize.js.map +1 -1
  59. package/dist/runtime/deletion-target-resolve.d.ts +28 -0
  60. package/dist/runtime/deletion-target-resolve.js +1055 -0
  61. package/dist/runtime/deletion-target-resolve.js.map +1 -0
  62. package/dist/runtime/index.d.ts +1 -0
  63. package/dist/runtime/index.js +1 -0
  64. package/dist/runtime/index.js.map +1 -1
  65. package/dist/runtime/intercept.js +17 -1
  66. package/dist/runtime/intercept.js.map +1 -1
  67. package/dist/runtime/kubectl-target-parse.d.ts +16 -0
  68. package/dist/runtime/kubectl-target-parse.js +9 -1
  69. package/dist/runtime/kubectl-target-parse.js.map +1 -1
  70. package/dist/runtime/read-only-bash.d.ts +11 -0
  71. package/dist/runtime/read-only-bash.js +288 -7
  72. package/dist/runtime/read-only-bash.js.map +1 -1
  73. package/dist/runtime/risk-classifier.js +14 -1
  74. package/dist/runtime/risk-classifier.js.map +1 -1
  75. package/dist/runtime/when-eval.d.ts +11 -2
  76. package/dist/runtime/when-eval.js +25 -0
  77. package/dist/runtime/when-eval.js.map +1 -1
  78. package/dist/runtime/workflow-policies.d.ts +164 -0
  79. package/dist/runtime/workflow-policies.js +439 -0
  80. package/dist/runtime/workflow-policies.js.map +1 -0
  81. package/dist/schema/index.d.ts +24 -0
  82. package/dist/schema/policies.d.ts +25 -0
  83. package/dist/schema/policies.js +29 -0
  84. package/dist/schema/policies.js.map +1 -1
  85. package/dist/schema/risk.d.ts +6 -0
  86. package/dist/schema/risk.js +80 -0
  87. package/dist/schema/risk.js.map +1 -1
  88. package/package.json +1 -1
@@ -77,26 +77,31 @@ export declare const PolicyWhenSchema: z.ZodEffects<z.ZodObject<{
77
77
  "risk.category_in": z.ZodOptional<z.ZodArray<z.ZodEnum<["destructive", "data_loss", "production_mutation", "credential_access", "secret_exfiltration", "network_exfiltration", "deployment_change", "infrastructure_change", "privilege_escalation", "irreversible_action", "mass_update"]>, "many">>;
78
78
  "environment.name": z.ZodOptional<z.ZodEnum<["production", "staging", "dev", "local", "unknown"]>>;
79
79
  "action.reversible": z.ZodOptional<z.ZodBoolean>;
80
+ "action.deletion_target_unresolvable": z.ZodOptional<z.ZodLiteral<true>>;
80
81
  }, "strict", z.ZodTypeAny, {
81
82
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
82
83
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
83
84
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
84
85
  "action.reversible"?: boolean | undefined;
86
+ "action.deletion_target_unresolvable"?: true | undefined;
85
87
  }, {
86
88
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
87
89
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
88
90
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
89
91
  "action.reversible"?: boolean | undefined;
92
+ "action.deletion_target_unresolvable"?: true | undefined;
90
93
  }>, {
91
94
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
92
95
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
93
96
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
94
97
  "action.reversible"?: boolean | undefined;
98
+ "action.deletion_target_unresolvable"?: true | undefined;
95
99
  }, {
96
100
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
97
101
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
98
102
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
99
103
  "action.reversible"?: boolean | undefined;
104
+ "action.deletion_target_unresolvable"?: true | undefined;
100
105
  }>;
101
106
  export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
102
107
  name: z.ZodString;
@@ -249,26 +254,31 @@ export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
249
254
  "risk.category_in": z.ZodOptional<z.ZodArray<z.ZodEnum<["destructive", "data_loss", "production_mutation", "credential_access", "secret_exfiltration", "network_exfiltration", "deployment_change", "infrastructure_change", "privilege_escalation", "irreversible_action", "mass_update"]>, "many">>;
250
255
  "environment.name": z.ZodOptional<z.ZodEnum<["production", "staging", "dev", "local", "unknown"]>>;
251
256
  "action.reversible": z.ZodOptional<z.ZodBoolean>;
257
+ "action.deletion_target_unresolvable": z.ZodOptional<z.ZodLiteral<true>>;
252
258
  }, "strict", z.ZodTypeAny, {
253
259
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
254
260
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
255
261
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
256
262
  "action.reversible"?: boolean | undefined;
263
+ "action.deletion_target_unresolvable"?: true | undefined;
257
264
  }, {
258
265
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
259
266
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
260
267
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
261
268
  "action.reversible"?: boolean | undefined;
269
+ "action.deletion_target_unresolvable"?: true | undefined;
262
270
  }>, {
263
271
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
264
272
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
265
273
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
266
274
  "action.reversible"?: boolean | undefined;
275
+ "action.deletion_target_unresolvable"?: true | undefined;
267
276
  }, {
268
277
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
269
278
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
270
279
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
271
280
  "action.reversible"?: boolean | undefined;
281
+ "action.deletion_target_unresolvable"?: true | undefined;
272
282
  }>>;
273
283
  }, "strict", z.ZodTypeAny, {
274
284
  name: string;
@@ -317,6 +327,7 @@ export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
317
327
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
318
328
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
319
329
  "action.reversible"?: boolean | undefined;
330
+ "action.deletion_target_unresolvable"?: true | undefined;
320
331
  } | undefined;
321
332
  }, {
322
333
  name: string;
@@ -365,6 +376,7 @@ export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
365
376
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
366
377
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
367
378
  "action.reversible"?: boolean | undefined;
379
+ "action.deletion_target_unresolvable"?: true | undefined;
368
380
  } | undefined;
369
381
  }>, {
370
382
  name: string;
@@ -413,6 +425,7 @@ export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
413
425
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
414
426
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
415
427
  "action.reversible"?: boolean | undefined;
428
+ "action.deletion_target_unresolvable"?: true | undefined;
416
429
  } | undefined;
417
430
  }, {
418
431
  name: string;
@@ -461,6 +474,7 @@ export declare const PolicySchema: z.ZodEffects<z.ZodObject<{
461
474
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
462
475
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
463
476
  "action.reversible"?: boolean | undefined;
477
+ "action.deletion_target_unresolvable"?: true | undefined;
464
478
  } | undefined;
465
479
  }>;
466
480
  export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -614,26 +628,31 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
614
628
  "risk.category_in": z.ZodOptional<z.ZodArray<z.ZodEnum<["destructive", "data_loss", "production_mutation", "credential_access", "secret_exfiltration", "network_exfiltration", "deployment_change", "infrastructure_change", "privilege_escalation", "irreversible_action", "mass_update"]>, "many">>;
615
629
  "environment.name": z.ZodOptional<z.ZodEnum<["production", "staging", "dev", "local", "unknown"]>>;
616
630
  "action.reversible": z.ZodOptional<z.ZodBoolean>;
631
+ "action.deletion_target_unresolvable": z.ZodOptional<z.ZodLiteral<true>>;
617
632
  }, "strict", z.ZodTypeAny, {
618
633
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
619
634
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
620
635
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
621
636
  "action.reversible"?: boolean | undefined;
637
+ "action.deletion_target_unresolvable"?: true | undefined;
622
638
  }, {
623
639
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
624
640
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
625
641
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
626
642
  "action.reversible"?: boolean | undefined;
643
+ "action.deletion_target_unresolvable"?: true | undefined;
627
644
  }>, {
628
645
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
629
646
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
630
647
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
631
648
  "action.reversible"?: boolean | undefined;
649
+ "action.deletion_target_unresolvable"?: true | undefined;
632
650
  }, {
633
651
  "risk.severity_at_least"?: "low" | "medium" | "high" | "critical" | undefined;
634
652
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
635
653
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
636
654
  "action.reversible"?: boolean | undefined;
655
+ "action.deletion_target_unresolvable"?: true | undefined;
637
656
  }>>;
638
657
  }, "strict", z.ZodTypeAny, {
639
658
  name: string;
@@ -682,6 +701,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
682
701
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
683
702
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
684
703
  "action.reversible"?: boolean | undefined;
704
+ "action.deletion_target_unresolvable"?: true | undefined;
685
705
  } | undefined;
686
706
  }, {
687
707
  name: string;
@@ -730,6 +750,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
730
750
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
731
751
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
732
752
  "action.reversible"?: boolean | undefined;
753
+ "action.deletion_target_unresolvable"?: true | undefined;
733
754
  } | undefined;
734
755
  }>, {
735
756
  name: string;
@@ -778,6 +799,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
778
799
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
779
800
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
780
801
  "action.reversible"?: boolean | undefined;
802
+ "action.deletion_target_unresolvable"?: true | undefined;
781
803
  } | undefined;
782
804
  }, {
783
805
  name: string;
@@ -826,6 +848,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
826
848
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
827
849
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
828
850
  "action.reversible"?: boolean | undefined;
851
+ "action.deletion_target_unresolvable"?: true | undefined;
829
852
  } | undefined;
830
853
  }>, "many">, {
831
854
  name: string;
@@ -874,6 +897,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
874
897
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
875
898
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
876
899
  "action.reversible"?: boolean | undefined;
900
+ "action.deletion_target_unresolvable"?: true | undefined;
877
901
  } | undefined;
878
902
  }[], {
879
903
  name: string;
@@ -922,6 +946,7 @@ export declare const PoliciesSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
922
946
  "risk.category_in"?: ("destructive" | "data_loss" | "production_mutation" | "credential_access" | "secret_exfiltration" | "network_exfiltration" | "deployment_change" | "infrastructure_change" | "privilege_escalation" | "irreversible_action" | "mass_update")[] | undefined;
923
947
  "environment.name"?: "production" | "staging" | "dev" | "local" | "unknown" | undefined;
924
948
  "action.reversible"?: boolean | undefined;
949
+ "action.deletion_target_unresolvable"?: true | undefined;
925
950
  } | undefined;
926
951
  }[]>;
927
952
  export type Policy = z.infer<typeof PolicySchema>;
@@ -111,6 +111,34 @@ export const PolicyUxSchema = z
111
111
  // (`unknown` is matchable: unknown is not
112
112
  // safe).
113
113
  // action.reversible — envelope action reversibility flag.
114
+ // action.deletion_target_unresolvable — a deletion-verb command (`rm
115
+ // -r*`/`-f*`, `find ... -delete`, `git clean
116
+ // -f*`) whose target(s) could not be
117
+ // statically proven inside a declared
118
+ // `risk.safe_deletion_roots` entry. UNLIKE the
119
+ // four clauses above, this one is NEVER
120
+ // subject to the "unknown is not safe"
121
+ // fail-close: an action the deletion resolver
122
+ // does not recognize as a deletion verb at
123
+ // all does not satisfy this clause, so a
124
+ // policy gated purely on it does not need an
125
+ // `environment.name` scope to avoid firing on
126
+ // every unrelated unclassified command — see
127
+ // src/runtime/when-eval.ts and
128
+ // src/runtime/deletion-target-resolve.ts.
129
+ // ONLY `true` is a meaningful value (task
130
+ // d03af8f6, review round 2): a resolver
131
+ // verdict is either `unresolvable: true` (gate
132
+ // it) or the action never reaches this clause
133
+ // at all (a resolved-safe target or a
134
+ // non-deletion command both simply fail to
135
+ // match `true`) — `false` would match every
136
+ // non-deletion-verb command in the manifest
137
+ // (verdict `null` -> "actual" false -> equals
138
+ // declared `false`), which is never the
139
+ // intent of a `when:` clause naming this key.
140
+ // The schema accepts only the literal `true`;
141
+ // `false` is a validate-time error.
114
142
  // An empty `when: {}` is rejected: it would be a silent no-op.
115
143
  export const PolicyWhenSchema = z
116
144
  .object({
@@ -118,6 +146,7 @@ export const PolicyWhenSchema = z
118
146
  "risk.category_in": z.array(RiskCategorySchema).min(1).optional(),
119
147
  "environment.name": MatchableEnvironmentSchema.optional(),
120
148
  "action.reversible": z.boolean().optional(),
149
+ "action.deletion_target_unresolvable": z.literal(true).optional(),
121
150
  })
122
151
  .strict()
123
152
  .superRefine((when, ctx) => {
@@ -1 +1 @@
1
- {"version":3,"file":"policies.js","sourceRoot":"","sources":["../../src/schema/policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,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M;gBAC3B,IAAI,EAAE,CAAC,WAAW,CAAC;gBACnB,OAAO,EACL,2HAA2H;aAC9H,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;IAChF,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACxB,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;gBAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,0BAA0B,CAAC,CAAC,IAAI,EAAE;aAC5C,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -43,6 +43,7 @@ export declare const RiskClassifierSchema: z.ZodObject<{
43
43
  tool: string;
44
44
  }>;
45
45
  export declare const DegradedFailPostureSchema: z.ZodEnum<["preserve_enforcement", "fail_open"]>;
46
+ export declare const DEFAULT_SAFE_DELETION_ROOTS: string[];
46
47
  export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
47
48
  classifiers: z.ZodDefault<z.ZodArray<z.ZodObject<{
48
49
  name: z.ZodString;
@@ -86,6 +87,7 @@ export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
86
87
  tool: string;
87
88
  }>, "many">>;
88
89
  degraded_fail_posture: z.ZodDefault<z.ZodEnum<["preserve_enforcement", "fail_open"]>>;
90
+ safe_deletion_roots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
89
91
  }, "strict", z.ZodTypeAny, {
90
92
  classifiers: {
91
93
  patterns: {
@@ -97,6 +99,7 @@ export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
97
99
  tool: string;
98
100
  }[];
99
101
  degraded_fail_posture: "preserve_enforcement" | "fail_open";
102
+ safe_deletion_roots: string[];
100
103
  }, {
101
104
  classifiers?: {
102
105
  patterns: {
@@ -108,6 +111,7 @@ export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
108
111
  tool: string;
109
112
  }[] | undefined;
110
113
  degraded_fail_posture?: "preserve_enforcement" | "fail_open" | undefined;
114
+ safe_deletion_roots?: string[] | undefined;
111
115
  }>, {
112
116
  classifiers: {
113
117
  patterns: {
@@ -119,6 +123,7 @@ export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
119
123
  tool: string;
120
124
  }[];
121
125
  degraded_fail_posture: "preserve_enforcement" | "fail_open";
126
+ safe_deletion_roots: string[];
122
127
  }, {
123
128
  classifiers?: {
124
129
  patterns: {
@@ -130,6 +135,7 @@ export declare const RiskSchema: z.ZodEffects<z.ZodObject<{
130
135
  tool: string;
131
136
  }[] | undefined;
132
137
  degraded_fail_posture?: "preserve_enforcement" | "fail_open" | undefined;
138
+ safe_deletion_roots?: string[] | undefined;
133
139
  }>;
134
140
  export type DegradedFailPosture = z.infer<typeof DegradedFailPostureSchema>;
135
141
  export type RiskSeverity = z.infer<typeof RiskSeveritySchema>;
@@ -92,10 +92,40 @@ export const DegradedFailPostureSchema = z.enum([
92
92
  "preserve_enforcement",
93
93
  "fail_open",
94
94
  ]);
95
+ // Safe-deletion-root allowlist (task d03af8f6). `src/runtime/
96
+ // deletion-target-resolve.ts` statically resolves the target(s) of a
97
+ // deletion-verb command (`rm -r*`/`-f*`, `find ... -delete`/`-exec*`/
98
+ // `-execdir` with an `rm` payload, `git clean -f*`) and treats a target
99
+ // as safe only when it is an ABSOLUTE path that lies STRICTLY INSIDE one
100
+ // of these roots (a plain directory-prefix match against `root + "/"`;
101
+ // the root itself does not count, for EVERY verb alike — `find`'s own
102
+ // start point is removed by `-delete`/`-exec` the same way `rm`'s
103
+ // operand is, so it gets no root-equality exception either). An
104
+ // optional trailing `/**` or `/*` on an entry is stripped
105
+ // as documentation sugar before matching — it is not a real glob
106
+ // engine. A target the
107
+ // resolver cannot statically prove absolute and prefix-matched — an
108
+ // unexpanded `$VAR`/`${VAR}` reference, a `~`-relative path, a relative
109
+ // path, or a `..`-traversal that normalizes outside every root — is
110
+ // treated as UNRESOLVABLE, never guessed safe. The defaults cover the
111
+ // two spellings this harness's own scratchpad convention can use: a
112
+ // symlinked `/tmp` and its `/private/tmp` realpath (macOS); an operator
113
+ // who overrides this list REPLACES it, it does not merge with the
114
+ // default. See docs/risk-gate.md.
115
+ // Exported (not just used as the schema `.default()`) so runtime call
116
+ // sites can fall back to the same list for a hand-built `Manifest` that
117
+ // bypassed schema parsing entirely (every test fixture that constructs
118
+ // `{ risk: { classifiers: [...] } }` directly, without going through
119
+ // `RiskSchema.parse`) — see `src/runtime/intercept.ts` and
120
+ // `src/cli/explain-policy.ts`.
121
+ export const DEFAULT_SAFE_DELETION_ROOTS = ["/tmp", "/private/tmp"];
95
122
  export const RiskSchema = z
96
123
  .object({
97
124
  classifiers: z.array(RiskClassifierSchema).default([]),
98
125
  degraded_fail_posture: DegradedFailPostureSchema.default("preserve_enforcement"),
126
+ safe_deletion_roots: z
127
+ .array(z.string().min(1))
128
+ .default(DEFAULT_SAFE_DELETION_ROOTS),
99
129
  })
100
130
  .strict()
101
131
  .superRefine((risk, ctx) => {
@@ -110,5 +140,55 @@ export const RiskSchema = z
110
140
  }
111
141
  seen.add(c.name);
112
142
  });
143
+ // A filesystem-root entry — bare `/`, or anything that lexically
144
+ // NORMALIZES to `/` (`/.`, `/./`, `/tmp/..` — task d03af8f6, review
145
+ // round 3, LOW (d), widening review round 2 LOW (a)'s bare-`/`-only
146
+ // check) — would match every absolute path as "inside" it via the
147
+ // resolver's own `target.startsWith(root + "/")` prefix check —
148
+ // silently defeating the entire point of an allowlist. Rejected at
149
+ // parse time with a message rather than special-cased to "matches
150
+ // everything" at runtime, since an operator who wrote one of these
151
+ // spellings almost certainly meant a specific subdirectory.
152
+ // Non-absolute entries and ones containing `$`/`~` are a `harness
153
+ // validate` LINT instead (a warning, not a parse-time error) — see
154
+ // `checkSafeDeletionRootsSyntax` in `src/cli/validate/checks.ts`.
155
+ risk.safe_deletion_roots.forEach((root, i) => {
156
+ if (normalizesToFilesystemRoot(root)) {
157
+ ctx.addIssue({
158
+ code: z.ZodIssueCode.custom,
159
+ path: ["safe_deletion_roots", i],
160
+ message: `risk.safe_deletion_roots entry "${root}" normalizes to the filesystem root and can ` +
161
+ `never be a meaningful allowlist entry: every absolute deletion target would match ` +
162
+ `it as "inside," defeating the allowlist. Declare specific subdirectories instead ` +
163
+ `(e.g. "/tmp").`,
164
+ });
165
+ }
166
+ });
113
167
  });
168
+ /**
169
+ * `true` when `root` (trimmed) lexically collapses to the filesystem
170
+ * root `/` — bare `/`, any run of bare `/` characters, `/.`, `/./`, or a
171
+ * `..`-traversal that pops back to `/` (`/tmp/..`). Lexical only (no
172
+ * filesystem I/O, mirrors `deletion-target-resolve.ts`'s own
173
+ * `normalizePosixPath` in spirit — not imported from there: this is a
174
+ * schema-time validation, `deletion-target-resolve.ts` is a runtime
175
+ * module, and neither layer should depend on the other for a check this
176
+ * small).
177
+ */
178
+ function normalizesToFilesystemRoot(root) {
179
+ const trimmed = root.trim();
180
+ if (!trimmed.startsWith("/"))
181
+ return false;
182
+ const out = [];
183
+ for (const part of trimmed.split("/")) {
184
+ if (part === "" || part === ".")
185
+ continue;
186
+ if (part === "..") {
187
+ out.pop();
188
+ continue;
189
+ }
190
+ out.push(part);
191
+ }
192
+ return out.length === 0;
193
+ }
114
194
  //# sourceMappingURL=risk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"risk.js","sourceRoot":"","sources":["../../src/schema/risk.ts"],"names":[],"mappings":"AAA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AI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG;YAAE,SAAS;QAC1C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,GAAG,CAAC,GAAG,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lannguyensi/harness",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Declarative control plane for agent harnesses — one YAML for grounding, tools, memory, and hooks.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/LanNguyenSi/harness",