@agentplat/framework 0.2.0-beta.2 → 0.2.0-beta.7
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/browser.d.ts +27 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +58 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.d.ts +77 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +126 -2
- package/dist/index.js.map +1 -1
- package/package.json +12 -7
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';
|
|
@@ -35,3 +76,22 @@ for await (const event of session.stream({ input: scenario, signal })) {
|
|
|
35
76
|
// MultiAgentSessionEvent is re-exported by this package.
|
|
36
77
|
}
|
|
37
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.
|
|
83
|
+
|
|
84
|
+
## Browser boundary
|
|
85
|
+
|
|
86
|
+
Import `@agentplat/framework/browser` from a Next.js Client Component. It only
|
|
87
|
+
exports session reducer/controller and SSE client utilities; it does not load
|
|
88
|
+
Room services, PostgreSQL adapters, model credentials or server composition.
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { createSessionStreamController } from '@agentplat/framework/browser';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Use the package root (`@agentplat/framework`) only in server code or shared
|
|
95
|
+
code that does not enter a Client Component graph. `@agentplat/rooms`,
|
|
96
|
+
`@agentplat/rooms-postgres` and `@agentplat/rooms-api` are server-side
|
|
97
|
+
entrypoints and must never be imported by browser bundles.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createSessionEventReducer, type MultiAgentSessionEvent, type SessionEventReducer, type SessionViewState } from '@agentplat/sessions';
|
|
2
|
+
import { envelopeToEvent, subscribeAgentSse, type AgentSseEnvelope, type ParseAgentSseOptions } from '@agentplat/streaming';
|
|
3
|
+
export { createSessionEventReducer, type MultiAgentSessionEvent, type SessionEventReducer, type SessionViewState, };
|
|
4
|
+
export { envelopeToEvent, subscribeAgentSse, type AgentSseEnvelope, type ParseAgentSseOptions, };
|
|
5
|
+
/** Options for the browser-safe, framework-agnostic session stream controller. */
|
|
6
|
+
export interface SessionStreamControllerOptions {
|
|
7
|
+
reducer?: SessionEventReducer;
|
|
8
|
+
onState?(state: SessionViewState): void;
|
|
9
|
+
onEvent?(event: MultiAgentSessionEvent): void;
|
|
10
|
+
onError?(error: unknown): void;
|
|
11
|
+
fetch?: typeof globalThis.fetch;
|
|
12
|
+
}
|
|
13
|
+
/** Controls one browser session stream without taking a React dependency. */
|
|
14
|
+
export interface SessionStreamController {
|
|
15
|
+
readonly state: SessionViewState;
|
|
16
|
+
consume(response: Response, options?: ParseAgentSseOptions<MultiAgentSessionEvent>): Promise<void>;
|
|
17
|
+
start(input: RequestInfo | URL, init?: RequestInit, options?: ParseAgentSseOptions<MultiAgentSessionEvent>): Promise<void>;
|
|
18
|
+
abort(): void;
|
|
19
|
+
reset(): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a small controller that centralizes AbortController ownership, SSE
|
|
23
|
+
* parsing and reducer dispatch. It is usable from React, Vue, Svelte or plain
|
|
24
|
+
* browser code.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createSessionStreamController(options?: SessionStreamControllerOptions): SessionStreamController;
|
|
27
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,iBAA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ToEvent, subscribeAgentSse, } from '@agentplat/streaming';
|
|
3
|
+
export { createSessionEventReducer, };
|
|
4
|
+
export { envelopeToEvent, subscribeAgentSse, };
|
|
5
|
+
/**
|
|
6
|
+
* Create a small controller that centralizes AbortController ownership, SSE
|
|
7
|
+
* parsing and reducer dispatch. It is usable from React, Vue, Svelte or plain
|
|
8
|
+
* browser code.
|
|
9
|
+
*/
|
|
10
|
+
export function createSessionStreamController(options = {}) {
|
|
11
|
+
const reducer = options.reducer ?? createSessionEventReducer();
|
|
12
|
+
const fetchImplementation = options.fetch ?? globalThis.fetch;
|
|
13
|
+
let controller;
|
|
14
|
+
let state = reducer.initialState;
|
|
15
|
+
const publish = (event) => {
|
|
16
|
+
state = reducer.reduce(state, event);
|
|
17
|
+
options.onEvent?.(event);
|
|
18
|
+
options.onState?.(state);
|
|
19
|
+
};
|
|
20
|
+
const consume = async (response, parseOptions = {}) => {
|
|
21
|
+
try {
|
|
22
|
+
await subscribeAgentSse(response, {
|
|
23
|
+
...parseOptions,
|
|
24
|
+
signal: parseOptions.signal ?? controller?.signal,
|
|
25
|
+
onEvent: (envelope) => publish(envelopeToEvent(envelope)),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (!controller?.signal.aborted)
|
|
30
|
+
options.onError?.(error);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
get state() {
|
|
36
|
+
return state;
|
|
37
|
+
},
|
|
38
|
+
consume,
|
|
39
|
+
async start(input, init, parseOptions) {
|
|
40
|
+
controller?.abort();
|
|
41
|
+
controller = new AbortController();
|
|
42
|
+
const response = await fetchImplementation(input, {
|
|
43
|
+
...init,
|
|
44
|
+
signal: controller.signal,
|
|
45
|
+
});
|
|
46
|
+
await consume(response, parseOptions);
|
|
47
|
+
},
|
|
48
|
+
abort() {
|
|
49
|
+
controller?.abort();
|
|
50
|
+
},
|
|
51
|
+
reset() {
|
|
52
|
+
controller?.abort();
|
|
53
|
+
state = reducer.initialState;
|
|
54
|
+
options.onState?.(state);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAI1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,yBAAyB,GAI1B,CAAC;AACF,OAAO,EACL,eAAe,EACf,iBAAiB,GAGlB,CAAC;AA2BF;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAC3C,UAA0C,EAAE;IAE5C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,yBAAyB,EAAE,CAAC;IAC/D,MAAM,mBAAmB,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC;IAC9D,IAAI,UAAuC,CAAC;IAC5C,IAAI,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC;IAEjC,MAAM,OAAO,GAAG,CAAC,KAA6B,EAAE,EAAE;QAChD,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,EACnB,QAAkB,EAClB,eAA6D,EAAE,EAC/D,EAAE;QACF,IAAI,CAAC;YACH,MAAM,iBAAiB,CAAyB,QAAQ,EAAE;gBACxD,GAAG,YAAY;gBACf,MAAM,EAAE,YAAY,CAAC,MAAM,IAAI,UAAU,EAAE,MAAM;gBACjD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;aAC1D,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO;gBAAE,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YAC1D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,IAAI,KAAK;YACP,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO;QACP,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY;YACnC,UAAU,EAAE,KAAK,EAAE,CAAC;YACpB,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;YACnC,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;gBAChD,GAAG,IAAI;gBACP,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC;YACH,MAAM,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACxC,CAAC;QACD,KAAK;YACH,UAAU,EAAE,KAAK,EAAE,CAAC;QACtB,CAAC;QACD,KAAK;YACH,UAAU,EAAE,KAAK,EAAE,CAAC;YACpB,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC;YAC7B,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
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';
|
|
5
6
|
import { MultiAgentSession } from '@agentplat/sessions';
|
|
6
7
|
import type { MultiAgentSessionOptions } from '@agentplat/sessions';
|
|
7
8
|
import type { AgentProvider, AgentRunInput, AgentRunResult, AgentRuntime, AgentStreamEvent } from '@agentplat/runtime';
|
|
8
|
-
export { createMultiAgentSession, MultiAgentSession, } from '@agentplat/sessions';
|
|
9
|
-
export type { MultiAgentSessionEvent, MultiAgentSessionInput, MultiAgentSessionOptions, MultiAgentSessionResult, SessionCompletedPayload, SessionEventPayload, SessionFailurePayload, SessionInputContext, SessionMessage, SessionSpeaker, SessionSpeakerRef, SessionStartedPayload, SessionStopContext, SessionStopDecision, SessionStopPayload, SessionStopReason, SessionToolPayload, SessionTurnCompletedPayload, SessionTurnPayload, SessionUsage, } from '@agentplat/sessions';
|
|
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';
|
|
10
11
|
export type { AgentCompletionPayload, AgentRunResult, AgentStreamEvent, AgentUsage, StreamEvent, } from '@agentplat/runtime';
|
|
11
12
|
export type { AgentSseEnvelope } from '@agentplat/streaming';
|
|
12
13
|
/** Options used to assemble a high-level AgentPlat client. */
|
|
@@ -19,6 +20,8 @@ export interface CreateAgentPlatOptions {
|
|
|
19
20
|
runtime?: AgentRuntime;
|
|
20
21
|
/** Registry key for the supplied adapter/provider. Defaults to `chat`. */
|
|
21
22
|
platform?: string;
|
|
23
|
+
/** Provider-neutral registrations for applications that use several backends. */
|
|
24
|
+
platforms?: Record<string, AgentPlatPlatform>;
|
|
22
25
|
/** Defaults to the isolated local tenant. */
|
|
23
26
|
tenant?: TenantContext;
|
|
24
27
|
/** Execution-only credentials. They are never placed in result metadata. */
|
|
@@ -28,6 +31,14 @@ export interface CreateAgentPlatOptions {
|
|
|
28
31
|
idGenerator?: () => AgentPlatID;
|
|
29
32
|
clock?: () => Date;
|
|
30
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
|
+
};
|
|
31
42
|
/** Input accepted by the ephemeral quick-run facade. */
|
|
32
43
|
export interface QuickRunInput {
|
|
33
44
|
instructions: string;
|
|
@@ -48,8 +59,62 @@ export interface StaticQuickRunInput extends QuickRunInput {
|
|
|
48
59
|
credentials?: Record<string, string>;
|
|
49
60
|
platform?: string;
|
|
50
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
|
+
}
|
|
51
95
|
/** Session options supplied by a configured framework facade. */
|
|
52
96
|
export type FrameworkSessionOptions = Omit<MultiAgentSessionOptions, 'runtime' | 'tenant' | 'credentials'>;
|
|
97
|
+
/** Session options with optional speaker-to-platform overrides for configured agents. */
|
|
98
|
+
export interface ConfiguredAgentSessionOptions extends FrameworkSessionOptions {
|
|
99
|
+
platformOverrides?: Record<AgentPlatID, string>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Reusable high-level agent assembled from a portable provider preset.
|
|
103
|
+
*
|
|
104
|
+
* It keeps the convenience setup in one place while exposing the normalized
|
|
105
|
+
* run, stream and multi-agent session APIs for progressively advanced use.
|
|
106
|
+
*/
|
|
107
|
+
export declare class ConfiguredAgent {
|
|
108
|
+
private readonly framework;
|
|
109
|
+
private readonly defaults;
|
|
110
|
+
constructor(framework: AgentPlatFramework, defaults: Omit<QuickRunInput, 'input' | 'runId' | 'signal'>);
|
|
111
|
+
run(input: AgentRunInput['input'], options?: ConfiguredAgentRunOptions): Promise<AgentRunResult>;
|
|
112
|
+
ask(prompt: string, options?: ConfiguredAgentRunOptions): Promise<string>;
|
|
113
|
+
stream(input: AgentRunInput['input'], options?: ConfiguredAgentRunOptions): AsyncIterable<AgentStreamEvent>;
|
|
114
|
+
createSession(options: ConfiguredAgentSessionOptions): MultiAgentSession;
|
|
115
|
+
/** Add a named live, mock or custom platform for mixed-provider sessions. */
|
|
116
|
+
withPlatform(platform: string, registration: AgentPlatPlatform): this;
|
|
117
|
+
}
|
|
53
118
|
/**
|
|
54
119
|
* Lightweight application facade over the public runtime and Room services.
|
|
55
120
|
* Infrastructure objects remain accessible so applications are not locked
|
|
@@ -60,10 +125,13 @@ export declare class AgentPlatFramework {
|
|
|
60
125
|
readonly rooms?: RoomService;
|
|
61
126
|
readonly tenant: TenantContext;
|
|
62
127
|
private readonly platform;
|
|
128
|
+
private readonly configuredPlatforms;
|
|
63
129
|
private readonly credentials?;
|
|
64
130
|
private readonly idGenerator;
|
|
65
131
|
private readonly clock;
|
|
66
132
|
constructor(options?: CreateAgentPlatOptions);
|
|
133
|
+
/** Register one additional named platform after framework construction. */
|
|
134
|
+
registerPlatform(platform: string, registration: AgentPlatPlatform): void;
|
|
67
135
|
/** Execute a single ephemeral agent run with safe, tool-free defaults. */
|
|
68
136
|
quickRun(input: QuickRunInput): Promise<AgentRunResult>;
|
|
69
137
|
/** Stream a single ephemeral agent run as normalized runtime events. */
|
|
@@ -77,6 +145,13 @@ export declare function createAgentplat(options?: CreateAgentPlatOptions): Agent
|
|
|
77
145
|
/** Minimal stateless entry point for prototypes and examples. */
|
|
78
146
|
export declare const AgentPlat: {
|
|
79
147
|
create: typeof createAgentplat;
|
|
148
|
+
/**
|
|
149
|
+
* Configure a reusable agent once, then run, stream or compose sessions
|
|
150
|
+
* without repeating provider, model, tenant or instruction setup.
|
|
151
|
+
*/
|
|
152
|
+
configure(input: ConfigureAgentInput): ConfiguredAgent;
|
|
153
|
+
/** Send one prompt and receive plain text using a named provider preset. */
|
|
154
|
+
ask(input: AskInput): Promise<string>;
|
|
80
155
|
quickRun(input: StaticQuickRunInput): Promise<AgentRunResult>;
|
|
81
156
|
stream(input: StaticQuickRunInput): AsyncIterable<AgentStreamEvent>;
|
|
82
157
|
};
|
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,EACR,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAEL,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,KAAK,EAEV,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,kBAA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
|
import { RoomService } from '@agentplat/rooms';
|
|
3
4
|
import { createMultiAgentSession, } from '@agentplat/sessions';
|
|
4
5
|
import { ChatAgentProvider, DefaultAgentRuntime } from '@agentplat/runtime';
|
|
5
|
-
export { createMultiAgentSession, MultiAgentSession, } from '@agentplat/sessions';
|
|
6
|
+
export { createMultiAgentSession, createPersonaInputBuilder, createSessionEventReducer, formatSessionTranscript, MultiAgentSession, sessionMetrics, } from '@agentplat/sessions';
|
|
6
7
|
const quickRunPolicies = {
|
|
7
8
|
mode: 'quick_run',
|
|
8
9
|
tools: 'denied',
|
|
9
10
|
externalWrites: 'denied',
|
|
10
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
|
+
const { platformOverrides, speakers, ...sessionOptions } = options;
|
|
36
|
+
return this.framework.createSession({
|
|
37
|
+
...sessionOptions,
|
|
38
|
+
speakers: speakers.map((speaker) => ({
|
|
39
|
+
...speaker,
|
|
40
|
+
platform: platformOverrides?.[speaker.id] ?? speaker.platform,
|
|
41
|
+
})),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** Add a named live, mock or custom platform for mixed-provider sessions. */
|
|
45
|
+
withPlatform(platform, registration) {
|
|
46
|
+
this.framework.registerPlatform(platform, registration);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
11
50
|
/**
|
|
12
51
|
* Lightweight application facade over the public runtime and Room services.
|
|
13
52
|
* Infrastructure objects remain accessible so applications are not locked
|
|
@@ -18,6 +57,7 @@ export class AgentPlatFramework {
|
|
|
18
57
|
rooms;
|
|
19
58
|
tenant;
|
|
20
59
|
platform;
|
|
60
|
+
configuredPlatforms = new Set();
|
|
21
61
|
credentials;
|
|
22
62
|
idGenerator;
|
|
23
63
|
clock;
|
|
@@ -37,11 +77,21 @@ export class AgentPlatFramework {
|
|
|
37
77
|
this.idGenerator =
|
|
38
78
|
options.idGenerator ?? (() => globalThis.crypto.randomUUID());
|
|
39
79
|
this.clock = options.clock ?? (() => new Date());
|
|
80
|
+
if (options.platforms) {
|
|
81
|
+
for (const [platform, registration] of Object.entries(options.platforms)) {
|
|
82
|
+
this.registerPlatform(platform, registration);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
40
85
|
const provider = options.adapter
|
|
41
86
|
? new ChatAgentProvider(options.adapter)
|
|
42
87
|
: options.provider;
|
|
43
|
-
if (provider)
|
|
88
|
+
if (provider) {
|
|
89
|
+
if (this.configuredPlatforms.has(this.platform)) {
|
|
90
|
+
throw new AgentPlatError('CONFLICT', `Platform "${this.platform}" is configured more than once`);
|
|
91
|
+
}
|
|
44
92
|
this.runtime.registerProvider(this.platform, provider);
|
|
93
|
+
this.configuredPlatforms.add(this.platform);
|
|
94
|
+
}
|
|
45
95
|
if (options.rooms) {
|
|
46
96
|
this.rooms = new RoomService({
|
|
47
97
|
...options.rooms,
|
|
@@ -49,6 +99,24 @@ export class AgentPlatFramework {
|
|
|
49
99
|
});
|
|
50
100
|
}
|
|
51
101
|
}
|
|
102
|
+
/** Register one additional named platform after framework construction. */
|
|
103
|
+
registerPlatform(platform, registration) {
|
|
104
|
+
const normalized = normalizedPlatform(platform);
|
|
105
|
+
if (!registration || (registration.adapter && registration.provider)) {
|
|
106
|
+
throw new AgentPlatError('VALIDATION_ERROR', `Configure exactly one adapter or provider for platform "${platform}"`);
|
|
107
|
+
}
|
|
108
|
+
if (this.configuredPlatforms.has(normalized)) {
|
|
109
|
+
throw new AgentPlatError('CONFLICT', `Platform "${normalized}" is configured more than once`);
|
|
110
|
+
}
|
|
111
|
+
const provider = registration.adapter
|
|
112
|
+
? new ChatAgentProvider(registration.adapter)
|
|
113
|
+
: registration.provider;
|
|
114
|
+
if (!provider) {
|
|
115
|
+
throw new AgentPlatError('VALIDATION_ERROR', `A provider or adapter is required for platform "${platform}"`);
|
|
116
|
+
}
|
|
117
|
+
this.runtime.registerProvider(normalized, provider);
|
|
118
|
+
this.configuredPlatforms.add(normalized);
|
|
119
|
+
}
|
|
52
120
|
/** Execute a single ephemeral agent run with safe, tool-free defaults. */
|
|
53
121
|
async quickRun(input) {
|
|
54
122
|
const execution = this.execution(input);
|
|
@@ -61,6 +129,16 @@ export class AgentPlatFramework {
|
|
|
61
129
|
}
|
|
62
130
|
/** Create an ephemeral multi-agent session over this facade's runtime. */
|
|
63
131
|
createSession(options) {
|
|
132
|
+
for (const speaker of options.speakers) {
|
|
133
|
+
const platform = normalizedPlatform(speaker.platform);
|
|
134
|
+
const known = this.runtime.hasProvider?.(platform);
|
|
135
|
+
if (known === false ||
|
|
136
|
+
(!known &&
|
|
137
|
+
this.configuredPlatforms.size > 0 &&
|
|
138
|
+
!this.configuredPlatforms.has(platform))) {
|
|
139
|
+
throw new AgentPlatError('VALIDATION_ERROR', `No provider is configured for session speaker platform "${platform}"`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
64
142
|
return createMultiAgentSession({
|
|
65
143
|
...options,
|
|
66
144
|
runtime: this.runtime,
|
|
@@ -118,6 +196,46 @@ export function createAgentplat(options = {}) {
|
|
|
118
196
|
/** Minimal stateless entry point for prototypes and examples. */
|
|
119
197
|
export const AgentPlat = {
|
|
120
198
|
create: createAgentplat,
|
|
199
|
+
/**
|
|
200
|
+
* Configure a reusable agent once, then run, stream or compose sessions
|
|
201
|
+
* without repeating provider, model, tenant or instruction setup.
|
|
202
|
+
*/
|
|
203
|
+
configure(input) {
|
|
204
|
+
const { model, provider = 'openai', tenantId = 'local', instructions, name, description, agentId, config, metadata, ...adapterOptions } = input;
|
|
205
|
+
return new ConfiguredAgent(createAgentplat({
|
|
206
|
+
adapter: chatModel({
|
|
207
|
+
...adapterOptions,
|
|
208
|
+
provider,
|
|
209
|
+
defaultModel: model,
|
|
210
|
+
}),
|
|
211
|
+
tenant: { tenantId },
|
|
212
|
+
}), {
|
|
213
|
+
instructions,
|
|
214
|
+
...(name ? { name } : {}),
|
|
215
|
+
...(description ? { description } : {}),
|
|
216
|
+
...(agentId ? { agentId } : {}),
|
|
217
|
+
modelName: model,
|
|
218
|
+
...(config ? { config } : {}),
|
|
219
|
+
...(metadata ? { metadata } : {}),
|
|
220
|
+
});
|
|
221
|
+
},
|
|
222
|
+
/** Send one prompt and receive plain text using a named provider preset. */
|
|
223
|
+
async ask(input) {
|
|
224
|
+
const { prompt, model, provider = 'openai', system = 'You are a helpful assistant.', tenantId, signal, ...adapterOptions } = input;
|
|
225
|
+
const result = await AgentPlat.quickRun({
|
|
226
|
+
adapter: chatModel({
|
|
227
|
+
...adapterOptions,
|
|
228
|
+
provider,
|
|
229
|
+
defaultModel: model,
|
|
230
|
+
}),
|
|
231
|
+
...(tenantId ? { tenantId } : {}),
|
|
232
|
+
instructions: system,
|
|
233
|
+
input: prompt,
|
|
234
|
+
modelName: model,
|
|
235
|
+
signal,
|
|
236
|
+
});
|
|
237
|
+
return textOutput(result);
|
|
238
|
+
},
|
|
121
239
|
async quickRun(input) {
|
|
122
240
|
const { adapter, tenantId = 'local', credentials, platform, ...run } = input;
|
|
123
241
|
return createAgentplat({
|
|
@@ -149,4 +267,10 @@ function required(value, field) {
|
|
|
149
267
|
throw new AgentPlatError('VALIDATION_ERROR', `${field} is required`);
|
|
150
268
|
}
|
|
151
269
|
}
|
|
270
|
+
function textOutput(result) {
|
|
271
|
+
if (typeof result.output !== 'string') {
|
|
272
|
+
throw new AgentPlatError('ADAPTER_ERROR', result.errorMessage ?? 'The model did not return a text response');
|
|
273
|
+
}
|
|
274
|
+
return result.output;
|
|
275
|
+
}
|
|
152
276
|
//# 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,EACL,uBAAuB,GAExB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAU5E,OAAO,EACL,uBAAuB,EACvB,iBAAiB,
|
|
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,GAAe;IACnC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;CACzB,CAAC;AAwGF;;;;;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AAC,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.7",
|
|
4
4
|
"description": "Lightweight high-level composition and quick-run facade for AgentPlat.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"import": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./browser": {
|
|
16
|
+
"types": "./dist/browser.d.ts",
|
|
17
|
+
"import": "./dist/browser.js"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
"files": [
|
|
@@ -18,12 +22,13 @@
|
|
|
18
22
|
"README.md"
|
|
19
23
|
],
|
|
20
24
|
"dependencies": {
|
|
21
|
-
"@agentplat/core": "^0.2.0-beta.
|
|
22
|
-
"@agentplat/
|
|
23
|
-
"@agentplat/
|
|
24
|
-
"@agentplat/
|
|
25
|
-
"@agentplat/
|
|
26
|
-
"@agentplat/model": "^0.2.0-beta.
|
|
25
|
+
"@agentplat/core": "^0.2.0-beta.7",
|
|
26
|
+
"@agentplat/model": "^0.2.0-beta.7",
|
|
27
|
+
"@agentplat/rooms": "^0.2.0-beta.7",
|
|
28
|
+
"@agentplat/sessions": "^0.2.0-beta.7",
|
|
29
|
+
"@agentplat/runtime": "^0.2.0-beta.7",
|
|
30
|
+
"@agentplat/model-openai-compatible": "^0.2.0-beta.7",
|
|
31
|
+
"@agentplat/streaming": "^0.2.0-beta.7"
|
|
27
32
|
},
|
|
28
33
|
"publishConfig": {
|
|
29
34
|
"access": "public"
|