@recombine-ai/engine 0.10.0-alpha-2 → 0.10.1
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/build/lib/bosun/agent.d.ts +2 -3
- package/build/lib/bosun/agent.d.ts.map +1 -1
- package/build/lib/bosun/apiCallTracer.d.ts +3 -2
- package/build/lib/bosun/apiCallTracer.d.ts.map +1 -1
- package/build/lib/bosun/conversationalTracer.d.ts +2 -9
- package/build/lib/bosun/conversationalTracer.d.ts.map +1 -1
- package/changelog.md +11 -0
- package/package.json +1 -1
- package/build/lib/bosun/registry.d.ts +0 -25
- package/build/lib/bosun/registry.d.ts.map +0 -1
- package/build/lib/bosun/registry.js +0 -35
- package/build/lib/bosun/test-workflow.d.ts +0 -24
- package/build/lib/bosun/test-workflow.d.ts.map +0 -1
- package/build/lib/bosun/test-workflow.js +0 -11
- package/build/lib/bosun/workflow.d.ts +0 -25
- package/build/lib/bosun/workflow.d.ts.map +0 -1
- package/build/lib/bosun/workflow.js +0 -6
- package/build/lib/platform.d.ts +0 -16
- package/build/lib/platform.d.ts.map +0 -1
- package/build/lib/platform.js +0 -2
- package/build/lib/rc-fs.d.ts +0 -17
- package/build/lib/rc-fs.d.ts.map +0 -1
- package/build/lib/rc-fs.js +0 -22
- package/build/lib/test-workflow.d.ts +0 -24
- package/build/lib/test-workflow.d.ts.map +0 -1
- package/build/lib/test-workflow.js +0 -11
|
@@ -34,14 +34,13 @@ export interface TestAgentFactoryProps<CTX extends DefaultContext = DefaultConte
|
|
|
34
34
|
/**
|
|
35
35
|
* Optional tracer for recording API calls (e.g. generated OpenAPI SDK operations).
|
|
36
36
|
*
|
|
37
|
-
* Workflows should pass this down (scoped with a `
|
|
38
|
-
* in the same per-call timeline as step traces.
|
|
37
|
+
* Workflows should pass this down (scoped with a `conversationId`) so Bosun/Telescope UIs can render API calls in the same per-call timeline as step traces.
|
|
39
38
|
*/
|
|
40
39
|
apiCallTracer?: ApiCallTracer;
|
|
41
40
|
/**
|
|
42
41
|
* Optional tracer for recording conversational events (messages, streaming markers, etc).
|
|
43
42
|
*
|
|
44
|
-
* Workflows should pass this down (scoped with a `
|
|
43
|
+
* Workflows should pass this down (scoped with a `conversationId`) so UIs can render a mixed per-conversation timeline.
|
|
45
44
|
*/
|
|
46
45
|
conversationalTracer?: ConversationalTracer;
|
|
47
46
|
stepTracer: StepTracer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACzC,MAAM,WAAW,qBAAqB,CAAC,GAAG,SAAS,cAAc,GAAG,cAAc;IAC9E,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,YAAY,CAAA;IAC1B
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACzC,MAAM,WAAW,qBAAqB,CAAC,GAAG,SAAS,cAAc,GAAG,cAAc;IAC9E,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,YAAY,CAAA;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,EAAE,MAAM,OAAO,EAAE,CAAA;IAC5B,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACxC,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACnD;AACD,MAAM,WAAW,cAAc;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACjC,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAEhD,YAAY,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CACvC;AAED,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,cAAc,CAAA;AAEtD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,CACtE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAC9B,OAAO,CAAC,SAAS,CAAC,CAAA;AAEvB,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,cAAc,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,uBAE5F"}
|
|
@@ -4,15 +4,16 @@ import { Logger } from '../interfaces';
|
|
|
4
4
|
*
|
|
5
5
|
* The OpenAPI SDK can describe *what* was called (operation/method/path + inputs) but it typically cannot infer
|
|
6
6
|
* your domain "call"/"conversation" identifier. To get a per-call UI timeline, scope your tracer in the app
|
|
7
|
-
* layer by injecting `
|
|
7
|
+
* layer by injecting `conversationId` onto every `ApiCallTrace` before passing it to the SDK.
|
|
8
8
|
*/
|
|
9
9
|
export type ApiCallTrace = {
|
|
10
10
|
/** Unique ID for the trace */
|
|
11
11
|
traceId?: string;
|
|
12
12
|
/** Identifier used to group traces to the same call/conversation */
|
|
13
|
-
|
|
13
|
+
conversationId?: string;
|
|
14
14
|
/** Optional, to group traces within a broader context */
|
|
15
15
|
scopeId?: string;
|
|
16
|
+
/** Human-readable operation name */
|
|
16
17
|
operationName: string;
|
|
17
18
|
method: string;
|
|
18
19
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiCallTracer.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/apiCallTracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,oEAAoE;IACpE,
|
|
1
|
+
{"version":3,"file":"apiCallTracer.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/apiCallTracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,oCAAoC;IACpC,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,WAAW,aAAa;IAC1B,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAA;IAC1C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM;2BAEvB,YAAY;;EAQ1C"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { Logger } from '../interfaces';
|
|
2
2
|
/**
|
|
3
|
-
* Generic conversational
|
|
4
|
-
*
|
|
5
|
-
* This is intentionally separate from:
|
|
6
|
-
* - `StepTrace` (LLM/prompt steps)
|
|
7
|
-
* - `ApiCallTrace` (HTTP/OpenAPI operations)
|
|
8
|
-
*
|
|
9
|
-
* A `ConversationalTrace` represents “something happened in the conversation” (e.g. message received/sent,
|
|
10
|
-
* streaming finished, handler invoked) that UIs may want to show on the same per-call timeline.
|
|
3
|
+
* Generic conversational event tracing. Represents “something happened in the conversation” (e.g. message received/sent, streaming finished, handler invoked) that UIs may want to show on the same per-conversation timeline.
|
|
11
4
|
*/
|
|
12
5
|
export type ConversationalTrace = {
|
|
13
6
|
/** Unique ID for the trace */
|
|
14
7
|
traceId?: string;
|
|
15
8
|
/** Identifier used to group traces to the same call/conversation */
|
|
16
|
-
|
|
9
|
+
conversationId?: string;
|
|
17
10
|
/** Optional, to group traces within a broader context */
|
|
18
11
|
scopeId?: string;
|
|
19
12
|
/** Machine-readable event identifier */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversationalTracer.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/conversationalTracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC
|
|
1
|
+
{"version":3,"file":"conversationalTracer.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/conversationalTracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,wCAAwC;IACxC,SAAS,EACH,8BAA8B,GAC9B,8BAA8B,GAC9B,kBAAkB,GAClB,cAAc,GACd,oBAAoB,CAAA;IAE1B,sDAAsD;IACtD,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAEjD,qDAAqD;IACrD,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAE5C,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAA;IAEf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,WAAW,oBAAoB;IACjC,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM;kCAEvB,mBAAmB;;EAKxD"}
|
package/changelog.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### 0.10.0 → 0.10.1 (unstable)
|
|
4
|
+
|
|
5
|
+
- pinned zod-to-json-schema version
|
|
6
|
+
|
|
7
|
+
### 0.9.0 → 0.10.0 (unstable)
|
|
8
|
+
|
|
9
|
+
- Traces now require a 'createdAt' timestamp
|
|
10
|
+
- Added ApiCallTrace
|
|
11
|
+
- Added ConversationalTrace
|
|
12
|
+
- Improved error handling in StepTrace
|
|
13
|
+
|
|
3
14
|
### 0.9.0 → 0.9.1 (unstable)
|
|
4
15
|
|
|
5
16
|
- Fix 'response' step trace
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ZodSchema } from 'zod';
|
|
2
|
-
import { PromptFile } from '../prompt-fs';
|
|
3
|
-
import { Logger } from '../interfaces';
|
|
4
|
-
export interface PromptString {
|
|
5
|
-
type: 'string';
|
|
6
|
-
content: () => Promise<string>;
|
|
7
|
-
}
|
|
8
|
-
export interface StepDef {
|
|
9
|
-
name: string;
|
|
10
|
-
workflow: string;
|
|
11
|
-
type: 'streaming-response' | 'streaming-detect' | 'text';
|
|
12
|
-
prompt?: PromptFile | PromptString;
|
|
13
|
-
schema?: ZodSchema;
|
|
14
|
-
}
|
|
15
|
-
export interface WorkflowDef {
|
|
16
|
-
name: string;
|
|
17
|
-
type: 'stream' | 'text';
|
|
18
|
-
}
|
|
19
|
-
export interface Registry {
|
|
20
|
-
addStep(def: StepDef): void;
|
|
21
|
-
addWorkflow(def: WorkflowDef): void;
|
|
22
|
-
}
|
|
23
|
-
export declare function createConsoleRegistry(logger: Logger): Registry;
|
|
24
|
-
export declare function stdPrompt(prompt: PromptFile | string): PromptString | PromptFile;
|
|
25
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CACjC;AAED,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,oBAAoB,GAAG,kBAAkB,GAAG,MAAM,CAAA;IACxD,MAAM,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IAClC,MAAM,CAAC,EAAE,SAAS,CAAA;CACrB;AACD,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,QAAQ;IACrB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAAA;CACtC;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAoB9D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,6BAQpD"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createConsoleRegistry = createConsoleRegistry;
|
|
4
|
-
exports.stdPrompt = stdPrompt;
|
|
5
|
-
function createConsoleRegistry(logger) {
|
|
6
|
-
return {
|
|
7
|
-
addStep(def) {
|
|
8
|
-
let msg = `Registry, step added: ${def.name} (${def.type}) to ${def.workflow}`;
|
|
9
|
-
if (def.prompt) {
|
|
10
|
-
if (def.prompt.type === 'string') {
|
|
11
|
-
msg += ' with inline prompt';
|
|
12
|
-
}
|
|
13
|
-
else if (def.prompt.type === 'file') {
|
|
14
|
-
msg += ` with prompt ${def.prompt.path}`;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
if (def.schema) {
|
|
18
|
-
msg += ' with schema';
|
|
19
|
-
}
|
|
20
|
-
logger.debug(msg + '.');
|
|
21
|
-
},
|
|
22
|
-
addWorkflow(def) {
|
|
23
|
-
logger.debug('Registry, workflow added:', def.name, `(${def.type})`);
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function stdPrompt(prompt) {
|
|
28
|
-
if (typeof prompt === 'string') {
|
|
29
|
-
return {
|
|
30
|
-
type: 'string',
|
|
31
|
-
content: async () => prompt,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return prompt;
|
|
35
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AiEngine } from '../ai';
|
|
2
|
-
import { Logger, Message, Scheduler } from '../interfaces';
|
|
3
|
-
type DefaultContext = Record<string, any>;
|
|
4
|
-
export interface TestWorkflowFactoryProps<CTX extends DefaultContext = DefaultContext> {
|
|
5
|
-
logger: Logger;
|
|
6
|
-
scheduler: Scheduler;
|
|
7
|
-
ai: AiEngine;
|
|
8
|
-
getMessages: (workflow: string) => Message[];
|
|
9
|
-
sendMessage: (workflow: string, message: string) => Promise<void>;
|
|
10
|
-
sendAction: ctx;
|
|
11
|
-
}
|
|
12
|
-
export interface TestWorkflow {
|
|
13
|
-
start: () => Promise<unknown>;
|
|
14
|
-
reactOnMessage: () => Promise<unknown>;
|
|
15
|
-
respondToMessage: () => Promise<unknown>;
|
|
16
|
-
isAssigned: () => Promise<boolean>;
|
|
17
|
-
onFatalError: (error: Error) => Promise<unknown>;
|
|
18
|
-
getContext: () => DefaultContext;
|
|
19
|
-
setContext: (context: DefaultContext) => void;
|
|
20
|
-
}
|
|
21
|
-
export type TestWorkflowFactory = (props: TestWorkflowFactoryProps) => Record<string, TestWorkflow>;
|
|
22
|
-
export declare function createTestWorkflowFactory(creator: TestWorkflowFactory): TestWorkflowFactory;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=test-workflow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-workflow.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/test-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE1D,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACzC,MAAM,WAAW,wBAAwB,CAAC,GAAG,SAAS,cAAc,GAAG,cAAc;IACjF,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,EAAE,EAAE,QAAQ,CAAA;IACZ,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,EAAE,CAAA;IAC5C,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjE,UAAU,EACV,GAAG,CAAA;CAAC;AAOR,MAAM,WAAW,YAAY;IAEzB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACxC,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAEhD,UAAU,EAAE,MAAM,cAAc,CAAA;IAChC,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;CAChD;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,wBAAwB,KAAK,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AAEnG,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,uBAErE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTestWorkflowFactory = createTestWorkflowFactory;
|
|
4
|
-
{
|
|
5
|
-
get: () => CTX;
|
|
6
|
-
set: (ctx) => void subscribe;
|
|
7
|
-
(cb) => void ;
|
|
8
|
-
}
|
|
9
|
-
function createTestWorkflowFactory(creator) {
|
|
10
|
-
return creator;
|
|
11
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AiEngine } from '../ai';
|
|
2
|
-
import { Logger, Message, Scheduler } from '../interfaces';
|
|
3
|
-
import { SendAction } from './action';
|
|
4
|
-
import { Context } from './context';
|
|
5
|
-
type DefaultContext = Record<string, any>;
|
|
6
|
-
export interface TestWorkflowFactoryProps<CTX extends DefaultContext = DefaultContext> {
|
|
7
|
-
logger: Logger;
|
|
8
|
-
scheduler: Scheduler;
|
|
9
|
-
ai: AiEngine;
|
|
10
|
-
getMessages: () => Message[];
|
|
11
|
-
sendMessage: (message: string) => Promise<void>;
|
|
12
|
-
sendAction: SendAction;
|
|
13
|
-
ctx: Context<CTX>;
|
|
14
|
-
}
|
|
15
|
-
export interface TestWorkflow {
|
|
16
|
-
start: () => Promise<unknown>;
|
|
17
|
-
reactOnMessage: () => Promise<unknown>;
|
|
18
|
-
respondToMessage: () => Promise<unknown>;
|
|
19
|
-
isAssigned: () => Promise<boolean>;
|
|
20
|
-
onFatalError: (error: Error) => Promise<unknown>;
|
|
21
|
-
}
|
|
22
|
-
export type TestWorkflowFactory<T extends DefaultContext = DefaultContext> = (props: TestWorkflowFactoryProps<T>) => TestWorkflow;
|
|
23
|
-
export declare function createTestWorkflowFactory<T extends DefaultContext>(creator: TestWorkflowFactory<T>): TestWorkflowFactory<T>;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/lib/bosun/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACzC,MAAM,WAAW,wBAAwB,CAAC,GAAG,SAAS,cAAc,GAAG,cAAc;IACjF,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,EAAE,EAAE,QAAQ,CAAA;IACZ,WAAW,EAAE,MAAM,OAAO,EAAE,CAAA;IAC5B,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACxC,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACnD;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,CACzE,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,KACjC,YAAY,CAAA;AAEjB,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,cAAc,EAC9D,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,0BAGlC"}
|
package/build/lib/platform.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AIEngine } from './ai';
|
|
2
|
-
import { Logger } from './interfaces';
|
|
3
|
-
import { PromptFS } from './prompt-fs';
|
|
4
|
-
export interface Platform<TConf = {}> {
|
|
5
|
-
/** Streaming AI engine, used to create streaming workflows to be used in voice agents */
|
|
6
|
-
streamAi: any;
|
|
7
|
-
/** String-base AI engine, used in text agents or for analysis of the conversation */
|
|
8
|
-
ai: AIEngine;
|
|
9
|
-
/** File system, used to load prompt files */
|
|
10
|
-
fs: PromptFS;
|
|
11
|
-
/** Handles to mange calls, e.g. re-run stream response, hangup, etc. */
|
|
12
|
-
rcVoice: any;
|
|
13
|
-
/** Platform and agent-specific configuration variables, e.g. trunk setup, voice settings etc. */
|
|
14
|
-
logger: Logger;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/lib/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,WAAW,QAAQ,CAAC,KAAK,GAAG,EAAE;IAChC,yFAAyF;IAEzF,QAAQ,EAAE,GAAG,CAAA;IACb,qFAAqF;IACrF,EAAE,EAAE,QAAQ,CAAA;IACZ,6CAA6C;IAC7C,EAAE,EAAE,QAAQ,CAAA;IACZ,wEAAwE;IAExE,OAAO,EAAE,GAAG,CAAA;IACZ,iGAAiG;IAEjG,MAAM,EAAE,MAAM,CAAA;CACjB"}
|
package/build/lib/platform.js
DELETED
package/build/lib/rc-fs.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@recombine-ai/engine';
|
|
2
|
-
export interface FsConfig {
|
|
3
|
-
logger: Logger;
|
|
4
|
-
basePath: string;
|
|
5
|
-
}
|
|
6
|
-
export interface RcFS {
|
|
7
|
-
loadFile(path: string): PromptFile;
|
|
8
|
-
}
|
|
9
|
-
export declare function createLocalFS(cfg: FsConfig): {
|
|
10
|
-
loadFile(path: string): PromptFile;
|
|
11
|
-
};
|
|
12
|
-
export interface PromptFile {
|
|
13
|
-
type: 'file';
|
|
14
|
-
content: () => Promise<string>;
|
|
15
|
-
path: string;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=rc-fs.d.ts.map
|
package/build/lib/rc-fs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rc-fs.d.ts","sourceRoot":"","sources":["../../src/lib/rc-fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAI7C,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,IAAI;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;CACrC;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ;mBAEpB,MAAM,GAAG,UAAU;EAWzC;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9B,IAAI,EAAE,MAAM,CAAA;CACf"}
|
package/build/lib/rc-fs.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createLocalFS = createLocalFS;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const path_1 = require("path");
|
|
9
|
-
function createLocalFS(cfg) {
|
|
10
|
-
return {
|
|
11
|
-
loadFile(path) {
|
|
12
|
-
return {
|
|
13
|
-
type: 'file',
|
|
14
|
-
content: async () => {
|
|
15
|
-
cfg.logger.debug('AI Engine: loading prompt:', path);
|
|
16
|
-
return fs_1.default.promises.readFile((0, path_1.join)(cfg.basePath, path), 'utf-8');
|
|
17
|
-
},
|
|
18
|
-
path,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AiEngine } from './ai';
|
|
2
|
-
import { Logger, Message, Scheduler } from './interfaces';
|
|
3
|
-
type DefaultContext = Record<string, any>;
|
|
4
|
-
export interface TestWorkflowFactoryProps<CTX extends DefaultContext = DefaultContext> {
|
|
5
|
-
logger: Logger;
|
|
6
|
-
scheduler: Scheduler;
|
|
7
|
-
ai: AiEngine;
|
|
8
|
-
getMessages: (workflow: string) => Message[];
|
|
9
|
-
sendMessage: (workflow: string, message: string) => Promise<void>;
|
|
10
|
-
sendAction: ctx;
|
|
11
|
-
}
|
|
12
|
-
export interface TestWorkflow {
|
|
13
|
-
start: () => Promise<unknown>;
|
|
14
|
-
reactOnMessage: () => Promise<unknown>;
|
|
15
|
-
respondToMessage: () => Promise<unknown>;
|
|
16
|
-
isAssigned: () => Promise<boolean>;
|
|
17
|
-
onFatalError: (error: Error) => Promise<unknown>;
|
|
18
|
-
getContext: () => DefaultContext;
|
|
19
|
-
setContext: (context: DefaultContext) => void;
|
|
20
|
-
}
|
|
21
|
-
export type TestWorkflowFactory = (props: TestWorkflowFactoryProps) => Record<string, TestWorkflow>;
|
|
22
|
-
export declare function createTestWorkflowFactory(creator: TestWorkflowFactory): TestWorkflowFactory;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=test-workflow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-workflow.d.ts","sourceRoot":"","sources":["../../src/lib/test-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEzD,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACzC,MAAM,WAAW,wBAAwB,CAAC,GAAG,SAAS,cAAc,GAAG,cAAc;IACjF,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,EAAE,EAAE,QAAQ,CAAA;IACZ,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,EAAE,CAAA;IAC5C,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjE,UAAU,EACV,GAAG,CAAA;CAAC;AAOR,MAAM,WAAW,YAAY;IAEzB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACxC,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAEhD,UAAU,EAAE,MAAM,cAAc,CAAA;IAChC,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;CAChD;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,wBAAwB,KAAK,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AAEnG,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,uBAErE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTestWorkflowFactory = createTestWorkflowFactory;
|
|
4
|
-
{
|
|
5
|
-
get: () => CTX;
|
|
6
|
-
set: (ctx) => void subscribe;
|
|
7
|
-
(cb) => void ;
|
|
8
|
-
}
|
|
9
|
-
function createTestWorkflowFactory(creator) {
|
|
10
|
-
return creator;
|
|
11
|
-
}
|