vectie/moontown/core does not have a README file

    BookProvider

    pub(open) trait BookProvider {
    fn books(self : Self) -> Array[BookRef]
    }

    AssignmentPlan

    pub struct AssignmentPlan {
    task_id : String
    worker_id : String
    book_id : String
    isolation : IsolationMode
    reason : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AssignmentPlan::new

    fn AssignmentPlan::new(task_id~ : String, worker_id~ : String, book_id~ : String, isolation~ : IsolationMode, reason~ : String) -> AssignmentPlan

    BookRef

    pub struct BookRef {
    id : String
    name : String
    purpose : String
    workspace_root : String
    memory_scope : MemoryScope
    tags : Array[String]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for BookRef

    BookRef::new

    fn BookRef::new(id~ : String, name~ : String, purpose~ : String, workspace_root~ : String, memory_scope? : MemoryScope, tags? : Array[String]) -> BookRef

    IsolationMode

    pub(all) enum IsolationMode {
    SharedWorkspace
    BookWorkspace
    Worktree
    Sandboxed
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    MemoryScope

    pub(all) enum MemoryScope {
    SharedTown
    BookPrivate
    TaskEphemeral
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for MemoryScope

    StandingGoal

    pub struct StandingGoal {
    id : String
    title : String
    prompt : String
    target_book_id : String?
    cadence_ticks : Int
    next_due_tick : Int
    last_run_tick : Int?
    enabled : Bool
    source_policy : String
    quality_threshold : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    StandingGoal::is_due

    fn StandingGoal::is_due(self : StandingGoal, tick : Int) -> Bool

    StandingGoal::mark_dispatched

    fn StandingGoal::mark_dispatched(self : StandingGoal, tick : Int) -> StandingGoal

    StandingGoal::mark_watcher_decision

    fn StandingGoal::mark_watcher_decision(self : StandingGoal, tick : Int, decision : WatcherDecisionKind, no_change_streak? : Int) -> StandingGoal

    StandingGoal::new

    fn StandingGoal::new(id~ : String, title~ : String, prompt~ : String, target_book_id? : String?, cadence_ticks? : Int, next_due_tick? : Int, last_run_tick? : Int?, enabled? : Bool, source_policy? : String, quality_threshold? : Int) -> StandingGoal

    StandingGoal::next_due_after_watcher_decision

    fn StandingGoal::next_due_after_watcher_decision(self : StandingGoal, tick : Int, decision : WatcherDecisionKind, no_change_streak? : Int) -> Int

    StaticBookProvider

    pub struct StaticBookProvider {
    entries : Array[BookRef]
    } derive(Eq,
    Debug
    )

    StaticBookProvider::new

    TaskExecutionRecord

    pub struct TaskExecutionRecord {
    task_id : String
    book_id : String
    packet_id : String
    packet_path : String
    proposal_id : String?
    run_id : String?
    status : TaskExecutionStatus
    summary : String
    output_contract : String
    context_pages : Array[String]
    skill_paths : Array[String]
    last_command : String?
    assigned_worker_id : String?
    attempt : Int
    heartbeat_tick : Int
    stale_after_tick : Int
    next_retry_tick : Int?
    result_decision : String
    requires_review : Bool
    notify_town : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    TaskExecutionRecord::new

    fn TaskExecutionRecord::new(task_id~ : String, book_id~ : String, packet_id~ : String, packet_path~ : String, proposal_id? : String?, run_id? : String?, status~ : TaskExecutionStatus, summary~ : String, output_contract~ : String, context_pages? : Array[String], skill_paths? : Array[String], last_command? : String?, assigned_worker_id? : String?, attempt? : Int, heartbeat_tick? : Int, stale_after_tick? : Int, next_retry_tick? : Int?, result_decision? : String, requires_review? : Bool, notify_town? : Bool) -> TaskExecutionRecord

    TaskExecutionStatus

    pub(all) enum TaskExecutionStatus {
    PacketReady
    ProposalImported
    RunConfirmed
    Running
    AwaitingPersistence
    ReviewQueued
    Completed
    Stale
    Failed
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    TownConfig

    pub struct TownConfig {
    id : String
    name : String
    heartbeat_seconds : Int
    max_concurrent_tasks : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for TownConfig

    TownConfig::new

    fn TownConfig::new(id~ : String, name~ : String, heartbeat_seconds? : Int, max_concurrent_tasks? : Int) -> TownConfig

    TownEvent

    pub struct TownEvent {
    id : String
    kind : String
    detail : String
    related_task_id : String?
    related_book_id : String?
    related_proposal_id : String?
    related_run_id : String?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for TownEvent

    TownEvent::new

    fn TownEvent::new(id~ : String, kind~ : String, detail~ : String, related_task_id? : String?, related_book_id? : String?, related_proposal_id? : String?, related_run_id? : String?) -> TownEvent

    TownState

    impl Show for TownState

    TownState::enqueue_task

    fn TownState::enqueue_task(self : TownState, task : TownTask) -> Unit

    TownState::record_event

    fn TownState::record_event(self : TownState, event : TownEvent) -> Unit

    TownState::register_book

    fn TownState::register_book(self : TownState, book : BookRef) -> Unit

    TownState::register_execution

    fn TownState::register_execution(self : TownState, execution : TaskExecutionRecord) -> Unit

    TownState::register_worker

    fn TownState::register_worker(self : TownState, worker : WorkerRef) -> Unit

    TownState::replace_execution

    fn TownState::replace_execution(self : TownState, execution : TaskExecutionRecord) -> Unit

    TownState::replace_task

    fn TownState::replace_task(self : TownState, task : TownTask) -> Unit

    TownState::set_worker_status

    fn TownState::set_worker_status(self : TownState, worker_id : String, status : WorkerStatus) -> Unit

    TownTask

    pub struct TownTask {
    id : String
    book_id : String
    title : String
    prompt : String
    domain : WorkDomain
    required_role : WorkerRole?
    required_capabilities : Array[String]
    status : TownTaskStatus
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for TownTask

    TownTask::new

    fn TownTask::new(id~ : String, book_id~ : String, title~ : String, prompt~ : String, domain~ : WorkDomain, required_role? : WorkerRole?, required_capabilities? : Array[String], status? : TownTaskStatus) -> TownTask

    TownTaskStatus

    pub(all) enum TownTaskStatus {
    Pending
    Planned
    Assigned
    Running
    Blocked
    Done
    Failed
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WatcherDecisionKind

    pub(all) enum WatcherDecisionKind {
    Update
    NoChange
    NeedsReview
    Failed
    Deferred
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WatcherRunRecord

    pub struct WatcherRunRecord {
    goal_id : String
    tick : Int
    target_book_id : String
    decision : WatcherDecisionKind
    delta_score : Int
    new_source_count : Int
    detail : String
    task_id : String?
    run_id : String?
    next_due_tick : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WatcherRunRecord::new

    fn WatcherRunRecord::new(goal_id~ : String, tick~ : Int, target_book_id~ : String, decision~ : WatcherDecisionKind, delta_score? : Int, new_source_count? : Int, detail? : String, task_id? : String?, run_id? : String?, next_due_tick? : Int) -> WatcherRunRecord

    WorkDomain

    pub(all) enum WorkDomain {
    Coding
    Finance
    Research
    Operations
    SocialExperiment
    Custom(String)
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for WorkDomain

    WorkerRef

    pub struct WorkerRef {
    id : String
    name : String
    book_id : String
    role : WorkerRole
    capabilities : Array[String]
    status : WorkerStatus
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for WorkerRef

    WorkerRef::new

    fn WorkerRef::new(id~ : String, name~ : String, book_id~ : String, role~ : WorkerRole, capabilities? : Array[String], status? : WorkerStatus) -> WorkerRef

    WorkerRole

    pub(all) enum WorkerRole {
    Harness
    Planner
    Specialist
    Reviewer
    MemoryKeeper
    Watcher
    Operator
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    impl Show for WorkerRole

    WorkerStatus

    pub(all) enum WorkerStatus {
    Idle
    Running
    Waiting
    Blocked
    Offline
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    absolute_path_from_base

    fn absolute_path_from_base(base : String, path : String) -> String

    active_work_execution_status

    fn active_work_execution_status(status : TaskExecutionStatus) -> Bool

    copy_task_with_status

    fn copy_task_with_status(task : TownTask, status : TownTaskStatus) -> TownTask

    empty_state

    fn empty_state(config : TownConfig) -> TownState

    execution_status_rank

    fn execution_status_rank(status : TaskExecutionStatus) -> Int

    external_execution_stale_window_ticks

    fn external_execution_stale_window_ticks() -> Int

    find_execution

    fn find_execution(town : TownState, task_id : String) -> TaskExecutionRecord?

    find_task

    fn find_task(town : TownState, task_id : String) -> TownTask?

    has_active_work_executions

    fn has_active_work_executions(state : TownState) -> Bool

    has_live_executions

    fn has_live_executions(state : TownState) -> Bool

    has_retry_pending_executions

    fn has_retry_pending_executions(state : TownState, tick : Int) -> Bool

    json_object_copy

    fn json_object_copy(value : Json?) -> Map[String, Json]

    live_execution_status

    fn live_execution_status(status : TaskExecutionStatus) -> Bool

    live_external_execution_count

    fn live_external_execution_count(state : TownState) -> Int

    max_live_external_executions

    fn max_live_external_executions() -> Int

    no_run_id_live_execution_stale

    fn no_run_id_live_execution_stale(execution : TaskExecutionRecord, tick : Int) -> Bool

    pollable_execution_status

    fn pollable_execution_status(status : TaskExecutionStatus) -> Bool

    polled_execution_stale_window_ticks

    fn polled_execution_stale_window_ticks(execution : TaskExecutionRecord) -> Int

    schedulable_task_status

    fn schedulable_task_status(status : TownTaskStatus) -> Bool

    standing_goal_registry_find

    fn standing_goal_registry_find(goals : Array[StandingGoal], goal_id : String) -> StandingGoal?

    standing_goal_registry_merge_updates

    fn standing_goal_registry_merge_updates(latest : Array[StandingGoal], updated : Array[StandingGoal]) -> Array[StandingGoal]

    standing_goal_registry_replace_or_append

    fn standing_goal_registry_replace_or_append(goals : Array[StandingGoal], replacement : StandingGoal) -> Array[StandingGoal]

    terminal_execution_status

    fn terminal_execution_status(status : TaskExecutionStatus) -> Bool

    tick_from_task_id

    fn tick_from_task_id(task_id : String) -> Int

    town_task_status_for_execution

    fn town_task_status_for_execution(status : TaskExecutionStatus) -> TownTaskStatus

    upsert_moonclaw_job_profile_json

    fn upsert_moonclaw_job_profile_json(config : Json, profile_id : String, profile : Json) -> Json

    upsert_nested_object_entry_json

    fn upsert_nested_object_entry_json(config : Json, section_key~ : String, collection_key~ : String, entry_key~ : String, entry~ : Json) -> Json