@myagentroam/agent 0.9.108 → 0.9.109

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/cli/main.js CHANGED
@@ -19,7 +19,7 @@ Usage:
19
19
  maragent run <prompt> [--reasoning-effort EFFORT] [--format text|json|stream-json] [--codex-auth-file PATH]
20
20
  maragent resume [sessionId] [--reasoning-effort EFFORT] [--codex-auth-file PATH]
21
21
  maragent sessions list|delete <sessionId>
22
- maragent models list|add|edit|remove|test [id] [--default-reasoning-effort EFFORT] [--code-mode|--no-code-mode] [--high-density-compaction|--no-high-density-compaction] [--responses-encoding standard|lite] [--codex-auth-file PATH]
22
+ maragent models list|add|edit|remove|test [id] [--default-reasoning-effort EFFORT] [--code-mode|--no-code-mode] [--high-density-compaction|--no-high-density-compaction] [--responses-encoding standard|lite] [--fast-mode|--no-fast-mode] [--codex-auth-file PATH]
23
23
  `;
24
24
  function takeOption(arguments_, name) {
25
25
  const index = arguments_.indexOf(name);
@@ -132,6 +132,10 @@ async function modelsCommand(home, arguments_, codexAuthFile) {
132
132
  const credential = option('--credential', existing?.credentialSource === 'CODEX_AUTH_FILE' ? 'codex-auth-file' : 'api-key') ?? 'api-key';
133
133
  if (credential !== 'api-key' && credential !== 'codex-auth-file')
134
134
  throw new MarAgentError('MAR_AGENT_CLI_ARGUMENT_INVALID', '--credential is invalid.');
135
+ const hasFastModeOption = arguments_.includes('--fast-mode') || arguments_.includes('--no-fast-mode');
136
+ const fastMode = booleanFlag(arguments_, '--fast-mode', '--no-fast-mode', credential === 'codex-auth-file' ? (existing?.fastMode ?? false) : false);
137
+ if (hasFastModeOption && (protocol !== 'OPENAI_RESPONSES' || credential !== 'codex-auth-file'))
138
+ throw new MarAgentError('MAR_AGENT_CLI_ARGUMENT_INVALID', '--fast-mode requires Codex.');
135
139
  const readsApiKey = takeFlag(arguments_, '--api-key-stdin');
136
140
  if (credential === 'codex-auth-file' && readsApiKey)
137
141
  throw new MarAgentError('MAR_AGENT_CLI_ARGUMENT_INVALID', '--api-key-stdin cannot be combined with an external credential.');
@@ -182,6 +186,7 @@ async function modelsCommand(home, arguments_, codexAuthFile) {
182
186
  titleGeneration: existing?.titleGeneration ?? false,
183
187
  codeMode: booleanFlag(arguments_, '--code-mode', '--no-code-mode', existing?.codeMode ?? false),
184
188
  highDensityCompaction: booleanFlag(arguments_, '--high-density-compaction', '--no-high-density-compaction', existing?.highDensityCompaction ?? false),
189
+ ...(credential === 'codex-auth-file' && fastMode ? { fastMode: true } : {}),
185
190
  hostedWebSearch: booleanFlag(arguments_, '--web-search', '--no-web-search', existing?.hostedWebSearch ?? false),
186
191
  ...(responsesTransport === undefined ? {} : { responsesTransport }),
187
192
  ...(responsesEncoding === undefined ? {} : { responsesEncoding }),
@@ -27,6 +27,7 @@ export declare function serializeModel(model: CliModelConfiguration): {
27
27
  titleGeneration: boolean;
28
28
  codeMode: boolean;
29
29
  highDensityCompaction: boolean;
30
+ fastMode?: boolean | undefined;
30
31
  hostedWebSearch: boolean;
31
32
  responsesEncoding?: "STANDARD" | "LITE" | undefined;
32
33
  enabled: boolean;
@@ -50,6 +51,7 @@ export declare function serializeModel(model: CliModelConfiguration): {
50
51
  titleGeneration: boolean;
51
52
  codeMode: boolean;
52
53
  highDensityCompaction: boolean;
54
+ fastMode?: boolean | undefined;
53
55
  hostedWebSearch: boolean;
54
56
  responsesEncoding?: "STANDARD" | "LITE" | undefined;
55
57
  enabled: boolean;
@@ -70,6 +70,7 @@ declare const rawModelSchema: z.ZodObject<{
70
70
  titleGeneration: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
71
71
  codeMode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
72
72
  highDensityCompaction: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
73
+ fastMode: z.ZodOptional<z.ZodBoolean>;
73
74
  hostedWebSearch: z.ZodBoolean;
74
75
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
75
76
  transport: z.ZodLiteral<"HTTP">;
@@ -50,6 +50,7 @@ const rawModelSchema = z
50
50
  titleGeneration: z.boolean().optional().default(false),
51
51
  codeMode: z.boolean().optional().default(false),
52
52
  highDensityCompaction: z.boolean().optional().default(false),
53
+ fastMode: z.boolean().optional(),
53
54
  hostedWebSearch: z.boolean(),
54
55
  responsesTransport: rawResponsesTransportSchema.optional(),
55
56
  responsesEncoding: z.enum(['STANDARD', 'LITE']).optional(),
@@ -89,6 +90,8 @@ const rawModelSchema = z
89
90
  context.addIssue({ code: 'custom', message: 'Responses transport requires Responses.' });
90
91
  if (value.protocol !== 'OPENAI_RESPONSES' && value.responsesEncoding !== undefined)
91
92
  context.addIssue({ code: 'custom', message: 'Responses encoding requires Responses.' });
93
+ if (value.protocol !== 'OPENAI_RESPONSES' && value.fastMode === true)
94
+ context.addIssue({ code: 'custom', message: 'Fast mode requires Responses.' });
92
95
  });
93
96
  export function resolveModelDefaultReasoningEffort(model) {
94
97
  const configured = marAgentReasoningEffortSchema.safeParse(model.defaultReasoningEffort);
@@ -872,6 +872,7 @@ function responsesRequestBody(configuration, request, messages, prefixIdentity =
872
872
  }
873
873
  return {
874
874
  model: configuration.modelId,
875
+ ...(configuration.fastMode === true ? { service_tier: 'priority' } : {}),
875
876
  ...(lite
876
877
  ? {
877
878
  tool_choice: toolChoice,
@@ -922,6 +923,7 @@ function incrementalResponsesInput(state, current) {
922
923
  function responsesContinuationPropertiesMatch(previous, current) {
923
924
  const properties = [
924
925
  'model',
926
+ 'service_tier',
925
927
  'instructions',
926
928
  'tools',
927
929
  'tool_choice',
package/dist/sdk/agent.js CHANGED
@@ -1496,6 +1496,8 @@ function resolveAgentModels(configurations, requestedDefaultModelId) {
1496
1496
  (model.protocol !== 'OPENAI_RESPONSES' ||
1497
1497
  !['STANDARD', 'LITE'].includes(model.responsesEncoding)))
1498
1498
  throw new MarAgentError('MAR_AGENT_MODEL_CONFIG_INVALID', 'Responses encoding is invalid.');
1499
+ if (model.fastMode === true && model.protocol !== 'OPENAI_RESPONSES')
1500
+ throw new MarAgentError('MAR_AGENT_MODEL_CONFIG_INVALID', 'Fast mode requires Responses.');
1499
1501
  if (model.credentialProvider !== undefined)
1500
1502
  credentialProviders.add(model.credentialProvider);
1501
1503
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.9.108",
3
+ "version": "0.9.109",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",