maka-agent 0.2.1-dev.80.20261012 → 0.2.1-dev.83.20261014

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 (60) hide show
  1. package/dist/acp/tool-event-mapper.js +14 -6
  2. package/dist/cli-core.js +1 -0
  3. package/dist/fullscreen-mode.js +165 -0
  4. package/dist/mcp-capability-provider.js +1 -0
  5. package/dist/pi-transcript.js +19 -7
  6. package/dist/pi-tui-layout.js +266 -0
  7. package/dist/pi-tui-runner.js +67 -4
  8. package/dist/runtime-host-tui-command.js +7 -2
  9. package/dist/skill-highlight-editor.js +9 -0
  10. package/dist/tui-copy-catalog.js +515 -488
  11. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  12. package/node_modules/@maka/core/dist/connection-readiness.js +1 -1
  13. package/node_modules/@maka/core/dist/display-redaction.js +3 -2
  14. package/node_modules/@maka/core/dist/model-catalog.js +2 -1
  15. package/node_modules/@maka/core/dist/provider-auth.js +2 -1
  16. package/node_modules/@maka/core/dist/provider-registry.js +1 -11
  17. package/node_modules/@maka/core/dist/provider-retirement.js +45 -0
  18. package/node_modules/@maka/core/dist/redaction.js +4 -3
  19. package/node_modules/@maka/core/dist/relative-time-policy.js +3 -2
  20. package/node_modules/@maka/core/dist/runtime-event.js +5 -1
  21. package/node_modules/@maka/core/dist/session-trace.js +4 -1
  22. package/node_modules/@maka/core/dist/session.js +5 -0
  23. package/node_modules/@maka/core/dist/tool-quiet-preview.js +3 -2
  24. package/node_modules/@maka/core/dist/tool-result-status.js +12 -1
  25. package/node_modules/@maka/core/dist/ui-locale.js +8 -2
  26. package/node_modules/@maka/core/package.json +1 -0
  27. package/node_modules/@maka/runtime/dist/computer-use-tools.js +94 -22
  28. package/node_modules/@maka/runtime/dist/mcp-tools.js +1 -0
  29. package/node_modules/@maka/runtime/dist/read-page.js +28 -10
  30. package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +1 -0
  31. package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +1 -0
  32. package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +1 -0
  33. package/node_modules/@maka/runtime/dist/session-trace-projection.js +6 -1
  34. package/node_modules/@maka/runtime/dist/test-connection.js +3 -1
  35. package/node_modules/@maka/runtime/dist/tool-runtime.js +65 -24
  36. package/node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs +24 -10
  37. package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +2 -1
  38. package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +1 -0
  39. package/node_modules/@maka/runtime-host/dist/client/connection.js +19 -0
  40. package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +3 -2
  41. package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +8 -0
  42. package/node_modules/@maka/runtime-host/dist/protocol/artifact-change.js +46 -0
  43. package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +6 -1
  44. package/node_modules/@maka/runtime-host/dist/protocol/index.js +10 -1
  45. package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +3 -1
  46. package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +4 -1
  47. package/node_modules/@maka/runtime-host/dist/server/client-capability-coordinator.js +3 -0
  48. package/node_modules/@maka/runtime-host/dist/server/connection-session.js +8 -0
  49. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +3 -1
  50. package/node_modules/@maka/runtime-host/dist/server/host-change-feed.js +8 -0
  51. package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +1 -1
  52. package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +3 -0
  53. package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +49 -8
  54. package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +5 -2
  55. package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +1 -0
  56. package/node_modules/@maka/storage/dist/config-transfer.js +2 -1
  57. package/node_modules/@maka/storage/dist/session-store-values.js +11 -1
  58. package/node_modules/node-pty/lib/windowsPtyAgent.js +7 -0
  59. package/node_modules/node-pty/lib/windowsTerminal.js +11 -1
  60. package/package.json +1 -1
@@ -41,7 +41,7 @@
41
41
  */
42
42
  import { connectionEnabledModelIds, providerAuthRequiresSecret, providerDefaultsOf, authorizeConnectionModel, } from './llm-connections.js';
