@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.
@@ -14336,6 +14336,7 @@ var Environment = class _Environment {
14336
14336
  import: async (records, options) => this.enqueueRecordImport(records, options),
14337
14337
  listImports: async (status) => this.listRecordImports(status),
14338
14338
  getImport: async (importId) => this.getRecordImport(importId),
14339
+ listImportItems: async (importId, status) => this.listRecordImportItems(importId, status),
14339
14340
  getImportSummary: async () => this.getRecordImportSummary(),
14340
14341
  cancelImport: async (importId) => this.cancelRecordImport(importId),
14341
14342
  getAwaitingCount: async () => this.getAwaitingRecordCount()
@@ -15514,6 +15515,15 @@ var Environment = class _Environment {
15514
15515
  `/control/record-imports/${importId}`
15515
15516
  );
15516
15517
  }
15518
+ /**
15519
+ * List the individual records persisted for one asynchronous import. This
15520
+ * makes terminal import failures diagnosable without database access.
15521
+ */
15522
+ async listRecordImportItems(importId, status) {
15523
+ const suffix = status ? `?status=${encodeURIComponent(status)}` : "";
15524
+ const response = await this.controlPlaneRequest(`/control/record-imports/${importId}/items${suffix}`);
15525
+ return Array.isArray(response.items) ? response.items : [];
15526
+ }
15517
15527
  /**
15518
15528
  * Cancel a queued/background record import.
15519
15529
  */
@@ -17854,8 +17864,8 @@ var manifest_default = {
17854
17864
  continuationBuilder: "buildContinuationInstruction:action-presentation",
17855
17865
  modelOutputInstruction: "agent-evals:modelOutputInstruction",
17856
17866
  codeReviewPolicy: "reviewGeneratedJobCode",
17857
- defaultModel: "gpt-5.4",
17858
- modelMatrix: ["gpt-5.4"],
17867
+ defaultModel: "gpt-5.6-luna",
17868
+ modelMatrix: ["gpt-5.6-luna"],
17859
17869
  temperature: 0,
17860
17870
  compatibility: {
17861
17871
  minSdkVersion: "0.4.40",
@@ -17901,8 +17911,8 @@ var manifest_default2 = {
17901
17911
  continuationBuilder: "buildContinuationInstruction:experimental-compact",
17902
17912
  modelOutputInstruction: "agent-evals:modelOutputInstruction",
17903
17913
  codeReviewPolicy: "reviewGeneratedJobCode",
17904
- defaultModel: "gpt-5.4",
17905
- modelMatrix: ["gpt-5.4"],
17914
+ defaultModel: "gpt-5.6-luna",
17915
+ modelMatrix: ["gpt-5.6-luna"],
17906
17916
  temperature: 0,
17907
17917
  compatibility: {
17908
17918
  minSdkVersion: "0.4.40",
@@ -17948,8 +17958,8 @@ var manifest_default3 = {
17948
17958
  continuationBuilder: "buildContinuationInstruction",
17949
17959
  modelOutputInstruction: "agent-evals:modelOutputInstruction",
17950
17960
  codeReviewPolicy: "reviewGeneratedJobCode",
17951
- defaultModel: "gpt-5.4",
17952
- modelMatrix: ["gpt-5.4"],
17961
+ defaultModel: "gpt-5.6-luna",
17962
+ modelMatrix: ["gpt-5.6-luna"],
17953
17963
  temperature: 0,
17954
17964
  compatibility: {
17955
17965
  minSdkVersion: "0.4.40",
@@ -20806,10 +20816,10 @@ function progressEvent(input) {
20806
20816
  async function emitProgress(handler, event) {
20807
20817
  await handler?.(progressEvent(event));
20808
20818
  }
20809
- var GPT_54_TOKEN_PRICING_USD_PER_MILLION = {
20810
- input: 2.5,
20811
- cachedInput: 0.25,
20812
- output: 15
20819
+ var GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION = {
20820
+ input: 1,
20821
+ cachedInput: 0.1,
20822
+ output: 6
20813
20823
  };
20814
20824
  function emptyTokenUsage() {
20815
20825
  return {
@@ -20840,7 +20850,7 @@ function calculateTokenCost(input) {
20840
20850
  input: spend.inputPricePerMillionMicros / 1e6,
20841
20851
  cachedInput: spend.cachedInputPricePerMillionMicros / 1e6,
20842
20852
  output: spend.outputPricePerMillionMicros / 1e6
20843
- } : GPT_54_TOKEN_PRICING_USD_PER_MILLION;
20853
+ } : GRANULAR_AGENT_TOKEN_PRICING_USD_PER_MILLION;
20844
20854
  const inputCostUsd = input.uncachedInputTokens * pricing.input / 1e6;
20845
20855
  const cachedInputCostUsd = input.cachedInputTokens * pricing.cachedInput / 1e6;
20846
20856
  const outputCostUsd = input.outputTokens * pricing.output / 1e6;
@@ -20946,7 +20956,7 @@ function formatTokenUsage(usage) {
20946
20956
  `- Cached input cost: ${formatUsd(usage.cachedInputCostUsd)}`,
20947
20957
  `- Output cost: ${formatUsd(usage.outputCostUsd)}`,
20948
20958
  `- Total cost: ${formatUsd(usage.totalCostUsd)}`,
20949
- `- Pricing basis: GPT-5.4 at $${GPT_54_TOKEN_PRICING_USD_PER_MILLION.input}/M input, $${GPT_54_TOKEN_PRICING_USD_PER_MILLION.cachedInput}/M cached input, $${GPT_54_TOKEN_PRICING_USD_PER_MILLION.output}/M output.`
20959
+ `- 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.`
20950
20960
  ];
20951
20961
  }
20952
20962
  function getJobAgentMessages(liveDoc, jobId) {
@@ -21180,7 +21190,7 @@ function createOpenAIChatTurnGenerator(options) {
21180
21190
  /\/$/,
21181
21191
  ""
21182
21192
  );
21183
- const model = options.model || "gpt-5.4";
21193
+ const model = options.model || "gpt-5.6-luna";
21184
21194
  const client = new OpenAI({
21185
21195
  apiKey: options.apiKey,
21186
21196
  baseURL: baseUrl,