Skip to content

Updated imports / added connection for AI Orchestrator in RPCService - #36

Open
IsaacBurns7 wants to merge 5 commits into
mainfrom
frontend-ai-integration
Open

Updated imports / added connection for AI Orchestrator in RPCService#36
IsaacBurns7 wants to merge 5 commits into
mainfrom
frontend-ai-integration

Conversation

@IsaacBurns7

Copy link
Copy Markdown
Contributor

Added generic bidirectional streaming hook in useRPC. Created new agentstream method in ai orchestrator proto, and accompanying custom hook in useRPCHelpers. Created AgentStreamManager componenet to demo feature. Confident on correctness of everything except custom hook implementation.

FINAL GOAL:
6 streams
Sessions, workflows, agents, chat, audit, approvals.
-> = (create / request creation of)
sessions -> workflows -> agents
agents -> (CHAT or AUDIT or APPROVALS)

… Added generic bidirectional streaming hook in useRPC. Created new agentstream method in ai orchestrator proto, and accompanying custom hook in useRPCHelpers. Created AgentStreamManager componenet to demo feature. Confident on correctness of everything except custom hook implementation.
@IsaacBurns7 IsaacBurns7 self-assigned this Oct 22, 2025

@FOOincognita FOOincognita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

I'll need to re-review the following files after our call:

  1. proto/ai/orchestrator/v1/service.proto
  2. proto/ai/orchestrator/v1/messages.proto
  3. frontend/src/renderer/src/hooks/data/useRPCHelpers.ts
  4. frontend/src/renderer/src/hooks/data/useRPC.ts

It appears as though there may be a sizable dupe conflict between proto types defined in this PR, & proto types defined in the main branch (recently merged).

@@ -0,0 +1,101 @@
import React, {useState} from "react";
import { useManageAgentStream } from "@/hooks/data/useRPCHelpers";
import { AgentUpdatesResponseSchema, AgentUpdatesRequestSchema, AgentUpdatesRequest, AgentControlRequestSchema } from "@generated/ai/orchestrator/v1/messages_pb";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports with Schema suffix unused


option go_package = "github.com/Firelight-Innovations/FiApply/proto/ai/orchestrator/v1;orchestratorv1";

message Timestamp {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove type; use google.protobuf.Timestamp instead.

Comment on lines +12 to +27
enum AgentStatus {
AGENT_STATUS_UNKNOWN = 0;
AGENT_STATUS_INITIALIZING = 1;
AGENT_STATUS_RUNNING = 2;
AGENT_STATUS_PAUSED = 3;
AGENT_STATUS_COMPLETED = 4;
AGENT_STATUS_FAILED = 5;
AGENT_STATUS_STOPPED = 6;
}

enum AgentCommand {
AGENT_COMMAND_UNSPECIFIED = 0;
PAUSE = 1;
RESUME = 2;
STOP = 3;
} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, Kedar and/or Braden already implemented types almost identical to these.

Comment thread proto/ai/orchestrator/v1/messages.proto Outdated
Comment on lines 224 to 229
message StreamConnectResponse{

}
message AgentInfoRequest{

// Error details if task failed
fi.common.v1.Error error = 4;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Messages cannot be truly empty. Use google.protobuf.Empty to add an explicit empty data-member.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, most of what was added in this PR in this file is duplicate of existing proto messages that Kedar/Braden have implemented.

import { useCallback, useRef } from "react";
import { BrowserAVBlob, ClientActionRequest, BrowserAVBlobResponse } from "@generated/ai/orchestrator/v1/messages_pb";
import { RPCConfig, useRPCClientStream, UseRPCReturn, useRPCStream } from "./useRPC";
import { BrowserAVBlob, ClientActionRequest, BrowserAVBlobResponse, StreamConnectRequestSchema } from "@generated/ai/orchestrator/v1/messages_pb";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revisit following meeting.

Comment on lines +5 to +8
import { merge } from '@bufbuild/protobuf';
import { abort } from 'process';
import { request } from 'http';
import { current } from '@reduxjs/toolkit';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused imports

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revisit after call.

@FOOincognita FOOincognita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to respond to + click resolve on each of the comments I left. Even if it's j 1 word. After that, last step's resolving your 3 merge conflicts.

IsaacBurns7 and others added 3 commits October 30, 2025 12:11
…gentstream modified to use this new async iterable, managechatstream working on server, and now verified via dummy client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants