@granular-software/sdk 0.4.53 → 0.4.55
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/agent-evals.d.mts +1 -1
- package/dist/agent-evals.d.ts +1 -1
- package/dist/agent-evals.js +23 -13
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +23 -13
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.js +6 -6
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +6 -6
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +19 -8
- package/dist/{client-CfTDojJF.d.mts → client-BKde5VzV.d.ts} +8 -1
- package/dist/{client-DcRzwuGp.d.ts → client-DL4S9uRc.d.mts} +8 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/agent-evals.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EnvironmentSession, G as Granular } from './client-
|
|
1
|
+
import { a as EnvironmentSession, G as Granular } from './client-DL4S9uRc.mjs';
|
|
2
2
|
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, bW as RecordObjectOptions, cL as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, K as ConnectOptions, ag as CreateEnvironmentData, y as GranularOptions } from './spend-DpRRCrAr.mjs';
|
|
3
3
|
import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.mjs';
|
|
4
4
|
import '@automerge/automerge';
|
package/dist/agent-evals.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EnvironmentSession, G as Granular } from './client-
|
|
1
|
+
import { a as EnvironmentSession, G as Granular } from './client-BKde5VzV.js';
|
|
2
2
|
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, bW as RecordObjectOptions, cL as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, K as ConnectOptions, ag as CreateEnvironmentData, y as GranularOptions } from './spend-DpRRCrAr.js';
|
|
3
3
|
import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.js';
|
|
4
4
|
import '@automerge/automerge';
|
package/dist/agent-evals.js
CHANGED
|
@@ -14362,6 +14362,7 @@ var Environment = class _Environment {
|
|
|
14362
14362
|
import: async (records, options) => this.enqueueRecordImport(records, options),
|
|
14363
14363
|
listImports: async (status) => this.listRecordImports(status),
|
|
14364
14364
|
getImport: async (importId) => this.getRecordImport(importId),
|
|
14365
|
+
listImportItems: async (importId, status) => this.listRecordImportItems(importId, status),
|
|
14365
14366
|
getImportSummary: async () => this.getRecordImportSummary(),
|
|
14366
14367
|
cancelImport: async (importId) => this.cancelRecordImport(importId),
|
|
14367
14368
|
getAwaitingCount: async () => this.getAwaitingRecordCount()
|
|
@@ -15540,6 +15541,15 @@ var Environment = class _Environment {
|
|
|
15540
15541
|
`/control/record-imports/${importId}`
|
|
15541
15542
|
);
|
|
15542
15543
|
}
|
|
15544
|
+
/**
|
|
15545
|
+
* List the individual records persisted for one asynchronous import. This
|
|
15546
|
+
* makes terminal import failures diagnosable without database access.
|
|
15547
|
+
*/
|
|
15548
|
+
async listRecordImportItems(importId, status) {
|
|
15549
|
+
const suffix = status ? `?status=${encodeURIComponent(status)}` : "";
|
|
15550
|
+
const response = await this.controlPlaneRequest(`/control/record-imports/${importId}/items${suffix}`);
|
|
15551
|
+
return Array.isArray(response.items) ? response.items : [];
|
|
15552
|
+
}
|
|
15543
15553
|
/**
|
|
15544
15554
|
* Cancel a queued/background record import.
|
|
15545
15555
|
*/
|
|
@@ -17880,8 +17890,8 @@ var manifest_default = {
|
|
|
17880
17890
|
continuationBuilder: "buildContinuationInstruction:action-presentation",
|
|
17881
17891
|
modelOutputInstruction: "agent-evals:modelOutputInstruction",
|
|
17882
17892
|
codeReviewPolicy: "reviewGeneratedJobCode",
|
|
17883
|
-
defaultModel: "gpt-5.
|
|
17884
|
-
modelMatrix: ["gpt-5.
|
|
17893
|
+
defaultModel: "gpt-5.6-luna",
|
|
17894
|
+
modelMatrix: ["gpt-5.6-luna"],
|
|
17885
17895
|
temperature: 0,
|
|
17886
17896
|
compatibility: {
|
|
17887
17897
|
minSdkVersion: "0.4.40",
|
|
@@ -17927,8 +17937,8 @@ var manifest_default2 = {
|
|
|
17927
17937
|
continuationBuilder: "buildContinuationInstruction:experimental-compact",
|
|
17928
17938
|
modelOutputInstruction: "agent-evals:modelOutputInstruction",
|
|
17929
17939
|
codeReviewPolicy: "reviewGeneratedJobCode",
|
|
17930
|
-
defaultModel: "gpt-5.
|
|
17931
|
-
modelMatrix: ["gpt-5.
|
|
17940
|
+
defaultModel: "gpt-5.6-luna",
|
|
17941
|
+
modelMatrix: ["gpt-5.6-luna"],
|
|
17932
17942
|
temperature: 0,
|
|
17933
17943
|
compatibility: {
|
|
17934
17944
|
minSdkVersion: "0.4.40",
|
|
@@ -17974,8 +17984,8 @@ var manifest_default3 = {
|
|
|
17974
17984
|
continuationBuilder: "buildContinuationInstruction",
|
|
17975
17985
|
modelOutputInstruction: "agent-evals:modelOutputInstruction",
|
|
17976
17986
|
codeReviewPolicy: "reviewGeneratedJobCode",
|
|
17977
|
-
defaultModel: "gpt-5.
|
|
17978
|
-
modelMatrix: ["gpt-5.
|
|
17987
|
+
defaultModel: "gpt-5.6-luna",
|
|
17988
|
+
modelMatrix: ["gpt-5.6-luna"],
|
|
17979
17989
|
temperature: 0,
|
|
17980
17990
|
compatibility: {
|
|
17981
17991
|
minSdkVersion: "0.4.40",
|
|
@@ -20832,10 +20842,10 @@ function progressEvent(input) {
|
|
|
20832
20842
|
async function emitProgress(handler, event) {
|
|
20833
20843
|
await handler?.(progressEvent(event));
|
|
20834
20844
|
}
|
|
20835
|
-
var
|
|
20836
|
-
input:
|
|
20837
|
-
cachedInput: 0.
|
|
20838
|
-
output:
|
|
20845
|
+
var GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION = {
|
|
20846
|
+
input: 1,
|
|
20847
|
+
cachedInput: 0.1,
|
|
20848
|
+
output: 6
|
|
20839
20849
|
};
|
|
20840
20850
|
function emptyTokenUsage() {
|
|
20841
20851
|
return {
|
|
@@ -20866,7 +20876,7 @@ function calculateTokenCost(input) {
|
|
|
20866
20876
|
input: spend.inputPricePerMillionMicros / 1e6,
|
|
20867
20877
|
cachedInput: spend.cachedInputPricePerMillionMicros / 1e6,
|
|
20868
20878
|
output: spend.outputPricePerMillionMicros / 1e6
|
|
20869
|
-
} :
|
|
20879
|
+
} : GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION;
|
|
20870
20880
|
const inputCostUsd = input.uncachedInputTokens * pricing.input / 1e6;
|
|
20871
20881
|
const cachedInputCostUsd = input.cachedInputTokens * pricing.cachedInput / 1e6;
|
|
20872
20882
|
const outputCostUsd = input.outputTokens * pricing.output / 1e6;
|
|
@@ -20972,7 +20982,7 @@ function formatTokenUsage(usage) {
|
|
|
20972
20982
|
`- Cached input cost: ${formatUsd(usage.cachedInputCostUsd)}`,
|
|
20973
20983
|
`- Output cost: ${formatUsd(usage.outputCostUsd)}`,
|
|
20974
20984
|
`- Total cost: ${formatUsd(usage.totalCostUsd)}`,
|
|
20975
|
-
`- Pricing
|
|
20985
|
+
`- Pricing fallback: gpt-5.6-luna at $${GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION.input}/M input, $${GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION.cachedInput}/M cached input, $${GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION.output}/M output. Per-call model pricing is used when available.`
|
|
20976
20986
|
];
|
|
20977
20987
|
}
|
|
20978
20988
|
function getJobAgentMessages(liveDoc, jobId) {
|
|
@@ -21206,7 +21216,7 @@ function createOpenAIChatTurnGenerator(options) {
|
|
|
21206
21216
|
/\/$/,
|
|
21207
21217
|
""
|
|
21208
21218
|
);
|
|
21209
|
-
const model = options.model || "gpt-5.
|
|
21219
|
+
const model = options.model || "gpt-5.6-luna";
|
|
21210
21220
|
const client = new OpenAI__default.default({
|
|
21211
21221
|
apiKey: options.apiKey,
|
|
21212
21222
|
baseURL: baseUrl,
|