diff --git a/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs b/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs index 65adf5e1f84..660a467bd01 100644 --- a/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs +++ b/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs @@ -1717,6 +1717,15 @@ fn settle_bound_owner_with_budget( mut state: RetainedBoundSettlement, budget: Duration, ) -> Result> { + #[cfg(test)] + let _capture = state.phase_hook.as_ref().map(|_| { + tracedecay_runtime_core::logging::FormattedTracingCapture::start_with_span_timings() + }); + #[cfg(test)] + let _capture_span = state.phase_hook.as_ref().map(|_| { + tracing::info_span!("daemon.automation.retained_owner", run_id = %state.ledger.run_id) + .entered() + }); let started = std::time::Instant::now(); let mut delay = Duration::from_millis(25); loop { diff --git a/crates/tracedecay-automation-runtime/src/automation/run_ledger.rs b/crates/tracedecay-automation-runtime/src/automation/run_ledger.rs index 6322e5a751a..589e355d588 100644 --- a/crates/tracedecay-automation-runtime/src/automation/run_ledger.rs +++ b/crates/tracedecay-automation-runtime/src/automation/run_ledger.rs @@ -503,6 +503,7 @@ pub(super) fn ensure_run_ledger_eof_guard(file: &mut std::fs::File) -> std::io:: } } +#[tracing::instrument(name = "hosts.automation.run_ledger.sync", level = "trace", skip_all)] pub(super) fn sync_run_ledger_file_and_parent(path: &Path, file: &std::fs::File) -> Result<()> { #[cfg(test)] exact_lookup::scan_receipt::record_sync(); diff --git a/crates/tracedecay-automation-runtime/src/automation/run_ledger/exact_publication.rs b/crates/tracedecay-automation-runtime/src/automation/run_ledger/exact_publication.rs index ea5345700d7..15100632cf1 100644 --- a/crates/tracedecay-automation-runtime/src/automation/run_ledger/exact_publication.rs +++ b/crates/tracedecay-automation-runtime/src/automation/run_ledger/exact_publication.rs @@ -758,11 +758,18 @@ fn publish_under_ledger_lock( } }; - ledger - .seek(SeekFrom::Start(pre_append_eof)) - .map_err(TraceDecayError::from)?; - copy_exact_payload(&mut spool, &mut ledger, publication.payload_len)?; - ledger.write_all(b"\n").map_err(TraceDecayError::from)?; + { + let _span = tracing::trace_span!( + "hosts.automation.run_ledger.append_payload", + bytes = publication.payload_len + ) + .entered(); + ledger + .seek(SeekFrom::Start(pre_append_eof)) + .map_err(TraceDecayError::from)?; + copy_exact_payload(&mut spool, &mut ledger, publication.payload_len)?; + ledger.write_all(b"\n").map_err(TraceDecayError::from)?; + } sync_run_ledger_file_and_parent(ledger_path, &ledger)?; verify_published_range(&mut ledger, &mut spool, &intent)?; clear_append_intent(dashboard_root)?; @@ -1115,7 +1122,11 @@ fn publish_append_intent_bytes( tracedecay_private_fs::framed_log::DirectorySyncPolicy::Strict, ) .map_err(TraceDecayError::from)?; - let actual = read_append_intent_bytes(dashboard_root)?.ok_or_else(|| { + let actual = { + let _span = tracing::trace_span!("hosts.automation.run_ledger.intent_readback").entered(); + read_append_intent_bytes(dashboard_root) + }? + .ok_or_else(|| { config_error("automation run append intent disappeared after durable publication") })?; if actual != bytes { diff --git a/crates/tracedecay-code-index-runtime/src/code_index_scheduler/publication_store.rs b/crates/tracedecay-code-index-runtime/src/code_index_scheduler/publication_store.rs index 1fd7b36eec5..bd3bba39966 100644 --- a/crates/tracedecay-code-index-runtime/src/code_index_scheduler/publication_store.rs +++ b/crates/tracedecay-code-index-runtime/src/code_index_scheduler/publication_store.rs @@ -710,8 +710,12 @@ impl CodeIndexPreparationPort for DaemonCodeIndexPreparationV1 { segment_size_bytes, page_count, } => { - let _span = - tracing::trace_span!("code_index.generation.publish.evidence_commit").entered(); + let _span = tracing::trace_span!( + "code_index.generation.publish.evidence_commit", + bytes = segment_size_bytes, + pages = page_count, + ) + .entered(); // The existing pack authority validates every page and the // complete digest, but names it only inside this session. if files.evidence.commit( @@ -985,8 +989,15 @@ impl TemporaryEvidencePackV1 { ) })?; let final_path = root.join(format!("segment-{digest_hex}.json")); - match final_path.symlink_metadata() { + let existing = { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_lookup").entered(); + final_path.symlink_metadata() + }; + match existing { Ok(metadata) => { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_reuse").entered(); if !metadata.file_type().is_file() || metadata.len() != segment_size_bytes || DaemonCodeIndexPublicationStoreV1::state_digest_file(&final_path)? @@ -1005,21 +1016,38 @@ impl TemporaryEvidencePackV1 { Err(error) if error.kind() == std::io::ErrorKind::NotFound => {} Err(error) => return Err(DaemonCodeIndexPublicationStoreV1::unavailable(error)), } - self.file - .as_ref() - .ok_or_else(|| { - DaemonCodeIndexPublicationStoreV1::unavailable( - "sealed evidence pack temporary file is already closed", - ) - })? - .sync_all() - .map_err(DaemonCodeIndexPublicationStoreV1::unavailable)?; - drop(self.file.take()); + { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_file_sync").entered(); + self.file + .as_ref() + .ok_or_else(|| { + DaemonCodeIndexPublicationStoreV1::unavailable( + "sealed evidence pack temporary file is already closed", + ) + })? + .sync_all() + .map_err(DaemonCodeIndexPublicationStoreV1::unavailable)?; + } + { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_file_close").entered(); + drop(self.file.take()); + } let staged_path = staging_root.join(format!("segment-{digest_hex}.json")); - std::fs::rename(&self.path, &staged_path) - .map_err(DaemonCodeIndexPublicationStoreV1::unavailable)?; + { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_rename").entered(); + std::fs::rename(&self.path, &staged_path) + .map_err(DaemonCodeIndexPublicationStoreV1::unavailable)?; + } self.published_path = Some(staged_path); - DaemonCodeIndexPublicationStoreV1::sync_directory(staging_root)?; + { + let _span = + tracing::trace_span!("code_index.generation.publish.evidence_directory_sync") + .entered(); + DaemonCodeIndexPublicationStoreV1::sync_directory(staging_root)?; + } Ok(true) } diff --git a/crates/tracedecay-code-index/src/production/mod.rs b/crates/tracedecay-code-index/src/production/mod.rs index 4032dd31f96..d88fa08c062 100644 --- a/crates/tracedecay-code-index/src/production/mod.rs +++ b/crates/tracedecay-code-index/src/production/mod.rs @@ -2345,7 +2345,12 @@ where /// from the files the edit changed and never decodes it; a generation /// without one, or an edit that needs every file's resolution, is built /// whole. - #[tracing::instrument(name = "code_index.build.and_publish", level = "trace", skip_all)] + #[tracing::instrument( + name = "code_index.build.and_publish", + level = "trace", + skip_all, + fields(project_id = %self.config.project_id) + )] pub fn build_and_publish( &mut self, request: CodeIndexBuildRequestV1, diff --git a/crates/tracedecay-daemon-service/src/invocation/primitive.rs b/crates/tracedecay-daemon-service/src/invocation/primitive.rs index 00631809958..6416b91ea1a 100644 --- a/crates/tracedecay-daemon-service/src/invocation/primitive.rs +++ b/crates/tracedecay-daemon-service/src/invocation/primitive.rs @@ -7,7 +7,7 @@ use tracedecay_agent_hosts::agents::context_scout::{ ContextScoutMutationResultV1, ContextScoutMutationSettlementOutcomeV1, ContextScoutPublicMutationV1, ContextScoutRecentStateV1, }; -use tracedecay_application::diagnostics_producer::TypeScriptProducerStatusHandleV1; +use tracedecay_application::diagnostics_producer::TypeScriptProducerStateV1; use tracedecay_application::primitives::{ ProductionPrimitiveOpenRequestV1, open_production_primitive_runtime, }; @@ -19,6 +19,7 @@ use tracedecay_contracts::context_scout::{ ContextScoutSuggestionProjectionV1, ContextScoutSurfaceRequestV1, }; use tracedecay_domain::sha256_hex_suffix; +use tracedecay_lsp::TypeScriptCompilerAdmission; use tracedecay_runtime_core::cancellation::CancellationToken; use tracedecay_tool_catalog::ApplicationSurfaceOperation; @@ -1380,9 +1381,10 @@ impl DaemonPrimitiveRuntimeRegistrar { &self, project_root: PathBuf, request: ProductionPrimitiveOpenRequestV1, - ) -> Result { + mut compiler_admission: Option, + ) -> Result, DaemonPrimitiveRuntimeRegistrationError> { request.validate_registration_root(&project_root)?; - let retained = self + let (retained, compiler_producer, already_current) = self .service .project_runtimes .register_or_reconcile_with( @@ -1398,11 +1400,28 @@ impl DaemonPrimitiveRuntimeRegistrar { .await .map_err(DaemonPrimitiveRuntimeRegistrationError::from) }, - PrimitiveProjectRuntime::clone, + |runtime| { + // The registry projects under its publication lock. Appoint + // the producer before a read can observe this runtime, so + // discovery is pending rather than falsely unsupported. + let already_current = request.validate_retained(runtime)?; + let producer = if already_current { + compiler_admission.take().map(|admission| { + TypeScriptProducerStateV1::new(runtime.compiler_status(), admission) + }) + } else { + None + }; + Ok::<_, DaemonPrimitiveRuntimeRegistrationError>(( + runtime.clone(), + producer, + already_current, + )) + }, ) - .await?; - if request.validate_retained(&retained)? { - return Ok(retained.compiler_status()); + .await??; + if already_current { + return Ok(compiler_producer); } // A sibling can retain this root's store owner after route eviction. @@ -1419,7 +1438,11 @@ impl DaemonPrimitiveRuntimeRegistrar { .map_err(Into::into) }, || async { Ok(replacement.clone()) }, - PrimitiveProjectRuntime::compiler_status, + |runtime| { + compiler_admission.map(|admission| { + TypeScriptProducerStateV1::new(runtime.compiler_status(), admission) + }) + }, ) .await } diff --git a/crates/tracedecay-global-db/src/tests/schema_install_cancellation.rs b/crates/tracedecay-global-db/src/tests/schema_install_cancellation.rs index 46e055a7a75..b7e3aabe99a 100644 --- a/crates/tracedecay-global-db/src/tests/schema_install_cancellation.rs +++ b/crates/tracedecay-global-db/src/tests/schema_install_cancellation.rs @@ -183,64 +183,71 @@ async fn unpublished_existing_wal_is_refused_without_deleting_foreign_bytes() { assert_eq!(std::fs::read(&wal).unwrap(), foreign_wal); } -#[tokio::test(flavor = "multi_thread")] -async fn cancelled_daemon_attach_preserves_published_schema_and_reopens() { - let store = RegisteredStore::create(); - let (outcome, total_polls) = store.attach_cancelled_at(usize::MAX).await; - outcome.unwrap(); - let installed = store.external_schema_objects(); - assert!( - installed - .iter() - .any(|(object, _)| object == "table:code_projects"), - "a completed attach installs the registered schema: {installed:?}" - ); +#[test] +fn cancelled_daemon_attach_preserves_published_schema_and_reopens() { + tracedecay_runtime_core::native_runtime::default_builder() + .build() + .expect("schema cancellation runtime") + .block_on(async { + let store = RegisteredStore::create(); + let (outcome, total_polls) = store.attach_cancelled_at(usize::MAX).await; + outcome.unwrap(); + let installed = store.external_schema_objects(); + assert!( + installed + .iter() + .any(|(object, _)| object == "table:code_projects"), + "a completed attach installs the registered schema: {installed:?}" + ); - let stride = (total_polls / 20).max(1); - let mut cancelled = Vec::new(); - let mut completed = Vec::new(); - for cancel_at in std::iter::once(1) - .chain((2..total_polls).step_by(stride)) - .chain([total_polls + 10]) - { - // The reference admission, then each successful reopen below, leave - // this family closed with the exact baseline schema. Creating another - // family would repeat initialization without exercising another - // cancellation point. Keep real runtime retirement and reopening - // around every sampled admission. - let before_admission = store.external_schema_objects(); - assert_eq!(before_admission, installed); - let (outcome, _) = store.attach_cancelled_at(cancel_at).await; - let objects = store.external_schema_objects(); - match outcome { - Err(error) => { - assert!( - error.is_store_open_cancelled(), - "cancel at poll {cancel_at}/{total_polls} must fail typed: {error:?}" - ); - assert_eq!( - objects, before_admission, - "cancel at poll {cancel_at}/{total_polls} must preserve the published schema" - ); - cancelled.push(cancel_at); - } - Ok(()) => { - assert_eq!( - objects, installed, - "an admission completed before cancel at poll {cancel_at}/{total_polls} preserves the published schema" - ); - completed.push(cancel_at); + let stride = (total_polls / 20).max(1); + let mut cancelled = Vec::new(); + let mut completed = Vec::new(); + for cancel_at in std::iter::once(1) + .chain((2..total_polls).step_by(stride)) + .chain([total_polls + 10]) + { + // The reference admission, then each successful reopen below, leave + // this family closed with the exact baseline schema. Creating another + // family would repeat initialization without exercising another + // cancellation point. Keep real runtime retirement and reopening + // around every sampled admission. + let before_admission = store.external_schema_objects(); + assert_eq!(before_admission, installed); + let (outcome, _) = store.attach_cancelled_at(cancel_at).await; + let objects = store.external_schema_objects(); + match outcome { + Err(error) => { + assert!( + error.is_store_open_cancelled(), + "cancel at poll {cancel_at}/{total_polls} must fail typed: {error:?}" + ); + assert_eq!( + objects, before_admission, + "cancel at poll {cancel_at}/{total_polls} must preserve the published schema" + ); + cancelled.push(cancel_at); + } + Ok(()) => { + assert_eq!( + objects, installed, + "an admission completed before cancel at poll {cancel_at}/{total_polls} preserves the published schema" + ); + completed.push(cancel_at); + } + } + let (reopened, _) = store.attach_cancelled_at(usize::MAX).await; + reopened.unwrap_or_else(|error| { + panic!( + "reopen after cancel at poll {cancel_at}/{total_polls} failed: {error:?}" + ) + }); + assert_eq!(store.external_schema_objects(), installed); } - } - let (reopened, _) = store.attach_cancelled_at(usize::MAX).await; - reopened.unwrap_or_else(|error| { - panic!("reopen after cancel at poll {cancel_at}/{total_polls} failed: {error:?}") + assert!( + cancelled.contains(&1), + "a cancel before admission starts must stop it; cancelled at {cancelled:?}" + ); + assert!(completed.contains(&(total_polls + 10))); }); - assert_eq!(store.external_schema_objects(), installed); - } - assert!( - cancelled.contains(&1), - "a cancel before admission starts must stop it; cancelled at {cancelled:?}" - ); - assert!(completed.contains(&(total_polls + 10))); } diff --git a/crates/tracedecay-runtime-core/src/logging.rs b/crates/tracedecay-runtime-core/src/logging.rs index 94cba0b7b6c..701629d6f01 100644 --- a/crates/tracedecay-runtime-core/src/logging.rs +++ b/crates/tracedecay-runtime-core/src/logging.rs @@ -279,21 +279,34 @@ impl FormattedTracingCapture { /// before the first captured event. #[must_use] pub fn start() -> Self { - Self::start_with_output(false) + Self::start_with_output(false, false) } /// Also writes each line to stderr so a terminated measurement retains /// the events emitted before its deadline. #[must_use] pub fn start_with_stderr() -> Self { - Self::start_with_output(true) + Self::start_with_output(true, false) } - fn start_with_output(stderr: bool) -> Self { + /// Captures span admission and completion timings as well as events, + /// retaining live stderr if the measurement is terminated before reporting. + #[must_use] + pub fn start_with_span_timings() -> Self { + Self::start_with_output(true, true) + } + + fn start_with_output(stderr: bool, span_timings: bool) -> Self { let bytes = std::sync::Arc::new(Mutex::new(Vec::new())); let subscriber = tracing_subscriber::fmt() .with_max_level(tracing::Level::TRACE) .with_ansi(false) + .with_span_events(if span_timings { + tracing_subscriber::fmt::format::FmtSpan::NEW + | tracing_subscriber::fmt::format::FmtSpan::CLOSE + } else { + tracing_subscriber::fmt::format::FmtSpan::NONE + }) .with_writer(CaptureBuffer(std::sync::Arc::clone(&bytes), stderr)); let guard = if stderr { set_tracing_capture( diff --git a/crates/tracedecay-session-temporal-store/src/relation_projection.rs b/crates/tracedecay-session-temporal-store/src/relation_projection.rs index 76ef227022b..e626dbf31a4 100644 --- a/crates/tracedecay-session-temporal-store/src/relation_projection.rs +++ b/crates/tracedecay-session-temporal-store/src/relation_projection.rs @@ -221,61 +221,6 @@ impl SessionTemporalAccess<'_, D> { Ok((generation, projection)) } - #[cfg(any(test, feature = "test-helpers"))] - pub async fn apply_active_session_relation_projections_for_test( - &self, - session_ids: &[SessionId], - cancellation: Arc, - ) -> SessionStoreResult<()> { - let (scope, _) = self - .session_relation_store() - .map_err(|error| storage(RECONSTRUCT_OPERATION, error))?; - let snapshot = self - .read_snapshot() - .await - .map_err(|error| storage(RECONSTRUCT_OPERATION, error))?; - let mut projections = Vec::with_capacity(session_ids.len()); - for session_id in session_ids { - let (_, projection) = self - .load_active_relation_projection( - &snapshot, - &scope, - session_id, - Arc::clone(&cancellation), - ) - .await?; - super::relation_receipts::write_relation_projection_on_snapshot( - self.inner(), - &snapshot, - &projection, - Arc::clone(&cancellation), - ) - .await?; - projections.push(projection); - } - drop(snapshot); - let transaction = self - .begin_write_transaction() - .await - .map_err(|error| storage(RECONSTRUCT_OPERATION, error))?; - for projection in &projections { - if let Err(error) = - super::relation_receipts::acknowledge_relation_receipt(&transaction, projection) - .await - { - transaction - .rollback() - .await - .map_err(|rollback| storage(RECONSTRUCT_OPERATION, rollback))?; - return Err(error); - } - } - transaction - .commit() - .await - .map_err(|error| storage(RECONSTRUCT_OPERATION, error)) - } - #[tracing::instrument( name = "session_temporal.persist.recover_relations", level = "trace", diff --git a/crates/tracedecay/src/daemon/project_open_owners.rs b/crates/tracedecay/src/daemon/project_open_owners.rs index 478ce9f4614..494bc5f3cd3 100644 --- a/crates/tracedecay/src/daemon/project_open_owners.rs +++ b/crates/tracedecay/src/daemon/project_open_owners.rs @@ -23,7 +23,7 @@ use tracedecay_agent_hosts::native_integration::{ DaemonNativeIntegrationAnalysisV1, DaemonNativeIntegrationServiceRegistry, NativeIntegrationTargetV1, }; -use tracedecay_application::diagnostics_producer::TypeScriptProducerStatusHandleV1; +use tracedecay_application::diagnostics_producer::TypeScriptProducerStateV1; use tracedecay_application::lsp_runtime::DaemonLspSessionFactory; use tracedecay_application::source_authorization::ProjectSourceAccessSnapshot; use tracedecay_code_index_runtime::git_transactions::DaemonGitIndexTransactionServiceRegistry; @@ -37,6 +37,7 @@ use tracedecay_daemon_service::{ }, }; use tracedecay_domain::errors::{Result, TraceDecayError}; +use tracedecay_lsp::TypeScriptCompilerAdmission; use tracedecay_lsp::analyzer::broker::AdmittedLspProvider; use tracedecay_lsp::analyzer::client::LspRefreshTimeouts; use tracedecay_session_runtime::session_retrieval::DaemonSessionLookupPrimitiveV1; @@ -169,8 +170,12 @@ pub(crate) async fn install_project_open_source_edit_owners_for_test( /// Registers the owners that serve code reads on an admitted route: the /// callable-code authorization and the primitive runtime. Returns the -/// admitted root URI and the compiler status retained by their runtime. +/// admitted root URI and the compiler producer appointed by their runtime. #[tracing::instrument(name = "daemon.project.owners.code_reads", level = "trace", skip_all)] +#[expect( + clippy::too_many_arguments, + reason = "Code-read registration carries the admitted compiler with its route authorities." +)] async fn register_project_code_read_owners( invocation: &DaemonInvocationState, project_root: &Path, @@ -179,7 +184,8 @@ async fn register_project_code_read_owners( access: &ProjectSourceAccessSnapshot, session_db: tracedecay_global_db::RegisteredGlobalDbLeaseV1, temporal: Arc, -) -> Result<(String, TypeScriptProducerStatusHandleV1)> { + compiler_admission: Option, +) -> Result<(String, Option)> { // Primitive reads are part of the admitted core route. Publish their // runtime and callable-code authorization before the slower mutation, // delivery, native-integration, and Work owners finish mounting. @@ -221,6 +227,7 @@ async fn register_project_code_read_owners( session_db, temporal, access.clone(), + compiler_admission, ) .await } @@ -273,6 +280,7 @@ pub(super) async fn register_reset_required_route_code_read_owners( &access, session_store, Arc::new(primitive_runtime::ResetRequiredSessionLookupV1), + None, )) .await .map(drop) @@ -382,7 +390,12 @@ pub(super) async fn register_project_open_production_owners( let temporal = Arc::new(DaemonSessionLookupPrimitiveV1::new( server.project_session_application_retrieval_service(&access.scope)?, )); - let (admitted_root_uri, compiler_status) = Box::pin(register_project_code_read_owners( + let compiler_admission = compiler_diagnostics_producer::compiler_admission_for_project( + invocation, + project_root, + &scope, + ); + let (admitted_root_uri, compiler_producer) = Box::pin(register_project_code_read_owners( invocation, project_root, server, @@ -390,8 +403,21 @@ pub(super) async fn register_project_open_production_owners( &access, session_db.clone(), temporal, + compiler_admission, )) .await?; + // The producer needs only the admitted graph, scheduler, and compiler + // authority. Hand the appointed state to supervision before any later + // owner can fail or yield. + if let Some(compiler_producer) = compiler_producer { + let _typescript_producer_admitted = compiler_diagnostics_producer::spawn_typescript_diagnostics_producer( + server, + invocation.clone(), + project_root.to_path_buf(), + Arc::clone(&graph), + compiler_producer, + ); + } owner_phase("code_read_owners_registered"); // One worktree discovery serves both the Git transaction owner here and @@ -783,20 +809,6 @@ pub(super) async fn register_project_open_production_owners( .await; }); - // A TypeScript project with its own compiler gets an automatic diagnostics - // producer: bounded background work after each complete generation, so - // `tracedecay_diagnostics` has a publication to read without a caller - // pasting compiler output first. - let _typescript_producer_admitted = - compiler_diagnostics_producer::spawn_typescript_diagnostics_producer( - server, - invocation.clone(), - project_root.to_path_buf(), - &scope, - Arc::clone(&graph), - compiler_status, - ); - tracing::info!( event = "project_open_owner_phase", project = %project_root.display(), diff --git a/crates/tracedecay/src/daemon/project_open_owners/compiler_diagnostics_producer.rs b/crates/tracedecay/src/daemon/project_open_owners/compiler_diagnostics_producer.rs index 9ed180b9d4a..af53aeac498 100644 --- a/crates/tracedecay/src/daemon/project_open_owners/compiler_diagnostics_producer.rs +++ b/crates/tracedecay/src/daemon/project_open_owners/compiler_diagnostics_producer.rs @@ -15,14 +15,17 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use tracedecay_application::diagnostics_producer::{ - CompilerProducerRunV1, TypeScriptProducerStateV1, TypeScriptProducerStatusHandleV1, - publish_typescript_discovery_v1, run_typescript_producer_v1, + CompilerProducerRunV1, TypeScriptProducerStateV1, publish_typescript_discovery_v1, + run_typescript_producer_v1, }; use tracedecay_application::diagnostics_store::DiagnosticsStore; use tracedecay_code_index_runtime::code_index_scheduler::CodeIndexOwnerSignalsV1; use tracedecay_contracts::now_micros; use tracedecay_domain::CodeGenerationId; -use tracedecay_lsp::{TypeScriptProject, TypeScriptProjectDiscoveryError, typescript_projects}; +use tracedecay_lsp::{ + TypeScriptCompilerAdmission, TypeScriptProject, TypeScriptProjectDiscoveryError, + typescript_projects, +}; use tracedecay_runtime_core::logging::log_daemon_event; use crate::daemon::invocation_state::DaemonInvocationState; @@ -31,34 +34,37 @@ use crate::daemon::invocation_state::DaemonInvocationState; /// per checked tsconfig; it leaves with the store. const BUILD_INFO_DIR: &str = "typescript-build-info"; -/// Spawns the TypeScript producer for `project_root`. Returns `false` when -/// nothing was spawned: a route that indexes no code by contract, so there is -/// never a generation to publish against. The spawned task publishes its -/// discovery and ends at once when no TypeScript project under the root has a -/// compiler; reads then describe the missing compiler from that record. -pub(super) fn spawn_typescript_diagnostics_producer( - owner: &crate::mcp::McpServer, - invocation: DaemonInvocationState, - project_root: PathBuf, +/// The compiler authority for a route that can publish code generations. +/// Routes that never index code must not appoint a producer that cannot run. +pub(super) fn compiler_admission_for_project( + invocation: &DaemonInvocationState, + project_root: &Path, scope: &tracedecay_contracts::ResolvedScope, - graph: Arc, - status: TypeScriptProducerStatusHandleV1, -) -> bool { +) -> Option { if tracedecay_code_index_runtime::project_reads::code_index_disabled_for_scope( &invocation.code_index_schedulers, scope, ) { - log_producer_event(&project_root, "code_index_disabled"); - return false; + log_producer_event(project_root, "code_index_disabled"); + return None; } let Some(admission) = invocation.compiler_admission.get().cloned() else { - log_producer_event(&project_root, "compiler_admission_unavailable"); - return false; + log_producer_event(project_root, "compiler_admission_unavailable"); + return None; }; - // Reopen can retain the primitive runtime while the prior server's - // compiler task is still retiring. Fence it before this task can yield - // in discovery; scheduling order must not choose the current producer. - let mut state = TypeScriptProducerStateV1::new(status, admission); + Some(admission) +} + +/// Runs the producer already appointed when its primitive runtime was +/// registered. Discovery ends the task when no TypeScript project has a +/// compiler; reads then describe the missing compiler from that record. +pub(super) fn spawn_typescript_diagnostics_producer( + owner: &crate::mcp::McpServer, + invocation: DaemonInvocationState, + project_root: PathBuf, + graph: Arc, + mut state: TypeScriptProducerStateV1, +) -> bool { owner.spawn_background_task(tracing::Instrument::instrument( async move { let schedulers = invocation.code_index_schedulers.clone(); diff --git a/crates/tracedecay/src/daemon/project_open_owners/primitive_runtime.rs b/crates/tracedecay/src/daemon/project_open_owners/primitive_runtime.rs index 9627a0f449c..0b399324edf 100644 --- a/crates/tracedecay/src/daemon/project_open_owners/primitive_runtime.rs +++ b/crates/tracedecay/src/daemon/project_open_owners/primitive_runtime.rs @@ -3,7 +3,7 @@ use std::path::Path; use std::sync::Arc; -use tracedecay_application::diagnostics_producer::TypeScriptProducerStatusHandleV1; +use tracedecay_application::diagnostics_producer::TypeScriptProducerStateV1; use tracedecay_application::primitives::{ ProductionPrimitiveCodeAuthoritiesV1, ProductionPrimitiveOpenRequestV1, admitted_root_uri_for_project, @@ -19,6 +19,7 @@ use tracedecay_contracts::retrieval::{ use tracedecay_daemon_service::DaemonPrimitiveRuntimeRegistrationError; use tracedecay_domain::errors::{Result, TraceDecayError}; use tracedecay_graph_query::SourceReadContext; +use tracedecay_lsp::TypeScriptCompilerAdmission; /// Session lookups on a route whose session store is held in its typed /// reset-required state: every lookup answers that refusal. @@ -35,6 +36,10 @@ impl TemporalRetrievalPort for ResetRequiredSessionLookupV1 { } #[tracing::instrument(name = "daemon.project.owners.primitive", level = "trace", skip_all)] +#[expect( + clippy::too_many_arguments, + reason = "Primitive registration carries the admitted compiler with its route authorities." +)] pub(super) async fn open_and_register_project_primitive_runtime( invocation: &DaemonInvocationState, project_root: &Path, @@ -43,7 +48,8 @@ pub(super) async fn open_and_register_project_primitive_runtime( session_db: tracedecay_global_db::RegisteredGlobalDbLeaseV1, temporal: Arc, access: ProjectSourceAccessSnapshot, -) -> Result<(String, TypeScriptProducerStatusHandleV1)> { + compiler_admission: Option, +) -> Result<(String, Option)> { let admitted_root_uri = admitted_root_uri_for_project(project_root).map_err(|error| TraceDecayError::Config { message: format!("project-open admitted root URI denied: {error}"), @@ -60,7 +66,7 @@ pub(super) async fn open_and_register_project_primitive_runtime( message: "project-open primitive runtime requires the mounted ignored-dependency admission authority" .to_owned(), })?; - let compiler_status = invocation + let compiler_producer = invocation .primitive_runtime_registrar() .open_and_register( project_root.to_path_buf(), @@ -78,10 +84,11 @@ pub(super) async fn open_and_register_project_primitive_runtime( access, admitted_root_uri.clone(), ), + compiler_admission, ) .await .map_err(primitive_runtime_registration_error)?; - Ok((admitted_root_uri, compiler_status)) + Ok((admitted_root_uri, compiler_producer)) } fn primitive_runtime_registration_error( diff --git a/crates/tracedecay/src/daemon/tests/compiler_status.rs b/crates/tracedecay/src/daemon/tests/compiler_status.rs index 91439f7645e..9fb0da71571 100644 --- a/crates/tracedecay/src/daemon/tests/compiler_status.rs +++ b/crates/tracedecay/src/daemon/tests/compiler_status.rs @@ -2,7 +2,7 @@ use std::path::{Path, PathBuf}; use std::process::Command; -use std::sync::Arc; +use std::sync::{Arc, Mutex, mpsc as blocking_mpsc}; use std::time::Duration; use tracedecay_daemon_protocol::{ DaemonHandshake, DaemonInvocationOutcome, DaemonInvocationRequest, @@ -52,6 +52,32 @@ where } } +struct PrimitiveRegistrationPaused { + registered: mpsc::UnboundedSender<()>, + resume: Mutex>>, +} + +impl Layer for PrimitiveRegistrationPaused +where + S: tracing::Subscriber + for<'a> LookupSpan<'a>, +{ + fn on_close(&self, id: tracing::span::Id, context: Context<'_, S>) { + if context + .span(&id) + .is_none_or(|span| span.name() != "daemon.project.owners.primitive") + { + return; + } + let resume = self.resume.lock().unwrap().take(); + if let Some(resume) = resume { + self.registered.send(()).expect("registration observer"); + resume + .recv_timeout(Duration::from_mins(1)) + .expect("release primitive registration after the public read"); + } + } +} + fn install_project_compiler(project: &Path, compiler: &Path, missing: &str) { std::fs::create_dir_all(project.join("node_modules/.bin")).unwrap(); std::os::unix::fs::symlink(compiler, project.join("node_modules/.bin/tsc")).unwrap(); @@ -126,6 +152,103 @@ fn compiler_failure(outcome: &DaemonInvocationOutcome) -> String { diagnostic.message.clone() } +#[tokio::test(flavor = "multi_thread", worker_threads = 4)] +async fn published_primitive_reads_pending_before_the_compiler_task_starts() { + const CHILD: &str = "TRACEDECAY_TEST_COMPILER_REGISTRATION_CHILD"; + if std::env::var_os(CHILD).is_none() { + let name = format!( + "{}::published_primitive_reads_pending_before_the_compiler_task_starts", + module_path!().split_once("::").unwrap().1 + ); + let home = TempDir::new().unwrap(); + let output = Command::new(std::env::current_exe().unwrap()) + .args(["--exact", &name, "--test-threads=1", "--nocapture"]) + .env(CHILD, "1") + .env("HOME", home.path()) + .env("XDG_CONFIG_HOME", home.path().join("config")) + .env("GIT_CONFIG_GLOBAL", "/dev/null") + .env("GIT_CONFIG_NOSYSTEM", "1") + .output() + .expect("isolated compiler-registration journey"); + assert!( + output.status.success() + && String::from_utf8_lossy(&output.stdout).contains("test result: ok. 1 passed"), + "compiler-registration journey failed:\n{}\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + return; + } + + let temp = TempDir::new().unwrap(); + let project = temp.path().join("project"); + let profile = temp.path().join("profile"); + std::fs::create_dir_all(project.join("packages/app/src")).unwrap(); + std::fs::write( + project.join("packages/app/src/index.ts"), + "export const value = 1;\n", + ) + .unwrap(); + std::fs::write( + project.join("packages/app/tsconfig.json"), + r#"{"include":["src/**/*.ts"]}"#, + ) + .unwrap(); + git(&project, &["init", "--quiet", "--initial-branch=main"]); + git(&project, &["add", "--all"]); + git( + &project, + &["commit", "--quiet", "-m", "test: compiler registration"], + ); + let client_identity = test_client_identity_for(profile.clone()); + initialize_test_project(&project, &client_identity).await; + let project = project.canonicalize().unwrap(); + let handshake = DaemonHandshake { + project_path: Some(project), + client_identity, + ..test_handshake_defaults() + }; + let _database_scope = enter_test_daemon_database_scope(&profile, "compiler-registration"); + let engine = test_daemon_engine_for_profile(&profile); + let (registered, mut registrations) = mpsc::unbounded_channel(); + let (resume, paused) = blocking_mpsc::channel(); + tracing::subscriber::set_global_default(tracing_subscriber::registry().with( + PrimitiveRegistrationPaused { + registered, + resume: Mutex::new(Some(paused)), + }, + )) + .unwrap(); + let opening_engine = engine.clone(); + let opening_handshake = handshake.clone(); + let opening = + tokio::spawn(async move { opening_engine.open_project_server(&opening_handshake).await }); + tokio::time::timeout(Duration::from_mins(1), registrations.recv()) + .await + .expect("the real primitive runtime must register") + .expect("registration observer stays alive"); + + // Registration has published the callable runtime, but the remaining + // owners and the compiler task are still held. Exercise the public read + // at precisely the point that formerly claimed no producer would run. + let outcome = diagnostics(&engine, &handshake).await; + resume.send(()).expect("resume the owner mount"); + let (_, _, server, _) = opening.await.unwrap().expect("project owner admission"); + drop(server); + let shutdown = engine.shutdown_all().await; + assert!(shutdown.project_servers.is_clean(), "{shutdown:?}"); + assert!(shutdown.background.unfinished().is_empty(), "{shutdown:?}"); + + let DaemonInvocationOutcome::ApplicationProblem { problem } = outcome else { + panic!("an appointed producer must report its pending state: {outcome:?}"); + }; + assert_eq!( + problem.diagnostic().expect("pending diagnostic").code, + "application.diagnostics.pending", + "the public runtime must not claim that its appointed producer is unsupported" + ); +} + async fn register_work_for_configuration( engine: &DaemonEngine, target_root: &Path, diff --git a/crates/tracedecay/src/dashboard/observation_seed.rs b/crates/tracedecay/src/dashboard/observation_seed.rs index 12b7d5b8c98..bf6422e5e75 100644 --- a/crates/tracedecay/src/dashboard/observation_seed.rs +++ b/crates/tracedecay/src/dashboard/observation_seed.rs @@ -19,7 +19,6 @@ use tracedecay_domain::{ SanitizationReceiptId, SanitizationReceiptRefV1, SanitizationReceiptV1, SanitizerDispositionV1, SensitivityV1, SessionId, UtcMicros, }; -use tracedecay_session_temporal_store::SessionTemporalAccess; use tracedecay_store::{ AnchoredObservationWrite, ObservationProjectionStore, ObservationStore, ObservationWrite, build_observation_resolution_authorization_v1, build_observation_retrieval_anchor, @@ -237,11 +236,9 @@ pub async fn seed_session_message_observations_for_test( Ok(()) } -/// Materializes the pending session-temporal refresh so the seeded -/// observations become readable through the daemon retrieval authority, then -/// re-applies the session relation projection for the newly-active -/// generation, the step the daemon's LCM effects loop performs after every -/// production refresh, without which summary lineage reads go relation-blind. +/// Materializes the pending session-temporal refresh through production +/// completion, which writes and verifies the native relation graph before +/// activating the seeded observations for the daemon retrieval authority. pub async fn materialize_session_temporal_refresh_for_test( project_database: &RegisteredGlobalDb, session_id: &str, @@ -261,21 +258,5 @@ pub async fn materialize_session_temporal_refreshes_for_test( tracedecay_session_temporal_store::SessionTemporalStore::new(project_database) .materialize_pending_session_refreshes_for_test(&session_ids) .await - .map_err(|error| fixture_error("materialize session refresh", error))?; - SessionTemporalAccess::new(project_database) - .apply_active_session_relation_projections_for_test( - &session_ids, - std::sync::Arc::new(DashboardFixtureGraphCancellation), - ) - .await - .map_err(|error| fixture_error("apply session relation projection", error))?; - Ok(()) -} - -struct DashboardFixtureGraphCancellation; - -impl tracedecay_graph_db::GraphCancellation for DashboardFixtureGraphCancellation { - fn is_cancelled(&self) -> bool { - false - } + .map_err(|error| fixture_error("materialize session refresh", error)) } diff --git a/crates/tracedecay/tests/common/mod.rs b/crates/tracedecay/tests/common/mod.rs index 3cea2149c3d..cc00c809dbe 100644 --- a/crates/tracedecay/tests/common/mod.rs +++ b/crates/tracedecay/tests/common/mod.rs @@ -523,14 +523,12 @@ exit /b %ERRORLEVEL%\r\n" ) } -/// Small multi-thread runtime for `#[test]`-driven async dashboard fixtures. +/// Small runtime with production scheduling for dashboard fixtures. pub fn create_runtime() -> tokio::runtime::Runtime { - match tokio::runtime::Builder::new_multi_thread() - // Dashboard tests issue synchronous ureq calls while the in-process - // server and database handlers use this same runtime. Two workers can - // deadlock under load (one blocked in ureq, one awaiting DB work). + match tracedecay_runtime_core::native_runtime::default_builder() + // Keep the fixture's worker count while using the daemon's wake + // policy: work woken during a long poll must remain stealable. .worker_threads(4) - .enable_all() .build() { Ok(runtime) => runtime, diff --git a/mockups/ui-concept-v2/app/package-lock.json b/mockups/ui-concept-v2/app/package-lock.json index c4cb4c9c32b..eed10be5a12 100644 --- a/mockups/ui-concept-v2/app/package-lock.json +++ b/mockups/ui-concept-v2/app/package-lock.json @@ -38,21 +38,21 @@ "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==" }, "node_modules/@emnapi/core": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz", - "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==", + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.3.tgz", + "integrity": "sha512-KA+gOBtbifRATmUa/Gpf5C2B2EJ0r4brHUT3XSgACeHREcuiObXH56xd+B3fFsEFbUT04VBEe6MuZiCtMp0tQg==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.3", + "@emnapi/wasi-threads": "2.2.0", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.3.tgz", + "integrity": "sha512-ayb/PyyLzpwRyFVxeC0uoEHu59QlB1iWGcGsOpXQcaB/Dc+uGfBmNmpCHp3HmTT0t8lSsMmg3j7+tdJW/TlHjQ==", "dev": true, "license": "MIT", "optional": true, @@ -61,9 +61,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz", - "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz", + "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==", "dev": true, "license": "MIT", "optional": true, @@ -72,33 +72,36 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", - "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.7.tgz", + "integrity": "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==", "dev": true, "license": "MIT", "optional": true, "dependencies": { "@tybys/wasm-util": "^0.10.3" }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/Brooooooklyn" }, "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" + "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3", + "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3" } }, "node_modules/@rsbuild/core": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.1.tgz", - "integrity": "sha512-dv5tL7djb8ex5z4sqnDmUbd5PnGNr/CXuFfiMD4RkUsF1JEZZkGH8lc+QW4fqYQIHM7RTvcMUakgvwVU/O9WMw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.2.tgz", + "integrity": "sha512-1mjHhBYX1Z+knee55SV/+6KsEVmdjEQ1h73VzXUQYD+sfncuN+6+duVx7nYYVXz1zBP4QfpQt+74gTNAxKz+Hg==", "dev": true, "license": "MIT", "dependencies": { - "@rspack/core": "~2.3.1", - "@swc/helpers": "^0.5.23" + "@rspack/core": "~2.3.2", + "@swc/helpers": "^0.5.24" }, "bin": { "rsbuild": "bin/rsbuild.js" @@ -135,32 +138,32 @@ } }, "node_modules/@rspack/binding": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.1.tgz", - "integrity": "sha512-pfCJGBFNK2tnNnoDP6ZoTbOjxbKr1U2eGFDJ8bIuZQai4FBNhWQlKFmNup+X5K935XYRulZBomIBAL6GL6W2YQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.2.tgz", + "integrity": "sha512-JlzyN4N6sRykZVwEFz3Kb8IsrTg8mlbNd/AqVmVyqr35Pg7OvxelTcYRL/Dpb2IMhmfpbzYbFigHyXS2CzibVQ==", "dev": true, "license": "MIT", "optionalDependencies": { - "@rspack/binding-darwin-arm64": "2.3.1", - "@rspack/binding-darwin-x64": "2.3.1", - "@rspack/binding-linux-arm64-gnu": "2.3.1", - "@rspack/binding-linux-arm64-musl": "2.3.1", - "@rspack/binding-linux-ppc64-gnu": "2.3.1", - "@rspack/binding-linux-riscv64-gnu": "2.3.1", - "@rspack/binding-linux-riscv64-musl": "2.3.1", - "@rspack/binding-linux-s390x-gnu": "2.3.1", - "@rspack/binding-linux-x64-gnu": "2.3.1", - "@rspack/binding-linux-x64-musl": "2.3.1", - "@rspack/binding-wasm32-wasi": "2.3.1", - "@rspack/binding-win32-arm64-msvc": "2.3.1", - "@rspack/binding-win32-ia32-msvc": "2.3.1", - "@rspack/binding-win32-x64-msvc": "2.3.1" + "@rspack/binding-darwin-arm64": "2.3.2", + "@rspack/binding-darwin-x64": "2.3.2", + "@rspack/binding-linux-arm64-gnu": "2.3.2", + "@rspack/binding-linux-arm64-musl": "2.3.2", + "@rspack/binding-linux-ppc64-gnu": "2.3.2", + "@rspack/binding-linux-riscv64-gnu": "2.3.2", + "@rspack/binding-linux-riscv64-musl": "2.3.2", + "@rspack/binding-linux-s390x-gnu": "2.3.2", + "@rspack/binding-linux-x64-gnu": "2.3.2", + "@rspack/binding-linux-x64-musl": "2.3.2", + "@rspack/binding-wasm32-wasi": "2.3.2", + "@rspack/binding-win32-arm64-msvc": "2.3.2", + "@rspack/binding-win32-ia32-msvc": "2.3.2", + "@rspack/binding-win32-x64-msvc": "2.3.2" } }, "node_modules/@rspack/binding-darwin-arm64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.1.tgz", - "integrity": "sha512-koLyL2r8PUcLD0StjuZ/n5XM6GJ0C8dzJN0IuIV9d7nQcibJxwjjSAWEPGVz6bm8WuzypvuVKNoa1+GGAHeMQA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.2.tgz", + "integrity": "sha512-6ouAc7766psf4i7E1jk4oE99GhHBYh3JwJhHkmortSig9dJzonPM7VIhP7yHdclw7iKNNrC+XMIw9HtcVTLxnw==", "cpu": [ "arm64" ], @@ -172,9 +175,9 @@ ] }, "node_modules/@rspack/binding-darwin-x64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.1.tgz", - "integrity": "sha512-YK39JLiu1YC6+3BMxkP7e848pHD7e2T/0OSNogDi7whfiZNg95wa9Ncd7I5ppAf0nhmV+FNew/sCBIFp5h67Jw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.2.tgz", + "integrity": "sha512-C9dhmWDeuuXjmSos2hJ2OBOcafGLxB5HKbW9JprVcd0ZIBx3KSv2Wr4/BsQE1Gxx0JSTRYeeBs0Wpmqi2p24BQ==", "cpu": [ "x64" ], @@ -186,9 +189,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.1.tgz", - "integrity": "sha512-Q+RCA/KM2tn6m6R5U4lktXDs5cCRm3SyleQk86iqqUFX7wKzVRUvr5BTsreg6K9of3gpYmQ6+g1PGT5cwo0rLA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.2.tgz", + "integrity": "sha512-+W67rrYxpKv+7Owe3Yi+GNHmvipCVJ+BxJuGi6VBL6R9Y4MP4ur/U2xxULE3Fe29hUrsq5xaiXAFAssocI63AA==", "cpu": [ "arm64" ], @@ -203,9 +206,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-musl": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.1.tgz", - "integrity": "sha512-He+muVDON1fohGtdYamh3zHVwf6/E6fZu/+iEAkxjclE0P94bsCfYVcZW/a4/l1tJ2zvLZtB4jD7Qr6r4vG/WA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.2.tgz", + "integrity": "sha512-A1c3WMnAGVCUyKvqded3bUf4WWnAU4qKWJXoU2AtTa9KSfURbi2svn3hFk5PT9M/QVDwHEGkz29TgfX2FSc/zw==", "cpu": [ "arm64" ], @@ -220,9 +223,9 @@ ] }, "node_modules/@rspack/binding-linux-ppc64-gnu": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.1.tgz", - "integrity": "sha512-blIZUgyPt4FcSHkZL6sJ2xbzc7ACgDeU49An4mXLSebwdgnlhTzxeSFnh2VeJDlGza8CUaZYB/zS/6oZ2kCDcw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.2.tgz", + "integrity": "sha512-p+m1JbiKUN0l2Q0I2ielf+spuVv4OKW0dEJUZ6Pxm/KbFEENptAdwOvjrAmUwFFAiNJN6phEDY6/PAcP+DkmIQ==", "cpu": [ "ppc64" ], @@ -237,9 +240,9 @@ ] }, "node_modules/@rspack/binding-linux-riscv64-gnu": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.1.tgz", - "integrity": "sha512-3FtW2DUFmXxhBORUA3zSc+ot4d6R/1/U6z/48TDN4jeIYDUG9VqYBF6LUohX4vBY6IP0DCyXb2N9WayD/9QXoA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.2.tgz", + "integrity": "sha512-3aPE11BZ0GxJfaAXS6OjpgUpUE2twRRPR+Lx5YfSMVcLw/m74m4U4bE8q39TsR4+LbaKSn7fhZ7xK06yA1o+kg==", "cpu": [ "riscv64" ], @@ -254,9 +257,9 @@ ] }, "node_modules/@rspack/binding-linux-riscv64-musl": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.1.tgz", - "integrity": "sha512-+5qNgdNdXzp/K8f8BjgJ3m7tcbBKPENN7WPDfBcSHvWb5GF4+o/pbrX26c0+LEugo0bYUOAoitBNd94AwcNvpA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.2.tgz", + "integrity": "sha512-mFRYh2zIuNmaTPIsgXMpZP1NYhysyDEsmheiG/Zr5XE1nQEMj/otxrGl3pj5EFuab4GnwWlBo5M8F0ppvsizYw==", "cpu": [ "riscv64" ], @@ -271,9 +274,9 @@ ] }, "node_modules/@rspack/binding-linux-s390x-gnu": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.1.tgz", - "integrity": "sha512-yNcg/y1+MV0wZ984CVU4d1HAYYwMcDPXoQO0xynU+K5YuBxPWALHOxuRRCKCcykBdL1GIEshAIewEFrsW/cmJg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.2.tgz", + "integrity": "sha512-c6aamcvr9vFdccsOX4cPecG1G06aZxsmMWKzQRkcvbrNYR+RwNTGa5iM13KkopktCZgZX7MJo1UNYEN+UK3JHw==", "cpu": [ "s390x" ], @@ -288,9 +291,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-gnu": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.1.tgz", - "integrity": "sha512-ffclKBuH8wwimOBd6xGUxrBfVKKY5Ow4E7OFdHZeg4xffm2O8auGszmOgvFu1eoDoOYHaVJn+cEV6UD0KwZk8A==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.2.tgz", + "integrity": "sha512-l/WCW3RSfJn5eAcWciqZGazhLIj1d8KjfzTAic8XwDFj5JlVwT5i2BhrOSf9b42WNrKrxtsRPFw9UoCKAunDzg==", "cpu": [ "x64" ], @@ -305,9 +308,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-musl": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.1.tgz", - "integrity": "sha512-qcDwwuyxR7TMtrW+r5Y9RIW25boXd1Ip/9jz04jhdq/OiU/Am7rCP2X90CH8sWdzovIF9UNmsGjY4KklR0F2Mg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.2.tgz", + "integrity": "sha512-iHPYQWl6pwlzn1NNNvC+ag42uoAoQs0iPP1OEmBIYT2unXpWHnGhr4t8+uN7epD2fNYZ8HZQw1lPAgB6z7LNgA==", "cpu": [ "x64" ], @@ -322,9 +325,9 @@ ] }, "node_modules/@rspack/binding-wasm32-wasi": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.1.tgz", - "integrity": "sha512-3dr6zjFaCK3A920ftCriSJkiRhEfhHtat7LtBdj6g0mcV5Rt+iealmli0vjeAvD0UdpE1u8EKWlfw82JLgFLSQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.2.tgz", + "integrity": "sha512-es9ts6uw29/JNd5lZcb5bviCZYgUf1W6TAnbZB1HQjJvh7+DPYtD+27tLKzpSjlkqkPfIWyzNnR4aM9NZWoFrA==", "cpu": [ "wasm32" ], @@ -332,15 +335,15 @@ "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "1.11.3", - "@emnapi/runtime": "1.11.3", - "@napi-rs/wasm-runtime": "1.1.6" + "@emnapi/core": "2.0.0-beta.3", + "@emnapi/runtime": "2.0.0-beta.3", + "@napi-rs/wasm-runtime": "1.2.7" } }, "node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.1.tgz", - "integrity": "sha512-AZbuLPylt1xvWssN93AsirbYs3WgfcrA8tMsqHmVJIHahLu9E+JPKZ3Gmsw6IYEZk3EfnV3ujQzeQ1/VfF0Vsw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.2.tgz", + "integrity": "sha512-nAzwd0tslZF8vUeYYUWrxrulfB+ZInCT+jsUNq3AoH3D4fQRRq327omaxOD0ngtHtiiX/mwdmobNlLBHNgZ+RA==", "cpu": [ "arm64" ], @@ -352,9 +355,9 @@ ] }, "node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.1.tgz", - "integrity": "sha512-R5NVU68TePZcgRdYUzrQX9YFNxmcyXZEPwaPv40AAgsqNyacG3iRaYVmV79jt3rWYfa0QJaqvRLUchDe2SZ6zQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.2.tgz", + "integrity": "sha512-yihZFNqOHwZd0I/z3MphJy/l5iNvuYsG0Gv3VuuqIgxZX4yS2DokqpDaWf2DnrZxB3yGSBt+IqZWQg/qzITBoA==", "cpu": [ "ia32" ], @@ -366,9 +369,9 @@ ] }, "node_modules/@rspack/binding-win32-x64-msvc": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.1.tgz", - "integrity": "sha512-5T9DYjNPQpLbrNXjCssGd2B6xMQPlc3LxVOKHGUA1O0GV+88vBkTXAcryJ+Fo+yVEMPCzp4VvwBMGAVDpCjcSA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.2.tgz", + "integrity": "sha512-I/aOF3eXODB+4zjiSSf5KXxQG4NeNoeyYOOmRyxQxdPU9/yjCSBKrKpcS6ZerK2DCYdl5V6+mwO50E25TvpVXg==", "cpu": [ "x64" ], @@ -380,13 +383,13 @@ ] }, "node_modules/@rspack/core": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.1.tgz", - "integrity": "sha512-9BWfaiEJLgLK9U53Q4WVruBZ19Mu/XWHXHEu0UFla4lUtH8Z+/ET2m044tiqbtyIgqQyG58fMrxHeVIAiXMXHg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.2.tgz", + "integrity": "sha512-1gnot46X+O6z1qtnMw7KAFSuNDTaybn+I5rc1o0czwmRu80wbXNTCtPRstwmeQOuUU6tp5gYFRTIPrFH1YUxaQ==", "dev": true, "license": "MIT", "dependencies": { - "@rspack/binding": "2.3.1" + "@rspack/binding": "2.3.2" }, "engines": { "node": "^20.19.0 || >=22.12.0" @@ -421,13 +424,11 @@ } }, "node_modules/@swc/helpers": { - "version": "0.5.23", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz", - "integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==", + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.24.tgz", + "integrity": "sha512-6tcXo4kA8HgGO7AVmawB57RYi/piBPYVHVcO6dXjX+SZw8GoHmi262sp4v2Ha2kNP9Cx84qei27yT+fjS1lxgg==", "dev": true, - "dependencies": { - "tslib": "^2.8.0" - } + "license": "Apache-2.0" }, "node_modules/@tweenjs/tween.js": { "version": "23.1.3", @@ -1241,10 +1242,12 @@ "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" }, "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "dev": true, + "license": "0BSD", + "optional": true }, "node_modules/typescript": { "version": "7.0.2", diff --git a/plugin/chatgpt-extension/embedded/app.html b/plugin/chatgpt-extension/embedded/app.html index dc8b8ae7b5f..22066b652e9 100644 --- a/plugin/chatgpt-extension/embedded/app.html +++ b/plugin/chatgpt-extension/embedded/app.html @@ -7,12 +7,9 @@
- +- "app": Tool callable by the app from this server only`),csp:i0().optional(),permissions:i0().optional()}),i4({mimeTypes:i2(im()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),i4({method:rs("ui/download-file"),params:i4({contents:i2(i6([a0,a1])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),i4({method:rs("ui/message"),params:i4({role:rs("user").describe('Message role, currently only "user" is supported.'),content:i2(a2).describe("Message content blocks (text, image, etc.).")})}),i4({method:rs("ui/notifications/sandbox-resource-ready"),params:i4({html:im().describe("HTML content to load into the inner iframe."),sandbox:im().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ue.optional().describe("CSP configuration from resource metadata."),permissions:ut.optional().describe("Sandbox permissions from resource metadata.")})}),i4({method:rs("ui/notifications/tool-result"),params:st.describe("Standard MCP tool execution result.")})),uf=i4({toolInfo:i4({id:rW.optional().describe("JSON-RPC id of the tools/call request."),tool:a7.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:c4.optional().describe("Current color theme preference."),styles:ua.optional().describe("Style configuration for theming the app."),displayMode:c3.optional().describe("How the UI is currently displayed."),availableDisplayModes:i2(c3).optional().describe("Display modes the host supports."),containerDimensions:i6([i4({height:iU().describe("Fixed container height in pixels.")}),i4({maxHeight:i6([iU(),iV()]).optional().describe("Maximum container height in pixels.")})]).and(i6([i4({width:iU().describe("Fixed container width in pixels.")}),i4({maxWidth:i6([iU(),iV()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:im().optional().describe("User's language and region preference in BCP 47 format."),timeZone:im().optional().describe("User's timezone in IANA format."),userAgent:im().optional().describe("Host application identifier."),platform:i6([rs("web"),rs("desktop"),rs("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:i4({touch:iF().optional().describe("Whether the device supports touch input."),hover:iF().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:i4({top:iU().describe("Top safe area inset in pixels."),right:iU().describe("Right safe area inset in pixels."),bottom:iU().describe("Bottom safe area inset in pixels."),left:iU().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),ug=i4({method:rs("ui/notifications/host-context-changed"),params:uf.describe("Partial context update containing only changed fields.")}),uy=(i4({method:rs("ui/update-model-context"),params:i4({content:i2(a2).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:rn(im(),iY().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),i4({method:rs("ui/initialize"),params:i4({appInfo:r6.describe("App identification (name and version)."),appCapabilities:ud.describe("Features and capabilities this app provides."),protocolVersion:im().describe("Protocol version this app supports.")})}),i4({protocolVersion:im().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:r6.describe("Host application identification and version."),hostCapabilities:uu.describe("Features and capabilities provided by the host."),hostContext:uf.describe("Rich context about the host environment.")}).passthrough()),uv={target:"draft-2020-12"};async function uS(e,t){let o=e["~standard"];if(o.jsonSchema)return o.jsonSchema[t](uv);throw Error(`Schema (vendor: ${o.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function u_(e,t,o=""){let n=await e["~standard"].validate(t);if(n.issues)throw Error(o+n.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; "));return n.value}class ub extends cA{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new cQ;_methods=new c0;setRequestHandler=(...e)=>{let[t,...o]=c2("request",e)??e;this._methods.claim(t,"setRequestHandler"),super.setRequestHandler.call(this,t,...o)};setNotificationHandler=(...e)=>{let[t,...o]=c2("notification",e)??e;this._methods.claim(t,"setNotificationHandler"),super.setNotificationHandler.call(this,t,...o)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:uo,toolinputpartial:un,toolresult:uh,toolcancelled:ui,hostcontextchanged:ug};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!ub.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t}),this._events.dispatch(e,t)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,o){t&&o&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},o={autoResize:!0}){super(o),this._appInfo=e,this._appCapabilities=t,this.options=o,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),o.allowUnsafeEval||ex({jitless:!0}),this.replaceRequestHandler("ping",e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){var t;let o;if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=(t=this._appCapabilities,o={...t,...e},void 0!==e.experimental&&(o.experimental={...t.experimental,...e.experimental}),void 0!==e.tools&&(o.tools={...t.tools,...e.tools}),o)}registerTool(e,t,o){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let n=this,i=()=>{n._initializedSent&&n._appCapabilities.tools?.listChanged&&n.sendToolListChanged()},r=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){n._registeredTools[e]===a&&(delete n._registeredTools[e],i())},handler:async(t,n)=>{let i;if(!a.enabled)throw Error(`Tool ${e} is disabled`);if(r){let r=a.inputSchema,s=r?await u_(r,t??{},`Invalid input for tool ${e}: `):t??{};i=await o(s,n)}else i=await o(n);return a.outputSchema&&!i.isError&&(i.structuredContent=await u_(a.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=a,this._appCapabilities.tools||this.transport||this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let o=this._registeredTools[e.name];if(!o)throw Error(`Tool ${e.name} not found`);return o.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let o={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await uS(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(o.outputSchema=await uS(t.outputSchema,"output")),t.annotations&&(o.annotations=t.annotations),t._meta&&(o._meta=t._meta),o}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:us.shape.params,result:ul},(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},c8,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},r1,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},c6,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},c7,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},up,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,o=0,n=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let n=document.documentElement,i=n.style.height;n.style.height="max-content";let r=Math.ceil(n.getBoundingClientRect().height);n.style.height=i;let a=Math.ceil(window.innerWidth);(a!==t||r!==o)&&(t=a,o=r,this.sendSizeChanged({width:a,height:r}))}))};n();let i=new ResizeObserver(n);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new c9(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let o=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},uy,t);if(void 0===o)throw Error(`Server sent invalid initialize result: ${o}`);this._hostCapabilities=o.hostCapabilities,this._hostInfo=o.hostInfo,this._hostContext=o.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}let uR=new Set(["projects","search","symbol","failure"]);function uw(e){switch(e.kind){case"projects":return"/";case"project":return`/projects/${encodeURIComponent(e.project_id)}`;case"search":return`/projects/${encodeURIComponent(e.project_id)}/search?q=${encodeURIComponent(e.query)}`;case"symbol":return`/projects/${encodeURIComponent(e.project_id)}/symbols/${encodeURIComponent(e.node_id)}`}}let uk=document.getElementById("root");if(null===uk)throw Error("app root element missing");let ux=new ub({name:"tracedecay-code-explorer",version:"0.0.0"},{availableDisplayModes:["inline","fullscreen"]}),uT={phase:"connecting"},uz=[],uP=null,uC=null,uE=null;function u$(){let e=uC;uC=null,e?.abort()}function uq(e){uT=e,u4()}function uO(){return"view"===uT.phase?uT.view:"loading"===uT.phase?uT.previous:null}function uI(e){u$(),uE="projects"===e.page?e.query:null,"projects"===e.page&&(uz="ready"===e.projects.state?e.projects.data.projects:[]),uq({phase:"view",view:e}),uM(e)}function uj(e){var t;return"object"==typeof(t=e.structuredContent)&&null!==t&&"page"in t&&"string"==typeof t.page&&uR.has(t.page)?e.structuredContent:null}async function uN(e,t,o,n){u$();let i=new AbortController;uC=i,void 0!==n&&(uE=n),uq({phase:"loading",label:o,previous:uO(),projectQuery:n});try{let o=await ux.callServerTool({name:e,arguments:t},{signal:i.signal});if(uC!==i)return;uC=null;let n=uj(o);if(null===n)return void uq({phase:"host_error",message:`${e} returned no view payload`});uI(n)}catch(e){if(uC!==i)return;uC=null,uq({phase:"host_error",message:e instanceof Error?e.message:String(e)})}}async function uM(e){let t=function(e){switch(e.page){case"projects":return null;case"search":var t;return{content:[{type:"text",text:`TraceDecay search in ${e.project.label} for "${e.query}": ${function(e,t){switch(e.state){case"ready":return t(e.data);case"empty":return e.message;case"failed":return`${e.failure.kind}: ${e.failure.message}`}}(e.results,e=>`${e.hits.length} hit(s), recall ${e.recall}${e.undisplayable.length>0?`, ${e.undisplayable.length} undisplayable`:""}`)}${null===(t=e.provenance)?"":` [reported project status: branch ${t.branch??"?"} commit ${t.commit??"?"} generation ${t.generation??"?"} freshness ${t.freshness.state}]`}`}],structuredContent:{page:"search",project_id:e.project.project_id,query:e.query,deep_link:uw({kind:"search",project_id:e.project.project_id,query:e.query}),provenance:e.provenance}};case"symbol":if(null===e.evidence)return null;return{content:[{type:"text",text:e.evidence.markdown}],structuredContent:e.evidence.structured};case"failure":return{content:[{type:"text",text:`TraceDecay could not answer (${e.failure.kind}/${e.failure.code}): ${e.failure.message}`}],structuredContent:{page:"failure",failure:e.failure}}}}(e);if(null!==t)try{await ux.updateModelContext(t)}catch{}}function uA(){uN("tracedecay_workspace",{},"Loading registered projects…","")}function uL(e){let t=e.trim();uN("tracedecay_search_projects",{query:t},""===t?"Loading recent projects…":`Searching projects for "${t}"…`,t)}function uU(e){uI({page:"search",project:e,query:"",results:{state:"empty",message:"Type a symbol name or phrase to search this project."},provenance:null})}function uH(e,t){uN("tracedecay_search_code",{project_id:e,query:t},`Searching for "${t}"…`)}function uZ(e,t){uN("tracedecay_inspect_symbol",{project_id:e,node_id:t},"Loading symbol…")}function uD(e){let t,o="string"==typeof(t=Reflect.get(e,"openai/deepLink"))?t:"object"==typeof t&&null!==t&&"url"in t&&"string"==typeof t.url?t.url:null;if(null===o||o===uP)return;uP=o;let n=function(e){let t;try{t=new URL(e,"https://tracedecay.invalid")}catch{return null}let o=t.pathname.split("/").filter(e=>e.length>0).map(decodeURIComponent);if(0===o.length)return{kind:"projects"};if("projects"!==o[0]||void 0===o[1])return null;let n=o[1];return 2===o.length?{kind:"project",project_id:n}:"search"===o[2]&&3===o.length?{kind:"search",project_id:n,query:t.searchParams.get("q")??""}:"symbols"===o[2]&&void 0!==o[3]&&4===o.length?{kind:"symbol",project_id:n,node_id:o[3]}:null}(o);null!==n&&function(e){switch(e.kind){case"projects":uA();return;case"project":{let t=uz.find(t=>t.project_id===e.project_id);void 0!==t?uU(t):uH(e.project_id,"");return}case"search":uH(e.project_id,e.query);return;case"symbol":uZ(e.project_id,e.node_id);return}}(n)}function uF(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=document.createElement(e);for(let[e,o]of Object.entries(t))n.setAttribute(e,o);return n.append(...o),n}function uJ(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=uF("button",{type:"button",...o},[e]);return n.addEventListener("click",t),n}function uV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"neutral",o=arguments.length>2?arguments[2]:void 0,n={class:"neutral"===t?"badge":`badge ${t}`};return void 0!==o&&(n["data-testid"]=o),uF("span",n,[e])}function uB(e){return"stale"===e.kind||"unavailable"===e.kind?"warn":"bad"}function uW(e){switch(e){case"current":case"fresh":return"ok";case"stale":case"possibly_stale":case"warming":case"restoring":return"warn";case"parked":case"unavailable":return"bad"}}function uG(e,t,o){return uF("p",{class:"neutral"===t?"notice":`notice ${t}`,"data-testid":o},[e])}function uK(e,t){let o=uG(`${e.message} (${e.code})`,uB(e),t);return o.prepend(uV(e.kind,uB(e),`${t}-kind`)," "),o}function uX(e,t,o){switch(e.state){case"ready":return o(e.data);case"empty":return uG(e.message,"neutral",`${t}-empty`);case"failed":return uK(e.failure,`${t}-failed`)}}function uY(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return uF("section",{class:"panel","data-testid":t},[uF("h2",{},[e,...n]),...o])}function uQ(e,t){return uJ(t.qualified_name||t.name,()=>uZ(e,t.node_id),{class:"mono","data-testid":"symbol-link","data-node-id":t.node_id})}function u0(e){let t=null===e.start_line?"":`:${e.start_line}`;return uF("span",{class:"loc"},[`${e.file}${t}`])}function u1(e,t){let o,n,i,r="connected"===e.daemon.state?uF("p",{class:"notice","data-testid":"daemon-state"},[uV("connected","ok","daemon-badge"),` tracedecay ${e.daemon.version} (pid ${e.daemon.pid}) \xb7 profile `,uF("code",{},[e.daemon.profile_root])]):uK(e.daemon.failure,"daemon-state"),a=uX(e.projects,"projects",t=>{let o=uF("ul",{class:"list"},t.projects.map(e=>uF("li",{"data-testid":"project-row"},[uJ(e.label,()=>uU(e),{class:"primary","data-testid":"project-open","data-project-id":e.project_id}),uF("span",{class:"loc"},[e.project_root]),null===e.head_branch?"":uV(e.head_branch)]))),n=`${t.projects.length} project(s) shown (up to ${t.limit}).`;return uF("div",{},[uG(t.truncated?`${n} More ${""===e.query?"registered projects are available; search to find projects outside this recent list":"matches are available; refine your search to find a specific project"}.`:`${n} ${""===e.query?"All registered projects are shown":"All matching projects are shown"}.`,t.truncated?"warn":"neutral","projects-completeness"),o])}),s=uY(""===e.query?"Recent registered projects":`Projects matching "${e.query}"`,"projects-panel",[a]);return[r,(o=uF("input",{type:"search",name:"project-query",placeholder:"Find a registered project…",value:uE??t??e.query,"data-testid":"project-search-input","aria-label":"Find registered projects"}),n=()=>uL(o.value),i=uF("form",{class:"search project-search","data-testid":"project-search-form",role:"search","aria-label":"Registered projects"},[o,uJ("Find projects",n,{class:"primary","data-testid":"project-search-submit"}),uJ("Recent projects",()=>uL(""),{"data-testid":"project-search-recent"})]),o.addEventListener("input",()=>{if(uE=o.value,"loading"===uT.phase&&void 0!==uT.projectQuery&&uT.previous?.page==="projects"){let e=uT.previous;u$(),uq({phase:"view",view:e})}}),o.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),n())}),i.addEventListener("submit",e=>e.preventDefault()),i),...void 0===t?[]:[uF("p",{class:"loading",role:"status","data-testid":"loading"},[`${"loading"===uT.phase?uT.label:"Loading projects…"} Previous results remain below.`])],s,uF("p",{class:"notice"},["Search registered project paths, aliases, IDs, or default branches. Only projects registered in this TraceDecay profile (via `tracedecay init`) can be explored."])]}function u2(e,t){let o=uF("input",{type:"search",name:"q",placeholder:`Search ${e.label}…`,value:t,"data-testid":"search-input","aria-label":"Search query"}),n=()=>{let t=o.value.trim();t.length>0&&uH(e.project_id,t)},i=uF("form",{class:"search","data-testid":"search-form"},[o,uJ("Search",n,{class:"primary","data-testid":"search-submit"})]);return o.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),n())}),i.addEventListener("submit",e=>e.preventDefault()),i}function u9(e,t){if(null===e)return uY("Project status","provenance",[uG("Project status is reported once the project answers a request.","neutral","provenance-pending")]);let o=[["project",uF("code",{},[e.project_id])],["worktree",uF("code",{},[e.worktree_id??e.project_root])],["repository",uF("code",{},[e.repository_id??"—"])],["ref",e.reference??e.branch??"—"],["commit",uF("code",{"data-testid":"provenance-commit"},[e.commit??"—"])],["generation",uF("code",{},[e.generation??"—"])],["coverage",uF("span",{},[uV(e.coverage.recall,"full"===e.coverage.recall?"ok":"warn","coverage-badge"),null===e.coverage.detail?"":` ${e.coverage.detail}`])],["daemon",null===e.authority?"unavailable":`${e.authority.daemon_version} \xb7 pid ${e.authority.daemon_pid}`],["deep link",uF("code",{"data-testid":"deep-link"},[uw(t)])]],n=uF("dl",{class:"prov"},o.flatMap(e=>{let[t,o]=e;return[uF("dt",{},[t]),uF("dd",{},[o])]})),i=uV(e.freshness.state,uW(e.freshness.state),"freshness-badge"),r=[n];return null!==e.freshness.detail&&r.unshift(uG(e.freshness.detail,"ok"===uW(e.freshness.state)?"neutral":"warn","freshness-detail")),uY("Project status (separate read)","provenance",r,[i])}function u4(){let e=document.activeElement,t=e instanceof HTMLElement&&null!==e.closest('[data-testid="project-search-form"]')?e.dataset.testid:void 0,o=e instanceof HTMLInputElement&&"project-search-input"===e.dataset.testid?e:null,n=null===o?null:[o.selectionStart,o.selectionEnd,o.selectionDirection];if(uk.replaceChildren(function(e){let t=uF("nav",{class:"crumbs","aria-label":"Breadcrumb"});t.append(uJ("Projects",uA,{"data-testid":"crumb-projects"}));let o=null!==e&&"projects"!==e.page?e.project:null;null!==o&&t.append("/",uJ(o.label,()=>uU(o),{"data-testid":"crumb-project"})),e?.page==="search"&&""!==e.query&&t.append("/",uF("span",{},[`"${e.query}"`])),e?.page==="symbol"&&"ready"===e.symbol.state&&t.append("/",uF("span",{class:"mono"},[e.symbol.data.name]));let n=uF("header",{class:"bar"},[uF("h1",{},["TraceDecay"]),t,uF("span",{class:"spacer"})]),i=ux.getHostContext()?.displayMode;if(void 0!==i){let e="fullscreen"===i?"inline":"fullscreen";n.append(uJ("fullscreen"===e?"Expand":"Collapse",()=>void ux.requestDisplayMode({mode:e}),{"data-testid":"toggle-display-mode"}))}return n}(uO()),...function(){switch(uT.phase){case"connecting":return[uF("p",{class:"loading","data-testid":"connecting"},["Connecting to ChatGPT…"])];case"loading":if(uT.previous?.page==="projects"&&void 0!==uT.projectQuery)return u1(uT.previous,uT.projectQuery);return[uF("p",{class:"loading","data-testid":"loading"},[uT.label])];case"host_error":return[uK({kind:"protocol",code:"host_call_failed",message:uT.message},"host-error"),uF("div",{class:"actions"},[uJ("Back to projects",uA,{class:"primary","data-testid":"back-to-projects"})])];case"view":var e,t,o;switch(uT.view.page){case"projects":return u1(uT.view);case"search":let n;return n=uX((e=uT.view).results,"results",t=>{let o=[uF("ul",{class:"list"},t.hits.map(t=>uF("li",{"data-testid":"search-hit"},[uV(t.kind),uQ(e.project.project_id,t),u0(t)])))];if("partial"===t.recall&&o.push(uG("Partial recall: the index is still converging, so some matches may be missing.","warn","results-partial")),t.truncated&&o.push(uG("Results were truncated to the first page.","neutral","results-truncated")),t.undisplayable.length>0){let e=[...new Set(t.undisplayable)].join(", ");o.push(uG(`${t.undisplayable.length} candidate(s) could not be displayed (${e}).`,"warn","results-undisplayable"))}return"ready"===e.results.state&&void 0!==e.results.generation&&e.provenance?.generation!==void 0&&e.results.generation!==e.provenance.generation&&o.push(uG(`Results were served from generation ${e.results.generation}, which differs from the reported project generation ${e.provenance.generation}.`,"warn","results-generation")),uF("div",{},o)}),[u2(e.project,e.query),uY(""===e.query?"Search":`Results for "${e.query}"`,"results-panel",[n]),u9(e.provenance,{kind:"search",project_id:e.project.project_id,query:e.query})];case"symbol":let i,r,a,s,l,c,u;return i=(t=uT.view).project.project_id,r=uX(t.symbol,"symbol",e=>{let t=[uF("p",{},[uV(e.kind)," ",uF("code",{"data-testid":"symbol-qualified-name"},[e.qualified_name])," ",u0(e)])];return null!==e.signature&&t.push(uF("pre",{class:"mono"},[e.signature])),null!==e.complexity&&t.push(uF("p",{class:"notice"},[`Cyclomatic complexity ${e.complexity}`])),e.unavailable_fields.length>0&&t.push(uG(`Not available for this symbol: ${e.unavailable_fields.join(", ")}`,"neutral","symbol-unavailable-fields")),uF("div",{},t)}),a=(e,o)=>uX(e,o,n=>{let r=[uF("ul",{class:"list"},n.map(e=>uF("li",{"data-testid":`${o}-row`},[uV(e.edge_kind),uQ(i,e.symbol),u0(e.symbol),e.dispatch_via_trait?uV("via trait"):""])))];return"ready"===e.state&&!0===e.truncated&&r.push(uG("Only the first page of relations is shown.","neutral",`${o}-truncated`)),"ready"===e.state&&void 0!==e.generation&&t.provenance?.generation!==void 0&&e.generation!==t.provenance.generation&&r.push(uG(`Served from generation ${e.generation}, which differs from the reported project generation ${t.provenance.generation}.`,"warn",`${o}-generation`)),uF("div",{},r)}),s=uX(t.impact,"impact",e=>{let t=[uF("ul",{class:"list"},e.nodes.map(e=>uF("li",{"data-testid":"impact-row"},[uV(`depth ${e.depth}`),uJ(e.name,()=>uZ(i,e.node_id),{class:"mono"}),uF("span",{class:"loc"},[`${e.file}:${e.line}`])])))];return t.push(e.complete?uG(`Complete within depth ${e.max_depth}.`,"neutral","impact-complete"):uG(`Partial: traversal stopped at depth ${e.max_depth}.`,"warn","impact-partial")),uF("div",{},t)}),l=uX(t.graph,"graph",e=>(function(e,t){let o=t.nodes.filter(e=>"caller"===e.role),n=t.nodes.filter(e=>"callee"===e.role),i=t.nodes.find(e=>"focus"===e.role),r=28*Math.max(o.length,n.length,1)+20,a="http://www.w3.org/2000/svg",s=document.createElementNS(a,"svg");s.setAttribute("class","graph"),s.setAttribute("viewBox",`0 0 640 ${r}`),s.setAttribute("role","img"),s.setAttribute("aria-label","Bounded caller/callee graph"),s.dataset.testid="graph";let l={caller:10,focus:220,callee:430},c=new Map,u=(t,o,n)=>{let i=l[n],u="focus"===n?r/2-10:10+28*o;c.set(t.node_id,{x:i,y:u});let d=document.createElementNS(a,"g");d.setAttribute("class",`node ${t.role}`),d.dataset.testid="graph-node",d.dataset.nodeId=t.node_id;let p=document.createElementNS(a,"rect");p.setAttribute("x",String(i)),p.setAttribute("y",String(u)),p.setAttribute("width","200"),p.setAttribute("height","20"),p.setAttribute("rx","4");let m=document.createElementNS(a,"text");m.setAttribute("x",String(i+6)),m.setAttribute("y",String(u+14)),m.textContent=t.name.length>28?`${t.name.slice(0,27)}…`:t.name;let h=document.createElementNS(a,"title");h.textContent=`${t.qualified_name} (${t.file})`,d.append(h,p,m),"focus"!==t.role&&d.addEventListener("click",()=>uZ(e,t.node_id)),s.append(d)};for(let e of(o.forEach((e,t)=>u(e,t,"caller")),n.forEach((e,t)=>u(e,t,"callee")),void 0!==i&&u(i,0,"focus"),t.edges)){let t=c.get(e.from),o=c.get(e.to);if(void 0===t||void 0===o)continue;let n=document.createElementNS(a,"path");n.setAttribute("class","edge"),n.setAttribute("d",`M ${t.x+200} ${t.y+10} C ${t.x+240} ${t.y+10}, ${o.x-40} ${o.y+10}, ${o.x} ${o.y+10}`),s.prepend(n)}let d=uF("div",{},[s]);return t.truncated&&d.append(uG(`Graph bounded to depth ${t.max_depth}; more relations exist than shown.`,"neutral","graph-truncated")),d})(i,e)),c=uF("div",{class:"actions"}),null!==(u=t.evidence)&&c.append(uJ("Send evidence to chat",()=>void ux.sendMessage({role:"user",content:[{type:"text",text:u.markdown}]}),{class:"primary","data-testid":"send-evidence"}),uJ("Re-share with model",()=>void uM(t),{"data-testid":"share-context"})),[u2(t.project,""),uY("Symbol","symbol-panel",[r,uG("Symbol and impact reads do not report a generation; their snapshot identity is unverified.","neutral","symbol-generation"),c]),uY("Callers","callers-panel",[a(t.callers,"callers")]),uY("Callees","callees-panel",[a(t.callees,"callees")]),uY("Impact","impact-panel",[s]),uY("Graph","graph-panel",[l]),u9(t.provenance,"ready"===t.symbol.state?{kind:"symbol",project_id:i,node_id:t.symbol.data.node_id}:{kind:"project",project_id:i})];case"failure":let d;return d=[uK((o=uT.view).failure,"page-failure")],"denied"===o.failure.kind&&d.push(uG("Only projects registered in this TraceDecay profile can be explored. Run `tracedecay init` in the repository and reopen the workspace.","neutral","denied-help")),"disconnected"===o.failure.kind&&d.push(uG("Start the daemon with `tracedecay daemon run` (or any tracedecay command) and retry.","neutral","disconnected-help")),d.push(uF("div",{class:"actions"},[uJ("Back to projects",uA,{class:"primary","data-testid":"back-to-projects"})])),null!==o.project&&d.unshift(u2(o.project,"")),[uY("Request failed","failure-panel",d)]}}}()),uk.dataset.phase=uT.phase,uk.dataset.page=uO()?.page??"",void 0!==t){let e=uk.querySelector(`[data-testid="${t}"]`);e?.focus({preventScroll:!0}),e instanceof HTMLInputElement&&null!==n&&e.setSelectionRange(...n)}}ux.ontoolinput=e=>{u$(),uq({phase:"loading",label:`Loading ${e.arguments?.query!==void 0?`search for "${String(e.arguments.query)}"`:"from TraceDecay"}…`,previous:uO()})},ux.ontoolresult=e=>{u$();let t=uj(e);null===t?uq({phase:"host_error",message:"The tool result carried no TraceDecay view payload."}):uI(t)},ux.onhostcontextchanged=e=>{uD(e),u4()},ux.onteardown=async()=>(u$(),{}),window.addEventListener("pagehide",u$),u4(),ux.connect().then(()=>{let e=ux.getHostContext();void 0!==e&&uD(e),"connecting"===uT.phase&&uq({phase:"loading",label:"Waiting for TraceDecay…",previous:null})}).catch(e=>uq({phase:"host_error",message:e instanceof Error?e.message:String(e)}))})(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce78e388b41..c2fb1984eda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -229,10 +229,10 @@ importers: version: 1.65.0 '@rsbuild/core': specifier: ^2.2.13 - version: 2.3.1 + version: 2.3.2 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.1.1(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.1.1(@rsbuild/core@2.3.2)(@rspack/core@2.3.2(@swc/helpers@0.5.24)) '@tailwindcss/postcss': specifier: ^4.0.0 version: 4.3.5 @@ -308,7 +308,7 @@ importers: version: 1.65.0 '@rsbuild/core': specifier: ^2.2.13 - version: 2.3.1 + version: 2.3.2 '@rslib/core': specifier: ^1.0.0 version: 1.0.7(typescript@7.0.2) @@ -536,21 +536,12 @@ packages: resolution: {integrity: sha512-aalGyl7dbB5PArRebDIX43ZvBlXrYm9uWzGJ26t+4SzJVPsOuvfILGGbw5X4yX7i50YEmJ8zvbiWnqH/AAnZqg==} engines: {node: '>=22'} - '@emnapi/core@1.11.3': - resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} - '@emnapi/core@2.0.0-beta.3': resolution: {integrity: sha512-KA+gOBtbifRATmUa/Gpf5C2B2EJ0r4brHUT3XSgACeHREcuiObXH56xd+B3fFsEFbUT04VBEe6MuZiCtMp0tQg==} - '@emnapi/runtime@1.11.3': - resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} - '@emnapi/runtime@2.0.0-beta.3': resolution: {integrity: sha512-ayb/PyyLzpwRyFVxeC0uoEHu59QlB1iWGcGsOpXQcaB/Dc+uGfBmNmpCHp3HmTT0t8lSsMmg3j7+tdJW/TlHjQ==} - '@emnapi/wasi-threads@1.2.3': - resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} - '@emnapi/wasi-threads@2.2.0': resolution: {integrity: sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==} @@ -842,12 +833,6 @@ packages: resolution: {integrity: sha512-LLttQ/SSmseGFD/sNiHv9q34hd4gmPLN9uQdIIsU/V/o2AgTJm3dWoKHA4KTj0BzAans6CoEmpHYmp80yp69VA==} engines: {node: '>=22'} - '@napi-rs/wasm-runtime@1.1.6': - resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@napi-rs/wasm-runtime@1.2.7': resolution: {integrity: sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} @@ -1145,16 +1130,6 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@rsbuild/core@2.3.1': - resolution: {integrity: sha512-dv5tL7djb8ex5z4sqnDmUbd5PnGNr/CXuFfiMD4RkUsF1JEZZkGH8lc+QW4fqYQIHM7RTvcMUakgvwVU/O9WMw==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - peerDependencies: - core-js: '>= 3.0.0' - peerDependenciesMeta: - core-js: - optional: true - '@rsbuild/core@2.3.2': resolution: {integrity: sha512-1mjHhBYX1Z+knee55SV/+6KsEVmdjEQ1h73VzXUQYD+sfncuN+6+duVx7nYYVXz1zBP4QfpQt+74gTNAxKz+Hg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1186,178 +1161,86 @@ packages: typescript: optional: true - '@rspack/binding-darwin-arm64@2.3.1': - resolution: {integrity: sha512-koLyL2r8PUcLD0StjuZ/n5XM6GJ0C8dzJN0IuIV9d7nQcibJxwjjSAWEPGVz6bm8WuzypvuVKNoa1+GGAHeMQA==} - cpu: [arm64] - os: [darwin] - '@rspack/binding-darwin-arm64@2.3.2': resolution: {integrity: sha512-6ouAc7766psf4i7E1jk4oE99GhHBYh3JwJhHkmortSig9dJzonPM7VIhP7yHdclw7iKNNrC+XMIw9HtcVTLxnw==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@2.3.1': - resolution: {integrity: sha512-YK39JLiu1YC6+3BMxkP7e848pHD7e2T/0OSNogDi7whfiZNg95wa9Ncd7I5ppAf0nhmV+FNew/sCBIFp5h67Jw==} - cpu: [x64] - os: [darwin] - '@rspack/binding-darwin-x64@2.3.2': resolution: {integrity: sha512-C9dhmWDeuuXjmSos2hJ2OBOcafGLxB5HKbW9JprVcd0ZIBx3KSv2Wr4/BsQE1Gxx0JSTRYeeBs0Wpmqi2p24BQ==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@2.3.1': - resolution: {integrity: sha512-Q+RCA/KM2tn6m6R5U4lktXDs5cCRm3SyleQk86iqqUFX7wKzVRUvr5BTsreg6K9of3gpYmQ6+g1PGT5cwo0rLA==} - cpu: [arm64] - os: [linux] - libc: [glibc] - '@rspack/binding-linux-arm64-gnu@2.3.2': resolution: {integrity: sha512-+W67rrYxpKv+7Owe3Yi+GNHmvipCVJ+BxJuGi6VBL6R9Y4MP4ur/U2xxULE3Fe29hUrsq5xaiXAFAssocI63AA==} cpu: [arm64] os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-musl@2.3.1': - resolution: {integrity: sha512-He+muVDON1fohGtdYamh3zHVwf6/E6fZu/+iEAkxjclE0P94bsCfYVcZW/a4/l1tJ2zvLZtB4jD7Qr6r4vG/WA==} - cpu: [arm64] - os: [linux] - libc: [musl] - '@rspack/binding-linux-arm64-musl@2.3.2': resolution: {integrity: sha512-A1c3WMnAGVCUyKvqded3bUf4WWnAU4qKWJXoU2AtTa9KSfURbi2svn3hFk5PT9M/QVDwHEGkz29TgfX2FSc/zw==} cpu: [arm64] os: [linux] libc: [musl] - '@rspack/binding-linux-ppc64-gnu@2.3.1': - resolution: {integrity: sha512-blIZUgyPt4FcSHkZL6sJ2xbzc7ACgDeU49An4mXLSebwdgnlhTzxeSFnh2VeJDlGza8CUaZYB/zS/6oZ2kCDcw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - '@rspack/binding-linux-ppc64-gnu@2.3.2': resolution: {integrity: sha512-p+m1JbiKUN0l2Q0I2ielf+spuVv4OKW0dEJUZ6Pxm/KbFEENptAdwOvjrAmUwFFAiNJN6phEDY6/PAcP+DkmIQ==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rspack/binding-linux-riscv64-gnu@2.3.1': - resolution: {integrity: sha512-3FtW2DUFmXxhBORUA3zSc+ot4d6R/1/U6z/48TDN4jeIYDUG9VqYBF6LUohX4vBY6IP0DCyXb2N9WayD/9QXoA==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - '@rspack/binding-linux-riscv64-gnu@2.3.2': resolution: {integrity: sha512-3aPE11BZ0GxJfaAXS6OjpgUpUE2twRRPR+Lx5YfSMVcLw/m74m4U4bE8q39TsR4+LbaKSn7fhZ7xK06yA1o+kg==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rspack/binding-linux-riscv64-musl@2.3.1': - resolution: {integrity: sha512-+5qNgdNdXzp/K8f8BjgJ3m7tcbBKPENN7WPDfBcSHvWb5GF4+o/pbrX26c0+LEugo0bYUOAoitBNd94AwcNvpA==} - cpu: [riscv64] - os: [linux] - libc: [musl] - '@rspack/binding-linux-riscv64-musl@2.3.2': resolution: {integrity: sha512-mFRYh2zIuNmaTPIsgXMpZP1NYhysyDEsmheiG/Zr5XE1nQEMj/otxrGl3pj5EFuab4GnwWlBo5M8F0ppvsizYw==} cpu: [riscv64] os: [linux] libc: [musl] - '@rspack/binding-linux-s390x-gnu@2.3.1': - resolution: {integrity: sha512-yNcg/y1+MV0wZ984CVU4d1HAYYwMcDPXoQO0xynU+K5YuBxPWALHOxuRRCKCcykBdL1GIEshAIewEFrsW/cmJg==} - cpu: [s390x] - os: [linux] - libc: [glibc] - '@rspack/binding-linux-s390x-gnu@2.3.2': resolution: {integrity: sha512-c6aamcvr9vFdccsOX4cPecG1G06aZxsmMWKzQRkcvbrNYR+RwNTGa5iM13KkopktCZgZX7MJo1UNYEN+UK3JHw==} cpu: [s390x] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-gnu@2.3.1': - resolution: {integrity: sha512-ffclKBuH8wwimOBd6xGUxrBfVKKY5Ow4E7OFdHZeg4xffm2O8auGszmOgvFu1eoDoOYHaVJn+cEV6UD0KwZk8A==} - cpu: [x64] - os: [linux] - libc: [glibc] - '@rspack/binding-linux-x64-gnu@2.3.2': resolution: {integrity: sha512-l/WCW3RSfJn5eAcWciqZGazhLIj1d8KjfzTAic8XwDFj5JlVwT5i2BhrOSf9b42WNrKrxtsRPFw9UoCKAunDzg==} cpu: [x64] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-musl@2.3.1': - resolution: {integrity: sha512-qcDwwuyxR7TMtrW+r5Y9RIW25boXd1Ip/9jz04jhdq/OiU/Am7rCP2X90CH8sWdzovIF9UNmsGjY4KklR0F2Mg==} - cpu: [x64] - os: [linux] - libc: [musl] - '@rspack/binding-linux-x64-musl@2.3.2': resolution: {integrity: sha512-iHPYQWl6pwlzn1NNNvC+ag42uoAoQs0iPP1OEmBIYT2unXpWHnGhr4t8+uN7epD2fNYZ8HZQw1lPAgB6z7LNgA==} cpu: [x64] os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@2.3.1': - resolution: {integrity: sha512-3dr6zjFaCK3A920ftCriSJkiRhEfhHtat7LtBdj6g0mcV5Rt+iealmli0vjeAvD0UdpE1u8EKWlfw82JLgFLSQ==} - cpu: [wasm32] - '@rspack/binding-wasm32-wasi@2.3.2': resolution: {integrity: sha512-es9ts6uw29/JNd5lZcb5bviCZYgUf1W6TAnbZB1HQjJvh7+DPYtD+27tLKzpSjlkqkPfIWyzNnR4aM9NZWoFrA==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@2.3.1': - resolution: {integrity: sha512-AZbuLPylt1xvWssN93AsirbYs3WgfcrA8tMsqHmVJIHahLu9E+JPKZ3Gmsw6IYEZk3EfnV3ujQzeQ1/VfF0Vsw==} - cpu: [arm64] - os: [win32] - '@rspack/binding-win32-arm64-msvc@2.3.2': resolution: {integrity: sha512-nAzwd0tslZF8vUeYYUWrxrulfB+ZInCT+jsUNq3AoH3D4fQRRq327omaxOD0ngtHtiiX/mwdmobNlLBHNgZ+RA==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@2.3.1': - resolution: {integrity: sha512-R5NVU68TePZcgRdYUzrQX9YFNxmcyXZEPwaPv40AAgsqNyacG3iRaYVmV79jt3rWYfa0QJaqvRLUchDe2SZ6zQ==} - cpu: [ia32] - os: [win32] - '@rspack/binding-win32-ia32-msvc@2.3.2': resolution: {integrity: sha512-yihZFNqOHwZd0I/z3MphJy/l5iNvuYsG0Gv3VuuqIgxZX4yS2DokqpDaWf2DnrZxB3yGSBt+IqZWQg/qzITBoA==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@2.3.1': - resolution: {integrity: sha512-5T9DYjNPQpLbrNXjCssGd2B6xMQPlc3LxVOKHGUA1O0GV+88vBkTXAcryJ+Fo+yVEMPCzp4VvwBMGAVDpCjcSA==} - cpu: [x64] - os: [win32] - '@rspack/binding-win32-x64-msvc@2.3.2': resolution: {integrity: sha512-I/aOF3eXODB+4zjiSSf5KXxQG4NeNoeyYOOmRyxQxdPU9/yjCSBKrKpcS6ZerK2DCYdl5V6+mwO50E25TvpVXg==} cpu: [x64] os: [win32] - '@rspack/binding@2.3.1': - resolution: {integrity: sha512-pfCJGBFNK2tnNnoDP6ZoTbOjxbKr1U2eGFDJ8bIuZQai4FBNhWQlKFmNup+X5K935XYRulZBomIBAL6GL6W2YQ==} - '@rspack/binding@2.3.2': resolution: {integrity: sha512-JlzyN4N6sRykZVwEFz3Kb8IsrTg8mlbNd/AqVmVyqr35Pg7OvxelTcYRL/Dpb2IMhmfpbzYbFigHyXS2CzibVQ==} - '@rspack/core@2.3.1': - resolution: {integrity: sha512-9BWfaiEJLgLK9U53Q4WVruBZ19Mu/XWHXHEu0UFla4lUtH8Z+/ET2m044tiqbtyIgqQyG58fMrxHeVIAiXMXHg==} - engines: {node: ^20.19.0 || >=22.12.0} - peerDependencies: - '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 - '@swc/helpers': ^0.5.23 - peerDependenciesMeta: - '@module-federation/runtime-tools': - optional: true - '@swc/helpers': - optional: true - '@rspack/core@2.3.2': resolution: {integrity: sha512-1gnot46X+O6z1qtnMw7KAFSuNDTaybn+I5rc1o0czwmRu80wbXNTCtPRstwmeQOuUU6tp5gYFRTIPrFH1YUxaQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1390,9 +1273,6 @@ packages: '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@swc/helpers@0.5.23': - resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} - '@swc/helpers@0.5.24': resolution: {integrity: sha512-6tcXo4kA8HgGO7AVmawB57RYi/piBPYVHVcO6dXjX+SZw8GoHmi262sp4v2Ha2kNP9Cx84qei27yT+fjS1lxgg==} @@ -3098,33 +2978,17 @@ snapshots: '@conventional-changelog/template@1.4.0': {} - '@emnapi/core@1.11.3': - dependencies: - '@emnapi/wasi-threads': 1.2.3 - tslib: 2.8.1 - optional: true - '@emnapi/core@2.0.0-beta.3': dependencies: '@emnapi/wasi-threads': 2.2.0 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.11.3': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@2.0.0-beta.3': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.2.3': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/wasi-threads@2.2.0': dependencies: tslib: 2.8.1 @@ -3344,13 +3208,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': - dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 - '@tybys/wasm-util': 0.10.4 - optional: true - '@napi-rs/wasm-runtime@1.2.7(@emnapi/core@2.0.0-beta.3)(@emnapi/runtime@2.0.0-beta.3)': dependencies: '@emnapi/core': 2.0.0-beta.3 @@ -3563,13 +3420,6 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@rsbuild/core@2.3.1': - dependencies: - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) - '@swc/helpers': 0.5.23 - transitivePeerDependencies: - - '@module-federation/runtime-tools' - '@rsbuild/core@2.3.2': dependencies: '@rspack/core': 2.3.2(@swc/helpers@0.5.24) @@ -3577,12 +3427,12 @@ snapshots: transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/plugin-react@2.1.1(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))': + '@rsbuild/plugin-react@2.1.1(@rsbuild/core@2.3.2)(@rspack/core@2.3.2(@swc/helpers@0.5.24))': dependencies: - '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.3.1(@swc/helpers@0.5.23))(react-refresh@0.19.0) + '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.3.2(@swc/helpers@0.5.24))(react-refresh@0.19.0) react-refresh: 0.19.0 optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.3.2 transitivePeerDependencies: - '@rspack/core' @@ -3596,73 +3446,36 @@ snapshots: - '@module-federation/runtime-tools' - core-js - '@rspack/binding-darwin-arm64@2.3.1': - optional: true - '@rspack/binding-darwin-arm64@2.3.2': optional: true - '@rspack/binding-darwin-x64@2.3.1': - optional: true - '@rspack/binding-darwin-x64@2.3.2': optional: true - '@rspack/binding-linux-arm64-gnu@2.3.1': - optional: true - '@rspack/binding-linux-arm64-gnu@2.3.2': optional: true - '@rspack/binding-linux-arm64-musl@2.3.1': - optional: true - '@rspack/binding-linux-arm64-musl@2.3.2': optional: true - '@rspack/binding-linux-ppc64-gnu@2.3.1': - optional: true - '@rspack/binding-linux-ppc64-gnu@2.3.2': optional: true - '@rspack/binding-linux-riscv64-gnu@2.3.1': - optional: true - '@rspack/binding-linux-riscv64-gnu@2.3.2': optional: true - '@rspack/binding-linux-riscv64-musl@2.3.1': - optional: true - '@rspack/binding-linux-riscv64-musl@2.3.2': optional: true - '@rspack/binding-linux-s390x-gnu@2.3.1': - optional: true - '@rspack/binding-linux-s390x-gnu@2.3.2': optional: true - '@rspack/binding-linux-x64-gnu@2.3.1': - optional: true - '@rspack/binding-linux-x64-gnu@2.3.2': optional: true - '@rspack/binding-linux-x64-musl@2.3.1': - optional: true - '@rspack/binding-linux-x64-musl@2.3.2': optional: true - '@rspack/binding-wasm32-wasi@2.3.1': - dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) - optional: true - '@rspack/binding-wasm32-wasi@2.3.2': dependencies: '@emnapi/core': 2.0.0-beta.3 @@ -3670,41 +3483,15 @@ snapshots: '@napi-rs/wasm-runtime': 1.2.7(@emnapi/core@2.0.0-beta.3)(@emnapi/runtime@2.0.0-beta.3) optional: true - '@rspack/binding-win32-arm64-msvc@2.3.1': - optional: true - '@rspack/binding-win32-arm64-msvc@2.3.2': optional: true - '@rspack/binding-win32-ia32-msvc@2.3.1': - optional: true - '@rspack/binding-win32-ia32-msvc@2.3.2': optional: true - '@rspack/binding-win32-x64-msvc@2.3.1': - optional: true - '@rspack/binding-win32-x64-msvc@2.3.2': optional: true - '@rspack/binding@2.3.1': - optionalDependencies: - '@rspack/binding-darwin-arm64': 2.3.1 - '@rspack/binding-darwin-x64': 2.3.1 - '@rspack/binding-linux-arm64-gnu': 2.3.1 - '@rspack/binding-linux-arm64-musl': 2.3.1 - '@rspack/binding-linux-ppc64-gnu': 2.3.1 - '@rspack/binding-linux-riscv64-gnu': 2.3.1 - '@rspack/binding-linux-riscv64-musl': 2.3.1 - '@rspack/binding-linux-s390x-gnu': 2.3.1 - '@rspack/binding-linux-x64-gnu': 2.3.1 - '@rspack/binding-linux-x64-musl': 2.3.1 - '@rspack/binding-wasm32-wasi': 2.3.1 - '@rspack/binding-win32-arm64-msvc': 2.3.1 - '@rspack/binding-win32-ia32-msvc': 2.3.1 - '@rspack/binding-win32-x64-msvc': 2.3.1 - '@rspack/binding@2.3.2': optionalDependencies: '@rspack/binding-darwin-arm64': 2.3.2 @@ -3722,23 +3509,17 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.3.2 '@rspack/binding-win32-x64-msvc': 2.3.2 - '@rspack/core@2.3.1(@swc/helpers@0.5.23)': - dependencies: - '@rspack/binding': 2.3.1 - optionalDependencies: - '@swc/helpers': 0.5.23 - '@rspack/core@2.3.2(@swc/helpers@0.5.24)': dependencies: '@rspack/binding': 2.3.2 optionalDependencies: '@swc/helpers': 0.5.24 - '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.3.1(@swc/helpers@0.5.23))(react-refresh@0.19.0)': + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.3.2(@swc/helpers@0.5.24))(react-refresh@0.19.0)': dependencies: react-refresh: 0.19.0 optionalDependencies: - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) + '@rspack/core': 2.3.2(@swc/helpers@0.5.24) '@simple-libs/child-process-utils@2.0.0': dependencies: @@ -3748,10 +3529,6 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@swc/helpers@0.5.23': - dependencies: - tslib: 2.8.1 - '@swc/helpers@0.5.24': {} '@tailwindcss/node@4.3.5':