Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions KitX Core Contracts/KitX.Core.Contract/Device/IDeviceService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.ComponentModel;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using KitX.Shared.CSharp.Device;
Expand Down Expand Up @@ -238,3 +240,26 @@ public class MainDeviceChangedEventArgs : EventArgs
/// </summary>
public string NewMainDeviceId { get; set; } = string.Empty;
}

/// <summary>
/// Device HTTP client interface — sends requests to remote DevicesServer instances.
/// Used for cross-device plugin invocation via the /Api/V1/Plugin/Invoke endpoint.
/// (Moved to Contract so the Workflow library can depend on the abstraction without
/// referencing KitX.Core.)
/// </summary>
public interface IDeviceHttpClient
{
/// <summary>
/// Invokes a plugin method on a remote device via HTTP POST to /Api/V1/Plugin/Invoke.
/// </summary>
/// <param name="targetDevice">Target device info (contains IPv4 and DevicesServerPort)</param>
/// <param name="token">Valid session token for the target device</param>
/// <param name="request">The Request object to send</param>
/// <param name="ct">Cancellation token</param>
/// <returns>HTTP response from remote device, or null on network error</returns>
Task<HttpResponseMessage?> InvokePluginAsync(
DeviceInfo targetDevice,
string token,
KitX.Shared.CSharp.WebCommand.Request request,
CancellationToken ct = default);
}
21 changes: 21 additions & 0 deletions KitX Core Contracts/KitX.Core.Contract/Event/WorkflowEventNames.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace KitX.Core.Contract.Event;

/// <summary>
/// Event-bus channel names shared between the Workflow library and its host
/// (KitX.Core / KitX.Dashboard). Centralized here so the workflow library can
/// publish/subscribe on the <see cref="IEventService"/> bus without referencing
/// KitX.Core's own <c>EventNames</c> table.
/// </summary>
public static class WorkflowEventNames
{
/// <summary>
/// Plugin response event (carries a RequestId so callers can correlate
/// a fire-and-forget plugin invocation with its reply).
/// </summary>
public const string PluginResponse = "PluginResponse";

/// <summary>
/// Workflow execution result event (success or failure of a workflow run).
/// </summary>
public const string WorkflowExecutionResult = "WorkflowExecutionResult";
}
45 changes: 0 additions & 45 deletions KitX Core Contracts/KitX.Core.Contract/Workflow/BlockDefinition.cs

This file was deleted.

93 changes: 0 additions & 93 deletions KitX Core Contracts/KitX.Core.Contract/Workflow/BlockScript.cs

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions KitX Core Contracts/KitX.Core.Contract/Workflow/FlowControlType.cs

This file was deleted.

125 changes: 0 additions & 125 deletions KitX Core Contracts/KitX.Core.Contract/Workflow/IBlockScriptParser.cs

This file was deleted.

Loading
Loading