@memorilabs/memori 0.0.6 → 0.0.8
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/dist/engines/augmentation.d.ts +3 -0
- package/dist/engines/augmentation.d.ts.map +1 -1
- package/dist/engines/augmentation.js +34 -6
- package/dist/engines/augmentation.js.map +1 -1
- package/dist/integrations/base.d.ts +12 -3
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/base.js +34 -11
- package/dist/integrations/base.js.map +1 -1
- package/dist/integrations/openclaw.js +1 -1
- package/dist/integrations/openclaw.js.map +1 -1
- package/dist/types/integrations.d.ts +34 -0
- package/dist/types/integrations.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -2,12 +2,15 @@ import { CallContext, LLMRequest, LLMResponse } from '@memorilabs/axon';
|
|
|
2
2
|
import { Api } from '../core/network.js';
|
|
3
3
|
import { Config } from '../core/config.js';
|
|
4
4
|
import { SessionManager } from '../core/session.js';
|
|
5
|
+
import { Trace } from '../types/integrations.js';
|
|
5
6
|
export declare class AugmentationEngine {
|
|
6
7
|
private readonly api;
|
|
7
8
|
private readonly config;
|
|
8
9
|
private readonly session;
|
|
9
10
|
constructor(api: Api, config: Config, session: SessionManager);
|
|
11
|
+
private prepareAugmentationData;
|
|
10
12
|
handleAugmentation(req: LLMRequest, res: LLMResponse, ctx: CallContext): Promise<LLMResponse>;
|
|
13
|
+
handleAgentAugmentation(req: LLMRequest, res: LLMResponse, ctx: CallContext, trace?: Trace | null, summary?: string | null): Promise<LLMResponse>;
|
|
11
14
|
private buildMeta;
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=augmentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmentation.d.ts","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"augmentation.d.ts","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc;IAG1C,OAAO,CAAC,uBAAuB;IAmBxB,kBAAkB,CACvB,GAAG,EAAE,UAAU,EACf,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,WAAW,GACf,OAAO,CAAC,WAAW,CAAC;IAkBhB,uBAAuB,CAC5B,GAAG,EAAE,UAAU,EACf,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,WAAW,EAChB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,EACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,WAAW,CAAC;IAoBvB,OAAO,CAAC,SAAS;CAuBlB"}
|
|
@@ -9,21 +9,31 @@ export class AugmentationEngine {
|
|
|
9
9
|
this.config = config;
|
|
10
10
|
this.session = session;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
prepareAugmentationData(req, res, ctx) {
|
|
13
13
|
const sessionId = this.session.id;
|
|
14
14
|
if (!sessionId)
|
|
15
|
-
return
|
|
15
|
+
return null;
|
|
16
16
|
const lastUserMessage = extractLastUserMessage(req.messages);
|
|
17
17
|
if (!lastUserMessage)
|
|
18
|
-
return
|
|
18
|
+
return null;
|
|
19
19
|
const messages = [
|
|
20
20
|
{ role: 'user', content: lastUserMessage },
|
|
21
21
|
{ role: 'assistant', content: res.content },
|
|
22
22
|
];
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
return {
|
|
24
|
+
sessionId,
|
|
25
|
+
messages,
|
|
25
26
|
meta: this.buildMeta(req, ctx),
|
|
26
|
-
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
handleAugmentation(req, res, ctx) {
|
|
30
|
+
const data = this.prepareAugmentationData(req, res, ctx);
|
|
31
|
+
if (!data)
|
|
32
|
+
return Promise.resolve(res);
|
|
33
|
+
const payload = {
|
|
34
|
+
conversation: { messages: data.messages, summary: null },
|
|
35
|
+
meta: data.meta,
|
|
36
|
+
session: { id: data.sessionId },
|
|
27
37
|
};
|
|
28
38
|
// Fire-and-forget
|
|
29
39
|
this.api.post('cloud/augmentation', payload).catch((e) => {
|
|
@@ -32,6 +42,24 @@ export class AugmentationEngine {
|
|
|
32
42
|
});
|
|
33
43
|
return Promise.resolve(res);
|
|
34
44
|
}
|
|
45
|
+
handleAgentAugmentation(req, res, ctx, trace, summary) {
|
|
46
|
+
const data = this.prepareAugmentationData(req, res, ctx);
|
|
47
|
+
if (!data)
|
|
48
|
+
return Promise.resolve(res);
|
|
49
|
+
const payload = {
|
|
50
|
+
conversation: { messages: data.messages },
|
|
51
|
+
summary: summary || null,
|
|
52
|
+
trace: trace || null,
|
|
53
|
+
meta: data.meta,
|
|
54
|
+
session: { id: data.sessionId },
|
|
55
|
+
};
|
|
56
|
+
// Fire-and-forget to the dedicated agent endpoint
|
|
57
|
+
this.api.post('agent/augmentation', payload).catch((e) => {
|
|
58
|
+
if (this.config.testMode)
|
|
59
|
+
console.warn('Agent Augmentation failed:', e);
|
|
60
|
+
});
|
|
61
|
+
return Promise.resolve(res);
|
|
62
|
+
}
|
|
35
63
|
buildMeta(req, ctx) {
|
|
36
64
|
return {
|
|
37
65
|
attribution: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmentation.js","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"augmentation.js","sourceRoot":"","sources":["../../src/engines/augmentation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,OAAO,kBAAkB;IAEV;IACA;IACA;IAHnB,YACmB,GAAQ,EACR,MAAc,EACd,OAAuB;QAFvB,QAAG,GAAH,GAAG,CAAK;QACR,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAgB;IACvC,CAAC;IAEI,uBAAuB,CAAC,GAAe,EAAE,GAAgB,EAAE,GAAgB;QACjF,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAE5B,MAAM,eAAe,GAAG,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe;YAAE,OAAO,IAAI,CAAC;QAElC,MAAM,QAAQ,GAAG;YACf,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE;YAC1C,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;SAC5C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ACJ,CAAC;CACF"}
|
|
@@ -5,14 +5,15 @@ import { MemoriCore, IntegrationRequest } from '../types/integrations.js';
|
|
|
5
5
|
* Provides common functionality for translating framework-specific data formats
|
|
6
6
|
* (like OpenClaw messages) into Axon's internal LLM request/response format.
|
|
7
7
|
*
|
|
8
|
-
* This class is internal to the SDK - framework integrations should extend it
|
|
9
|
-
* and implement their own public-facing methods.
|
|
10
|
-
*
|
|
11
8
|
* @internal
|
|
12
9
|
*/
|
|
13
10
|
export declare abstract class BaseIntegration {
|
|
14
11
|
protected readonly core: MemoriCore;
|
|
15
12
|
constructor(core: MemoriCore);
|
|
13
|
+
/**
|
|
14
|
+
* Helper to construct Axon-compatible request payloads from the unified integration format.
|
|
15
|
+
*/
|
|
16
|
+
private buildSyntheticPayload;
|
|
16
17
|
/**
|
|
17
18
|
* Internal helper: Captures a conversation turn by translating it into Axon format
|
|
18
19
|
* and feeding it to both the Persistence and Augmentation engines.
|
|
@@ -21,6 +22,14 @@ export declare abstract class BaseIntegration {
|
|
|
21
22
|
* @internal
|
|
22
23
|
*/
|
|
23
24
|
protected executeAugmentation(req: IntegrationRequest): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Internal helper: Captures an agentic conversation turn by translating it into Axon format
|
|
27
|
+
* and feeding it to both the Persistence and Augmentation engines, including tool traces.
|
|
28
|
+
*
|
|
29
|
+
* @param req - The unified integration message containing user text, agent text, trace, and metadata
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
protected executeAgentAugmentation(req: IntegrationRequest): Promise<void>;
|
|
24
33
|
/**
|
|
25
34
|
* Internal helper: Recalls memories by translating the query into Axon format,
|
|
26
35
|
* passing it through the Recall engine, and extracting the injected system prompt.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;;;;;GAOG;AACH,8BAAsB,eAAe;IACvB,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;gBAAhB,IAAI,EAAE,UAAU;IAE/C;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAmB7B;;;;;;OAMG;cACa,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAa3E;;;;;;OAMG;cACa,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhF;;;;;;;OAOG;cACa,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAsBhF"}
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* Provides common functionality for translating framework-specific data formats
|
|
5
5
|
* (like OpenClaw messages) into Axon's internal LLM request/response format.
|
|
6
6
|
*
|
|
7
|
-
* This class is internal to the SDK - framework integrations should extend it
|
|
8
|
-
* and implement their own public-facing methods.
|
|
9
|
-
*
|
|
10
7
|
* @internal
|
|
11
8
|
*/
|
|
12
9
|
export class BaseIntegration {
|
|
@@ -15,15 +12,9 @@ export class BaseIntegration {
|
|
|
15
12
|
this.core = core;
|
|
16
13
|
}
|
|
17
14
|
/**
|
|
18
|
-
*
|
|
19
|
-
* and feeding it to both the Persistence and Augmentation engines.
|
|
20
|
-
*
|
|
21
|
-
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
22
|
-
* @internal
|
|
15
|
+
* Helper to construct Axon-compatible request payloads from the unified integration format.
|
|
23
16
|
*/
|
|
24
|
-
|
|
25
|
-
if (!this.core.session.id)
|
|
26
|
-
return;
|
|
17
|
+
buildSyntheticPayload(req) {
|
|
27
18
|
const syntheticReq = {
|
|
28
19
|
messages: [{ role: 'user', content: req.userMessage }],
|
|
29
20
|
model: req.metadata?.model || '',
|
|
@@ -36,6 +27,19 @@ export class BaseIntegration {
|
|
|
36
27
|
startedAt: new Date(),
|
|
37
28
|
metadata: req.metadata,
|
|
38
29
|
};
|
|
30
|
+
return { syntheticReq, syntheticRes, syntheticCtx };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Internal helper: Captures a conversation turn by translating it into Axon format
|
|
34
|
+
* and feeding it to both the Persistence and Augmentation engines.
|
|
35
|
+
*
|
|
36
|
+
* @param req - The unified integration message containing user text, agent text, and metadata
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
async executeAugmentation(req) {
|
|
40
|
+
if (!this.core.session.id)
|
|
41
|
+
return;
|
|
42
|
+
const { syntheticReq, syntheticRes, syntheticCtx } = this.buildSyntheticPayload(req);
|
|
39
43
|
try {
|
|
40
44
|
await this.core.persistence.handlePersistence(syntheticReq, syntheticRes, syntheticCtx);
|
|
41
45
|
await this.core.augmentation.handleAugmentation(syntheticReq, syntheticRes, syntheticCtx);
|
|
@@ -44,6 +48,25 @@ export class BaseIntegration {
|
|
|
44
48
|
console.warn('Memori Integration Capture failed:', e);
|
|
45
49
|
}
|
|
46
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Internal helper: Captures an agentic conversation turn by translating it into Axon format
|
|
53
|
+
* and feeding it to both the Persistence and Augmentation engines, including tool traces.
|
|
54
|
+
*
|
|
55
|
+
* @param req - The unified integration message containing user text, agent text, trace, and metadata
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
async executeAgentAugmentation(req) {
|
|
59
|
+
if (!this.core.session.id)
|
|
60
|
+
return;
|
|
61
|
+
const { syntheticReq, syntheticRes, syntheticCtx } = this.buildSyntheticPayload(req);
|
|
62
|
+
try {
|
|
63
|
+
await this.core.persistence.handlePersistence(syntheticReq, syntheticRes, syntheticCtx);
|
|
64
|
+
await this.core.augmentation.handleAgentAugmentation(syntheticReq, syntheticRes, syntheticCtx, req.trace, req.summary);
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
console.warn('Memori Integration Capture failed:', e);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
47
70
|
/**
|
|
48
71
|
* Internal helper: Recalls memories by translating the query into Axon format,
|
|
49
72
|
* passing it through the Recall engine, and extracting the injected system prompt.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,OAAgB,eAAe;IACJ;IAA/B,YAA+B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEnD;;OAEG;IACK,qBAAqB,CAAC,GAAuB;QACnD,MAAM,YAAY,GAAe;YAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC;YACtD,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;SACjC,CAAC;QAEF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,GAAG,CAAC,aAAa;SAC3B,CAAC;QAEF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,qBAAqB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE,GAAG,CAAC,QAA8C;SAC7D,CAAC;QAEF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACO,KAAK,CAAC,mBAAmB,CAAC,GAAuB;QACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAO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QAE5C,MAAM,YAAY,GAAe;YAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;SACnD,CAAC;QAEF,MAAM,YAAY,GAAgB;YAChC,OAAO,EAAE,qBAAqB,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE,EAAE;SACb,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YACnF,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;YACvE,OAAO,SAAS,EAAE,OAAO,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YACrD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -36,7 +36,7 @@ export class OpenClawIntegration extends BaseIntegration {
|
|
|
36
36
|
* @throws Does not throw - errors are logged but swallowed to prevent disrupting the agent
|
|
37
37
|
*/
|
|
38
38
|
async augmentation(req) {
|
|
39
|
-
await this.
|
|
39
|
+
await this.executeAgentAugmentation(req);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Retrieves relevant memories for the given prompt and returns formatted context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw.js","sourceRoot":"","sources":["../../src/integrations/openclaw.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD;;;;;;OAMG;IACI,cAAc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AAU,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -16,6 +16,32 @@ export interface MemoriCore {
|
|
|
16
16
|
config: Config;
|
|
17
17
|
session: SessionManager;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents a single tool execution captured during an agent's conversation turn.
|
|
21
|
+
*/
|
|
22
|
+
export interface ToolCall {
|
|
23
|
+
/**
|
|
24
|
+
* The name of the tool or function executed by the agent.
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* The arguments passed to the tool, parsed as a key-value record.
|
|
29
|
+
*/
|
|
30
|
+
args: Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* The raw result returned by the tool execution.
|
|
33
|
+
*/
|
|
34
|
+
result: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents an agentic execution trace containing tool calls made during a conversation turn.
|
|
38
|
+
*/
|
|
39
|
+
export interface Trace {
|
|
40
|
+
/**
|
|
41
|
+
* An ordered list of tool calls executed by the agent before its final response.
|
|
42
|
+
*/
|
|
43
|
+
tools: ToolCall[];
|
|
44
|
+
}
|
|
19
45
|
/**
|
|
20
46
|
* Represents a single turn of conversation to be captured by Memori.
|
|
21
47
|
* This payload is used by framework integrations to send user and agent messages
|
|
@@ -36,6 +62,14 @@ export interface IntegrationRequest {
|
|
|
36
62
|
* Optional telemetry and contextual metadata about the LLM execution.
|
|
37
63
|
*/
|
|
38
64
|
metadata?: IntegrationMetadata;
|
|
65
|
+
/**
|
|
66
|
+
* Optional summary of the interaction turn.
|
|
67
|
+
*/
|
|
68
|
+
summary?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Optional agentic execution trace containing tool calls and their results.
|
|
71
|
+
*/
|
|
72
|
+
trace?: Trace;
|
|
39
73
|
}
|
|
40
74
|
/**
|
|
41
75
|
* Telemetry and execution metadata associated with a conversation turn.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/types/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/types/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,WA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,KAAK,IAAI,EAAE,UAAU,KAAK,CAAC,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.8";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = '0.0.
|
|
1
|
+
export const SDK_VERSION = '0.0.8';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|