@lamentis/naome 1.3.14 → 1.3.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.
Files changed (70) hide show
  1. package/Cargo.lock +2 -2
  2. package/crates/naome-cli/Cargo.toml +1 -1
  3. package/crates/naome-cli/src/quality_commands.rs +4 -4
  4. package/crates/naome-core/Cargo.toml +1 -1
  5. package/crates/naome-core/src/architecture/config/parser/sections.rs +1 -1
  6. package/crates/naome-core/src/architecture/config.rs +1 -1
  7. package/crates/naome-core/src/architecture/model.rs +19 -0
  8. package/crates/naome-core/src/architecture/output.rs +1 -20
  9. package/crates/naome-core/src/architecture/rules/budgets.rs +2 -1
  10. package/crates/naome-core/src/architecture/rules.rs +1 -1
  11. package/crates/naome-core/src/architecture.rs +3 -3
  12. package/crates/naome-core/src/intent/legacy.rs +1 -1
  13. package/crates/naome-core/src/intent/model.rs +27 -0
  14. package/crates/naome-core/src/intent/resolver.rs +3 -28
  15. package/crates/naome-core/src/intent/resolver_baseline.rs +1 -2
  16. package/crates/naome-core/src/intent/resolver_policy.rs +1 -2
  17. package/crates/naome-core/src/intent.rs +2 -1
  18. package/crates/naome-core/src/quality/adapter_ios.rs +3 -1
  19. package/crates/naome-core/src/quality/adapter_support.rs +32 -0
  20. package/crates/naome-core/src/quality/adapters.rs +8 -25
  21. package/crates/naome-core/src/quality/analysis_model.rs +33 -0
  22. package/crates/naome-core/src/quality/cache.rs +1 -1
  23. package/crates/naome-core/src/quality/checks/duplicate_blocks.rs +2 -1
  24. package/crates/naome-core/src/quality/checks/near_duplicates.rs +2 -1
  25. package/crates/naome-core/src/quality/mod.rs +1 -0
  26. package/crates/naome-core/src/quality/scanner/analysis.rs +1 -1
  27. package/crates/naome-core/src/quality/scanner.rs +1 -32
  28. package/crates/naome-core/src/quality/semantic/extract.rs +2 -1
  29. package/crates/naome-core/src/quality/structure/adapter_ios.rs +1 -1
  30. package/crates/naome-core/src/quality/structure/adapter_model.rs +23 -0
  31. package/crates/naome-core/src/quality/structure/adapters.rs +2 -23
  32. package/crates/naome-core/src/quality/structure/config.rs +2 -1
  33. package/crates/naome-core/src/quality/structure/defaults.rs +2 -2
  34. package/crates/naome-core/src/quality/structure/mod.rs +1 -0
  35. package/crates/naome-core/src/quality/structure/model.rs +6 -6
  36. package/crates/naome-core/src/repository_model.rs +6 -1
  37. package/crates/naome-core/src/route/builtin_checks.rs +1 -1
  38. package/crates/naome-core/src/route/builtin_require.rs +1 -1
  39. package/crates/naome-core/src/route/execution.rs +2 -34
  40. package/crates/naome-core/src/route/execution_baselines.rs +1 -1
  41. package/crates/naome-core/src/route/execution_model.rs +37 -0
  42. package/crates/naome-core/src/route/execution_support.rs +1 -1
  43. package/crates/naome-core/src/route/execution_tasks.rs +1 -1
  44. package/crates/naome-core/src/route/quality_gate.rs +0 -1
  45. package/crates/naome-core/src/route.rs +3 -1
  46. package/crates/naome-core/src/task_state/api.rs +5 -4
  47. package/crates/naome-core/src/task_state/commit_gate.rs +1 -1
  48. package/crates/naome-core/src/task_state/compact_proof.rs +2 -2
  49. package/crates/naome-core/src/task_state/completed_refresh.rs +0 -13
  50. package/crates/naome-core/src/task_state/completion.rs +13 -4
  51. package/crates/naome-core/src/task_state/mod.rs +1 -1
  52. package/crates/naome-core/src/task_state/progress.rs +1 -1
  53. package/crates/naome-core/src/task_state/proof.rs +1 -4
  54. package/crates/naome-core/src/task_state/proof_entry.rs +1 -1
  55. package/crates/naome-core/src/task_state/proof_model.rs +2 -18
  56. package/crates/naome-core/src/task_state/proof_sources.rs +2 -2
  57. package/crates/naome-core/src/task_state/proof_types.rs +17 -0
  58. package/crates/naome-core/src/task_state/shape.rs +1 -1
  59. package/crates/naome-core/src/task_state/task_diff_api.rs +1 -1
  60. package/crates/naome-core/src/verification_contract_policy.rs +2 -6
  61. package/crates/naome-core/src/workflow/agent/proof.rs +1 -1
  62. package/crates/naome-core/src/workflow/agent.rs +1 -1
  63. package/crates/naome-core/src/workflow/mod.rs +3 -1
  64. package/crates/naome-core/src/workflow/phase_inference.rs +1 -1
  65. package/crates/naome-core/src/workflow/phase_model.rs +22 -0
  66. package/crates/naome-core/src/workflow/phases.rs +1 -21
  67. package/native/darwin-arm64/naome +0 -0
  68. package/native/linux-x64/naome +0 -0
  69. package/package.json +1 -1
  70. package/crates/naome-core/src/task_state/reconcile.rs +0 -7
