@agentpulselabs/agent-studio-client 0.1.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.
- package/README.md +12 -5
- package/index.d.ts +94 -6
- package/index.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,11 +21,18 @@ const result = await agent_studio.agentsGetByKey(payload);
|
|
|
21
21
|
|
|
22
22
|
| Method | Op | Summary |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| `agentsGetByKey` | `agents:get-by-key` | Resolve a team's agent by stable agent_key (team override wins, else the shipped blueprint). |
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
24
|
+
| `agentsGetByKey` | `agents:get-by-key` | Resolve a team's agent by stable agent_key (team override wins, else the shipped blueprint); null when the key is unknown. avatar: 'pulse' \| 'voice' \| null (null = the platform default face). |
|
|
25
|
+
| `agentsList` | `agents:list` | The team's enabled agents (team rows shadow the shipped blueprints by agent_key), by name: id, agent_key, name, kind, provider_id, avatar. agent_key is what agents:get-by-key resolves. |
|
|
26
|
+
| `blueprintsRegister` | `blueprints:register` | Idempotently upsert a GLOBAL agent blueprint + its skill(s) from a self-describing |
|
|
27
|
+
| `conversationsAppend` | `conversations:append` | Append a turn to the caller's own conversation (else CONVERSATION_NOT_OWNED), or create a new one owned by the caller when no id is given. createdBy is accepted and ignored. |
|
|
28
|
+
| `conversationsResume` | `conversations:resume` | The transcript array of the caller's own conversation, or [] for any other id (unknown, a teammate's, no owner). |
|
|
29
|
+
| `conversationsResumeOwn` | `conversations:resume-own` | The caller's own conversation: { owned: true, transcript } when the caller created it, else { owned: false } (unknown, a teammate's, no owner, another team's — all alike). |
|
|
30
|
+
| `runtimeExecute` | `runtime:execute` | Run one agent turn (skill-aware tool loop). Streaming op — consume via bridge.stream(). |
|
|
28
31
|
| `widgetActive_agents` | `widget:active_agents` | Home-widget stat: the team's enabled purpose agents (team rows + un-overridden blueprints) of the pool total. |
|
|
29
32
|
| `widgetActive_skills` | `widget:active_skills` | Home-widget stat: the team's enabled skills (team rows + un-overridden blueprints) of the pool total. |
|
|
30
|
-
| `
|
|
33
|
+
| `widgetChat_hours` | `widget:chat_hours` | When chats start over 30 days: weekday by 2-hour band, UTC (home widget). |
|
|
34
|
+
| `widgetChats` | `widget:chats` | Chats per day over 14 days, and by agent and by surface over 30 days (home widget). |
|
|
35
|
+
| `widgetRecent_chats` | `widget:recent_chats` | Home-widget list: the caller's own 5 most recently updated conversations. |
|
|
31
36
|
| `widgetRegistry_tools` | `widget:registry_tools` | Home-widget stat: count of the platform's non-deprecated operation catalog (tools available to agents). |
|
|
37
|
+
| `widgetSkills_approval` | `widget:skills_approval` | The team's skills (team rows + un-overridden blueprints) by approval policy (home widget). |
|
|
38
|
+
| `widgetTool_calls` | `widget:tool_calls` | Average tool calls per agent turn in the chats of the last 30 days, with a weekly spark (home widget). |
|
package/index.d.ts
CHANGED
|
@@ -13,7 +13,35 @@ export interface AgentsGetByKeyInput {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface AgentsGetByKeyOutput {
|
|
16
|
-
|
|
16
|
+
agent_key: string;
|
|
17
|
+
avatar: string | null;
|
|
18
|
+
customised: boolean;
|
|
19
|
+
default_tools: string[];
|
|
20
|
+
description: string | null;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
id: string;
|
|
23
|
+
is_system: boolean;
|
|
24
|
+
kind: string;
|
|
25
|
+
name: string;
|
|
26
|
+
owner_app: string | null;
|
|
27
|
+
persona_prompt: string | null;
|
|
28
|
+
provider_id: string | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface AgentsListOutput {
|
|
32
|
+
agents: unknown[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface BlueprintsRegisterInput {
|
|
36
|
+
agent: Record<string, unknown>;
|
|
37
|
+
bindings?: unknown[];
|
|
38
|
+
skills: unknown[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface BlueprintsRegisterOutput {
|
|
42
|
+
agent_key: string;
|
|
43
|
+
created: boolean;
|
|
44
|
+
skillKeys: string[];
|
|
17
45
|
}
|
|
18
46
|
|
|
19
47
|
export interface ConversationsAppendOutput {
|
|
@@ -28,28 +56,88 @@ export interface ConversationsResumeOutput {
|
|
|
28
56
|
transcript: unknown[];
|
|
29
57
|
}
|
|
30
58
|
|
|
59
|
+
export interface ConversationsResumeOwnInput {
|
|
60
|
+
conversationId: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ConversationsResumeOwnOutput {
|
|
64
|
+
owned: boolean;
|
|
65
|
+
transcript?: unknown[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface WidgetChat_hoursOutput {
|
|
69
|
+
cols: string[];
|
|
70
|
+
empty: string;
|
|
71
|
+
kind: string;
|
|
72
|
+
rows: unknown[];
|
|
73
|
+
unit: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface WidgetChatsOutput {
|
|
77
|
+
defaultType: string;
|
|
78
|
+
empty: string;
|
|
79
|
+
id: string;
|
|
80
|
+
kind: string;
|
|
81
|
+
views: unknown[];
|
|
82
|
+
}
|
|
83
|
+
|
|
31
84
|
export interface WidgetRecent_chatsOutput {
|
|
32
85
|
empty: string;
|
|
33
86
|
items: unknown[];
|
|
34
87
|
}
|
|
35
88
|
|
|
89
|
+
export interface WidgetSkills_approvalOutput {
|
|
90
|
+
defaultType: string;
|
|
91
|
+
empty: string;
|
|
92
|
+
id: string;
|
|
93
|
+
kind: string;
|
|
94
|
+
views: unknown[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface WidgetTool_callsOutput {
|
|
98
|
+
chip: string;
|
|
99
|
+
context: string;
|
|
100
|
+
detail: string;
|
|
101
|
+
empty: string;
|
|
102
|
+
href: string;
|
|
103
|
+
kind: string;
|
|
104
|
+
spark: number[];
|
|
105
|
+
tone: string;
|
|
106
|
+
unit: string;
|
|
107
|
+
value: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
36
110
|
export interface AgentStudioClient {
|
|
37
|
-
/** Resolve a team's agent by stable agent_key (team override wins, else the shipped blueprint). */
|
|
111
|
+
/** Resolve a team's agent by stable agent_key (team override wins, else the shipped blueprint); null when the key is unknown. avatar: 'pulse' | 'voice' | null (null = the platform default face). */
|
|
38
112
|
agentsGetByKey(payload: AgentsGetByKeyInput): Promise<AgentsGetByKeyOutput>;
|
|
39
|
-
/**
|
|
113
|
+
/** The team's enabled agents (team rows shadow the shipped blueprints by agent_key), by name: id, agent_key, name, kind, provider_id, avatar. agent_key is what agents:get-by-key resolves. */
|
|
114
|
+
agentsList(payload: Record<string, unknown>): Promise<AgentsListOutput>;
|
|
115
|
+
/** Idempotently upsert a GLOBAL agent blueprint + its skill(s) from a self-describing */
|
|
116
|
+
blueprintsRegister(payload: BlueprintsRegisterInput): Promise<BlueprintsRegisterOutput>;
|
|
117
|
+
/** Append a turn to the caller's own conversation (else CONVERSATION_NOT_OWNED), or create a new one owned by the caller when no id is given. createdBy is accepted and ignored. */
|
|
40
118
|
conversationsAppend(payload: Record<string, unknown>): Promise<ConversationsAppendOutput>;
|
|
41
|
-
/** The
|
|
119
|
+
/** The transcript array of the caller's own conversation, or [] for any other id (unknown, a teammate's, no owner). */
|
|
42
120
|
conversationsResume(payload: ConversationsResumeInput): Promise<ConversationsResumeOutput>;
|
|
43
|
-
/**
|
|
121
|
+
/** The caller's own conversation: { owned: true, transcript } when the caller created it, else { owned: false } (unknown, a teammate's, no owner, another team's — all alike). */
|
|
122
|
+
conversationsResumeOwn(payload: ConversationsResumeOwnInput): Promise<ConversationsResumeOwnOutput>;
|
|
123
|
+
/** Run one agent turn (skill-aware tool loop). Streaming op — consume via bridge.stream(). */
|
|
44
124
|
runtimeExecute(payload: Record<string, unknown>): Promise<unknown>;
|
|
45
125
|
/** Home-widget stat: the team's enabled purpose agents (team rows + un-overridden blueprints) of the pool total. */
|
|
46
126
|
widgetActive_agents(payload: Record<string, unknown>): Promise<unknown>;
|
|
47
127
|
/** Home-widget stat: the team's enabled skills (team rows + un-overridden blueprints) of the pool total. */
|
|
48
128
|
widgetActive_skills(payload: Record<string, unknown>): Promise<unknown>;
|
|
49
|
-
/**
|
|
129
|
+
/** When chats start over 30 days: weekday by 2-hour band, UTC (home widget). */
|
|
130
|
+
widgetChat_hours(payload: Record<string, unknown>): Promise<WidgetChat_hoursOutput>;
|
|
131
|
+
/** Chats per day over 14 days, and by agent and by surface over 30 days (home widget). */
|
|
132
|
+
widgetChats(payload: Record<string, unknown>): Promise<WidgetChatsOutput>;
|
|
133
|
+
/** Home-widget list: the caller's own 5 most recently updated conversations. */
|
|
50
134
|
widgetRecent_chats(payload: Record<string, unknown>): Promise<WidgetRecent_chatsOutput>;
|
|
51
135
|
/** Home-widget stat: count of the platform's non-deprecated operation catalog (tools available to agents). */
|
|
52
136
|
widgetRegistry_tools(payload: Record<string, unknown>): Promise<unknown>;
|
|
137
|
+
/** The team's skills (team rows + un-overridden blueprints) by approval policy (home widget). */
|
|
138
|
+
widgetSkills_approval(payload: Record<string, unknown>): Promise<WidgetSkills_approvalOutput>;
|
|
139
|
+
/** Average tool calls per agent turn in the chats of the last 30 days, with a weekly spark (home widget). */
|
|
140
|
+
widgetTool_calls(payload: Record<string, unknown>): Promise<WidgetTool_callsOutput>;
|
|
53
141
|
}
|
|
54
142
|
|
|
55
143
|
export declare function createClient(bridge: Bridge): AgentStudioClient;
|
package/index.js
CHANGED
|
@@ -7,12 +7,19 @@ export function createClient(bridge) {
|
|
|
7
7
|
if (!bridge) throw new Error('[agent-studio-client] bridge is required');
|
|
8
8
|
return {
|
|
9
9
|
agentsGetByKey: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'agents:get-by-key', payload }),
|
|
10
|
+
agentsList: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'agents:list', payload }),
|
|
11
|
+
blueprintsRegister: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'blueprints:register', payload }),
|
|
10
12
|
conversationsAppend: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'conversations:append', payload }),
|
|
11
13
|
conversationsResume: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'conversations:resume', payload }),
|
|
14
|
+
conversationsResumeOwn: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'conversations:resume-own', payload }),
|
|
12
15
|
runtimeExecute: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'runtime:execute', payload }),
|
|
13
16
|
widgetActive_agents: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:active_agents', payload }),
|
|
14
17
|
widgetActive_skills: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:active_skills', payload }),
|
|
18
|
+
widgetChat_hours: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:chat_hours', payload }),
|
|
19
|
+
widgetChats: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:chats', payload }),
|
|
15
20
|
widgetRecent_chats: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:recent_chats', payload }),
|
|
16
21
|
widgetRegistry_tools: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:registry_tools', payload }),
|
|
22
|
+
widgetSkills_approval: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:skills_approval', payload }),
|
|
23
|
+
widgetTool_calls: (payload) => bridge.call({ targetApp: 'agent-studio', operation: 'widget:tool_calls', payload }),
|
|
17
24
|
};
|
|
18
25
|
}
|