@statelyai/agent 2.0.0-alpha.31 → 2.0.0-alpha.33
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/CHANGELOG.md +22 -0
- package/dist/ai-sdk.cjs +3 -3
- package/dist/ai-sdk.d.cts +1 -1
- package/dist/ai-sdk.d.mts +1 -1
- package/dist/ai-sdk.mjs +3 -3
- package/dist/{decision-Iys2hzg3.cjs → decision-BPdEaxPf.cjs} +1 -1
- package/dist/{decision-DqO018Tp.mjs → decision-CV7WiV5C.mjs} +1 -1
- package/dist/{event-log-Bdww2l1D.cjs → event-log-CKWeC7H-.cjs} +22 -3
- package/dist/{event-log-DE430ZCa.mjs → event-log-DAqsalT1.mjs} +22 -3
- package/dist/{event-log-store-CCWdTPEP.mjs → event-log-store-BGehvVTb.mjs} +2 -2
- package/dist/{event-log-store-DTf_OzB-.d.cts → event-log-store-C2NjVlWU.d.mts} +13 -5
- package/dist/{event-log-store-BWMLi6oh.cjs → event-log-store-DKyE7JKr.cjs} +2 -2
- package/dist/{event-log-store-RziIobdW.d.mts → event-log-store-s73r1Hxf.d.cts} +13 -5
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +9 -8
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +5 -5
- package/dist/log.cjs +40 -5
- package/dist/log.d.cts +1 -1
- package/dist/log.d.mts +1 -1
- package/dist/log.mjs +40 -5
- package/dist/machines.cjs +1 -1
- package/dist/machines.mjs +1 -1
- package/dist/{model-source-DQ7KgJaT.cjs → model-source-BQ97_l1-.cjs} +1 -1
- package/dist/{model-source-CXsSZPq0.mjs → model-source-BilDEyqk.mjs} +1 -1
- package/dist/openai.cjs +2 -2
- package/dist/openai.d.cts +1 -1
- package/dist/openai.d.mts +1 -1
- package/dist/openai.mjs +2 -2
- package/dist/otel.d.cts +1 -1
- package/dist/otel.d.mts +1 -1
- package/dist/{run-agent-DWZ1uyBJ.mjs → run-agent-2UnSUhDb.mjs} +7 -5
- package/dist/{run-agent-D4MwS5GY.d.mts → run-agent-Atu-wEk7.d.mts} +3 -3
- package/dist/{run-agent-B5opVUxx.d.cts → run-agent-B5QhabdY.d.cts} +3 -3
- package/dist/{run-agent-tmk58M0x.cjs → run-agent-Cg0xd3K-.cjs} +7 -5
- package/dist/{setup-agent-yFFVXf5s.d.cts → setup-agent-BiF1N3td.d.cts} +2 -2
- package/dist/{setup-agent-BaffhCcM.mjs → setup-agent-CmhB-U5P.mjs} +2 -2
- package/dist/{setup-agent-D0L8Anl_.cjs → setup-agent-CwUJyqKB.cjs} +2 -2
- package/dist/{setup-agent-CPyg2ic7.d.mts → setup-agent-J9f_Wu5T.d.mts} +2 -2
- package/dist/tanstack-ai.cjs +3 -3
- package/dist/tanstack-ai.d.cts +1 -1
- package/dist/tanstack-ai.d.mts +1 -1
- package/dist/tanstack-ai.mjs +3 -3
- package/dist/testing.cjs +495 -5
- package/dist/testing.d.cts +389 -5
- package/dist/testing.d.mts +389 -5
- package/dist/testing.mjs +491 -6
- package/dist/{text-logic-j9hShB7d.d.cts → text-logic-CYP502VT.d.cts} +5 -3
- package/dist/{text-logic-BwdrDpO9.d.mts → text-logic-DuK9HIFM.d.mts} +5 -3
- package/dist/{usage-BYqv7VBw.d.cts → usage-D7JKAxLc.d.mts} +1 -1
- package/dist/{usage-Bl4nK8D-.d.mts → usage-DVw-646x.d.cts} +1 -1
- package/dist/validate.cjs +3 -3
- package/dist/validate.d.cts +2 -2
- package/dist/validate.d.mts +2 -2
- package/dist/validate.mjs +3 -3
- package/dist/{verify-tkymWz6X.d.mts → verify-BVz4cURF.d.mts} +1 -1
- package/dist/{verify-CS_xxvVU.cjs → verify-CS_WLRXn.cjs} +19 -3
- package/dist/{verify-BH5e0XLK.mjs → verify-DgB8P-Wx.mjs} +14 -4
- package/dist/{verify-CPKDPMwY.d.cts → verify-Dk3Vwnha.d.cts} +1 -1
- package/package.json +1 -1
- package/skills/add-evals/SKILL.md +8 -2
- package/skills/improve-machine/SKILL.md +1 -1
package/dist/openai.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_log = require("./event-log-
|
|
3
|
-
const require_decision = require("./decision-
|
|
2
|
+
const require_event_log = require("./event-log-CKWeC7H-.cjs");
|
|
3
|
+
const require_decision = require("./decision-BPdEaxPf.cjs");
|
|
4
4
|
//#region src/openai/index.ts
|
|
5
5
|
/** Thrown for a message part Chat Completions cannot carry — dropping it would
|
|
6
6
|
* silently change what the model sees. */
|
package/dist/openai.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentToolChoice, n as AgentMessage, s as AgentTools, u as ChosenEvent } from "./types-Dp5_Ru4R.cjs";
|
|
2
|
-
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-
|
|
2
|
+
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-CYP502VT.cjs";
|
|
3
3
|
import OpenAI from "openai";
|
|
4
4
|
import { ChatCompletion, ChatCompletionCreateParamsNonStreaming, ChatCompletionMessageParam, ChatCompletionTool } from "openai/resources/chat/completions/completions.js";
|
|
5
5
|
//#region src/openai/index.d.ts
|
package/dist/openai.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentToolChoice, n as AgentMessage, s as AgentTools, u as ChosenEvent } from "./types-Dp5_Ru4R.mjs";
|
|
2
|
-
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-
|
|
2
|
+
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-DuK9HIFM.mjs";
|
|
3
3
|
import OpenAI from "openai";
|
|
4
4
|
import { ChatCompletion, ChatCompletionCreateParamsNonStreaming, ChatCompletionMessageParam, ChatCompletionTool } from "openai/resources/chat/completions/completions.js";
|
|
5
5
|
//#region src/openai/index.d.ts
|
package/dist/openai.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as parseProviderOutput, R as providerOutputSchema, X as getJsonSchemaSync, Y as getJsonSchema, dt as AgentTruncatedError, j as getAgentOutputMode, tt as isStandardSchema, w as AGENT_USAGE_TOKEN_FIELDS } from "./event-log-
|
|
2
|
-
import { c as renderDecisionAttempts } from "./decision-
|
|
1
|
+
import { L as parseProviderOutput, R as providerOutputSchema, X as getJsonSchemaSync, Y as getJsonSchema, dt as AgentTruncatedError, j as getAgentOutputMode, tt as isStandardSchema, w as AGENT_USAGE_TOKEN_FIELDS } from "./event-log-DAqsalT1.mjs";
|
|
2
|
+
import { c as renderDecisionAttempts } from "./decision-CV7WiV5C.mjs";
|
|
3
3
|
//#region src/openai/index.ts
|
|
4
4
|
/** Thrown for a message part Chat Completions cannot carry — dropping it would
|
|
5
5
|
* silently change what the model sees. */
|
package/dist/otel.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as AgentTraceEvent } from "./run-agent-
|
|
1
|
+
import { g as AgentTraceEvent } from "./run-agent-B5QhabdY.cjs";
|
|
2
2
|
import { Attributes, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
3
3
|
//#region src/otel/index.d.ts
|
|
4
4
|
/** Options for {@link createOtelTraceHandler}. */
|
package/dist/otel.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as AgentTraceEvent } from "./run-agent-
|
|
1
|
+
import { g as AgentTraceEvent } from "./run-agent-Atu-wEk7.mjs";
|
|
2
2
|
import { Attributes, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
3
3
|
//#region src/otel/index.d.ts
|
|
4
4
|
/** Options for {@link createOtelTraceHandler}. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as responseMessagesOf, C as AGENT_USAGE_EVENT_TYPE, F as normalizeGeneratorResult, J as findNonSerializableContextPaths, M as getCallFinishReason, N as getCallUsage, P as isTextLogic, S as validateReplayEntries, U as getRegisteredAgentExecutionOptions, V as executorBoundLogics, W as isUnboundPlaceholder, _ as getUsageFromEvents, d as createReplayEntry, f as foldLog, g as getSnapshotStateHash, h as getLogExecutionId, i as AgentMachineVersionMismatchError, l as assertJsonSerializable, nt as resolveMachineVersion, ot as validateSchemaSync, s as agentCallOccurrence, st as canonicalJson, tt as isStandardSchema, u as canonicalEventJson, ut as AgentError, v as initEntry, x as replay } from "./event-log-
|
|
2
|
-
import { d as getAcceptedEvents, f as getHumanEventTypes, l as resolveDecision, n as acceptedDecisionOptions, s as isDecisionLogic, t as AgentDecisionExhaustedError } from "./decision-
|
|
3
|
-
import { t as AgentEventLogConflictError } from "./event-log-store-
|
|
1
|
+
import { B as responseMessagesOf, C as AGENT_USAGE_EVENT_TYPE, F as normalizeGeneratorResult, J as findNonSerializableContextPaths, M as getCallFinishReason, N as getCallUsage, P as isTextLogic, S as validateReplayEntries, U as getRegisteredAgentExecutionOptions, V as executorBoundLogics, W as isUnboundPlaceholder, _ as getUsageFromEvents, d as createReplayEntry, f as foldLog, g as getSnapshotStateHash, h as getLogExecutionId, i as AgentMachineVersionMismatchError, l as assertJsonSerializable, nt as resolveMachineVersion, ot as validateSchemaSync, s as agentCallOccurrence, st as canonicalJson, tt as isStandardSchema, u as canonicalEventJson, ut as AgentError, v as initEntry, x as replay } from "./event-log-DAqsalT1.mjs";
|
|
2
|
+
import { d as getAcceptedEvents, f as getHumanEventTypes, l as resolveDecision, n as acceptedDecisionOptions, s as isDecisionLogic, t as AgentDecisionExhaustedError } from "./decision-CV7WiV5C.mjs";
|
|
3
|
+
import { t as AgentEventLogConflictError } from "./event-log-store-BGehvVTb.mjs";
|
|
4
4
|
import { createAsyncLogic, getNextTransitions, isMachineSnapshot, stopActor } from "xstate";
|
|
5
5
|
import { createDurable } from "xstate/durable";
|
|
6
6
|
//#region src/run-agent.ts
|
|
@@ -886,7 +886,7 @@ function assertThreadMatchesEvents(threadId, stored, events) {
|
|
|
886
886
|
const givenEntry = events[index];
|
|
887
887
|
const storedHash = storedEntry.verification?.stateHash;
|
|
888
888
|
const givenHash = givenEntry.verification?.stateHash;
|
|
889
|
-
if (!(storedEntry.id === givenEntry.id && storedEntry.index === givenEntry.index && canonicalEventJson(storedEntry.event) === canonicalEventJson(givenEntry.event) && (storedHash === void 0 || givenHash === void 0 || storedHash === givenHash))) throw new AgentError("event-log-conflict", `createAgentRuntime: the given \`events\` diverge from thread "${threadId}" at index ${index} (stored entry '${storedEntry.id}', given '${givenEntry.id}') — the log passed in is not this thread's log.`);
|
|
889
|
+
if (!(storedEntry.id === givenEntry.id && storedEntry.index === givenEntry.index && canonicalEventJson(storedEntry.event) === canonicalEventJson(givenEntry.event) && (storedHash === void 0 || givenHash === void 0 || storedHash === givenHash) && (index > 0 || getLogExecutionId([storedEntry]) === getLogExecutionId([givenEntry])))) throw new AgentError("event-log-conflict", `createAgentRuntime: the given \`events\` diverge from thread "${threadId}" at index ${index} (stored entry '${storedEntry.id}', given '${givenEntry.id}') — the log passed in is not this thread's log.`);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
const QUIESCENT = Symbol("quiescent");
|
|
@@ -1407,7 +1407,9 @@ function createAgentRuntime(machine, options = {}) {
|
|
|
1407
1407
|
machineVersion: tail.machineVersion
|
|
1408
1408
|
});
|
|
1409
1409
|
const bridgeMeta = readAgentMeta(init.snapshot);
|
|
1410
|
-
|
|
1410
|
+
const forkedFrom = resumeEvents[0].metadata?.forkedFrom;
|
|
1411
|
+
const parentCache = forkedFrom?.executionId !== void 0 && bridgeMeta?.logId === forkedFrom.executionId && forkedFrom.logIndex === resumeEvents.length;
|
|
1412
|
+
if (inheritedExecutionId === void 0 || bridgeMeta?.logId !== inheritedExecutionId && !parentCache) throw new AgentMachineVersionMismatchError(tail.id, tail.index, {
|
|
1411
1413
|
machineId,
|
|
1412
1414
|
machineVersion
|
|
1413
1415
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as StandardSchemaV1, m as InferInput, s as AgentTools, w as WithAgentInputSchema } from "./types-Dp5_Ru4R.mjs";
|
|
2
|
-
import { I as DecisionAttempt, N as AgentDecisionRequest, Q as AgentError, W as AgentEventDescriptor, d as AgentRequestMode, f as AgentTextRequest, m as AgentUsage, q as AgentRequestSource, r as AgentFinishReason, t as AgentCallUsage, u as AgentRequestExecutors } from "./text-logic-
|
|
3
|
-
import { n as AgentUsageEvent } from "./usage-
|
|
4
|
-
import { c as AgentLogEntry, h as JsonValue$1, n as AgentEventLogStore } from "./event-log-store-
|
|
2
|
+
import { I as DecisionAttempt, N as AgentDecisionRequest, Q as AgentError, W as AgentEventDescriptor, d as AgentRequestMode, f as AgentTextRequest, m as AgentUsage, q as AgentRequestSource, r as AgentFinishReason, t as AgentCallUsage, u as AgentRequestExecutors } from "./text-logic-DuK9HIFM.mjs";
|
|
3
|
+
import { n as AgentUsageEvent } from "./usage-D7JKAxLc.mjs";
|
|
4
|
+
import { c as AgentLogEntry, h as JsonValue$1, n as AgentEventLogStore } from "./event-log-store-C2NjVlWU.mjs";
|
|
5
5
|
import { AnyActorLogic, AnyActorRef, AnyMachineSnapshot, AnyStateMachine, AsyncActorLogic, EmittedFrom, EventFromLogic, EventObject, InputFrom, InspectionEvent, OutputFrom, Snapshot, SnapshotFrom, StateValue } from "xstate";
|
|
6
6
|
import { DurableExecution } from "xstate/durable";
|
|
7
7
|
//#region src/steps.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as StandardSchemaV1, m as InferInput, s as AgentTools, w as WithAgentInputSchema } from "./types-Dp5_Ru4R.cjs";
|
|
2
|
-
import { I as DecisionAttempt, N as AgentDecisionRequest, Q as AgentError, W as AgentEventDescriptor, d as AgentRequestMode, f as AgentTextRequest, m as AgentUsage, q as AgentRequestSource, r as AgentFinishReason, t as AgentCallUsage, u as AgentRequestExecutors } from "./text-logic-
|
|
3
|
-
import { n as AgentUsageEvent } from "./usage-
|
|
4
|
-
import { c as AgentLogEntry, h as JsonValue$1, n as AgentEventLogStore } from "./event-log-store-
|
|
2
|
+
import { I as DecisionAttempt, N as AgentDecisionRequest, Q as AgentError, W as AgentEventDescriptor, d as AgentRequestMode, f as AgentTextRequest, m as AgentUsage, q as AgentRequestSource, r as AgentFinishReason, t as AgentCallUsage, u as AgentRequestExecutors } from "./text-logic-CYP502VT.cjs";
|
|
3
|
+
import { n as AgentUsageEvent } from "./usage-DVw-646x.cjs";
|
|
4
|
+
import { c as AgentLogEntry, h as JsonValue$1, n as AgentEventLogStore } from "./event-log-store-s73r1Hxf.cjs";
|
|
5
5
|
import { AnyActorLogic, AnyActorRef, AnyMachineSnapshot, AnyStateMachine, AsyncActorLogic, EmittedFrom, EventFromLogic, EventObject, InputFrom, InspectionEvent, OutputFrom, Snapshot, SnapshotFrom, StateValue } from "xstate";
|
|
6
6
|
import { DurableExecution } from "xstate/durable";
|
|
7
7
|
//#region src/steps.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_event_log = require("./event-log-
|
|
2
|
-
const require_decision = require("./decision-
|
|
3
|
-
const require_event_log_store = require("./event-log-store-
|
|
1
|
+
const require_event_log = require("./event-log-CKWeC7H-.cjs");
|
|
2
|
+
const require_decision = require("./decision-BPdEaxPf.cjs");
|
|
3
|
+
const require_event_log_store = require("./event-log-store-DKyE7JKr.cjs");
|
|
4
4
|
let xstate = require("xstate");
|
|
5
5
|
let xstate_durable = require("xstate/durable");
|
|
6
6
|
//#region src/run-agent.ts
|
|
@@ -886,7 +886,7 @@ function assertThreadMatchesEvents(threadId, stored, events) {
|
|
|
886
886
|
const givenEntry = events[index];
|
|
887
887
|
const storedHash = storedEntry.verification?.stateHash;
|
|
888
888
|
const givenHash = givenEntry.verification?.stateHash;
|
|
889
|
-
if (!(storedEntry.id === givenEntry.id && storedEntry.index === givenEntry.index && require_event_log.canonicalEventJson(storedEntry.event) === require_event_log.canonicalEventJson(givenEntry.event) && (storedHash === void 0 || givenHash === void 0 || storedHash === givenHash))) throw new require_event_log.AgentError("event-log-conflict", `createAgentRuntime: the given \`events\` diverge from thread "${threadId}" at index ${index} (stored entry '${storedEntry.id}', given '${givenEntry.id}') — the log passed in is not this thread's log.`);
|
|
889
|
+
if (!(storedEntry.id === givenEntry.id && storedEntry.index === givenEntry.index && require_event_log.canonicalEventJson(storedEntry.event) === require_event_log.canonicalEventJson(givenEntry.event) && (storedHash === void 0 || givenHash === void 0 || storedHash === givenHash) && (index > 0 || require_event_log.getLogExecutionId([storedEntry]) === require_event_log.getLogExecutionId([givenEntry])))) throw new require_event_log.AgentError("event-log-conflict", `createAgentRuntime: the given \`events\` diverge from thread "${threadId}" at index ${index} (stored entry '${storedEntry.id}', given '${givenEntry.id}') — the log passed in is not this thread's log.`);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
const QUIESCENT = Symbol("quiescent");
|
|
@@ -1407,7 +1407,9 @@ function createAgentRuntime(machine, options = {}) {
|
|
|
1407
1407
|
machineVersion: tail.machineVersion
|
|
1408
1408
|
});
|
|
1409
1409
|
const bridgeMeta = readAgentMeta(init.snapshot);
|
|
1410
|
-
|
|
1410
|
+
const forkedFrom = resumeEvents[0].metadata?.forkedFrom;
|
|
1411
|
+
const parentCache = forkedFrom?.executionId !== void 0 && bridgeMeta?.logId === forkedFrom.executionId && forkedFrom.logIndex === resumeEvents.length;
|
|
1412
|
+
if (inheritedExecutionId === void 0 || bridgeMeta?.logId !== inheritedExecutionId && !parentCache) throw new require_event_log.AgentMachineVersionMismatchError(tail.id, tail.index, {
|
|
1411
1413
|
machineId,
|
|
1412
1414
|
machineVersion
|
|
1413
1415
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as StandardSchemaV1, d as EventUnion, g as NormalizedEventSchemas, h as InferOutput, i as AgentToolChoice, m as InferInput, s as AgentTools, t as AgentEventSchemaInputMap, w as WithAgentInputSchema } from "./types-Dp5_Ru4R.cjs";
|
|
2
|
-
import { J as AgentSchemas, Y as EventFromSnapshot, _ as TextLogic, a as AgentModelRef, d as AgentRequestMode, h as BuiltinAgentActors, i as AgentModelMap, v as TextLogicConfig } from "./text-logic-
|
|
3
|
-
import { n as AgentUsageEvent, t as AGENT_USAGE_EVENT_TYPE } from "./usage-
|
|
2
|
+
import { J as AgentSchemas, Y as EventFromSnapshot, _ as TextLogic, a as AgentModelRef, d as AgentRequestMode, h as BuiltinAgentActors, i as AgentModelMap, v as TextLogicConfig } from "./text-logic-CYP502VT.cjs";
|
|
3
|
+
import { n as AgentUsageEvent, t as AGENT_USAGE_EVENT_TYPE } from "./usage-DVw-646x.cjs";
|
|
4
4
|
import { AnyActorLogic, AnyMachineSnapshot, AnySetupConfig, AnyStateMachine, AsyncActorLogic, EventObject, MachineContext, MetaObject, NonReducibleUnknown, SetupReturnFromConfig, SetupStateSchema } from "xstate";
|
|
5
5
|
//#region src/interaction.d.ts
|
|
6
6
|
interface AgentInteractionEvent<TType extends string = string> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as createTextLogic, C as AGENT_USAGE_EVENT_TYPE, G as missingActor, H as getAgentExecutionOptions, K as setAgentExecutionOptions, T as DECIDE_ACTOR, ct as isPlainObject, k as builtinTextActors, ot as validateSchemaSync, ut as AgentError } from "./event-log-
|
|
2
|
-
import { r as createDecideActor } from "./decision-
|
|
1
|
+
import { A as createTextLogic, C as AGENT_USAGE_EVENT_TYPE, G as missingActor, H as getAgentExecutionOptions, K as setAgentExecutionOptions, T as DECIDE_ACTOR, ct as isPlainObject, k as builtinTextActors, ot as validateSchemaSync, ut as AgentError } from "./event-log-DAqsalT1.mjs";
|
|
2
|
+
import { r as createDecideActor } from "./decision-CV7WiV5C.mjs";
|
|
3
3
|
import { machineFromJSON, setup } from "xstate";
|
|
4
4
|
//#region src/workflow-config.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_event_log = require("./event-log-
|
|
2
|
-
const require_decision = require("./decision-
|
|
1
|
+
const require_event_log = require("./event-log-CKWeC7H-.cjs");
|
|
2
|
+
const require_decision = require("./decision-BPdEaxPf.cjs");
|
|
3
3
|
let xstate = require("xstate");
|
|
4
4
|
//#region src/workflow-config.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as StandardSchemaV1, d as EventUnion, g as NormalizedEventSchemas, h as InferOutput, i as AgentToolChoice, m as InferInput, s as AgentTools, t as AgentEventSchemaInputMap, w as WithAgentInputSchema } from "./types-Dp5_Ru4R.mjs";
|
|
2
|
-
import { J as AgentSchemas, Y as EventFromSnapshot, _ as TextLogic, a as AgentModelRef, d as AgentRequestMode, h as BuiltinAgentActors, i as AgentModelMap, v as TextLogicConfig } from "./text-logic-
|
|
3
|
-
import { n as AgentUsageEvent, t as AGENT_USAGE_EVENT_TYPE } from "./usage-
|
|
2
|
+
import { J as AgentSchemas, Y as EventFromSnapshot, _ as TextLogic, a as AgentModelRef, d as AgentRequestMode, h as BuiltinAgentActors, i as AgentModelMap, v as TextLogicConfig } from "./text-logic-DuK9HIFM.mjs";
|
|
3
|
+
import { n as AgentUsageEvent, t as AGENT_USAGE_EVENT_TYPE } from "./usage-D7JKAxLc.mjs";
|
|
4
4
|
import { AnyActorLogic, AnyMachineSnapshot, AnySetupConfig, AnyStateMachine, AsyncActorLogic, EventObject, MachineContext, MetaObject, NonReducibleUnknown, SetupReturnFromConfig, SetupStateSchema } from "xstate";
|
|
5
5
|
//#region src/interaction.d.ts
|
|
6
6
|
interface AgentInteractionEvent<TType extends string = string> {
|
package/dist/tanstack-ai.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_log = require("./event-log-
|
|
3
|
-
const require_decision = require("./decision-
|
|
4
|
-
const require_model_source = require("./model-source-
|
|
2
|
+
const require_event_log = require("./event-log-CKWeC7H-.cjs");
|
|
3
|
+
const require_decision = require("./decision-BPdEaxPf.cjs");
|
|
4
|
+
const require_model_source = require("./model-source-BQ97_l1-.cjs");
|
|
5
5
|
let _tanstack_ai = require("@tanstack/ai");
|
|
6
6
|
//#region src/tanstack-ai/index.ts
|
|
7
7
|
/**
|
package/dist/tanstack-ai.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentToolChoice, n as AgentMessage, s as AgentTools, u as ChosenEvent } from "./types-Dp5_Ru4R.cjs";
|
|
2
|
-
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-
|
|
2
|
+
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-CYP502VT.cjs";
|
|
3
3
|
import { AnyStateMachine } from "xstate";
|
|
4
4
|
import { AnyTextAdapter, ModelMessage, StreamChunk, TokenUsage, Tool } from "@tanstack/ai";
|
|
5
5
|
import { TextActivityOptions } from "@tanstack/ai/adapters";
|
package/dist/tanstack-ai.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentToolChoice, n as AgentMessage, s as AgentTools, u as ChosenEvent } from "./types-Dp5_Ru4R.mjs";
|
|
2
|
-
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-
|
|
2
|
+
import { N as AgentDecisionRequest, W as AgentEventDescriptor, c as AgentRequestExecutorInfo, f as AgentTextRequest, r as AgentFinishReason, t as AgentCallUsage } from "./text-logic-DuK9HIFM.mjs";
|
|
3
3
|
import { AnyStateMachine } from "xstate";
|
|
4
4
|
import { AnyTextAdapter, ModelMessage, StreamChunk, TokenUsage, Tool } from "@tanstack/ai";
|
|
5
5
|
import { TextActivityOptions } from "@tanstack/ai/adapters";
|
package/dist/tanstack-ai.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as parseProviderOutput, R as providerOutputSchema, X as getJsonSchemaSync, Y as getJsonSchema, dt as AgentTruncatedError, j as getAgentOutputMode, tt as isStandardSchema, w as AGENT_USAGE_TOKEN_FIELDS } from "./event-log-
|
|
2
|
-
import { c as renderDecisionAttempts } from "./decision-
|
|
3
|
-
import { t as resolveModelSource } from "./model-source-
|
|
1
|
+
import { L as parseProviderOutput, R as providerOutputSchema, X as getJsonSchemaSync, Y as getJsonSchema, dt as AgentTruncatedError, j as getAgentOutputMode, tt as isStandardSchema, w as AGENT_USAGE_TOKEN_FIELDS } from "./event-log-DAqsalT1.mjs";
|
|
2
|
+
import { c as renderDecisionAttempts } from "./decision-CV7WiV5C.mjs";
|
|
3
|
+
import { t as resolveModelSource } from "./model-source-BilDEyqk.mjs";
|
|
4
4
|
import { chat, maxIterations } from "@tanstack/ai";
|
|
5
5
|
//#region src/tanstack-ai/index.ts
|
|
6
6
|
/**
|