@agent-factory-platform/agent-react 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ import type { agentV1 } from "@agent-factory-platform/client";
2
+ export type AgentDocumentResource = {
3
+ id: string;
4
+ title: string;
5
+ spaceId: string;
6
+ space: string;
7
+ revision: string;
8
+ bound: boolean;
9
+ attached: boolean;
10
+ availability?: string;
11
+ };
12
+ export declare function AgentCapabilityCatalog({ skills, installed, busy, completeness, onInstall, onUninstall }: {
13
+ skills: readonly agentV1.SkillSummary[];
14
+ installed: ReadonlySet<string>;
15
+ busy?: string;
16
+ completeness?: string;
17
+ onInstall: (skill: agentV1.SkillSummary) => void | Promise<void>;
18
+ onUninstall: (skill: agentV1.SkillSummary) => void | Promise<void>;
19
+ }): import("react").JSX.Element;
20
+ export declare function AgentMemoryCenter({ memories, busy, onConfirm, onDelete }: {
21
+ memories: readonly agentV1.Memory[];
22
+ busy?: string;
23
+ onConfirm: (memory: agentV1.Memory) => void | Promise<void>;
24
+ onDelete: (memory: agentV1.Memory) => void | Promise<void>;
25
+ }): import("react").JSX.Element;
26
+ export declare function AgentCollaborationCenter({ collaboration, tasks, busy, onCancel }: {
27
+ collaboration?: agentV1.Collaboration;
28
+ tasks: readonly agentV1.CollaborationTask[];
29
+ busy?: boolean;
30
+ onCancel?: () => void | Promise<void>;
31
+ }): import("react").JSX.Element;
32
+ export declare function AgentDocumentLibrary({ documents, onBind, onAttach, onOpen }: {
33
+ documents: readonly AgentDocumentResource[];
34
+ onBind: (document: AgentDocumentResource) => void;
35
+ onAttach: (document: AgentDocumentResource) => void;
36
+ onOpen?: (document: AgentDocumentResource) => void;
37
+ }): import("react").JSX.Element;
38
+ export declare function AgentRevisionHistory({ revisions, currentId, onFork }: {
39
+ revisions: readonly agentV1.AgentProfileRevision[];
40
+ currentId: string;
41
+ onFork?: (revision: agentV1.AgentProfileRevision) => void;
42
+ }): import("react").JSX.Element;
43
+ export declare const capabilityKey: (skill: Pick<agentV1.SkillSummary, "kind" | "slug" | "version">) => string;
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AgentDataSlots, AgentProjectionItem, AgentSessionModel, agentV1 } from "@agent-factory-platform/client";
1
+ import { agentV1, type AgentDataSlots, type AgentProjectionItem, type AgentSessionModel } from "@agent-factory-platform/client";
2
2
  import { type ReactNode } from "react";
3
3
  import { type AgentSlotRegistry } from "./registry";
