@takeshape/util 11.120.1 → 11.121.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.
@@ -1,5 +1,4 @@
1
1
  export * from './abort.ts';
2
- export * from './agents.ts';
3
2
  export * from './arrays.ts';
4
3
  export * from './assert.ts';
5
4
  export * from './async-noop.ts';
@@ -1,5 +1,4 @@
1
1
  export * from "./abort.js";
2
- export * from "./agents.js";
3
2
  export * from "./arrays.js";
4
3
  export * from "./assert.js";
5
4
  export * from "./async-noop.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/util",
3
- "version": "11.120.1",
3
+ "version": "11.121.4",
4
4
  "description": "Shared utilities",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -45,8 +45,8 @@
45
45
  "tiny-invariant": "1.3.3",
46
46
  "uint8array-extras": "1.4.0",
47
47
  "url-parse": "1.5.3",
48
- "@takeshape/prism": "11.120.1",
49
- "@takeshape/routing": "11.120.1"
48
+ "@takeshape/prism": "11.121.4",
49
+ "@takeshape/routing": "11.121.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/classnames": "2.2.11",
@@ -1,47 +0,0 @@
1
- import type { CoreMessage } from 'ai';
2
- import type { AiUsage } from './tracing.ts';
3
- export type AgentExecutionOutputGenerateValue = {
4
- type: 'generate';
5
- data: string | Record<string, unknown>;
6
- };
7
- export type AgentExecutionOutputGraphQLValue = {
8
- type: 'graphql';
9
- data: unknown;
10
- };
11
- export type AgentExecutionOutputChatValue = {
12
- type: 'chat';
13
- data: {
14
- content: string;
15
- artifact?: Record<string, unknown>;
16
- references: Array<{
17
- _tid: string;
18
- }>;
19
- };
20
- };
21
- export type AgentExecutionOutputValue = AgentExecutionOutputGenerateValue | AgentExecutionOutputGraphQLValue | AgentExecutionOutputChatValue;
22
- export type AgentChatStateExecuteResult = {
23
- input: string;
24
- output: AgentExecutionOutputChatValue;
25
- metadata: {
26
- agentHistoryUpdate: CoreMessage[] | null;
27
- usage: AiUsage;
28
- blocked: boolean;
29
- };
30
- };
31
- export type AgentGenerateStateExecuteResult = {
32
- input: string;
33
- output: AgentExecutionOutputGenerateValue;
34
- metadata: {
35
- usage: AiUsage;
36
- blocked: boolean;
37
- };
38
- };
39
- export type AgentGraphQLStateExecuteResult = {
40
- input: string;
41
- output: AgentExecutionOutputGraphQLValue;
42
- };
43
- export type AgentExecuteResult = AgentChatStateExecuteResult | AgentGenerateStateExecuteResult | AgentGraphQLStateExecuteResult;
44
- export type AgentExecutionResultValue = Omit<AgentExecuteResult, 'metadata'>;
45
- export declare const isAgentChatStateExecuteResult: (result: AgentExecuteResult) => result is AgentChatStateExecuteResult;
46
- export declare const isAgentGenerateStateExecuteResult: (result: AgentExecuteResult) => result is AgentGenerateStateExecuteResult;
47
- export declare const isAgentStateExecuteResultWithUsage: (result: AgentExecuteResult) => result is AgentGenerateStateExecuteResult | AgentChatStateExecuteResult;
@@ -1,9 +0,0 @@
1
- export const isAgentChatStateExecuteResult = (result) => {
2
- return result.output.type === 'chat' && 'metadata' in result && 'agentHistoryUpdate' in result.metadata;
3
- };
4
- export const isAgentGenerateStateExecuteResult = (result) => {
5
- return result.output.type === 'generate' && 'metadata' in result && !('agentHistoryUpdate' in result.metadata);
6
- };
7
- export const isAgentStateExecuteResultWithUsage = (result) => {
8
- return isAgentChatStateExecuteResult(result) || isAgentGenerateStateExecuteResult(result);
9
- };