From 185c59507abfa0262c13211b37a1b358bf54c3d5 Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Thu, 22 Oct 2026 02:32:53 +0000
Subject: [PATCH 01/15] feat(nodelab): author pinned host-admitted workflows
---
.../examples/nodelab_host.rs | 187 ++++++++++++
.../src/custom_nodes.rs | 2 +
.../src/custom_nodes/authoring.rs | 37 +++
.../src/graph/connection_insert.rs | 7 +
.../src/graph/connection_intent.rs | 1 +
.../src/graph/session.rs | 16 +-
.../src/graph/session_connection_api.rs | 21 +-
.../src/graph/session_contract.rs | 22 +-
.../src/graph/session_node_api.rs | 45 +++
.../src/graph/session_state.rs | 18 +-
.../src/workflow.rs | 1 +
.../src/workflow/custom_node_authoring_api.rs | 112 ++++++++
.../src/workflow/service_config.rs | 20 +-
.../src/workflow/tests/custom_nodes.rs | 269 ++++++++++++++++++
docs/custom-nodes.md | 48 +++-
.../evidence/nodelab-authoring/browser.log.gz | Bin 0 -> 441 bytes
.../native-unavailable.log.gz | Bin 0 -> 2190 bytes
.../nodelab-authoring/qualification.json | 54 ++++
.../execution-ledger.md | 33 +++
.../issues.md | 4 +-
.../plan.md | 58 ++++
scripts/README.md | 17 ++
scripts/check-nodelab-browser.mjs | 172 +++++++++++
src-tauri/src/app_setup.rs | 3 +
src-tauri/src/workflow/commands.rs | 34 +++
src/components/workbench/NodeLabPage.svelte | 89 +++++-
src/components/workbench/nodeLabController.ts | 86 ++++++
.../workbench/nodeLabPresenters.test.ts | 15 +-
src/components/workbench/nodeLabPresenters.ts | 15 +-
.../workflow/customNodeAuthoring.test.ts | 143 ++++++++++
src/services/workflow/customNodeAuthoring.ts | 184 ++++++++++++
31 files changed, 1647 insertions(+), 66 deletions(-)
create mode 100644 crates/pantograph-workflow-service/examples/nodelab_host.rs
create mode 100644 crates/pantograph-workflow-service/src/custom_nodes/authoring.rs
create mode 100644 crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/native-unavailable.log.gz
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
create mode 100644 scripts/check-nodelab-browser.mjs
create mode 100644 src/components/workbench/nodeLabController.ts
create mode 100644 src/services/workflow/customNodeAuthoring.test.ts
create mode 100644 src/services/workflow/customNodeAuthoring.ts
diff --git a/crates/pantograph-workflow-service/examples/nodelab_host.rs b/crates/pantograph-workflow-service/examples/nodelab_host.rs
new file mode 100644
index 000000000..c1b4d82c1
--- /dev/null
+++ b/crates/pantograph-workflow-service/examples/nodelab_host.rs
@@ -0,0 +1,187 @@
+//! Isolated stdio host for NodeLab authoring qualification. No runtime code loader.
+//! A verifier supplies the loopback HTTP transport; EOF drops the temporary store.
+use async_trait::async_trait;
+use node_engine::{Context, ExecutorExtensions, NodeExecutor};
+use pantograph_node_contracts::{
+ NodeAuthoringMetadata, NodeCategory, NodeExecutionSemantics, NodeTypeContract, PortContract,
+ PortRequirement, PortValueType,
+};
+use pantograph_workflow_service::{
+ custom_nodes::{authoring::CustomNodeDraftRequest, CustomNodeCatalog, TrustedCustomNode},
+ *,
+};
+use serde::{de::DeserializeOwned, Serialize};
+use serde_json::{json, Value};
+use std::{
+ collections::HashMap,
+ io::{BufRead, Write},
+ sync::Arc,
+};
+
+struct Uppercase;
+#[async_trait]
+impl NodeExecutor for Uppercase {
+ async fn execute(
+ &self,
+ _: &str,
+ inputs: HashMap,
+ _: &Context,
+ _: &ExecutorExtensions,
+ ) -> node_engine::Result> {
+ Ok(HashMap::from([(
+ "output".into(),
+ json!(inputs["input"]
+ .as_str()
+ .ok_or_else(|| node_engine::NodeEngineError::ExecutionFailed(
+ "string input required".into()
+ ))?
+ .to_uppercase()),
+ )]))
+ }
+}
+fn catalog() -> Result, Box> {
+ let mut output = PortContract::output("output".parse()?, "Output", PortValueType::String);
+ output.requirement = PortRequirement::Required;
+ let contract = NodeTypeContract {
+ node_type: "host-uppercase".parse()?,
+ category: NodeCategory::Processing,
+ label: "Host uppercase".into(),
+ description: "Pure string transform compiled into this isolated Rust host".into(),
+ inputs: vec![PortContract::input(
+ "input".parse()?,
+ "Input",
+ PortValueType::String,
+ PortRequirement::Required,
+ )],
+ outputs: vec![output],
+ execution_semantics: NodeExecutionSemantics::Batch,
+ capability_requirements: vec![],
+ inference_tasks: vec![],
+ authoring: NodeAuthoringMetadata::default(),
+ contract_version: Some("1.0.0".into()),
+ contract_digest: None,
+ };
+ let digest = |text: &str| format!("blake3:{}", blake3::hash(text.as_bytes()));
+ Ok(Arc::new(CustomNodeCatalog::try_new(vec![
+ TrustedCustomNode::admit(
+ contract,
+ digest("nodelab_host.rs uppercase v1"),
+ digest("isolated Rust authoring host v1"),
+ Arc::new(Uppercase),
+ )?,
+ ])?))
+}
+fn decode(value: Value) -> Result {
+ serde_json::from_value(value).map_err(|e| WorkflowServiceError::InvalidRequest(e.to_string()))
+}
+fn encode(value: impl Serialize) -> Result {
+ serde_json::to_value(value).map_err(|e| WorkflowServiceError::Internal(e.to_string()))
+}
+fn string(args: &Value, name: &str) -> Result {
+ args[name]
+ .as_str()
+ .map(str::to_owned)
+ .ok_or_else(|| WorkflowServiceError::InvalidRequest(format!("{name} is required")))
+}
+async fn dispatch(
+ service: &WorkflowService,
+ store: &FileSystemWorkflowGraphStore,
+ command: &str,
+ args: Value,
+) -> Result {
+ let edit = || -> Result {
+ Ok(WorkflowGraphEditSessionGraphRequest {
+ session_id: string(&args, "executionId")?,
+ })
+ };
+ match command {
+ "get_custom_node_authoring_catalog" => encode(service.custom_node_authoring_catalog()),
+ "create_custom_node_draft" => encode(
+ service
+ .create_custom_node_draft(decode::(
+ args["request"].clone(),
+ )?)
+ .await?,
+ ),
+ "get_node_lab_draft" => encode(
+ service
+ .workflow_graph_get_edit_session_graph(edit()?)
+ .await?,
+ ),
+ "create_workflow_execution_session" => encode(
+ service
+ .workflow_graph_create_edit_session(WorkflowGraphEditSessionCreateRequest {
+ graph: decode(args["graph"].clone())?,
+ workflow_id: args["workflowId"].as_str().map(str::to_owned),
+ })
+ .await?,
+ ),
+ "update_node_data" => encode(
+ service
+ .workflow_graph_update_node_data(WorkflowGraphUpdateNodeDataRequest {
+ session_id: string(&args, "executionId")?,
+ node_id: string(&args, "nodeId")?,
+ data: args["data"].clone(),
+ })
+ .await?,
+ ),
+ "save_workflow" => encode(
+ service
+ .workflow_graph_save(
+ store,
+ WorkflowGraphSaveRequest {
+ name: string(&args, "name")?,
+ graph: decode(args["graph"].clone())?,
+ },
+ )?
+ .path,
+ ),
+ "load_workflow" => encode(service.workflow_graph_load(
+ store,
+ WorkflowGraphLoadRequest {
+ path: string(&args, "path")?,
+ },
+ )?),
+ "remove_execution" => {
+ service
+ .workflow_graph_close_edit_session(WorkflowGraphEditSessionCloseRequest {
+ session_id: edit()?.session_id,
+ })
+ .await?;
+ Ok(Value::Null)
+ }
+ _ => Err(WorkflowServiceError::CapabilityViolation(
+ "unsupported authoring host command".into(),
+ )),
+ }
+}
+#[tokio::main]
+async fn main() -> Result<(), Box> {
+ let directory = tempfile::tempdir()?;
+ let store = FileSystemWorkflowGraphStore::new(directory.path());
+ let service = if std::env::args().any(|arg| arg == "--empty-catalog") {
+ WorkflowService::new()
+ } else {
+ WorkflowService::with_trusted_custom_nodes(catalog()?)
+ };
+ for line in std::io::stdin().lock().lines() {
+ let result = match serde_json::from_str::(&line?) {
+ Ok(request) => match request["command"].as_str() {
+ Some(command) => dispatch(&service, &store, command, request["args"].clone()).await,
+ None => Err(WorkflowServiceError::InvalidRequest(
+ "command is required".into(),
+ )),
+ },
+ Err(error) => Err(WorkflowServiceError::InvalidRequest(error.to_string())),
+ };
+ let response = match result {
+ Ok(value) => json!({"ok": true, "value": value}),
+ Err(error) => {
+ json!({"ok": false, "error": serde_json::from_str::(&error.to_envelope_json())?})
+ }
+ };
+ println!("{}", serde_json::to_string(&response)?);
+ std::io::stdout().flush()?;
+ }
+ Ok(())
+}
diff --git a/crates/pantograph-workflow-service/src/custom_nodes.rs b/crates/pantograph-workflow-service/src/custom_nodes.rs
index a6f8bfca3..90b245b5e 100644
--- a/crates/pantograph-workflow-service/src/custom_nodes.rs
+++ b/crates/pantograph-workflow-service/src/custom_nodes.rs
@@ -355,3 +355,5 @@ pub(crate) fn validate_payload(
#[cfg(test)]
pub(crate) mod tests;
+
+pub mod authoring;
diff --git a/crates/pantograph-workflow-service/src/custom_nodes/authoring.rs b/crates/pantograph-workflow-service/src/custom_nodes/authoring.rs
new file mode 100644
index 000000000..8dc69b4b2
--- /dev/null
+++ b/crates/pantograph-workflow-service/src/custom_nodes/authoring.rs
@@ -0,0 +1,37 @@
+//! Read-only host catalog and exactly pinned graph authoring. No execution/loading API.
+use super::CustomNodeIdentity;
+use serde::{Deserialize, Serialize};
+
+/// Version 1 is a deliberately narrow projection of admitted string-port contracts.
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(deny_unknown_fields)]
+pub struct CustomNodeAuthoringCatalog {
+ pub contract_version: u16,
+ pub nodes: Vec,
+}
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(deny_unknown_fields)]
+pub struct CustomNodeAuthoringEntry {
+ pub identity: CustomNodeIdentity,
+ pub label: String,
+ pub description: String,
+ pub trust: CustomNodeAuthoringTrust,
+ pub inputs: Vec,
+ pub outputs: Vec,
+}
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(rename_all = "snake_case")]
+pub enum CustomNodeAuthoringTrust {
+ TrustedInProcess,
+}
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(deny_unknown_fields)]
+pub struct CustomNodeAuthoringPort {
+ pub id: String,
+ pub label: String,
+}
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(deny_unknown_fields)]
+pub struct CustomNodeDraftRequest {
+ pub identity: CustomNodeIdentity,
+}
diff --git a/crates/pantograph-workflow-service/src/graph/connection_insert.rs b/crates/pantograph-workflow-service/src/graph/connection_insert.rs
index bd49a8b39..f267b7cd3 100644
--- a/crates/pantograph-workflow-service/src/graph/connection_insert.rs
+++ b/crates/pantograph-workflow-service/src/graph/connection_insert.rs
@@ -41,6 +41,13 @@ fn resolve_insert_definition<'a>(
registry: &'a NodeRegistry,
node_type: &str,
) -> Result<&'a NodeDefinition, ConnectionRejection> {
+ if registry.custom_nodes.get(node_type).is_some() {
+ return Err(ConnectionRejection {
+ reason: ConnectionRejectionReason::UnknownInsertNodeType,
+ message: "custom-node insertion by name is unsupported; add an exactly pinned node and connect its endpoints".into(),
+ contract_diagnostic: None,
+ });
+ }
registry
.get_definition(node_type)
.ok_or_else(|| ConnectionRejection {
diff --git a/crates/pantograph-workflow-service/src/graph/connection_intent.rs b/crates/pantograph-workflow-service/src/graph/connection_intent.rs
index 1360f02c0..a0c2caf1e 100644
--- a/crates/pantograph-workflow-service/src/graph/connection_intent.rs
+++ b/crates/pantograph-workflow-service/src/graph/connection_intent.rs
@@ -506,6 +506,7 @@ pub fn connection_candidates_with_surfaces(
let mut insertable_node_types = registry
.all_definitions()
.into_iter()
+ .filter(|definition| registry.custom_nodes.get(&definition.node_type).is_none())
.filter_map(|definition| {
let mut matching_input_port_ids = definition
.inputs
diff --git a/crates/pantograph-workflow-service/src/graph/session.rs b/crates/pantograph-workflow-service/src/graph/session.rs
index d09eaa2a6..3d940e3bf 100644
--- a/crates/pantograph-workflow-service/src/graph/session.rs
+++ b/crates/pantograph-workflow-service/src/graph/session.rs
@@ -75,6 +75,7 @@ fn dirty_tasks_from_seed_nodes_unique(graph: &WorkflowGraph, node_ids: &[String]
}
pub struct GraphSessionStore {
+ node_registry: Arc,
sessions: RwLock>,
validation_state: Arc,
validation_lifecycle: Arc,
@@ -136,6 +137,7 @@ impl GraphSessionStore {
dependency_provider: SharedDependencyEnvironmentProvider,
) -> Self {
Self {
+ node_registry: Arc::new(super::registry::NodeRegistry::new()),
sessions: RwLock::new(HashMap::new()),
validation_state: Arc::new(CurrentInferenceValidationStateStore::new()),
validation_lifecycle: Arc::new(WorkflowGraphValidationLifecycleOwner::new()),
@@ -146,6 +148,14 @@ impl GraphSessionStore {
}
}
+ pub(crate) fn with_node_registry(
+ mut self,
+ registry: Arc,
+ ) -> Self {
+ self.node_registry = registry;
+ self
+ }
+
pub async fn set_validation_lifecycle_event_sink(
&self,
event_sink: Option>,
@@ -159,7 +169,11 @@ impl GraphSessionStore {
workflow_id: Option,
) -> WorkflowGraphEditSessionCreateResponse {
let session_id = Uuid::new_v4().to_string();
- let session = Arc::new(Mutex::new(GraphEditSession::new(graph, workflow_id)));
+ let session = Arc::new(Mutex::new(GraphEditSession::new(
+ graph,
+ workflow_id,
+ self.node_registry.clone(),
+ )));
let graph_revision = {
let state = session.lock().await;
state.graph.compute_fingerprint()
diff --git a/crates/pantograph-workflow-service/src/graph/session_connection_api.rs b/crates/pantograph-workflow-service/src/graph/session_connection_api.rs
index 22a97ae4e..97f717675 100644
--- a/crates/pantograph-workflow-service/src/graph/session_connection_api.rs
+++ b/crates/pantograph-workflow-service/src/graph/session_connection_api.rs
@@ -13,7 +13,6 @@ use super::super::inference_validation_state::{
WorkflowGraphCurrentConnectionSurfacesStateRequest,
};
use super::super::memory_impact::graph_memory_impact_from_graph_change;
-use super::super::registry::NodeRegistry;
use super::super::session_event::{dirty_tasks_from_seed_nodes, graph_modified_event};
use super::super::session_graph::sync_embedding_emit_metadata_flags;
use super::super::session_types::{
@@ -39,10 +38,10 @@ impl GraphSessionStore {
request.graph_revision.as_deref(),
)
.await?;
- let registry = NodeRegistry::new();
+ let registry = self.node_registry.as_ref();
connection_candidates_with_surfaces(
&graph,
- ®istry,
+ registry,
InferenceConnectionSurfaceView::new(&connection_surfaces.surfaces),
request.source_anchor,
request.graph_revision.as_deref(),
@@ -65,10 +64,10 @@ impl GraphSessionStore {
let mut state = handle.lock().await;
state.touch();
let before_graph = state.graph.clone();
- let registry = NodeRegistry::new();
+ let registry = self.node_registry.as_ref();
if let Err(rejection) = commit_connection_with_surfaces(
&state.graph,
- ®istry,
+ registry,
InferenceConnectionSurfaceView::new(&connection_surfaces.surfaces),
&request.graph_revision,
&request.source_anchor,
@@ -191,10 +190,10 @@ impl GraphSessionStore {
let mut state = handle.lock().await;
state.touch();
let before_graph = state.graph.clone();
- let registry = NodeRegistry::new();
+ let registry = self.node_registry.as_ref();
let (inserted_node, inserted_edge) = match insert_node_and_connect(
&state.graph,
- ®istry,
+ registry,
&request.graph_revision,
&request.source_anchor,
&request.node_type,
@@ -252,11 +251,11 @@ impl GraphSessionStore {
let handle = self.get_session_handle(&request.session_id).await?;
let mut state = handle.lock().await;
state.touch();
- let registry = NodeRegistry::new();
+ let registry = self.node_registry.as_ref();
match preview_node_insert_on_edge(
&state.graph,
- ®istry,
+ registry,
&request.graph_revision,
&request.edge_id,
&request.node_type,
@@ -283,11 +282,11 @@ impl GraphSessionStore {
let mut state = handle.lock().await;
state.touch();
let before_graph = state.graph.clone();
- let registry = NodeRegistry::new();
+ let registry = self.node_registry.as_ref();
let (inserted_node, incoming_edge, outgoing_edge, bridge) = match insert_node_on_edge(
&state.graph,
- ®istry,
+ registry,
&request.graph_revision,
&request.edge_id,
&request.node_type,
diff --git a/crates/pantograph-workflow-service/src/graph/session_contract.rs b/crates/pantograph-workflow-service/src/graph/session_contract.rs
index ee8d764fc..d62215fc5 100644
--- a/crates/pantograph-workflow-service/src/graph/session_contract.rs
+++ b/crates/pantograph-workflow-service/src/graph/session_contract.rs
@@ -88,11 +88,28 @@ fn build_graph_session_response(
build_graph_session_response_with_state(session_id, graph, workflow_event, None)
}
+#[cfg(test)]
pub(crate) fn build_graph_session_response_with_state(
session_id: &str,
graph: &super::types::WorkflowGraph,
workflow_event: Option,
projection: Option<&WorkflowGraphSessionStateProjection>,
+) -> WorkflowGraphEditSessionGraphResponse {
+ build_graph_session_response_with_registry(
+ session_id,
+ graph,
+ &NodeRegistry::new(),
+ workflow_event,
+ projection,
+ )
+}
+
+pub(crate) fn build_graph_session_response_with_registry(
+ session_id: &str,
+ graph: &super::types::WorkflowGraph,
+ registry: &NodeRegistry,
+ workflow_event: Option,
+ projection: Option<&WorkflowGraphSessionStateProjection>,
) -> WorkflowGraphEditSessionGraphResponse {
let graph_revision = graph.compute_fingerprint();
WorkflowGraphEditSessionGraphResponse {
@@ -106,10 +123,7 @@ pub(crate) fn build_graph_session_response_with_state(
workflow_event.as_ref(),
projection,
)),
- graph_diagnostics: validate_workflow_graph_contract_diagnostics(
- graph,
- &NodeRegistry::new(),
- ),
+ graph_diagnostics: validate_workflow_graph_contract_diagnostics(graph, registry),
}
}
diff --git a/crates/pantograph-workflow-service/src/graph/session_node_api.rs b/crates/pantograph-workflow-service/src/graph/session_node_api.rs
index aa63ed567..4f2e3ba19 100644
--- a/crates/pantograph-workflow-service/src/graph/session_node_api.rs
+++ b/crates/pantograph-workflow-service/src/graph/session_node_api.rs
@@ -40,6 +40,33 @@ impl GraphSessionStore {
request.node_id
)));
}
+ let original = state
+ .graph
+ .find_node(&request.node_id)
+ .expect("checked node");
+ if self
+ .node_registry
+ .custom_nodes
+ .get(&original.node_type)
+ .is_some()
+ || original
+ .data
+ .get(crate::custom_nodes::CUSTOM_NODE_IDENTITY_FIELD)
+ .is_some()
+ {
+ let mut candidate = original.clone();
+ merge_node_data(&mut candidate.data, request.data.clone());
+ if candidate
+ .data
+ .get(crate::custom_nodes::CUSTOM_NODE_IDENTITY_FIELD)
+ != original
+ .data
+ .get(crate::custom_nodes::CUSTOM_NODE_IDENTITY_FIELD)
+ || candidate.data.get("definition") != original.data.get("definition")
+ {
+ return Err(WorkflowServiceError::InvalidRequest("custom-node identity/definition cannot be patched; explicitly remove and recreate from the admitted catalog".into()));
+ }
+ }
state.push_undo_snapshot();
let node = state.graph.find_node_mut(&request.node_id).ok_or_else(|| {
WorkflowServiceError::InvalidRequest(format!(
@@ -110,6 +137,24 @@ impl GraphSessionStore {
let mut state = handle.lock().await;
state.touch();
let before_graph = state.graph.clone();
+ self.node_registry
+ .validate_custom_node_identity(&request.node)
+ .map_err(|error| WorkflowServiceError::InvalidRequest(error.to_string()))?;
+ if request
+ .node
+ .data
+ .get(crate::custom_nodes::CUSTOM_NODE_IDENTITY_FIELD)
+ .is_some()
+ && self
+ .node_registry
+ .custom_nodes
+ .get(&request.node.node_type)
+ .is_none()
+ {
+ return Err(WorkflowServiceError::InvalidRequest(
+ "custom-node implementation is unavailable".into(),
+ ));
+ }
state.push_undo_snapshot();
let node_id = request.node.id.clone();
state.graph.nodes.push(request.node);
diff --git a/crates/pantograph-workflow-service/src/graph/session_state.rs b/crates/pantograph-workflow-service/src/graph/session_state.rs
index d44bda6b0..f4ff2e920 100644
--- a/crates/pantograph-workflow-service/src/graph/session_state.rs
+++ b/crates/pantograph-workflow-service/src/graph/session_state.rs
@@ -20,9 +20,10 @@ use super::types::WorkflowGraph;
const DEFAULT_MAX_UNDO_SNAPSHOTS: usize = 64;
-#[derive(Debug, Clone)]
+#[derive(Clone)]
pub(super) struct GraphEditSession {
pub(super) graph: WorkflowGraph,
+ node_registry: std::sync::Arc,
workflow_id: Option,
undo_stack: Vec,
redo_stack: Vec,
@@ -31,10 +32,15 @@ pub(super) struct GraphEditSession {
}
impl GraphEditSession {
- pub(super) fn new(mut graph: WorkflowGraph, workflow_id: Option) -> Self {
+ pub(super) fn new(
+ mut graph: WorkflowGraph,
+ workflow_id: Option,
+ node_registry: std::sync::Arc,
+ ) -> Self {
graph = hydrate_embedding_emit_metadata_flags(graph);
let mut session = Self {
graph,
+ node_registry,
workflow_id: workflow_id.and_then(normalize_optional_session_text),
undo_stack: Vec::new(),
redo_stack: Vec::new(),
@@ -70,6 +76,7 @@ impl GraphEditSession {
build_graph_session_response_with_projection(
session_id,
&self.graph,
+ &self.node_registry,
None,
phase6_memory_impact_projection(self.last_memory_impact.clone()),
)
@@ -94,6 +101,7 @@ impl GraphEditSession {
build_graph_session_response_with_projection(
session_id,
&self.graph,
+ &self.node_registry,
workflow_event,
projection,
)
@@ -191,7 +199,7 @@ impl GraphEditSession {
pub(super) fn canonicalize_graph(&mut self) {
let graph = std::mem::take(&mut self.graph);
- self.graph = canonicalize_workflow_graph(graph, &NodeRegistry::new());
+ self.graph = canonicalize_workflow_graph(graph, &self.node_registry);
self.graph.refresh_derived_graph();
}
}
@@ -199,12 +207,14 @@ impl GraphEditSession {
pub(super) fn build_graph_session_response_with_projection(
session_id: &str,
graph: &WorkflowGraph,
+ registry: &NodeRegistry,
workflow_event: Option,
projection: Option,
) -> WorkflowGraphEditSessionGraphResponse {
- super::session_contract::build_graph_session_response_with_state(
+ super::session_contract::build_graph_session_response_with_registry(
session_id,
graph,
+ registry,
workflow_event,
projection.as_ref(),
)
diff --git a/crates/pantograph-workflow-service/src/workflow.rs b/crates/pantograph-workflow-service/src/workflow.rs
index 24ee52b89..cf742ae05 100644
--- a/crates/pantograph-workflow-service/src/workflow.rs
+++ b/crates/pantograph-workflow-service/src/workflow.rs
@@ -1,3 +1,4 @@
+mod custom_node_authoring_api;
#[cfg(test)]
use async_trait::async_trait;
use std::path::PathBuf;
diff --git a/crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs b/crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs
new file mode 100644
index 000000000..1992eadd9
--- /dev/null
+++ b/crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs
@@ -0,0 +1,112 @@
+use super::{WorkflowService, WorkflowServiceError};
+use crate::custom_nodes::{authoring::*, CUSTOM_NODE_IDENTITY_FIELD};
+use crate::{GraphEdge, GraphNode, Position, WorkflowGraph, WorkflowGraphEditSessionGraphResponse};
+use serde_json::json;
+
+impl WorkflowService {
+ /// Empty means no host registrations; transport failure is a separate outcome.
+ pub fn custom_node_authoring_catalog(&self) -> CustomNodeAuthoringCatalog {
+ CustomNodeAuthoringCatalog {
+ contract_version: 1,
+ nodes: self
+ .node_registry
+ .custom_nodes
+ .nodes()
+ .map(|node| {
+ let ports = |ports: &[pantograph_node_contracts::PortContract]| {
+ ports
+ .iter()
+ .map(|port| CustomNodeAuthoringPort {
+ id: port.id.as_str().into(),
+ label: port.label.clone(),
+ })
+ .collect()
+ };
+ CustomNodeAuthoringEntry {
+ identity: node.identity().clone(),
+ label: node.contract().label.clone(),
+ description: node.contract().description.clone(),
+ trust: CustomNodeAuthoringTrust::TrustedInProcess,
+ inputs: ports(&node.contract().inputs),
+ outputs: ports(&node.contract().outputs),
+ }
+ })
+ .collect(),
+ }
+ }
+
+ /// Resolve the user's complete selection before creating any session. Imported pins
+ /// never pass through this operation, and are never silently updated.
+ pub async fn create_custom_node_draft(
+ &self,
+ request: CustomNodeDraftRequest,
+ ) -> Result {
+ let custom = self
+ .node_registry
+ .custom_nodes
+ .get(&request.identity.node_type)
+ .ok_or_else(|| {
+ WorkflowServiceError::InvalidRequest(
+ crate::custom_nodes::CustomNodeError::Unavailable.to_string(),
+ )
+ })?;
+ if custom.identity() != &request.identity {
+ return Err(WorkflowServiceError::InvalidRequest(
+ crate::custom_nodes::CustomNodeError::IdentityMismatch.to_string(),
+ ));
+ }
+ let mut graph = WorkflowGraph {
+ nodes: vec![GraphNode {
+ id: "custom".into(),
+ node_type: request.identity.node_type.clone(),
+ position: Position { x: 320.0, y: 0.0 },
+ data: json!({"label": custom.contract().label, CUSTOM_NODE_IDENTITY_FIELD: custom.identity()}),
+ }],
+ edges: vec![],
+ derived_graph: None,
+ };
+ for (direction, ports, node_type) in [
+ ("input", &custom.contract().inputs, "text-input"),
+ ("output", &custom.contract().outputs, "text-output"),
+ ] {
+ let definition = self
+ .node_registry
+ .get_definition(node_type)
+ .ok_or_else(|| {
+ WorkflowServiceError::Internal("text authoring contract is unavailable".into())
+ })?;
+ for (index, port) in ports.iter().enumerate() {
+ let id = format!("{direction}-{index}");
+ let input = direction == "input";
+ graph.nodes.push(GraphNode {
+ id: id.clone(),
+ node_type: node_type.into(),
+ position: Position {
+ x: if input { 0.0 } else { 640.0 },
+ y: index as f64 * 160.0,
+ },
+ data: json!({"label": port.label, "text": "", "definition": definition}),
+ });
+ graph.edges.push(GraphEdge {
+ id: format!("edge-{id}"),
+ source: if input { id.clone() } else { "custom".into() },
+ source_handle: if input {
+ "text".into()
+ } else {
+ port.id.as_str().into()
+ },
+ target: if input { "custom".into() } else { id },
+ target_handle: if input {
+ port.id.as_str().into()
+ } else {
+ "text".into()
+ },
+ });
+ }
+ }
+ let session = self.graph_session_store.create_session(graph, None).await;
+ self.graph_session_store
+ .get_session_graph(&session.session_id)
+ .await
+ }
+}
diff --git a/crates/pantograph-workflow-service/src/workflow/service_config.rs b/crates/pantograph-workflow-service/src/workflow/service_config.rs
index 919c487c1..01a5c7a4e 100644
--- a/crates/pantograph-workflow-service/src/workflow/service_config.rs
+++ b/crates/pantograph-workflow-service/src/workflow/service_config.rs
@@ -92,7 +92,9 @@ impl WorkflowService {
runtime_dispatch_assignment_repository: Arc::new(Mutex::new(
InMemoryWorkflowRuntimeDispatchAssignmentRepository::new(),
)),
- graph_session_store: Arc::new(GraphSessionStore::new()),
+ graph_session_store: Arc::new(
+ GraphSessionStore::new().with_node_registry(node_registry.clone()),
+ ),
artifact_writer: None,
artifact_format_settings: Arc::new(Mutex::new(ArtifactFormatSettings::default())),
artifact_format_settings_path: None,
@@ -190,7 +192,8 @@ impl WorkflowService {
provider: Arc,
) -> Self {
self.graph_session_store = Arc::new(
- GraphSessionStore::with_inference_interface_facts_provider(provider),
+ GraphSessionStore::with_inference_interface_facts_provider(provider)
+ .with_node_registry(self.node_registry.clone()),
);
self
}
@@ -201,11 +204,14 @@ impl WorkflowService {
inference_provider: Arc,
provider: SharedDependencyEnvironmentProvider,
) -> Self {
- self.graph_session_store = Arc::new(GraphSessionStore::with_timeout_and_providers(
- std::time::Duration::from_secs(5 * 60),
- inference_provider,
- provider.clone(),
- ));
+ self.graph_session_store = Arc::new(
+ GraphSessionStore::with_timeout_and_providers(
+ std::time::Duration::from_secs(5 * 60),
+ inference_provider,
+ provider.clone(),
+ )
+ .with_node_registry(self.node_registry.clone()),
+ );
self.dependency_readiness_provider = Arc::new(DependencyEnvironmentService::new(provider));
self
}
diff --git a/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs b/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
index 6e16c03d5..9226d62a0 100644
--- a/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
+++ b/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
@@ -362,3 +362,272 @@ async fn custom_nodes_callback_failures_are_terminal_without_publishing_outputs(
.is_err());
}
}
+
+async fn authored_draft(service: &WorkflowService) -> crate::WorkflowGraphEditSessionGraphResponse {
+ let identity = service.custom_node_authoring_catalog().nodes[0]
+ .identity
+ .clone();
+ service
+ .create_custom_node_draft(crate::custom_nodes::authoring::CustomNodeDraftRequest {
+ identity,
+ })
+ .await
+ .unwrap()
+}
+
+#[tokio::test]
+async fn custom_node_authoring_registry_survives_provider_builders_and_undo_redo() {
+ for mode in 0..3 {
+ let service = WorkflowService::with_trusted_custom_nodes(catalog(Arc::new(Executor::new(
+ Behavior::Uppercase,
+ ))));
+ let service = match mode {
+ 1 => service.with_inference_interface_facts_provider(Arc::new(crate::graph::UnavailableInferenceInterfaceFactsProvider)),
+ 2 => service.with_graph_session_fact_providers(Arc::new(crate::graph::UnavailableInferenceInterfaceFactsProvider), Arc::new(pantograph_dependency_environment_service::NotImplementedDependencyEnvironmentProvider)),
+ _ => service,
+ };
+ let draft = authored_draft(&service).await;
+ assert!(
+ draft
+ .graph_diagnostics
+ .iter()
+ .all(|d| !d.blocking_submission),
+ "{:?}",
+ draft.graph_diagnostics
+ );
+ let pin = draft.graph.nodes[0].data[CUSTOM_NODE_IDENTITY_FIELD].clone();
+ let updated = service
+ .workflow_graph_update_node_data(crate::WorkflowGraphUpdateNodeDataRequest {
+ session_id: draft.session_id.clone(),
+ node_id: "input-0".into(),
+ data: serde_json::json!({"text": "authored"}),
+ })
+ .await
+ .unwrap();
+ assert_eq!(
+ updated.graph.find_node("input-0").unwrap().data["text"],
+ "authored"
+ );
+ let request = crate::WorkflowGraphEditSessionGraphRequest {
+ session_id: draft.session_id,
+ };
+ let undo = service.workflow_graph_undo(request.clone()).await.unwrap();
+ let redo = service.workflow_graph_redo(request).await.unwrap();
+ for snapshot in [undo, redo] {
+ assert_eq!(
+ snapshot.graph.find_node("custom").unwrap().data[CUSTOM_NODE_IDENTITY_FIELD],
+ pin
+ );
+ assert!(snapshot
+ .graph_diagnostics
+ .iter()
+ .all(|d| !d.blocking_submission));
+ }
+ }
+}
+
+#[tokio::test]
+async fn custom_node_authoring_refuses_stale_selection_and_identity_patches_without_mutation() {
+ let service = WorkflowService::with_trusted_custom_nodes(catalog(Arc::new(Executor::new(
+ Behavior::Uppercase,
+ ))));
+ let entry = service.custom_node_authoring_catalog().nodes[0].clone();
+ let mut stale = entry.identity.clone();
+ stale.environment_digest = crate::custom_nodes::tests::digest("changed environment");
+ let error = service
+ .create_custom_node_draft(crate::custom_nodes::authoring::CustomNodeDraftRequest {
+ identity: stale.clone(),
+ })
+ .await
+ .unwrap_err();
+ assert!(error.to_string().contains("identity does not match"));
+ assert!(
+ serde_json::from_value::(
+ serde_json::json!({"identity": entry.identity, "definition": {}})
+ )
+ .is_err()
+ );
+ let draft = authored_draft(&service).await;
+ for patch in [
+ serde_json::json!({CUSTOM_NODE_IDENTITY_FIELD: stale}),
+ serde_json::json!({"definition": {}}),
+ serde_json::json!({CUSTOM_NODE_IDENTITY_FIELD: null}),
+ ] {
+ let error = service
+ .workflow_graph_update_node_data(crate::WorkflowGraphUpdateNodeDataRequest {
+ session_id: draft.session_id.clone(),
+ node_id: "custom".into(),
+ data: patch,
+ })
+ .await
+ .unwrap_err();
+ assert!(error.to_string().contains("cannot be patched"));
+ let after = service
+ .workflow_graph_get_edit_session_graph(crate::WorkflowGraphEditSessionGraphRequest {
+ session_id: draft.session_id.clone(),
+ })
+ .await
+ .unwrap();
+ assert_eq!(after.graph_revision, draft.graph_revision);
+ assert_eq!(after.graph, draft.graph);
+ }
+ let mut unpinned = draft.graph.find_node("custom").unwrap().clone();
+ unpinned.id = "bad".into();
+ unpinned.data = serde_json::json!({});
+ assert!(service
+ .workflow_graph_add_node(crate::WorkflowGraphAddNodeRequest {
+ session_id: draft.session_id,
+ node: unpinned
+ })
+ .await
+ .unwrap_err()
+ .to_string()
+ .contains("identity does not match"));
+}
+
+#[tokio::test]
+async fn custom_node_authoring_candidates_and_commit_share_exact_registry() {
+ let service = WorkflowService::with_trusted_custom_nodes(catalog(Arc::new(Executor::new(
+ Behavior::Uppercase,
+ ))));
+ let draft = authored_draft(&service).await;
+ let removed = service
+ .workflow_graph_remove_edge(crate::WorkflowGraphRemoveEdgeRequest {
+ session_id: draft.session_id.clone(),
+ edge_id: "edge-input-0".into(),
+ })
+ .await
+ .unwrap();
+ let source = crate::ConnectionAnchor {
+ node_id: "input-0".into(),
+ port_id: "text".into(),
+ };
+ let candidates = service
+ .workflow_graph_get_connection_candidates(
+ crate::WorkflowGraphGetConnectionCandidatesRequest {
+ session_id: draft.session_id.clone(),
+ source_anchor: source.clone(),
+ graph_revision: Some(removed.graph_revision.clone()),
+ },
+ )
+ .await
+ .unwrap();
+ assert!(candidates
+ .compatible_nodes
+ .iter()
+ .any(|node| node.node_id == "custom"));
+ assert!(!candidates
+ .insertable_node_types
+ .iter()
+ .any(|node| node.node_type == "custom-uppercase"));
+ let rejected = service
+ .workflow_graph_preview_node_insert_on_edge(
+ crate::WorkflowGraphPreviewNodeInsertOnEdgeRequest {
+ session_id: draft.session_id.clone(),
+ edge_id: "edge-output-0".into(),
+ node_type: "custom-uppercase".into(),
+ graph_revision: removed.graph_revision.clone(),
+ },
+ )
+ .await
+ .unwrap();
+ assert!(!rejected.accepted);
+ assert!(rejected
+ .rejection
+ .unwrap()
+ .message
+ .contains("insertion by name is unsupported"));
+ let committed = service
+ .workflow_graph_connect(crate::WorkflowGraphConnectRequest {
+ session_id: draft.session_id.clone(),
+ source_anchor: source,
+ target_anchor: crate::ConnectionAnchor {
+ node_id: "custom".into(),
+ port_id: "input".into(),
+ },
+ graph_revision: removed.graph_revision,
+ })
+ .await
+ .unwrap();
+ assert!(committed.accepted);
+ let snapshot = service
+ .workflow_graph_get_edit_session_graph(crate::WorkflowGraphEditSessionGraphRequest {
+ session_id: draft.session_id,
+ })
+ .await
+ .unwrap();
+ assert!(snapshot
+ .graph_diagnostics
+ .iter()
+ .all(|d| !d.blocking_submission));
+}
+
+#[tokio::test]
+async fn custom_node_authoring_saved_reopen_preserves_pin_and_scheduler_execution() {
+ let root = tempfile::tempdir().unwrap();
+ let catalog = catalog(Arc::new(Executor::new(Behavior::Uppercase)));
+ let service = WorkflowService::with_trusted_custom_nodes(catalog.clone());
+ let draft = authored_draft(&service).await;
+ let store = FileSystemWorkflowGraphStore::new(root.path());
+ let saved = service
+ .workflow_graph_save(
+ &store,
+ crate::WorkflowGraphSaveRequest {
+ name: "custom-workflow".into(),
+ graph: draft.graph.clone(),
+ },
+ )
+ .unwrap();
+ let reopened = WorkflowService::with_trusted_custom_nodes(catalog);
+ let graph = reopened
+ .workflow_graph_load(
+ &store,
+ crate::WorkflowGraphLoadRequest {
+ path: saved.path.clone(),
+ },
+ )
+ .unwrap()
+ .graph;
+ assert_eq!(
+ graph.find_node("custom").unwrap().data[CUSTOM_NODE_IDENTITY_FIELD],
+ draft.graph.find_node("custom").unwrap().data[CUSTOM_NODE_IDENTITY_FIELD]
+ );
+ for (service, blocking) in [(&reopened, false), (&WorkflowService::new(), true)] {
+ let edit = service
+ .workflow_graph_create_edit_session(crate::WorkflowGraphEditSessionCreateRequest {
+ graph: graph.clone(),
+ workflow_id: Some(saved.path.clone()),
+ })
+ .await
+ .unwrap();
+ let snapshot = service
+ .workflow_graph_get_edit_session_graph(crate::WorkflowGraphEditSessionGraphRequest {
+ session_id: edit.session_id,
+ })
+ .await
+ .unwrap();
+ assert_eq!(
+ snapshot.graph.find_node("custom").unwrap().data,
+ graph.find_node("custom").unwrap().data
+ );
+ assert_eq!(
+ snapshot
+ .graph_diagnostics
+ .iter()
+ .any(|d| d.blocking_submission),
+ blocking
+ );
+ }
+ let host = SavedGraphHost {
+ root: root.path().into(),
+ };
+ let session_id = session(&reopened, &host).await;
+ let mut request = run_request(&session_id);
+ request.inputs[0].node_id = "input-0".into();
+ request.output_targets.as_mut().unwrap()[0].node_id = "output-0".into();
+ let result = reopened
+ .run_workflow_execution_session(&host, request)
+ .await
+ .unwrap();
+ assert_eq!(result.outputs[0].value, "MIXED CASE");
+}
diff --git a/docs/custom-nodes.md b/docs/custom-nodes.md
index 9ed1bcb6e..543552b93 100644
--- a/docs/custom-nodes.md
+++ b/docs/custom-nodes.md
@@ -82,13 +82,47 @@ adds the `custom_node` non-runtime template; identity adapter version 1 owns thi
bounded contract. Coordinated Rust producers/consumers are updated together;
older implementations cannot execute that template.
-NodeLab authoring, Local Agent and runtime publishing remain unavailable.
-Graph edit-session authoring and connection APIs still use built-in discovery;
-they are not custom-node authoring surfaces. Before exposing custom nodes there,
-NodeLab must install host-authorized registrations and exact graph pins, use the
-same registry for edit validation/connection previews, and expose trust, version
-mismatch and unavailable implementation outcomes. Publishing arbitrary code
-needs its own artifact verification, isolation and lifecycle contract.
+## NodeLab graph authoring
+
+NodeLab authors workflows from implementations already admitted by its host. It
+reads `custom_node_authoring_catalog` (wire version 1), a narrow projection of
+canonical labels, required string port IDs and complete immutable identities.
+The projection's `trusted_in_process` profile carries the trust obligations above;
+it is not an installation or execution permission. Default desktop composition
+has an empty catalog and says so. Host maintainers register implementations in
+Rust before service construction; browser clients cannot register or load code.
+The legacy generic palette remains built-in-only.
+
+`create_custom_node_draft` requires the complete selected identity. The service
+resolves exact equality before creating a session, then builds one text source
+per required input, the pinned custom node, and one text sink per output. Custom
+nodes never receive `node.data.definition`. NodeLab owns a separate edit session,
+allows text source edits, displays backend contract diagnostics, and saves/reopens
+through existing graph persistence. It provides no execution button; saved graphs
+use scheduler sessions. Input text is authored configuration, not tool authority.
+
+The same admitted registry reaches edit-session canonicalization, diagnostics,
+connection candidates and commits, including provider-builder construction. New
+custom additions require exact pins. General custom data patches cannot change
+identity or definitions. Imported/reopened missing or stale pins remain unchanged
+and produce blocking diagnostics; explicit new authoring is the recovery path.
+Name-only insert-and-connect/insert-on-edge APIs cannot express a selected complete
+identity, so custom insertion there is explicitly unsupported and omitted from
+creation suggestions. Adding a pinned node and connecting existing endpoints is
+supported.
+
+Failed create/reopen preserves the current draft. Replacement and page teardown
+close owned sessions, including late creation completion. Transport failures during
+close retain exact session IDs in the app-scoped NodeLab service. Pending cleanup
+is visible on the next NodeLab mount, blocks new creation/reopening and has an
+explicit retry action. No automatic graph-session reap is assumed. A process or
+host restart ends these ephemeral sessions; saved files retain their exact pins.
+
+The desktop commands are `get_custom_node_authoring_catalog`,
+`create_custom_node_draft` and `get_node_lab_draft`; mutations/persistence reuse
+existing commands. Local Agent and runtime publishing remain unavailable or
+unsupported. Arbitrary packages still need independently admitted artifact
+verification, isolation and lifecycle contracts.
A scheduler-managed tool loop must consume this exact admission and invocation
identity, plus its own typed tool authority, bounded iterations, cancellation,
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..ec6e6c01c5b6d92e7d5f711e3f8f19252feaee63
GIT binary patch
literal 441
zcmV;q0Y?5GiwFP!0000216@+hZWA#OzVB0v_8gpSNQ=~CLE?rGlmkK>9D9;X*ME5I
zRZ_%-SAZi=*C%0|Ra&XO`TLpqX6%Uy!gQ@RYJhDeXDRGq7c-%ang
zq1*lO-yax;4R{ebWO(AysxD)&m|G!psA1%0Fwv)48n%C+1WXUuU`t$Q~9^t0(A9`Uq|I$JPOuC18OT#7~V=ePt`Bl9#Ul8yz-%1(glPFEQPl5xPbQ`zcft~
j%o+M19VfigHB+k@Vu2r3JKB*bx?kOYkqj1t@9th3OC
literal 0
HcmV?d00001
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/native-unavailable.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/native-unavailable.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..3080c4fbb6a61d170f1146064ebdb28df58b9529
GIT binary patch
literal 2190
zcmV;92yyoxiwFP!000021FczYZ``;M{_bC)Z)wq!yxJFeZ6Jr{++Gq~8XqnOihhzQ
zidr$2NQI=lyZ-eZzGy9xvYVU>1X^X`laFcp0ZuEM^x$0ii@bC4T&@%
z;w&n9+LTdA1;L7o;~5;f=50qC%`J&2NshT7(LK~>eD9moZ#i)1mSHhiZQu9Kyw@R10P
zd3V&*ZL(TTsa3CfL1e6uyw@D7WR=cy^olm~932w+GjF(ZFcXL8{!;p=Mk9;m}1vAB~7@vYgTcVr7nN1pjO%J>MuR$)QD^sl$~|1)W%b
zTCdlkXe-kzj^e0D+v9s}IDIg7L5X{Y4NS(PwXayaR0-Z%&0e^V{GQkb@bgPMT{%OF
z)0qsPD*qx$Js1#!r$F*tMMI@-T_;Q}HC+w|Q$K;aaxf@p$ib%G!xzQdCNGg9inhk3
zELlxC_LMQc*Q8Cd_JV{tlPc!aWg(l%d`YDe_Our(Tno;4tR9W!V4L58O{Ht%!jED}
zcSI_8$nPP_j!xg!FACfun>7g1#gtUZoE)Ikbk>3rq__tV!KfJ^d>QsN+RM1Xu{;`>
zUS0SyI<5#)6g7FTDp$;57L}mH;>jvBp@S^bQdibV|C9mqrh(}LO>QtffOL%mjf}f{
z8mnVRr0I&F?o~|zS_KzYM!KDcZ*m~GS6qxCJP3!74w2Tg?sP;bN}RE?@Gd*V7%6RC
zdicH@v2gQGKjK}u@sY#ErRkk}CwLswC3K{X9$
zw+*-v03q_4!&blT$+e&ElA#=xsB;bkc&od*pgR}|qoy9Uj#8cOY3uxqa66m4If1Jk
zq_wjXW|M5gfQ;H|lm}Aik`kONIg0kvNjG^63?bnP+{aDmTGGZP=|D!N2dd}M(hV-p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--git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
new file mode 100644
index 000000000..5d259bf2c
--- /dev/null
+++ b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
@@ -0,0 +1,54 @@
+{
+ "base": "285c48989a95caef1bcaac92eac9ff3b1be0a9ad",
+ "environment": {
+ "os": "Linux x86_64",
+ "rust": "1.92.0",
+ "node": "24.12.0",
+ "chromium": "Chromium 151.0.7922.173 built on Debian GNU/Linux 13 (trixie)",
+ "mode": "headless; disposable profile/store; GPU disabled; container verification no-sandbox only"
+ },
+ "claims": {
+ "browser_user_workflow": "passed: actual NodeLab -> loopback -> Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; missing implementation blocking; exact pin retained",
+ "service_tests": "1068 library +65 integration passed, zero failures/ignored",
+ "frontend_tests": "740 passed, zero failures/ignored; 10 focused decoding/controller/presenter tests included",
+ "native_tauri": "unavailable: cargo check --locked -p pantograph --bin pantograph --no-default-features fails at glib-sys: missing glib-2.0.pc; pkg-config also lacks GTK/WebKit; no native startup claim",
+ "not_claimed": [
+ "installed custom nodes in default desktop",
+ "arbitrary code loading",
+ "trained model T3",
+ "GPU",
+ "inference-backed/effectful tool loops",
+ "release qualification"
+ ]
+ },
+ "source_sha256": {
+ "crates/pantograph-workflow-service/examples/nodelab_host.rs": "1c9a33092e0bac9560247b8c1e158bc0405527cad7b0a280d79dc61334eed8c8",
+ "crates/pantograph-workflow-service/src/custom_nodes.rs": "1d413febbad16689c864e7945191c7bb83079530ece13fda73541178bd86f774",
+ "crates/pantograph-workflow-service/src/custom_nodes/authoring.rs": "ab2e37ca4a68b846e8f23897891eea064730a1376c8597eb5ce00e1bf5f909ed",
+ "crates/pantograph-workflow-service/src/graph/connection_insert.rs": "881afe99675e681a2bd1208f69e55f82afa881adec9ead9a6863089dd3a6f2af",
+ "crates/pantograph-workflow-service/src/graph/connection_intent.rs": "d5832d05d88dd0d2dc10cb367038a0a6d5973e1275fe19e888fb411c13057199",
+ "crates/pantograph-workflow-service/src/graph/session.rs": "e9248df745093b0ff078691a04036017fed894bdd073d922b0f628920a1efcac",
+ "crates/pantograph-workflow-service/src/graph/session_connection_api.rs": "f29f061031b4c70f829cfbd603108857ed7d093245ae3cdeb8d63797b9c5fefe",
+ "crates/pantograph-workflow-service/src/graph/session_contract.rs": "844733c80c5f5a372844637a104e901b9cd46433e1ef73662ff314f4b8e134b0",
+ "crates/pantograph-workflow-service/src/graph/session_node_api.rs": "61505593be43e6bc58e9c9c8f1b991cfd75949a55da8351278ca45a25015ecd3",
+ "crates/pantograph-workflow-service/src/graph/session_state.rs": "c19150bbf4b61dd506ad6bb618593c40f59a8fde43f554025eb940e8c75b1d17",
+ "crates/pantograph-workflow-service/src/workflow.rs": "47e42061802abc91ebe6b3babf8c578116d2e0fecf51d86fa53148cbed613886",
+ "crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs": "5bf54f01b2db4ec2ffc21b6af41291c695ff91a3b274deb80838c32020b9941d",
+ "crates/pantograph-workflow-service/src/workflow/service_config.rs": "257edc58a50b37e8dee265b971e91084b0f77b0ce4031f8d105b604f33cea513",
+ "crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs": "aa080d798774771aa419db01d83cd26401684ab06333770a74e209c601e5952f",
+ "scripts/README.md": "03bed3d3d157a4d7e4a9f2a291f4a2ab37efa2e81f87c83e3d5710a38220119a",
+ "scripts/check-nodelab-browser.mjs": "30a619d382ddb242c19b50c51ec97fda8a6c20973fe51f94c7c0fcf5658d24d4",
+ "src-tauri/src/app_setup.rs": "b14c996956638c5a708156aaf8f110ce6f1fa3a175f6b03bb9ff0284bd392a50",
+ "src-tauri/src/workflow/commands.rs": "24834569833ec6509300b9c8c795b9eb8be233f0c6d9c37c5d67f82b63d24b6c",
+ "src/components/workbench/NodeLabPage.svelte": "b9206ed693d2a18f065c547752622cbb48a96a3599d1867d166e45f39fc7424f",
+ "src/components/workbench/nodeLabController.ts": "3b3806dcf0aedf191fd7ad91ce3ac746a08c6962b1c0b292f54d9ba6e9145716",
+ "src/components/workbench/nodeLabPresenters.test.ts": "5debffcdba6ddc86d4b4093dceb08dbf691b7659b73a483abd8d991616faa02e",
+ "src/components/workbench/nodeLabPresenters.ts": "4792bedc18bf6b55173a892e0f15bc7900b4c36fd84bfc508da3dac9c0bbb075",
+ "src/services/workflow/customNodeAuthoring.test.ts": "73d776ffb40ddcafcfb0e69f7434f98aa19bd037484a36ccdef7d9eff290d250",
+ "src/services/workflow/customNodeAuthoring.ts": "f4a11c2fa37816819db79176b2af584199c946a5e3c533482cc595362092dc08"
+ },
+ "evidence_sha256": {
+ "browser.log.gz": "39a0549788107cc92c66b172a0810f2f81b40de30458af58e660a67fa1b45287",
+ "native-unavailable.log.gz": "f72bc764c185d785964c3ac95e9a0d6f24a1d999aefbd349dc143eed28d261b3"
+ }
+}
diff --git a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
index 7b4348f1e..e6a6f09de 100644
--- a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
+++ b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
@@ -813,3 +813,36 @@ Accepted stop-string/PR60 and all seed/precision/repair/paused histories remain
separate. Controlled package/readiness/dispatch/session facts and untrained CPU
models do not qualify live Pumas, pretrained quality, GPU, desktop or native
batching/throughput. Full plan acceptance and parent publication remain separate.
+
+## 2026-10-22 — NodeLab trusted-node authoring
+
+Continued the admitted CN-02 slice on main `285c4898` after CN-01/README merges.
+The [consumer contract](../../custom-nodes.md#nodelab-graph-authoring) owns the
+read-only versioned catalog, exact-selection server-built drafts, shared edit
+registry, pin-preserving mutations and saved/reopened behavior. Default desktop
+has no custom registrations; the separate real Rust qualification host supplies
+one compiled pure transform. No code loader, execution UI or tool grant is added.
+Independent GPT-6.1 Sol High review accepted after repairing failed replacement
+loss, explicit-null diagnostic decoding and close-failure ownership/recovery.
+
+[Qualification](evidence/nodelab-authoring/qualification.json) retains source
+bindings, actual Chromium→Rust→filesystem user-workflow evidence and the native
+failure. Service tests pass 1,068 library +65 integration, zero failures/ignored;
+740 frontend tests pass including ten focused parser/controller/presenter cases.
+Formatting, typecheck, production frontend build, lint, critical/a11y gates,
+scheduler-only guard and traceability tests pass. All-target package Clippy
+retains only the existing inference dead-field warning. Initial new fixtures used
+an unexported provider and a nonexistent response field; corrected against the
+actual owning APIs, preserving the assertions. The first browser Enter simulation
+omitted character text and did not activate the button; proper CDP key events
+then passed the same workflow assertions, with no pointer fallback for that gate.
+
+Native `cargo check --locked -p pantograph --bin pantograph --no-default-features`
+is unavailable at glib-sys because this environment lacks `glib-2.0.pc`; GTK and
+WebKit development packages are also absent. No native/desktop startup claim or
+persistent access change is made. PR92 `afe33029` remains open with its unique
+trained-text source/evidence and missing T3 gate unchanged. CN-03 PR94 integrates
+first by parent instruction; CN-02 must then reconcile current main, preserve its
+registry/loop validations, rerun combined affected tests and pass exact-head CI
+before merge. The local/remote feature branch and worktree are retained pending
+that disposition, with source and evidence preserved.
diff --git a/docs/plans/domain-architecture-and-multimodal/issues.md b/docs/plans/domain-architecture-and-multimodal/issues.md
index 78a0af760..5b5a43ac5 100644
--- a/docs/plans/domain-architecture-and-multimodal/issues.md
+++ b/docs/plans/domain-architecture-and-multimodal/issues.md
@@ -76,5 +76,5 @@ authorize the historical resident-accounting next-slice text.
| ID | Issue | Owner | Disposition / next evidence |
| --- | --- | --- | --- |
| CN-01 | Palette/callback registration does not establish canonical executable admission or implementation/environment identity. | Custom-node lead | Closed for the bounded trusted string adapter after independent GPT-6.1 Sol High review and 1,129 passing service tests. Exact admission, saved/reopened scheduler execution, cancellation/commit arbitration and inspection share the immutable catalog. Arbitrary executable loading remains outside this contract. |
-| CN-02 | NodeLab authoring, Local Agent and runtime publishing remain unavailable. | NodeLab follow-on | Deferred. Consume the [custom-node contract](../../custom-nodes.md): host-authorized registrations and exact graph pins, same registry for edit-session validation/connection previews, trust/version/unavailable outcomes. Untrusted package publishing additionally needs independently admitted artifact verification and isolation. A palette entry cannot enable execution. |
-| CN-03 | Scheduler-managed tool-loop exposure needs a safe node invocation contract and explicit tool authority. | Tool-loop follow-on | Deferred. Depend on CN-01 exact identity/admission and scheduler-owned run/attempt/cancellation/result commitment; separately admit typed tool capabilities, bounded iteration and side-effect/idempotency behavior. The string adapter grants no tool capability. Do not restore the retired static loop. |
+| CN-02 | NodeLab graph authoring requires the same admission identity and registry as execution. | NodeLab lead | Implemented, verifying: service-owned exact-selection draft creation, NodeLab source editing/save/reopen, shared edit registry and blocking stale/unavailable diagnostics. Default desktop is honestly empty; nonempty host-composed browser flow is qualified separately. Local Agent/code publishing, generic name-only custom insertion and arbitrary loading remain unsupported. See [contract](../../custom-nodes.md#nodelab-graph-authoring). |
+| CN-03 | Scheduler-managed tool-loop exposure needs a safe node invocation contract and explicit tool authority. | Tool-loop follow-on | Separate worker task `01a1615c-5be4-74a5-bf4c-c3f3b3136000`. Depend on CN-01 exact identity/admission and scheduler-owned run/attempt/cancellation/result commitment; separately admit typed tool capabilities, bounded iteration and side-effect/idempotency behavior. The string adapter grants no tool capability. Do not restore the retired static loop. |
diff --git a/docs/plans/domain-architecture-and-multimodal/plan.md b/docs/plans/domain-architecture-and-multimodal/plan.md
index fdd0a90e6..2a0b0c92a 100644
--- a/docs/plans/domain-architecture-and-multimodal/plan.md
+++ b/docs/plans/domain-architecture-and-multimodal/plan.md
@@ -298,6 +298,64 @@ Development Proportionality, Commit, Documentation, Architecture/Code Design,
Contracts, Security, Concurrency/Resilience and Library/Rust API/Async guidance.
The rest of this plan retains its historical standards baseline.
+## Admitted NodeLab/edit-session slice (2026-10-22)
+
+**Admission:** `continue` this Active plan under the delegated unfinished-path
+instruction. CN-01 is integrated in `2e517f58`, README PR79 in current main
+`285c4898`. Independent GPT-6.1 Sol High design review admits a bounded NodeLab
+graph-authoring surface before implementation. This does not author or install
+executable code. PR92's unique trained-text source/evidence and missing T3 gate
+remain separate and protected; CN-03 has its own worker and integration gate.
+
+**Outcome and contract:** NodeLab reads a versioned service-owned projection of
+host-admitted custom definitions and complete identities. The default desktop
+catalog is honestly empty; a composed host supplies nonempty registrations.
+Selecting an admitted node creates a separate edit-session draft with one text
+source per required input and one text sink per output, derived from host ports.
+Users edit source values, inspect backend diagnostics, save and reopen through
+existing graph APIs. Saved pins are never silently refreshed. Missing/stale
+implementations remain visible and blocking; recovery requires explicit new
+authoring. No direct edit-session execution, Local Agent, runtime publishing,
+arbitrary loader, new capability grant or static tool loop is enabled.
+
+The draft is constructed by the service from the exact selected identity, not
+from a client-supplied custom definition. The same immutable registry must reach
+graph-session construction, provider
+builders, canonicalization, response diagnostics and connection candidate/commit
+validation. Add requires the exact selected identity; custom data patches cannot
+change identity or add dynamic definitions. Imported invalid graphs remain
+inspectable without healing. Name-only custom insert-on-edge/insert-and-connect
+is explicitly unsupported; use pinned add plus explicit connections. The
+legacy generic palette stays built-in-only. CN-03 consumes saved graph pins and
+CN-01 scheduler invocation, not NodeLab state or a second execution route.
+
+**Composition and write set:** registry/catalog owns admitted facts; graph
+sessions own authored state, undo and validation; NodeLab owns local interaction
+and observes service responses; existing store owns persistence. Stable
+interfaces are the versioned read projection and existing pinned graph/mutation
+contracts. This avoids duplicating admission or execution in the frontend.
+Change service `custom_nodes`, `graph`, graph API/config and related tests;
+NodeLab presenters/controller/page and narrow workflow transport projections;
+desktop command wiring; a bounded real-host example/browser probe and affected
+documentation. No scheduler-loop core, text runtime/readiness, root README or
+PR92 edits. Branch `feat/nodelab-trusted-catalog`, worktree
+`/workspace/pantograph-nodelab`, base `285c4898`, target `main`. Preserve source,
+branches and evidence; parent coordinates serial integration if CN-03 intersects.
+
+**Acceptance:** focused admission/edit-session refusal tests, real save/reopen
+and connection candidate/commit tests, provider-builder registry retention,
+frontend decoder/lifecycle tests, and real-browser pointer/keyboard draft →
+edit → save → reopen interaction through an injected Rust host. Browser evidence
+does not qualify native Tauri startup. Native compile/smoke is attempted only
+where available and its actual limits recorded. Required CI, independent source
+review and current-main recheck precede merge under the later cleanup authority;
+no gate waiver, evidence-weakening rerun or persistent access expansion. Status
+`Verifying`; next slice complete independent review, current-main/CI gates and
+serial integration. Failed replacement preserves the current draft; failed close
+transfers exact session IDs to an app-scoped, user-retryable cleanup owner. Standards baseline `0fc92a2`
+continues, adding routed Frontend, TypeScript/Async, Accessibility, IPC,
+Persistence, protocol/evolution and GUI verification detail to the CN-01 routes.
+
## Standards And Plan Authority
Standards source:
diff --git a/scripts/README.md b/scripts/README.md
index 968852740..15d8c1291 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -257,3 +257,20 @@ it preserves the existing expression-evidence policy rather than proving its
runtime value. Native-button rules and reviewed-ignore rules are unchanged.
Runtime accessibility and dynamically empty/hidden content still require UI
validation.
+
+## NodeLab authoring browser qualification
+
+Build `cargo build --locked -p pantograph-workflow-service --example nodelab_host`,
+then run `NODELAB_HOST_BINARY= node
+scripts/check-nodelab-browser.mjs`. The isolated stdio Rust host registers one
+compiled pure transform and owns a temporary workflow store; the verifier exposes
+only a temporary loopback transport. It exercises the actual NodeLab component,
+strict catalog decoding, keyboard focus/creation, pointer edits, filesystem
+save/reopen, pin retention, session replacement cleanup and missing-implementation
+blocking. A second real empty host proves the empty catalog and stale reopen;
+a deliberately failed transport proves the distinct unavailable state. Browser
+arguments select headless Chromium, disposable profile, GPU disabled and the
+verification-only no-sandbox mode required by this container. They do not alter
+normal startup. This is browser/host evidence, not native Tauri, package, model,
+GPU or scheduler tool-loop qualification. EOF and verifier teardown release the
+host/store/browser resources. See [custom-node authoring](../docs/custom-nodes.md#nodelab-graph-authoring).
diff --git a/scripts/check-nodelab-browser.mjs b/scripts/check-nodelab-browser.mjs
new file mode 100644
index 000000000..76cd26290
--- /dev/null
+++ b/scripts/check-nodelab-browser.mjs
@@ -0,0 +1,172 @@
+/* global document, getComputedStyle */
+// Real NodeLab component -> loopback transport -> isolated Rust service -> filesystem.
+// No Tauri startup, installed node, model or GPU claim. Build nodelab_host first.
+import assert from 'node:assert/strict';
+import { spawn } from 'node:child_process';
+import { createServer } from 'node:http';
+import { createInterface } from 'node:readline';
+import { mkdtemp, readFile, writeFile, symlink, rm } from 'node:fs/promises';
+import { tmpdir } from 'node:os';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { build } from 'vite';
+import { svelte } from '@sveltejs/vite-plugin-svelte';
+import { evaluateBrowserFunction } from './cdp-browser-function.mjs';
+
+const repo = fileURLToPath(new URL('../', import.meta.url));
+const fixture = await mkdtemp(path.join(tmpdir(), 'pantograph-nodelab-browser-'));
+const hostBinary = process.env.NODELAB_HOST_BINARY;
+assert.ok(hostBinary, 'NODELAB_HOST_BINARY must name the built nodelab_host example');
+const hosts = [];
+const servers = [];
+let browser;
+let socket;
+const commands = [];
+const sessions = [];
+try {
+ await symlink(path.join(repo, 'node_modules'), path.join(fixture, 'node_modules'));
+ await writeFile(path.join(fixture, 'index.html'), '
');
+ await writeFile(path.join(fixture, 'main.js'), `import { mount } from 'svelte'; import Page from ${JSON.stringify(path.join(repo, 'src/components/workbench/NodeLabPage.svelte'))}; mount(Page, { target: document.getElementById('app') });`);
+ await build({ configFile: false, root: fixture, plugins: [svelte()], build: { outDir: 'dist', emptyOutDir: true } });
+ function rustHost(empty) {
+ const child = spawn(hostBinary, empty ? ['--empty-catalog'] : [], { stdio: ['pipe', 'pipe', 'inherit'] });
+ hosts.push(child);
+ const lines = createInterface({ input: child.stdout });
+ let tail = Promise.resolve();
+ return (command, args) => {
+ const result = tail.then(() => new Promise((resolve, reject) => {
+ const timeout = setTimeout(() => { lines.removeListener('line', received); reject(new Error('Rust host command timeout')); }, 10000);
+ const received = line => { clearTimeout(timeout); try { resolve(JSON.parse(line)); } catch (error) { reject(error); } };
+ lines.once('line', received);
+ child.stdin.write(JSON.stringify({ command, args }) + '\n');
+ }));
+ tail = result.catch(() => {});
+ return result;
+ };
+ }
+ const realHost = rustHost(false);
+ const emptyHost = rustHost(true);
+ async function startServer(mode) {
+ const server = createServer(async (request, response) => {
+ try {
+ const url = new URL(request.url, 'http://127.0.0.1');
+ if (url.pathname.startsWith('/api/workflow/commands/')) {
+ if (request.method !== 'POST') { response.writeHead(405).end(); return; }
+ let body = ''; for await (const chunk of request) { body += chunk; if (body.length > 100000) throw new Error('request too large'); }
+ const command = decodeURIComponent(url.pathname.split('/').at(-1));
+ const args = JSON.parse(body);
+ commands.push(command);
+ const result = mode === 'error' ? { ok: false, error: { code: 'runtime_not_ready', message: 'Qualification host unavailable' } } : await (mode === 'empty' ? emptyHost : realHost)(command, args);
+ if (result.ok && command === 'create_custom_node_draft') sessions.push(result.value.session_id);
+ response.writeHead(result.ok ? 200 : 400, { 'Content-Type': 'application/json' }).end(JSON.stringify(result.ok ? result.value : result.error));
+ return;
+ }
+ const relative = url.pathname === '/' ? 'index.html' : url.pathname.slice(1);
+ const file = path.resolve(fixture, 'dist', relative);
+ if (!file.startsWith(path.resolve(fixture, 'dist') + path.sep)) { response.writeHead(403).end(); return; }
+ response.setHeader('Content-Type', file.endsWith('.js') ? 'application/javascript' : 'text/html');
+ response.end(await readFile(file));
+ } catch (error) { response.writeHead(500, { 'Content-Type': 'application/json' }).end(JSON.stringify({ code: 'internal_error', message: String(error) })); }
+ });
+ servers.push(server);
+ await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
+ return `http://127.0.0.1:${server.address().port}`;
+ }
+ const realOrigin = await startServer('real');
+ const emptyOrigin = await startServer('empty');
+ const errorOrigin = await startServer('error');
+ const profile = path.join(fixture, 'profile');
+ // This disposable container cannot provide the Chromium user-namespace sandbox.
+ // These verification flags do not modify the normal application launcher.
+ browser = spawn(process.env.CHROMIUM_BINARY || 'chromium', ['--headless=new', '--no-sandbox', '--disable-gpu', '--disable-background-networking', '--no-first-run', '--no-default-browser-check', '--user-data-dir=' + profile, '--remote-debugging-port=0', 'about:blank'], { stdio: ['ignore', 'ignore', 'pipe'], env: { ...process.env, XDG_CONFIG_HOME: path.join(fixture, 'config'), XDG_CACHE_HOME: path.join(fixture, 'cache') } });
+ let diagnostics = ''; browser.stderr.on('data', chunk => { diagnostics = (diagnostics + chunk).slice(-16384); });
+ let port;
+ const deadline = Date.now() + 10000;
+ while (!port && Date.now() < deadline) {
+ try { port = (await readFile(path.join(profile, 'DevToolsActivePort'), 'utf8')).split('\n')[0]; }
+ catch { await new Promise(resolve => setTimeout(resolve, 50)); }
+ }
+ assert.ok(port, 'Chromium startup unavailable: ' + diagnostics);
+ const pages = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json();
+ socket = new WebSocket(pages.find(page => page.type === 'page').webSocketDebuggerUrl);
+ await new Promise((resolve, reject) => { socket.addEventListener('open', resolve, { once: true }); socket.addEventListener('error', reject, { once: true }); });
+ let sequence = 0; const pending = new Map();
+ socket.addEventListener('message', event => {
+ const message = JSON.parse(event.data); const item = pending.get(message.id); if (!item) return;
+ pending.delete(message.id); clearTimeout(item.timer);
+ if (message.error) item.reject(new Error(JSON.stringify(message.error))); else item.resolve(message.result);
+ });
+ const call = (method, params = {}) => new Promise((resolve, reject) => {
+ const id = ++sequence;
+ const timer = setTimeout(() => { pending.delete(id); reject(new Error(method + ' timeout')); }, 15000);
+ pending.set(id, { resolve, reject, timer }); socket.send(JSON.stringify({ id, method, params }));
+ });
+ const evaluate = (callback, args) => evaluateBrowserFunction(call, callback, args);
+ const text = () => evaluate(() => document.body.innerText);
+ async function waitText(expected) {
+ const deadline = Date.now() + 10000;
+ while (Date.now() < deadline) { if ((await text()).includes(expected)) return; await new Promise(resolve => setTimeout(resolve, 30)); }
+ assert.fail(`Missing UI text: ${expected}\n${await text()}\nCommands: ${JSON.stringify(commands)}`);
+ }
+ async function navigate(origin) {
+ await call('Page.navigate', { url: `${origin}/?workflowHost=${encodeURIComponent(origin)}` });
+ await waitText('NodeLab');
+ }
+ async function clickButton(label) {
+ const rect = await evaluate(label => {
+ const button = [...document.querySelectorAll('button')].find(item => item.textContent.trim() === label);
+ if (!button || button.disabled) throw new Error('Button unavailable: ' + label);
+ button.scrollIntoView(); const rect = button.getBoundingClientRect(); return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
+ }, [label]);
+ await call('Input.dispatchMouseEvent', { type: 'mousePressed', button: 'left', clickCount: 1, ...rect });
+ await call('Input.dispatchMouseEvent', { type: 'mouseReleased', button: 'left', clickCount: 1, ...rect });
+ }
+ async function enter(selector, value) {
+ await evaluate(selector => { const input = document.querySelector(selector); input.focus(); }, [selector]);
+ await call('Input.dispatchKeyEvent', { type: 'keyDown', key: 'a', code: 'KeyA', modifiers: 2, windowsVirtualKeyCode: 65 });
+ await call('Input.dispatchKeyEvent', { type: 'keyUp', key: 'a', code: 'KeyA', modifiers: 2, windowsVirtualKeyCode: 65 });
+ await call('Input.insertText', { text: value });
+ }
+ await navigate(emptyOrigin); await waitText('This host has no admitted custom nodes');
+ assert.equal(await evaluate(() => [...document.querySelectorAll('button')].some(button => button.textContent.startsWith('Create '))), false);
+ await navigate(errorOrigin); await waitText('Qualification host unavailable');
+ assert.equal(await evaluate(() => document.querySelector('[role="alert"]')?.textContent), 'Qualification host unavailable');
+ await navigate(realOrigin); await waitText('Create Host uppercase draft');
+ // Tab/Enter activation proves keyboard access to creation, followed by real pointer actions.
+ await evaluate(() => document.activeElement?.blur());
+ for (let count = 0; count < 10; count++) {
+ await call('Input.dispatchKeyEvent', { type: 'keyDown', key: 'Tab', code: 'Tab', windowsVirtualKeyCode: 9 });
+ await call('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Tab', code: 'Tab', windowsVirtualKeyCode: 9 });
+ if (await evaluate(() => document.activeElement?.textContent === 'Create Host uppercase draft')) break;
+ }
+ assert.equal(await evaluate(() => document.activeElement?.textContent), 'Create Host uppercase draft');
+ assert.equal(await evaluate(() => getComputedStyle(document.activeElement).outlineStyle !== 'none'), true);
+ await call('Input.dispatchKeyEvent', { type: 'keyDown', key: 'Enter', code: 'Enter', windowsVirtualKeyCode: 13, text: '\r', unmodifiedText: '\r' });
+ await call('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Enter', code: 'Enter', windowsVirtualKeyCode: 13 });
+ await waitText('Graph contract valid');
+ await enter('textarea', 'Saved Mixed case'); await clickButton('Apply input'); await waitText('Input saved in draft');
+ await clickButton('Save workflow'); await waitText('Workflow saved');
+ const savedPath = await evaluate(() => document.querySelector('code')?.textContent);
+ assert.ok(savedPath);
+ const file = (await realHost('load_workflow', { path: savedPath })).value;
+ assert.equal(file.graph.nodes.find(node => node.node_type === 'text-input').data.text, 'Saved Mixed case');
+ const pin = file.graph.nodes.find(node => node.id === 'custom').data.custom_node_identity;
+ await enter('input', savedPath); await clickButton('Reopen saved workflow'); await waitText('Graph contract valid');
+ assert.equal(await evaluate(() => document.querySelector('textarea')?.value), 'Saved Mixed case');
+ const reloaded = (await realHost('load_workflow', { path: savedPath })).value;
+ assert.deepEqual(reloaded.graph.nodes.find(node => node.id === 'custom').data.custom_node_identity, pin);
+ assert.equal((await realHost('get_node_lab_draft', { executionId: sessions[0] })).error.code, 'session_not_found');
+ // Same saved graph opened on a host without its implementation stays visible and blocked.
+ await emptyHost('save_workflow', { name: 'stale', graph: file.graph });
+ await navigate(emptyOrigin); await waitText('This host has no admitted custom nodes');
+ await enter('input', '.pantograph/workflows/stale.json'); await clickButton('Reopen saved workflow'); await waitText('Blocks execution:');
+ assert.ok((await text()).includes('host-uppercase'));
+ assert.ok(!commands.some(command => command.includes('run_execution') || command.includes('register') || command.includes('publish')));
+ console.log(JSON.stringify({ ok: true, claims: ['real empty catalog', 'transport failure distinct from empty', 'keyboard creation and visible focus', 'pointer edit/save/reopen through Rust filesystem', 'exact pin preserved', 'replaced session closed', 'missing implementation visible and blocking'], mode: 'headless Chromium, disposable profile, no sandbox, GPU disabled', nativeTauri: 'not qualified' }, null, 2));
+} finally {
+ socket?.close();
+ if (browser && browser.exitCode === null) { browser.kill('SIGTERM'); await new Promise(resolve => { browser.once('exit', resolve); setTimeout(resolve, 2000).unref(); }); }
+ for (const server of servers) await new Promise(resolve => server.close(resolve));
+ for (const host of hosts) { host.stdin.end(); if (host.exitCode === null) await new Promise(resolve => { host.once('exit', resolve); setTimeout(() => { host.kill('SIGTERM'); resolve(); }, 2000).unref(); }); }
+ await rm(fixture, { recursive: true, force: true });
+}
diff --git a/src-tauri/src/app_setup.rs b/src-tauri/src/app_setup.rs
index 2aa8cee7f..10472587b 100644
--- a/src-tauri/src/app_setup.rs
+++ b/src-tauri/src/app_setup.rs
@@ -461,6 +461,9 @@ pub fn run_app() -> AppStartupResult<()> {
crate::llm::reset_recovery_state,
// Workflow commands
crate::workflow::commands::validate_workflow_connection,
+ crate::workflow::commands::get_custom_node_authoring_catalog,
+ crate::workflow::commands::create_custom_node_draft,
+ crate::workflow::commands::get_node_lab_draft,
crate::workflow::commands::get_node_definitions,
crate::workflow::commands::get_node_definitions_by_category,
crate::workflow::commands::get_node_definition,
diff --git a/src-tauri/src/workflow/commands.rs b/src-tauri/src/workflow/commands.rs
index 6b2b64548..8b5550b93 100644
--- a/src-tauri/src/workflow/commands.rs
+++ b/src-tauri/src/workflow/commands.rs
@@ -49,6 +49,40 @@ pub fn validate_workflow_connection(source_type: PortDataType, target_type: Port
super::workflow_definition_commands::validate_workflow_connection(source_type, target_type)
}
+/// Read-only host admissions; no registration or code upload command.
+#[command]
+pub fn get_custom_node_authoring_catalog(
+ workflow_service: State<'_, SharedWorkflowService>,
+) -> pantograph_workflow_service::custom_nodes::authoring::CustomNodeAuthoringCatalog {
+ workflow_service.custom_node_authoring_catalog()
+}
+
+#[command]
+pub async fn create_custom_node_draft(
+ request: pantograph_workflow_service::custom_nodes::authoring::CustomNodeDraftRequest,
+ workflow_service: State<'_, SharedWorkflowService>,
+) -> Result {
+ workflow_service
+ .create_custom_node_draft(request)
+ .await
+ .map_err(|error| error.to_envelope_json())
+}
+
+#[command]
+pub async fn get_node_lab_draft(
+ execution_id: String,
+ workflow_service: State<'_, SharedWorkflowService>,
+) -> Result {
+ workflow_service
+ .workflow_graph_get_edit_session_graph(
+ pantograph_workflow_service::WorkflowGraphEditSessionGraphRequest {
+ session_id: execution_id,
+ },
+ )
+ .await
+ .map_err(|error| error.to_envelope_json())
+}
+
#[command]
pub fn get_node_definitions() -> Vec {
super::workflow_definition_commands::get_node_definitions()
diff --git a/src/components/workbench/NodeLabPage.svelte b/src/components/workbench/NodeLabPage.svelte
index ffb8f1863..dea945294 100644
--- a/src/components/workbench/NodeLabPage.svelte
+++ b/src/components/workbench/NodeLabPage.svelte
@@ -1,23 +1,90 @@
-
- Node Editor
-
- {nodeLabUnavailableMessage()}
-
-
+
+ NodeLab
+ {nodeLabTrustMessage()}
+
{#each statusRows as row (row.label)}
-
{row.label}
+ {row.label}
{row.value}
{/each}
+ {#if view.error}{view.error}
{/if}
+ {view.busy ? 'Working…' : view.notice}
+ {#if view.pendingCleanup}
+ {view.pendingCleanup} previous NodeLab sessions could not be closed. Close them before creating or reopening a draft.
+ controller.retryCleanup()}>Retry session cleanup
+ {/if}
+ Admitted nodes
+ controller.loadCatalog()}>Refresh catalog
+ {#if view.catalog?.length === 0}
+ This host has no admitted custom nodes. A host maintainer must register a trusted implementation before creating a new draft.
+ {:else if view.catalog}
+
+ {/if}
+
+ {#if view.savedPath}Saved: {view.savedPath}
{/if}
+ {#if view.draft}
+
+
Workflow draft
+
{view.draft.graph.nodes.length} nodes · {view.draft.graph.edges.length} connections. Saving preserves the selected implementation identity. Run saved workflows from Scheduler.
+ {#if view.draft.graph_diagnostics.length}
+
+ {#each view.draft.graph_diagnostics as diagnostic}
+ {diagnostic.blocking_submission ? 'Blocks execution: ' : ''}{diagnostic.message}
+ {/each}
+
+ {:else}
Graph contract valid
{/if}
+ {#each view.draft.graph.nodes.filter(node => node.node_type === 'text-input') as node (node.id)}
+
+ {/each}
+
{ event.preventDefault(); void controller.save(name); }}>
+ Workflow name
+
+
+ Save workflow
+
+
+ {/if}
diff --git a/src/components/workbench/nodeLabController.ts b/src/components/workbench/nodeLabController.ts
new file mode 100644
index 000000000..122609ce6
--- /dev/null
+++ b/src/components/workbench/nodeLabController.ts
@@ -0,0 +1,86 @@
+import { NodeLabService, type CustomNodeAuthoringEntry, type NodeLabDraft } from '../../services/workflow/customNodeAuthoring.ts';
+import type { GraphNode } from '../../services/workflow/types.ts';
+
+export interface NodeLabView {
+ catalog: CustomNodeAuthoringEntry[] | null;
+ draft: NodeLabDraft | null;
+ savedPath: string;
+ busy: boolean;
+ error: string | null;
+ notice: string;
+ pendingCleanup: number;
+}
+/** One page owns one separate edit session and observes all in-flight completion. */
+export class NodeLabController {
+ private disposed = false;
+ private operation: Promise | null = null;
+ private readonly ownedSessions = new Set();
+ cleanupError: unknown = null;
+ readonly view: NodeLabView = { catalog: null, draft: null, savedPath: '', busy: false, error: null, notice: '', pendingCleanup: 0 };
+ private readonly service: NodeLabService;
+ private readonly changed: (view: NodeLabView) => void;
+ constructor(service: NodeLabService, changed: (view: NodeLabView) => void) { this.service = service; this.changed = changed; this.view.pendingCleanup = service.pendingCleanupCount; }
+ private publish(): void { if (!this.disposed) this.changed({ ...this.view }); }
+ private perform(action: () => Promise): Promise {
+ if (this.disposed || this.operation) return Promise.resolve();
+ this.view.busy = true; this.view.error = null; this.view.notice = ''; this.publish();
+ const operation = (async () => {
+ try { await action(); }
+ catch (error) { this.view.error = error instanceof Error ? error.message : 'NodeLab operation failed'; }
+ finally { this.view.busy = false; this.operation = null; this.view.pendingCleanup = this.service.pendingCleanupCount; this.publish(); }
+ })();
+ this.operation = operation;
+ return operation;
+ }
+ retryCleanup(): Promise { return this.perform(() => this.service.retryCleanup()); }
+ loadCatalog(): Promise {
+ return this.perform(async () => { this.view.catalog = await this.service.catalog(); });
+ }
+ private async replace(create: () => Promise): Promise {
+ const next = await create();
+ this.ownedSessions.add(next.session_id);
+ if (this.view.draft) {
+ try {
+ await this.service.close(this.view.draft.session_id);
+ this.ownedSessions.delete(this.view.draft.session_id);
+ } catch (error) {
+ this.service.retainActiveSession(this.view.draft.session_id);
+ try { await this.service.close(next.session_id); this.ownedSessions.delete(next.session_id); }
+ catch (cleanupError) { this.cleanupError = cleanupError; throw new AggregateError([error, cleanupError], 'Draft replacement and cleanup failed; previous draft retained'); }
+ throw error;
+ }
+ }
+ this.view.draft = next;
+ this.view.savedPath = '';
+ }
+ create(entry: CustomNodeAuthoringEntry): Promise {
+ return this.perform(() => this.replace(() => this.service.create(entry.identity)));
+ }
+ reopen(path: string): Promise {
+ return this.perform(async () => { await this.replace(() => this.service.reopen(path)); this.view.savedPath = path; });
+ }
+ update(node: GraphNode, text: string): Promise {
+ return this.perform(async () => {
+ if (!this.view.draft) throw new Error('No NodeLab draft');
+ this.view.draft = await this.service.update(this.view.draft.session_id, node, text);
+ this.view.notice = 'Input saved in draft';
+ });
+ }
+ save(name: string): Promise {
+ return this.perform(async () => {
+ if (!this.view.draft) throw new Error('No NodeLab draft');
+ const result = await this.service.save(this.view.draft.session_id, name);
+ this.view.draft = result.draft; this.view.savedPath = result.path; this.view.notice = 'Workflow saved';
+ });
+ }
+ async dispose(): Promise {
+ this.disposed = true;
+ await this.operation;
+ for (const id of this.ownedSessions) {
+ try {
+ await this.service.close(id); this.ownedSessions.delete(id);
+ if (this.view.draft?.session_id === id) this.view.draft = null;
+ } catch (error) { this.cleanupError = error; }
+ }
+ }
+}
diff --git a/src/components/workbench/nodeLabPresenters.test.ts b/src/components/workbench/nodeLabPresenters.test.ts
index a83fd6967..c279c61d0 100644
--- a/src/components/workbench/nodeLabPresenters.test.ts
+++ b/src/components/workbench/nodeLabPresenters.test.ts
@@ -1,16 +1,13 @@
import test from 'node:test';
import assert from 'node:assert/strict';
+import { buildNodeLabStatusRows, nodeLabTrustMessage } from './nodeLabPresenters.ts';
-import {
- buildNodeLabStatusRows,
- nodeLabUnavailableMessage,
-} from './nodeLabPresenters.ts';
-
-test('node lab presenters expose a disabled state without authoring affordances', () => {
- assert.equal(nodeLabUnavailableMessage(), 'Node authoring is unavailable in this build');
+test('NodeLab distinguishes admitted graph authoring from unsupported code publishing', () => {
+ assert.match(nodeLabTrustMessage(), /trusted in-process/);
+ assert.match(nodeLabTrustMessage(), /cannot install or publish code/);
assert.deepEqual(buildNodeLabStatusRows(), [
- { label: 'Authoring API', value: 'Unavailable' },
+ { label: 'Graph authoring', value: 'Host-admitted nodes' },
{ label: 'Local Agent', value: 'Unavailable' },
- { label: 'Runtime Publishing', value: 'Unavailable' },
+ { label: 'Runtime Publishing', value: 'Unsupported' },
]);
});
diff --git a/src/components/workbench/nodeLabPresenters.ts b/src/components/workbench/nodeLabPresenters.ts
index 530bb2dd5..abea6cb53 100644
--- a/src/components/workbench/nodeLabPresenters.ts
+++ b/src/components/workbench/nodeLabPresenters.ts
@@ -1,16 +1,11 @@
-export interface NodeLabStatusRow {
- label: string;
- value: string;
-}
-
+export interface NodeLabStatusRow { label: string; value: string }
export function buildNodeLabStatusRows(): NodeLabStatusRow[] {
return [
- { label: 'Authoring API', value: 'Unavailable' },
+ { label: 'Graph authoring', value: 'Host-admitted nodes' },
{ label: 'Local Agent', value: 'Unavailable' },
- { label: 'Runtime Publishing', value: 'Unavailable' },
+ { label: 'Runtime Publishing', value: 'Unsupported' },
];
}
-
-export function nodeLabUnavailableMessage(): string {
- return 'Node authoring is unavailable in this build';
+export function nodeLabTrustMessage(): string {
+ return 'These nodes are supplied by this host and run as trusted in-process code. NodeLab creates workflows; it cannot install or publish code.';
}
diff --git a/src/services/workflow/customNodeAuthoring.test.ts b/src/services/workflow/customNodeAuthoring.test.ts
new file mode 100644
index 000000000..88d976738
--- /dev/null
+++ b/src/services/workflow/customNodeAuthoring.test.ts
@@ -0,0 +1,143 @@
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import { NodeLabService, parseCustomNodeCatalog, parseNodeLabDraft } from './customNodeAuthoring.ts';
+import { NodeLabController } from '../../components/workbench/nodeLabController.ts';
+
+const identity = { node_type: 'custom-uppercase', contract_version: '1.0.0', contract_digest: `contract-blake3:${'c'.repeat(64)}`, implementation_digest: `blake3:${'a'.repeat(64)}`, environment_digest: `blake3:${'b'.repeat(64)}`, adapter_version: 1 };
+const entry = { identity, label: 'Uppercase', description: 'Host transform', trust: 'trusted_in_process', inputs: [{ id: 'input', label: 'Input' }], outputs: [{ id: 'output', label: 'Output' }] };
+const catalog = () => ({ contract_version: 1, nodes: [structuredClone(entry)] });
+const snapshot = (id = 'edit-1') => ({ session_id: id, graph_revision: 'revision-1', graph: { nodes: [{ id: 'source', node_type: 'text-input', position: { x: 0, y: 0 }, data: { text: 'draft' } }], edges: [] }, graph_diagnostics: [] });
+
+test('catalog decoder requires complete v1 identity, trust, ports and extra-field policy', () => {
+ assert.equal(parseCustomNodeCatalog(catalog())[0].identity.environment_digest, identity.environment_digest);
+ assert.deepEqual(parseCustomNodeCatalog({ contract_version: 1, nodes: [] }), []);
+ const invalid: unknown[] = [null, [], { ...catalog(), contract_version: 2 }, { ...catalog(), extra: true }, { ...catalog(), nodes: {} }];
+ for (const patch of [
+ { trust: 'sandbox' }, { inputs: [] }, { outputs: [{ id: 'output', label: 1 }] },
+ { identity: { ...identity, adapter_version: 2 } }, { identity: { ...identity, implementation_digest: 'unverified' } },
+ { identity: { ...identity, extra: true } }, { identity: { ...identity, contract_digest: 'bad' } }, { identity: { ...identity, contract_version: 'not-semver' } }, { identity: { ...identity, node_type: 'bad type' } }, { inputs: [{ id: 'x', label: 'X' }, { id: 'x', label: 'Again' }] },
+ ]) invalid.push({ contract_version: 1, nodes: [{ ...entry, ...patch }] });
+ for (const value of invalid) assert.throws(() => parseCustomNodeCatalog(value));
+ assert.throws(() => parseCustomNodeCatalog({ contract_version: 1, nodes: [entry, entry] }));
+});
+
+test('draft decoder refuses malformed graph and diagnostics before exposing state', () => {
+ assert.equal(parseNodeLabDraft(snapshot()).graph.nodes[0].data.text, 'draft');
+ for (const value of [{ ...snapshot(), graph: { nodes: [{}], edges: [] } }, { ...snapshot(), graph_diagnostics: [{ message: 'invalid' }] }, { ...snapshot(), session_id: '' }, { ...snapshot(), graph_diagnostics: null }]) assert.throws(() => parseNodeLabDraft(value));
+});
+
+test('service forwards exact selection and refuses changed-session response', async () => {
+ const calls: [string, Record | undefined][] = [];
+ const service = new NodeLabService(async (command, args) => { calls.push([command, args]); return snapshot(); });
+ await service.create(identity);
+ assert.deepEqual(calls[0], ['create_custom_node_draft', { request: { identity } }]);
+ await assert.rejects(service.snapshot('other-session'), /correlation mismatch/);
+});
+
+test('invalid newly created response closes its session instead of leaking it', async () => {
+ const closed: string[] = [];
+ const service = new NodeLabService(async (command, args) => {
+ if (command === 'remove_execution') { closed.push(String(args?.executionId)); return null; }
+ return { session_id: 'created', graph: 'broken' };
+ });
+ await assert.rejects(service.create(identity), /Invalid NodeLab text/);
+ assert.deepEqual(closed, ['created']);
+});
+
+test('controller distinguishes empty catalog from failure and closes superseded drafts', async () => {
+ let fail = false;
+ let counter = 0;
+ const closed: string[] = [];
+ const service = new NodeLabService(async (command, args) => {
+ if (command === 'get_custom_node_authoring_catalog') {
+ if (fail) throw new Error('host unavailable');
+ return { contract_version: 1, nodes: [] };
+ }
+ if (command === 'remove_execution') { closed.push(String(args?.executionId)); return null; }
+ return snapshot(`edit-${++counter}`);
+ });
+ const controller = new NodeLabController(service, () => {});
+ await controller.loadCatalog(); assert.deepEqual(controller.view.catalog, []); assert.equal(controller.view.error, null);
+ fail = true; await controller.loadCatalog(); assert.equal(controller.view.error, 'host unavailable');
+ const selected = parseCustomNodeCatalog(catalog())[0];
+ await controller.create(selected); await controller.create(selected);
+ assert.deepEqual(closed, ['edit-1']);
+ await controller.dispose(); assert.deepEqual(closed, ['edit-1', 'edit-2']);
+});
+
+test('dispose observes in-flight creation, prevents obsolete publication and releases the late session', async () => {
+ let complete!: (value: unknown) => void;
+ const pending = new Promise(resolve => { complete = resolve; });
+ const closed: string[] = [];
+ let published = 0;
+ const service = new NodeLabService(async (command, args) => {
+ if (command === 'remove_execution') { closed.push(String(args?.executionId)); return null; }
+ return pending;
+ });
+ const controller = new NodeLabController(service, () => { published++; });
+ const create = controller.create(parseCustomNodeCatalog(catalog())[0]);
+ const before = published;
+ const disposed = controller.dispose();
+ complete(snapshot('late'));
+ await Promise.all([create, disposed]);
+ assert.equal(published, before); assert.deepEqual(closed, ['late']); assert.equal(controller.cleanupError, null);
+});
+
+test('close failure compensates the new session and retains the old draft', async () => {
+ let created = 0;
+ const closed: unknown[] = [];
+ const service = new NodeLabService(async (command, args) => {
+ if (command === 'remove_execution') {
+ closed.push(args?.executionId);
+ if (args?.executionId === 'edit-1') throw new Error('close refused');
+ return null;
+ }
+ return snapshot(`edit-${++created}`);
+ });
+ const controller = new NodeLabController(service, () => {});
+ const selected = parseCustomNodeCatalog(catalog())[0];
+ await controller.create(selected); await controller.create(selected);
+ assert.equal(created, 2); assert.equal(controller.view.error, 'close refused');
+ assert.equal(controller.view.draft?.session_id, 'edit-1');
+ assert.deepEqual(closed, ['edit-1', 'edit-2']);
+ await controller.dispose(); assert.match(String(controller.cleanupError), /close refused/);
+});
+
+test('failed stale selection or reopen retains current edited draft and save path', async () => {
+ let refuse = false;
+ const closed: unknown[] = [];
+ const service = new NodeLabService(async (command, args) => {
+ if (command === 'remove_execution') { closed.push(args?.executionId); return null; }
+ if (refuse) throw new Error('selection/path unavailable');
+ return snapshot('current');
+ });
+ const controller = new NodeLabController(service, () => {});
+ const selected = parseCustomNodeCatalog(catalog())[0];
+ await controller.create(selected);
+ controller.view.savedPath = 'existing.json';
+ const before = structuredClone(controller.view.draft);
+ refuse = true;
+ await controller.create(selected);
+ assert.deepEqual(controller.view.draft, before); assert.equal(controller.view.savedPath, 'existing.json');
+ await controller.reopen('missing.json');
+ assert.deepEqual(controller.view.draft, before); assert.equal(controller.view.savedPath, 'existing.json');
+ assert.deepEqual(closed, []);
+ await controller.dispose(); assert.deepEqual(closed, ['current']);
+});
+
+test('app service retains failed malformed-response cleanup across page owners until explicit recovery', async () => {
+ let closeFails = true;
+ const service = new NodeLabService(async command => {
+ if (command === 'remove_execution') { if (closeFails) throw new Error('offline'); return null; }
+ return { session_id: 'known-created', graph_revision: 'revision', graph: null };
+ });
+ await assert.rejects(service.create(identity), /offline/);
+ assert.equal(service.pendingCleanupCount, 1);
+ const nextPage = new NodeLabController(service, () => {});
+ assert.equal(nextPage.view.pendingCleanup, 1);
+ await assert.rejects(service.create(identity), /Close previous/);
+ closeFails = false;
+ await nextPage.retryCleanup();
+ assert.equal(nextPage.view.pendingCleanup, 0); assert.equal(service.pendingCleanupCount, 0);
+ await nextPage.dispose();
+});
diff --git a/src/services/workflow/customNodeAuthoring.ts b/src/services/workflow/customNodeAuthoring.ts
new file mode 100644
index 000000000..995ea61e0
--- /dev/null
+++ b/src/services/workflow/customNodeAuthoring.ts
@@ -0,0 +1,184 @@
+// Wire authority: custom_nodes/authoring.rs (catalog v1) and graph/session_contract.rs.
+import type { GraphNode, WorkflowGraph } from './types.ts';
+import { invokeWorkflowCommand } from './workflowServiceErrors.ts';
+
+export interface CustomNodeIdentity {
+ node_type: string;
+ contract_version: string;
+ contract_digest: string;
+ implementation_digest: string;
+ environment_digest: string;
+ adapter_version: number;
+}
+export interface CustomNodeAuthoringEntry {
+ identity: CustomNodeIdentity;
+ label: string;
+ description: string;
+ trust: 'trusted_in_process';
+ inputs: { id: string; label: string }[];
+ outputs: { id: string; label: string }[];
+}
+export interface NodeLabDraft {
+ session_id: string;
+ graph_revision: string;
+ graph: WorkflowGraph;
+ graph_diagnostics: { message: string; blocking_submission: boolean }[];
+}
+function record(value: unknown): Record {
+ if (!value || typeof value !== 'object' || Array.isArray(value)) throw new Error('Invalid NodeLab object');
+ return value as Record;
+}
+function exact(value: unknown, keys: string[]): Record {
+ const item = record(value);
+ if (Object.keys(item).length !== keys.length || keys.some(key => !(key in item))) throw new Error('Invalid NodeLab fields');
+ return item;
+}
+function text(value: unknown): string {
+ if (typeof value !== 'string') throw new Error('Invalid NodeLab text');
+ return value;
+}
+function identifier(value: unknown): string {
+ const id = text(value);
+ if (!id.trim()) throw new Error('Invalid NodeLab identifier');
+ return id;
+}
+function contractId(value: unknown): string {
+ const id = identifier(value);
+ // NodeTypeId/PortId grammar in pantograph-node-contracts; do not normalize pins.
+ if (id.length > 128 || !/^[A-Za-z0-9_.:-]+$/.test(id)) throw new Error('Invalid custom-node contract identifier');
+ return id;
+}
+export function parseCustomNodeIdentity(value: unknown): CustomNodeIdentity {
+ const item = exact(value, ['node_type', 'contract_version', 'contract_digest', 'implementation_digest', 'environment_digest', 'adapter_version']);
+ if (item.adapter_version !== 1) throw new Error('Unsupported custom-node adapter version');
+ for (const key of ['implementation_digest', 'environment_digest']) {
+ if (!/^blake3:[0-9a-f]{64}$/.test(text(item[key]))) throw new Error('Invalid custom-node attestation');
+ }
+ if (!/^[0-9]+\.[0-9]+\.[0-9]+$/.test(text(item.contract_version)) || !/^contract-blake3:[0-9a-f]{64}$/.test(text(item.contract_digest))) throw new Error('Invalid custom-node contract identity');
+ return {
+ node_type: contractId(item.node_type), contract_version: text(item.contract_version),
+ contract_digest: identifier(item.contract_digest), implementation_digest: text(item.implementation_digest),
+ environment_digest: text(item.environment_digest), adapter_version: 1,
+ };
+}
+export function parseCustomNodeCatalog(value: unknown): CustomNodeAuthoringEntry[] {
+ const catalog = exact(value, ['contract_version', 'nodes']);
+ if (catalog.contract_version !== 1) throw new Error('Unsupported NodeLab catalog version');
+ if (!Array.isArray(catalog.nodes)) throw new Error('Invalid NodeLab catalog');
+ const seen = new Set();
+ return catalog.nodes.map(value => {
+ const item = exact(value, ['identity', 'label', 'description', 'trust', 'inputs', 'outputs']);
+ const identity = parseCustomNodeIdentity(item.identity);
+ if (seen.has(identity.node_type)) throw new Error('Duplicate NodeLab type');
+ seen.add(identity.node_type);
+ if (item.trust !== 'trusted_in_process') throw new Error('Unsupported custom-node trust profile');
+ const ports = (value: unknown) => {
+ if (!Array.isArray(value) || value.length < 1 || value.length > 8) throw new Error('Invalid NodeLab ports');
+ const seen = new Set();
+ return value.map(value => {
+ const port = exact(value, ['id', 'label']);
+ const id = contractId(port.id);
+ if (id.startsWith('_')) throw new Error('Invalid reserved custom-node port');
+ if (seen.has(id)) throw new Error('Duplicate NodeLab port');
+ seen.add(id);
+ return { id, label: text(port.label) };
+ });
+ };
+ return { identity, label: text(item.label), description: text(item.description), trust: 'trusted_in_process', inputs: ports(item.inputs), outputs: ports(item.outputs) };
+ });
+}
+function parseGraph(value: unknown): WorkflowGraph {
+ const graph = record(value);
+ if (!Array.isArray(graph.nodes) || !Array.isArray(graph.edges)) throw new Error('Invalid NodeLab graph');
+ const nodes = graph.nodes.map(value => {
+ const node = record(value);
+ const position = record(node.position);
+ if (typeof position.x !== 'number' || !Number.isFinite(position.x) || typeof position.y !== 'number' || !Number.isFinite(position.y)) throw new Error('Invalid NodeLab position');
+ return { id: identifier(node.id), node_type: identifier(node.node_type), position: { x: position.x, y: position.y }, data: record(node.data) };
+ });
+ const edges = graph.edges.map(value => {
+ const edge = record(value);
+ return { id: identifier(edge.id), source: identifier(edge.source), source_handle: identifier(edge.source_handle), target: identifier(edge.target), target_handle: identifier(edge.target_handle) };
+ });
+ return { nodes, edges };
+}
+export function parseNodeLabDraft(value: unknown): NodeLabDraft {
+ const draft = record(value);
+ const diagnostics = draft.graph_diagnostics === undefined ? [] : draft.graph_diagnostics;
+ if (!Array.isArray(diagnostics)) throw new Error('Invalid NodeLab diagnostics');
+ return {
+ session_id: identifier(draft.session_id), graph_revision: identifier(draft.graph_revision), graph: parseGraph(draft.graph),
+ graph_diagnostics: diagnostics.map(value => {
+ const item = record(value);
+ if (typeof item.blocking_submission !== 'boolean') throw new Error('Invalid NodeLab diagnostic');
+ return { message: text(item.message), blocking_submission: item.blocking_submission };
+ }),
+ };
+}
+
+export class NodeLabService {
+ // App-scoped recovery ownership for transport/close failures, never an execution registry.
+ private readonly pendingCloses = new Set();
+ get pendingCleanupCount(): number { return this.pendingCloses.size; }
+ // A failed replacement keeps the old draft under its still-active controller.
+ retainActiveSession(id: string): void { this.pendingCloses.delete(id); }
+ async retryCleanup(): Promise {
+ const errors: unknown[] = [];
+ for (const id of [...this.pendingCloses]) { try { await this.close(id); } catch (error) { errors.push(error); } }
+ if (errors.length) throw new AggregateError(errors, 'Some NodeLab sessions could not be closed');
+ }
+ private requireCleanupResolved(): void {
+ if (this.pendingCloses.size) throw new Error('Close previous NodeLab sessions before creating or reopening a draft');
+ }
+ private readonly invoke: (command: string, args?: Record) => Promise;
+ constructor(invoke: (command: string, args?: Record) => Promise = invokeWorkflowCommand) { this.invoke = invoke; }
+ async catalog(): Promise {
+ return parseCustomNodeCatalog(await this.invoke('get_custom_node_authoring_catalog'));
+ }
+ private async ownedDraft(response: unknown): Promise {
+ const id = identifier(record(response).session_id);
+ try { return parseNodeLabDraft(response); }
+ catch (error) { await this.close(id); throw error; }
+ }
+ async create(identity: CustomNodeIdentity): Promise {
+ this.requireCleanupResolved();
+ return this.ownedDraft(await this.invoke('create_custom_node_draft', { request: { identity } }));
+ }
+ async reopen(path: string): Promise {
+ this.requireCleanupResolved();
+ const saved = record(await this.invoke('load_workflow', { path }));
+ const graph = parseGraph(saved.graph);
+ const session = record(await this.invoke('create_workflow_execution_session', { graph, workflowId: path }));
+ const id = identifier(session.session_id);
+ try { return await this.snapshot(id); }
+ catch (error) { await this.close(id); throw error; }
+ }
+ async snapshot(id: string): Promise {
+ const draft = parseNodeLabDraft(await this.invoke('get_node_lab_draft', { executionId: id }));
+ if (draft.session_id !== id) throw new Error('NodeLab session correlation mismatch');
+ return draft;
+ }
+ async update(id: string, node: GraphNode, value: string): Promise {
+ // Source values are authored text; custom identities/definitions never use this path.
+ if (node.node_type !== 'text-input') throw new Error('NodeLab only edits text sources');
+ const draft = parseNodeLabDraft(await this.invoke('update_node_data', { executionId: id, nodeId: node.id, data: { text: value } }));
+ if (draft.session_id !== id) throw new Error('NodeLab session correlation mismatch');
+ return draft;
+ }
+ async save(id: string, name: string): Promise<{ draft: NodeLabDraft; path: string }> {
+ const draft = await this.snapshot(id);
+ const path = identifier(await this.invoke('save_workflow', { name, graph: draft.graph }));
+ return { draft, path };
+ }
+ async close(id: string): Promise {
+ try { await this.invoke('remove_execution', { executionId: id }); this.pendingCloses.delete(id); }
+ catch (error) {
+ // Already absent is a terminal close outcome; other failures retain exact ownership.
+ if (error && typeof error === 'object' && 'code' in error && error.code === 'session_not_found') { this.pendingCloses.delete(id); return; }
+ this.pendingCloses.add(id); throw error;
+ }
+ }
+}
+
+// Workbench lifetime owner: failed closes survive NodeLab page navigation.
+export const nodeLabService = new NodeLabService();
From d503ed305448e9e36b8a54f2bc393d263803fe58 Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Thu, 22 Oct 2026 02:35:34 +0000
Subject: [PATCH 02/15] fix(nodelab): key projected graph diagnostics
---
.../evidence/nodelab-authoring/browser.log.gz | Bin 441 -> 441 bytes
.../nodelab-authoring/qualification.json | 4 ++--
src/components/workbench/NodeLabPage.svelte | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz
index ec6e6c01c5b6d92e7d5f711e3f8f19252feaee63..685a06aa6d63b9419d3576a7161c5a2a3d99454b 100644
GIT binary patch
delta 318
zcmV-E0m1&c1Gxi`8GqCi)FUAERv{<{gg7|%B$=-N@Yt)QhzqX(N1m=v!Z@oGslNI9
znfYeyi3-AWt*+Dn+e*$-*uySnNIBYS3dNw5>Ppsu1@=O>`_tdwFbr4VMdXm-nMbR-
zjKN}Vh0LLbk(fdMwJ)%6SOdZjjJYfImTEkFU*YV(G>A00p+$Nok}skmr2
z<1~2|l1$fsc|qx(q#SKEg=jbtUV-0(+s`{qf%)7={ga5jkXd;?b%u
zW3ZT8A#iUIsy;4_aYfImTEkFU*YV(@ApB+FS$Nok}skmr2
z<1~2|{view.draft.graph.nodes.length} nodes · {view.draft.graph.edges.length} connections. Saving preserves the selected implementation identity. Run saved workflows from Scheduler.
{#if view.draft.graph_diagnostics.length}
- {#each view.draft.graph_diagnostics as diagnostic}
+ {#each view.draft.graph_diagnostics as diagnostic, index (index)}
{diagnostic.blocking_submission ? 'Blocks execution: ' : ''}{diagnostic.message}
{/each}
From 802544a0ed5f523d2ce7a54f7859b8ed0187e63f Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Thu, 22 Oct 2026 02:40:26 +0000
Subject: [PATCH 03/15] test(nodelab): qualify browser with application styles
---
.../evidence/nodelab-authoring/browser.log.gz | Bin 441 -> 584 bytes
.../nodelab-authoring/qualification.json | 7 ++++---
.../execution-ledger.md | 2 ++
scripts/check-nodelab-browser.mjs | 8 ++++----
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser.log.gz
index 685a06aa6d63b9419d3576a7161c5a2a3d99454b..07f9f0f9027ca4ed6844bfd1846afd03d511f9e3 100644
GIT binary patch
literal 584
zcmV-O0=NAiiwFP!0000218q~wZWBQeyzf`E%mpNSY-8+zPbdL#LW&R(LWslcPRHBv
zyqKPG>>w`u0v!3ed6E-ABr_#0#Js8t73JsyCw8FM_!J{E6ROoRTtd&
zzSj6o-?R@BYU8lE{qYT^)4A9(#UjJ6{?Mo gkjJb5AGdFVMZdP**~Q`H5Og{^UNMsQI*VYwvZ{8OXyz&1c+vmKhJida#s16dcx9
zXEiw%>Y7|7r(po@72oov~L)nIst>}MB4%5bU4mV{8k1!JV<4X~0UF9<)*Bor3=uu#K83RC;Z0#FL9)LcXLLs%Zncz-
z(p*d^C$K?t3?+=Ry0zpCgz<4dC^;dN
zF%5dTEV06HCiWZ^H>`7rfpz7|?^K-*!3SUwYQuI2ug))OPE9y?7etgDr7clE{zhP`rbe
zXQhS}jBnxT$xb<_rx2%~s8fh35*d-rs+E__8*4>VW|^uhsPn>w2X&XKPE}hAlt=
z)@t*HyB{4uAIJViMya@HH{U7UXN!qVyTH1N5n!!04h~-1m!_IZvNrF0j+&YDQ?`
zC>Q~9^t0(A9`Uq|I$JPOuE>^cc#V@RF`2
z-MVN-(e&c@c3zZx0+coN2h>)gFuap^o~mE8J*3FGdF4a3qzecUSPE_9aRIjt@9dEeVj
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
index 75b65155d..1d75ffd22 100644
--- a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
+++ b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/qualification.json
@@ -5,7 +5,8 @@
"rust": "1.92.0",
"node": "24.12.0",
"chromium": "Chromium 151.0.7922.173 built on Debian GNU/Linux 13 (trixie)",
- "mode": "headless; disposable profile/store; GPU disabled; container verification no-sandbox only"
+ "mode": "headless; disposable profile/store; GPU disabled; container verification no-sandbox only",
+ "application_styles": true
},
"claims": {
"browser_user_workflow": "passed: actual NodeLab -> loopback -> Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; missing implementation blocking; exact pin retained",
@@ -37,7 +38,7 @@
"crates/pantograph-workflow-service/src/workflow/service_config.rs": "257edc58a50b37e8dee265b971e91084b0f77b0ce4031f8d105b604f33cea513",
"crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs": "aa080d798774771aa419db01d83cd26401684ab06333770a74e209c601e5952f",
"scripts/README.md": "03bed3d3d157a4d7e4a9f2a291f4a2ab37efa2e81f87c83e3d5710a38220119a",
- "scripts/check-nodelab-browser.mjs": "30a619d382ddb242c19b50c51ec97fda8a6c20973fe51f94c7c0fcf5658d24d4",
+ "scripts/check-nodelab-browser.mjs": "91505dbfa49defa836a246fcff7317bc6dae795fd257da1ee8747146cebe3357",
"src-tauri/src/app_setup.rs": "b14c996956638c5a708156aaf8f110ce6f1fa3a175f6b03bb9ff0284bd392a50",
"src-tauri/src/workflow/commands.rs": "24834569833ec6509300b9c8c795b9eb8be233f0c6d9c37c5d67f82b63d24b6c",
"src/components/workbench/NodeLabPage.svelte": "ab23063b86e78e3dc919602df48d027f0e736bee678b8e5609eedc41d0da25d2",
@@ -48,7 +49,7 @@
"src/services/workflow/customNodeAuthoring.ts": "f4a11c2fa37816819db79176b2af584199c946a5e3c533482cc595362092dc08"
},
"evidence_sha256": {
- "browser.log.gz": "6a1c002a0a7a2aa962249b01f31b98f5f33e5643f43472cb07b390d8d75c0f74",
+ "browser.log.gz": "6c2a15df9371220e78251fd39f27631010da2e63d41f45843e9c9dba0c3bc97e",
"native-unavailable.log.gz": "f72bc764c185d785964c3ac95e9a0d6f24a1d999aefbd349dc143eed28d261b3"
}
}
diff --git a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
index e6a6f09de..1f3defa2e 100644
--- a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
+++ b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
@@ -836,6 +836,8 @@ an unexported provider and a nonexistent response field; corrected against the
actual owning APIs, preserving the assertions. The first browser Enter simulation
omitted character text and did not activate the button; proper CDP key events
then passed the same workflow assertions, with no pointer fallback for that gate.
+Full lint required keys on stateless diagnostic rows; repaired. Final browser
+evidence loads the actual application stylesheet and checks nonzero focus outline.
Native `cargo check --locked -p pantograph --bin pantograph --no-default-features`
is unavailable at glib-sys because this environment lacks `glib-2.0.pc`; GTK and
diff --git a/scripts/check-nodelab-browser.mjs b/scripts/check-nodelab-browser.mjs
index 76cd26290..76e5496a5 100644
--- a/scripts/check-nodelab-browser.mjs
+++ b/scripts/check-nodelab-browser.mjs
@@ -26,8 +26,8 @@ const sessions = [];
try {
await symlink(path.join(repo, 'node_modules'), path.join(fixture, 'node_modules'));
await writeFile(path.join(fixture, 'index.html'), '
');
- await writeFile(path.join(fixture, 'main.js'), `import { mount } from 'svelte'; import Page from ${JSON.stringify(path.join(repo, 'src/components/workbench/NodeLabPage.svelte'))}; mount(Page, { target: document.getElementById('app') });`);
- await build({ configFile: false, root: fixture, plugins: [svelte()], build: { outDir: 'dist', emptyOutDir: true } });
+ await writeFile(path.join(fixture, 'main.js'), `import ${JSON.stringify(path.join(repo, 'src/styles.css'))}; import { mount } from 'svelte'; import Page from ${JSON.stringify(path.join(repo, 'src/components/workbench/NodeLabPage.svelte'))}; mount(Page, { target: document.getElementById('app') });`);
+ await build({ configFile: false, root: fixture, css: { postcss: repo }, plugins: [svelte()], build: { outDir: 'dist', emptyOutDir: true } });
function rustHost(empty) {
const child = spawn(hostBinary, empty ? ['--empty-catalog'] : [], { stdio: ['pipe', 'pipe', 'inherit'] });
hosts.push(child);
@@ -64,7 +64,7 @@ try {
const relative = url.pathname === '/' ? 'index.html' : url.pathname.slice(1);
const file = path.resolve(fixture, 'dist', relative);
if (!file.startsWith(path.resolve(fixture, 'dist') + path.sep)) { response.writeHead(403).end(); return; }
- response.setHeader('Content-Type', file.endsWith('.js') ? 'application/javascript' : 'text/html');
+ response.setHeader('Content-Type', file.endsWith('.js') ? 'application/javascript' : file.endsWith('.css') ? 'text/css' : 'text/html');
response.end(await readFile(file));
} catch (error) { response.writeHead(500, { 'Content-Type': 'application/json' }).end(JSON.stringify({ code: 'internal_error', message: String(error) })); }
});
@@ -140,7 +140,7 @@ try {
if (await evaluate(() => document.activeElement?.textContent === 'Create Host uppercase draft')) break;
}
assert.equal(await evaluate(() => document.activeElement?.textContent), 'Create Host uppercase draft');
- assert.equal(await evaluate(() => getComputedStyle(document.activeElement).outlineStyle !== 'none'), true);
+ assert.equal(await evaluate(() => getComputedStyle(document.activeElement).outlineStyle !== 'none' && parseFloat(getComputedStyle(document.activeElement).outlineWidth) > 0), true);
await call('Input.dispatchKeyEvent', { type: 'keyDown', key: 'Enter', code: 'Enter', windowsVirtualKeyCode: 13, text: '\r', unmodifiedText: '\r' });
await call('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Enter', code: 'Enter', windowsVirtualKeyCode: 13 });
await waitText('Graph contract valid');
From ff4e4de05d884f05338e70745db2400df0134926 Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Thu, 22 Oct 2026 04:10:18 +0000
Subject: [PATCH 04/15] fix(nodelab): hide stale catalog choices after refresh
failure
---
.../nodelab-authoring/browser-refresh.log.gz | Bin 0 -> 617 bytes
.../catalog-refresh-red.log.gz | Bin 0 -> 1146 bytes
.../nodelab-authoring/qualification.json | 15 ++++++----
.../execution-ledger.md | 18 ++++++++++++
scripts/check-nodelab-browser.mjs | 27 ++++++++++++++++--
src/components/workbench/nodeLabController.ts | 6 +++-
.../workflow/customNodeAuthoring.test.ts | 17 +++++++----
7 files changed, 68 insertions(+), 15 deletions(-)
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-refresh.log.gz
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/catalog-refresh-red.log.gz
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-refresh.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-refresh.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..391ed64af588415c6df5b84da9b76f650b9e8068
GIT binary patch
literal 617
zcmV-v0+#(BiwFP!0000219ekPZxb;Pz3;CWg$qcDleA3=IiXgF3x^7U5JCuf*OTlt
z{=#FY35W}S0gn8-{u0JX0|mt1{5Wr{_HU;fajCZRW&Y7kvt{FRPBUJ6H3wKe;CpH9M)?>b*X72J$dh^9eVfCF4O@4;B(c!C^gh
zR+D2v-Zj<7K!US?F6JF{^2#=>2E)V6KD!uFhNUK35<;Dhd?!E(?m#*guW{D~oeXp$
zShowbH?Se5)}kz4SNK>O1Nn>z&`=(;-rzW4i0C2rDU?+YFAGZxlK0zjMt9`lR!i$B
z=3+uwfeo7DRl;a>hXxp#YxB+q{(bF8PRl%D*<`ku
zZQZ-h7x>_o75>CSQ8_r+GF2G66`a`I)J(*y+>IB0S5%36d%
zf=l0|B|36!hp?F6P;U%LE=EUiR+g=D8k~c}R+od5Y73^Tl2~qybAVif`IAN=s6u0?
zAX4NG<+c#{PS}0OQJPLhi&{{>{6WYDvV9rXu96`+qxhp_fK1~uFraZ<=1k{81wQpH
z_bAJ<{pAfehb6CUtl4twXqu+UWOOl4XPv0EfERQaeP^9c_$G$tu=(&1y&FCm`&cOR
zG|bW3X8Qq6dR6(2v9L^nMFQK|MK=B)wqyt=!)zWwTGBW&ZG^Z;=5pnV%36al#Z4+AxuDjh5Gr5DH?=&K~92WHy+%_PomF4
zxs_#r$f)}rW)fx}(=JG(+i$NmlQBCnC6HmI7j_9sE&`1EC#Nxmpt9t0jr0P(*%_=9
zdlb_wf8*1A(Ot`?J5EN)=bTcy@C1+^!#v
z7R~J+TRO)xQ~7_zqQ3VxG;Zp{*LcL&Ij+ZV!Ix4mOKZ?Bt}(669`HFJT`5&}Occ4N
zkEq?ZkQe?0BwsUa^nPn9_YL(5G-);*#@XUZmWyG@v^ViZKL}+3&*6WcLW@N<9=$vI
zXKt_a$Re>7-b(>Fli*`DQ^R1j#6IS9Txa9)c$!_jY<~#*2cbDU-c_r5UcUx;k)}Y5
z loopback -> Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; missing implementation blocking; exact pin retained",
+ "browser_user_workflow": "passed: actual NodeLab -> loopback -> Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; missing implementation blocking; exact pin retained; latest repaired-source run in browser-refresh.log.gz; original browser.log.gz retained as baseline evidence",
"service_tests": "1068 library +65 integration passed, zero failures/ignored",
"frontend_tests": "740 passed, zero failures/ignored; 10 focused decoding/controller/presenter tests included",
"native_tauri": "unavailable: cargo check --locked -p pantograph --bin pantograph --no-default-features fails at glib-sys: missing glib-2.0.pc; pkg-config also lacks GTK/WebKit; no native startup claim",
@@ -20,7 +20,8 @@
"GPU",
"inference-backed/effectful tool loops",
"release qualification"
- ]
+ ],
+ "catalog_refresh": "failed refresh after successful load removes stale choices while preserving draft and saved path; focused red on baseline 802544a0, green after repair; same mounted real-browser flow passed"
},
"source_sha256": {
"crates/pantograph-workflow-service/examples/nodelab_host.rs": "1c9a33092e0bac9560247b8c1e158bc0405527cad7b0a280d79dc61334eed8c8",
@@ -38,18 +39,20 @@
"crates/pantograph-workflow-service/src/workflow/service_config.rs": "257edc58a50b37e8dee265b971e91084b0f77b0ce4031f8d105b604f33cea513",
"crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs": "aa080d798774771aa419db01d83cd26401684ab06333770a74e209c601e5952f",
"scripts/README.md": "03bed3d3d157a4d7e4a9f2a291f4a2ab37efa2e81f87c83e3d5710a38220119a",
- "scripts/check-nodelab-browser.mjs": "91505dbfa49defa836a246fcff7317bc6dae795fd257da1ee8747146cebe3357",
+ "scripts/check-nodelab-browser.mjs": "82f884c2fb04394168c06ba09b0432345aad059e67bc54efdc281a759b68c88f",
"src-tauri/src/app_setup.rs": "b14c996956638c5a708156aaf8f110ce6f1fa3a175f6b03bb9ff0284bd392a50",
"src-tauri/src/workflow/commands.rs": "24834569833ec6509300b9c8c795b9eb8be233f0c6d9c37c5d67f82b63d24b6c",
"src/components/workbench/NodeLabPage.svelte": "ab23063b86e78e3dc919602df48d027f0e736bee678b8e5609eedc41d0da25d2",
- "src/components/workbench/nodeLabController.ts": "3b3806dcf0aedf191fd7ad91ce3ac746a08c6962b1c0b292f54d9ba6e9145716",
+ "src/components/workbench/nodeLabController.ts": "0389ac2397e253926162195a1b41bddf1e07568f65afd568e1673b4fe44c0d1f",
"src/components/workbench/nodeLabPresenters.test.ts": "5debffcdba6ddc86d4b4093dceb08dbf691b7659b73a483abd8d991616faa02e",
"src/components/workbench/nodeLabPresenters.ts": "4792bedc18bf6b55173a892e0f15bc7900b4c36fd84bfc508da3dac9c0bbb075",
- "src/services/workflow/customNodeAuthoring.test.ts": "73d776ffb40ddcafcfb0e69f7434f98aa19bd037484a36ccdef7d9eff290d250",
+ "src/services/workflow/customNodeAuthoring.test.ts": "97aa21f8487984832d03efac4f81d694b214ed065087099aca4a9b87433083dd",
"src/services/workflow/customNodeAuthoring.ts": "f4a11c2fa37816819db79176b2af584199c946a5e3c533482cc595362092dc08"
},
"evidence_sha256": {
"browser.log.gz": "6c2a15df9371220e78251fd39f27631010da2e63d41f45843e9c9dba0c3bc97e",
- "native-unavailable.log.gz": "f72bc764c185d785964c3ac95e9a0d6f24a1d999aefbd349dc143eed28d261b3"
+ "native-unavailable.log.gz": "f72bc764c185d785964c3ac95e9a0d6f24a1d999aefbd349dc143eed28d261b3",
+ "catalog-refresh-red.log.gz": "c849e1ead56e2b00b0f7fc3c7e04a4cf867a99fe176476aa9b0d9658613bf720",
+ "browser-refresh.log.gz": "2ddc4d6339e12a6c43cff584156c871b94352780d060b6ee4aa49495975884e2"
}
}
diff --git a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
index 1f3defa2e..9cae9a29c 100644
--- a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
+++ b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
@@ -848,3 +848,21 @@ first by parent instruction; CN-02 must then reconcile current main, preserve it
registry/loop validations, rerun combined affected tests and pass exact-head CI
before merge. The local/remote feature branch and worktree are retained pending
that disposition, with source and evidence preserved.
+
+While dependency integration was pending, a reachable catalog-refresh failure
+left earlier Create choices visible. The focused regression failed on `802544a0`
+and passes after clearing/publishing the catalog before transport; authored draft
+and saved path remain unchanged. The same mounted real-browser flow passes
+failed refresh and recovery. Its first probe inspected old-session closure before
+Reopen completed; bounded observation now waits for replacement completion and
+retains the original closure assertion. Original browser/native receipts remain;
+the qualification manifest binds the repaired source and additional receipts.
+No backend, scheduler or audit behavior changed. This repair remains local until
+the required PR94 integration/current-main qualification.
+
+Hosted PR95 source/build/native-IPC checks passed on `802544a0`; the required
+audit failed with an actual advisory-bulk HTTP 503. PR94 likewise remains blocked
+on audit service failures. No audit retries or gate changes were requested here.
+Local native provisioning inspection stopped when `apt-cache policy` was denied
+reading `/etc/apt/apt.conf.d/80-applied-apt-retries`; no package installation or
+privileged retry was attempted. This does not qualify native startup/interaction.
diff --git a/scripts/check-nodelab-browser.mjs b/scripts/check-nodelab-browser.mjs
index 76e5496a5..55ae40d26 100644
--- a/scripts/check-nodelab-browser.mjs
+++ b/scripts/check-nodelab-browser.mjs
@@ -23,6 +23,7 @@ let browser;
let socket;
const commands = [];
const sessions = [];
+let failRealCatalog = false;
try {
await symlink(path.join(repo, 'node_modules'), path.join(fixture, 'node_modules'));
await writeFile(path.join(fixture, 'index.html'), '
');
@@ -56,7 +57,7 @@ try {
const command = decodeURIComponent(url.pathname.split('/').at(-1));
const args = JSON.parse(body);
commands.push(command);
- const result = mode === 'error' ? { ok: false, error: { code: 'runtime_not_ready', message: 'Qualification host unavailable' } } : await (mode === 'empty' ? emptyHost : realHost)(command, args);
+ const result = (mode === 'error' || (mode === 'real' && failRealCatalog && command === 'get_custom_node_authoring_catalog')) ? { ok: false, error: { code: 'runtime_not_ready', message: 'Qualification host unavailable' } } : await (mode === 'empty' ? emptyHost : realHost)(command, args);
if (result.ok && command === 'create_custom_node_draft') sessions.push(result.value.session_id);
response.writeHead(result.ok ? 200 : 400, { 'Content-Type': 'application/json' }).end(JSON.stringify(result.ok ? result.value : result.error));
return;
@@ -151,18 +152,38 @@ try {
const file = (await realHost('load_workflow', { path: savedPath })).value;
assert.equal(file.graph.nodes.find(node => node.node_type === 'text-input').data.text, 'Saved Mixed case');
const pin = file.graph.nodes.find(node => node.id === 'custom').data.custom_node_identity;
- await enter('input', savedPath); await clickButton('Reopen saved workflow'); await waitText('Graph contract valid');
+ await enter('input', savedPath); await clickButton('Reopen saved workflow');
+ const reopenDeadline = Date.now() + 10000;
+ while ((await realHost('get_node_lab_draft', { executionId: sessions[0] })).ok && Date.now() < reopenDeadline) {
+ await new Promise(resolve => setTimeout(resolve, 30));
+ }
+ while (await evaluate(() => document.querySelector('[aria-label="NodeLab authoring"]')?.getAttribute('aria-busy') === 'true')) {
+ assert.ok(Date.now() < reopenDeadline, 'Reopen must finish before inspecting the replacement');
+ await new Promise(resolve => setTimeout(resolve, 30));
+ }
+ await waitText('Graph contract valid');
assert.equal(await evaluate(() => document.querySelector('textarea')?.value), 'Saved Mixed case');
const reloaded = (await realHost('load_workflow', { path: savedPath })).value;
assert.deepEqual(reloaded.graph.nodes.find(node => node.id === 'custom').data.custom_node_identity, pin);
assert.equal((await realHost('get_node_lab_draft', { executionId: sessions[0] })).error.code, 'session_not_found');
+ // A failed refresh cannot advertise stale implementations or discard the authored draft.
+ failRealCatalog = true;
+ await clickButton('Refresh catalog'); await waitText('Qualification host unavailable');
+ assert.equal(await evaluate(() => [...document.querySelectorAll('button')].some(button => button.textContent.startsWith('Create '))), false);
+ assert.equal(await evaluate(() => document.querySelector('textarea')?.value), 'Saved Mixed case');
+ assert.equal(await evaluate(() => document.querySelector('code')?.textContent), savedPath);
+ assert.equal((await text()).includes('This host has no admitted custom nodes'), false);
+ failRealCatalog = false;
+ await clickButton('Refresh catalog'); await waitText('Create Host uppercase draft');
+ assert.equal(await evaluate(() => document.querySelector('textarea')?.value), 'Saved Mixed case');
+ assert.equal(await evaluate(() => document.querySelector('code')?.textContent), savedPath);
// Same saved graph opened on a host without its implementation stays visible and blocked.
await emptyHost('save_workflow', { name: 'stale', graph: file.graph });
await navigate(emptyOrigin); await waitText('This host has no admitted custom nodes');
await enter('input', '.pantograph/workflows/stale.json'); await clickButton('Reopen saved workflow'); await waitText('Blocks execution:');
assert.ok((await text()).includes('host-uppercase'));
assert.ok(!commands.some(command => command.includes('run_execution') || command.includes('register') || command.includes('publish')));
- console.log(JSON.stringify({ ok: true, claims: ['real empty catalog', 'transport failure distinct from empty', 'keyboard creation and visible focus', 'pointer edit/save/reopen through Rust filesystem', 'exact pin preserved', 'replaced session closed', 'missing implementation visible and blocking'], mode: 'headless Chromium, disposable profile, no sandbox, GPU disabled', nativeTauri: 'not qualified' }, null, 2));
+ console.log(JSON.stringify({ ok: true, claims: ['real empty catalog', 'transport failure distinct from empty', 'keyboard creation and visible focus', 'pointer edit/save/reopen through Rust filesystem', 'exact pin preserved', 'replaced session closed', 'missing implementation visible and blocking', 'failed catalog refresh hides stale choices and preserves draft'], mode: 'headless Chromium, disposable profile, no sandbox, GPU disabled', nativeTauri: 'not qualified' }, null, 2));
} finally {
socket?.close();
if (browser && browser.exitCode === null) { browser.kill('SIGTERM'); await new Promise(resolve => { browser.once('exit', resolve); setTimeout(resolve, 2000).unref(); }); }
diff --git a/src/components/workbench/nodeLabController.ts b/src/components/workbench/nodeLabController.ts
index 122609ce6..575872ffb 100644
--- a/src/components/workbench/nodeLabController.ts
+++ b/src/components/workbench/nodeLabController.ts
@@ -34,7 +34,11 @@ export class NodeLabController {
}
retryCleanup(): Promise { return this.perform(() => this.service.retryCleanup()); }
loadCatalog(): Promise {
- return this.perform(async () => { this.view.catalog = await this.service.catalog(); });
+ return this.perform(async () => {
+ this.view.catalog = null;
+ this.publish();
+ this.view.catalog = await this.service.catalog();
+ });
}
private async replace(create: () => Promise): Promise {
const next = await create();
diff --git a/src/services/workflow/customNodeAuthoring.test.ts b/src/services/workflow/customNodeAuthoring.test.ts
index 88d976738..30a1f1ace 100644
--- a/src/services/workflow/customNodeAuthoring.test.ts
+++ b/src/services/workflow/customNodeAuthoring.test.ts
@@ -45,22 +45,29 @@ test('invalid newly created response closes its session instead of leaking it',
});
test('controller distinguishes empty catalog from failure and closes superseded drafts', async () => {
- let fail = false;
+ let mode: 'empty' | 'full' | 'failed' = 'empty';
let counter = 0;
const closed: string[] = [];
const service = new NodeLabService(async (command, args) => {
if (command === 'get_custom_node_authoring_catalog') {
- if (fail) throw new Error('host unavailable');
- return { contract_version: 1, nodes: [] };
+ if (mode === 'failed') throw new Error('host unavailable');
+ return mode === 'empty' ? { contract_version: 1, nodes: [] } : catalog();
}
if (command === 'remove_execution') { closed.push(String(args?.executionId)); return null; }
return snapshot(`edit-${++counter}`);
});
const controller = new NodeLabController(service, () => {});
await controller.loadCatalog(); assert.deepEqual(controller.view.catalog, []); assert.equal(controller.view.error, null);
- fail = true; await controller.loadCatalog(); assert.equal(controller.view.error, 'host unavailable');
+ mode = 'full'; await controller.loadCatalog(); assert.equal(controller.view.catalog?.length, 1);
const selected = parseCustomNodeCatalog(catalog())[0];
- await controller.create(selected); await controller.create(selected);
+ await controller.create(selected);
+ controller.view.savedPath = 'saved-current.json';
+ const before = structuredClone(controller.view.draft);
+ mode = 'failed'; await controller.loadCatalog(); assert.equal(controller.view.error, 'host unavailable');
+ assert.equal(controller.view.catalog, null, 'failed refresh must not advertise stale creation choices');
+ assert.deepEqual(controller.view.draft, before, 'catalog failure must preserve the current draft');
+ assert.equal(controller.view.savedPath, 'saved-current.json');
+ await controller.create(selected);
assert.deepEqual(closed, ['edit-1']);
await controller.dispose(); assert.deepEqual(closed, ['edit-1', 'edit-2']);
});
From b4854d8d62bb58ef2917694ffcd8355733c252d7 Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Thu, 22 Oct 2026 04:28:19 +0000
Subject: [PATCH 05/15] test(nodelab): qualify edit sessions with integrated
loop admission
---
.github/workflows/quality-gates.yml | 6 ++
.../src/workflow/tests/custom_nodes.rs | 90 ++++++++++++++++++
docs/custom-nodes.md | 8 ++
.../nodelab-authoring/browser-combined.log.gz | Bin 0 -> 618 bytes
.../nodelab-authoring/ci-discovery.log.gz | Bin 0 -> 1531 bytes
.../nodelab-authoring/qualification.json | 38 ++++++--
.../nodelab-authoring/service-combined.log.gz | Bin 0 -> 20631 bytes
.../execution-ledger.md | 41 +++++++-
.../plan.md | 14 +++
9 files changed, 186 insertions(+), 11 deletions(-)
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-combined.log.gz
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/ci-discovery.log.gz
create mode 100644 docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/service-combined.log.gz
diff --git a/.github/workflows/quality-gates.yml b/.github/workflows/quality-gates.yml
index 4b002a144..815184f09 100644
--- a/.github/workflows/quality-gates.yml
+++ b/.github/workflows/quality-gates.yml
@@ -434,6 +434,12 @@ jobs:
python3 -c 'import pathlib, sys; names = [line for line in pathlib.Path(sys.argv[1]).read_text().splitlines() if "tool_loop" in line and line.endswith(": test")]; print("Tool-loop tests discovered:", len(names)); sys.exit(0 if len(names) == 15 else 1)' "$RUNNER_TEMP/tool-loop-tests.list"
cargo test --locked -p pantograph-workflow-service --lib tool_loop
+ - name: Run exact-head custom-node authoring and admission regression suite
+ run: |
+ cargo test --locked -p pantograph-workflow-service --lib workflow::tests::custom_nodes:: -- --list > "$RUNNER_TEMP/custom-node-tests.list"
+ python3 -c 'import pathlib, sys; names = [line for line in pathlib.Path(sys.argv[1]).read_text().splitlines() if line.startswith("workflow::tests::custom_nodes::") and line.endswith(": test")]; print("Custom-node tests discovered:", len(names)); sys.exit(0 if len(names) == 10 else 1)' "$RUNNER_TEMP/custom-node-tests.list"
+ cargo test --locked -p pantograph-workflow-service --lib workflow::tests::custom_nodes::
+
- name: Run complete session execution regression suite
run: |
cargo test -p pantograph-workflow-service --lib workflow::tests::session_execution:: -- --list > "$RUNNER_TEMP/session-execution-tests.list"
diff --git a/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs b/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
index 9226d62a0..76584515d 100644
--- a/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
+++ b/crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs
@@ -631,3 +631,93 @@ async fn custom_node_authoring_saved_reopen_preserves_pin_and_scheduler_executio
.unwrap();
assert_eq!(result.outputs[0].value, "MIXED CASE");
}
+
+#[tokio::test]
+async fn custom_node_edit_sessions_preserve_integrated_loop_admission() {
+ use crate::tool_loops::tests::{catalog as loop_catalog, Executor as LoopExecutor, Mode};
+ use crate::tool_loops::TOOL_LOOP_IDENTITY_FIELD;
+
+ let controller = LoopExecutor::new(Mode::RoundTrip);
+ let tool = LoopExecutor::new(Mode::Uppercase);
+ let catalog = loop_catalog(controller.clone(), tool.clone(), 3);
+ let mut graph = custom_graph(catalog.get("loop-controller").unwrap().identity());
+ let node = graph.find_node_mut("custom").unwrap();
+ node.node_type = "tool-loop".into();
+ node.data = serde_json::json!({TOOL_LOOP_IDENTITY_FIELD: catalog.tool_loop_identity("pure-loop").unwrap()});
+ graph.edges[0].target_handle = "prompt".into();
+ graph.edges[1].source_handle = "response".into();
+ let root = tempfile::tempdir().unwrap();
+ let store = FileSystemWorkflowGraphStore::new(root.path());
+ let service = WorkflowService::with_trusted_custom_nodes(catalog.clone());
+ let saved = service
+ .workflow_graph_save(
+ &store,
+ crate::WorkflowGraphSaveRequest {
+ name: "integrated-loop".into(),
+ graph,
+ },
+ )
+ .unwrap();
+ let graph = service
+ .workflow_graph_load(
+ &store,
+ crate::WorkflowGraphLoadRequest {
+ path: saved.path.clone(),
+ },
+ )
+ .unwrap()
+ .graph;
+ let pin = graph.find_node("custom").unwrap().data[TOOL_LOOP_IDENTITY_FIELD].clone();
+ let changed = loop_catalog(controller.clone(), tool.clone(), 4);
+ for (service, blocking) in [
+ (service, false),
+ (WorkflowService::with_trusted_custom_nodes(changed), true),
+ (WorkflowService::new(), true),
+ ] {
+ let edit = service
+ .workflow_graph_create_edit_session(crate::WorkflowGraphEditSessionCreateRequest {
+ graph: graph.clone(),
+ workflow_id: Some(saved.path.clone()),
+ })
+ .await
+ .unwrap();
+ let request = crate::WorkflowGraphEditSessionGraphRequest {
+ session_id: edit.session_id.clone(),
+ };
+ let snapshot = service
+ .workflow_graph_get_edit_session_graph(request.clone())
+ .await
+ .unwrap();
+ assert_eq!(
+ snapshot.graph.find_node("custom").unwrap().data[TOOL_LOOP_IDENTITY_FIELD],
+ pin
+ );
+ assert_eq!(
+ snapshot
+ .graph_diagnostics
+ .iter()
+ .any(|d| d.blocking_submission),
+ blocking,
+ "{:?}",
+ snapshot.graph_diagnostics
+ );
+ let mut invalid = snapshot.graph.find_node("custom").unwrap().clone();
+ invalid.id = "invalid-new-loop".into();
+ invalid.data[TOOL_LOOP_IDENTITY_FIELD]["max_turns"] = serde_json::json!(5);
+ assert!(service
+ .workflow_graph_add_node(crate::WorkflowGraphAddNodeRequest {
+ session_id: edit.session_id,
+ node: invalid,
+ })
+ .await
+ .is_err());
+ let after = service
+ .workflow_graph_get_edit_session_graph(request)
+ .await
+ .unwrap();
+ assert_eq!(after.graph_revision, snapshot.graph_revision);
+ assert_eq!(after.graph, snapshot.graph);
+ }
+ assert!(controller.calls.lock().is_empty());
+ assert!(tool.calls.lock().is_empty());
+}
diff --git a/docs/custom-nodes.md b/docs/custom-nodes.md
index 6eebe7fe5..20ce7362f 100644
--- a/docs/custom-nodes.md
+++ b/docs/custom-nodes.md
@@ -132,5 +132,13 @@ retired. Inference-backed controllers, side-effectful tools, external workers,
Wasm, Python, package discovery, automatic updates, streaming and inference ports
require follow-on admission; none are inferred from a palette entry.
+NodeLab's creation catalog projects individual CN-01 registrations, not loop
+templates or tool grants. Existing host-pinned loop graphs can be reopened using
+the same registry; their pins remain unchanged and unavailable/stale grants are
+blocking. A future loop-authoring surface must select a complete host-admitted
+`ToolLoopIdentity` and produce exactly one prompt binding under the
+[CN-03 contract](tool-loops.md); optional authoring ports and new grants remain
+unsupported. No scheduler or loop authority is owned by NodeLab.
+
See [ADR-018](adr/ADR-018-trusted-custom-node-adapter.md) and the
[admitted implementation slice](plans/domain-architecture-and-multimodal/plan.md#admitted-custom-node-adapter-slice-2026-10-21).
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-combined.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/browser-combined.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..a137fef0cf1f89dac4cd954458a0a0685ec949cc
GIT binary patch
literal 618
zcmV-w0+szAiwFP!0000219el&ZWBQeyzf`E%mpNS94B!eKA}X23x^1S5JCve?zFuf
z&x`39#}3McUw|WDmoK5mjv;{9+thSbch&T+C?l*+)UldCTgV#n3z&xlF$Gh)Ou;Lq
znw+#}ft_5}^F<0bjEOCAoKj@qGNkVNLHupci!DKR(u}rbZ@XH?>)g<%=Qw^f)i(hgzERwP0iY;y_0@E#4
z*i?0r^0n%-v+&P%peCoVyny@fU$@NJ7CIJa$JNZ3c_%Tte1A=&n-@o_V+NQWsgt9>
zxaaEZKio)k^XikkR@Xv>>8Uz7{*!xnpr(hFTfNt(&Ojc{)af}lUnJu}SPo_qM8RP_
zbykyOK|VCq$3TL!fG*|@bn?nJEC$2f%{IFjQii!ETM|N@j(jIT3T{W*7cX(s2AvFa
zB3QQzv^TIKrq-e?URQWu8Uy)^3D8g;vtHpiVTkA<_bHS`53dVL3zGNSa7MT1;aW@U
zDCS~9S%DRr{Z+zfb%zERnQQaT2L65RNKkoVa?zqgpLY}Pr>m2;Hgrp=*;A@z(R+wQ
zc5*H~d+5o?RE`Gl3yk1c^-(!$8FrQh$vwXdf87g#BeDl9ThjMX~w|1
zP9Q&J^*aO~fJLtj>mj_ndRuF1!OqFR%iJq`qf4Ty=|hIkMO&JaR5W+ZPnj3L%Jl;P
E0G*>FyZ`_I
literal 0
HcmV?d00001
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/ci-discovery.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/ci-discovery.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..f81bcbc8b299786b4c6a46ee848ef39efcc048ea
GIT binary patch
literal 1531
zcmVTU%F3A=ljOhHlcizR
zYCbn&iGSvLK6hFdG>oEg)c%81tk_0sLnRl=Nq0?+a7-#o-Ad4mDXnD23d)7ejI10+
za=8S`oCK`IW-GycAq+s7T~lrF0IUon@#rQU05efgmOEi6Hc%D9Nv&vQ#0LB}JS(N6
zOmQrv5X=fonRBA7TE;Dyy#=4~Qd%1jjrbELv(&4#(wB-_#|lBYuL|tPiOAqps=eZZ
zQ|8@D8*IN5Nj>;)%rjv=b+Am>f)!?i^;Sk=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vr}n!9h!-B;e+O~)56zoO=D
zy5HPA@)gYeY3b1~VjfQ4|Au5B=YwxChVHfR{mlR2(w loopback -> Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; missing implementation blocking; exact pin retained; latest repaired-source run in browser-refresh.log.gz; original browser.log.gz retained as baseline evidence",
- "service_tests": "1068 library +65 integration passed, zero failures/ignored",
+ "browser_user_workflow": "passed on combined source: actual styled NodeLab -> loopback -> rebuilt Rust service -> filesystem create/edit/save/reopen; keyboard/pointer and focus; exact pin retained; missing implementation blocking; failed catalog refresh/recovery preserves draft/path. Latest receipt browser-combined.log.gz",
+ "service_tests": "1084 library +65 integration passed, zero failures/ignored; both custom-node and pure-loop suites included",
"frontend_tests": "740 passed, zero failures/ignored; 10 focused decoding/controller/presenter tests included",
"native_tauri": "unavailable: cargo check --locked -p pantograph --bin pantograph --no-default-features fails at glib-sys: missing glib-2.0.pc; pkg-config also lacks GTK/WebKit; no native startup claim",
"not_claimed": [
@@ -21,11 +21,12 @@
"inference-backed/effectful tool loops",
"release qualification"
],
- "catalog_refresh": "failed refresh after successful load removes stale choices while preserving draft and saved path; focused red on baseline 802544a0, green after repair; same mounted real-browser flow passed"
+ "catalog_refresh": "focused red on 802544a0, green after repair; same mounted combined-source browser flow removes stale choices and preserves draft and saved path",
+ "hosted_test_discovery": "local exact CI commands discovered and passed 15 tool_loop tests and 10 workflow::tests::custom_nodes:: tests; original loop gate unchanged"
},
"source_sha256": {
"crates/pantograph-workflow-service/examples/nodelab_host.rs": "1c9a33092e0bac9560247b8c1e158bc0405527cad7b0a280d79dc61334eed8c8",
- "crates/pantograph-workflow-service/src/custom_nodes.rs": "1d413febbad16689c864e7945191c7bb83079530ece13fda73541178bd86f774",
+ "crates/pantograph-workflow-service/src/custom_nodes.rs": "93b016626ce454091fe6092807442184556f90b6f4ae65125af9c12a1e9c52aa",
"crates/pantograph-workflow-service/src/custom_nodes/authoring.rs": "ab2e37ca4a68b846e8f23897891eea064730a1376c8597eb5ce00e1bf5f909ed",
"crates/pantograph-workflow-service/src/graph/connection_insert.rs": "881afe99675e681a2bd1208f69e55f82afa881adec9ead9a6863089dd3a6f2af",
"crates/pantograph-workflow-service/src/graph/connection_intent.rs": "d5832d05d88dd0d2dc10cb367038a0a6d5973e1275fe19e888fb411c13057199",
@@ -37,8 +38,8 @@
"crates/pantograph-workflow-service/src/workflow.rs": "47e42061802abc91ebe6b3babf8c578116d2e0fecf51d86fa53148cbed613886",
"crates/pantograph-workflow-service/src/workflow/custom_node_authoring_api.rs": "5bf54f01b2db4ec2ffc21b6af41291c695ff91a3b274deb80838c32020b9941d",
"crates/pantograph-workflow-service/src/workflow/service_config.rs": "257edc58a50b37e8dee265b971e91084b0f77b0ce4031f8d105b604f33cea513",
- "crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs": "aa080d798774771aa419db01d83cd26401684ab06333770a74e209c601e5952f",
- "scripts/README.md": "03bed3d3d157a4d7e4a9f2a291f4a2ab37efa2e81f87c83e3d5710a38220119a",
+ "crates/pantograph-workflow-service/src/workflow/tests/custom_nodes.rs": "39ea2a0a726a4a93e6199f6cf72d22914db7d43e4edc8d750178acc5084c55ec",
+ "scripts/README.md": "a1b99bbc7b161a5842b49b4a97e08c8042121a2b034848c35c53e22e3dbd881c",
"scripts/check-nodelab-browser.mjs": "82f884c2fb04394168c06ba09b0432345aad059e67bc54efdc281a759b68c88f",
"src-tauri/src/app_setup.rs": "b14c996956638c5a708156aaf8f110ce6f1fa3a175f6b03bb9ff0284bd392a50",
"src-tauri/src/workflow/commands.rs": "24834569833ec6509300b9c8c795b9eb8be233f0c6d9c37c5d67f82b63d24b6c",
@@ -47,12 +48,31 @@
"src/components/workbench/nodeLabPresenters.test.ts": "5debffcdba6ddc86d4b4093dceb08dbf691b7659b73a483abd8d991616faa02e",
"src/components/workbench/nodeLabPresenters.ts": "4792bedc18bf6b55173a892e0f15bc7900b4c36fd84bfc508da3dac9c0bbb075",
"src/services/workflow/customNodeAuthoring.test.ts": "97aa21f8487984832d03efac4f81d694b214ed065087099aca4a9b87433083dd",
- "src/services/workflow/customNodeAuthoring.ts": "f4a11c2fa37816819db79176b2af584199c946a5e3c533482cc595362092dc08"
+ "src/services/workflow/customNodeAuthoring.ts": "f4a11c2fa37816819db79176b2af584199c946a5e3c533482cc595362092dc08",
+ ".github/workflows/quality-gates.yml": "030e50d32426e0abaa17990e683e67a29b9cdb704a2a146908c78817e5369d2f",
+ "crates/pantograph-workflow-service/src/graph/registry.rs": "ad7cfd660e85e264a0c8f9e2ddd78fa3d4fd3074ee2275a13ee33c3f998434c7",
+ "crates/pantograph-workflow-service/src/tool_loops.rs": "3dee015aefb679de08564a02ed4175d902c9836c520c1b0de072cc5a036aaa09",
+ "crates/pantograph-workflow-service/src/scheduler/tool_loop.rs": "3af80db2ce8f4a621e2e1778e1c4dede603068fc12457c8a550d752d9a0bf362"
},
"evidence_sha256": {
"browser.log.gz": "6c2a15df9371220e78251fd39f27631010da2e63d41f45843e9c9dba0c3bc97e",
"native-unavailable.log.gz": "f72bc764c185d785964c3ac95e9a0d6f24a1d999aefbd349dc143eed28d261b3",
"catalog-refresh-red.log.gz": "c849e1ead56e2b00b0f7fc3c7e04a4cf867a99fe176476aa9b0d9658613bf720",
- "browser-refresh.log.gz": "2ddc4d6339e12a6c43cff584156c871b94352780d060b6ee4aa49495975884e2"
+ "browser-refresh.log.gz": "2ddc4d6339e12a6c43cff584156c871b94352780d060b6ee4aa49495975884e2",
+ "browser-combined.log.gz": "a8ef7d653ecfa27ad28d01cf055ee112c4c83b03ee1d3b251e25671b37e7d598",
+ "service-combined.log.gz": "6cd931f20b55b2fc5bfd846b74e7ac0dfbcd4d61e4d175da0228192ec7374029",
+ "ci-discovery.log.gz": "272c0cad07fac982061e125acd110df89918e2147a478a2f30b9051fed19223a"
+ },
+ "integrated_dependency": {
+ "pull_request": 94,
+ "head": "fcb2d7f618f32000ed1992569d7eabf3c77cf873",
+ "merge": "46aad5841ca8f2185e639da44f73474af045bc13",
+ "production_loop_core": "unchanged from merged main; NodeLab consumes the same immutable registry without authoring loop grants"
+ },
+ "historical_evidence": {
+ "browser.log.gz": "802544a0ed5f523d2ce7a54f7859b8ed0187e63f; initial styled flow",
+ "browser-refresh.log.gz": "ff4e4de05d884f05338e70745db2400df0134926; refresh repair",
+ "catalog-refresh-red.log.gz": "regression failed on 802544a0 before repair",
+ "native-unavailable.log.gz": "original missing-GLib failure; retained unchanged"
}
}
diff --git a/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/service-combined.log.gz b/docs/plans/domain-architecture-and-multimodal/evidence/nodelab-authoring/service-combined.log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..ca5b09ba36c795fed8ef60905417d7326d6131d4
GIT binary patch
literal 20631
zcmV(sK<&RDiwFP!000021I>L|k1NS?-uwKD1`Jqt0L^md%r0Ai0YQKP8xUl@2{Nb1
zN|JTESVh&+efnBI-Wh8~t*n(-7tm;iO=jd085!#r?@^H@+2!|_bK=steEH)ZonE7h
z`{Qq4{-~nj;wt}dQ5L`a5xckKzkfLuQRT|-lI-jX
zmz~^qWpVnhbg4U4ELowxU+b(cUF`q#^-G?;96$U7&QYCKUw!p1eDjB%x&M8d
z9KU|KxXi(Hc-7{Kdup#@qI%
z@@qJ|Pv3t3xx^p8{BxbbNH2AkRPcL$rk=$-LC;PvfBNn{FJ4Q3lK
zPSNS=zM~Ppi`}ul_Q}F-ockJWfvbUtjvzyB*`QG8xeY|}8?YA%a>nbXGEIRPbRZ$#O(cwL*u6gZ$
zTxWjUo&V~+uBOwx!QD92rN0{G0X}*y51Ie0Ja{>ADDu>mTPz^+Uksnawv>lFJJi{0
zmcM62aSJ+ke>V>-1eBV;QgA|U3j&3!@DH-x*CeYpnYkVC@D`=@x()Gz-lEjs!ty{{
z?EfPw*Ny4L2b@~^VfeAZc891uT%#hE-@;W`K+u2SveG{;o(W@5_x0_7m;Z3i3oqWX
zj20Z;La+kKGxIHM>^u?
zX(xKf3GT~1O-@P0E1Wy_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
zjH9EHNL5`B(>%t1+Mq4T+62Z?W5q`--Zo*$X*0RQw@c|nYq4^=9P#639Pvo(K^Jnj
zh7WLnZ$AGLpPWDU@1yvaPtoU}&FO#o+|;GJj}@k`LuH1VRC`Al_+v658acGK;4zum%J@j+75x
zCQyE6ZxF9F9M`P^`)A47G2@86LxKsMger9*bzp2j|HOcLL-`?{jn<_f>)0Rl_{ke+M#}aG6obGKw4DpYlsx;qj*VuJny-MptID~*fv5|W
z*JRpxQ1Tj#Q$zDBToxBzHD)W*D?{GVNUf34D_{Z^qILVF&
z2vdX|#7iKQ#)s)*{!-G7St+V^+|VT9+XW7<9%!B(-R|>dBJPJNB91kk)sl|K`Q|tG
z`4<=ca{leNpQG=8`*bz}?RjSQ$zum$g)V-xW>2&Bss1st#7gsP#Q8gx;2O(R&pkjK
zW07xZ%4htx
z0m(k`cMTh61}y{JJ>yrL-l2`!^{2tTG@xws0l&5f8K?g!OJ>$$2ElzN{=OOTSa#tAV
zF%4PNIDuLS!g(A%wjZ`WwtvV^-{6#A!a*F`EEl%*d*0UW%)Z~$6#4%(HWOB70RjN1
CXg`_&
literal 0
HcmV?d00001
diff --git a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
index c01ec945f..074037ad1 100644
--- a/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
+++ b/docs/plans/domain-architecture-and-multimodal/execution-ledger.md
@@ -920,8 +920,45 @@ No backend, scheduler or audit behavior changed. This repair remains local until
the required PR94 integration/current-main qualification.
Hosted PR95 source/build/native-IPC checks passed on `802544a0`; the required
-audit failed with an actual advisory-bulk HTTP 503. PR94 likewise remains blocked
-on audit service failures. No audit retries or gate changes were requested here.
+audit failed with an actual advisory-bulk HTTP 503. PR94 was likewise blocked
+on audit service failures at that stage. No audit retries or gate changes were requested here.
Local native provisioning inspection stopped when `apt-cache policy` was denied
reading `/etc/apt/apt.conf.d/80-applied-apt-retries`; no package installation or
privileged retry was attempted. This does not qualify native startup/interaction.
+
+
+## 2026-10-22 — Serial CN-02/CN-03 reconciliation
+
+PR94 passed its required exact-head checks and merged as `46aad584`. A normal
+merge (`0acae31f`) incorporates that current main into the retained NodeLab branch;
+only plan/issue conflicts required resolution, preserving both admitted slices.
+CN-03 production registry/loop/scheduler code remains unchanged. The NodeLab
+[handoff](../../custom-nodes.md#nodelab-graph-authoring) distinguishes individual
+CN-01 authoring from future host-pinned loop-template authoring: no UI tool grants,
+optional loop ports or second execution route are introduced.
+
+The combined edit-session regression saves/reopens an exact loop pin, accepts its
+admitted catalog, preserves it with blocking diagnostics under changed/missing
+catalogs, and refuses invalid new pins without snapshot/revision mutation or
+callback invocation. Hosted coverage now explicitly discovers/runs all ten
+custom-node workflow tests. The new regression is named outside the existing
+`tool_loop` substring filter; that original fifteen-test discovery/execution gate
+is unchanged. Local exact commands discover and pass both 15 and 10 tests.
+
+The [combined qualification](evidence/nodelab-authoring/qualification.json) binds
+28 source files and retains seven receipts, including fresh 1,084 library +65
+integration tests (1,149 total, zero failed/ignored), both CI discovery/run filters
+and styled Chromium → rebuilt Rust host → filesystem interaction. All eight
+browser claims pass, including failed catalog refresh/recovery without losing
+saved draft/path. The final frontend suite passes 740 tests; formatting,
+typecheck, full/critical/a11y lint, production frontend build, scheduler-only guard
+and 28 traceability tests pass. Original browser, refresh-red and missing-GLib
+receipts remain preserved. Final package all-target Clippy passes with only the
+existing inference dead-field warning. Local native startup/interaction remains unqualified;
+the recorded APT read denial was not retried or bypassed.
+
+At this qualification stage, PR94 post-merge workflows and PR95 final independent
+review/fresh exact-head CI/current-main rechecks still gate normal integration.
+No old-head audit retry, dependency suppression, lockfile change, text-readiness
+edit or branch deletion was performed. PR92's unique trained-text source/evidence
+and missing T3 gate remain separate.
diff --git a/docs/plans/domain-architecture-and-multimodal/plan.md b/docs/plans/domain-architecture-and-multimodal/plan.md
index 782bb67f8..96591c6cd 100644
--- a/docs/plans/domain-architecture-and-multimodal/plan.md
+++ b/docs/plans/domain-architecture-and-multimodal/plan.md
@@ -360,6 +360,20 @@ transfers exact session IDs to an app-scoped, user-retryable cleanup owner. Stan
continues, adding routed Frontend, TypeScript/Async, Accessibility, IPC,
Persistence, protocol/evolution and GUI verification detail to the CN-01 routes.
+**Serial reconciliation (2026-10-22):** CN-03 PR94 is integrated as `46aad584`.
+Continue CN-02 on that current-main base with the same production contract.
+Preserve both admitted slices and CN-03 source unchanged. Add one edit-session
+integration regression for a saved/reopened exact loop pin: its admitted catalog
+accepts it, changed/missing catalogs retain it with blocking diagnostics, and an
+invalid new pin is rejected without mutation. This tests the shared-registry
+handoff rather than adding loop authoring or execution. Rerun both service suites,
+frontend/static gates and the real-host browser flow; bind fresh combined-source
+evidence, obtain independent review, then pass fresh exact-head CI and current-main
+rechecks. PR94 post-merge CI must also pass before PR95 merges normally.
+Add explicit hosted discovery/execution of all ten custom-node service tests;
+keep CN-03's existing fifteen-test loop gate unchanged and name the new
+edit-session regression outside that substring filter.
+
## Admitted CN-03 pure tool-loop slice (2026-10-22)
**Authority and status:** The user authorized unfinished Pantograph paths and
From 4352fce1beb98e9519f8665aa452352fc33ca895 Mon Sep 17 00:00:00 2001
From: MrScripty
Date: Tue, 3 Nov 2026 06:29:48 -0700
Subject: [PATCH 06/15] docs(design): add workbench redesign mockups and
implementation spec
Interactive mockups of the calm workbench redesign (rounds 1 to 3, one
artboard per tab plus a new Sessions tab), the shared run-context picker
snippets, a local viewer that renders the artboards without the cloud
canvas, and the implementation contract (tokens, glyph vocabulary, shell,
picker and clipboard behaviour, shared parts, page mappings, accessibility
contract, evidence).
Co-Authored-By: Claude Fable 5.1
---
docs/design/mockups/README.md | 19 +
docs/design/mockups/boards/Current.dc.html | 28 ++
docs/design/mockups/boards/Dark.dc.html | 335 +++++++++++++
.../design/mockups/boards/Diagnostics.dc.html | 408 +++++++++++++++
docs/design/mockups/boards/Graph.dc.html | 437 ++++++++++++++++
docs/design/mockups/boards/Instrument.dc.html | 292 +++++++++++
.../design/mockups/boards/IoInspector.dc.html | 408 +++++++++++++++
docs/design/mockups/boards/Library.dc.html | 387 ++++++++++++++
docs/design/mockups/boards/Main.dc.html | 273 ++++++++++
docs/design/mockups/boards/Network.dc.html | 373 ++++++++++++++
docs/design/mockups/boards/NodeEditor.dc.html | 358 +++++++++++++
docs/design/mockups/boards/Revised.dc.html | 474 ++++++++++++++++++
docs/design/mockups/boards/Sessions.dc.html | 370 ++++++++++++++
docs/design/mockups/boards/Studio.dc.html | 305 +++++++++++
docs/design/mockups/boards/shell.css | 186 +++++++
docs/design/mockups/ctx-markup.html | 38 ++
docs/design/mockups/ctx-mixin.js | 121 +++++
docs/design/mockups/inject.py | 20 +
docs/design/mockups/viewer/.gitignore | 1 +
docs/design/mockups/viewer/build.sh | 32 ++
docs/design/mockups/viewer/cdp.js | 30 ++
.../mockups/viewer/current-scheduler.png | Bin 0 -> 78281 bytes
docs/design/mockups/viewer/support.js | 169 +++++++
docs/design/workbench-redesign-spec.md | 359 +++++++++++++
24 files changed, 5423 insertions(+)
create mode 100644 docs/design/mockups/README.md
create mode 100644 docs/design/mockups/boards/Current.dc.html
create mode 100644 docs/design/mockups/boards/Dark.dc.html
create mode 100644 docs/design/mockups/boards/Diagnostics.dc.html
create mode 100644 docs/design/mockups/boards/Graph.dc.html
create mode 100644 docs/design/mockups/boards/Instrument.dc.html
create mode 100644 docs/design/mockups/boards/IoInspector.dc.html
create mode 100644 docs/design/mockups/boards/Library.dc.html
create mode 100644 docs/design/mockups/boards/Main.dc.html
create mode 100644 docs/design/mockups/boards/Network.dc.html
create mode 100644 docs/design/mockups/boards/NodeEditor.dc.html
create mode 100644 docs/design/mockups/boards/Revised.dc.html
create mode 100644 docs/design/mockups/boards/Sessions.dc.html
create mode 100644 docs/design/mockups/boards/Studio.dc.html
create mode 100644 docs/design/mockups/boards/shell.css
create mode 100644 docs/design/mockups/ctx-markup.html
create mode 100644 docs/design/mockups/ctx-mixin.js
create mode 100644 docs/design/mockups/inject.py
create mode 100644 docs/design/mockups/viewer/.gitignore
create mode 100755 docs/design/mockups/viewer/build.sh
create mode 100644 docs/design/mockups/viewer/cdp.js
create mode 100644 docs/design/mockups/viewer/current-scheduler.png
create mode 100644 docs/design/mockups/viewer/support.js
create mode 100644 docs/design/workbench-redesign-spec.md
diff --git a/docs/design/mockups/README.md b/docs/design/mockups/README.md
new file mode 100644
index 000000000..dad133178
--- /dev/null
+++ b/docs/design/mockups/README.md
@@ -0,0 +1,19 @@
+# Workbench mockups
+
+Interactive mockups of the redesigned workbench, authored for the Claude
+Design canvas and viewable locally.
+
+- `boards/*.dc.html`: one artboard per tab (`Revised` is the Scheduler) plus
+ the earlier rounds (`Main`, `Studio`, `Instrument`, `Dark`) and the
+ `Current` baseline screenshot. `boards/shell.css` holds the shared tokens
+ and primitives for the round-3 boards.
+- `ctx-markup.html`, `ctx-mixin.js`, `inject.py`: the shared run-context
+ picker, expanded into every board by `python3 inject.py` (idempotent).
+- `viewer/`: `support.js` is a local stand-in for the canvas runtime;
+ `build.sh --serve` builds the boards into `viewer/site/` and serves them on
+ http://127.0.0.1:8765/; `cdp.js` drives headless Chromium for scripted
+ walkthroughs and screenshots.
+
+The implementation contract derived from these boards is
+`../workbench-redesign-spec.md`; the plan is
+`../../plans/workbench-redesign/plan.md`.
diff --git a/docs/design/mockups/boards/Current.dc.html b/docs/design/mockups/boards/Current.dc.html
new file mode 100644
index 000000000..246f07bb1
--- /dev/null
+++ b/docs/design/mockups/boards/Current.dc.html
@@ -0,0 +1,28 @@
+
+
+
+
+Current Scheduler build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Dark.dc.html b/docs/design/mockups/boards/Dark.dc.html
new file mode 100644
index 000000000..45b6e7d69
--- /dev/null
+++ b/docs/design/mockups/boards/Dark.dc.html
@@ -0,0 +1,335 @@
+
+
+
+
+Scheduler, dark drafting paper with inbox
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Engine unreachable since 20:03. Showing the last projection; runs keep executing on the engine.
+ Retry now
+
+
+
+
+
+
+
+
+
+
+
+
+ Search runs
+
+ {{moreLabel}}
+
+
+
+ {{f.label}} {{f.count}}
+
+
+
+
+ SortUpdated Queued Priority Duration
+ PolicyAll fair-share fifo
+ RetentionAll 7 days 30 days
+ ClientAll gui cli
+ SessionAll
+ BucketAll default
+ RuntimeAll llama.cpp diffusers whisper
+ BackendAll cuda cpu
+ DeviceAll cuda:0 cuda:1 cpu
+ Network nodeAll local
+ AcceptedAny time Today This week
+
+
+
+
+
+
+
+
+ {{run.wf}}
+ {{run.statusLabel}} {{run.reasonSuffix}}
+ {{run.placement}}
+
+ {{run.updated}}
+
+
+
+
+
+
Selected: {{sel.wf}}
+
+ Cancel run
+ Move to front
+ Priority
+
+
+
+
+
+
+
+
+
+
{{sel.wf}} v{{sel.ver}}
+
{{sel.id}}
+
+ {{sel.statusLabel}}
+ {{sel.runtime}} on {{sel.device}}
+ priority {{sel.prio}}
+ queue {{sel.queue}}
+
+
+
+
+ Cancel run
+ Move to front
+ Priority
+
+
+
+
+
+
Estimate
+
{{sel.est}}
+
Based on 14 earlier runs of this version
+
+
+
Retention
+
Keep artifacts 7 days, 212 MB on disk
+
Expires 2026-11-09
+
+
+
Placement
+
{{sel.reasonOrPlaced}}
+
Policy fair-share, bucket default
+
+
+
+
Timeline
+
+
+ {{e.t}} {{e.text}}
+
+
+
+
+
+
+ Select a run to see its timeline, estimate and retention.
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Diagnostics.dc.html b/docs/design/mockups/boards/Diagnostics.dc.html
new file mode 100644
index 000000000..cf733cf74
--- /dev/null
+++ b/docs/design/mockups/boards/Diagnostics.dc.html
@@ -0,0 +1,408 @@
+
+
+
+
+Diagnostics tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+
+
Which run do you want to look into?
+
Diagnostics shows the events, errors and placement of one run. Pick one here, select it in the Scheduler, or paste a run id.
+
Pick a run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{l.label}} {{l.n}}
+
+
+
+
+ {{s.label}}
+
+
+
Search events
+
+
Follow
+
+
+
+
+
+
+
{{err.title}} {{err.code}}
+
{{err.text}}
+
{{err.hint}}
+
+
Show in log
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Graph.dc.html b/docs/design/mockups/boards/Graph.dc.html
new file mode 100644
index 000000000..5aa2a701c
--- /dev/null
+++ b/docs/design/mockups/boards/Graph.dc.html
@@ -0,0 +1,437 @@
+
+
+
+
+Graph tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+ Edit workflow
+ {{runModeLabel}}
+
+
+
{{wfName}} v{{version}} ▾
+
+
+
Saved workflows
+
+ {{w.name}}v{{w.ver}} · {{w.when}}
+
+
+
+
+
+
{{saveLine}}
+
read-only, as it ran
+
{{dimLine}}
+
Nodes
+
Properties
+
+
+ Save
+ Version +patch
+ {{submitLabel}}
+
+
+ Edit current v{{editVersion}}
+ {{forkLabel}}
+
+
+
+
+ Submit will save v{{version}} first. {{dirtyNote}}
+
+
+ The selected run is of {{sel.wf}}, not {{wfName}}. Show {{sel.wf}} as run or keep editing {{wfName}}.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{n.label}}{{n.type}}
+
{{p}}
+
{{p}}
+
{{n.note}}
+
+
+
+ − Fit Snap
+
+ running now done in this run failed not reached
+
+
+
+
+
+
+
+
+
+
+
+ Select a node to see its settings.
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Instrument.dc.html b/docs/design/mockups/boards/Instrument.dc.html
new file mode 100644
index 000000000..49488e3e2
--- /dev/null
+++ b/docs/design/mockups/boards/Instrument.dc.html
@@ -0,0 +1,292 @@
+
+
+
+
+Scheduler, night instrument direction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Scheduler
+ Diagnostics
+ Graph
+ I/O
+ Library
+ Network
+ Nodes
+ Settings
+
+ Assistant
+
+
+
+
+
+
+
+ Engine unreachable since 20:03. Showing the last projection; runs keep executing on the engine.
+ Retry now
+
+
+
+
+
+
+
+
cuda:0 RTX 4090
+
18.2 of 24 GB
+
+
ingest-docs-rag, 61%
+
transcribe-meeting waits for 8 GB
+
+
+
cuda:1 RTX 3090
+
9.8 of 24 GB
+
+
image-gen-sdxl, 18 of 30 steps
+
+
+
cpu 32 threads
+
RAM 41 of 128 GB
+
+
+
+
Artifacts nvme0
+
212 GB of 2 TB, 7 day retention
+
+
+ Queue: 3 runs, about 17 min of work
+
+
+
+
+
Search runs
+
+
+
+ {{f.label}} {{f.count}}
+
+
+
{{moreLabel}}
+
+
+
+
+ SortUpdated Queued Priority Duration
+ PolicyAll fair-share fifo
+ RetentionAll 7 days 30 days
+ ClientAll gui cli
+ SessionAll
+ BucketAll default
+ RuntimeAll llama.cpp diffusers whisper
+ BackendAll cuda cpu
+ DeviceAll cuda:0 cuda:1 cpu
+ Network nodeAll local
+ AcceptedAny time Today This week
+
+
+
+
+
Run Status Placement Started Duration
+
+
+
+ {{run.wf}} {{run.id}} · v{{run.ver}}
+ {{run.statusLabel}} {{run.reason}}
+ {{run.runtime}}{{run.device}}
+ {{run.started}}
+ {{run.dur}}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/IoInspector.dc.html b/docs/design/mockups/boards/IoInspector.dc.html
new file mode 100644
index 000000000..c6dea27ff
--- /dev/null
+++ b/docs/design/mockups/boards/IoInspector.dc.html
@@ -0,0 +1,408 @@
+
+
+
+
+I/O Inspector tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+
+
Whose inputs and outputs?
+
The inspector shows what passed through each port of one run. Pick a run here, select it in the Scheduler, or paste a run id.
+
Pick a run
+
+
+
+
+
+
+
+
+
+
+
+
+ Search ports
+
+
+
+
+ {{d.label}} {{d.n}}
+
+
+
+
+
+
+
+ {{nd.id}} {{nd.type}} {{nd.sub}}
+ {{nd.chev}}
+
+
+
+
+ {{a.dirMark}}{{a.port}} {{a.size}}
+ {{a.kind}}, {{a.retention}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{noArtText}}
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Library.dc.html b/docs/design/mockups/boards/Library.dc.html
new file mode 100644
index 000000000..55b289ee0
--- /dev/null
+++ b/docs/design/mockups/boards/Library.dc.html
@@ -0,0 +1,387 @@
+
+
+
+
+Library tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+
+
+
+
+ Search models
+
+ {{hfLabel}}
+
+
+
+
+ {{k.label}} {{k.n}}
+
+
+
+
+ Searching Hugging Face. Results download into the Pumas library on this machine.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Main.dc.html b/docs/design/mockups/boards/Main.dc.html
new file mode 100644
index 000000000..db43b535c
--- /dev/null
+++ b/docs/design/mockups/boards/Main.dc.html
@@ -0,0 +1,273 @@
+
+
+
+
+Scheduler, drafting paper direction
+
+
+
+
+
+
+
+
+
+
+
+
+
Pantograph
+
Local engine connected
+
+ Scheduler
+ Diagnostics
+ Graph
+ I/O Inspector
+ Library
+ Network
+ Node Editor
+ Settings
+
+ Assistant
+
+
+
+
+ Scheduler
+ Updated 20:05:51, live
+
+
+ {{summary}}
+
+
+
+ Engine unreachable since 20:03. Showing the last projection; runs keep executing on the engine.
+ Retry now
+
+
+
+
+
Search runs
+
+
+
+ {{f.label}} {{f.count}}
+
+
+
Sort
+
Updated Queued Priority Duration
+
{{moreLabel}}
+
+
+
+
+ PolicyAll fair-share fifo
+ RetentionAll 7 days 30 days
+ ClientAll gui cli
+ SessionAll
+ BucketAll default
+ RuntimeAll llama.cpp diffusers whisper
+ BackendAll cuda cpu
+ DeviceAll cuda:0 cuda:1 cpu
+ Network nodeAll local
+ AcceptedAny time Today This week
+
+
+
+
+
+
+ Run Status Placement Queue Started Duration Updated
+
+
+
+ {{run.wf}} {{run.id}} · v{{run.ver}}
+ {{run.statusLabel}} {{run.reason}}
+ {{run.runtime}}{{run.device}}
+ {{run.queue}}
+ {{run.started}}
+ {{run.dur}}
+ {{run.updated}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Network.dc.html b/docs/design/mockups/boards/Network.dc.html
new file mode 100644
index 000000000..a1f6adc04
--- /dev/null
+++ b/docs/design/mockups/boards/Network.dc.html
@@ -0,0 +1,373 @@
+
+
+
+
+Network tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+
+
+
+
+ All nodes {{hostCount}}
+ Shared with me
+ Mine
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/NodeEditor.dc.html b/docs/design/mockups/boards/NodeEditor.dc.html
new file mode 100644
index 000000000..c403328d0
--- /dev/null
+++ b/docs/design/mockups/boards/NodeEditor.dc.html
@@ -0,0 +1,358 @@
+
+
+
+
+Node Editor tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+ Node authoring is not available in this build. You can read your node definitions, but Save and Publish are off until the authoring API and the local agent are enabled in
Settings .
+
+
+
+
+
+
+
+ Search node definitions
+
+ New node
+
+
+
+
+
+
+
+
+
+ On the canvas live preview
+
+
+
{{sel.label}}{{sel.type}}
+
{{p.name}}
+
{{p.name}}
+
+
+
+
Checks
+
+ {{c.text}}
+
+
+
+
Try it
+
Runs the node once with sample inputs on the local engine, outside any workflow.
+
{{tryLabel}} {{tryNote}}
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Revised.dc.html b/docs/design/mockups/boards/Revised.dc.html
new file mode 100644
index 000000000..a45ddcdf1
--- /dev/null
+++ b/docs/design/mockups/boards/Revised.dc.html
@@ -0,0 +1,474 @@
+
+
+
+
+Scheduler, dark drafting paper revised
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ local
+
+
+
+
{{lane.name}}{{lane.meta}}
+
+
+
+
+ running waiting for memory next
+
+
+
+
+
+
+
+
+
+
+ {{s.title}} {{s.count}} {{s.chev}}
+
+
+
+
+
+ {{run.wf}} v{{run.ver}}
+ {{run.statusLabel}} {{run.contextSuffix}}
+ {{run.placement}}
+
+ {{run.updated}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Select a run to see its progress, placement and timeline.
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Sessions.dc.html b/docs/design/mockups/boards/Sessions.dc.html
new file mode 100644
index 000000000..219425bde
--- /dev/null
+++ b/docs/design/mockups/boards/Sessions.dc.html
@@ -0,0 +1,370 @@
+
+
+
+
+Sessions tab
+
+
+
+
+
+
+
+
+
+
+
+ Pantograph
+
+ Sessions
+
+ Scheduler
+ Diagnostics
+ I/O Inspector
+ Network
+
+ Graph
+ Node Editor
+ Library
+
+
+
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
+
+ Local engine
+ Settings
+ Assistant
+
+
+
+
+
+
+
+
+
+
+ Search sessions
+
+ New session
+
+
+
+ {{f.label}} {{f.n}}
+
+
+
+
+
+
+
+
+
+
+
+
+ Select a session to see what it has open and what it ran.
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/Studio.dc.html b/docs/design/mockups/boards/Studio.dc.html
new file mode 100644
index 000000000..306b6b690
--- /dev/null
+++ b/docs/design/mockups/boards/Studio.dc.html
@@ -0,0 +1,305 @@
+
+
+
+
+Scheduler, grey studio direction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Scheduler
+
{{summary}}. Updated 20:05:51, live
+
+
+
+
+ Engine unreachable since 20:03. Showing the last projection; runs keep executing on the engine.
+ Retry now
+
+
+
+
+
+
+
+
{{lane.name}}
{{lane.meta}}
+
+
+
+
+
+
+
+
Search runs
+
+
+
+ {{f.label}} {{f.count}}
+
+
+
Sort
+
Updated Queued Priority Duration
+
{{moreLabel}}
+
+
+
+
+ PolicyAll fair-share fifo
+ RetentionAll 7 days 30 days
+ ClientAll gui cli
+ SessionAll
+ BucketAll default
+ RuntimeAll llama.cpp diffusers whisper
+ BackendAll cuda cpu
+ DeviceAll cuda:0 cuda:1 cpu
+ Network nodeAll local
+ AcceptedAny time Today This week
+
+
+
+
+
+
+ Run Status Placement Queue Started Duration Updated
+
+
+
+ {{run.wf}} {{run.id}} · v{{run.ver}}
+ {{run.statusLabel}} {{run.reason}}
+ {{run.runtime}}{{run.device}}
+ {{run.queue}}
+ {{run.started}}
+ {{run.dur}}
+ {{run.updated}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/design/mockups/boards/shell.css b/docs/design/mockups/boards/shell.css
new file mode 100644
index 000000000..4cf3ed8d9
--- /dev/null
+++ b/docs/design/mockups/boards/shell.css
@@ -0,0 +1,186 @@
+/* Pantograph workbench shell, direction E (dark drafting paper). Shared by the tab artboards. */
+body{margin:0;background:#2A2E35;color:#E4E6EA;font-family:'Atkinson Hyperlegible',system-ui,sans-serif;font-size:14px;line-height:1.45}
+a{color:#E4E6EA}a:hover{color:#fff}
+*,*::before,*::after{box-sizing:border-box}
+button,input,select,textarea{font:inherit;color:inherit}
+*{scrollbar-width:thin;scrollbar-color:#5A6069 transparent}
+::-webkit-scrollbar{width:10px;height:10px}
+::-webkit-scrollbar-track{background:transparent}
+::-webkit-scrollbar-thumb{background:#5A6069;border-radius:5px;border:2px solid #33383F}
+::-webkit-scrollbar-thumb:hover{background:#7A818C}
+::-webkit-scrollbar-corner{background:transparent}
+.serif{font-family:Newsreader,Georgia,serif}
+.mono{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:12.5px}
+.muted{color:#A3A9B4}
+.small{font-size:12.5px}
+.root{height:100vh;display:flex;flex-direction:column;background:#2A2E35;overflow:hidden}
+.hdr{display:flex;align-items:center;gap:4px;padding:0 14px;border-bottom:1px solid #1F2227;background:#23272D;flex:none}
+.brand{font-family:Newsreader,Georgia,serif;font-size:18px;font-weight:500;padding-right:14px;letter-spacing:-0.01em}
+.tab{display:flex;align-items:center;height:40px;padding:0 11px;text-decoration:none;color:#B8BDC6;border-bottom:2px solid transparent;font-size:13.5px;white-space:nowrap}
+.tab:hover{color:#fff;background:rgba(255,255,255,.04)}
+.tab[aria-current="page"]{color:#fff;border-bottom-color:#E4E6EA}
+.vdiv{width:1px;height:18px;background:#4A5059;margin:0 10px;flex:none}
+.tgl{height:26px;padding:0 10px;border:1px solid #4A5059;border-radius:4px;background:transparent;color:#B8BDC6;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;white-space:nowrap}
+.tgl:hover{color:#fff;border-color:#8A909A}
+.tgl[aria-pressed="true"]{background:#E4E6EA;color:#1F2227;border-color:#E4E6EA}
+.ctx{display:inline-flex;align-items:center;gap:8px;height:26px;padding:0 4px 0 10px;border:1px solid #4A5059;border-radius:4px;background:#2E333A;font-size:12.5px;max-width:320px}
+.ctx .x{width:20px;height:20px;border:0;border-radius:3px;background:transparent;color:#A3A9B4;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
+.ctx .x:hover{background:#4A5059;color:#fff}
+.eng{display:inline-block;width:7px;height:7px;background:#A7C4A0;border-radius:1px}
+.eng.off{background:#E39A9A}
+.engine{font-size:12.5px;display:flex;align-items:center;gap:8px;margin:0 10px 0 12px;white-space:nowrap}
+.main{flex:1;min-height:0;padding:10px 22px 16px;display:flex;flex-direction:column;gap:10px}
+.dimrow{display:flex;align-items:center;padding:8px 0 4px;flex:none}
+.dim{position:relative;flex:1;height:1px;background:#8A909A;align-self:center;margin:0 6px}
+.dim::before,.dim::after{content:"";position:absolute;top:-5px;width:1px;height:11px;background:#8A909A}
+.dim::before{left:0}.dim::after{right:0}
+.dim-label{position:absolute;left:50%;top:-9px;transform:translateX(-50%);padding:0 12px;background:#2A2E35;font-family:'JetBrains Mono',monospace;font-size:12px;color:#C9CDD4;white-space:nowrap}
+.field{height:30px;padding:0 10px;border:1px solid #4A5059;border-radius:4px;background:#23272D;color:#E4E6EA}
+.field:focus{outline:2px solid var(--accent);outline-offset:1px}
+.seg{display:flex;flex-wrap:wrap;border:1px solid #4A5059;border-radius:4px;overflow:hidden;background:#23272D}
+.seg button{height:30px;padding:0 7px;border:0;background:transparent;cursor:pointer;display:flex;gap:4px;align-items:center;justify-content:center;color:#B8BDC6;font-size:12.5px;white-space:nowrap;min-width:0;flex:1}
+.seg button+button{border-left:1px solid #3B4048}
+.seg button:hover{background:#33383F;color:#fff}
+.seg button[aria-pressed="true"]{background:#E4E6EA;color:#1F2227}
+.seg .n{font-family:'JetBrains Mono',monospace;font-size:11px;opacity:.8}
+.btn{height:30px;padding:0 11px;border:1px solid #4A5059;border-radius:4px;background:#33383F;cursor:pointer;display:inline-flex;align-items:center;gap:6px;color:#E4E6EA;text-decoration:none;font-size:13px;white-space:nowrap}
+.btn:hover{border-color:#8A909A}
+.btn.sm{height:28px}
+.btn.primary{background:#E4E6EA;color:#1F2227;border-color:#E4E6EA;font-weight:700}
+.btn.danger{background:transparent;color:#E39A9A;border-color:#5A4247}
+.btn.danger:hover{border-color:#E39A9A}
+.btn.confirm{background:#E39A9A;color:#1F2227;border-color:#E39A9A;font-weight:700}
+.btn:focus-visible,.seg button:focus-visible,.item:focus-visible,.tgl:focus-visible,.ghead:focus-visible,.fchip button:focus-visible,.row:focus-visible,.pill:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
+.panel{background:#33383F;border:1px solid #4A5059;border-radius:4px}
+.col{display:flex;flex-direction:column;overflow:hidden;min-width:0}
+.scroll{flex:1;min-height:0;overflow:auto}
+.ptop{padding:10px 12px;display:flex;flex-direction:column;gap:8px;flex:none;border-bottom:1px solid #4A5059}
+.pfoot{padding:8px 12px;border-top:1px solid #4A5059;background:#2E333A;display:flex;gap:8px;align-items:center;flex:none;min-height:48px}
+.ghead{display:flex;align-items:center;gap:8px;width:100%;padding:7px 12px;border:0;border-top:1px solid #3B4048;background:#2E333A;color:#C9CDD4;font-size:12px;font-weight:700;text-align:left;cursor:pointer;position:sticky;top:0;z-index:1}
+.ghead .n{font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:400;color:#A3A9B4}
+.ghead .chev{margin-left:auto;font-size:10px;color:#8A909A}
+.item{display:grid;grid-template-columns:14px 1fr auto;gap:10px;align-items:start;width:100%;padding:8px 12px;border:0;border-top:1px solid #3B4048;background:transparent;text-align:left;cursor:pointer;color:#E4E6EA}
+.item:hover{background:#3A3F47}
+.item[aria-current="true"]{background:#434A54;box-shadow:inset 3px 0 0 #E4E6EA}
+.item .name{font-weight:700;color:#fff}
+.item .ver{font-family:'JetBrains Mono',monospace;font-size:11px;color:#A3A9B4;margin-left:6px}
+.item .time{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:#A3A9B4;padding-top:2px;white-space:nowrap}
+.item .sub{display:block;font-size:12.5px;color:#A3A9B4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.g{display:inline-block;width:10px;height:10px;border-radius:50%;border:1.5px solid #A3A9B4;margin-top:4px;flex:none}
+.g-running{background:var(--accent);border-color:var(--accent)}
+.g-waiting{background:linear-gradient(90deg,var(--accent) 50%,transparent 50%);border-color:var(--accent)}
+.g-queued{background:transparent}
+.g-succeeded{background:#A3A9B4;border-color:#A3A9B4}
+.g-failed{background:#E39A9A;border-color:#E39A9A;border-radius:1px;transform:rotate(45deg) scale(.9)}
+.g-cancelled{border-style:dashed}
+.g-idle{border-color:#6B717B}
+.g-warn{background:#D9B06A;border-color:#D9B06A;border-radius:1px;transform:rotate(45deg) scale(.9)}
+.g-dark{border-color:#1F2227}
+.g-dark.g-running{background:#1F2227}
+.st-failed{color:#E39A9A}
+.sec{padding:14px 18px;border-top:1px solid #4A5059}
+.sec h3{margin:0 0 8px;font-size:13px;font-weight:700;color:#fff}
+.ev{display:grid;grid-template-columns:66px 1fr;gap:5px 14px;font-size:13.5px}
+.ev .t{font-family:'JetBrains Mono',monospace;font-size:12px;color:#A3A9B4}
+.kv{display:grid;grid-template-columns:max-content 1fr;gap:5px 16px;font-size:13.5px}
+.kv .k{color:#A3A9B4}
+.chip{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 8px;border:1px solid #4A5059;border-radius:11px;font-size:12px;background:#23272D;white-space:nowrap}
+.chip .g{margin-top:0}
+.fchip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 4px 0 8px;border:1px solid #6B717B;border-radius:12px;font-size:12px;background:#2E333A;color:#E4E6EA}
+.fchip button{width:18px;height:18px;border:0;border-radius:9px;background:transparent;color:#A3A9B4;cursor:pointer}
+.fchip button:hover{background:#4A5059;color:#fff}
+.fl{font-size:12px;color:#A3A9B4}
+.fl .field{display:block;width:100%;margin-top:3px;height:28px}
+.title{font-family:Newsreader,Georgia,serif;font-size:24px;font-weight:500;letter-spacing:-0.01em;color:#fff}
+.title .muted{font-size:16px}
+.empty{padding:32px 24px;color:#A3A9B4}
+/* table rows */
+.tbl{width:100%;border-collapse:collapse;font-size:13px}
+.tbl th{position:sticky;top:0;z-index:1;background:#2E333A;color:#A3A9B4;font-weight:700;font-size:12px;text-align:left;padding:7px 12px;border-bottom:1px solid #4A5059;white-space:nowrap}
+.tbl td{padding:7px 12px;border-top:1px solid #3B4048;vertical-align:top}
+.tbl tr.row{cursor:pointer}
+.tbl tr.row:hover td{background:#3A3F47}
+.tbl tr[aria-current="true"] td{background:#434A54}
+.tbl tr[aria-current="true"] td:first-child{box-shadow:inset 3px 0 0 #E4E6EA}
+.num{font-family:'JetBrains Mono',monospace;font-size:12px;text-align:right;white-space:nowrap}
+/* log lines */
+.log{font-family:'JetBrains Mono',monospace;font-size:12px;line-height:1.55}
+.log .ln{display:grid;grid-template-columns:96px 14px 1fr;gap:10px;padding:3px 12px;border-top:1px solid #30353C;align-items:start}
+.log .ln:hover{background:#3A3F47}
+.log .ln .t{color:#8A909A}
+.log .ln .g{margin-top:5px;width:8px;height:8px}
+.log .ln.err{background:rgba(227,154,154,.06)}
+.log .ln .m{white-space:pre-wrap;word-break:break-word;color:#D5D9DF}
+.log .ln .m b{color:#fff;font-weight:500}
+/* lanes */
+.lane{display:grid;grid-template-columns:118px 1fr;gap:8px;align-items:center}
+.lane-name{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:#C9CDD4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
+.lane-track{display:flex;gap:2px;height:20px;border-radius:3px;overflow:hidden;background:#23272D}
+.blk{display:flex;align-items:center;gap:6px;padding:0 6px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;border:1px solid transparent;border-radius:2px}
+.blk-running{background:var(--accent);color:#1F2227;font-weight:700}
+.blk-waiting{border-color:var(--accent);color:#E4E6EA;background:repeating-linear-gradient(135deg,transparent 0 4px,rgba(217,176,106,.25) 4px 6px)}
+.blk-queued{border-color:#6B717B;color:#C9CDD4}
+.blk-free{border:0}
+.legend{display:flex;gap:14px;align-items:center;font-size:11.5px;color:#A3A9B4;white-space:nowrap}
+.legend .g{margin-top:0}
+/* meters */
+.meter{height:6px;border-radius:3px;background:#23272D;overflow:hidden}
+.meter i{display:block;height:100%;background:#8A909A;border-radius:3px}
+.meter i.acc{background:var(--accent)}
+/* graph canvas */
+.canvas{position:relative;flex:1;min-width:0;overflow:hidden;border:1px solid #4A5059;border-radius:4px;background-color:#2E333A;background-image:radial-gradient(#4A5059 1px,transparent 1px);background-size:22px 22px}
+.gnode{position:absolute;width:168px;background:#33383F;border:1px solid #5A6069;border-radius:4px;box-shadow:0 1px 0 rgba(0,0,0,.25)}
+.gnode .nh{display:flex;align-items:center;gap:7px;padding:6px 9px;border-bottom:1px solid #4A5059;font-size:12.5px;font-weight:700;color:#fff}
+.gnode .nh .g{margin-top:0;width:8px;height:8px}
+.gnode .nh .mono{font-weight:400;color:#A3A9B4;font-size:11px;margin-left:auto}
+.gnode .pt{display:flex;justify-content:space-between;padding:3px 9px;font-size:11.5px;color:#C9CDD4;position:relative}
+.gnode .pt::before,.gnode .pt::after{content:"";position:absolute;top:50%;width:7px;height:7px;border-radius:50%;background:#2E333A;border:1.5px solid #8A909A;transform:translateY(-50%)}
+.gnode .pt.in::after{display:none}.gnode .pt.in::before{left:-4px}
+.gnode .pt.out::before{display:none}.gnode .pt.out::after{right:-4px}
+.gnode .pt.out{justify-content:flex-end}
+.gnode[aria-current="true"]{border-color:#E4E6EA;box-shadow:0 0 0 1px #E4E6EA}
+.gnode.dim{opacity:.55}
+.wire{fill:none;stroke:#8A909A;stroke-width:1.5}
+.wire.live{stroke:var(--accent);stroke-width:2}
+.wire.err{stroke:#E39A9A;stroke-dasharray:4 3}
+.pill{height:26px;padding:0 9px;border:1px solid #4A5059;border-radius:4px;background:#33383F;color:#C9CDD4;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
+.pill:hover{border-color:#8A909A;color:#fff}
+.fab{position:absolute;display:flex;gap:6px;padding:6px;background:rgba(35,39,45,.9);border:1px solid #4A5059;border-radius:4px;backdrop-filter:blur(4px)}
+.minimap{position:absolute;right:12px;bottom:12px;width:140px;height:84px;border:1px solid #4A5059;border-radius:3px;background:rgba(35,39,45,.9)}
+.minimap i{position:absolute;width:12px;height:7px;background:#6B717B;border-radius:1px}
+.minimap .view{position:absolute;border:1px solid #C9CDD4;background:transparent}
+/* tree */
+.tree button{display:flex;align-items:center;gap:8px;width:100%;padding:5px 12px;border:0;background:transparent;color:#E4E6EA;text-align:left;cursor:pointer;font-size:13px}
+.tree button:hover{background:#3A3F47}
+.tree button[aria-current="true"]{background:#434A54;box-shadow:inset 3px 0 0 #E4E6EA}
+.tree .lvl1{padding-left:28px}
+.tree .lvl2{padding-left:46px;color:#C9CDD4}
+.tree .typ{font-family:'JetBrains Mono',monospace;font-size:11px;color:#8A909A;margin-left:auto}
+.code{font-family:'JetBrains Mono',monospace;font-size:12px;line-height:1.55;white-space:pre;overflow:auto;padding:12px 14px;background:#23272D;border-radius:4px;border:1px solid #4A5059;color:#D5D9DF}
+.code .k{color:#C9CDD4}.code .s{color:#D9B06A}.code .n{color:#9FB7D9}
+/* cards */
+.card{background:#33383F;border:1px solid #4A5059;border-radius:4px;padding:12px 14px}
+.card h4{margin:0 0 6px;font-size:13px;font-weight:700;color:#fff}
+.grid-auto{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
+/* run-context picker */
+.ctxwrap{position:relative;display:flex;align-items:center}
+.ctxbtn{display:inline-flex;align-items:center;gap:8px;height:24px;border:0;background:transparent;color:#E4E6EA;cursor:pointer;padding:0;max-width:280px;font-size:12.5px}
+.ctxbtn .ctxname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.ctxbtn:hover .ctxname{color:#fff}
+.ctx.ctxempty{padding:0 10px;color:#B8BDC6;border-style:dashed}
+.ctx.ctxempty:hover{color:#fff;border-color:#8A909A}
+.ctxbtn:focus-visible,.ctx .x:focus-visible,.poprow:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
+.pop{position:absolute;right:0;top:32px;width:400px;z-index:60;background:#23272D;border:1px solid #4A5059;border-radius:4px;box-shadow:0 10px 28px rgba(0,0,0,.45);display:flex;flex-direction:column;max-height:70vh}
+.poplist{overflow:auto;min-height:0;flex:1}
+.pophead{padding:6px 12px;border-top:1px solid #3B4048;background:#2E333A;color:#C9CDD4;font-size:12px;font-weight:700;position:sticky;top:0;display:flex;gap:8px;align-items:center}
+.pophead .n{font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:400;color:#A3A9B4}
+.poprow{display:grid;grid-template-columns:14px 1fr auto;gap:10px;align-items:start;width:100%;padding:7px 12px;border:0;border-top:1px solid #3B4048;background:transparent;text-align:left;cursor:pointer;color:#E4E6EA;font-size:13px}
+.poprow:hover{background:#3A3F47}
+.poprow[aria-current="true"]{background:#434A54;box-shadow:inset 3px 0 0 #E4E6EA}
+.poprow b{color:#fff}
+.poprow .ver{font-family:'JetBrains Mono',monospace;font-size:11px;color:#A3A9B4}
+.poprow .sub{display:block;font-size:12px;color:#A3A9B4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.poprow .time{font-family:'JetBrains Mono',monospace;font-size:11px;color:#A3A9B4;padding-top:3px}
+.popfoot{padding:8px 12px;border-top:1px solid #3B4048;font-size:11.5px;color:#8A909A;line-height:1.4}
+.toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:70;padding:7px 12px;border:1px solid #4A5059;border-radius:4px;background:#23272D;color:#E4E6EA;font-size:12.5px;font-family:'JetBrains Mono',monospace;box-shadow:0 6px 18px rgba(0,0,0,.4)}
+.btn[aria-disabled="true"],.tgl[aria-disabled="true"]{opacity:.45;cursor:default}
diff --git a/docs/design/mockups/ctx-markup.html b/docs/design/mockups/ctx-markup.html
new file mode 100644
index 000000000..781766f5f
--- /dev/null
+++ b/docs/design/mockups/ctx-markup.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+ {{ctxRun.wf}} v{{ctxRun.ver}}
+ ▾
+
+ ×
+
+
+
+ Pick a run ▾
+
+
+
+
+ Search runs or paste a run id
+
+
+
+
+ {{pg.title}} {{pg.n}}
+
+
+
+ {{r.wf}} v{{r.ver}} {{r.statusLabel}}{{r.contextSuffix}}
+ {{r.id}}
+
+
+
+
{{pickerEmptyText}}
+
+
+
+
+
+ Copied {{copiedId}}
diff --git a/docs/design/mockups/ctx-mixin.js b/docs/design/mockups/ctx-mixin.js
new file mode 100644
index 000000000..d36c11c61
--- /dev/null
+++ b/docs/design/mockups/ctx-mixin.js
@@ -0,0 +1,121 @@
+ catalog() {
+ return [
+ { id: 'run_01JB2K7Q3M', wf: 'ingest-docs-rag', ver: '1.4.0', status: 'running', runtime: 'llama.cpp', device: 'cuda:0', deviceName: 'RTX 4090', vram: 17.2, queue: 0, prio: 0, est: 'About 2 min left', node: 'embed_chunks', pct: '61%', reason: '', started: '20:01:40', dur: '4m 12s', updated: '20:05:51', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2K9F0A', wf: 'image-gen-sdxl', ver: '0.9.2', status: 'running', runtime: 'diffusers', device: 'cuda:1', deviceName: 'RTX 3090', vram: 9.8, queue: 0, prio: 0, est: 'About 40 s left', node: 'sample', pct: 'step 18 of 30', reason: '', started: '20:04:02', dur: '1m 49s', updated: '20:05:50', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2KB4ZT', wf: 'transcribe-meeting', ver: '2.1.0', status: 'waiting', runtime: 'whisper', device: 'cuda:0', deviceName: 'RTX 4090', vram: 8, queue: 1, prio: 5, est: 'Starts after ingest-docs-rag', node: '', pct: '', reason: 'needs 8 GB on cuda:0, 6.8 GB free', started: '—', dur: '—', updated: '20:05:12', client: 'cli', session: 's-9c01' },
+ { id: 'run_01JB2KC1PX', wf: 'summarize-daily', ver: '1.0.3', status: 'queued', runtime: 'llama.cpp', device: 'cuda:1', deviceName: 'RTX 3090', vram: 6, queue: 2, prio: 0, est: 'About 6 min', node: '', pct: '', reason: 'next on cuda:1, model cached', started: '—', dur: '—', updated: '20:04:40', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2KD8RN', wf: 'embed-corpus', ver: '1.4.0', status: 'queued', runtime: 'llama.cpp', device: '', deviceName: '', vram: 7, queue: 3, prio: 0, est: 'About 9 min', node: '', pct: '', reason: 'cold load, 12 s', started: '—', dur: '—', updated: '20:04:41', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2KE2QW', wf: 'image-gen-sdxl', ver: '0.9.2', status: 'queued', runtime: 'diffusers', device: '', deviceName: '', vram: 9.8, queue: 4, prio: 0, est: 'About 2 min', node: '', pct: '', reason: 'model cached', started: '—', dur: '—', updated: '20:04:55', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2JZ0MT', wf: 'summarize-daily', ver: '1.0.3', status: 'succeeded', runtime: 'llama.cpp', device: 'cuda:0', deviceName: 'RTX 4090', vram: 6, queue: 0, prio: 0, est: 'Finished in 38 s', node: '', pct: '', reason: '', started: '19:52:10', dur: '38 s', updated: '19:52:48', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2JV7KD', wf: 'embed-corpus', ver: '1.3.9', status: 'succeeded', runtime: 'llama.cpp', device: 'cuda:0', deviceName: 'RTX 4090', vram: 7, queue: 0, prio: 0, est: 'Finished in 11m 03s', node: '', pct: '', reason: '', started: '19:38:01', dur: '11m 03s', updated: '19:49:04', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2JT3HB', wf: 'image-gen-sdxl', ver: '0.9.1', status: 'failed', runtime: 'diffusers', device: 'cuda:1', deviceName: 'RTX 3090', vram: 14.2, queue: 0, prio: 0, est: 'Stopped after 22 s', node: 'load_model', pct: '', reason: 'out of memory, needed 14.2 GB', started: '19:35:20', dur: '22 s', updated: '19:35:42', client: 'gui', session: 's-4f2a' },
+ { id: 'run_01JB2JQ9XA', wf: 'transcribe-meeting', ver: '2.0.0', status: 'cancelled', runtime: 'whisper', device: 'cuda:0', deviceName: 'RTX 4090', vram: 8, queue: 0, prio: 0, est: 'Stopped after 1m 10s', node: 'transcribe', pct: '', reason: 'cancelled from the GUI', started: '19:30:05', dur: '1m 10s', updated: '19:31:15', client: 'gui', session: 's-4f2a' }
+ ];
+ }
+ wfMap() {
+ return {
+ 'ingest-docs-rag': { model: 'pumas://models/bge-m3', nodes: [['read_docs', 'read-file', 'text'], ['chunking', 'expand-settings', 'settings'], ['split', 'processing', 'chunks'], ['embed_chunks', 'embedding', 'embedding'], ['index', 'vector-output', ''], ['manifest', 'write-file', '']] },
+ 'image-gen-sdxl': { model: 'pumas://models/sdxl-base-1.0', nodes: [['prompt', 'text-input', 'text'], ['load_model', 'puma-lib', 'model_path'], ['sample', 'pytorch-inference', 'latents'], ['decode', 'image-output', 'image'], ['unload', 'unload-model', '']] },
+ 'transcribe-meeting': { model: 'pumas://models/whisper-large-v3', nodes: [['audio', 'audio-input', 'audio'], ['transcribe', 'onnx-inference', 'transcript'], ['notes', 'text-output', 'text']] },
+ 'summarize-daily': { model: 'pumas://models/qwen3-8b-instruct', nodes: [['fetch', 'read-file', 'text'], ['summarize', 'llm-inference', 'response'], ['write', 'write-file', '']] },
+ 'embed-corpus': { model: 'pumas://models/bge-m3', nodes: [['read', 'read-file', 'text'], ['embed', 'embedding', 'embedding'], ['index', 'vector-output', '']] }
+ };
+ }
+ nodeStates(run) {
+ const wf = this.wfMap()[run.wf] || { nodes: [['start', 'processing', 'out'], ['end', 'text-output', '']] };
+ const idx = wf.nodes.findIndex((n) => n[0] === run.node);
+ return wf.nodes.map(([id, type, port], i) => {
+ let state = 'queued';
+ if (run.status === 'succeeded') state = 'succeeded';
+ else if (run.status === 'running') state = i < idx ? 'succeeded' : i === idx ? 'running' : 'queued';
+ else if (run.status === 'failed') state = i < idx ? 'succeeded' : i === idx ? 'failed' : 'skipped';
+ else if (run.status === 'cancelled') state = i < idx ? 'succeeded' : i === idx ? 'cancelled' : 'skipped';
+ const glyph = state === 'skipped' ? 'g-cancelled' : 'g-' + state;
+ return { id, type, port, state, glyph, label: state === 'skipped' ? 'skipped' : state };
+ });
+ }
+ decorateRun(r) {
+ const labels = { running: 'Running', waiting: 'Waiting', queued: 'Queued', succeeded: 'Succeeded', failed: 'Failed', cancelled: 'Cancelled' };
+ const isLive = r.status === 'running' || r.status === 'waiting' || r.status === 'queued';
+ let context = '';
+ if (r.status === 'running') context = ', ' + r.node + (r.pct ? ' ' + r.pct : '');
+ else if (r.status === 'waiting') context = ', ' + r.reason;
+ else if (r.status === 'queued') context = ', #' + r.queue + ' in queue';
+ else if (r.reason) context = ', ' + r.reason;
+ else context = ', ' + r.dur;
+ const placement = r.device ? r.runtime + ' on ' + r.device : r.runtime + ', device not assigned yet';
+ const placementLong = r.device ? r.runtime + ' on ' + r.device + ' (' + r.deviceName + ')' : 'Not assigned to a device yet';
+ let progress = r.est;
+ if (r.status === 'running') progress = r.node + ', ' + r.pct;
+ else if (r.status === 'waiting') progress = 'Waiting: ' + r.reason;
+ else if (r.status === 'queued') progress = 'Queue position ' + r.queue + ', ' + r.reason;
+ else if (r.status === 'failed') progress = 'Failed in ' + r.node + ': ' + r.reason;
+ const chips = [];
+ if (r.device) chips.push({ text: r.runtime + ' on ' + r.device });
+ if (r.prio) chips.push({ text: 'priority ' + r.prio });
+ if (r.queue) chips.push({ text: '#' + r.queue + ' in queue' });
+ return { ...r, glyph: 'g-' + r.status, stClass: r.status === 'failed' ? 'st-failed' : '', statusLabel: labels[r.status], contextSuffix: context, placement, placementLong, progress, chips, isLive,
+ model: (this.wfMap()[r.wf] || {}).model || 'none', hoverOn: () => { this._hoverRun = r.id; }, hoverOff: () => { if (this._hoverRun === r.id) this._hoverRun = null; } };
+ }
+ ctxBind() {
+ if (this._ctxBound || typeof document === 'undefined') return;
+ this._ctxBound = true;
+ const isField = (t) => t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.tagName === 'SELECT');
+ document.addEventListener('keydown', (e) => {
+ const k = (e.key || '').toLowerCase(); const mod = e.ctrlKey || e.metaKey;
+ if (e.key === 'Escape' && this.state && this.state.pickerOpen) { this.setState({ pickerOpen: false }); return; }
+ if (!mod || isField(e.target)) return;
+ if (k === 'c' && this._hoverRun) this.copyRun(this._hoverRun);
+ if (k === 'v' && this._hoverCtx) { e.preventDefault(); this.pasteRun(); }
+ });
+ document.addEventListener('mousedown', (e) => {
+ if (this.state && this.state.pickerOpen && !(e.target.closest && e.target.closest('.ctxwrap'))) this.setState({ pickerOpen: false });
+ });
+ window.addEventListener('storage', (e) => { if (e.key === 'pg.run') this.setState({ run: e.newValue || null }); });
+ }
+ copyRun(id) {
+ try { localStorage.setItem('pg.clip', id); } catch (_) {}
+ if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(id).catch(() => {});
+ this.setState({ copied: id });
+ clearTimeout(this._copyT); this._copyT = setTimeout(() => this.setState({ copied: null }), 1600);
+ }
+ pasteRun() {
+ const apply = (text) => { const id = (text || '').trim(); if (this.catalog().some((r) => r.id === id)) this.pickRun(id); else this.setState({ pickerOpen: true, pickerQuery: id }); };
+ let fallback = ''; try { fallback = localStorage.getItem('pg.clip') || ''; } catch (_) {}
+ if (navigator.clipboard && navigator.clipboard.readText) navigator.clipboard.readText().then(apply, () => apply(fallback)); else apply(fallback);
+ }
+ pickRun(id) {
+ try { localStorage.setItem('pg.run', id || ''); } catch (_) {}
+ this.setState({ run: id || null, pickerOpen: false, pickerQuery: '', confirmCancel: false });
+ }
+ ctxRunId(fallback) {
+ const st = this.state || {};
+ if ('run' in st) return st.run;
+ try { const v = localStorage.getItem('pg.run'); if (v !== null) return v || null; } catch (_) {}
+ return fallback;
+ }
+ ctxVals(fallbackId) {
+ this.ctxBind();
+ const st = this.state || {};
+ const runId = this.ctxRunId(fallbackId);
+ const all = this.catalog();
+ const selRaw = all.find((r) => r.id === runId);
+ const sel = this.decorateRun(selRaw || all[0]);
+ const qRaw = st.pickerQuery || ''; const q = qRaw.toLowerCase();
+ const match = (r) => !q || r.wf.includes(q) || r.id.toLowerCase().includes(q) || ('v' + r.ver).includes(q);
+ const groups = [['Running', ['running']], ['Waiting for memory', ['waiting']], ['Queued', ['queued']], ['Finished today', ['succeeded', 'failed', 'cancelled']]]
+ .map(([title, keys]) => { const runs = all.filter((r) => keys.includes(r.status) && match(r)).map((r) => ({ ...this.decorateRun(r), selected: r.id === runId, pick: () => this.pickRun(r.id) })); return { title, n: runs.length, runs }; })
+ .filter((g) => g.n);
+ const total = groups.reduce((n, g) => n + g.n, 0);
+ return {
+ runId, hasSel: !!selRaw, noSel: !selRaw, sel, ctxHas: !!selRaw, ctxNone: !selRaw, ctxRun: sel,
+ pickerOpen: !!st.pickerOpen, pickerQuery: qRaw, pickerGroups: groups,
+ pickerEmpty: total === 0, pickerEmptyText: q.startsWith('run_') ? 'No run with id ' + qRaw + ' in today\'s history.' : 'No runs match.',
+ togglePicker: () => this.setState({ pickerOpen: !st.pickerOpen }),
+ openPicker: () => this.setState({ pickerOpen: true }),
+ setQuery: (e) => { const v = e.target.value; if (all.some((r) => r.id === v.trim())) this.pickRun(v.trim()); else this.setState({ pickerQuery: v }); },
+ clearSel: () => this.pickRun(null),
+ ctxHoverOn: () => { this._hoverCtx = true; }, ctxHoverOff: () => { this._hoverCtx = false; },
+ copied: !!st.copied, copiedId: st.copied || ''
+ };
+ }
diff --git a/docs/design/mockups/inject.py b/docs/design/mockups/inject.py
new file mode 100644
index 000000000..1db44af99
--- /dev/null
+++ b/docs/design/mockups/inject.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+"""Expands the shared run-context picker into every board.
+Markup goes where a board has (or between ... );
+the mixin goes where the class has /*ctx*/ (or between /*ctx-start*/ ... /*ctx-end*/). Idempotent."""
+import pathlib, re, sys
+here = pathlib.Path(__file__).parent
+markup = (here / "ctx-markup.html").read_text().rstrip("\n")
+mixin = (here / "ctx-mixin.js").read_text().rstrip("\n")
+M0, M1 = "", ""
+J0, J1 = "/*ctx-start*/", "/*ctx-end*/"
+for f in sorted((here / "project").glob("*.dc.html")):
+ s = f.read_text()
+ if "" not in s and M0 not in s:
+ continue
+ s = s.replace("", f"{M0}\n{markup}\n {M1}")
+ s = re.sub(re.escape(M0) + r"[\s\S]*?" + re.escape(M1), lambda _: f"{M0}\n{markup}\n {M1}", s)
+ s = s.replace("/*ctx*/", f"{J0}\n{mixin}\n {J1}")
+ s = re.sub(re.escape(J0) + r"[\s\S]*?" + re.escape(J1), lambda _: f"{J0}\n{mixin}\n {J1}", s)
+ f.write_text(s)
+ print("injected", f.name)
diff --git a/docs/design/mockups/viewer/.gitignore b/docs/design/mockups/viewer/.gitignore
new file mode 100644
index 000000000..45ddf0ae3
--- /dev/null
+++ b/docs/design/mockups/viewer/.gitignore
@@ -0,0 +1 @@
+site/
diff --git a/docs/design/mockups/viewer/build.sh b/docs/design/mockups/viewer/build.sh
new file mode 100755
index 000000000..2e0923223
--- /dev/null
+++ b/docs/design/mockups/viewer/build.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+# Builds the local mockup site from ../boards into ./site and serves it on http://127.0.0.1:8765/
+set -euo pipefail
+here="$(cd "$(dirname "$0")" && pwd)"
+src="$here/../boards"
+out="$here/site"
+mkdir -p "$out"
+cp "$here/support.js" "$out/support.js"
+cp "$src/shell.css" "$out/shell.css"
+cp "$here/current-scheduler.png" "$out/current-scheduler.png"
+for f in "$src"/*.dc.html; do
+ b="$(basename "$f" .dc.html)"
+ sed -e 's#src="/_blob/[0-9a-f]*"#src="./current-scheduler.png"#' "$f" > "$out/$b.html"
+done
+python3 - "$out/index.html" <<'PY'
+import sys, pathlib
+rows = [("Round 1: current build and three directions", ["Current", "Main", "Studio", "Instrument"]),
+ ("Round 2: D and E (Scheduler)", ["Dark", "Revised"]),
+ ("Round 3: every tab in E's language", ["Sessions", "Diagnostics", "IoInspector", "Network", "Graph", "NodeEditor", "Library"])]
+cards = []
+for title, names in rows:
+ cards.append(f'{title} ')
+ for n in names:
+ cards.append(f'
{n} ')
+ cards.append('
')
+html = '''Pantograph GUI mockups
+
+Pantograph GUI mockups Click a board to open it full size. Boards share one run context; Ctrl+C over a run copies its id, Ctrl+V over the chip views it.
''' + ''.join(cards) + ''
+pathlib.Path(sys.argv[1]).write_text(html)
+PY
+echo "built in $out"
+if [ "${1:-}" = "--serve" ]; then exec python3 -m http.server 8765 --directory "$out"; fi
diff --git a/docs/design/mockups/viewer/cdp.js b/docs/design/mockups/viewer/cdp.js
new file mode 100644
index 000000000..bc1d58323
--- /dev/null
+++ b/docs/design/mockups/viewer/cdp.js
@@ -0,0 +1,30 @@
+// Drives headless Chrome over the DevTools protocol with Node's built-in WebSocket.
+// Usage: node cdp.js steps.json where steps is [{goto:url}|{eval:js}|{wait:ms}|{shot:file}]
+const { spawn } = require('child_process');
+const fs = require('fs');
+const os = require('os');
+const CH = os.homedir() + '/.cache/ms-playwright/chromium_headless_shell-1246/chrome-headless-shell-linux64/chrome-headless-shell';
+const PORT = 9333;
+const steps = JSON.parse(fs.readFileSync(process.argv[2], 'utf8'));
+const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+
+(async () => {
+ const chrome = spawn(CH, ['--headless', '--disable-gpu', '--hide-scrollbars=false', '--remote-debugging-port=' + PORT, '--window-size=1440,900', '--user-data-dir=' + fs.mkdtempSync(os.tmpdir() + '/cdp-'), 'about:blank'], { stdio: 'ignore' });
+ let targets = null;
+ for (let i = 0; i < 50 && !targets; i++) { await sleep(200); try { targets = await (await fetch('http://127.0.0.1:' + PORT + '/json')).json(); } catch (_) {} }
+ const page = targets.find((t) => t.type === 'page');
+ const ws = new WebSocket(page.webSocketDebuggerUrl);
+ await new Promise((r) => (ws.onopen = r));
+ let id = 0; const pending = new Map();
+ ws.onmessage = (m) => { const d = JSON.parse(m.data); if (d.id && pending.has(d.id)) { pending.get(d.id)(d); pending.delete(d.id); } };
+ const send = (method, params = {}) => new Promise((r) => { const i = ++id; pending.set(i, r); ws.send(JSON.stringify({ id: i, method, params })); });
+ await send('Page.enable'); await send('Runtime.enable');
+ await send('Emulation.setDeviceMetricsOverride', { width: 1440, height: 900, deviceScaleFactor: 1, mobile: false });
+ for (const s of steps) {
+ if (s.goto) { await send('Page.navigate', { url: s.goto }); await sleep(s.settle || 1200); }
+ else if (s.eval) { const r = await send('Runtime.evaluate', { expression: s.eval, awaitPromise: true, returnByValue: true }); if (r.result && r.result.exceptionDetails) console.log('eval error:', r.result.exceptionDetails.text, s.eval.slice(0, 80)); else if (s.log) console.log(s.log + ':', JSON.stringify(r.result.result.value)); await sleep(s.settle || 250); }
+ else if (s.wait) await sleep(s.wait);
+ else if (s.shot) { const r = await send('Page.captureScreenshot', { format: 'png' }); fs.writeFileSync(s.shot, Buffer.from(r.result.data, 'base64')); console.log('shot', s.shot); }
+ }
+ ws.close(); chrome.kill();
+})().catch((e) => { console.error(e); process.exit(1); });
diff --git a/docs/design/mockups/viewer/current-scheduler.png b/docs/design/mockups/viewer/current-scheduler.png
new file mode 100644
index 0000000000000000000000000000000000000000..054584ef8f70d8fade33fa5466e4b7bfd15d573b
GIT binary patch
literal 78281
zcmce;XFS|p_c!WF6VX!j5{Z)NT|y89(IcYwUIwGLF-Sp_5WN!-L>Z%wZuH*EXoKjz
z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