Jiro.Shared 1.4.6

dotnet add package Jiro.Shared --version 1.4.6
                    
NuGet\Install-Package Jiro.Shared -Version 1.4.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jiro.Shared" Version="1.4.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jiro.Shared" Version="1.4.6" />
                    
Directory.Packages.props
<PackageReference Include="Jiro.Shared" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jiro.Shared --version 1.4.6
                    
#r "nuget: Jiro.Shared, 1.4.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jiro.Shared@1.4.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jiro.Shared&version=1.4.6
                    
Install as a Cake Addin
#tool nuget:?package=Jiro.Shared&version=1.4.6
                    
Install as a Cake Tool

Jiro.Shared

Shared types and models for the Jiro ecosystem applications.

Overview

Jiro.Shared provides common types, models, and utilities used across the Jiro ecosystem, including JiroCloud and Jiro instances. This package contains shared WebSocket endpoints, gRPC service definitions, request/response models, and other foundational components that ensure consistent communication between different parts of the Jiro system.

Features

  • WebSocket Endpoints: Predefined endpoint constants for real-time communication
  • gRPC Definitions: Protocol buffer definitions for efficient service communication
  • TaskManager Infrastructure: Unified task management for distributed systems
  • Shared Models: Common request and response data transfer objects (DTOs)
  • Proto File Distribution: jiroHub.proto included for gRPC service generation
  • Type Safety: Strongly-typed contracts for reliable inter-service communication
  • Documentation: Full XML documentation for excellent IntelliSense support

Installation

Package Manager

Install-Package Jiro.Shared

.NET CLI

dotnet add package Jiro.Shared

Package Reference

<PackageReference Include="Jiro.Shared" Version="1.4.5" />

Usage

WebSocket Endpoints

using Jiro.Shared.Websocket;

// Server to client events
var commandEndpoint = Endpoints.Incoming.ReceiveCommand;
var logsEndpoint = Endpoints.Incoming.GetLogs;

// Client to server events  
var responseEndpoint = Endpoints.Outgoing.LogsResponse;
var errorEndpoint = Endpoints.Outgoing.ErrorResponse;

// Connection lifecycle
var closedEvent = Endpoints.Lifecycle.Closed;

Request/Response Models

using Jiro.Shared.Websocket.Requests;
using Jiro.Shared.Websocket.Responses;

// Command message
var command = new CommandMessage
{
    Command = "help",
    SessionId = "session-123"
};

// Session response
var sessionResponse = new SessionResponse
{
    SessionId = "session-123",
    IsActive = true
};

TaskManager Infrastructure (v1.4.0+)

using Jiro.Shared.Tasks;
using Microsoft.Extensions.DependencyInjection;

// Register TaskManager
services.Configure<TaskManagerOptions>(options => 
{
    options.DefaultTimeoutSeconds = 30;
    options.MaxPendingTasks = 1000;
});
services.AddSingleton<ITaskManager, TaskManager>();

// Use TaskManager
var taskManager = serviceProvider.GetService<ITaskManager>();
var result = await taskManager.ExternalExecuteAsync<MyResponse>(
    instanceId: "instance-1",
    requestId: "req-123", 
    action: () => SendCommandAsync()
);

SynchronizationToken Model (v1.4.0+)

using Jiro.Shared;

// Enhanced command tracking
var token = new SynchronizationToken
{
    InstanceId = "instance-1",
    SessionId = "session-123", 
    RequestId = "req-456"
};

// Use with command responses
var response = new SessionCommandResponse
{
    SynchronizationToken = token,
    CommandType = CommandType.Text,
    Result = new TextResult { Response = "Hello World" }
};

gRPC Proto File Usage (v1.4.0+)

The jiroHub.proto file is automatically included in your project:

<ItemGroup>
  <Protobuf Include="Grpc\jiroHub.proto" GrpcServices="Client" />
</ItemGroup>

Generate gRPC services:

using Jiro.Shared.Grpc;

// Use generated gRPC client
var client = new JiroHubProto.JiroHubProtoClient(channel);
var response = await client.SendCommandResultAsync(clientMessage);

Documentation

For comprehensive documentation, examples, and API reference, visit: https://huebyte.github.io/Jiro.Shared/

Contributing

Contributions are welcome! Please see our Contributing Guidelines for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.6 198 12/12/2025
1.4.4 753 8/6/2025
1.4.3 272 8/6/2025
1.4.2 272 8/5/2025
1.4.1 278 8/5/2025
1.4.0 272 8/5/2025
1.3.2 316 7/26/2025
1.3.1 353 7/26/2025
1.3.0 415 7/25/2025
1.2.2 542 7/24/2025
1.2.1 574 7/23/2025
1.2.0 585 7/22/2025
1.1.6 581 7/22/2025
1.1.5 540 7/21/2025
1.1.4 467 7/21/2025
1.1.3 293 7/20/2025
1.1.2 283 7/19/2025
1.1.1 192 7/17/2025
1.1.0 205 7/17/2025
1.0.0 186 7/17/2025