illuma-agents 1.0.11 → 1.0.12
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/cjs/agents/AgentContext.cjs +10 -2
- package/dist/cjs/agents/AgentContext.cjs.map +1 -1
- package/dist/cjs/graphs/Graph.cjs +18 -1
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/index.cjs +1 -1
- package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
- package/dist/cjs/llm/bedrock/index.cjs +1 -1
- package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
- package/dist/cjs/llm/google/index.cjs +1 -1
- package/dist/cjs/llm/google/index.cjs.map +1 -1
- package/dist/cjs/llm/openai/index.cjs +6 -6
- package/dist/cjs/llm/openai/index.cjs.map +1 -1
- package/dist/cjs/llm/openrouter/index.cjs +1 -1
- package/dist/cjs/llm/openrouter/index.cjs.map +1 -1
- package/dist/esm/agents/AgentContext.mjs +10 -2
- package/dist/esm/agents/AgentContext.mjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +19 -2
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/llm/anthropic/index.mjs +1 -1
- package/dist/esm/llm/anthropic/index.mjs.map +1 -1
- package/dist/esm/llm/bedrock/index.mjs +1 -1
- package/dist/esm/llm/bedrock/index.mjs.map +1 -1
- package/dist/esm/llm/google/index.mjs +1 -1
- package/dist/esm/llm/google/index.mjs.map +1 -1
- package/dist/esm/llm/openai/index.mjs +6 -6
- package/dist/esm/llm/openai/index.mjs.map +1 -1
- package/dist/esm/llm/openrouter/index.mjs +1 -1
- package/dist/esm/llm/openrouter/index.mjs.map +1 -1
- package/dist/types/agents/AgentContext.d.ts +8 -1
- package/dist/types/llm/anthropic/index.d.ts +1 -1
- package/dist/types/llm/google/index.d.ts +1 -1
- package/dist/types/llm/openai/index.d.ts +3 -3
- package/dist/types/llm/openrouter/index.d.ts +1 -1
- package/dist/types/types/graph.d.ts +7 -0
- package/package.json +1 -7
- package/src/agents/AgentContext.ts +11 -0
- package/src/graphs/Graph.ts +25 -1
- package/src/llm/anthropic/index.ts +2 -2
- package/src/llm/bedrock/index.ts +1 -1
- package/src/llm/google/index.ts +2 -2
- package/src/llm/openai/index.ts +9 -9
- package/src/llm/openrouter/index.ts +2 -2
- package/src/scripts/programmatic_exec.ts +2 -2
- package/src/scripts/tool_search_regex.ts +2 -2
- package/src/tools/__tests__/ProgrammaticToolCalling.integration.test.ts +2 -2
- package/src/tools/__tests__/ToolSearchRegex.integration.test.ts +2 -2
- package/src/types/graph.ts +7 -0
package/src/llm/bedrock/index.ts
CHANGED
package/src/llm/google/index.ts
CHANGED
|
@@ -122,8 +122,8 @@ export class CustomChatGoogleGenerativeAI extends ChatGoogleGenerativeAI {
|
|
|
122
122
|
this.streamUsage = fields.streamUsage ?? this.streamUsage;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
static lc_name(): '
|
|
126
|
-
return '
|
|
125
|
+
static lc_name(): 'IllumaGoogleGenerativeAI' {
|
|
126
|
+
return 'IllumaGoogleGenerativeAI';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
package/src/llm/openai/index.ts
CHANGED
|
@@ -211,7 +211,7 @@ export class ChatOpenAI extends OriginalChatOpenAI<t.ChatOpenAICallOptions> {
|
|
|
211
211
|
return this.client;
|
|
212
212
|
}
|
|
213
213
|
static lc_name(): string {
|
|
214
|
-
return '
|
|
214
|
+
return 'IllumaOpenAI';
|
|
215
215
|
}
|
|
216
216
|
protected _getClientOptions(
|
|
217
217
|
options?: OpenAICoreRequestOptions
|
|
@@ -466,8 +466,8 @@ export class AzureChatOpenAI extends OriginalAzureChatOpenAI {
|
|
|
466
466
|
public get exposedClient(): CustomOpenAIClient {
|
|
467
467
|
return this.client;
|
|
468
468
|
}
|
|
469
|
-
static lc_name(): '
|
|
470
|
-
return '
|
|
469
|
+
static lc_name(): 'IllumaAzureOpenAI' {
|
|
470
|
+
return 'IllumaAzureOpenAI';
|
|
471
471
|
}
|
|
472
472
|
/**
|
|
473
473
|
* Returns backwards compatible reasoning parameters from constructor params and call options
|
|
@@ -539,8 +539,8 @@ export class AzureChatOpenAI extends OriginalAzureChatOpenAI {
|
|
|
539
539
|
...params.defaultHeaders,
|
|
540
540
|
'User-Agent':
|
|
541
541
|
defaultHeaders['User-Agent'] != null
|
|
542
|
-
? `${defaultHeaders['User-Agent']}:
|
|
543
|
-
: '
|
|
542
|
+
? `${defaultHeaders['User-Agent']}: illuma-azure-openai-v2`
|
|
543
|
+
: 'illuma-azure-openai-v2',
|
|
544
544
|
};
|
|
545
545
|
|
|
546
546
|
this.client = new CustomAzureOpenAIClient({
|
|
@@ -613,8 +613,8 @@ export class ChatDeepSeek extends OriginalChatDeepSeek {
|
|
|
613
613
|
public get exposedClient(): CustomOpenAIClient {
|
|
614
614
|
return this.client;
|
|
615
615
|
}
|
|
616
|
-
static lc_name(): '
|
|
617
|
-
return '
|
|
616
|
+
static lc_name(): 'IllumaDeepSeek' {
|
|
617
|
+
return 'IllumaDeepSeek';
|
|
618
618
|
}
|
|
619
619
|
protected _getClientOptions(
|
|
620
620
|
options?: OpenAICoreRequestOptions
|
|
@@ -814,8 +814,8 @@ export class ChatXAI extends OriginalChatXAI {
|
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
|
|
817
|
-
static lc_name(): '
|
|
818
|
-
return '
|
|
817
|
+
static lc_name(): 'IllumaXAI' {
|
|
818
|
+
return 'IllumaXAI';
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
public get exposedClient(): CustomOpenAIClient {
|
|
@@ -44,8 +44,8 @@ export class ChatOpenRouter extends ChatOpenAI {
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
static lc_name(): '
|
|
48
|
-
return '
|
|
47
|
+
static lc_name(): 'IllumaOpenRouter' {
|
|
48
|
+
return 'IllumaOpenRouter';
|
|
49
49
|
}
|
|
50
50
|
protected override _convertOpenAIDeltaToBaseMessageChunk(
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -94,10 +94,10 @@ async function main(): Promise<void> {
|
|
|
94
94
|
console.log('==============================================');
|
|
95
95
|
console.log('Demonstrating runtime toolMap injection\n');
|
|
96
96
|
|
|
97
|
-
const apiKey = process.env.
|
|
97
|
+
const apiKey = process.env.CODE_EXECUTOR_API_KEY;
|
|
98
98
|
if (!apiKey) {
|
|
99
99
|
console.error(
|
|
100
|
-
'Error:
|
|
100
|
+
'Error: CODE_EXECUTOR_API_KEY environment variable is not set.'
|
|
101
101
|
);
|
|
102
102
|
console.log('Please set it in your .env file or environment.');
|
|
103
103
|
process.exit(1);
|
|
@@ -66,10 +66,10 @@ async function main(): Promise<void> {
|
|
|
66
66
|
console.log('================================');
|
|
67
67
|
console.log('Demonstrating runtime tool registry injection\n');
|
|
68
68
|
|
|
69
|
-
const apiKey = process.env.
|
|
69
|
+
const apiKey = process.env.CODE_EXECUTOR_API_KEY;
|
|
70
70
|
if (!apiKey) {
|
|
71
71
|
console.error(
|
|
72
|
-
'Error:
|
|
72
|
+
'Error: CODE_EXECUTOR_API_KEY environment variable is not set.'
|
|
73
73
|
);
|
|
74
74
|
console.log('Please set it in your .env file or environment.');
|
|
75
75
|
process.exit(1);
|
|
@@ -25,10 +25,10 @@ describe('ProgrammaticToolCalling - Live API Integration', () => {
|
|
|
25
25
|
let toolDefinitions: t.LCTool[];
|
|
26
26
|
|
|
27
27
|
beforeAll(() => {
|
|
28
|
-
const apiKey = process.env.
|
|
28
|
+
const apiKey = process.env.CODE_EXECUTOR_API_KEY;
|
|
29
29
|
if (apiKey == null || apiKey === '') {
|
|
30
30
|
throw new Error(
|
|
31
|
-
'
|
|
31
|
+
'CODE_EXECUTOR_API_KEY not set. Required for integration tests.'
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -17,10 +17,10 @@ describe('ToolSearchRegex - Live API Integration', () => {
|
|
|
17
17
|
const toolRegistry = createToolSearchToolRegistry();
|
|
18
18
|
|
|
19
19
|
beforeAll(() => {
|
|
20
|
-
const apiKey = process.env.
|
|
20
|
+
const apiKey = process.env.CODE_EXECUTOR_API_KEY;
|
|
21
21
|
if (apiKey == null || apiKey === '') {
|
|
22
22
|
throw new Error(
|
|
23
|
-
'
|
|
23
|
+
'CODE_EXECUTOR_API_KEY not set. Required for integration tests.'
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
|
package/src/types/graph.ts
CHANGED
|
@@ -375,4 +375,11 @@ export interface AgentInputs {
|
|
|
375
375
|
* Maps tool name to LCTool definition.
|
|
376
376
|
*/
|
|
377
377
|
toolRegistry?: Map<string, LCTool>;
|
|
378
|
+
/**
|
|
379
|
+
* Dynamic context that changes per-request (e.g., current time, user info).
|
|
380
|
+
* This is injected as a user message rather than system prompt to preserve cache.
|
|
381
|
+
* Keeping this separate from instructions ensures the system message stays static
|
|
382
|
+
* and can be cached by Bedrock/Anthropic prompt caching.
|
|
383
|
+
*/
|
|
384
|
+
dynamicContext?: string;
|
|
378
385
|
}
|