maka-agent 0.2.0-dev.43.20260919 → 0.2.0-dev.44.20260920

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.
Files changed (40) hide show
  1. package/LICENSE +12 -6
  2. package/dist/mcp-capability-provider.js +7 -0
  3. package/dist/runtime-host-tui-command.js +1 -1
  4. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  5. package/node_modules/@maka/core/dist/chat-model-choice.js +3 -0
  6. package/node_modules/@maka/core/dist/llm-connections.js +3 -21
  7. package/node_modules/@maka/core/dist/model-catalog.js +8 -20
  8. package/node_modules/@maka/core/dist/model-metadata.generated.js +304 -304
  9. package/node_modules/@maka/core/dist/model-thinking.js +16 -1
  10. package/node_modules/@maka/core/dist/models-dev-projection.js +0 -1
  11. package/node_modules/@maka/core/dist/provider-registry.js +7 -51
  12. package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +7 -0
  13. package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +14 -1
  14. package/node_modules/@maka/core/dist/settings.js +2 -3
  15. package/node_modules/@maka/mcp/dist/index.js +22 -0
  16. package/node_modules/@maka/mcp/dist/oauth.js +4 -2
  17. package/node_modules/@maka/mcp/dist/tool-progress.js +45 -0
  18. package/node_modules/@maka/runtime/dist/opencode-session-header.js +2 -3
  19. package/node_modules/@maka/runtime/dist/session-manager.js +1 -44
  20. package/node_modules/@maka/runtime/dist/test-connection.js +3 -66
  21. package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +44 -9
  22. package/node_modules/@maka/runtime-host/dist/client/index.js +1 -1
  23. package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +33 -3
  24. package/node_modules/@maka/runtime-host/dist/protocol/index.js +7 -1
  25. package/node_modules/@maka/runtime-host/dist/protocol/message.js +10 -0
  26. package/node_modules/@maka/runtime-host/dist/protocol/operations.js +0 -1
  27. package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +1 -1
  28. package/node_modules/@maka/runtime-host/dist/protocol/turn.js +0 -33
  29. package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +2 -0
  30. package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +31 -104
  31. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +0 -2
  32. package/node_modules/@maka/runtime-host/dist/server/interactive-turn-coordinator.js +1 -16
  33. package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +46 -28
  34. package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +5 -16
  35. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +21 -12
  36. package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +7 -17
  37. package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +0 -62
  38. package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +0 -3
  39. package/node_modules/@maka/storage/dist/runtime-policy-stores.js +0 -1
  40. package/package.json +1 -1
package/LICENSE CHANGED
@@ -251,9 +251,11 @@ Theme revision: ea888ef33283ea44e37817d36bc8e84a0568bc30
251
251
  Copyright (c) 2026 Meta Platforms, Inc.
252
252
  License: MIT
253
253
 
254
- Maka includes an ejected adaptation of Astryx ChatReasoning v0.1.9 and generated
255
- theme artifacts based on Astryx theme-neutral v0.6.1. Maka also redistributes
256
- `patches/@astryxdesign+core+0.6.1.patch`, which modifies the MIT-licensed Astryx
254
+ Maka includes an ejected adaptation of Astryx ChatReasoning v0.1.9 in
255
+ `packages/ui/src/astryx-chat-reasoning.tsx` and generated theme artifacts in
256
+ `apps/desktop/src/renderer/astryx-theme/`, based on Astryx theme-neutral v0.6.2.
257
+ Maka also redistributes
258
+ `patches/@astryxdesign+core+0.6.2.patch`, which modifies the MIT-licensed Astryx
257
259
  core package. The following MIT License applies to that material:
258
260
 
259
261
  MIT License
@@ -579,7 +581,9 @@ Revision: 8c921b2b3bf13494724ead4f0a814d80c56a7e8b
579
581
  Copyright (c) 2025 Cua AI, Inc.
580
582
  License: MIT
581
583
 
582
- Maka's agent-cursor renderer and palette include adaptations of this component.
584
+ `apps/desktop/src/renderer/computer-use-overlay/engine/cursor-engine.ts` and
585
+ `apps/desktop/src/renderer/computer-use-overlay/engine/palette.ts` include
586
+ adaptations of this component.
583
587
  The following MIT License applies to that material:
584
588
 
585
589
  MIT License
@@ -767,8 +771,10 @@ SOFTWARE.
767
771
 
768
772
  Desktop renderer vendored source assets
769
773
 
770
- The source archive includes third-party SVG paths and source assets used by the
771
- desktop renderer. Their file-by-file inventory, immutable upstream revisions,
774
+ The source archive includes third-party SVG paths and source assets from
775
+ Lobe Icons (MIT), LocalAI (MIT), Simple Icons (CC0-1.0), TDesign Icons (MIT),
776
+ MingCute (Apache-2.0), Allogo (MIT), Ant Design Icons (MIT), and Semi Design
777
+ (MIT), used by the desktop renderer. Their file-by-file inventory, immutable upstream revisions,
772
778
  copyright notices, and license texts are in:
