Jiro.Shared
1.4.6
dotnet add package Jiro.Shared --version 1.4.6
NuGet\Install-Package Jiro.Shared -Version 1.4.6
<PackageReference Include="Jiro.Shared" Version="1.4.6" />
<PackageVersion Include="Jiro.Shared" Version="1.4.6" />
<PackageReference Include="Jiro.Shared" />
paket add Jiro.Shared --version 1.4.6
#r "nuget: Jiro.Shared, 1.4.6"
#:package Jiro.Shared@1.4.6
#addin nuget:?package=Jiro.Shared&version=1.4.6
#tool nuget:?package=Jiro.Shared&version=1.4.6
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
- Issues: https://github.com/HueByte/Jiro.Shared/issues
- Discussions: https://github.com/HueByte/Jiro.Shared/discussions
- Documentation: https://huebyte.github.io/Jiro.Shared/
Related Projects
- Jiro.Shared: https://github.com/HueByte/Jiro.Shared - Shared models and infrastructure
- JiroCloud: https://github.com/HueByte/JiroCloud - Cloud service implementation
- Jiro: https://github.com/HueByte/Jiro - Main application instance
| Product | Versions 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. |
-
net10.0
- Google.Protobuf (>= 3.31.1)
- Grpc.AspNetCore (>= 2.71.0)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 9.0.8)
- Microsoft.AspNetCore.SignalR (>= 1.2.0)
- Microsoft.AspNetCore.SignalR.Client (>= 9.0.8)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.8)
- Microsoft.EntityFrameworkCore.Sqlite (>= 9.0.8)
- Microsoft.EntityFrameworkCore.Tools (>= 9.0.8)
- Microsoft.Extensions.DependencyInjection (>= 9.0.8)
- Newtonsoft.Json (>= 13.0.3)
- Pomelo.EntityFrameworkCore.MySql (>= 9.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.8)
- Z.EntityFramework.Plus.EFCore (>= 9.103.9.2)
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 |