@compilr-dev/agents 0.5.5 → 0.5.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/CHANGELOG.md +24 -0
- package/dist/mcp/client.js +3 -3
- package/dist/providers/gemini-native.js +1 -1
- package/dist/tracing/hooks.js +1 -1
- package/dist/tracing/logging.js +1 -1
- package/dist/tracing/otel.js +3 -3
- package/package.json +6 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package are documented here.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
> **Beta notice:** versions in the `0.x` range may contain breaking changes
|
|
9
|
+
> between minors. Read each release entry before upgrading.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [Unreleased]
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
For full git history see the repository commit log. Older `0.x` entries will be
|
|
24
|
+
backfilled here over time.
|
package/dist/mcp/client.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { MCPError, MCPErrorCode, createSDKNotInstalledError } from './errors.js';
|
|
9
9
|
/**
|
|
10
10
|
* Cached SDK imports
|
|
11
|
-
* Using loose constructor types to accommodate SDK version changes
|
|
11
|
+
* Using loose constructor types to accommodate SDK version changes (see comment above SDKClient)
|
|
12
12
|
*/
|
|
13
13
|
let sdkCache = null;
|
|
14
14
|
/**
|
|
@@ -205,12 +205,12 @@ export class MCPClient {
|
|
|
205
205
|
async callTool(toolName, args) {
|
|
206
206
|
const client = this.getConnectedClient();
|
|
207
207
|
try {
|
|
208
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- MCP SDK boundary, see SDKClient header comment
|
|
209
209
|
const result = await client.callTool({
|
|
210
210
|
name: toolName,
|
|
211
211
|
arguments: args,
|
|
212
212
|
});
|
|
213
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- MCP SDK boundary
|
|
214
214
|
return result;
|
|
215
215
|
}
|
|
216
216
|
catch (error) {
|
|
@@ -318,7 +318,7 @@ export class GeminiNativeProvider {
|
|
|
318
318
|
const toolId = funcCall.id ?? `tool_${String(Date.now())}_${Math.random().toString(36).slice(2, 9)}`;
|
|
319
319
|
// Capture thought signature if present (Gemini 3 attaches it to function calls)
|
|
320
320
|
// Note: thoughtSignature is not in the SDK types yet but exists on the response
|
|
321
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
321
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access -- @google/genai types lag the actual API surface
|
|
322
322
|
const signature = part.thoughtSignature;
|
|
323
323
|
chunks.push({
|
|
324
324
|
type: 'tool_use_start',
|
package/dist/tracing/hooks.js
CHANGED
|
@@ -253,7 +253,7 @@ export function createTracingHooks(manager, config = {}) {
|
|
|
253
253
|
* ```
|
|
254
254
|
*/
|
|
255
255
|
export function createLoggingHooks(
|
|
256
|
-
// eslint-disable-next-line no-console
|
|
256
|
+
// eslint-disable-next-line no-console -- callers can pass a real logger; default to console for zero-config use
|
|
257
257
|
logger = console.log) {
|
|
258
258
|
return {
|
|
259
259
|
beforeIteration: [
|
package/dist/tracing/logging.js
CHANGED
|
@@ -129,7 +129,7 @@ export function createStructuredLogger(options = {}) {
|
|
|
129
129
|
*/
|
|
130
130
|
function defaultOutput(entry) {
|
|
131
131
|
const json = JSON.stringify(entry);
|
|
132
|
-
/* eslint-disable no-console */
|
|
132
|
+
/* eslint-disable no-console -- this IS the default console output sink; callers can pass a custom output */
|
|
133
133
|
switch (entry.level) {
|
|
134
134
|
case 'debug':
|
|
135
135
|
console.debug(json);
|
package/dist/tracing/otel.js
CHANGED
|
@@ -35,10 +35,10 @@ async function getOTelSDK() {
|
|
|
35
35
|
try {
|
|
36
36
|
// Use dynamic import with string to avoid TypeScript trying to resolve the module
|
|
37
37
|
const modulePath = '@opentelemetry/api';
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- optional peer dep loaded via dynamic-import string; types unavailable at compile time
|
|
39
39
|
const api = await import(modulePath);
|
|
40
40
|
otelCache = {
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- optional peer dep, see above
|
|
42
42
|
trace: api.trace,
|
|
43
43
|
};
|
|
44
44
|
return otelCache;
|
|
@@ -132,7 +132,7 @@ export async function createOTelExporter(tracerName = 'agent-tracing', tracerVer
|
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
134
|
export function createConsoleExporter(options = {}) {
|
|
135
|
-
// eslint-disable-next-line no-console
|
|
135
|
+
// eslint-disable-next-line no-console -- console exporter — callers expect output to go to the console by default
|
|
136
136
|
const { prettyPrint = true, output = console.log } = options;
|
|
137
137
|
return {
|
|
138
138
|
name: 'console',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/agents",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Lightweight multi-LLM agent library for building CLI AI assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"CHANGELOG.md"
|
|
16
18
|
],
|
|
19
|
+
"sideEffects": false,
|
|
17
20
|
"scripts": {
|
|
18
21
|
"build": "tsc",
|
|
19
22
|
"clean": "rm -rf dist",
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
},
|
|
50
53
|
"homepage": "https://github.com/compilr-dev/agents#readme",
|
|
51
54
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
55
|
+
"node": ">=20.0.0"
|
|
53
56
|
},
|
|
54
57
|
"peerDependencies": {
|
|
55
58
|
"@anthropic-ai/sdk": ">=0.72.1",
|