773
779
 
774
780
  apps/desktop/src/renderer/public/THIRD_PARTY_LICENSES.txt
@@ -76,6 +76,13 @@ export function createMcpCapabilityProvider(manager) {
76
76
  return projectMcpResult(await manager.callTool(binding, frame.arguments, {
77
77
  signal: options.signal,
78
78
  requestInteraction: options.requestInteraction,
79
+ ...(options.progress
80
+ ? {
81
+ onProgress: (current, total) => {
82
+ options.progress?.(current, total);
83
+ },
84
+ }
85
+ : {}),
79
86
  }));
80
87
  },
81
88
  };
@@ -50,7 +50,7 @@ export async function runRuntimeHostTui(input) {
50
50
  throw error;
51
51
  const configured = await runFirstRunOnboarding(input.clientDataRoot, input.workspaceRoot, input.cwd, input.locale, input.hostProfileId);
52
52
  if (!configured)
53
- throw error;
53
+ return 0;
54
54
  context = await createRuntimeHostTuiContext(contextInput);
55
55
  }
56
56
  let ownerAction;
@@ -37,6 +37,9 @@ export function buildChatModelChoices(connections) {
37
37
  ...(provider.authKind === 'oauth_token' ? {} : { connectionName: connection.name }),
38
38
  isDefault: entry.isDefault,
39
39
  thinkingLevels: entry.thinkingLevels,
40
+ ...(entry.defaultThinkingLevel === undefined
41
+ ? {}
42
+ : { defaultThinkingLevel: entry.defaultThinkingLevel }),
40
43
  supportsVision: entry.supportsVision,
41
44
  ...(entry.contextWindow !== undefined ? { contextWindow: entry.contextWindow } : {}),
42
45
  ...(declaredWindow !== undefined ? { declaredContextWindow: declaredWindow } : {}),
@@ -17,9 +17,9 @@
17
17
  * under the License.
18
18
  */
19
19
  import { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS } from './codex-model-compatibility.js';
20
- import { CATALOG_PROVIDER_TYPES, OPENCODE_FREE_DEFAULT_MODEL, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, } from './provider-registry.js';
20
+ import { CATALOG_PROVIDER_TYPES, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, } from './provider-registry.js';
21
21
  export { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS };
22
- export { CATALOG_PROVIDER_TYPES, OPENCODE_FREE_DEFAULT_MODEL, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, };
22
+ export { CATALOG_PROVIDER_TYPES, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, };
23
23
  export function isRelayProviderType(providerType) {
24
24
  return providerType === 'openai-compatible' || providerType === 'openai-responses-compatible';
25
25
  }
@@ -69,7 +69,7 @@ export function connectionEnabledModelIds(connection) {
69
69
  * 3. the Host's entry says the connection can hold a chat on it.
70
70
  *
71
71
  * (3) already subsumes what clients used to re-derive locally: a retired
72
- * provider, a quarantined `brokenModelIds` id, and a model whose metadata says
72
+ * provider and a model whose metadata says
73
73
  * it cannot chat are all non-offerable before a client sees them. A client
74
74
  * re-testing any of those against its OWN registry answers for a build that is
75
75
  * not the one running the send.
@@ -135,12 +135,6 @@ export function authorizeConnectionModel(connection, modelId) {
135
135
  const model = modelId.trim();
136
136
  if (!model || !connectionEnabledModelIds(connection).includes(model))
137
137
  return undefined;
138
- // The one veto: quarantined ids fail in a shape the send cannot surface
139
- // (e.g. a billed 200 with an empty completion), so the request settling it
140
- // is not available as the arbiter. See ProviderDefaults.brokenModelIds.
141
- if (providerDefaultsOf(connection.providerType)?.brokenModelIds?.includes(model)) {
142
- return undefined;
143
- }
144
138
  // The observed row wins wherever it exists: it carries wire metadata such as
145
139
  // `apiProtocol`, and capabilities, which a synthesized entry cannot. Absent
146
140
  // capabilities already mean "unknown", not "unsupported".
@@ -268,18 +262,6 @@ export function reconcileConnectionAfterModelFetch(connection, models, options)
268
262
  }),
269
263
  };
270
264
  }
