@agentplat/framework 0.2.0-beta.1 → 0.2.0-beta.6
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 +60 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +119 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
3
3
|
High-level composition for applications that want a short path to AgentPlat
|
|
4
4
|
without hiding the replaceable runtime and Room contracts.
|
|
5
5
|
|
|
6
|
+
For the shortest path, send one prompt and receive plain text:
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { AgentPlat } from '@agentplat/framework';
|
|
10
|
+
|
|
11
|
+
const answer = await AgentPlat.ask({
|
|
12
|
+
provider: 'openai',
|
|
13
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
14
|
+
model: 'gpt-4.1-mini',
|
|
15
|
+
prompt: 'Draft a friendly release note.',
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Change `provider` to `gemini`, `ollama` or `openrouter`, or use `compatible`
|
|
20
|
+
with an explicit `baseURL`. `ask` is ephemeral and returns only text; use
|
|
21
|
+
`quickRun` when you need usage, finish reason, normalized events or a custom
|
|
22
|
+
`ModelAdapter`.
|
|
23
|
+
|
|
24
|
+
When that prompt becomes a reusable agent, configure it once and progressively
|
|
25
|
+
use the same object for a normal run, streaming, or a multi-agent session:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
const researcher = AgentPlat.configure({
|
|
29
|
+
provider: 'openai',
|
|
30
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
31
|
+
model: 'gpt-4.1-mini',
|
|
32
|
+
instructions: 'Research carefully and cite uncertainty.',
|
|
33
|
+
tenantId: 'acme',
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const answer = await researcher.ask('Compare two options.');
|
|
37
|
+
for await (const event of researcher.stream('Give a live update.')) {
|
|
38
|
+
// normalized AgentStreamEvent
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const discussion = researcher.createSession({
|
|
42
|
+
speakers: [analyst, reviewer], // speakers use platform: 'chat'
|
|
43
|
+
maxRounds: 3,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
6
47
|
```ts
|
|
7
48
|
import { AgentPlat } from '@agentplat/framework';
|
|
8
49
|
import { openAICompatible } from '@agentplat/model-openai-compatible';
|
|
@@ -20,3 +61,22 @@ const result = await AgentPlat.quickRun({
|
|
|
20
61
|
`quickRun` is intentionally ephemeral: it does not create a Room, durable
|
|
21
62
|
events or approvals. Pass a Room repository in `rooms` to `createAgentplat`
|
|
22
63
|
when building a governed Agent Room platform.
|
|
64
|
+
|
|
65
|
+
For ephemeral debates and simulations, a configured facade can create a typed,
|
|
66
|
+
bounded multi-agent session over the same runtime:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
const session = agentplat.createSession({
|
|
70
|
+
speakers: [buyer, seller],
|
|
71
|
+
maxRounds: 4,
|
|
72
|
+
stopMarkers: ['DEAL AGREED'],
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
for await (const event of session.stream({ input: scenario, signal })) {
|
|
76
|
+
// MultiAgentSessionEvent is re-exported by this package.
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
For applications with mock and live backends in one process, pass a `platforms`
|
|
81
|
+
map containing explicit adapters/providers. The framework validates registered
|
|
82
|
+
speaker platforms without importing optional model SDKs.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { AgentPlatID, JsonObject, Metadata, TenantContext } from '@agentplat/core';
|
|
2
2
|
import type { ModelAdapter } from '@agentplat/model';
|
|
3
|
+
import type { ChatModelOptions, ChatModelProvider } from '@agentplat/model-openai-compatible';
|
|
3
4
|
import { RoomService } from '@agentplat/rooms';
|
|
4
5
|
import type { RoomServiceOptions } from '@agentplat/rooms';
|
|
6
|
+
import { MultiAgentSession } from '@agentplat/sessions';
|
|
7
|
+
import type { MultiAgentSessionOptions } from '@agentplat/sessions';
|
|
5
8
|
import type { AgentProvider, AgentRunInput, AgentRunResult, AgentRuntime, AgentStreamEvent } from '@agentplat/runtime';
|
|
9
|
+
export { createMultiAgentSession, createPersonaInputBuilder, createSessionEventReducer, formatSessionTranscript, MultiAgentSession, sessionMetrics, } from '@agentplat/sessions';
|
|
10
|
+
export type { MultiAgentSessionEvent, MultiAgentSessionInput, MultiAgentSessionOptions, MultiAgentSessionResult, SessionCompletedPayload, SessionEventRecord, SessionEventPayload, SessionEventReducer, SessionEventSink, SessionFailurePayload, SessionInputContext, SessionMessage, SessionMetrics, SessionPersona, PersonaInputBuilderOptions, SessionSpeaker, SessionSpeakerRef, SessionStartedPayload, SessionStopContext, SessionStopDecision, SessionStopPayload, SessionStopReason, SessionSinkFailureMode, SessionToolPayload, SessionTurnCompletedPayload, SessionTurnPayload, SessionUsage, SessionViewState, SessionTurnView, } from '@agentplat/sessions';
|
|
11
|
+
export type { AgentCompletionPayload, AgentRunResult, AgentStreamEvent, AgentUsage, StreamEvent, } from '@agentplat/runtime';
|
|
12
|
+
export type { AgentSseEnvelope } from '@agentplat/streaming';
|
|
6
13
|
/** Options used to assemble a high-level AgentPlat client. */
|
|
7
14
|
export interface CreateAgentPlatOptions {
|
|
8
15
|
/** Direct model adapter wrapped in a one-generation ChatAgentProvider. */
|
|
@@ -13,6 +20,8 @@ export interface CreateAgentPlatOptions {
|
|
|
13
20
|
runtime?: AgentRuntime;
|
|
14
21
|
/** Registry key for the supplied adapter/provider. Defaults to `chat`. */
|
|
15
22
|
platform?: string;
|
|
23
|
+
/** Provider-neutral registrations for applications that use several backends. */
|
|
24
|
+
platforms?: Record<string, AgentPlatPlatform>;
|
|
16
25
|
/** Defaults to the isolated local tenant. */
|
|
17
26
|
tenant?: TenantContext;
|
|
18
27
|
/** Execution-only credentials. They are never placed in result metadata. */
|
|
@@ -22,6 +31,14 @@ export interface CreateAgentPlatOptions {
|
|
|
22
31
|
idGenerator?: () => AgentPlatID;
|
|
23
32
|
clock?: () => Date;
|
|
24
33
|
}
|
|
34
|
+
/** One explicit adapter or provider registration in a composed framework client. */
|
|
35
|
+
export type AgentPlatPlatform = {
|
|
36
|
+
adapter: ModelAdapter;
|
|
37
|
+
provider?: never;
|
|
38
|
+
} | {
|
|
39
|
+
provider: AgentProvider;
|
|
40
|
+
adapter?: never;
|
|
41
|
+
};
|
|
25
42
|
/** Input accepted by the ephemeral quick-run facade. */
|
|
26
43
|
export interface QuickRunInput {
|
|
27
44
|
instructions: string;
|
|
@@ -42,6 +59,56 @@ export interface StaticQuickRunInput extends QuickRunInput {
|
|
|
42
59
|
credentials?: Record<string, string>;
|
|
43
60
|
platform?: string;
|
|
44
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Smallest useful model call for prototypes and command-style applications.
|
|
64
|
+
*
|
|
65
|
+
* `ask` is intentionally limited to the portable Chat Completions transport.
|
|
66
|
+
* Use `quickRun` with a `ModelAdapter` when an application needs a provider
|
|
67
|
+
* with another wire protocol or wants the normalized run result and metadata.
|
|
68
|
+
*/
|
|
69
|
+
export interface AskInput extends Omit<ChatModelOptions, 'provider' | 'defaultModel'> {
|
|
70
|
+
prompt: string;
|
|
71
|
+
model: string;
|
|
72
|
+
provider?: ChatModelProvider;
|
|
73
|
+
system?: string;
|
|
74
|
+
tenantId?: AgentPlatID;
|
|
75
|
+
signal?: AbortSignal;
|
|
76
|
+
}
|
|
77
|
+
/** Declarative configuration for a reusable portable agent. */
|
|
78
|
+
export interface ConfigureAgentInput extends Omit<ChatModelOptions, 'provider' | 'defaultModel'> {
|
|
79
|
+
model: string;
|
|
80
|
+
instructions: string;
|
|
81
|
+
provider?: ChatModelProvider;
|
|
82
|
+
name?: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
agentId?: AgentPlatID;
|
|
85
|
+
tenantId?: AgentPlatID;
|
|
86
|
+
config?: JsonObject;
|
|
87
|
+
metadata?: Metadata;
|
|
88
|
+
}
|
|
89
|
+
/** Per-invocation controls for a configured agent. */
|
|
90
|
+
export interface ConfiguredAgentRunOptions {
|
|
91
|
+
runId?: AgentPlatID;
|
|
92
|
+
signal?: AbortSignal;
|
|
93
|
+
metadata?: Metadata;
|
|
94
|
+
}
|
|
95
|
+
/** Session options supplied by a configured framework facade. */
|
|
96
|
+
export type FrameworkSessionOptions = Omit<MultiAgentSessionOptions, 'runtime' | 'tenant' | 'credentials'>;
|
|
97
|
+
/**
|
|
98
|
+
* Reusable high-level agent assembled from a portable provider preset.
|
|
99
|
+
*
|
|
100
|
+
* It keeps the convenience setup in one place while exposing the normalized
|
|
101
|
+
* run, stream and multi-agent session APIs for progressively advanced use.
|
|
102
|
+
*/
|
|
103
|
+
export declare class ConfiguredAgent {
|
|
104
|
+
private readonly framework;
|
|
105
|
+
private readonly defaults;
|
|
106
|
+
constructor(framework: AgentPlatFramework, defaults: Omit<QuickRunInput, 'input' | 'runId' | 'signal'>);
|
|
107
|
+
run(input: AgentRunInput['input'], options?: ConfiguredAgentRunOptions): Promise<AgentRunResult>;
|
|
108
|
+
ask(prompt: string, options?: ConfiguredAgentRunOptions): Promise<string>;
|
|
109
|
+
stream(input: AgentRunInput['input'], options?: ConfiguredAgentRunOptions): AsyncIterable<AgentStreamEvent>;
|
|
110
|
+
createSession(options: FrameworkSessionOptions): MultiAgentSession;
|
|
111
|
+
}
|
|
45
112
|
/**
|
|
46
113
|
* Lightweight application facade over the public runtime and Room services.
|
|
47
114
|
* Infrastructure objects remain accessible so applications are not locked
|
|
@@ -52,6 +119,7 @@ export declare class AgentPlatFramework {
|
|
|
52
119
|
readonly rooms?: RoomService;
|
|
53
120
|
readonly tenant: TenantContext;
|
|
54
121
|
private readonly platform;
|
|
122
|
+
private readonly configuredPlatforms;
|
|
55
123
|
private readonly credentials?;
|
|
56
124
|
private readonly idGenerator;
|
|
57
125
|
private readonly clock;
|
|
@@ -60,6 +128,8 @@ export declare class AgentPlatFramework {
|
|
|
60
128
|
quickRun(input: QuickRunInput): Promise<AgentRunResult>;
|
|
61
129
|
/** Stream a single ephemeral agent run as normalized runtime events. */
|
|
62
130
|
stream(input: QuickRunInput): AsyncIterable<AgentStreamEvent>;
|
|
131
|
+
/** Create an ephemeral multi-agent session over this facade's runtime. */
|
|
132
|
+
createSession(options: FrameworkSessionOptions): MultiAgentSession;
|
|
63
133
|
private execution;
|
|
64
134
|
}
|
|
65
135
|
/** Create a reusable framework facade. */
|
|
@@ -67,6 +137,13 @@ export declare function createAgentplat(options?: CreateAgentPlatOptions): Agent
|
|
|
67
137
|
/** Minimal stateless entry point for prototypes and examples. */
|
|
68
138
|
export declare const AgentPlat: {
|
|
69
139
|
create: typeof createAgentplat;
|
|
140
|
+
/**
|
|
141
|
+
* Configure a reusable agent once, then run, stream or compose sessions
|
|
142
|
+
* without repeating provider, model, tenant or instruction setup.
|
|
143
|
+
*/
|
|
144
|
+
configure(input: ConfigureAgentInput): ConfiguredAgent;
|
|
145
|
+
/** Send one prompt and receive plain text using a named provider preset. */
|
|
146
|
+
ask(input: AskInput): Promise<string>;
|
|
70
147
|
quickRun(input: StaticQuickRunInput): Promise<AgentRunResult>;
|
|
71
148
|
stream(input: StaticQuickRunInput): AsyncIterable<AgentStreamEvent>;
|
|
72
149
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,QAAQ,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,0EAA0E;IAC1E,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,iBAAiB;IA0BlE,OAAO,CAAC,SAAS;CA0ClB;AAED,0CAA0C;AAC1C,wBAAgB,eAAe,CAC7B,OAAO,GAAE,sBAA2B,GACnC,kBAAkB,CAEpB;AAED,iEAAiE;AACjE,eAAO,MAAM,SAAS;;IAEpB;;;OAGG;qBACc,mBAAmB,GAAG,eAAe;IAiCtD,4EAA4E;eAC3D,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;oBAwBrB,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC;kBAerD,mBAAmB,GAAG,aAAa,CAAC,gBAAgB,CAAC;CAepE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,40 @@
|
|
|
1
1
|
import { AgentPlatError } from '@agentplat/core';
|
|
2
|
+
import { chatModel } from '@agentplat/model-openai-compatible';
|
|
2
3
|
import { RoomService } from '@agentplat/rooms';
|
|
4
|
+
import { createMultiAgentSession, } from '@agentplat/sessions';
|
|
3
5
|
import { ChatAgentProvider, DefaultAgentRuntime } from '@agentplat/runtime';
|
|
6
|
+
export { createMultiAgentSession, createPersonaInputBuilder, createSessionEventReducer, formatSessionTranscript, MultiAgentSession, sessionMetrics, } from '@agentplat/sessions';
|
|
4
7
|
const quickRunPolicies = {
|
|
5
8
|
mode: 'quick_run',
|
|
6
9
|
tools: 'denied',
|
|
7
10
|
externalWrites: 'denied',
|
|
8
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Reusable high-level agent assembled from a portable provider preset.
|
|
14
|
+
*
|
|
15
|
+
* It keeps the convenience setup in one place while exposing the normalized
|
|
16
|
+
* run, stream and multi-agent session APIs for progressively advanced use.
|
|
17
|
+
*/
|
|
18
|
+
export class ConfiguredAgent {
|
|
19
|
+
framework;
|
|
20
|
+
defaults;
|
|
21
|
+
constructor(framework, defaults) {
|
|
22
|
+
this.framework = framework;
|
|
23
|
+
this.defaults = defaults;
|
|
24
|
+
}
|
|
25
|
+
run(input, options = {}) {
|
|
26
|
+
return this.framework.quickRun({ ...this.defaults, input, ...options });
|
|
27
|
+
}
|
|
28
|
+
async ask(prompt, options = {}) {
|
|
29
|
+
return textOutput(await this.run(prompt, options));
|
|
30
|
+
}
|
|
31
|
+
stream(input, options = {}) {
|
|
32
|
+
return this.framework.stream({ ...this.defaults, input, ...options });
|
|
33
|
+
}
|
|
34
|
+
createSession(options) {
|
|
35
|
+
return this.framework.createSession(options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
9
38
|
/**
|
|
10
39
|
* Lightweight application facade over the public runtime and Room services.
|
|
11
40
|
* Infrastructure objects remain accessible so applications are not locked
|
|
@@ -16,6 +45,7 @@ export class AgentPlatFramework {
|
|
|
16
45
|
rooms;
|
|
17
46
|
tenant;
|
|
18
47
|
platform;
|
|
48
|
+
configuredPlatforms = new Set();
|
|
19
49
|
credentials;
|
|
20
50
|
idGenerator;
|
|
21
51
|
clock;
|
|
@@ -35,11 +65,32 @@ export class AgentPlatFramework {
|
|
|
35
65
|
this.idGenerator =
|
|
36
66
|
options.idGenerator ?? (() => globalThis.crypto.randomUUID());
|
|
37
67
|
this.clock = options.clock ?? (() => new Date());
|
|
68
|
+
if (options.platforms) {
|
|
69
|
+
for (const [platform, registration] of Object.entries(options.platforms)) {
|
|
70
|
+
const normalized = normalizedPlatform(platform);
|
|
71
|
+
if (!registration || (registration.adapter && registration.provider)) {
|
|
72
|
+
throw new AgentPlatError('VALIDATION_ERROR', `Configure exactly one adapter or provider for platform "${platform}"`);
|
|
73
|
+
}
|
|
74
|
+
const provider = registration.adapter
|
|
75
|
+
? new ChatAgentProvider(registration.adapter)
|
|
76
|
+
: registration.provider;
|
|
77
|
+
if (!provider) {
|
|
78
|
+
throw new AgentPlatError('VALIDATION_ERROR', `A provider or adapter is required for platform "${platform}"`);
|
|
79
|
+
}
|
|
80
|
+
this.runtime.registerProvider(normalized, provider);
|
|
81
|
+
this.configuredPlatforms.add(normalized);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
38
84
|
const provider = options.adapter
|
|
39
85
|
? new ChatAgentProvider(options.adapter)
|
|
40
86
|
: options.provider;
|
|
41
|
-
if (provider)
|
|
87
|
+
if (provider) {
|
|
88
|
+
if (this.configuredPlatforms.has(this.platform)) {
|
|
89
|
+
throw new AgentPlatError('CONFLICT', `Platform "${this.platform}" is configured more than once`);
|
|
90
|
+
}
|
|
42
91
|
this.runtime.registerProvider(this.platform, provider);
|
|
92
|
+
this.configuredPlatforms.add(this.platform);
|
|
93
|
+
}
|
|
43
94
|
if (options.rooms) {
|
|
44
95
|
this.rooms = new RoomService({
|
|
45
96
|
...options.rooms,
|
|
@@ -57,6 +108,27 @@ export class AgentPlatFramework {
|
|
|
57
108
|
const execution = this.execution(input);
|
|
58
109
|
return this.runtime.stream(execution.agent, execution.input, execution.context);
|
|
59
110
|
}
|
|
111
|
+
/** Create an ephemeral multi-agent session over this facade's runtime. */
|
|
112
|
+
createSession(options) {
|
|
113
|
+
for (const speaker of options.speakers) {
|
|
114
|
+
const platform = normalizedPlatform(speaker.platform);
|
|
115
|
+
const known = this.runtime.hasProvider?.(platform);
|
|
116
|
+
if (known === false ||
|
|
117
|
+
(!known &&
|
|
118
|
+
this.configuredPlatforms.size > 0 &&
|
|
119
|
+
!this.configuredPlatforms.has(platform))) {
|
|
120
|
+
throw new AgentPlatError('VALIDATION_ERROR', `No provider is configured for session speaker platform "${platform}"`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return createMultiAgentSession({
|
|
124
|
+
...options,
|
|
125
|
+
runtime: this.runtime,
|
|
126
|
+
tenant: this.tenant,
|
|
127
|
+
credentials: this.credentials,
|
|
128
|
+
idGenerator: options.idGenerator ?? this.idGenerator,
|
|
129
|
+
clock: options.clock ?? this.clock,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
60
132
|
execution(input) {
|
|
61
133
|
required(input.instructions, 'instructions');
|
|
62
134
|
if (typeof input.input !== 'string' &&
|
|
@@ -105,6 +177,46 @@ export function createAgentplat(options = {}) {
|
|
|
105
177
|
/** Minimal stateless entry point for prototypes and examples. */
|
|
106
178
|
export const AgentPlat = {
|
|
107
179
|
create: createAgentplat,
|
|
180
|
+
/**
|
|
181
|
+
* Configure a reusable agent once, then run, stream or compose sessions
|
|
182
|
+
* without repeating provider, model, tenant or instruction setup.
|
|
183
|
+
*/
|
|
184
|
+
configure(input) {
|
|
185
|
+
const { model, provider = 'openai', tenantId = 'local', instructions, name, description, agentId, config, metadata, ...adapterOptions } = input;
|
|
186
|
+
return new ConfiguredAgent(createAgentplat({
|
|
187
|
+
adapter: chatModel({
|
|
188
|
+
...adapterOptions,
|
|
189
|
+
provider,
|
|
190
|
+
defaultModel: model,
|
|
191
|
+
}),
|
|
192
|
+
tenant: { tenantId },
|
|
193
|
+
}), {
|
|
194
|
+
instructions,
|
|
195
|
+
...(name ? { name } : {}),
|
|
196
|
+
...(description ? { description } : {}),
|
|
197
|
+
...(agentId ? { agentId } : {}),
|
|
198
|
+
modelName: model,
|
|
199
|
+
...(config ? { config } : {}),
|
|
200
|
+
...(metadata ? { metadata } : {}),
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
/** Send one prompt and receive plain text using a named provider preset. */
|
|
204
|
+
async ask(input) {
|
|
205
|
+
const { prompt, model, provider = 'openai', system = 'You are a helpful assistant.', tenantId, signal, ...adapterOptions } = input;
|
|
206
|
+
const result = await AgentPlat.quickRun({
|
|
207
|
+
adapter: chatModel({
|
|
208
|
+
...adapterOptions,
|
|
209
|
+
provider,
|
|
210
|
+
defaultModel: model,
|
|
211
|
+
}),
|
|
212
|
+
...(tenantId ? { tenantId } : {}),
|
|
213
|
+
instructions: system,
|
|
214
|
+
input: prompt,
|
|
215
|
+
modelName: model,
|
|
216
|
+
signal,
|
|
217
|
+
});
|
|
218
|
+
return textOutput(result);
|
|
219
|
+
},
|
|
108
220
|
async quickRun(input) {
|
|
109
221
|
const { adapter, tenantId = 'local', credentials, platform, ...run } = input;
|
|
110
222
|
return createAgentplat({
|
|
@@ -136,4 +248,10 @@ function required(value, field) {
|
|
|
136
248
|
throw new AgentPlatError('VALIDATION_ERROR', `${field} is required`);
|
|
137
249
|
}
|
|
138
250
|
}
|
|
251
|
+
function textOutput(result) {
|
|
252
|
+
if (typeof result.output !== 'string') {
|
|
253
|
+
throw new AgentPlatError('ADAPTER_ERROR', result.errorMessage ?? 'The model did not return a text response');
|
|
254
|
+
}
|
|
255
|
+
return result.output;
|
|
256
|
+
}
|
|
139
257
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAU5E,MAAM,gBAAgB,GAAe;IACnC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAK/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,uBAAuB,GAExB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAU5E,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAyC7B,MAAM,gBAAgB,G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AAK,CAAC;QACV,OAAO,eAAe,CAAC;YACrB,OAAO;YACP,MAAM,EAAE,EAAE,QAAQ,EAAE;YACpB,WAAW;YACX,QAAQ;SACT,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;CACF,CAAC;AAEF,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC5C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,cAAc,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc,EAAE,KAAa;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,IAAI,cAAc,CAAC,kBAAkB,EAAE,GAAG,KAAK,cAAc,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,MAAsB;IACxC,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,IAAI,cAAc,CACtB,eAAe,EACf,MAAM,CAAC,YAAY,IAAI,0CAA0C,CAClE,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentplat/framework",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.6",
|
|
4
4
|
"description": "Lightweight high-level composition and quick-run facade for AgentPlat.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,10 +18,13 @@
|
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@agentplat/core": "^0.2.0-beta.
|
|
22
|
-
"@agentplat/
|
|
23
|
-
"@agentplat/
|
|
24
|
-
"@agentplat/
|
|
21
|
+
"@agentplat/core": "^0.2.0-beta.6",
|
|
22
|
+
"@agentplat/runtime": "^0.2.0-beta.6",
|
|
23
|
+
"@agentplat/model": "^0.2.0-beta.6",
|
|
24
|
+
"@agentplat/model-openai-compatible": "^0.2.0-beta.6",
|
|
25
|
+
"@agentplat/sessions": "^0.2.0-beta.6",
|
|
26
|
+
"@agentplat/streaming": "^0.2.0-beta.6",
|
|
27
|
+
"@agentplat/rooms": "^0.2.0-beta.6"
|
|
25
28
|
},
|
|
26
29
|
"publishConfig": {
|
|
27
30
|
"access": "public"
|