@myagentroam/node 0.12.3 → 0.12.4

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.
@@ -13,6 +13,7 @@ const runtimeCredentialCapability = () => ({
13
13
  responsesOptionalParameters: true,
14
14
  responsesHttpContinuation: true,
15
15
  contextGcControl: true,
16
+ unifiedCompactControl: true,
16
17
  conversationModels: true,
17
18
  resourceInput: true,
18
19
  httpVersions: ['1.1', '2']
@@ -1 +1 @@
1
- {"type":"module","version":"0.12.3"}
1
+ {"type":"module","version":"0.12.4"}
@@ -12,6 +12,9 @@ const system = 'You summarize conversation evidence for the next agent invocatio
12
12
  export function updateMarAgentCompactState(state, raw, models, visibleModelIds) {
13
13
  state.revision++;
14
14
  delete state.current;
15
+ state.unifiedCompactModelIds = models
16
+ .filter((model) => model.enabled && model.unifiedCompact === true)
17
+ .map((model) => model.id);
15
18
  const parsed = marAgentRuntimeCompactConfigurationSchema.safeParse(raw);
16
19
  if (!parsed.success)
17
20
  return;
@@ -37,6 +40,7 @@ export function marAgentCompactExtensionSource(state) {
37
40
  async resolve({ signal }) {
38
41
  signal.throwIfAborted();
39
42
  const selected = state.current;
43
+ const enabledModelIds = new Set(state.unifiedCompactModelIds);
40
44
  return {
41
45
  revision: `node-compact-${state.revision}`,
42
46
  extensions: selected === undefined
@@ -49,7 +53,9 @@ export function marAgentCompactExtensionSource(state) {
49
53
  ? () => selected.model.credentialProvider?.close()
50
54
  : undefined,
51
55
  attachSession(context) {
52
- context.hooks.intercept('compact.generate', (input, call) => generateMarAgentCompact(input, selected, call.signal));
56
+ context.hooks.intercept('compact.generate', (input, call, next) => input.modelId !== undefined && enabledModelIds.has(input.modelId)
57
+ ? generateMarAgentCompact(input, selected, call.signal)
58
+ : next(input));
53
59
  }
54
60
  }
55
61
  ]
@@ -1,7 +1,7 @@
1
1
  import { AgentError, SecretValue } from '@myagentroam/agent';
2
2
  import { marAgentRuntimeModelConfigurationSchema, resolveMarAgentDefaultReasoningEffort } from '@myagentroam/protocol';
3
3
  export function sdkModelConfigurations(models) {
4
- return models.map(({ imageGeneration: _imageGeneration, ...model }) => model);
4
+ return models.map(({ imageGeneration: _imageGeneration, unifiedCompact: _unifiedCompact, ...model }) => model);
5
5
  }
6
6
  export async function closeImageCredentialProviders(models) {
7
7
  const textProviders = new Set(models.map((model) => model.credentialProvider));
@@ -64,6 +64,7 @@ export class MarAgentRuntimeModelFactory {
64
64
  defaultReasoningEffort: resolveMarAgentDefaultReasoningEffort(configuration.defaultReasoningEffort, configuration.reasoningEfforts),
65
65
  conversationModel: configuration.conversationModel ?? true,
66
66
  subagentModel: configuration.subagentModel ?? false,
67
+ unifiedCompact: configuration.unifiedCompact ?? false,
67
68
  titleGeneration: configuration.titleGeneration,
68
69
  codeMode: configuration.codeMode,
69
70
  gcEnabled: configuration.gcEnabled ?? true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "license": "Apache-2.0 AND GPL-2.0-or-later",
6
6
  "type": "module",
@@ -42,14 +42,14 @@
42
42
  "turndown-plugin-gfm": "^1.0.2",
43
43
  "ws": "^8.21.3",
44
44
  "zod": "4.4.3",
45
- "@myagentroam/agent": "0.12.3",
46
- "@myagentroam/protocol": "0.12.3"
45
+ "@myagentroam/agent": "0.12.4",
46
+ "@myagentroam/protocol": "0.12.4"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/turndown": "^5.0.6",
50
50
  "@types/ws": "^8.18.1",
51
- "@myagentroam/code-navigation": "0.11.1",
52
- "@myagentroam/marctl": "0.12.3"
51
+ "@myagentroam/marctl": "0.12.4",
52
+ "@myagentroam/code-navigation": "0.11.1"
53
53
  },
54
54
  "exports": {
55
55
  "./config": {