271
- /**
272
- * The models a connection created without an explicit selection starts with,
273
- * or undefined when the provider seeds nothing. Derived from the provider's
274
- * shipped baseline rather than listed a second time: the two can then never
275
- * disagree about what "all of them" means.
276
- */
277
- export function defaultEnabledModelIdsWhenOmitted(providerType) {
278
- const defaults = providerDefaultsOf(providerType);
279
- if (!defaults?.enableShippedModelsByDefault)
280
- return undefined;
281
- return providerFallbackModelIds(defaults);
282
- }
283
265
  export function providerAuthRequiresSecret(providerType) {
284
266
  const authKind = providerDefaultsOf(providerType)?.authKind;
285
267
  return authKind === 'api_key' || authKind === 'oauth_token';
@@ -16,7 +16,7 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
- import { applyModelOverride, resolveModelLimits } from './model-thinking.js';
19
+ import { applyModelOverride, defaultThinkingLevelForConnection, resolveModelLimits, } from './model-thinking.js';
20
20
  import { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS, PROVIDER_REGISTRY, providerDefaultsOf, providerFallbackModelIds, providerSupportsModelDiscovery, } from './llm-connections.js';
21
21
  import { lookupModelMetadata, resolveModelVisionSupport } from './model-metadata.js';
22
22
  import { thinkingVariantsForConnection, } from './model-thinking.js';
@@ -95,36 +95,22 @@ export function buildConnectionModelCatalogEntries(input) {
95
95
  if (!defaults)
96
96
  return [];
97
97
  const supportsModelDiscovery = providerSupportsModelDiscovery(connection.providerType);
98
- // Quarantined ids never surface as offerable entries — from any source,
99
- // including inventories stored or selections made before the quarantine —
100
- // mirroring the `authorizeConnectionModel` veto.
101
- const broken = new Set(defaults.brokenModelIds ?? []);
102
98
  const fallbackModels = providerFallbackModelIds(defaults);
103
- // A quarantined id persisted as this connection's `defaultModel` must not
104
- // re-enter the catalog either. `models` and `enabledModelIds` are filtered
105
- // below, but a broken default reaches `makeMissingDefaultEntry` unfiltered and
106
- // would be re-added as a selectable `provider_default` row — picker-visible
107
- // and default-capable while `authorizeConnectionModel` vetoes the same id. A
108
- // reachable persisted state: the id was picker-visible before the quarantine.
109
- // Dropping it leaves the connection with no valid default (readiness reports
110
- // `missing_model`), which is what a model that can no longer send warrants.
111
- const defaultModel = broken.has((connection.defaultModel ?? '').trim())
112
- ? undefined
113
- : connection.defaultModel;
99
+ const defaultModel = connection.defaultModel;
114
100
  const fallbackModelIds = new Set(fallbackModels);
115
- const projectedModelsById = new Map((connection.models ?? []).filter(({ id }) => !broken.has(id)).map((model) => [model.id, model]));
101
+ const projectedModelsById = new Map((connection.models ?? []).map((model) => [model.id, model]));
116
102
  // Fallback providers have no live inventory, but a projected connection can
117
103
  // still carry enabled model-facts entries that are absent from the static
118
104
  // list. Keep both sets in the catalog so those user-declared models retain
119
105
  // their metadata.
120
106
  const models = supportsModelDiscovery
121
- ? connection.models?.filter(({ id }) => !broken.has(id))
107
+ ? connection.models
122
108
  : [
123
109
  ...fallbackModels.map((id) => projectedModelsById.get(id) ?? {
124
110
  id,
125
111
  ...displayNameForKnownModel(connection.providerType, id),
126
112
  }),
127
- ...(connection.models ?? []).filter((model) => !broken.has(model.id) && !fallbackModelIds.has(model.id)),
113
+ ...(connection.models ?? []).filter((model) => !fallbackModelIds.has(model.id)),
128
114
  ];
129
115
  return buildModelCatalogEntries({
130
116
  providerType: connection.providerType,
@@ -143,7 +129,7 @@ export function buildConnectionModelCatalogEntries(input) {
143
129
  savedModelIds: [
144
130
  ...(connection.enabledModelIds ?? []),
145
131
  ...Object.keys(connection.modelOverrides ?? {}),
146
- ].filter((id) => !broken.has(id)),
132
+ ],
147
133
  });
148
134
  }
149
135
  /**
@@ -239,6 +225,7 @@ function makeEntry(ctx, model, overrides = {}) {
239
225
  capabilities,
240
226
  ...(modalities !== undefined ? { modalities } : {}),
241
227
  });
228
+ const defaultThinkingLevel = defaultThinkingLevelForConnection(thinkingContext, normalizedModel.id);
242
229
  return {
243
230
  id: normalizedModel.id,
244
231
  ...displayNameForModel(input.providerType, normalizedModel),
@@ -253,6 +240,7 @@ function makeEntry(ctx, model, overrides = {}) {
253
240
  ? {}
254
241
  : { compactionThreshold: input.modelOverrides[normalizedModel.id].compactionThreshold }),
255
242
  thinkingLevels: thinkingVariantsForConnection(thinkingContext, normalizedModel.id),
243
+ ...(defaultThinkingLevel === undefined ? {} : { defaultThinkingLevel }),
256
244
  ...limits,
257
245
  ...(defaults.contextWindow === undefined
258
246
  ? {}