@compresr/sdk 1.6.2 → 1.6.4
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/index.d.ts +1 -0
- package/dist/cjs/agents/index.d.ts.map +1 -1
- package/dist/cjs/agents/index.js +8 -1
- package/dist/cjs/agents/index.js.map +1 -1
- package/dist/cjs/agents/research/types.d.ts +1 -18
- package/dist/cjs/agents/research/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/agents/index.d.ts +1 -0
- package/dist/esm/agents/index.d.ts.map +1 -1
- package/dist/esm/agents/index.js +3 -0
- package/dist/esm/agents/index.js.map +1 -1
- package/dist/esm/agents/research/types.d.ts +1 -18
- package/dist/esm/agents/research/types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +11 -1
|
@@ -20,4 +20,5 @@ export { openaiChatCompletions, type OpenAIChatFacade, type OpenAICompletionsFac
|
|
|
20
20
|
export { nativeRun, type NativeRunOptions } from './facades/native.js';
|
|
21
21
|
export { type AnthropicMessage, type ContentBlock, type TextBlock, type ToolUseBlock, type AnthropicUsage, toAnthropicMessage, } from './schemas/anthropic.js';
|
|
22
22
|
export { type ChatCompletion, type ChatMessage, type Choice, type FunctionCall, type ToolCall, type OpenAIUsage, toChatCompletion, } from './schemas/openai.js';
|
|
23
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, type ResearchAgentOptions, type ResearchAgentRunOptions, type ResearchRunOptions, type ParsedResearch, type ResearchResult, type ResearchUsage, type Step, type StepKind, type Citation as ResearchCitation, } from './research/index.js';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,qBAAqB,E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1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toChatCompletion = exports.toAnthropicMessage = exports.nativeRun = exports.openaiChatCompletions = exports.anthropicMessages = exports.emptyNormalizedResult = exports.defaultCompresrStats = exports.createWebSearchTool = exports.WebSearchTool = exports.parseLlmSpec = exports.CompresrEngine = void 0;
|
|
3
|
+
exports.DEFAULT_RESEARCH_SYSTEM_PROMPT = exports.parseResearchOutput = exports.ResearchFacade = exports.ResearchAgent = exports.toChatCompletion = exports.toAnthropicMessage = exports.nativeRun = exports.openaiChatCompletions = exports.anthropicMessages = exports.emptyNormalizedResult = exports.defaultCompresrStats = exports.createWebSearchTool = exports.WebSearchTool = exports.parseLlmSpec = exports.CompresrEngine = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Compresr agents — provider-shape facades over LangChain.js.
|
|
6
6
|
*
|
|
@@ -34,4 +34,11 @@ var anthropic_js_2 = require("./schemas/anthropic.js");
|
|
|
34
34
|
Object.defineProperty(exports, "toAnthropicMessage", { enumerable: true, get: function () { return anthropic_js_2.toAnthropicMessage; } });
|
|
35
35
|
var openai_js_2 = require("./schemas/openai.js");
|
|
36
36
|
Object.defineProperty(exports, "toChatCompletion", { enumerable: true, get: function () { return openai_js_2.toChatCompletion; } });
|
|
37
|
+
// `Citation` is aliased to `ResearchCitation` to avoid clashing with the
|
|
38
|
+
// normalized-result `Citation` exported above (different shape).
|
|
39
|
+
var index_js_2 = require("./research/index.js");
|
|
40
|
+
Object.defineProperty(exports, "ResearchAgent", { enumerable: true, get: function () { return index_js_2.ResearchAgent; } });
|
|
41
|
+
Object.defineProperty(exports, "ResearchFacade", { enumerable: true, get: function () { return index_js_2.ResearchFacade; } });
|
|
42
|
+
Object.defineProperty(exports, "parseResearchOutput", { enumerable: true, get: function () { return index_js_2.parseResearchOutput; } });
|
|
43
|
+
Object.defineProperty(exports, "DEFAULT_RESEARCH_SYSTEM_PROMPT", { enumerable: true, get: function () { return index_js_2.DEFAULT_RESEARCH_SYSTEM_PROMPT; } });
|
|
37
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yCAMqB;AALnB,2GAAA,cAAc,OAAA;AACd,yGAAA,YAAY,OAAA;AAMd,6CAK0B;AAJxB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AAKrB,iDAOyB;AAFvB,qHAAA,oBAAoB,OAAA;AACpB,sHAAA,qBAAqB,OAAA;AAGvB,uDAIgC;AAH9B,iHAAA,iBAAiB,OAAA;AAKnB,iDAK6B;AAJ3B,kHAAA,qBAAqB,OAAA;AAMvB,iDAAuE;AAA9D,sGAAA,SAAS,OAAA;AAElB,uDAOgC;AAD9B,kHAAA,kBAAkB,OAAA;AAGpB,iDAQ6B;AAD3B,6GAAA,gBAAgB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yCAMqB;AALnB,2GAAA,cAAc,OAAA;AACd,yGAAA,YAAY,OAAA;AAMd,6CAK0B;AAJxB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AAKrB,iDAOyB;AAFvB,qHAAA,oBAAoB,OAAA;AACpB,sHAAA,qBAAqB,OAAA;AAGvB,uDAIgC;AAH9B,iHAAA,iBAAiB,OAAA;AAKnB,iDAK6B;AAJ3B,kHAAA,qBAAqB,OAAA;AAMvB,iDAAuE;AAA9D,sGAAA,SAAS,OAAA;AAElB,uDAOgC;AAD9B,kHAAA,kBAAkB,OAAA;AAGpB,iDAQ6B;AAD3B,6GAAA,gBAAgB,OAAA;AAGlB,yEAAyE;AACzE,iEAAiE;AACjE,gDAc6B;AAb3B,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,+GAAA,mBAAmB,OAAA;AACnB,0HAAA,8BAA8B,OAAA"}
|
|
@@ -12,24 +12,7 @@ export interface Step {
|
|
|
12
12
|
readonly chars?: number;
|
|
13
13
|
readonly latencyS?: number;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Raw usage counts aggregated across the research loop.
|
|
17
|
-
*
|
|
18
|
-
* The SDK exposes counts only — no USD pricing. Neither Anthropic / OpenAI
|
|
19
|
-
* inference responses nor Brave / Tavily search responses carry a per-call
|
|
20
|
-
* dollar field, so any cost rollup must be done by the caller against their
|
|
21
|
-
* own (mutable) price table. Compresr's benchmark suite owns the canonical
|
|
22
|
-
* table for its experiments; downstream apps are expected to do the same.
|
|
23
|
-
*
|
|
24
|
-
* - `input_tokens` / `output_tokens` — fresh tokens, as reported by the
|
|
25
|
-
* provider's `usage` block.
|
|
26
|
-
* - `cache_read_tokens` / `cache_creation_tokens` — Anthropic ephemeral
|
|
27
|
-
* cache classes (0 elsewhere).
|
|
28
|
-
* - `calls` — LLM round-trips (one per loop step that hit the model).
|
|
29
|
-
* - `search_calls` — number of times the search tool fired. Independent of
|
|
30
|
-
* `calls` because one LLM turn can request multiple tool calls. Use this
|
|
31
|
-
* to price the per-request Brave / Tavily surcharge externally.
|
|
32
|
-
*/
|
|
15
|
+
/** Token + tool-call counts across the research loop. */
|
|
33
16
|
export interface ResearchUsage {
|
|
34
17
|
readonly input_tokens: number;
|
|
35
18
|
readonly output_tokens: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/agents/research/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAA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C;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export { setLogger, type CompresrLogger } from './logger.js';
|
|
|
21
21
|
export { MODELS, type Model } from './config/index.js';
|
|
22
22
|
export { CompresrError, AuthenticationError, ValidationError, RateLimitError, ScopeError, ServerError, ConnectionError, NotFoundError, type ErrorResponseData, } from './errors/index.js';
|
|
23
23
|
export { type CompressResponse, type CompressResult, type CompressBatchResponse, type CompressBatchResult, type CompressBatchItemResult, type StreamChunk, } from './schemas/index.js';
|
|
24
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, type ResearchAgentOptions, type ResearchAgentRunOptions, type ResearchRunOptions, type ParsedResearch, type ResearchResult, type ResearchUsage, type Step, type StepKind, } from './agents/research/index.js';
|
|
24
25
|
export { SDK_VERSION as VERSION } from './version.js';
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,iB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Aa,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,aAAa,EACb,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,QAAQ,GACd,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.VERSION = exports.NotFoundError = exports.ConnectionError = exports.ServerError = exports.ScopeError = exports.RateLimitError = exports.ValidationError = exports.AuthenticationError = exports.CompresrError = exports.MODELS = exports.setLogger = exports.createWebSearchTool = exports.WebSearchTool = exports.CompressionClient = void 0;
|
|
20
|
+
exports.VERSION = exports.DEFAULT_RESEARCH_SYSTEM_PROMPT = exports.parseResearchOutput = exports.ResearchFacade = exports.ResearchAgent = exports.NotFoundError = exports.ConnectionError = exports.ServerError = exports.ScopeError = exports.RateLimitError = exports.ValidationError = exports.AuthenticationError = exports.CompresrError = exports.MODELS = exports.setLogger = exports.createWebSearchTool = exports.WebSearchTool = exports.CompressionClient = void 0;
|
|
21
21
|
// Clients
|
|
22
22
|
var index_js_1 = require("./clients/index.js");
|
|
23
23
|
Object.defineProperty(exports, "CompressionClient", { enumerable: true, get: function () { return index_js_1.CompressionClient; } });
|
|
@@ -41,6 +41,12 @@ Object.defineProperty(exports, "ScopeError", { enumerable: true, get: function (
|
|
|
41
41
|
Object.defineProperty(exports, "ServerError", { enumerable: true, get: function () { return index_js_4.ServerError; } });
|
|
42
42
|
Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return index_js_4.ConnectionError; } });
|
|
43
43
|
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return index_js_4.NotFoundError; } });
|
|
44
|
+
// Research agent
|
|
45
|
+
var index_js_5 = require("./agents/research/index.js");
|
|
46
|
+
Object.defineProperty(exports, "ResearchAgent", { enumerable: true, get: function () { return index_js_5.ResearchAgent; } });
|
|
47
|
+
Object.defineProperty(exports, "ResearchFacade", { enumerable: true, get: function () { return index_js_5.ResearchFacade; } });
|
|
48
|
+
Object.defineProperty(exports, "parseResearchOutput", { enumerable: true, get: function () { return index_js_5.parseResearchOutput; } });
|
|
49
|
+
Object.defineProperty(exports, "DEFAULT_RESEARCH_SYSTEM_PROMPT", { enumerable: true, get: function () { return index_js_5.DEFAULT_RESEARCH_SYSTEM_PROMPT; } });
|
|
44
50
|
// Version - re-export from version.ts
|
|
45
51
|
var version_js_1 = require("./version.js");
|
|
46
52
|
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_js_1.SDK_VERSION; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,UAAU;AACV,+CAK4B;AAJ1B,6GAAA,iBAAiB,OAAA;AAMnB,2EAA2E;AAC3E,8CAS2B;AARzB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AASrB,kEAAkE;AAClE,yCAA6D;AAApD,sGAAA,SAAS,OAAA;AAElB,gBAAgB;AAChB,8CAAuD;AAA9C,kGAAA,MAAM,OAAA;AAEf,SAAS;AACT,8CAU2B;AATzB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AACnB,2GAAA,eAAe,OAAA;AACf,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AACV,uGAAA,WAAW,OAAA;AACX,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AAcf,sCAAsC;AACtC,2CAAsD;AAA7C,qGAAA,WAAW,OAAW"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,UAAU;AACV,+CAK4B;AAJ1B,6GAAA,iBAAiB,OAAA;AAMnB,2EAA2E;AAC3E,8CAS2B;AARzB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AASrB,kEAAkE;AAClE,yCAA6D;AAApD,sGAAA,SAAS,OAAA;AAElB,gBAAgB;AAChB,8CAAuD;AAA9C,kGAAA,MAAM,OAAA;AAEf,SAAS;AACT,8CAU2B;AATzB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AACnB,2GAAA,eAAe,OAAA;AACf,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AACV,uGAAA,WAAW,OAAA;AACX,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AAcf,iBAAiB;AACjB,uDAaoC;AAZlC,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,+GAAA,mBAAmB,OAAA;AACnB,0HAAA,8BAA8B,OAAA;AAWhC,sCAAsC;AACtC,2CAAsD;AAA7C,qGAAA,WAAW,OAAW"}
|
|
@@ -20,4 +20,5 @@ export { openaiChatCompletions, type OpenAIChatFacade, type OpenAICompletionsFac
|
|
|
20
20
|
export { nativeRun, type NativeRunOptions } from './facades/native.js';
|
|
21
21
|
export { type AnthropicMessage, type ContentBlock, type TextBlock, type ToolUseBlock, type AnthropicUsage, toAnthropicMessage, } from './schemas/anthropic.js';
|
|
22
22
|
export { type ChatCompletion, type ChatMessage, type Choice, type FunctionCall, type ToolCall, type OpenAIUsage, toChatCompletion, } from './schemas/openai.js';
|
|
23
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, type ResearchAgentOptions, type ResearchAgentRunOptions, type ResearchRunOptions, type ParsedResearch, type ResearchResult, type ResearchUsage, type Step, type StepKind, type Citation as ResearchCitation, } from './research/index.js';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,IAAI,gBAAgB,GAClC,MAAM,qBAAqB,CAAC"}
|
package/dist/esm/agents/index.js
CHANGED
|
@@ -20,4 +20,7 @@ export { openaiChatCompletions, } from './facades/openai.js';
|
|
|
20
20
|
export { nativeRun } from './facades/native.js';
|
|
21
21
|
export { toAnthropicMessage, } from './schemas/anthropic.js';
|
|
22
22
|
export { toChatCompletion, } from './schemas/openai.js';
|
|
23
|
+
// `Citation` is aliased to `ResearchCitation` to avoid clashing with the
|
|
24
|
+
// normalized-result `Citation` exported above (different shape).
|
|
25
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, } from './research/index.js';
|
|
23
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,GAIb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,GAGlB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAyB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAML,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,cAAc,EACd,YAAY,GAIb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,GAGlB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAyB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAML,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,yEAAyE;AACzE,iEAAiE;AACjE,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,8BAA8B,GAU/B,MAAM,qBAAqB,CAAC"}
|
|
@@ -12,24 +12,7 @@ export interface Step {
|
|
|
12
12
|
readonly chars?: number;
|
|
13
13
|
readonly latencyS?: number;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Raw usage counts aggregated across the research loop.
|
|
17
|
-
*
|
|
18
|
-
* The SDK exposes counts only — no USD pricing. Neither Anthropic / OpenAI
|
|
19
|
-
* inference responses nor Brave / Tavily search responses carry a per-call
|
|
20
|
-
* dollar field, so any cost rollup must be done by the caller against their
|
|
21
|
-
* own (mutable) price table. Compresr's benchmark suite owns the canonical
|
|
22
|
-
* table for its experiments; downstream apps are expected to do the same.
|
|
23
|
-
*
|
|
24
|
-
* - `input_tokens` / `output_tokens` — fresh tokens, as reported by the
|
|
25
|
-
* provider's `usage` block.
|
|
26
|
-
* - `cache_read_tokens` / `cache_creation_tokens` — Anthropic ephemeral
|
|
27
|
-
* cache classes (0 elsewhere).
|
|
28
|
-
* - `calls` — LLM round-trips (one per loop step that hit the model).
|
|
29
|
-
* - `search_calls` — number of times the search tool fired. Independent of
|
|
30
|
-
* `calls` because one LLM turn can request multiple tool calls. Use this
|
|
31
|
-
* to price the per-request Brave / Tavily surcharge externally.
|
|
32
|
-
*/
|
|
15
|
+
/** Token + tool-call counts across the research loop. */
|
|
33
16
|
export interface ResearchUsage {
|
|
34
17
|
readonly input_tokens: number;
|
|
35
18
|
readonly output_tokens: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/agents/research/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/agents/research/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;A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Q,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export { setLogger, type CompresrLogger } from './logger.js';
|
|
|
21
21
|
export { MODELS, type Model } from './config/index.js';
|
|
22
22
|
export { CompresrError, AuthenticationError, ValidationError, RateLimitError, ScopeError, ServerError, ConnectionError, NotFoundError, type ErrorResponseData, } from './errors/index.js';
|
|
23
23
|
export { type CompressResponse, type CompressResult, type CompressBatchResponse, type CompressBatchResult, type CompressBatchItemResult, type StreamChunk, } from './schemas/index.js';
|
|
24
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, type ResearchAgentOptions, type ResearchAgentRunOptions, type ResearchRunOptions, type ParsedResearch, type ResearchResult, type ResearchUsage, type Step, type StepKind, } from './agents/research/index.js';
|
|
24
25
|
export { SDK_VERSION as VERSION } from './version.js';
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,mBAAmB,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A8B,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,QAAQ,GACd,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -25,6 +25,8 @@ export { setLogger } from './logger.js';
|
|
|
25
25
|
export { MODELS } from './config/index.js';
|
|
26
26
|
// Errors
|
|
27
27
|
export { CompresrError, AuthenticationError, ValidationError, RateLimitError, ScopeError, ServerError, ConnectionError, NotFoundError, } from './errors/index.js';
|
|
28
|
+
// Research agent
|
|
29
|
+
export { ResearchAgent, ResearchFacade, parseResearchOutput, DEFAULT_RESEARCH_SYSTEM_PROMPT, } from './agents/research/index.js';
|
|
28
30
|
// Version - re-export from version.ts
|
|
29
31
|
export { SDK_VERSION as VERSION } from './version.js';
|
|
30
32
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,UAAU;AACV,OAAO,EACL,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAE5B,2EAA2E;AAC3E,OAAO,EACL,aAAa,EACb,mBAAmB,GAOpB,MAAM,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAC;AAE7D,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAc,MAAM,mBAAmB,CAAC;AAEvD,SAAS;AACT,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,aAAa,GAEd,MAAM,mBAAmB,CAAC;AAY3B,sCAAsC;AACtC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,UAAU;AACV,OAAO,EACL,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAE5B,2EAA2E;AAC3E,OAAO,EACL,aAAa,EACb,mBAAmB,GAOpB,MAAM,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAC;AAE7D,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAc,MAAM,mBAAmB,CAAC;AAEvD,SAAS;AACT,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,aAAa,GAEd,MAAM,mBAAmB,CAAC;AAY3B,iBAAiB;AACjB,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,8BAA8B,GAS/B,MAAM,4BAA4B,CAAC;AAEpC,sCAAsC;AACtC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compresr/sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "TypeScript SDK for Compresr - Intelligent context compression to reduce LLM API costs by 30-70%",
|
|
5
5
|
"author": "Compresr Team <founders@compresr.ai>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -83,6 +83,16 @@
|
|
|
83
83
|
"types": "./dist/cjs/agents/index.d.ts",
|
|
84
84
|
"default": "./dist/cjs/agents/index.js"
|
|
85
85
|
}
|
|
86
|
+
},
|
|
87
|
+
"./agents/research": {
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./dist/esm/agents/research/index.d.ts",
|
|
90
|
+
"default": "./dist/esm/agents/research/index.js"
|
|
91
|
+
},
|
|
92
|
+
"require": {
|
|
93
|
+
"types": "./dist/cjs/agents/research/index.d.ts",
|
|
94
|
+
"default": "./dist/cjs/agents/research/index.js"
|
|
95
|
+
}
|
|
86
96
|
}
|
|
87
97
|
},
|
|
88
98
|
"peerDependencies": {
|