43
43
  import { isModelExplicitlyUnsupportedForChat } from './model-catalog.js';
44
- import { isRetiredProvider } from './provider-registry.js';
44
+ import { isRetiredProvider } from './provider-retirement.js';
45
45
  /**
46
46
  * Pure, sync. Returns `{ ready: true, model }` with the effective
47
47
  * model id resolved, or `{ ready: false, reason }` for the first
@@ -65,11 +65,12 @@ const PATTERNS = [
65
65
  streamingValueGroup: 3,
66
66
  },
67
67
  // Common provider key prefixes
68
- // OpenAI: sk-..., Anthropic: sk-ant-..., Google API: AIza..., GitHub: ghp_/gho_/ghu_/ghs_/ghr_
68
+ // OpenAI: sk-..., Anthropic: sk-ant-..., Google API: AIza...,
69
+ // GitHub: ghp_/gho_/ghu_/ghs_/ghr_/github_pat_
69
70
  // Slack tokens: xox[abprs]-...
70
71
  {
71
72
  label: 'provider api key',
72
- regex: /\b(sk-[A-Za-z0-9_-]{16,}|sk-ant-[A-Za-z0-9_-]{16,}|AIza[0-9A-Za-z_-]{30,}|gh[opusr]_[A-Za-z0-9]{30,}|xox[abprs]-[A-Za-z0-9-]{16,})\b/g,
73
+ regex: /\b(sk-[A-Za-z0-9_-]{16,}|sk-ant-[A-Za-z0-9_-]{16,}|AIza[0-9A-Za-z_-]{30,}|gh[opusr]_[A-Za-z0-9]{30,}|github_pat_[A-Za-z0-9_]{20,}|xox[abprs]-[A-Za-z0-9-]{16,})\b/g,
73
74
  streamingReversible: true,
74
75
  },
75
76
  // Long high-entropy hex/base64 strings (40+ chars) — best-effort catch.
@@ -18,6 +18,7 @@
18
18
  */
19
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
+ import { isRetiredProvider } from './provider-retirement.js';
21
22
  import { lookupModelMetadata, resolveModelVisionSupport } from './model-metadata.js';
22
23
  import { thinkingVariantsForConnection, } from './model-thinking.js';
