@agno-hq/chat-react 0.3.3 → 0.3.4
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 +46 -0
- package/dist/chat/index.cjs +90 -86
- package/dist/chat/index.d.cts +55 -43
- package/dist/chat/index.d.ts +55 -43
- package/dist/chat/index.js +2 -2
- package/dist/{chunk-RE7ZT73K.js → chunk-5QKU7OPE.js} +2 -2
- package/dist/{chunk-RE7ZT73K.js.map → chunk-5QKU7OPE.js.map} +1 -1
- package/dist/{chunk-6V2YIPHF.js → chunk-BCVKAMSO.js} +22 -4
- package/dist/chunk-BCVKAMSO.js.map +1 -0
- package/dist/{chunk-3IEYJIYJ.cjs → chunk-ESV52ERB.cjs} +620 -318
- package/dist/chunk-ESV52ERB.cjs.map +1 -0
- package/dist/{chunk-2WM3CCFE.cjs → chunk-HBSF434L.cjs} +2 -2
- package/dist/{chunk-2WM3CCFE.cjs.map → chunk-HBSF434L.cjs.map} +1 -1
- package/dist/{chunk-E4CFQ457.js → chunk-OGDPK4Z3.js} +586 -285
- package/dist/chunk-OGDPK4Z3.js.map +1 -0
- package/dist/{chunk-55HQJGLP.cjs → chunk-Y34YRC5T.cjs} +22 -3
- package/dist/chunk-Y34YRC5T.cjs.map +1 -0
- package/dist/{client-DUyVqxU9.d.cts → client-Dwk6ThnW.d.cts} +24 -12
- package/dist/{client-DUyVqxU9.d.ts → client-Dwk6ThnW.d.ts} +24 -12
- package/dist/core/index.cjs +23 -23
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/index.cjs +113 -109
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/styles.css +22 -15
- package/package.json +11 -9
- package/dist/chunk-3IEYJIYJ.cjs.map +0 -1
- package/dist/chunk-55HQJGLP.cjs.map +0 -1
- package/dist/chunk-6V2YIPHF.js.map +0 -1
- package/dist/chunk-E4CFQ457.js.map +0 -1
|
@@ -55,7 +55,7 @@ function drainBuffer(buffer, onEvent) {
|
|
|
55
55
|
start = buffer.indexOf("{", start + 1);
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
|
-
buffer = buffer.slice(end + 1)
|
|
58
|
+
buffer = buffer.slice(end + 1);
|
|
59
59
|
start = buffer.indexOf("{");
|
|
60
60
|
}
|
|
61
61
|
return buffer;
|
|
@@ -244,6 +244,8 @@ var AgnoClient = class {
|
|
|
244
244
|
if (args.userId) form.append("user_id", args.userId);
|
|
245
245
|
if (args.type === "workflow") {
|
|
246
246
|
if (args.stepRequirements) form.append("step_requirements", JSON.stringify(args.stepRequirements));
|
|
247
|
+
} else if (args.requirements) {
|
|
248
|
+
form.append("requirements", JSON.stringify(args.requirements));
|
|
247
249
|
} else if (args.tools) {
|
|
248
250
|
form.append("tools", JSON.stringify(args.tools));
|
|
249
251
|
}
|
|
@@ -342,6 +344,22 @@ var isToolCompletedEvent = (e) => name(e) === "ToolCallCompleted" || name(e) ===
|
|
|
342
344
|
var isToolEvent = (e) => isToolStartedEvent(e) || isToolCompletedEvent(e) || name(e) === "ToolCallError" || name(e) === "TeamToolCallError";
|
|
343
345
|
var isReasoningStepEvent = (e) => name(e) === "ReasoningStep" || name(e) === "TeamReasoningStep";
|
|
344
346
|
var isReasoningCompletedEvent = (e) => name(e) === "ReasoningCompleted" || name(e) === "TeamReasoningCompleted";
|
|
347
|
+
function reasoningStepsFromEvent(e) {
|
|
348
|
+
const legacy = e.reasoning_steps ?? e.extra_data?.reasoning_steps;
|
|
349
|
+
if (legacy?.length) return legacy;
|
|
350
|
+
if (!isReasoningStepEvent(e) && !isReasoningCompletedEvent(e)) return [];
|
|
351
|
+
const content = e.content;
|
|
352
|
+
if (!content || typeof content !== "object" || Array.isArray(content)) return [];
|
|
353
|
+
if ("reasoning_steps" in content && Array.isArray(content.reasoning_steps)) {
|
|
354
|
+
return content.reasoning_steps.filter(isReasoningStep);
|
|
355
|
+
}
|
|
356
|
+
return isReasoningStep(content) ? [content] : [];
|
|
357
|
+
}
|
|
358
|
+
function isReasoningStep(value) {
|
|
359
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
360
|
+
const fields = ["title", "action", "result", "reasoning", "next_action"];
|
|
361
|
+
return fields.some((key) => typeof Reflect.get(value, key) === "string") && fields.every((key) => Reflect.get(value, key) == null || typeof Reflect.get(value, key) === "string") && (!("confidence" in value) || value.confidence == null || typeof value.confidence === "number");
|
|
362
|
+
}
|
|
345
363
|
var isFollowupsCompletedEvent = (e) => name(e) === "FollowupsCompleted" || name(e) === "TeamFollowupsCompleted";
|
|
346
364
|
function isSubRunEvent(e) {
|
|
347
365
|
if (!e.parent_run_id) return false;
|
|
@@ -520,8 +538,9 @@ exports.isToolCompletedEvent = isToolCompletedEvent;
|
|
|
520
538
|
exports.isToolEvent = isToolEvent;
|
|
521
539
|
exports.mergeTool = mergeTool;
|
|
522
540
|
exports.normaliseBaseUrl = normaliseBaseUrl;
|
|
541
|
+
exports.reasoningStepsFromEvent = reasoningStepsFromEvent;
|
|
523
542
|
exports.sessionRunsToMessages = sessionRunsToMessages;
|
|
524
543
|
exports.streamRun = streamRun;
|
|
525
544
|
exports.toolsFromEvent = toolsFromEvent;
|
|
526
|
-
//# sourceMappingURL=chunk-
|
|
527
|
-
//# sourceMappingURL=chunk-
|
|
545
|
+
//# sourceMappingURL=chunk-Y34YRC5T.cjs.map
|
|
546
|
+
//# sourceMappingURL=chunk-Y34YRC5T.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/stream.ts","../src/core/client.ts","../src/core/session.ts","../src/core/events.ts"],"names":["id"],"mappings":";;;AA0BA,SAAS,WAAW,IAAA,EAAiC;AACnD,EAAA,OACE,OAAO,IAAA,KAAS,QAAA,IAChB,IAAA,KAAS,IAAA,IACT,OAAA,IAAW,IAAA,IACX,MAAA,IAAU,IAAA,IACV,OAAQ,IAAA,CAAk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CAAE,aAAA,IAAiB,CAAA,CAAE,WAAA;AAC3C,IAAA,MAAM,UAAU,MAAA,CAAO,CAAA,CAAE,OAAO,CAAA,IAAK,MAAA,CAAO,cAAc,OAAO,CAAA;AACjE,IAAA,IAAI,OAAA,OAAc,OAAA,GAAU,OAAA;AAAA,EAC9B;AAEA,EAAA,IAAI,GAAA,IAAO,CAAA,EAAG,KAAA,CAAM,GAAG,CAAA,GAAI,IAAA;AAAA,OACtB,KAAA,CAAM,KAAK,IAAI,CAAA;AACpB,EAAA,OAAO,EAAE,GAAG,OAAA,EAAS,KAAA,EAAM;AAC7B;AAGO,SAAS,SAAA,CAAU,MAAuB,IAAA,EAAsC;AACrF,EAAA,MAAM,GAAA,GAAM,KAAK,YAAA,IAAgB,CAAA,EAAG,KAAK,SAAS,CAAA,CAAA,EAAI,KAAK,UAAU,CAAA,CAAA;AACrE,EAAA,MAAM,GAAA,GAAM,IAAA,CAAK,SAAA,CAAU,CAAC,CAAA,KAAM;AAChC,IAAA,IAAI,EAAE,YAAA,IAAgB,IAAA,CAAK,cAAc,OAAO,CAAA,CAAE,iBAAiB,IAAA,CAAK,YAAA;AACxE,IAAA,OAAO,GAAG,CAAA,CAAE,SAAS,CAAA,CAAA,EAAI,CAAA,CAAE,UAAU,CAAA,CAAA,KAAO,GAAA;AAAA,EAC9C,CAAC,CAAA;AACD,EAAA,IAAI,OAAO,CAAA,EAAG;AACZ,IAAA,MAAM,IAAA,GAAO,CAAC,GAAG,IAAI,CAAA;AACrB,IAAA,IAAA,CAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA,EAAG,GAAG,IAAA,EAAK;AACpC,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,CAAC,GAAG,IAAA,EAAM,IAAI,CAAA;AACvB","file":"chunk-Y34YRC5T.cjs","sourcesContent":["/**\n * Streaming parser for AgentOS run endpoints.\n *\n * AgentOS streams a run as a sequence of JSON objects concatenated on the wire\n * (not strictly newline-delimited). Each object is one \"run event\". This module\n * reads the response body incrementally, extracts complete JSON objects as they\n * arrive, and hands each one to a callback.\n *\n * It supports both the legacy shape (the event object sent directly) and the\n * newer envelope shape ({ event: string, data: string | object }), normalising\n * both into a flat event object with an `event` discriminator field.\n */\n\nimport type { RunEvent } from './types'\n\n/** A parsed, normalised run event. Shape varies by `event` type — see types.ts. */\nexport interface StreamEvent {\n event: RunEvent | string\n [key: string]: unknown\n}\n\ninterface Envelope {\n event: string\n data: string | Record<string, unknown>\n}\n\nfunction isEnvelope(data: unknown): data is Envelope {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'event' in data &&\n 'data' in data &&\n typeof (data as Envelope).event === 'string'\n )\n}\n\nfunction isFlatEvent(data: unknown): data is StreamEvent {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'event' in data &&\n !('data' in data) &&\n typeof (data as StreamEvent).event === 'string'\n )\n}\n\nfunction normaliseEnvelope(env: Envelope): StreamEvent {\n let parsed: Record<string, unknown> = {}\n if (typeof env.data === 'string') {\n try {\n parsed = JSON.parse(env.data)\n } catch {\n parsed = {}\n }\n } else if (env.data && typeof env.data === 'object') {\n parsed = env.data\n }\n return { event: env.event, ...parsed }\n}\n\n/**\n * Pulls every complete JSON object out of `buffer`, emitting each via `onEvent`.\n * Returns the unconsumed tail (a partial object awaiting more bytes).\n */\nfunction drainBuffer(buffer: string, onEvent: (e: StreamEvent) => void): string {\n let start = buffer.indexOf('{')\n\n while (start !== -1 && start < buffer.length) {\n let depth = 0\n let inString = false\n let escape = false\n let end = -1\n\n for (let i = start; i < buffer.length; i++) {\n const ch = buffer[i]\n if (inString) {\n if (escape) escape = false\n else if (ch === '\\\\') escape = true\n else if (ch === '\"') inString = false\n } else if (ch === '\"') {\n inString = true\n } else if (ch === '{') {\n depth++\n } else if (ch === '}') {\n depth--\n if (depth === 0) {\n end = i\n break\n }\n }\n }\n\n if (end === -1) break // incomplete object; wait for more data\n\n const slice = buffer.slice(start, end + 1)\n try {\n const parsed = JSON.parse(slice)\n if (isEnvelope(parsed)) onEvent(normaliseEnvelope(parsed))\n else if (isFlatEvent(parsed)) onEvent(parsed)\n } catch {\n // Not valid JSON despite balanced braces — skip this opening brace.\n start = buffer.indexOf('{', start + 1)\n continue\n }\n\n // The tail may end inside a JSON string. Trimming it would delete content\n // whitespace when a network read splits the next event in the middle.\n buffer = buffer.slice(end + 1)\n start = buffer.indexOf('{')\n }\n\n return buffer\n}\n\nexport interface StreamRunOptions {\n url: string\n body: FormData | Record<string, unknown>\n headers?: Record<string, string>\n signal?: AbortSignal\n onEvent: (event: StreamEvent) => void\n onError: (error: Error) => void\n onComplete: () => void\n}\n\n/**\n * POSTs a run request and streams the response, calling `onEvent` for every\n * run event as it arrives. Resolves when the stream ends.\n */\nexport async function streamRun(options: StreamRunOptions): Promise<void> {\n const { url, body, headers = {}, signal, onEvent, onError, onComplete } = options\n let buffer = ''\n\n try {\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n ...(!(body instanceof FormData) && { 'Content-Type': 'application/json' }),\n ...headers,\n },\n body: body instanceof FormData ? body : JSON.stringify(body),\n signal,\n })\n\n if (!response.ok) {\n let detail: string\n try {\n const err = await response.json()\n detail = err?.detail ? String(err.detail) : `${response.status} ${response.statusText}`\n } catch {\n detail = `${response.status} ${response.statusText}`\n }\n throw new Error(detail)\n }\n if (!response.body) throw new Error('No response body')\n\n const reader = response.body.getReader()\n const decoder = new TextDecoder()\n\n for (;;) {\n const { done, value } = await reader.read()\n if (done) {\n buffer = drainBuffer(buffer, onEvent)\n onComplete()\n return\n }\n buffer += decoder.decode(value, { stream: true })\n buffer = drainBuffer(buffer, onEvent)\n }\n } catch (error) {\n if (error instanceof DOMException && error.name === 'AbortError') {\n onComplete()\n return\n }\n onError(error instanceof Error ? error : new Error(String(error)))\n }\n}\n","/**\n * Thin client for an AgentOS HTTP backend.\n *\n * Wraps the discovery, run, continue, cancel and session endpoints. Streaming\n * runs are handled by `streamRun` from ./stream; everything else is plain JSON.\n */\n\nimport { streamRun, type StreamEvent } from './stream'\nimport type {\n Entity,\n EntityType,\n RunEventData,\n RunResolution,\n SessionsResponse,\n} from './types'\n\n/** Normalise a base URL: add a scheme for bare hosts, strip trailing slash. */\nexport function normaliseBaseUrl(value: string | null | undefined): string {\n if (!value) return ''\n let url = value.trim()\n if (!/^https?:\\/\\//.test(url)) {\n const isLocal = url.startsWith('localhost') || /^\\d{1,3}(\\.\\d{1,3}){3}/.test(url)\n url = `${isLocal ? 'http' : 'https'}://${url}`\n }\n return url.replace(/\\/+$/, '')\n}\n\nexport interface AgnoClientOptions {\n /** AgentOS base URL, e.g. \"http://localhost:7777\". */\n baseUrl: string\n /** Optional headers (e.g. Authorization) added to every request. */\n headers?: Record<string, string>\n /** Default db_id used for session listing where the backend requires it. */\n dbId?: string\n}\n\ninterface RunArgs {\n type: EntityType\n id: string\n message?: string\n sessionId?: string\n userId?: string\n files?: File[]\n /** Extra form fields appended verbatim. */\n extra?: Record<string, string>\n signal?: AbortSignal\n onEvent: (event: RunEventData) => void\n onError: (error: Error) => void\n onComplete: () => void\n}\n\ninterface ContinueArgs extends RunResolution {\n type: EntityType\n id: string\n runId: string\n sessionId?: string\n userId?: string\n signal?: AbortSignal\n onEvent: (event: RunEventData) => void\n onError: (error: Error) => void\n onComplete: () => void\n}\n\nconst RUN_PATH: Record<EntityType, string> = {\n agent: 'agents',\n team: 'teams',\n workflow: 'workflows',\n}\n\nexport class AgnoClient {\n readonly baseUrl: string\n readonly headers: Record<string, string>\n readonly dbId?: string\n\n constructor(options: AgnoClientOptions) {\n this.baseUrl = normaliseBaseUrl(options.baseUrl)\n this.headers = options.headers ?? {}\n this.dbId = options.dbId\n }\n\n private async getJson<T>(path: string): Promise<T> {\n const res = await fetch(`${this.baseUrl}${path}`, { headers: this.headers })\n if (!res.ok) throw new Error(`GET ${path} failed: ${res.status} ${res.statusText}`)\n return res.json() as Promise<T>\n }\n\n /** Liveness check against /health. Returns the HTTP status code. */\n async health(): Promise<number> {\n try {\n const res = await fetch(`${this.baseUrl}/health`, { headers: this.headers })\n return res.status\n } catch {\n return 0\n }\n }\n\n /* ----------------------------- discovery ----------------------------- */\n\n async getAgents(): Promise<Entity[]> {\n const data = await this.getJson<any[]>('/agents').catch(() => [])\n return data.map((a) => ({\n type: 'agent' as const,\n id: a.agent_id ?? a.id,\n name: a.name ?? a.agent_id ?? a.id,\n description: a.description,\n model: a.model,\n db_id: a.db_id,\n }))\n }\n\n async getTeams(): Promise<Entity[]> {\n const data = await this.getJson<any[]>('/teams').catch(() => [])\n return data.map((t) => ({\n type: 'team' as const,\n id: t.team_id ?? t.id,\n name: t.name ?? t.team_id ?? t.id,\n description: t.description,\n model: t.model,\n db_id: t.db_id,\n }))\n }\n\n async getWorkflows(): Promise<Entity[]> {\n const data = await this.getJson<any[]>('/workflows').catch(() => [])\n return data.map((w) => ({\n type: 'workflow' as const,\n id: w.workflow_id ?? w.id,\n name: w.name ?? w.workflow_id ?? w.id,\n description: w.description,\n model: w.model,\n db_id: w.db_id,\n }))\n }\n\n /** All runnable entities (agents, teams, workflows) in one list. */\n async getEntities(): Promise<Entity[]> {\n const [agents, teams, workflows] = await Promise.all([\n this.getAgents(),\n this.getTeams(),\n this.getWorkflows(),\n ])\n return [...agents, ...teams, ...workflows]\n }\n\n /* ------------------------------ sessions ----------------------------- */\n\n async getSessions(type: EntityType, componentId: string, dbId?: string): Promise<SessionsResponse> {\n const url = new URL(`${this.baseUrl}/sessions`)\n url.searchParams.set('type', type)\n url.searchParams.set('component_id', componentId)\n const db = dbId ?? this.dbId\n if (db) url.searchParams.set('db_id', db)\n try {\n const res = await fetch(url.toString(), { headers: this.headers })\n if (!res.ok) return { data: [] }\n return (await res.json()) as SessionsResponse\n } catch {\n return { data: [] }\n }\n }\n\n /** Runs (with messages/tools/events) for a session — used to rehydrate chat history. */\n async getSessionRuns(type: EntityType, sessionId: string, dbId?: string): Promise<any[]> {\n const url = new URL(`${this.baseUrl}/sessions/${sessionId}/runs`)\n url.searchParams.set('type', type)\n const db = dbId ?? this.dbId\n if (db) url.searchParams.set('db_id', db)\n const res = await fetch(url.toString(), { headers: this.headers })\n if (!res.ok) throw new Error(`Failed to load session: ${res.statusText}`)\n return res.json()\n }\n\n async deleteSession(sessionId: string, dbId?: string): Promise<boolean> {\n const url = new URL(`${this.baseUrl}/sessions/${sessionId}`)\n const db = dbId ?? this.dbId\n if (db) url.searchParams.set('db_id', db)\n const res = await fetch(url.toString(), { method: 'DELETE', headers: this.headers })\n return res.ok\n }\n\n /* -------------------------------- runs ------------------------------- */\n\n /** Start a streaming run for an agent, team or workflow. */\n async run(args: RunArgs): Promise<void> {\n const form = new FormData()\n if (args.message != null) form.append('message', args.message)\n form.append('stream', 'true')\n if (args.sessionId) form.append('session_id', args.sessionId)\n if (args.userId) form.append('user_id', args.userId)\n for (const file of args.files ?? []) form.append('files', file)\n for (const [k, v] of Object.entries(args.extra ?? {})) form.append(k, v)\n\n const url = `${this.baseUrl}/${RUN_PATH[args.type]}/${args.id}/runs`\n return streamRun({\n url,\n body: form,\n headers: this.headers,\n signal: args.signal,\n onEvent: (e) => args.onEvent(e as RunEventData),\n onError: args.onError,\n onComplete: args.onComplete,\n })\n }\n\n /** Continue a paused run (resolving a human-in-the-loop requirement). */\n async continueRun(args: ContinueArgs): Promise<void> {\n const form = new FormData()\n form.append('stream', 'true')\n if (args.sessionId) form.append('session_id', args.sessionId)\n if (args.userId) form.append('user_id', args.userId)\n\n if (args.type === 'workflow') {\n if (args.stepRequirements) form.append('step_requirements', JSON.stringify(args.stepRequirements))\n } else if (args.requirements) {\n form.append('requirements', JSON.stringify(args.requirements))\n } else if (args.tools) {\n form.append('tools', JSON.stringify(args.tools))\n }\n\n const url = `${this.baseUrl}/${RUN_PATH[args.type]}/${args.id}/runs/${args.runId}/continue`\n return streamRun({\n url,\n body: form,\n headers: this.headers,\n signal: args.signal,\n onEvent: (e) => args.onEvent(e as RunEventData),\n onError: args.onError,\n onComplete: args.onComplete,\n })\n }\n\n /** Cancel an in-flight run. */\n async cancelRun(type: EntityType, id: string, runId: string, sessionId?: string): Promise<boolean> {\n const url = new URL(`${this.baseUrl}/${RUN_PATH[type]}/${id}/runs/${runId}/cancel`)\n if (sessionId) url.searchParams.set('session_id', sessionId)\n try {\n const res = await fetch(url.toString(), { method: 'POST', headers: this.headers })\n return res.ok\n } catch {\n return false\n }\n }\n}\n\nexport type { StreamEvent }\n","/**\n * Helpers for turning AgentOS session history into render-ready chat messages.\n *\n * `GET /sessions/{id}/runs` returns an array of run records. Each run carries\n * the user input plus the agent's content, tools, reasoning, references and\n * media — enough to reconstruct the transcript for a past session.\n */\n\nimport type { ChatMessage, ReasoningStep, ReferenceData, RunEventData, ToolExecution } from './types'\n\ninterface SessionRun {\n run_id?: string\n session_id?: string\n run_input?: unknown\n content?: unknown\n created_at?: number\n status?: string\n /** Present when the agent was configured with `store_events`. */\n events?: RunEventData[]\n tools?: ToolExecution[]\n images?: ChatMessage['images']\n videos?: ChatMessage['videos']\n audio?: ChatMessage['audio']\n response_audio?: ChatMessage['response_audio']\n extra_data?: {\n reasoning_steps?: ReasoningStep[]\n references?: ReferenceData[]\n }\n reasoning_steps?: ReasoningStep[]\n references?: ReferenceData[]\n followups?: string[]\n}\n\nfunction toText(value: unknown): string {\n if (value == null) return ''\n if (typeof value === 'string') return value\n // Some inputs/outputs arrive as content-part arrays or objects.\n if (Array.isArray(value)) {\n return value\n .map((part) =>\n part && typeof part === 'object' && 'text' in part ? String((part as { text: unknown }).text) : '',\n )\n .filter(Boolean)\n .join(' ')\n }\n if (typeof value === 'object') {\n const obj = value as Record<string, unknown>\n if (typeof obj.input_content === 'string') return obj.input_content\n if (typeof obj.message === 'string') return obj.message\n if (typeof obj.content === 'string') return obj.content\n return '```json\\n' + JSON.stringify(value, null, 2) + '\\n```'\n }\n return String(value)\n}\n\nlet seq = 0\nconst id = (prefix: string) => `${prefix}-${seq++}`\n\n/** Convert the runs of a session into an ordered list of chat messages. */\nexport function sessionRunsToMessages(runs: SessionRun[]): ChatMessage[] {\n if (!Array.isArray(runs)) return []\n const messages: ChatMessage[] = []\n\n for (const run of runs) {\n const created = run.created_at ?? Math.floor(Date.now() / 1000)\n\n const userContent = toText(run.run_input)\n if (userContent) {\n messages.push({\n id: id('hist-u'),\n role: 'user',\n content: userContent,\n created_at: created,\n })\n }\n\n messages.push({\n id: id('hist-a'),\n role: 'agent',\n content: toText(run.content),\n created_at: created,\n status: 'completed',\n run_id: run.run_id,\n session_id: run.session_id,\n tool_calls: run.tools && run.tools.length ? run.tools : undefined,\n // Stored events let the behind-the-scenes panel look the same in history\n // as it does live.\n events: run.events && run.events.length ? run.events : undefined,\n reasoning_steps: run.reasoning_steps ?? run.extra_data?.reasoning_steps,\n references: run.references ?? run.extra_data?.references,\n followups: run.followups && run.followups.length ? run.followups : undefined,\n images: run.images,\n videos: run.videos,\n audio: run.audio,\n response_audio: run.response_audio,\n })\n }\n\n return messages\n}\n","/**\n * Helpers for classifying run events and turning them into UI labels.\n *\n * Agent, team and workflow events share shapes but use different name prefixes\n * (e.g. `RunContent` vs `TeamRunContent`). These helpers let the rest of the\n * library treat them uniformly.\n */\n\nimport type { ChatMessage, ReasoningStep, RunEventData, SubRun, ToolExecution, WorkflowStep } from './types'\n\nconst name = (e: RunEventData): string => String(e.event ?? '')\n\nexport const isStartedEvent = (e: RunEventData): boolean =>\n name(e) === 'RunStarted' ||\n name(e) === 'TeamRunStarted' ||\n name(e) === 'WorkflowStarted' ||\n name(e) === 'ReasoningStarted' ||\n name(e) === 'TeamReasoningStarted'\n\nexport const isContentEvent = (e: RunEventData): boolean =>\n name(e) === 'RunContent' || name(e) === 'TeamRunContent' || name(e) === 'WorkflowAgentCompleted'\n\nexport const isContentCompletedEvent = (e: RunEventData): boolean =>\n name(e) === 'RunContentCompleted' || name(e) === 'TeamRunContentCompleted'\n\nexport const isCompletedEvent = (e: RunEventData): boolean =>\n name(e) === 'RunCompleted' ||\n name(e) === 'TeamRunCompleted' ||\n name(e) === 'WorkflowCompleted'\n\nexport const isErrorEvent = (e: RunEventData): boolean =>\n name(e) === 'RunError' ||\n name(e) === 'TeamRunError' ||\n name(e) === 'WorkflowError' ||\n name(e) === 'StepError' ||\n name(e) === 'ToolCallError' ||\n name(e) === 'TeamToolCallError'\n\nexport const isCancelledEvent = (e: RunEventData): boolean =>\n name(e) === 'RunCancelled' ||\n name(e) === 'TeamRunCancelled' ||\n name(e) === 'WorkflowCancelled'\n\nexport const isPausedEvent = (e: RunEventData): boolean =>\n name(e) === 'RunPaused' ||\n name(e) === 'TeamRunPaused' ||\n name(e) === 'WorkflowPaused' ||\n name(e) === 'StepPaused' ||\n name(e) === 'RouterPaused' ||\n name(e) === 'ConditionPaused'\n\nexport const isToolStartedEvent = (e: RunEventData): boolean =>\n name(e) === 'ToolCallStarted' || name(e) === 'TeamToolCallStarted'\n\nexport const isToolCompletedEvent = (e: RunEventData): boolean =>\n name(e) === 'ToolCallCompleted' || name(e) === 'TeamToolCallCompleted'\n\nexport const isToolEvent = (e: RunEventData): boolean =>\n isToolStartedEvent(e) || isToolCompletedEvent(e) || name(e) === 'ToolCallError' || name(e) === 'TeamToolCallError'\n\nexport const isReasoningStepEvent = (e: RunEventData): boolean =>\n name(e) === 'ReasoningStep' || name(e) === 'TeamReasoningStep'\n\nexport const isReasoningCompletedEvent = (e: RunEventData): boolean =>\n name(e) === 'ReasoningCompleted' || name(e) === 'TeamReasoningCompleted'\n\n/** Read both legacy fields and the SDK's typed reasoning event content. */\nexport function reasoningStepsFromEvent(e: RunEventData): ReasoningStep[] {\n const legacy = e.reasoning_steps ?? e.extra_data?.reasoning_steps\n if (legacy?.length) return legacy\n if (!isReasoningStepEvent(e) && !isReasoningCompletedEvent(e)) return []\n const content = e.content\n if (!content || typeof content !== 'object' || Array.isArray(content)) return []\n if ('reasoning_steps' in content && Array.isArray(content.reasoning_steps)) {\n return content.reasoning_steps.filter(isReasoningStep)\n }\n return isReasoningStep(content) ? [content] : []\n}\n\nfunction isReasoningStep(value: unknown): value is ReasoningStep {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false\n const fields = ['title', 'action', 'result', 'reasoning', 'next_action']\n return fields.some((key) => typeof Reflect.get(value, key) === 'string') &&\n fields.every((key) => Reflect.get(value, key) == null || typeof Reflect.get(value, key) === 'string') &&\n (!('confidence' in value) || value.confidence == null || typeof value.confidence === 'number')\n}\n\n/** The follow-up prompts an agent built with `followups=True` suggests. */\nexport const isFollowupsCompletedEvent = (e: RunEventData): boolean =>\n name(e) === 'FollowupsCompleted' || name(e) === 'TeamFollowupsCompleted'\n\n/**\n * A nested-run event — a team member's turn or a workflow step executor.\n * Identified by a `parent_run_id` on an agent/team content/tool/run event.\n */\nexport function isSubRunEvent(e: RunEventData): boolean {\n if (!e.parent_run_id) return false\n const ev = name(e)\n return (\n isContentEvent(e) ||\n isToolEvent(e) ||\n isCompletedEvent(e) ||\n isErrorEvent(e) ||\n ev === 'RunStarted' ||\n ev === 'TeamRunStarted'\n )\n}\n\n/** A workflow step lifecycle event (start / output / complete / error). */\nexport function isStepEvent(e: RunEventData): boolean {\n const ev = name(e)\n return ev === 'StepStarted' || ev === 'StepCompleted' || ev === 'StepOutput' || ev === 'StepError'\n}\n\n/** Tool executions carried by an event, from either the single or array field. */\nexport function toolsFromEvent(e: RunEventData): ToolExecution[] {\n const out: ToolExecution[] = []\n if (e.tool) out.push(e.tool)\n if (Array.isArray(e.tools)) out.push(...e.tools)\n return out\n}\n\n/** Apply a content chunk and its related metadata to a message. */\nexport function applyContentEvent(message: ChatMessage, e: RunEventData): ChatMessage {\n const next: ChatMessage = { ...message }\n\n if (typeof e.content === 'string' && e.content) {\n next.content = message.content + e.content\n } else if (e.content && typeof e.content === 'object') {\n next.content = message.content + '\\n```json\\n' + JSON.stringify(e.content, null, 2) + '\\n```\\n'\n }\n\n if (e.reasoning_steps?.length) next.reasoning_steps = e.reasoning_steps\n if (e.extra_data?.reasoning_steps?.length) next.reasoning_steps = e.extra_data.reasoning_steps\n if (e.references?.length) next.references = e.references\n if (e.extra_data?.references?.length) next.references = e.extra_data.references\n if (e.citations) next.citations = e.citations\n\n const tools = toolsFromEvent(e)\n if (tools.length) {\n let toolCalls = message.tool_calls ?? []\n for (const tool of tools) toolCalls = mergeTool(toolCalls, tool)\n next.tool_calls = toolCalls\n }\n\n if (e.images?.length) next.images = e.images\n if (e.videos?.length) next.videos = e.videos\n if (e.audio?.length) next.audio = e.audio\n if (e.response_audio?.transcript) {\n next.response_audio = {\n ...message.response_audio,\n transcript: (message.response_audio?.transcript ?? '') + e.response_audio.transcript,\n }\n }\n\n return next\n}\n\n/**\n * A short human-readable label describing what a run is doing at the moment of\n * this event — for a live status line (\"Calling get_weather\", \"Reasoning…\").\n * Returns null for events that don't warrant a status change.\n */\nexport function activityLabel(e: RunEventData): string | null {\n const ev = name(e)\n switch (ev) {\n case 'RunStarted':\n case 'TeamRunStarted':\n case 'WorkflowStarted':\n return 'Thinking'\n case 'ModelRequestStarted':\n case 'TeamModelRequestStarted':\n return 'Generating'\n case 'ReasoningStarted':\n case 'TeamReasoningStarted':\n case 'ReasoningStep':\n case 'TeamReasoningStep':\n case 'ReasoningContentDelta':\n case 'TeamReasoningContentDelta':\n return 'Reasoning'\n case 'MemoryUpdateStarted':\n case 'TeamMemoryUpdateStarted':\n return 'Updating memory'\n case 'SessionSummaryStarted':\n case 'TeamSessionSummaryStarted':\n return 'Summarising session'\n case 'CompressionStarted':\n return 'Compressing context'\n case 'ToolCallStarted':\n case 'TeamToolCallStarted': {\n const tool = e.tool?.tool_name\n return tool ? `Calling ${tool}` : 'Calling tool'\n }\n case 'ToolCallCompleted':\n case 'TeamToolCallCompleted':\n return 'Generating'\n case 'StepStarted':\n return e.step_name ? `Running step: ${e.step_name}` : 'Running step'\n case 'LoopIterationStarted':\n return `Loop iteration ${e.iteration ?? ''}`.trim()\n case 'ParallelExecutionStarted':\n return 'Running parallel steps'\n case 'RouterExecutionStarted':\n return 'Routing'\n case 'ConditionExecutionStarted':\n return 'Evaluating condition'\n default:\n return null\n }\n}\n\nfunction textOf(value: unknown): string | undefined {\n if (typeof value === 'string') return value\n if (value && typeof value === 'object') return '```json\\n' + JSON.stringify(value, null, 2) + '\\n```'\n return undefined\n}\n\n/** Apply a nested member/executor run event into a message's `members`. */\nexport function applySubRunEvent(\n message: ChatMessage,\n e: RunEventData,\n kind: SubRun['kind'],\n): ChatMessage {\n const rid = e.run_id || e.parent_run_id || 'sub'\n const members = message.members ? [...message.members] : []\n const idx = members.findIndex((s) => s.run_id === rid)\n const base: SubRun = idx >= 0 ? { ...members[idx] } : { run_id: rid, kind, content: '', status: 'running' }\n\n base.name = base.name || (e.agent_name as string) || (e.team_name as string) || (e.agent_id as string)\n\n const tools = toolsFromEvent(e)\n if (tools.length) {\n let tc = base.tool_calls ?? []\n for (const t of tools) tc = mergeTool(tc, t)\n base.tool_calls = tc\n }\n\n if (isErrorEvent(e)) {\n base.status = 'error'\n } else if (isCompletedEvent(e)) {\n base.status = 'completed'\n const final = textOf(e.content)\n if (final) base.content = final\n } else if (isContentEvent(e)) {\n const delta = typeof e.content === 'string' ? e.content : ''\n if (delta) base.content += delta\n }\n\n if (idx >= 0) members[idx] = base\n else members.push(base)\n return { ...message, members }\n}\n\n/** Apply a workflow `Step*` event into a message's `steps`. */\nexport function applyStepEvent(message: ChatMessage, e: RunEventData): ChatMessage {\n const ev = name(e)\n const key = (e.step_name as string) || `step-${JSON.stringify(e.step_index ?? '')}`\n const steps = message.steps ? [...message.steps] : []\n const idx = steps.findIndex((s) => s.key === key)\n const step: WorkflowStep =\n idx >= 0\n ? { ...steps[idx] }\n : { key, name: e.step_name, index: e.step_index, status: 'running' }\n\n if (ev === 'StepStarted') {\n step.status = 'running'\n } else if (ev === 'StepError') {\n step.status = 'error'\n step.error = e.error || (typeof e.content === 'string' ? e.content : undefined)\n } else {\n // StepCompleted / StepOutput\n step.status = 'completed'\n const stepResponse = (e.step_response ?? e.step_output) as { content?: unknown } | undefined\n const content = textOf(e.content) ?? textOf(stepResponse?.content)\n if (content) step.content = content\n }\n\n if (idx >= 0) steps[idx] = step\n else steps.push(step)\n return { ...message, steps }\n}\n\n/** Merge a tool execution into a list, updating an existing entry by id/name. */\nexport function mergeTool(list: ToolExecution[], tool: ToolExecution): ToolExecution[] {\n const key = tool.tool_call_id || `${tool.tool_name}-${tool.created_at}`\n const idx = list.findIndex((t) => {\n if (t.tool_call_id && tool.tool_call_id) return t.tool_call_id === tool.tool_call_id\n return `${t.tool_name}-${t.created_at}` === key\n })\n if (idx >= 0) {\n const next = [...list]\n next[idx] = { ...next[idx], ...tool }\n return next\n }\n return [...list, tool]\n}\n"]}
|
|
@@ -131,12 +131,12 @@ interface ToolExecution {
|
|
|
131
131
|
content?: string | null;
|
|
132
132
|
}
|
|
133
133
|
interface ReasoningStep {
|
|
134
|
-
title?: string;
|
|
135
|
-
action?: string;
|
|
136
|
-
result?: string;
|
|
137
|
-
reasoning?: string;
|
|
138
|
-
confidence?: number;
|
|
139
|
-
next_action?: string;
|
|
134
|
+
title?: string | null;
|
|
135
|
+
action?: string | null;
|
|
136
|
+
result?: string | null;
|
|
137
|
+
reasoning?: string | null;
|
|
138
|
+
confidence?: number | null;
|
|
139
|
+
next_action?: string | null;
|
|
140
140
|
}
|
|
141
141
|
interface Reference {
|
|
142
142
|
content: string;
|
|
@@ -212,6 +212,7 @@ interface RunEventData {
|
|
|
212
212
|
iteration?: number;
|
|
213
213
|
max_iterations?: number;
|
|
214
214
|
requirements?: RunRequirement[];
|
|
215
|
+
step_requirements?: StepRequirement[];
|
|
215
216
|
requires_confirmation?: boolean;
|
|
216
217
|
confirmation_message?: string;
|
|
217
218
|
requires_user_input?: boolean;
|
|
@@ -243,8 +244,22 @@ interface RunRequirement {
|
|
|
243
244
|
external_execution_result?: string;
|
|
244
245
|
member_agent_id?: string;
|
|
245
246
|
member_agent_name?: string;
|
|
247
|
+
member_run_id?: string;
|
|
246
248
|
pause_type?: PauseType;
|
|
247
249
|
}
|
|
250
|
+
interface RunResolution {
|
|
251
|
+
tools?: ToolExecution[];
|
|
252
|
+
requirements?: RunRequirement[];
|
|
253
|
+
stepRequirements?: unknown[];
|
|
254
|
+
}
|
|
255
|
+
interface StepRequirement {
|
|
256
|
+
step_id: string;
|
|
257
|
+
step_name?: string;
|
|
258
|
+
requires_confirmation?: boolean;
|
|
259
|
+
confirmed?: boolean | null;
|
|
260
|
+
confirmation_message?: string;
|
|
261
|
+
[key: string]: unknown;
|
|
262
|
+
}
|
|
248
263
|
type ChatRole = 'user' | 'agent' | 'system';
|
|
249
264
|
type ChatStatus = 'idle' | 'streaming' | 'paused' | 'completed' | 'error' | 'cancelled';
|
|
250
265
|
type SubRunStatus = 'running' | 'completed' | 'error';
|
|
@@ -300,6 +315,7 @@ interface ChatMessage {
|
|
|
300
315
|
activity?: string;
|
|
301
316
|
/** Pause requirements when the run is waiting for a human. */
|
|
302
317
|
requirements?: RunRequirement[];
|
|
318
|
+
step_requirements?: StepRequirement[];
|
|
303
319
|
/** Team member turns / workflow step executors (nested runs). */
|
|
304
320
|
members?: SubRun[];
|
|
305
321
|
/** Workflow steps and their outputs. */
|
|
@@ -370,16 +386,12 @@ interface RunArgs {
|
|
|
370
386
|
onError: (error: Error) => void;
|
|
371
387
|
onComplete: () => void;
|
|
372
388
|
}
|
|
373
|
-
interface ContinueArgs {
|
|
389
|
+
interface ContinueArgs extends RunResolution {
|
|
374
390
|
type: EntityType;
|
|
375
391
|
id: string;
|
|
376
392
|
runId: string;
|
|
377
393
|
sessionId?: string;
|
|
378
394
|
userId?: string;
|
|
379
|
-
/** Resolved tool executions (agents/teams human-in-the-loop). */
|
|
380
|
-
tools?: ToolExecution[];
|
|
381
|
-
/** Resolved step requirements (workflow human-in-the-loop). */
|
|
382
|
-
stepRequirements?: unknown[];
|
|
383
395
|
signal?: AbortSignal;
|
|
384
396
|
onEvent: (event: RunEventData) => void;
|
|
385
397
|
onError: (error: Error) => void;
|
|
@@ -410,4 +422,4 @@ declare class AgnoClient {
|
|
|
410
422
|
cancelRun(type: EntityType, id: string, runId: string, sessionId?: string): Promise<boolean>;
|
|
411
423
|
}
|
|
412
424
|
|
|
413
|
-
export { AgnoClient as A, type ChatMessage as C, type Entity as E, type ImageData as I, type Model as M, type Pagination as P, type ReasoningStep as R, type SessionEntry as S, TeamRunEvent as T, type UserInputField as U, type VideoData as V, WorkflowRunEvent as W, type AgnoClientOptions as a, type AnyRunEventName as b, type AudioData as c, type ChatRole as d, type ChatStatus as e, type Citations as f, type EntityType as g, type PauseType as h, type Reference as i, type ReferenceData as j, RunEvent as k, type RunEventData as l, type RunRequirement as m, type
|
|
425
|
+
export { AgnoClient as A, type ChatMessage as C, type Entity as E, type ImageData as I, type Model as M, type Pagination as P, type ReasoningStep as R, type SessionEntry as S, TeamRunEvent as T, type UserInputField as U, type VideoData as V, WorkflowRunEvent as W, type AgnoClientOptions as a, type AnyRunEventName as b, type AudioData as c, type ChatRole as d, type ChatStatus as e, type Citations as f, type EntityType as g, type PauseType as h, type Reference as i, type ReferenceData as j, RunEvent as k, type RunEventData as l, type RunRequirement as m, type RunResolution as n, type SessionsResponse as o, type StepRequirement as p, type SubRun as q, type SubRunStatus as r, type ToolExecution as s, type WorkflowStep as t, normaliseBaseUrl as u };
|
|
@@ -131,12 +131,12 @@ interface ToolExecution {
|
|
|
131
131
|
content?: string | null;
|
|
132
132
|
}
|
|
133
133
|
interface ReasoningStep {
|
|
134
|
-
title?: string;
|
|
135
|
-
action?: string;
|
|
136
|
-
result?: string;
|
|
137
|
-
reasoning?: string;
|
|
138
|
-
confidence?: number;
|
|
139
|
-
next_action?: string;
|
|
134
|
+
title?: string | null;
|
|
135
|
+
action?: string | null;
|
|
136
|
+
result?: string | null;
|
|
137
|
+
reasoning?: string | null;
|
|
138
|
+
confidence?: number | null;
|
|
139
|
+
next_action?: string | null;
|
|
140
140
|
}
|
|
141
141
|
interface Reference {
|
|
142
142
|
content: string;
|
|
@@ -212,6 +212,7 @@ interface RunEventData {
|
|
|
212
212
|
iteration?: number;
|
|
213
213
|
max_iterations?: number;
|
|
214
214
|
requirements?: RunRequirement[];
|
|
215
|
+
step_requirements?: StepRequirement[];
|
|
215
216
|
requires_confirmation?: boolean;
|
|
216
217
|
confirmation_message?: string;
|
|
217
218
|
requires_user_input?: boolean;
|
|
@@ -243,8 +244,22 @@ interface RunRequirement {
|
|
|
243
244
|
external_execution_result?: string;
|
|
244
245
|
member_agent_id?: string;
|
|
245
246
|
member_agent_name?: string;
|
|
247
|
+
member_run_id?: string;
|
|
246
248
|
pause_type?: PauseType;
|
|
247
249
|
}
|
|
250
|
+
interface RunResolution {
|
|
251
|
+
tools?: ToolExecution[];
|
|
252
|
+
requirements?: RunRequirement[];
|
|
253
|
+
stepRequirements?: unknown[];
|
|
254
|
+
}
|
|
255
|
+
interface StepRequirement {
|
|
256
|
+
step_id: string;
|
|
257
|
+
step_name?: string;
|
|
258
|
+
requires_confirmation?: boolean;
|
|
259
|
+
confirmed?: boolean | null;
|
|
260
|
+
confirmation_message?: string;
|
|
261
|
+
[key: string]: unknown;
|
|
262
|
+
}
|
|
248
263
|
type ChatRole = 'user' | 'agent' | 'system';
|
|
249
264
|
type ChatStatus = 'idle' | 'streaming' | 'paused' | 'completed' | 'error' | 'cancelled';
|
|
250
265
|
type SubRunStatus = 'running' | 'completed' | 'error';
|
|
@@ -300,6 +315,7 @@ interface ChatMessage {
|
|
|
300
315
|
activity?: string;
|
|
301
316
|
/** Pause requirements when the run is waiting for a human. */
|
|
302
317
|
requirements?: RunRequirement[];
|
|
318
|
+
step_requirements?: StepRequirement[];
|
|
303
319
|
/** Team member turns / workflow step executors (nested runs). */
|
|
304
320
|
members?: SubRun[];
|
|
305
321
|
/** Workflow steps and their outputs. */
|
|
@@ -370,16 +386,12 @@ interface RunArgs {
|
|
|
370
386
|
onError: (error: Error) => void;
|
|
371
387
|
onComplete: () => void;
|
|
372
388
|
}
|
|
373
|
-
interface ContinueArgs {
|
|
389
|
+
interface ContinueArgs extends RunResolution {
|
|
374
390
|
type: EntityType;
|
|
375
391
|
id: string;
|
|
376
392
|
runId: string;
|
|
377
393
|
sessionId?: string;
|
|
378
394
|
userId?: string;
|
|
379
|
-
/** Resolved tool executions (agents/teams human-in-the-loop). */
|
|
380
|
-
tools?: ToolExecution[];
|
|
381
|
-
/** Resolved step requirements (workflow human-in-the-loop). */
|
|
382
|
-
stepRequirements?: unknown[];
|
|
383
395
|
signal?: AbortSignal;
|
|
384
396
|
onEvent: (event: RunEventData) => void;
|
|
385
397
|
onError: (error: Error) => void;
|
|
@@ -410,4 +422,4 @@ declare class AgnoClient {
|
|
|
410
422
|
cancelRun(type: EntityType, id: string, runId: string, sessionId?: string): Promise<boolean>;
|
|
411
423
|
}
|
|
412
424
|
|
|
413
|
-
export { AgnoClient as A, type ChatMessage as C, type Entity as E, type ImageData as I, type Model as M, type Pagination as P, type ReasoningStep as R, type SessionEntry as S, TeamRunEvent as T, type UserInputField as U, type VideoData as V, WorkflowRunEvent as W, type AgnoClientOptions as a, type AnyRunEventName as b, type AudioData as c, type ChatRole as d, type ChatStatus as e, type Citations as f, type EntityType as g, type PauseType as h, type Reference as i, type ReferenceData as j, RunEvent as k, type RunEventData as l, type RunRequirement as m, type
|
|
425
|
+
export { AgnoClient as A, type ChatMessage as C, type Entity as E, type ImageData as I, type Model as M, type Pagination as P, type ReasoningStep as R, type SessionEntry as S, TeamRunEvent as T, type UserInputField as U, type VideoData as V, WorkflowRunEvent as W, type AgnoClientOptions as a, type AnyRunEventName as b, type AudioData as c, type ChatRole as d, type ChatStatus as e, type Citations as f, type EntityType as g, type PauseType as h, type Reference as i, type ReferenceData as j, RunEvent as k, type RunEventData as l, type RunRequirement as m, type RunResolution as n, type SessionsResponse as o, type StepRequirement as p, type SubRun as q, type SubRunStatus as r, type ToolExecution as s, type WorkflowStep as t, normaliseBaseUrl as u };
|
package/dist/core/index.cjs
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkHBSF434L_cjs = require('../chunk-HBSF434L.cjs');
|
|
5
|
+
var chunkY34YRC5T_cjs = require('../chunk-Y34YRC5T.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "RunEvent", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkHBSF434L_cjs.RunEvent; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "TeamRunEvent", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkHBSF434L_cjs.TeamRunEvent; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "WorkflowRunEvent", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkHBSF434L_cjs.WorkflowRunEvent; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "AgnoClient", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkY34YRC5T_cjs.AgnoClient; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "activityLabel", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkY34YRC5T_cjs.activityLabel; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "applyStepEvent", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkY34YRC5T_cjs.applyStepEvent; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "applySubRunEvent", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkY34YRC5T_cjs.applySubRunEvent; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "isCompletedEvent", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkY34YRC5T_cjs.isCompletedEvent; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "isContentEvent", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkY34YRC5T_cjs.isContentEvent; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "isErrorEvent", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkY34YRC5T_cjs.isErrorEvent; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "isFollowupsCompletedEvent", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkY34YRC5T_cjs.isFollowupsCompletedEvent; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "isPausedEvent", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkY34YRC5T_cjs.isPausedEvent; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "isReasoningStepEvent", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkY34YRC5T_cjs.isReasoningStepEvent; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "isStepEvent", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkY34YRC5T_cjs.isStepEvent; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "isSubRunEvent", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkY34YRC5T_cjs.isSubRunEvent; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "isToolEvent", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkY34YRC5T_cjs.isToolEvent; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "mergeTool", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkY34YRC5T_cjs.mergeTool; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "normaliseBaseUrl", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkY34YRC5T_cjs.normaliseBaseUrl; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "sessionRunsToMessages", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkY34YRC5T_cjs.sessionRunsToMessages; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "streamRun", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkY34YRC5T_cjs.streamRun; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "toolsFromEvent", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkY34YRC5T_cjs.toolsFromEvent; }
|
|
92
92
|
});
|
|
93
93
|
//# sourceMappingURL=index.cjs.map
|
|
94
94
|
//# sourceMappingURL=index.cjs.map
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RunEvent, l as RunEventData,
|
|
2
|
-
export { A as AgnoClient, a as AgnoClientOptions, b as AnyRunEventName, c as AudioData, d as ChatRole, e as ChatStatus, f as Citations, E as Entity, g as EntityType, I as ImageData, M as Model, P as Pagination, h as PauseType, i as Reference, m as RunRequirement, S as SessionEntry,
|
|
1
|
+
import { k as RunEvent, l as RunEventData, s as ToolExecution, C as ChatMessage, R as ReasoningStep, j as ReferenceData, q as SubRun } from '../client-Dwk6ThnW.cjs';
|
|
2
|
+
export { A as AgnoClient, a as AgnoClientOptions, b as AnyRunEventName, c as AudioData, d as ChatRole, e as ChatStatus, f as Citations, E as Entity, g as EntityType, I as ImageData, M as Model, P as Pagination, h as PauseType, i as Reference, m as RunRequirement, n as RunResolution, S as SessionEntry, o as SessionsResponse, p as StepRequirement, r as SubRunStatus, T as TeamRunEvent, U as UserInputField, V as VideoData, W as WorkflowRunEvent, t as WorkflowStep, u as normaliseBaseUrl } from '../client-Dwk6ThnW.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Streaming parser for AgentOS run endpoints.
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RunEvent, l as RunEventData,
|
|
2
|
-
export { A as AgnoClient, a as AgnoClientOptions, b as AnyRunEventName, c as AudioData, d as ChatRole, e as ChatStatus, f as Citations, E as Entity, g as EntityType, I as ImageData, M as Model, P as Pagination, h as PauseType, i as Reference, m as RunRequirement, S as SessionEntry,
|
|
1
|
+
import { k as RunEvent, l as RunEventData, s as ToolExecution, C as ChatMessage, R as ReasoningStep, j as ReferenceData, q as SubRun } from '../client-Dwk6ThnW.js';
|
|
2
|
+
export { A as AgnoClient, a as AgnoClientOptions, b as AnyRunEventName, c as AudioData, d as ChatRole, e as ChatStatus, f as Citations, E as Entity, g as EntityType, I as ImageData, M as Model, P as Pagination, h as PauseType, i as Reference, m as RunRequirement, n as RunResolution, S as SessionEntry, o as SessionsResponse, p as StepRequirement, r as SubRunStatus, T as TeamRunEvent, U as UserInputField, V as VideoData, W as WorkflowRunEvent, t as WorkflowStep, u as normaliseBaseUrl } from '../client-Dwk6ThnW.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Streaming parser for AgentOS run endpoints.
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { RunEvent, TeamRunEvent, WorkflowRunEvent } from '../chunk-
|
|
3
|
-
export { AgnoClient, activityLabel, applyStepEvent, applySubRunEvent, isCompletedEvent, isContentEvent, isErrorEvent, isFollowupsCompletedEvent, isPausedEvent, isReasoningStepEvent, isStepEvent, isSubRunEvent, isToolEvent, mergeTool, normaliseBaseUrl, sessionRunsToMessages, streamRun, toolsFromEvent } from '../chunk-
|
|
2
|
+
export { RunEvent, TeamRunEvent, WorkflowRunEvent } from '../chunk-5QKU7OPE.js';
|
|
3
|
+
export { AgnoClient, activityLabel, applyStepEvent, applySubRunEvent, isCompletedEvent, isContentEvent, isErrorEvent, isFollowupsCompletedEvent, isPausedEvent, isReasoningStepEvent, isStepEvent, isSubRunEvent, isToolEvent, mergeTool, normaliseBaseUrl, sessionRunsToMessages, streamRun, toolsFromEvent } from '../chunk-BCVKAMSO.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|