Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Mattbusel/tokio-prompt-orchestrator
/ functions
Functions
3,370 in github.com/Mattbusel/tokio-prompt-orchestrator
⨍
Functions
3,370
◇
Types & classes
391
↓ 600 callers
Method
clone
(&self)
src/distributed/nats.rs:346
↓ 205 callers
Method
insert
( &self, prompt: &str, response: Option<String>, )
src/intelligence/lexical_dedup.rs:371
↓ 138 callers
Method
collect
(inner: &Arc<BusInner>)
src/self_tune/telemetry_bus.rs:522
↓ 127 callers
Method
push
Push a request onto the queue with the given priority. # Arguments `priority` — Relative importance; see [`Priority`]. `request` — The [`PromptReque
src/enhanced/priority.rs:218
↓ 125 callers
Method
get
Get cached value if exists and not expired # Panics This function does not panic.
src/enhanced/cache.rs:174
↓ 97 callers
Method
len
Get current queue size
src/enhanced/priority.rs:272
↓ 91 callers
Method
push
Push a dropped request into the queue. Evicts the oldest entry if full. # Panics This function does not panic. If the internal mutex is poisoned it
src/lib.rs:480
↓ 85 callers
Method
register
Register a plugin by its manifest. # Errors - [`PluginError::PluginAlreadyRegistered`] if the ID already exists. - [`PluginError::InvalidManifest`] i
src/evolution/plugin.rs:161
↓ 78 callers
Function
spawn_pipeline
Spawn the complete 5-stage pipeline Returns handles to all tasks and the input sender. Caller should send PromptRequests to input_tx and await handle
src/stages.rs:253
↓ 75 callers
Method
tick
Updates the app state with one tick of mock data. # Arguments `app` - Mutable reference to the app state to update.
src/tui/metrics.rs:57
↓ 69 callers
Method
record
Record a new feedback entry. The entry's score is clamped to `[0.0, 1.0]` before storage. If the collector is at capacity, the oldest entry is evicte
src/intelligence/feedback.rs:154
↓ 65 callers
Method
create_snapshot
Create and store a new configuration snapshot. The version number is auto-incremented. If the store is at capacity, the oldest snapshot is evicted be
src/self_tune/snapshot.rs:280
↓ 61 callers
Method
get
Retrieve a snapshot by its version number. # Arguments `version` - The version number to look up. # Returns A clone of the matching [`ConfigSnapsh
src/self_tune/snapshot.rs:324
↓ 60 callers
Function
params
Helper: build a parameter map from slice of pairs.
src/self_tune/snapshot.rs:1018
↓ 57 callers
Method
len
(&self)
src/self_tune/telemetry_bus.rs:181
↓ 56 callers
Method
push
(&mut self, snap: TelemetrySnapshot)
src/self_tune/telemetry_bus.rs:159
↓ 54 callers
Method
load
(&self)
src/self_tune/actuator.rs:261
↓ 50 callers
Method
claim_next
Atomically claim the next available task by priority. Writes a lock file `{lock_dir}/{task_id}.claimed` with the agent ID. If a lock file already exi
src/coordination/queue.rs:222
↓ 44 callers
Function
client
()
tests/web_api_tests.rs:57
↓ 44 callers
Method
tick
Advances the mock story by one tick (1 second). Updates all state fields based on the current story phase. # Panics This function never panics.
src/bin/dashboard.rs:415
↓ 42 callers
Method
call
Execute a fallible async operation through the circuit breaker. If the circuit is `Open` the operation is **not called** and `Err(CircuitBreakerError
src/enhanced/circuit_breaker.rs:210
↓ 42 callers
Method
len
Return the number of entries currently in the queue. # Panics This function does not panic. If the internal mutex is poisoned it is recovered automa
src/lib.rs:521
↓ 42 callers
Function
spawn_server
Spawn a web API server in the background and return its base URL plus the pipeline receiver so tests can verify forwarded requests.
tests/web_api_tests.rs:39
↓ 41 callers
Method
is_empty
Check if queue is empty
src/enhanced/priority.rs:277
↓ 40 callers
Method
infer
(&self, prompt: &str)
src/worker.rs:205
↓ 40 callers
Method
ingest
Ingest a single metric value, run all enabled detectors, and return any anomalies found. The value is appended to the metric's rolling window (bounde
src/self_tune/anomaly.rs:278
↓ 36 callers
Method
is_empty
Return `true` if the queue contains no entries. # Panics This function does not panic. If the internal mutex is poisoned it is recovered automatical
src/lib.rs:538
↓ 36 callers
Method
record_cost
Record a cost entry from a completed inference request. If the number of entries exceeds `max_entries`, the oldest entry is removed to maintain bound
src/self_tune/cost.rs:292
↓ 35 callers
Method
check_and_register
Atomically check whether a request is new, in-progress, or cached, and register it as in-progress if it is new. Uses `DashMap::entry()` for a compare
src/enhanced/dedup.rs:363
↓ 34 callers
Function
init_metrics
Initialise all Prometheus metrics and register them with a private registry. Must be called once at process startup before any pipeline stage is spaw
src/metrics.rs:108
↓ 34 callers
Method
route
Route a prompt to the appropriate worker. # Arguments `prompt` — The raw prompt text to analyse and route. # Returns A [`RoutingDecision`] indicat
src/routing/router.rs:169
↓ 34 callers
Method
set
Set cached value with TTL in seconds # Panics This function does not panic.
src/enhanced/cache.rs:235
↓ 33 callers
Function
apply_event
Applies an input event to the app state. # Arguments `app` - Mutable reference to app state. `event` - The input event to apply.
src/tui/events.rs:70
↓ 33 callers
Function
make_entry
(model: &str, cost_usd: f64, tokens_in: u64, tokens_out: u64)
src/self_tune/cost.rs:729
↓ 33 callers
Function
valid_config
Helper to build a valid config that can be mutated for negative tests.
src/config/validation.rs:340
↓ 32 callers
Method
with_url
Set server URL
src/worker.rs:989
↓ 31 callers
Function
make_entry
(id: &str, request_id: &str, source: FeedbackSource, score: f64)
src/intelligence/feedback.rs:318
↓ 30 callers
Function
create_request
(id: &str)
src/enhanced/priority.rs:356
↓ 30 callers
Method
status
Return a snapshot of the loop's current counters.
src/self_improve_loop.rs:326
↓ 29 callers
Method
infer
(&self, prompt: &str)
tests/chaos_tests.rs:38
↓ 29 callers
Method
store
(&self, v: f64)
src/self_tune/actuator.rs:265
↓ 28 callers
Method
as_str
(self)
src/self_modify/task_gen.rs:65
↓ 28 callers
Function
make_bridge
()
src/intelligence/bridge.rs:433
↓ 28 callers
Function
make_pipeline
()
src/self_modify/deployment.rs:842
↓ 28 callers
Function
metrics
Return a reference to the initialised [`Metrics`], or `None` if [`init_metrics`] has not been called yet.
src/metrics.rs:402
↓ 28 callers
Method
register_model
Register a model for routing. Duplicate registrations are idempotent. # Errors Returns [`RouterError::LockPoisoned`] if the internal lock is poisone
src/intelligence/router.rs:181
↓ 27 callers
Method
write
(&mut self, b: &[u8])
src/lib.rs:830
↓ 26 callers
Method
create_deployment
Create a new deployment in `Pending` stage. # Arguments `id` — Unique identifier for the deployment `description` — Human-readable description of the
src/self_modify/deployment.rs:303
↓ 26 callers
Method
register_model
Register a model name with the learned router. Must be called for every model that can be selected. Duplicate registrations are idempotent. # Argume
src/intelligence/bridge.rs:230
↓ 25 callers
Function
make
()
src/self_tune/actuator.rs:276
↓ 25 callers
Method
push_log
Pushes a log entry, evicting the oldest if at capacity.
src/tui/app.rs:284
↓ 25 callers
Method
tick_now
Force an immediate snapshot collection and broadcast (useful in tests).
src/self_tune/telemetry_bus.rs:451
↓ 23 callers
Method
complete
Mark a request as successfully completed and cache its result. Notifies all tasks currently blocked in [`Deduplicator::wait_for_result`] for the same
src/enhanced/dedup.rs:515
↓ 23 callers
Method
insert_modification
Insert a new modification record.
src/self_modify/memory.rs:291
↓ 23 callers
Method
into_response
(self)
src/web_api.rs:374
↓ 23 callers
Function
make_test_state
Create a test [`DashboardState`] backed by an echo worker pipeline (live mode).
src/bin/dashboard.rs:1271
↓ 23 callers
Function
new_mcp_server
Create a new [`OrchestratorMcp`] server instance. Spawns a background collector task that reads completed pipeline outputs and dispatches them to the
src/bin/mcp.rs:709
↓ 23 callers
Method
run
Drive the self-improvement loop until `shutdown_rx` is set to `true`. ## Production guard If `RUST_ENV=production` is set, this method logs a warning
src/self_improve_loop.rs:364
↓ 23 callers
Function
validate
Validate all semantic constraints on a [`PipelineConfig`]. Collects every violation before returning so the caller sees the full scope of issues at o
src/config/validation.rs:126
↓ 22 callers
Method
register
Register a node in the cluster topology. If the node already exists, updates its heartbeat and load. # Arguments `node_id` — Node identifier `addres
src/distributed/cluster.rs:164
↓ 22 callers
Method
stats
Get cache statistics # Panics This function does not panic.
src/enhanced/cache.rs:340
↓ 20 callers
Function
inc_error
Increment the error counter for a pipeline stage and error type. No-op if metrics have not been initialised. # Panics This function never panics.
src/metrics.rs:501
↓ 20 callers
Method
is_empty
(&self)
src/self_tune/helix_feedback.rs:58
↓ 20 callers
Function
make_record
(id: &str)
src/self_modify/memory.rs:881
↓ 20 callers
Method
status
Get a snapshot of all tasks and their current statuses. # Panics This function never panics.
src/coordination/queue.rs:403
↓ 19 callers
Method
breakdown
Provide a breakdown of individual signal contributions. Useful for debugging, logging, and transparency into routing decisions. # Arguments `prompt
src/routing/scorer.rs:129
↓ 19 callers
Function
dedup_key
Deterministic dedup key from prompt content (mirrors `enhanced::dedup::dedup_key`).
tests/dedup_validation.rs:22
↓ 19 callers
Function
make_cluster
()
src/distributed/cluster.rs:402
↓ 19 callers
Method
parse_metrics
Parses Prometheus text format into app state.
src/tui/metrics.rs:523
↓ 19 callers
Method
set_external_pressure
Inject an external pressure signal (e.g. from HelixRouter's `pressure_score`). `pressure` is clamped to `[0.0, 1.0]`. This value is blended with the
src/self_tune/telemetry_bus.rs:503
↓ 19 callers
Method
snapshot
Return a snapshot of current cost metrics. # Returns A [`CostSnapshot`] with all current counters and computed costs. # Panics This function never
src/routing/cost_tracker.rs:127
↓ 19 callers
Function
test_config
(dir: &TempDir)
src/coordination/queue.rs:583
↓ 18 callers
Method
as_str
Borrow the inner string slice. # Panics This function does not panic.
src/lib.rs:234
↓ 18 callers
Function
create_basic
(engine: &ExperimentEngine, id: &str)
src/self_tune/experiment.rs:871
↓ 18 callers
Method
process_snapshot
Analyse a telemetry snapshot and generate tasks for any triggered thresholds. Rate-limiting is respected - templates on cooldown are skipped.
src/self_modify/task_gen.rs:288
↓ 18 callers
Method
propose
Submit a new proposal to change a parameter. # Errors - [`BrainError::MaxProposalsReached`] if too many proposals are pending. - [`BrainError::LockPo
src/evolution/brain.rs:225
↓ 18 callers
Method
record_local
Record tokens processed by the local worker. # Arguments `tokens` — Number of tokens processed. # Panics This function never panics.
src/routing/cost_tracker.rs:82
↓ 18 callers
Method
snapshot
Return a point-in-time snapshot of all current values. # Panics This function never panics.
src/self_tune/actuator.rs:139
↓ 17 callers
Function
default_brain
()
src/evolution/brain.rs:460
↓ 17 callers
Method
evaluate
Evaluate all gates for a change proposal. In the current implementation this runs the checks in-process where possible and spawns child processes for
src/self_modify/gate.rs:243
↓ 17 callers
Method
initialize_population
Randomly initialise the population within configured parameter bounds. # Errors Returns [`SearchError::LockPoisoned`] if the internal lock is poisone
src/evolution/search.rs:203
↓ 17 callers
Function
make_gate
(trust: u8)
src/self_modify/gate.rs:594
↓ 17 callers
Method
notify_completion
Record the outcome of a completed inference call. This is the primary feedback path: it estimates response quality, injects a `FeedbackEntry`, and im
src/intelligence/bridge.rs:295
↓ 17 callers
Method
population
Return a snapshot of the current population. # Panics This function never panics.
src/evolution/search.rs:408
↓ 17 callers
Method
record_rps
(&self, rps: f64)
src/intelligence/autoscale.rs:83
↓ 17 callers
Function
record_stage_latency
Record the processing latency for a pipeline stage. No-op if metrics have not been initialised. # Panics This function never panics.
src/metrics.rs:415
↓ 17 callers
Method
register_agent
Register an agent as healthy. # Arguments `agent_id` - The agent to register # Panics This function never panics.
src/coordination/monitor.rs:185
↓ 17 callers
Method
with_temperature
Set temperature (0.0 – 2.0 for OpenAI). Values outside `[0.0, 2.0]` are clamped and a `WARN`-level log line is emitted. The OpenAI API rejects value
src/worker.rs:344
↓ 16 callers
Method
estimate
( &self, prompt: &str, response: &str, backend: &str, )
src/intelligence/quality.rs:126
↓ 16 callers
Function
inc_request
Increment the request counter for a pipeline stage. No-op if metrics have not been initialised. # Panics This function never panics.
src/metrics.rs:430
↓ 16 callers
Function
make_bus
()
src/self_tune/telemetry_bus.rs:638
↓ 16 callers
Method
pop
Remove and return the highest-priority request. Among requests with equal priority the one inserted first is returned (FIFO within a tier). # Return
src/enhanced/priority.rs:256
↓ 16 callers
Method
summary
Return a count summary of stored records.
src/self_modify/memory.rs:520
↓ 16 callers
Function
test_config
()
src/evolution/search.rs:502
↓ 16 callers
Method
with_max_tokens
Set maximum tokens to generate
src/worker.rs:335
↓ 15 callers
Method
advance_rollout
Advance a rolling deployment to the next rollout step. Checks current metrics against baseline: - If any metric whose key contains `"error_rate"` exc
src/self_modify/deployment.rs:541
↓ 15 callers
Method
budget_status
Compute the current budget status including spend totals, projections, per-model breakdowns, and the current alert level. # Returns A `BudgetStatus`
src/self_tune/cost.rs:325
↓ 15 callers
Function
dedup_key
( prompt: &str, metadata: &std::collections::HashMap<String, String>, session_id: Option<&str>, )
src/enhanced/dedup.rs:759
↓ 15 callers
Function
sample_manifest
(id: &str)
src/evolution/plugin.rs:360
↓ 15 callers
Function
sample_params
()
src/evolution/transfer.rs:403
next →
1–100 of 3,370, ranked by callers