agent-transport-system 0.7.86 → 0.7.87

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/ats.js CHANGED
@@ -30,7 +30,7 @@ import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybi
30
30
  import { ReadStream, WriteStream } from "node:tty";
31
31
 
32
32
  //#region package.json
33
- var version = "0.7.86";
33
+ var version = "0.7.87";
34
34
  var package_default = {
35
35
  $schema: "https://www.schemastore.org/package.json",
36
36
  name: "agent-transport-system",
@@ -10706,6 +10706,7 @@ async function invokeCodexAppServerTransport(input) {
10706
10706
  });
10707
10707
  const invokedAtMs = Date.now();
10708
10708
  const permissionModeParams = resolveCodexAppServerPermissionModeParams(input.agentControllerPermissionMode);
10709
+ const conversationPolicyParams = resolveCodexAppServerConversationPolicyParams(input.conversationPolicy);
10709
10710
  return await withCodexAppServerSession({
10710
10711
  codexTimeoutMs: input.codexTimeoutMs,
10711
10712
  codexWorkdir: input.codexWorkdir,
@@ -10715,6 +10716,7 @@ async function invokeCodexAppServerTransport(input) {
10715
10716
  onRuntimeEvent: input.onRuntimeEvent
10716
10717
  }, async (session) => {
10717
10718
  const threadId = await resolveDispatchThreadId({
10719
+ conversationPolicyParams,
10718
10720
  codexWorkdir: input.codexWorkdir,
10719
10721
  permissionModeParams: permissionModeParams.thread,
10720
10722
  session,
@@ -10783,11 +10785,13 @@ async function verifyCodexAppServerThread(input) {
10783
10785
  async function resolveDispatchThreadId(input) {
10784
10786
  const existingThreadId = normalizeOptionalText$46(input.threadId);
10785
10787
  if (existingThreadId) return readThreadIdFromResponse(await input.session.request("thread/resume", {
10788
+ ...input.conversationPolicyParams,
10786
10789
  ...input.permissionModeParams,
10787
10790
  cwd: input.codexWorkdir,
10788
10791
  threadId: existingThreadId
10789
10792
  }));
10790
10793
  return readThreadIdFromResponse(await input.session.request("thread/start", {
10794
+ ...input.conversationPolicyParams,
10791
10795
  ...input.permissionModeParams,
10792
10796
  cwd: input.codexWorkdir,
10793
10797
  threadSource: "user"
@@ -10834,6 +10838,14 @@ function resolveCodexAgentControllerPermissionMode$1(value) {
10834
10838
  default: return "codex:askForApproval";
10835
10839
  }
10836
10840
  }
10841
+ function resolveCodexAppServerConversationPolicyParams(conversationPolicy) {
10842
+ const params = {};
10843
+ const model = normalizeOptionalText$46(conversationPolicy?.model);
10844
+ if (model) params.model = model;
10845
+ const reasoningLevel = normalizeOptionalText$46(conversationPolicy?.reasoningLevel);
10846
+ if (reasoningLevel) params.reasoningEffort = reasoningLevel;
10847
+ return params;
10848
+ }
10837
10849
  async function withCodexAppServerSession(input, callback) {
10838
10850
  const session = new CodexAppServerSession(input);
10839
10851
  try {
@@ -11897,6 +11909,7 @@ async function invokeCodexAppServer(input) {
11897
11909
  launchContract: input.launchContract,
11898
11910
  codexTimeoutMs: input.codexTimeoutMs,
11899
11911
  codexWorkdir: input.codexWorkdir,
11912
+ conversationPolicy: input.conversationPolicy,
11900
11913
  env: input.env,
11901
11914
  executionMode: input.executionMode,
11902
11915
  ...input.onProcessControlEvent ? { onProcessControlEvent: input.onProcessControlEvent } : {},
@@ -12053,6 +12066,7 @@ const resolveDefaultCodexAppServerInvoke = (options) => {
12053
12066
  launchContract,
12054
12067
  codexTimeoutMs,
12055
12068
  codexWorkdir: input.runtimeContext.providerRuntimeWorkingDirectory,
12069
+ conversationPolicy: input.conversationPolicy,
12056
12070
  env: input.env,
12057
12071
  executionMode: input.executionMode,
12058
12072
  ...onProcessControlEvent ? { onProcessControlEvent } : {},