@@ -2,8 +2,6 @@ use std::collections::{BTreeMap, BTreeSet};
2
2
 
3
3
  use serde::{Deserialize, Serialize};
4
4
 
5
- use super::defaults::{default_changed_policy, default_debt_policy, default_structure_config};
6
-
7
5
  #[derive(Debug, Clone, Serialize, Deserialize)]
8
6
  #[serde(rename_all = "camelCase")]
9
7
  pub struct StructureLimits {
@@ -81,10 +79,12 @@ pub struct RepositoryStructureConfig {
81
79
  pub limits: StructureLimits,
82
80
  }
83
81
 
84
- impl Default for RepositoryStructureConfig {
85
- fn default() -> Self {
86
- default_structure_config()
87
- }
82
+ pub(super) fn default_changed_policy() -> String {
83
+ "block".to_string()
84
+ }
85
+
86
+ pub(super) fn default_debt_policy() -> String {
87
+ "report".to_string()
88
88
  }
89
89
 
90
90
  #[derive(Debug, Clone, Serialize)]
@@ -125,7 +125,12 @@ fn model_evidence_paths(model: &RepositoryModel) -> Vec<String> {
125
125
  .iter()
126
126
  .flat_map(|fact| fact.evidence.iter())
127
127
  .chain(model.roots.iter().flat_map(|root| root.evidence.iter()))
128
- .chain(model.entities.iter().flat_map(|entity| entity.evidence.iter()))
128
+ .chain(
129
+ model
130
+ .entities
131
+ .iter()
132
+ .flat_map(|entity| entity.evidence.iter()),
133
+ )
129
134
  .chain(model.path_facts.iter().map(|fact| &fact.path))
130
135
  .chain(
131
136
  model
@@ -4,7 +4,7 @@ use crate::harness_health::{validate_harness_health, HarnessHealthOptions};
4
4
  use crate::models::NaomeError;
5
5
  use crate::quality::{check_repository_quality, check_semantic_legacy, QualityMode};
6
6
  use crate::route::git_ops::{command_output, git_output};
7
- use crate::route::quality_gate::QualityCheck;
7
+ use crate::route::quality_gate_config::QualityCheck;
8
8
  use crate::task_state::{validate_task_state, TaskStateMode, TaskStateOptions};
9
9
  use crate::verification_contract::validate_verification_contract;
10
10
 
@@ -1,6 +1,6 @@
1
1
  use crate::models::NaomeError;
2
2
 
3
- use super::quality_gate::QualityCheck;
3
+ use super::quality_gate_config::QualityCheck;
4
4
 
5
5
  pub(super) fn require_builtin_quality_check_any(
6
6
  check_id: &str,
@@ -1,7 +1,6 @@
1
- use std::path::{Path, PathBuf};
1
+ use std::path::Path;
2
2
 
3
3
  use crate::intent::IntentDecision;
4
- use crate::journal::TaskJournalEntry;
5
4
  use crate::models::{Decision, NaomeError};
6
5
 
7
6
  use super::execution_baselines::{
@@ -9,41 +8,10 @@ use super::execution_baselines::{
9
8
  baseline_harness_refresh_then_completed_task, baseline_harness_refresh_then_worktree,
10
9
  baseline_pure_harness_refresh, baseline_setup, commit_upgrade_baseline,
11
10
  };
11
+ use super::execution_model::RouteExecution;
12
12
  use super::execution_tasks::{
13
13
  commit_user_diff, create_task_worktree, journal_external_baseline_if_needed,
14
14
  };
15
- use super::RouteWorktree;
16
-
17
- pub(super) struct RouteExecution {
18
- pub(super) mutation_performed: bool,
19
- pub(super) executed_actions: Vec<String>,
20
- pub(super) journal_entry: Option<TaskJournalEntry>,
21
- pub(super) user_message: String,
22
- pub(super) task_root: PathBuf,
23
- pub(super) worktree: Option<RouteWorktree>,
24
- pub(super) route_allowed: bool,
25
- pub(super) human_options: Vec<String>,
26
- }
27
-
28
- impl RouteExecution {
29
- pub(super) fn from_intent(root: &Path, intent: &IntentDecision) -> Self {
30
- Self {
31
- mutation_performed: false,
32
- executed_actions: Vec::new(),
33
- journal_entry: None,
34
- user_message: intent.user_message.clone(),
35
- task_root: root.to_path_buf(),
36
- worktree: None,
37
- route_allowed: intent.allowed,
38
- human_options: intent.human_options.clone(),
39
- }
40
- }
41
-
42
- pub(super) fn mark_action(&mut self, action: &str) {
43
- self.mutation_performed = true;
44
- self.executed_actions.push(action.to_string());
45
- }
46
- }
47
15
 
48
16
  pub(super) fn execute_route_policy(
49
17
  root: &Path,
@@ -5,7 +5,7 @@ use crate::task_state::{
5
5
  completed_task_harness_refresh_diff, harness_refresh_diff, harness_refresh_with_unrelated_diff,
6
6
  };
7
7
 
8
- use super::execution::RouteExecution;
8
+ use super::execution_model::RouteExecution;
9
9
  use super::execution_support::{commit_completed_task, commit_harness_paths, set_created_worktree};
10
10
  use super::git_ops::{git_add_all, git_commit, git_head};
11
11
  use super::worktree::{
@@ -0,0 +1,37 @@
1
+ use std::path::{Path, PathBuf};
2
+
3
+ use crate::intent::IntentDecision;
4
+ use crate::journal::TaskJournalEntry;
5
+
6
+ use super::RouteWorktree;
7
+
8
+ pub(super) struct RouteExecution {
9
+ pub(super) mutation_performed: bool,
10
+ pub(super) executed_actions: Vec<String>,
11
+ pub(super) journal_entry: Option<TaskJournalEntry>,
12
+ pub(super) user_message: String,
13
+ pub(super) task_root: PathBuf,
14
+ pub(super) worktree: Option<RouteWorktree>,
15
+ pub(super) route_allowed: bool,
16
+ pub(super) human_options: Vec<String>,
17
+ }
18
+
19
+ impl RouteExecution {
20
+ pub(super) fn from_intent(root: &Path, intent: &IntentDecision) -> Self {
21
+ Self {
22
+ mutation_performed: false,
23
+ executed_actions: Vec::new(),
24
+ journal_entry: None,
25
+ user_message: intent.user_message.clone(),
26
+ task_root: root.to_path_buf(),
27
+ worktree: None,
28
+ route_allowed: intent.allowed,
29
+ human_options: intent.human_options.clone(),
30
+ }
31
+ }
32
+
33
+ pub(super) fn mark_action(&mut self, action: &str) {
34
+ self.mutation_performed = true;
35
+ self.executed_actions.push(action.to_string());
36
+ }
37
+ }
@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
3
3
  use crate::journal::append_task_journal;
4
4
  use crate::models::{Decision, NaomeError};
5
5
 
6
- use super::execution::RouteExecution;
6
+ use super::execution_model::RouteExecution;
7
7
  use super::git_ops::{git_add_completed_task_paths, git_commit, git_head, git_stage_only_paths};
8
8
  use super::RouteWorktree;
9
9
 
@@ -4,7 +4,7 @@ use crate::git;
4
4
  use crate::journal::append_task_journal;
5
5
  use crate::models::{Decision, NaomeError};
6
6
 
7
- use super::execution::RouteExecution;
7
+ use super::execution_model::RouteExecution;
8
8
  use super::execution_support::{initial_decision_completed, set_created_worktree};
9
9
  use super::git_ops::{git_commit, git_head, git_stage_only_paths};
10
10
  use super::quality_gate::run_user_diff_quality_gate;
@@ -4,7 +4,6 @@ use crate::git;
4
4
  use crate::models::NaomeError;
5
5
 
6
6
  use super::builtin_checks::run_quality_check;
7
- pub(super) use super::quality_gate_config::QualityCheck;
8
7
  use super::quality_gate_config::{user_diff_check_ids, verification_checks};
9
8
  use super::quality_gate_snapshot::{
10
9
  changed_path_snapshot, read_head_verification, sorted_path_set,
@@ -12,6 +12,7 @@ mod builtin_require;
12
12
  mod context;
13
13
  mod execution;
14
14
  mod execution_baselines;
15
+ mod execution_model;
15
16
  mod execution_support;
16
17
  mod execution_tasks;
17
18
  mod git_ops;
@@ -26,7 +27,8 @@ use self::context::{
26
27
  can_create_task, discarded_actions, required_context_for_intent, required_context_for_route,
27
28
  winning_rule, would_mutate,
28
29
  };
29
- use self::execution::{execute_route_policy, RouteExecution};
30
+ use self::execution::execute_route_policy;
31
+ use self::execution_model::RouteExecution;
30
32
 
31
33
  const MAX_NAOME_TASK_WORKTREES: usize = 25;
32
34
 
@@ -5,12 +5,13 @@ use serde_json::Value;
5
5
  use crate::models::NaomeError;
6
6
  use crate::task_ledger::{read_task_state_projection, validate_task_state_projection_is_current};
7
7
 
8
- use super::completion::{
9
- validate_admission, validate_commit_gate, validate_complete_task, validate_progress,
10
- };
8
+ use super::admission::validate_admission;
9
+ use super::commit_gate::validate_commit_gate;
10
+ use super::completion::validate_complete_task;
11
11
  use super::diff::validate_human_review_blocker_paths;
12
+ use super::progress::validate_progress;
12
13
  use super::proof::validate_proof_evidence_covers_changed_paths;
13
- use super::reconcile::validate_push_gate;
14
+ use super::push_gate::validate_push_gate;
14
15
  use super::shape::{
15
16
  format_blocker, validate_active_task, validate_active_task_references, validate_blocker,
16
17
  validate_idle_state, validate_pending_upgrade, validate_task_state_shape,
@@ -7,7 +7,7 @@ use super::diff::task_diff_from_entries;
7
7
  use super::git_io::read_git_staged_changed_entries;
8
8
  use super::process_guard::{validate_no_active_processes, ProcessGate};
9
9
  use super::progress::{validate_init_complete, validate_upgrade_complete};
10
- use super::reconcile::{
10
+ use super::repair::{
11
11
  is_deterministic_harness_refresh_diff, is_harness_repair_diff,
12
12
  is_install_or_upgrade_baseline_diff,
13
13
  };
@@ -5,11 +5,11 @@ use serde_json::Value;
5
5
 
6
6
  use crate::models::NaomeError;
7
7
 
8
- use super::proof::{
8
+ use super::evidence::{
9
9
  validate_control_state_paths, validate_evidence_array, validate_evidence_paths,
10
10
  };
11
- use super::proof_model::{CanonicalProof, VerificationDefaults};
12
11
  use super::proof_sources::read_path_sets;
12
+ use super::proof_types::{CanonicalProof, VerificationDefaults};
13
13
  use super::util::{is_iso_datetime, require_string};
14
14
 
15
15
  pub(super) fn compact_proofs(
@@ -10,19 +10,6 @@ use super::types::{
10
10
  TaskStateMode, TaskStateOptions,
11
11
  };
12
12
  use super::util::{matches_any_pattern, string_array};
13
- pub(super) fn add_completed_task_diff_notice(
14
- root: &Path,
15
- notices: &mut Vec<String>,
16
- ) -> Result<(), NaomeError> {
17
- let changed_paths = read_git_changed_paths(root)?;
18
- if changed_paths.is_empty() {
19
- return Ok(());
20
- }
21
-
22
- notices.push(format!("Task is complete and verified. Changed paths: {}. NAOME intent can baseline it automatically before the next distinct task; only surface human choices when intent blocks or the user explicitly asks to review, revise, cancel, or commit.", changed_paths.join(", ")));
23
- Ok(())
24
- }
25
-
26
13
  pub fn completed_task_harness_refresh_diff(
27
14
  root: &Path,
28
15
  ) -> Result<Option<CompletedTaskHarnessRefreshDiff>, NaomeError> {
@@ -3,14 +3,10 @@ use std::path::Path;
3
3
 
4
4
  use serde_json::Value;
5
5
 
6
- pub(super) use super::admission::validate_admission;
7
- pub(super) use super::commit_gate::validate_commit_gate;
8
6
  use super::diff::validate_changed_entries;
9
7
  use super::git_io::read_git_changed_entries;
10
8
  use super::process_guard::{validate_no_active_processes, ProcessGate};
11
- pub(super) use super::progress::validate_progress;
12
9
  use super::proof::{validate_proof_evidence_covers_changed_entries, validate_proof_results};
13
- use super::reconcile::add_completed_task_diff_notice;
14
10
  use super::shape::{read_verification_check_ids, validate_required_check_ids};
15
11
  use super::types::ChangedEntry;
16
12
  use crate::models::NaomeError;
@@ -58,6 +54,19 @@ pub(super) fn validate_complete_task(
58
54
  Ok(())
59
55
  }
60
56
 
57
+ fn add_completed_task_diff_notice(
58
+ root: &Path,
59
+ notices: &mut Vec<String>,
60
+ ) -> Result<(), NaomeError> {
61
+ let changed_paths = super::git_io::read_git_changed_paths(root)?;
62
+ if changed_paths.is_empty() {
63
+ return Ok(());
64
+ }
65
+
66
+ notices.push(format!("Task is complete and verified. Changed paths: {}. NAOME intent can baseline it automatically before the next distinct task; only surface human choices when intent blocks or the user explicitly asks to review, revise, cancel, or commit.", changed_paths.join(", ")));
67
+ Ok(())
68
+ }
69
+
61
70
  pub(super) fn validate_complete_task_against_entries(
62
71
  active_task: &Value,
63
72
  root: &Path,
@@ -18,8 +18,8 @@ mod proof;
18
18
  mod proof_entry;
19
19
  mod proof_model;
20
20
  mod proof_sources;
21
+ mod proof_types;
21
22
  mod push_gate;
22
- mod reconcile;
23
23
  mod repair;
24
24
  mod shape;
25
25
  mod task_diff_api;
@@ -8,7 +8,7 @@ use crate::repository_model_drift;
8
8
  use super::diff::validate_changed_paths;
9
9
  use super::git_io::read_git_changed_paths;
10
10
  use super::human_review_state::validate_human_review_state;
11
- use super::reconcile::format_dirty_diff_admission_blocker;
11
+ use super::push_gate::format_dirty_diff_admission_blocker;
12
12
  use super::shape::{
13
13
  format_blocker, validate_active_task, validate_active_task_references, validate_blocker,
14
14
  validate_pending_upgrade,
@@ -6,10 +6,7 @@ use serde_json::Value;
6
6
  use crate::models::NaomeError;
7
7
 
8
8
  use super::diff::task_diff_from_entries;
9
- pub(super) use super::evidence::{
10
- evidence_entry_path, validate_control_state_paths, validate_control_state_patterns,
11
- validate_evidence_array, validate_evidence_paths,
12
- };
9
+ use super::evidence::evidence_entry_path;
13
10
  use super::git_io::read_git_changed_entries;
14
11
  use super::proof_entry::validate_proof_result;
15
12
  use super::proof_model::canonical_proofs;
@@ -5,7 +5,7 @@ use serde_json::Value;
5
5
 
6
6
  use crate::models::NaomeError;
7
7
 
8
- use super::proof::{
8
+ use super::evidence::{
9
9
  validate_control_state_paths, validate_evidence_array, validate_evidence_paths,
10
10
  };
11
11
  use super::util::{is_iso_datetime, require_string};
@@ -1,27 +1,11 @@
1
1
  use std::path::Path;
2
2
 
3
- use serde_json::Value;
4
-
5
3
  use crate::models::NaomeError;
6
4
 
7
5
  use super::compact_proof::compact_proofs;
8
6
  use super::proof_sources::{check_id_from_proof, read_verification_defaults};
9
-
10
- #[derive(Debug, Clone)]
11
- pub(crate) struct CanonicalProof {
12
- pub(crate) check_id: String,
13
- pub(crate) command: String,
14
- pub(crate) cwd: String,
15
- pub(crate) exit_code: i64,
16
- pub(crate) checked_at: String,
17
- pub(crate) evidence: Vec<Value>,
18
- }
19
-
20
- #[derive(Debug, Clone)]
21
- pub(super) struct VerificationDefaults {
22
- pub(super) command: String,
23
- pub(super) cwd: String,
24
- }
7
+ use super::proof_types::CanonicalProof;
8
+ use serde_json::Value;
25
9
 
26
10
  pub(crate) fn canonical_proofs(
27
11
  active_task: &Value,
@@ -5,10 +5,10 @@ use serde_json::Value;
5
5
 
6
6
  use crate::models::NaomeError;
7
7
 
8
- use super::proof::{
8
+ use super::evidence::{
9
9
  validate_control_state_paths, validate_evidence_array, validate_evidence_paths,
10
10
  };
11
- use super::proof_model::VerificationDefaults;
11
+ use super::proof_types::VerificationDefaults;
12
12
  use super::util::read_json;
13
13
 
14
14
  pub(super) fn read_path_sets(
@@ -0,0 +1,17 @@
1
+ use serde_json::Value;
2
+
3
+ #[derive(Debug, Clone)]
4
+ pub(crate) struct CanonicalProof {
5
+ pub(crate) check_id: String,
6
+ pub(crate) command: String,
7
+ pub(crate) cwd: String,
8
+ pub(crate) exit_code: i64,
9
+ pub(crate) checked_at: String,
10
+ pub(crate) evidence: Vec<Value>,
11
+ }
12
+
13
+ #[derive(Debug, Clone)]
14
+ pub(super) struct VerificationDefaults {
15
+ pub(super) command: String,
16
+ pub(super) cwd: String,
17
+ }
@@ -1,6 +1,6 @@
1
1
  use serde_json::Value;
2
2
 
3
- use super::proof::validate_control_state_patterns;
3
+ use super::evidence::validate_control_state_patterns;
4
4
  pub(super) use super::task_records::{
5
5
  format_blocker, validate_blocker, validate_human_review, validate_prompt_record,
6
6
  validate_revisions,
@@ -8,7 +8,7 @@ use crate::models::NaomeError;
8
8
 
9
9
  use super::completion::validate_complete_task_against_entries;
10
10
  use super::git_io::{read_git_changed_entries, read_git_changed_paths};
11
- use super::reconcile::{
11
+ use super::repair::{
12
12
  is_packaged_machine_owned_path, is_repair_archive_path, is_safe_harness_refresh_path,
13
13
  };
14
14
  use super::shape::{
@@ -17,9 +17,7 @@ pub(crate) fn validate_semantic_quality_gate_policy(
17
17
  }
18
18
 
19
19
  for (index, change_type) in change_types.iter().enumerate() {
20
- let Some(required_checks) = change_type
21
- .get("requiredChecks")
22
- .and_then(Value::as_array)
20
+ let Some(required_checks) = change_type.get("requiredChecks").and_then(Value::as_array)
23
21
  else {
24
22
  continue;
25
23
  };
@@ -46,7 +44,5 @@ pub(crate) fn validate_semantic_quality_gate_policy(
46
44
  }
47
45
 
48
46
  fn contains_string(values: &[Value], expected: &str) -> bool {
49
- values
50
- .iter()
51
- .any(|value| value.as_str() == Some(expected))
47
+ values.iter().any(|value| value.as_str() == Some(expected))
52
48
  }
@@ -4,7 +4,7 @@ use crate::models::NaomeError;
4
4
 
5
5
  use super::support::changed_paths;
6
6
  use crate::workflow::agent_types::ProofPlan;
7
- use crate::workflow::phases::{verification_phase_plan, CommandCheckResult};
7
+ use crate::workflow::{verification_phase_plan, CommandCheckResult};
8
8
 
9
9
  pub fn proof_plan_for_task(
10
10
  root: &Path,
@@ -11,7 +11,7 @@ use std::path::Path;
11
11
  use crate::models::NaomeError;
12
12
 
13
13
  use super::agent_types::AgentRunPlan;
14
- use super::phases::CommandCheckResult;
14
+ use super::phase_model::CommandCheckResult;
15
15
 
16
16
  pub use capability::repository_capability_graph;
17
17
  pub use context_delta::context_delta_report;
@@ -7,6 +7,7 @@ mod integrity_support;
7
7
  mod mutation;
8
8
  mod output;
9
9
  mod phase_inference;
10
+ mod phase_model;
10
11
  mod phases;
11
12
  mod policy;
12
13
  mod processes;
@@ -25,7 +26,8 @@ pub use doctor::{doctor_report, DoctorReport, DoctorSection, RepositoryPolicySec
25
26
  pub use integrity::{refresh_integrity, IntegrityRefreshReport};
26
27
  pub use mutation::classify_mutations;
27
28
  pub use output::{summarize_command_output, CommandOutputSummary};
28
- pub use phases::{verification_phase_plan, CommandCheckResult, VerificationPhasePlan};
29
+ pub use phase_model::CommandCheckResult;
30
+ pub use phases::{verification_phase_plan, VerificationPhasePlan};
29
31
  pub use policy::{safe_rg_args, validate_read_boundaries, validate_search_command};
30
32
  pub use processes::{tracked_process_report, ProcessReport};
31
33
  pub use types::{MutationClassification, ReadActivity, WorkflowFinding};
@@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet};
2
2
 
3
3
  use serde_json::Value;
4
4
 
5
- use super::phases::{CheckDefinition, PhaseDefinition};
5
+ use super::phase_model::{CheckDefinition, PhaseDefinition};
6
6
 
7
7
  pub(super) fn infer_phases(
8
8
  verification: &Value,
@@ -0,0 +1,22 @@
1
+ use serde::{Deserialize, Serialize};
2
+
3
+ #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
4
+ #[serde(rename_all = "camelCase")]
5
+ pub struct CommandCheckResult {
6
+ pub check_id: String,
7
+ pub exit_code: i32,
8
+ }
9
+
10
+ #[derive(Debug, Clone)]
11
+ pub(super) struct CheckDefinition {
12
+ pub(super) id: String,
13
+ pub(super) command: String,
14
+ pub(super) cost: String,
15
+ }
16
+
17
+ #[derive(Debug, Clone)]
18
+ pub(super) struct PhaseDefinition {
19
+ pub(super) id: String,
20
+ pub(super) order: u32,
21
+ pub(super) check_ids: Vec<String>,
22
+ }
@@ -8,13 +8,7 @@ use serde_json::Value;
8
8
  use crate::models::NaomeError;
9
9
 
10
10
  use super::phase_inference::infer_phases;
11
-
12
- #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
13
- #[serde(rename_all = "camelCase")]
14
- pub struct CommandCheckResult {
15
- pub check_id: String,
16
- pub exit_code: i32,
17
- }
11
+ use super::phase_model::{CheckDefinition, CommandCheckResult, PhaseDefinition};
18
12
 
19
13
  #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
20
14
  #[serde(rename_all = "camelCase")]
@@ -35,20 +29,6 @@ pub struct VerificationPhaseStatus {
35
29
  pub blocked_by: Vec<String>,
36
30
  }
37
31
 
38
- #[derive(Debug, Clone)]
39
- pub(super) struct CheckDefinition {
40
- pub(super) id: String,
41
- pub(super) command: String,
42
- pub(super) cost: String,
43
- }
44
-
45
- #[derive(Debug, Clone)]
46
- pub(super) struct PhaseDefinition {
47
- pub(super) id: String,
48
- pub(super) order: u32,
49
- pub(super) check_ids: Vec<String>,
50
- }
51
-
52
32
  pub fn verification_phase_plan(
53
33
  root: &Path,
54
34
  completed: &[CommandCheckResult],
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lamentis/naome",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "description": "Native-first CLI for the NAOME agent harness.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,7 +0,0 @@
1
- pub(super) use super::completed_refresh::add_completed_task_diff_notice;
2
- pub(super) use super::push_gate::{format_dirty_diff_admission_blocker, validate_push_gate};
3
- pub(super) use super::repair::{
4
- is_deterministic_harness_refresh_diff, is_harness_repair_diff,
5
- is_install_or_upgrade_baseline_diff, is_packaged_machine_owned_path, is_repair_archive_path,
6
- is_safe_harness_refresh_path,
7
- };