23
24
  export function buildModelCatalogEntries(input) {
@@ -122,7 +123,7 @@ export function buildConnectionModelCatalogEntries(input) {
122
123
  // renders, but they stop being selectable. Without this the pickers would
123
124
  // keep offering models that can no longer send — `runtimeAdapter:
124
125
  // 'unavailable'` blocks the send, not the choice.
125
- providerRetired: defaults.retired === true,
126
+ providerRetired: isRetiredProvider(connection.providerType),
126
127
  ...(connection.modelOverrides ? { modelOverrides: connection.modelOverrides } : {}),
127
128
  // Keep manually configured models visible while disabled, even when no
128
129
  // provider inventory lists them. Selection still controls their use.
@@ -17,6 +17,7 @@
17
17
  * under the License.
18
18
  */
19
19
  import { providerAuthRequiresSecret, providerDefaultsOf, providerSupportsModelDiscovery, } from './llm-connections.js';
20
+ import { isRetiredProvider } from './provider-retirement.js';
20
21
  /**
21
22
  * The credential operations this contract admits. One entry per operation the
22
23
  * storage coordinator actually gates — an operation with no admission point
@@ -43,7 +44,7 @@ export function deriveProviderAuthContract(input) {
43
44
  // nowhere: no Runtime adapter to send on, no sign-in to complete, no endpoint
44
45
  // to test. Deleting the connection is what clears the credential this machine
45
46
  // still holds.
46
- if (!defaults || defaults.retired === true) {
47
+ if (!defaults || isRetiredProvider(input.providerType)) {
47
48
  return { requiresSecret, actionAvailability: actions({}) };
48
49
  }
49
50
  const hasSecret = input.hasSecret;
@@ -936,7 +936,6 @@ const providerRegistry = {
936
936
  fallbackModels: [],
937
937
  status: 'phase3-experimental',
938
938
  runtimeAdapter: { kind: 'unavailable' },
939
- retired: true,
940
939
  modelDiscovery: {
941
940
  kind: 'fallback',
942
941
  reason: 'OpenCode restricts its free tier to the OpenCode client.',
@@ -1228,7 +1227,6 @@ const providerRegistry = {
1228
1227
  fallbackModels: [],
1229
1228
  status: 'phase3-experimental',
1230
1229
  runtimeAdapter: { kind: 'unavailable' },
1231
- retired: true,
1232
1230
  modelDiscovery: {
1233
1231
  kind: 'fallback',
1234
1232
  reason: 'The GO plan was reached through the official CLI\u2019s private transport.',
@@ -1365,7 +1363,6 @@ const providerRegistry = {
1365
1363
  ],
1366
1364
  status: 'phase3-experimental',
1367
1365
  runtimeAdapter: { kind: 'unavailable' },
1368
- retired: true,
1369
1366
  modelDiscovery: {
1370
1367
  kind: 'fallback',
1371
1368
  reason: 'Subscription OAuth tokens are session-scoped (user:sessions:claude_code, no user:inference), so GET /v1/models rejects them with 401',
@@ -1430,14 +1427,7 @@ export function providerMenuLabel(providerType) {
1430
1427
  const defaults = providerDefaultsOf(providerType);
1431
1428
  return defaults && (defaults.menuLabel ?? defaults.label);
1432
1429
  }
1433
- /**
1434
- * A provider Maka used to offer and no longer does. Read this rather than
1435
- * inferring retirement from an unavailable adapter: a provider that was never
1436
- * wired looks identical from there and is not the same thing.
1437
- */
1438
- export function isRetiredProvider(providerType) {
1439
- return providerDefaultsOf(providerType)?.retired === true;
1440
- }
1430
+ export { isRetiredProvider, RETIRED_PROVIDER_TYPES } from './provider-retirement.js';
1441
1431
  /**
1442
1432
  * Whether a request on this provider may carry an output-token limit. The
1443
1433
  * ChatGPT Codex backend answers `max_output_tokens` with HTTP 400
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+ /**
20
+ * Provider types Maka used to offer and no longer does. The registry keeps its
21
+ * entry so stored connections still decode; retirement only says it cannot be
22
+ * used to send.
23
+ *
24
+ * `packages/core/src/__tests__/provider-catalog-contract.test.ts` pins this
25
+ * list against the registry, so a name that is not a registered provider — or a
26
+ * retired provider that is still wired to a Runtime adapter — fails there.
27
+ */
28
+ export const RETIRED_PROVIDER_TYPES = [
29
+ 'opencode-free',
30
+ 'commandcode-go',
31
+ 'claude-subscription',
32
+ ];
33
+ const RETIRED_PROVIDER_TYPE_SET = new Set(RETIRED_PROVIDER_TYPES);
34
+ /**
35
+ * A provider Maka used to offer and no longer does. Read this rather than
36
+ * inferring retirement from an unavailable adapter: a provider that was never
37
+ * wired looks identical from there and is not the same thing.
38
+ *
39
+ * Takes a plain `string` because stored connections outlive the catalog: a
40
+ * connection written by a newer build can name a provider type this one does
41
+ * not know, and an unknown type is not retired.
42
+ */
43
+ export function isRetiredProvider(providerType) {
44
+ return RETIRED_PROVIDER_TYPE_SET.has(providerType);
45
+ }
@@ -16,6 +16,7 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ import { defineShippedUiMessageCatalog, resolveUiMessageCatalog, } from './ui-locale.js';
19
20
  const SENSITIVE_KEY_SUFFIXES = new Set([
20
21
  'auth',
21
22
  'authorization',
@@ -51,7 +52,7 @@ const AWS_SECRET_ASSIGNMENT_PATTERN = new RegExp(`\\b(${AWS_SECRET_ACCESS_KEY_EN
51
52
  const SECRET_PATTERNS = [
52
53
  /\b(sk-(?:ant-)?[a-z0-9_-]{8,})\b/gi,
53
54
  /\b(AIza[0-9A-Za-z_-]{20,})\b/g,
54
- /\b(gh[pousr]_[0-9A-Za-z_]{20,})\b/g,
55
+ /\b(gh[pousr]_[0-9A-Za-z_]{20,}|github_pat_[0-9A-Za-z_]{20,})\b/g,
55
56
  /\b(xox[abprs]-[0-9A-Za-z-]{10,})\b/g,
56
57
  /\b([a-f0-9]{40,})\b/gi,
57
58
  ];
@@ -261,7 +262,7 @@ export function classifyGeneralizedError(error) {
261
262
  }
262
263
  /** Locale copy for each {@link GeneralizedErrorClass}; catalog authors spread
263
264
  * this per-locale block instead of restating the sentences. */
264
- export const GENERALIZED_ERROR_COPY = {
265
+ export const GENERALIZED_ERROR_COPY = resolveUiMessageCatalog(defineShippedUiMessageCatalog()({
265
266
  'zh-CN': {
266
267
  timeout: '请求超时',
267
268
  rate_limited: '触发模型速率限制',
@@ -283,7 +284,7 @@ export const GENERALIZED_ERROR_COPY = {
283
284
  provider_error: 'Provider returned an error',
284
285
  network_error: 'Network error',
285
286
  },
286
- };
287
+ }));
287
288
  export function generalizedErrorMessageForLocale(error, fallback, locale) {
288
289
  const classified = classifyGeneralizedError(error);
289
290
  return classified ? GENERALIZED_ERROR_COPY[locale][classified] : fallback;
@@ -16,6 +16,7 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ import { defineShippedUiMessageCatalog, resolveUiMessageCatalog } from './ui-locale.js';
19
20
  export const RELATIVE_HORIZON_MS = 7 * 24 * 60 * 60 * 1000;
20
21
  export const JUST_NOW_MS = 60_000;
21
22
  export const MINUTE_MS = 60_000;
@@ -24,11 +25,11 @@ export const DAY_MS = 24 * HOUR_MS;
24
25
  export const MONTH_MS = 30 * DAY_MS;
25
26
  export const YEAR_MS = 12 * MONTH_MS;
26
27
  const MAX_SIDEBAR_REFRESH_MS = 24 * DAY_MS;
27
- export const JUST_NOW = {
28
+ export const JUST_NOW = resolveUiMessageCatalog(defineShippedUiMessageCatalog()({
28
29
  'zh-CN': '刚刚',
29
30
  'zh-TW': '剛剛',
30
31
  en: 'just now',
31
- };
32
+ }));
32
33
  const SIDEBAR_TIME_BUCKETS = [
33
34
  { unitMs: MINUTE_MS, maxValue: 60, suffix: 'min' },
34
35
  { unitMs: HOUR_MS, maxValue: 24, suffix: 'h' },
@@ -32,6 +32,7 @@
32
32
  * projection, or ledger logic lives here. Those arrive in later nodes.
33
33
  */
34
34
  import { isWorkHubActionReceipt } from './workhub-action-result.js';
35
+ import { isToolCallOutcome } from './tool-result-status.js';
35
36
  import { isModelRetryDecision } from './model-failure.js';
36
37
  import { isRuntimeHandoffPause, runtimeHandoffPause, } from './runtime-handoff.js';
37
38
  import { hasMeaningfulMessageContent, isMessageContent, normalizeMessageContent, } from './events.js';
@@ -184,7 +185,7 @@ const TEXT_CONTENT_SHAPE = defineObjectShape()(['kind', 'text'], [
184
185
  ]);
185
186
  const THINKING_CONTENT_SHAPE = defineObjectShape()(['kind', 'text'], ['signature', 'providerOptions']);
186
187
  const FUNCTION_CALL_CONTENT_SHAPE = defineObjectShape()(['kind', 'id', 'name', 'args'], ['providerOptions', 'providerExecuted']);
187
- const FUNCTION_RESPONSE_CONTENT_SHAPE = defineObjectShape()(['kind', 'id', 'name', 'result'], ['isError', 'providerExecuted', 'providerOutput', 'modelProjection']);
188
+ const FUNCTION_RESPONSE_CONTENT_SHAPE = defineObjectShape()(['kind', 'id', 'name', 'result'], ['isError', 'outcome', 'providerExecuted', 'providerOutput', 'modelProjection']);
188
189
  const ERROR_CONTENT_SHAPE = defineObjectShape()(['kind', 'message'], ['code', 'reason', 'details', 'retry']);
189
190
  const SYSTEM_NOTE_CONTENT_SHAPE = defineObjectShape()(['kind', 'note'], ['data']);
190
191
  const INVOCATION_OPENED_CONTENT_SHAPE = defineObjectShape()(['kind', 'protocol', 'route', 'configuration', 'root', 'source'], ['lineage']);
@@ -438,6 +439,9 @@ function isRuntimeEventContent(value) {
438
439
  typeof value.name === 'string' &&
439
440
  Object.hasOwn(value, 'result') &&
440
441
  (value.isError === undefined || typeof value.isError === 'boolean') &&
442
+ (value.outcome === undefined ||
443
+ (isToolCallOutcome(value.outcome) &&
444
+ (value.outcome !== 'success') === (value.isError === true))) &&
441
445
  (value.providerExecuted === undefined || typeof value.providerExecuted === 'boolean') &&
442
446
  (value.modelProjection === undefined ||
443
447
  decodesDurableToolResultProjection(value.modelProjection)));
@@ -220,7 +220,10 @@ function isToolStep(value) {
220
220
  isOptionalNonnegativeNumber(value.endedAt) &&
221
221
  isOptionalNonnegativeNumber(value.durationMs) &&
222
222
  [value.toolCallId, value.operationId, value.recoveryPolicy].every(isOptionalString) &&
223
- (value.status === 'completed' || value.status === 'failed' || value.status === 'in_flight') &&
223
+ (value.status === 'completed' ||
224
+ value.status === 'failed' ||
225
+ value.status === 'interrupted' ||
226
+ value.status === 'in_flight') &&
224
227
  (value.recovered === undefined || isToolRecovery(value.recovered)));
225
228
  }
226
229
  function isToolRecovery(value) {
@@ -18,6 +18,7 @@
18
18
  */
19
19
  import { isWorkHubActionReceipt } from './workhub-action-result.js';
20
20
  import { isExecutorId } from './executor-id.js';
21
+ import { isToolCallOutcome } from './tool-result-status.js';
21
22
  import { isThinkingLevel } from './model-thinking.js';
22
23
  import { MODEL_FAILURE_MESSAGE_MAX_BYTES, isModelRetryDecision, } from './model-failure.js';
23
24
  import { decodeMessageContent, TOOL_ACTIVITY_KINDS, } from './events.js';
@@ -407,6 +408,7 @@ const TOOL_CALL_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts
407
408
  ]);
408
409
  const TOOL_RESULT_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts', 'toolUseId', 'isError', 'content'], [
409
410
  'durationMs',
411
+ 'outcome',
410
412
  'providerExecuted',
411
413
  'providerOutput',
412
414
  'origin',
@@ -636,6 +638,9 @@ function decodeMessage(value, decodeToolResultContent) {
636
638
  hasMessageEnvelope(message, true) &&
637
639
  typeof message.toolUseId === 'string' &&
638
640
  typeof message.isError === 'boolean' &&
641
+ (message.outcome === undefined ||
642
+ (isToolCallOutcome(message.outcome) &&
643
+ (message.outcome !== 'success') === message.isError)) &&
639
644
  (message.providerExecuted === undefined || typeof message.providerExecuted === 'boolean') &&
640
645
  isOptionalFiniteDuration(message.durationMs) &&
641
646
  isToolActivityIdentity(message))
@@ -16,6 +16,7 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ import { defineShippedUiMessageCatalog, resolveUiMessageCatalog } from './ui-locale.js';
19
20
  /**
20
21
  * Quiet-panel formatting for tool args + generic JSON results.
21
22
  *
@@ -29,7 +30,7 @@
29
30
  */
30
31
  import { redactSecrets } from './display-redaction.js';
31
32
  import { projectToolActivityArgs, readWriteStdinInputPreview } from './tool-activity-args.js';
32
- const STRINGS_BY_LOCALE = {
33
+ const STRINGS_BY_LOCALE = resolveUiMessageCatalog(defineShippedUiMessageCatalog()({
33
34
  'zh-CN': {
34
35
  backgroundTerminal: '后台终端交互',
35
36
  empty: '(空)',
@@ -63,7 +64,7 @@ const STRINGS_BY_LOCALE = {
63
64
  moreQuestions: (total) => (total > 1 ? ` +${total - 1} more` : ''),
64
65
  unanswered: 'Not answered',
65
66
  },
66
- };
67
+ }));
67
68
  function strings(locale) {
68
69
  return STRINGS_BY_LOCALE[locale] ?? STRINGS_BY_LOCALE['zh-CN'];
69
70
  }
@@ -16,6 +16,14 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
+ export function isToolCallOutcome(value) {
20
+ return value === 'success' || value === 'error' || value === 'aborted';
21
+ }
22
+ export function requireToolCallOutcome(value) {
23
+ if (!isToolCallOutcome(value))
24
+ throw new Error('Invalid tool call outcome');
25
+ return value;
26
+ }
19
27
  export function isInFlightToolStatus(status) {
20
28
  return status === 'running';
21
29
  }
@@ -55,7 +63,10 @@ export function isCancelledToolResultContent(content) {
55
63
  * isError:false) is `completed`, not interrupted. Failed cancels map to
56
64
  * `interrupted`.
57
65
  */
58
- export function toolResultActivityStatus(isError, content) {
66
+ export function toolResultActivityStatus(isError, content, outcome) {
67
+ if (outcome !== undefined) {
68
+ return outcome === 'success' ? 'completed' : outcome === 'aborted' ? 'interrupted' : 'errored';
69
+ }
59
70
  if (!isError)
60
71
  return 'completed';
61
72
  // Failed cancel (user stop / kill) — not a tool failure banner.
@@ -20,10 +20,16 @@ import { IntlMessageFormat } from 'intl-messageformat';
20
20
  /** Resolved locales supported by human-facing Maka clients. */
21
21
  export const UI_LOCALES = ['zh-CN', 'zh-TW', 'en'];
22
22
  export const UI_LOCALE_PREFERENCES = ['auto', ...UI_LOCALES];
23
+ /** Existing translations remain complete while new locales roll out gradually. */
24
+ export const SHIPPED_UI_LOCALES = ['en', 'zh-CN', 'zh-TW'];
23
25
  const messageFormatters = new Map();
24
26
  export function defineUiMessageCatalog() {
25
27
  return (catalog) => catalog;
26
28
  }
29
+ /** Require complete shipped copy; only future locales may use partial overlays. */
30
+ export function defineShippedUiMessageCatalog() {
31
+ return (catalog) => catalog;
32
+ }
27
33
  export function resolveUiMessageCatalog(catalog) {
28
34
  return Object.fromEntries(UI_LOCALES.map((locale) => [
29
35
  locale,
@@ -52,9 +58,9 @@ function mergeUiMessages(fallback, translation) {
52
58
  return fallback;
53
59
  if (!isMessageRecord(fallback) || !isMessageRecord(translation))
54
60
  return translation;
55
- return Object.fromEntries(Object.entries(fallback).map(([key, value]) => [
61
+ return Object.fromEntries([...new Set([...Object.keys(fallback), ...Object.keys(translation)])].map((key) => [
56
62
  key,
57
- mergeUiMessages(value, Object.hasOwn(translation, key) ? translation[key] : undefined),
63
+ mergeUiMessages(fallback[key], Object.hasOwn(translation, key) ? translation[key] : undefined),
58
64
  ]));
59
65
  }
60
66
  function isMessageRecord(value) {
@@ -99,6 +99,7 @@
99
99
  "./openai-urls": "./dist/openai-urls.js",
100
100
  "./llm-connections": "./dist/llm-connections.js",
101
101
  "./provider-registry": "./dist/provider-registry.js",
102
+ "./provider-retirement": "./dist/provider-retirement.js",
102
103
  "./model-catalog": "./dist/model-catalog.js",
103
104
  "./model-facts": "./dist/model-facts.js",
104
105
  "./model-metadata": "./dist/model-metadata.js",