@superatomai/sdk-node 0.0.89-dsp → 0.0.90-dsp

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/index.js CHANGED
@@ -34,6 +34,7 @@ __export(index_exports, {
34
34
  ANSWER_COMPONENT_NAMES: () => ANSWER_COMPONENT_NAMES,
35
35
  BM25L: () => BM25L,
36
36
  CATEGORY_KEYS: () => CATEGORY_KEYS,
37
+ CODEX_DOC_MAX_BYTES: () => CODEX_DOC_MAX_BYTES,
37
38
  CONTEXT_CONFIG: () => CONTEXT_CONFIG,
38
39
  CleanupService: () => CleanupService,
39
40
  DEFAULT_AGENT_CONFIG: () => DEFAULT_AGENT_CONFIG,
@@ -62,6 +63,7 @@ __export(index_exports, {
62
63
  bridgePreamble: () => bridgePreamble,
63
64
  captureContext: () => captureContext,
64
65
  clearContextTokens: () => clearContextTokens,
66
+ codexRunConfig: () => codexRunConfig,
65
67
  constraintPoliciesFromConfig: () => constraintPoliciesFromConfig,
66
68
  contextTokenCount: () => contextTokenCount,
67
69
  createCodexSession: () => createCodexSession,
@@ -24810,6 +24812,20 @@ function buildEnv(opts) {
24810
24812
  }
24811
24813
  return { ...env, ...opts.env ?? {} };
24812
24814
  }
24815
+ var CODEX_DOC_MAX_BYTES = 256 * 1024;
24816
+ function codexRunConfig(opts) {
24817
+ return {
24818
+ // Tools reach codex as MCP servers; each server's name shows up on
24819
+ // every tool event, so the runner can tell ours from codex's own.
24820
+ ...opts.mcpServers && Object.keys(opts.mcpServers).length ? { mcp_servers: opts.mcpServers } : {},
24821
+ // Per run, not ~/.codex/config.toml: a host without that line would run
24822
+ // the agent with no instructions at all. AGENTS.md still wins if present.
24823
+ ...opts.instructionsFile && opts.instructionsFile !== "AGENTS.md" ? { project_doc_fallback_filenames: [opts.instructionsFile] } : {},
24824
+ project_doc_max_bytes: CODEX_DOC_MAX_BYTES,
24825
+ // Last: a deployment's own value wins.
24826
+ ...opts.extraConfig ?? {}
24827
+ };
24828
+ }
24813
24829
  function createCodexSession(opts) {
24814
24830
  const model = opts.model ?? process.env.CODEX_AGENT_MODEL;
24815
24831
  let thread = null;
@@ -24832,21 +24848,12 @@ function createCodexSession(opts) {
24832
24848
  async function ensureThread() {
24833
24849
  if (thread) return thread;
24834
24850
  const { Codex } = await loadCodex();
24835
- const config2 = {
24836
- // Tools reach codex as MCP servers; each server's name shows up on
24837
- // every tool event, so the runner can tell ours from codex's own.
24838
- ...opts.mcpServers && Object.keys(opts.mcpServers).length ? { mcp_servers: opts.mcpServers } : {},
24839
- // Per run, not ~/.codex/config.toml: a host without that line would run
24840
- // the agent with no instructions at all. AGENTS.md still wins if present.
24841
- ...opts.instructionsFile && opts.instructionsFile !== "AGENTS.md" ? { project_doc_fallback_filenames: [opts.instructionsFile] } : {},
24842
- ...opts.extraConfig ?? {}
24843
- };
24851
+ const config2 = codexRunConfig(opts);
24844
24852
  const codex = new Codex({
24845
24853
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
24846
24854
  ...opts.baseUrl ? { baseUrl: opts.baseUrl } : {},
24847
24855
  env: buildEnv(opts),
24848
- // Only when non-empty: an empty override is pointless CLI noise.
24849
- ...Object.keys(config2).length ? { config: config2 } : {}
24856
+ config: config2
24850
24857
  });
24851
24858
  thread = resumeId ? codex.resumeThread(resumeId, threadOptions()) : codex.startThread(threadOptions());
24852
24859
  return thread;
@@ -30342,6 +30349,7 @@ var SuperatomSDK = class {
30342
30349
  ANSWER_COMPONENT_NAMES,
30343
30350
  BM25L,
30344
30351
  CATEGORY_KEYS,
30352
+ CODEX_DOC_MAX_BYTES,
30345
30353
  CONTEXT_CONFIG,
30346
30354
  CleanupService,
30347
30355
  DEFAULT_AGENT_CONFIG,
@@ -30370,6 +30378,7 @@ var SuperatomSDK = class {
30370
30378
  bridgePreamble,
30371
30379
  captureContext,
30372
30380
  clearContextTokens,
30381
+ codexRunConfig,
30373
30382
  constraintPoliciesFromConfig,
30374
30383
  contextTokenCount,
30375
30384
  createCodexSession,
package/dist/index.mjs CHANGED
@@ -24697,6 +24697,20 @@ function buildEnv(opts) {
24697
24697
  }
24698
24698
  return { ...env, ...opts.env ?? {} };
24699
24699
  }
24700
+ var CODEX_DOC_MAX_BYTES = 256 * 1024;
24701
+ function codexRunConfig(opts) {
24702
+ return {
24703
+ // Tools reach codex as MCP servers; each server's name shows up on
24704
+ // every tool event, so the runner can tell ours from codex's own.
24705
+ ...opts.mcpServers && Object.keys(opts.mcpServers).length ? { mcp_servers: opts.mcpServers } : {},
24706
+ // Per run, not ~/.codex/config.toml: a host without that line would run
24707
+ // the agent with no instructions at all. AGENTS.md still wins if present.
24708
+ ...opts.instructionsFile && opts.instructionsFile !== "AGENTS.md" ? { project_doc_fallback_filenames: [opts.instructionsFile] } : {},
24709
+ project_doc_max_bytes: CODEX_DOC_MAX_BYTES,
24710
+ // Last: a deployment's own value wins.
24711
+ ...opts.extraConfig ?? {}
24712
+ };
24713
+ }
24700
24714
  function createCodexSession(opts) {
24701
24715
  const model = opts.model ?? process.env.CODEX_AGENT_MODEL;
24702
24716
  let thread = null;
@@ -24719,21 +24733,12 @@ function createCodexSession(opts) {
24719
24733
  async function ensureThread() {
24720
24734
  if (thread) return thread;
24721
24735
  const { Codex } = await loadCodex();
24722
- const config2 = {
24723
- // Tools reach codex as MCP servers; each server's name shows up on
24724
- // every tool event, so the runner can tell ours from codex's own.
24725
- ...opts.mcpServers && Object.keys(opts.mcpServers).length ? { mcp_servers: opts.mcpServers } : {},
24726
- // Per run, not ~/.codex/config.toml: a host without that line would run
24727
- // the agent with no instructions at all. AGENTS.md still wins if present.
24728
- ...opts.instructionsFile && opts.instructionsFile !== "AGENTS.md" ? { project_doc_fallback_filenames: [opts.instructionsFile] } : {},
24729
- ...opts.extraConfig ?? {}
24730
- };
24736
+ const config2 = codexRunConfig(opts);
24731
24737
  const codex = new Codex({
24732
24738
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
24733
24739
  ...opts.baseUrl ? { baseUrl: opts.baseUrl } : {},
24734
24740
  env: buildEnv(opts),
24735
- // Only when non-empty: an empty override is pointless CLI noise.
24736
- ...Object.keys(config2).length ? { config: config2 } : {}
24741
+ config: config2
24737
24742
  });
24738
24743
  thread = resumeId ? codex.resumeThread(resumeId, threadOptions()) : codex.startThread(threadOptions());
24739
24744
  return thread;
@@ -30228,6 +30233,7 @@ export {
30228
30233
  ANSWER_COMPONENT_NAMES,
30229
30234
  BM25L,
30230
30235
  CATEGORY_KEYS,
30236
+ CODEX_DOC_MAX_BYTES,
30231
30237
  CONTEXT_CONFIG,
30232
30238
  CleanupService,
30233
30239
  DEFAULT_AGENT_CONFIG,
@@ -30256,6 +30262,7 @@ export {
30256
30262
  bridgePreamble,
30257
30263
  captureContext,
30258
30264
  clearContextTokens,
30265
+ codexRunConfig,
30259
30266
  constraintPoliciesFromConfig,
30260
30267
  contextTokenCount,
30261
30268
  createCodexSession,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superatomai/sdk-node",
3
- "version": "0.0.89-dsp",
3
+ "version": "0.0.90-dsp",
4
4
  "description": "Node.js TypeScript SDK for Superatom",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",