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
15 changes: 2 additions & 13 deletions ui/playwright/tests/chat/agent-sharing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@ import { agentChat, instances } from "../../helpers/app";
/**
* Sharing a conversation: create a link, see it listed, revoke it, open one.
*
* ## What changed to make this possible
*
* A share is over an `AgentInstance`, because the instance *is* the conversation.
* `AgentInstanceService` always carried the three share RPCs, but nothing on the
* read path honoured the token they minted: the gRPC interceptor resolved
* `X-Share-Token` through `GetSessionShareByToken` and produced a context naming a
* *session*, while the A2A gateway authorises on the instance. A dialog built on
* those RPCs would have handed out links that could not be opened — which is why
* this was deferred rather than shipped.
*
* The interceptor now tries both kinds of share, and the gateway reads the instance
* as the share's *owner* when the token names it — which it must, since an instance
* is scoped to its creator and reading it as the visitor finds nothing.
* The gRPC interceptor validates the share token, and the A2A gateway reads the
* instance as the share's owner; reading it as the visitor would find nothing.
*
* ## What a fixture can and cannot prove here
*
Expand Down Expand Up @@ -149,4 +139,3 @@ test("sharing: a link that allows replies offers a way to reply", async ({ page
await expect(page.getByTestId("chat-input")).toBeVisible();

});

72 changes: 0 additions & 72 deletions ui/playwright/tests/chat/shared-conversation.spec.ts

This file was deleted.

53 changes: 0 additions & 53 deletions ui/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ import type {
PromptTemplateSummary,
UpdatePromptTemplateRequest,
} from "./domain/prompts";
import type {
CreateSessionRequest,
CreateSessionShareRequest,
Session,
SessionShare,
} from "./domain/sessions";
import type { ChatMessage } from "./chat/types";
import type { NamespaceResponse } from "./domain/namespaces";
import type {
SubstrateActorPage,
Expand Down Expand Up @@ -156,37 +149,6 @@ export interface PromptsApi {
remove(namespace: string, name: string): Promise<void>;
}

export interface SessionsApi {
listForAgent(
namespace: string,
name: string,
options?: ReadOptions,
): Promise<Session[]>;
get(id: string, options?: ReadOptions): Promise<Session>;
create(payload: CreateSessionRequest): Promise<Session>;
remove(id: string): Promise<void>;
/**
* Share links for a conversation.
*
* Only the owner may list or revoke: the controller checks the session belongs
* to the caller before doing either, so a `NotFound` here means "not yours" as
* much as "not there".
*/
shares: {
list(id: string, options?: ReadOptions): Promise<SessionShare[]>;
create(id: string, payload?: CreateSessionShareRequest): Promise<SessionShare>;
remove(id: string, token: string): Promise<void>;
};
/**
* The turns held in a session, as messages to render.
*
* Only the shared-conversation page reads this now: live chat is addressed by
* `AgentInstance` and replays itself from the A2A gateway. A share token names a
* session, though, so the links already issued still resolve through here.
*/
tasks(id: string, options?: ReadOptions): Promise<ChatMessage[]>;
}

export interface NamespacesApi {
list(options?: ReadOptions): Promise<NamespaceResponse[]>;
}
Expand Down Expand Up @@ -371,7 +333,6 @@ export interface KagentApiClient {
models: ModelsApi;
mcpServers: McpServersApi;
prompts: PromptsApi;
sessions: SessionsApi;
namespaces: NamespacesApi;
substrate: SubstrateApi;
agentInstances: AgentInstancesApi;
Expand Down Expand Up @@ -428,20 +389,6 @@ export function createApiClient(): KagentApiClient {
remove: (namespace, name) => invoke("prompts.delete", { namespace, name }),
},

sessions: {
listForAgent: (namespace, name, options) =>
invoke("sessions.listForAgent", { namespace, name }, options),
get: (id, options) => invoke("sessions.get", { id }, options),
create: (payload) => invoke("sessions.create", { payload }),
remove: (id) => invoke("sessions.delete", { id }),
shares: {
list: (id, options) => invoke("sessions.shares.list", { id }, options),
create: (id, payload) => invoke("sessions.shares.create", { id, payload }),
remove: (id, token) => invoke("sessions.shares.delete", { id, token }),
},
tasks: (id, options) => invoke("sessions.tasks", { id }, options),
},

namespaces: {
list: (options) => invoke("namespaces.list", {}, options),
},
Expand Down
7 changes: 3 additions & 4 deletions ui/src/api/domain/agentTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ export interface ConfigMapKeyRef {
/**
* Tools selected from one MCP server.
*
* `tools` is required and must hold at least one name — unlike the tool bindings on
* the older `Agent` kind, where an empty list meant *every* tool the server
* exposes. The CRD here has `MinItems=1`, so "all of them" has to be spelled out.
* An omitted or empty `tools` list exposes every tool the server provides. A
* non-empty list limits the binding to those names.
*/
export interface McpToolBinding {
server: { kind: "RemoteMCPServer"; name: string };
tools: string[];
tools?: string[];
}

/** Another AgentTemplate exposed to this one as a tool it can route work to. */
Expand Down
54 changes: 0 additions & 54 deletions ui/src/api/domain/sessions.ts

This file was deleted.

Loading
Loading