4
4
  export interface AgentUiLabels {
@@ -15,7 +15,7 @@ export interface AgentUiLabels {
15
15
  explicitSkill: string;
16
16
  }
17
17
  export declare const DEFAULT_AGENT_UI_LABELS: AgentUiLabels;
18
- export declare function AgentSessionList({ sessions, activeSessionId, onSelect, onNew, onDelete, labels: overrides }: {
18
+ export declare function AgentSessionList({ sessions, activeSessionId, onSelect, onNew, onDelete, labels: overrides, }: {
19
19
  sessions: readonly agentV1.Session[];
20
20
  activeSessionId?: string;
21
21
  onSelect: (id: string) => void;
@@ -23,46 +23,58 @@ export declare function AgentSessionList({ sessions, activeSessionId, onSelect,
23
23
  onDelete?: (id: string) => void;
24
24
  labels?: Partial<AgentUiLabels>;
25
25
  }): import("react").JSX.Element;
26
- export declare function AgentResourceBar<Slots extends AgentDataSlots = AgentDataSlots>({ profileRevisionId, explicitSkillSlug, onExplicitSkillChange, labels: overrides, registry }: {
26
+ export declare function AgentResourceBar<Slots extends AgentDataSlots = AgentDataSlots>({ profileRevisionId, explicitSkillSlug, onExplicitSkillChange, labels: overrides, registry, }: {
27
27
  profileRevisionId: string;
28
28
  explicitSkillSlug: string;
29
29
  onExplicitSkillChange: (value: string) => void;
30
30
  labels?: Partial<AgentUiLabels>;
31
31
  registry?: AgentSlotRegistry<Slots>;
32
32
  }): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
33
- export declare function AgentExecutionTrace<Slots extends AgentDataSlots = AgentDataSlots>({ items, label, registry }: {
33
+ export declare function AgentExecutionTrace<Slots extends AgentDataSlots = AgentDataSlots>({ items, label, registry, }: {
34
34
  items: readonly Extract<AgentProjectionItem, {
35
35
  slot: "trace-item";
36
36
  }>[];
37
37
  label?: string;
38
38
  registry?: AgentSlotRegistry<Slots>;
39
39
  }): import("react").JSX.Element | null;
40
- export declare function AgentActionCard({ interaction, onResolve }: {
41
- interaction: Pick<agentV1.Interaction, "id" | "kind" | "status">;
40
+ export declare function AgentActionCard({ interaction, onResolve, }: {
41
+ interaction: Pick<agentV1.Interaction, "id" | "kind" | "status"> & Partial<Pick<agentV1.Interaction, "resolvedAt">>;
42
42
  onResolve: (resolution: "confirmed" | "rejected") => void | Promise<void>;
43
43
  }): import("react").JSX.Element;
44
- export declare function AgentComposer({ value, onChange, onSubmit, running, onStop, labels: overrides }: {
44
+ export interface AgentInputResource {
45
+ resourceId: string;
46
+ label: string;
47
+ mediaType?: string;
48
+ }
49
+ export declare function AgentComposer({ value, onChange, onSubmit, running, onStop, onInject, onAttachResource, resources, onRemoveResource, labels: overrides, }: {
45
50
  value: string;
46
51
  onChange: (value: string) => void;
47
52
  onSubmit: () => void;
48
53
  running: boolean;
49
54
  onStop: () => void;
55
+ onInject?: () => void;
56
+ onAttachResource?: () => void;
57
+ resources?: readonly AgentInputResource[];
58
+ onRemoveResource?: (resourceId: string) => void;
50
59
  labels?: Partial<AgentUiLabels>;
51
60
  }): import("react").JSX.Element;
52
- export declare function AgentProjectionNodes<Slots extends AgentDataSlots = AgentDataSlots>({ items, registry, onResolveInteraction }: {
61
+ export declare function AgentProjectionNodes<Slots extends AgentDataSlots = AgentDataSlots>({ items, registry, onResolveInteraction, }: {
53
62
  items: readonly AgentProjectionItem<Slots>[];
54
63
  registry?: AgentSlotRegistry<Slots>;
55
64
  onResolveInteraction?: (interactionId: string, resolution: "confirmed" | "rejected") => void | Promise<void>;
56
65
  }): import("react").JSX.Element;
57
- export declare function AgentConversation<Slots extends AgentDataSlots = AgentDataSlots>({ model, explicitSkillSlug, registry, header, labels: overrides, onError }: {
66
+ export declare function AgentConversation<Slots extends AgentDataSlots = AgentDataSlots>({ model, explicitSkillSlug, resources, onRemoveResource, onAttachResource, registry, header, labels: overrides, onError, }: {
58
67
  model: AgentSessionModel<Slots>;
59
68
  explicitSkillSlug?: string;
69
+ resources?: readonly AgentInputResource[];
70
+ onRemoveResource?: (resourceId: string) => void;
71
+ onAttachResource?: () => void;
60
72
  registry?: AgentSlotRegistry<Slots>;
61
73
  header?: ReactNode;
62
74
  labels?: Partial<AgentUiLabels>;
63
75
  onError?: (error: Error) => void;
64
76
  }): import("react").JSX.Element;
65
- export declare function AgentChat<Slots extends AgentDataSlots = AgentDataSlots>({ model, title, subtitle, profileRevisionId, sessions, activeSessionId, onSelectSession, onNewSession, onDeleteSession, registry, labels: overrides }: {
77
+ export declare function AgentChat<Slots extends AgentDataSlots = AgentDataSlots>({ model, title, subtitle, profileRevisionId, sessions, activeSessionId, onSelectSession, onNewSession, onDeleteSession, registry, labels: overrides, }: {
66
78
  model: AgentSessionModel<Slots>;
67
79
  title?: string;
68
80
  subtitle?: string;
@@ -75,14 +87,27 @@ export declare function AgentChat<Slots extends AgentDataSlots = AgentDataSlots>
75
87
  registry?: AgentSlotRegistry<Slots>;
76
88
  labels?: Partial<AgentUiLabels>;
77
89
  }): import("react").JSX.Element;
78
- export declare function AgentProfileEditor<Slots extends AgentDataSlots = AgentDataSlots>({ revision, onChange, onSave, saving, registry }: {
90
+ export declare function AgentProfileEditor<Slots extends AgentDataSlots = AgentDataSlots>({ revision, onChange, onSave, saving, showSave, registry, }: {
79
91
  revision: agentV1.AgentProfileRevision;
80
92
  onChange: (revision: agentV1.AgentProfileRevision) => void;
81
93
  onSave: () => void;
82
94
  saving?: boolean;
95
+ showSave?: boolean;
83
96
  registry?: AgentSlotRegistry<Slots>;
84
97
  }): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
85
- export declare function AgentStudio({ editor, preview }: {
98
+ export declare const compositionIssueLabel: (count: number) => string;
99
+ export declare function AgentCompositionPanel({ composition, loading, error, }: {
100
+ composition?: agentV1.ProfileComposition;
101
+ loading?: boolean;
102
+ error?: string;
103
+ }): import("react").JSX.Element;
104
+ export declare function AgentProfileSettings({ revision, composition, onChange, onSave, }: {
105
+ revision: agentV1.AgentProfileRevision;
106
+ composition?: agentV1.ProfileComposition;
107
+ onChange: (revision: agentV1.AgentProfileRevision) => void;
108
+ onSave: (revision: agentV1.AgentProfileRevision) => Promise<agentV1.AgentProfileRevision | void>;
109
+ }): import("react").JSX.Element;
110
+ export declare function AgentStudio({ editor, preview, }: {
86
111
  editor: ReactNode;
87
112
  preview: ReactNode;
88
113
  }): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-factory-platform/agent-react",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Agent runtime bindings and themeable React conversation surfaces.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -29,8 +29,8 @@
29
29
  "react": "^19.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@agent-factory-platform/client": "0.2.0",
33
- "@agent-factory-platform/ui-kit": "0.2.0",
32
+ "@agent-factory-platform/client": "0.3.0",
33
+ "@agent-factory-platform/ui-kit": "0.3.0",
34
34
  "@bufbuild/protobuf": "^2.2.3",
35
35
  "lucide-react": "^1.23.0"
36
36
  },