@nimiplatform/app-tools 0.13.1 → 0.16.0-rc.9

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 (100) hide show
  1. package/README.md +65 -8
  2. package/bin/nimi-app.mjs +26 -10
  3. package/lib/app-access-declaration.mjs +3 -0
  4. package/lib/app-dependency-combinations.mjs +70 -20
  5. package/lib/app-doctor-update.mjs +95 -36
  6. package/lib/app-host-support.mjs +6 -0
  7. package/lib/app-icons.mjs +181 -0
  8. package/lib/app-identifiers.mjs +27 -0
  9. package/lib/app-info.mjs +21 -33
  10. package/lib/app-lifecycle-guidance.mjs +2 -1
  11. package/lib/app-pack.mjs +14 -36
  12. package/lib/app-project-lifecycle.mjs +141 -243
  13. package/lib/app-scaffold-capabilities.mjs +13 -109
  14. package/lib/app-scaffold-profiles.mjs +108 -117
  15. package/lib/app-scaffold.mjs +70 -165
  16. package/lib/app-toolchain-updates.mjs +45 -0
  17. package/lib/canonical-capability-ids.generated.mjs +2 -0
  18. package/lib/development-environment.d.mts +10 -0
  19. package/lib/development-environment.mjs +39 -0
  20. package/lib/hosted-web-release.mjs +98 -0
  21. package/lib/index.mjs +40 -1
  22. package/lib/mobile-development.mjs +19 -0
  23. package/lib/realm-environments.generated.mjs +5 -0
  24. package/lib/web-coordination.mjs +59 -0
  25. package/lib/web-development.d.mts +23 -0
  26. package/lib/web-development.mjs +118 -0
  27. package/lib/web-scaffold.mjs +125 -0
  28. package/package.json +39 -27
  29. package/scripts/dev-shell.mjs +4 -1
  30. package/scripts/sync-scaffold-versions.mjs +0 -2
  31. package/skills/nimi-app-lifecycle/SKILL.md +13 -5
  32. package/skills/nimi-app-lifecycle/references/acceptance.md +6 -2
  33. package/skills/nimi-app-lifecycle/references/adapt.md +7 -3
  34. package/skills/nimi-app-lifecycle/references/audit.md +3 -2
  35. package/skills/nimi-app-lifecycle/references/create.md +8 -2
  36. package/skills/nimi-app-lifecycle/references/release.md +2 -0
  37. package/skills/nimi-app-lifecycle/references/upgrade-platform.md +15 -1
  38. package/templates/app-source/src/ai-studio-core/ai-studio-core.css +87 -52
  39. package/templates/app-source/src/ai-studio-core/history-policy.ts +45 -11
  40. package/templates/app-source/src/ai-studio-core/history.ts +22 -11
  41. package/templates/app-source/src/ai-studio-core/host-context.tsx +9 -4
  42. package/templates/app-source/src/ai-studio-core/index.ts +2 -0
  43. package/templates/app-source/src/ai-studio-core/job-recovery-panel.tsx +15 -5
  44. package/templates/app-source/src/ai-studio-core/job-recovery.ts +2 -2
  45. package/templates/app-source/src/ai-studio-core/messages/en.json +79 -19
  46. package/templates/app-source/src/ai-studio-core/messages/zh.json +79 -19
  47. package/templates/app-source/src/ai-studio-core/module-registration.ts +1 -0
  48. package/templates/app-source/src/ai-studio-core/non-success-presentation.ts +40 -5
  49. package/templates/app-source/src/ai-studio-core/parameter-fields.tsx +12 -6
  50. package/templates/app-source/src/ai-studio-core/parameters.ts +4 -0
  51. package/templates/app-source/src/ai-studio-core/prompt-drafts.ts +42 -0
  52. package/templates/app-source/src/ai-studio-core/runtime-types.ts +9 -2
  53. package/templates/app-source/src/ai-studio-core/runtime.ts +8 -4
  54. package/templates/app-source/src/ai-studio-core/section-ai-testing-composer.tsx +98 -90
  55. package/templates/app-source/src/ai-studio-core/section-ai-testing-exchange-result.tsx +1 -1
  56. package/templates/app-source/src/ai-studio-core/section-ai-testing-history.tsx +205 -48
  57. package/templates/app-source/src/ai-studio-core/section-ai-testing-input.ts +1 -0
  58. package/templates/app-source/src/ai-studio-core/section-ai-testing-output.tsx +36 -14
  59. package/templates/app-source/src/ai-studio-core/section-ai-testing-result.tsx +102 -77
  60. package/templates/app-source/src/ai-studio-core/section-ai-testing-run.ts +62 -16
  61. package/templates/app-source/src/ai-studio-core/section-ai-testing-session-result.tsx +2 -0
  62. package/templates/app-source/src/ai-studio-core/section-ai-testing-studio-result.tsx +12 -21
  63. package/templates/app-source/src/ai-studio-core/section-ai-testing-transcription-result.tsx +26 -9
  64. package/templates/app-source/src/ai-studio-core/section-ai-testing-vision-result.tsx +3 -3
  65. package/templates/app-source/src/ai-studio-core/section-ai-testing.tsx +182 -81
  66. package/templates/app-source/src/ai-studio-core/workspace.tsx +49 -22
  67. package/templates/app-source/src/product-modules/agent-center/index.tsx +2 -3
  68. package/templates/app-source/src/product-modules/agent-conversation/index.tsx +2 -3
  69. package/templates/app-source/src/studio-modules/studio-create/messages/en.json +17 -3
  70. package/templates/app-source/src/studio-modules/studio-create/messages/zh.json +17 -3
  71. package/templates/app-source/src/studio-modules/studio-create/parameter-panel.tsx +33 -1
  72. package/templates/app-source/src/studio-modules/studio-create/parameters.ts +3 -1
  73. package/templates/app-source/src/studio-modules/studio-create/runtime.ts +47 -4
  74. package/templates/app-source/src/studio-modules/studio-media/messages/en.json +59 -8
  75. package/templates/app-source/src/studio-modules/studio-media/messages/zh.json +59 -8
  76. package/templates/app-source/src/studio-modules/studio-media/music-parameters.tsx +2 -1
  77. package/templates/app-source/src/studio-modules/studio-media/parameter-panel.tsx +271 -83
  78. package/templates/app-source/src/studio-modules/studio-media/parameters.ts +120 -2
  79. package/templates/app-source/src/studio-modules/studio-media/registration.ts +1 -0
  80. package/templates/app-source/src/studio-modules/studio-media/runtime.ts +24 -14
  81. package/templates/app-source/src/studio-modules/studio-voice/descriptors.ts +1 -1
  82. package/templates/app-source/src/studio-modules/studio-voice/messages/en.json +3 -2
  83. package/templates/app-source/src/studio-modules/studio-voice/messages/zh.json +3 -2
  84. package/templates/app-source/src/studio-modules/studio-voice/parameter-panel.tsx +46 -23
  85. package/templates/app-source/src/studio-modules/studio-voice/registration.ts +2 -1
  86. package/templates/app-source/src/studio-modules/studio-voice/runtime.ts +2 -2
  87. package/templates/app-source/src/workbench-core/workbench-core.tsx +27 -3
  88. package/templates/default-starter/AGENTS.md +8 -5
  89. package/templates/default-starter/NIMI_APP.md +7 -0
  90. package/templates/default-starter/README.md +3 -1
  91. package/templates/default-starter/src/shell/App.tsx +12 -20
  92. package/templates/default-starter/src/shell/auth/local-app-client.ts +6 -15
  93. package/templates/default-starter/src/shell/auth/runtime-platform.ts +7 -107
  94. package/templates/default-starter/src/shell/workbench-target-adapter.ts +9 -126
  95. package/templates/default-starter.manifest.json +4 -16
  96. package/templates/hosted-web-release.yml +88 -0
  97. package/templates/default-starter/src-tauri/Cargo.toml +0 -17
  98. package/templates/default-starter/src-tauri/build.rs +0 -32
  99. package/templates/default-starter/src-tauri/capabilities/default.json +0 -7
  100. package/templates/default-starter/src-tauri/tauri.conf.json +0 -26
@@ -5,6 +5,7 @@ import { studioResultAssetPaths, studioWorldInputSource } from './managed-result
5
5
 
6
6
  import type { AIStudioHistoryPanelPreferences } from './workspace.js';
7
7
  import type { StudioRunHistory, StudioRunHistoryRecord } from './history.js';
8
+ import type { StudioJsonValue } from './runtime-types.js';
8
9
 
9
10
  // Existing records may truthfully carry a previously truncated input preview.
10
11
  const STORED_INPUT_PREVIEW_MAX_BYTES = 16 * 1024;
@@ -80,7 +81,7 @@ function validTimestamp(value: unknown, path: string): void {
80
81
  if (Number.isNaN(new Date(requiredString(value, path)).valueOf())) historyError(path, 'requires a valid timestamp');
81
82
  }
82
83
 
83
- function validateHistoryJson(value: unknown, path: string, depth = 0): void {
84
+ export function validateHistoryJson(value: unknown, path: string, depth = 0): asserts value is StudioJsonValue {
84
85
  if (value === null || typeof value === 'string' || typeof value === 'boolean') return;
85
86
  if (typeof value === 'number' && Number.isFinite(value)) return;
86
87
  if (depth > 32) historyError(path, 'exceeds the JSON depth bound');
@@ -270,6 +271,24 @@ export function validateStudioHistoryResult(value: unknown, path: string): void
270
271
  historyError(`${path}.sample`, 'requires finite numbers');
271
272
  }
272
273
  optionalNonNegativeNumber(value.totalTokens, `${path}.totalTokens`);
274
+ if (value.retrieval !== undefined) {
275
+ const retrieval = value.retrieval;
276
+ if (!isJsonObject(retrieval) || !requiredString(retrieval.query, `${path}.retrieval.query`).trim()
277
+ || !requiredString(value.spaceId, `${path}.spaceId`).trim()
278
+ || !Array.isArray(retrieval.matches) || !retrieval.matches.length || retrieval.matches.length !== value.vectorCount) historyError(path, 'requires a complete retrieval ranking');
279
+ const seen = new Set<number>();
280
+ let previous = Infinity;
281
+ for (const match of retrieval.matches) {
282
+ if (!isJsonObject(match)) historyError(path, 'requires retrieval match objects');
283
+ nonNegativeSafeInteger(match.inputIndex, `${path}.retrieval.inputIndex`);
284
+ const index = match.inputIndex as number;
285
+ if (index >= (value.vectorCount as number) || seen.has(index) || typeof match.score !== 'number'
286
+ || !Number.isFinite(match.score) || match.score < -1 || match.score > 1 || match.score > previous
287
+ || Array.from(requiredString(match.excerpt, `${path}.retrieval.excerpt`)).length > 300) historyError(path, 'has invalid retrieval order or score');
288
+ seen.add(index);
289
+ previous = match.score;
290
+ }
291
+ }
273
292
  return;
274
293
  }
275
294
  if (kind === 'text-annotation') {
@@ -284,7 +303,7 @@ export function validateStudioHistoryResult(value: unknown, path: string): void
284
303
  return;
285
304
  }
286
305
  if (kind === 'text-exchange') {
287
- if (value.scenario !== 'tool-call' && value.scenario !== 'structured-output') historyError(`${path}.scenario`, 'is invalid');
306
+ if (value.scenario !== 'tool-call' && value.scenario !== 'structured-output' && value.scenario !== 'json-object') historyError(`${path}.scenario`, 'is invalid');
288
307
  if (!Array.isArray(value.steps) || value.steps.length === 0 || value.steps.length > 16) historyError(`${path}.steps`, 'requires 1 to 16 steps');
289
308
  value.steps.forEach((step, index) => {
290
309
  const stepPath = `${path}.steps[${index}]`;
@@ -306,6 +325,12 @@ export function validateStudioHistoryResult(value: unknown, path: string): void
306
325
  return;
307
326
  }
308
327
  if (kind === 'session') {
328
+ if (value.closure !== undefined) {
329
+ if (value.capabilityContract !== 'realtime.interact' || !isJsonObject(value.closure) || Object.keys(value.closure).some(key => !['localResourcesReleased','providerSessionClosed'].includes(key)) || typeof value.closure.localResourcesReleased !== 'boolean' || typeof value.closure.providerSessionClosed !== 'boolean') historyError(`${path}.closure`, 'requires independent closure observations');
330
+ }
331
+ if (value.audioUsage !== undefined) {
332
+ if (value.capabilityContract !== 'realtime.interact' || !isJsonObject(value.audioUsage) || Object.keys(value.audioUsage).some(key => !['audioSeconds','final'].includes(key)) || typeof value.audioUsage.audioSeconds !== 'number' || !Number.isFinite(value.audioUsage.audioSeconds) || value.audioUsage.audioSeconds < 0 || value.audioUsage.audioSeconds > 86400 || typeof value.audioUsage.final !== 'boolean') historyError(`${path}.audioUsage`, 'requires bounded reported audio seconds and finality');
333
+ }
309
334
  requiredString(value.capabilityContract, `${path}.capabilityContract`);
310
335
  validTimestamp(value.startedAt, `${path}.startedAt`);
311
336
  validTimestamp(value.endedAt, `${path}.endedAt`);
@@ -519,6 +544,11 @@ export function validateRunConfig(value: unknown, path: string): void {
519
544
  requiredString(target.capabilityId, `${path}.target.capabilityId`);
520
545
  if (target.capabilityContract !== null) requiredString(target.capabilityContract, `${path}.target.capabilityContract`);
521
546
  for (const field of ['section', 'status', 'source', 'intentLabel', 'detail'] as const) requiredString(target[field], `${path}.target.${field}`);
547
+ optionalString(target.targetLabel, `${path}.target.targetLabel`);
548
+ optionalString(target.targetRef, `${path}.target.targetRef`);
549
+ if (target.configuredDefaults !== undefined && !isJsonObject(target.configuredDefaults)) {
550
+ historyError(`${path}.target.configuredDefaults`, 'requires an object');
551
+ }
522
552
  if (!isJsonObject(target.params)) historyError(`${path}.target.params`, 'requires an object');
523
553
  if (!Array.isArray(target.paramsSummary) || target.paramsSummary.some((entry) => typeof entry !== 'string')) historyError(`${path}.target.paramsSummary`, 'requires strings');
524
554
  if (target.profileOrigin !== null) historyError(`${path}.target.profileOrigin`, 'requires null');
@@ -570,6 +600,11 @@ export function parseStudioRunHistory(value: unknown): StudioRunHistory {
570
600
  return history;
571
601
  }
572
602
 
603
+ export function parseStudioRunHistoryRecord(value: unknown): StudioRunHistoryRecord {
604
+ if (!isJsonObject(value) || typeof value.capabilityId !== 'string') throw new Error('AI Studio history record requires a capability.');
605
+ return parseStudioRunHistory({ [value.capabilityId]: [value] })[value.capabilityId]![0]!;
606
+ }
607
+
573
608
  export function flattenStudioHistoryRecords(history: StudioRunHistory): StudioRunHistoryRecord[] {
574
609
  return Object.values(history).flatMap((records) => records);
575
610
  }
@@ -577,19 +612,18 @@ export function flattenStudioHistoryRecords(history: StudioRunHistory): StudioRu
577
612
  export function studioHistoryFromRecords(records: readonly StudioRunHistoryRecord[]): StudioRunHistory {
578
613
  const history: StudioRunHistory = {};
579
614
  for (const record of records) {
580
- const existing = Object.hasOwn(history, record.capabilityId) ? history[record.capabilityId] ?? [] : [];
581
- Object.defineProperty(history, record.capabilityId, {
582
- value: [...existing, record],
583
- enumerable: true,
584
- configurable: true,
585
- writable: true,
586
- });
615
+ if (!Object.hasOwn(history, record.capabilityId)) {
616
+ Object.defineProperty(history, record.capabilityId, {
617
+ value: [], enumerable: true, configurable: true, writable: true,
618
+ });
619
+ }
620
+ history[record.capabilityId]!.push(record);
587
621
  }
588
622
  return history;
589
623
  }
590
624
 
591
- // Saving a run never removes or shrinks another run. Storage splits complete
592
- // records across documents; only an explicit user action removes history.
625
+ // Saving a run never removes or shrinks another run. Storage publishes complete
626
+ // records independently; only an explicit user action removes history.
593
627
  export function appendStudioRunHistoryRecord(history: StudioRunHistory, record: StudioRunHistoryRecord): StudioRunHistory {
594
628
  return studioHistoryFromRecords([record, ...flattenStudioHistoryRecords(history).filter((existing) => existing.id !== record.id)]
595
629
  .sort((left, right) => right.createdAt.localeCompare(left.createdAt)));
@@ -1,4 +1,4 @@
1
- import type { StudioAudioSeparation, StudioFaceSwap, StudioJsonValue, StudioMusicGeneration, StudioMusicTranscription, StudioSessionSummary, StudioTextDecisionAnswer, StudioTextExchangeStep, StudioVoiceConversion } from './runtime-types.js';
1
+ import type { StudioEmbeddingRetrieval, StudioAudioSeparation, StudioFaceSwap, StudioJsonValue, StudioMusicGeneration, StudioMusicTranscription, StudioSessionSummary, StudioTextDecisionAnswer, StudioTextExchangeStep, StudioVoiceConversion } from './runtime-types.js';
2
2
  import { isJsonObject } from '@nimiplatform/sdk/types';
3
3
  import { studioResultAssetReferences } from './managed-result-references.js';
4
4
  import type { NimiLocalAppSpeechTranscript, NimiLocalAppVisionLocateResult } from '@nimiplatform/sdk/app';
@@ -18,6 +18,9 @@ export type StudioRunTargetSnapshot = {
18
18
  readonly status: StudioRunTargetStatus;
19
19
  readonly source: StudioRunTargetSource;
20
20
  readonly intentLabel: string;
21
+ readonly targetLabel?: string;
22
+ readonly targetRef?: string;
23
+ readonly configuredDefaults?: Readonly<Record<string, unknown>>;
21
24
  readonly detail: string;
22
25
  readonly params: Readonly<Record<string, unknown>>;
23
26
  readonly paramsSummary: readonly string[];
@@ -72,6 +75,7 @@ export type StudioRunHistoryResultSnapshot =
72
75
  | {
73
76
  ok: true;
74
77
  kind: 'embedding';
78
+ retrieval?: StudioEmbeddingRetrieval;
75
79
  summary: string;
76
80
  vectorCount: number;
77
81
  dimensions: number;
@@ -149,7 +153,7 @@ export type StudioRunHistoryResultSnapshot =
149
153
  ok: true;
150
154
  kind: 'text-exchange';
151
155
  summary: string;
152
- scenario: 'tool-call' | 'structured-output';
156
+ scenario: 'tool-call' | 'structured-output' | 'json-object';
153
157
  steps: StudioTextExchangeStep[];
154
158
  text: string;
155
159
  structured?: StudioJsonValue;
@@ -590,6 +594,7 @@ export function createStudioRunHistoryResultSnapshot(result: StudioCapabilityRun
590
594
  dimensions: output.dimensions,
591
595
  ...(output.spaceId ? { spaceId: output.spaceId } : {}),
592
596
  sample: output.sample,
597
+ ...(output.retrieval ? { retrieval: structuredClone(output.retrieval) } : {}),
593
598
  totalTokens: output.totalTokens,
594
599
  ...trace,
595
600
  };
@@ -641,6 +646,8 @@ export function createStudioRunHistoryResultSnapshot(result: StudioCapabilityRun
641
646
  endedAt: output.endedAt,
642
647
  ending: output.ending,
643
648
  terminalReason: output.terminalReason,
649
+ ...(output.audioUsage ? { audioUsage: { ...output.audioUsage } } : {}),
650
+ ...(output.closure ? { closure: { ...output.closure } } : {}),
644
651
  observed: { ...output.observed },
645
652
  ...trace,
646
653
  };
@@ -769,6 +776,7 @@ export function restoreStudioCapabilityRunResult(
769
776
  dimensions: snapshot.dimensions,
770
777
  ...(snapshot.spaceId ? { spaceId: snapshot.spaceId } : {}),
771
778
  sample: snapshot.sample,
779
+ ...(snapshot.retrieval ? { retrieval: structuredClone(snapshot.retrieval) } : {}),
772
780
  totalTokens: snapshot.totalTokens,
773
781
  },
774
782
  };
@@ -815,6 +823,8 @@ export function restoreStudioCapabilityRunResult(
815
823
  endedAt: snapshot.endedAt,
816
824
  ending: snapshot.ending,
817
825
  terminalReason: snapshot.terminalReason,
826
+ ...(snapshot.audioUsage ? { audioUsage: { ...snapshot.audioUsage } } : {}),
827
+ ...(snapshot.closure ? { closure: { ...snapshot.closure } } : {}),
818
828
  observed: { ...snapshot.observed },
819
829
  },
820
830
  };
@@ -978,19 +988,19 @@ function hasRunConfigParam(value: unknown): boolean {
978
988
  return Boolean(value);
979
989
  }
980
990
 
981
- function runConfigParamDefinitions(runConfig: StudioRunConfigSnapshot): ReadonlyArray<{ key: string; label: string; group: string }> {
982
- if (runConfig.target.capabilityId === 'text.generate' || runConfig.target.capabilityId === 'chat.stream') {
983
- return TEXT_REQUEST_PARAM_ORDER;
984
- }
985
- return Object.keys(runConfig.target.params)
991
+ function runConfigParamDefinitions(runConfig: StudioRunConfigSnapshot, params: Readonly<Record<string, unknown>>): ReadonlyArray<{ key: string; label: string; group: string }> {
992
+ const definitions = Object.keys(params)
986
993
  .filter((key) => !HIDDEN_REQUEST_PARAM_KEYS.includes(key as (typeof HIDDEN_REQUEST_PARAM_KEYS)[number]))
987
994
  .map((key) => ({ key, label: key, group: 'Request parameters' }));
995
+ if (runConfig.target.capabilityId === 'text.generate' || runConfig.target.capabilityId === 'chat.stream') {
996
+ return [...TEXT_REQUEST_PARAM_ORDER, ...definitions.filter(item => !TEXT_REQUEST_PARAM_ORDER.some(known => known.key === item.key))];
997
+ }
998
+ return definitions;
988
999
  }
989
1000
 
990
- export function getStudioRunConfigParamRows(runConfig: StudioRunConfigSnapshot): StudioRunConfigParamRow[] {
991
- const params = runConfig.target.params;
1001
+ export function getStudioRunConfigParamRows(runConfig: StudioRunConfigSnapshot, params = runConfig.target.params): StudioRunConfigParamRow[] {
992
1002
  if (!isJsonObject(params)) return [];
993
- return runConfigParamDefinitions(runConfig).flatMap((definition) => {
1003
+ return runConfigParamDefinitions(runConfig, params).flatMap((definition) => {
994
1004
  const value = params[definition.key];
995
1005
  if (!hasRunConfigParam(value)) return [];
996
1006
  const formatted = formatStudioRunConfigValue(value);
@@ -1007,7 +1017,7 @@ export function getStudioRunConfigParamRows(runConfig: StudioRunConfigSnapshot):
1007
1017
  export function getStudioRunIntentLabel(record: StudioRunHistoryRecord): string {
1008
1018
  const label = record.runConfig?.target.intentLabel?.trim();
1009
1019
  if (label) return label;
1010
- return getStudioRunStatusLabel(record.status);
1020
+ return 'Unknown';
1011
1021
  }
1012
1022
 
1013
1023
  export function getStudioRunIntentSource(record: StudioRunHistoryRecord): StudioRunIntentSource {
@@ -1076,6 +1086,7 @@ export function getStudioRunHistoryExportText(record: StudioRunHistoryRecord): s
1076
1086
  if (!snapshot.ok) return snapshot.message;
1077
1087
  if (snapshot.kind === 'text' || snapshot.kind === 'transcript') return snapshot.body;
1078
1088
  if (snapshot.kind === 'text-exchange') return snapshot.text;
1089
+ if (snapshot.kind === 'embedding' && snapshot.retrieval) return JSON.stringify({ spaceId: snapshot.spaceId, dimensions: snapshot.dimensions, retrieval: snapshot.retrieval }, null, 2);
1079
1090
  if (snapshot.kind === 'speaker-embedding') return JSON.stringify({ jobId: snapshot.jobId, spaceId: snapshot.spaceId, vector: snapshot.vector }, null, 2);
1080
1091
  if (snapshot.kind === 'text-decision' && snapshot.answers) return JSON.stringify({ answers: snapshot.answers }, null, 2);
1081
1092
  return snapshot.summary;
@@ -14,11 +14,12 @@ export type StudioHostCommandResult<TValue extends object = Record<string, never
14
14
 
15
15
  export type StudioTextExportResult =
16
16
  | { readonly ok: true; readonly value: {
17
+ readonly destination: 'runtime-asset';
17
18
  readonly filename: string;
18
19
  readonly artifactPath: string;
19
20
  readonly byteSize: number;
20
21
  readonly revealed: boolean;
21
- } }
22
+ } | { readonly destination: 'browser-download'; readonly filename: string; readonly byteSize: number } }
22
23
  | { readonly ok: false; readonly error?: unknown };
23
24
 
24
25
  export type AIStudioHostPort = {
@@ -30,7 +31,8 @@ export type AIStudioHostPort = {
30
31
  };
31
32
  readonly app: {
32
33
  readonly projection: {
33
- readonly promptDraft: (key: StudioPromptDraftKey, enabled: boolean) => { readonly prompt: string | null };
34
+ readonly assetExportAction: () => 'reveal' | 'download';
35
+ readonly promptDraft: (key: StudioPromptDraftKey, enabled: boolean) => Promise<{ readonly prompt: string | null }>;
34
36
  readonly projectRunTarget: (input: {
35
37
  readonly capability: StudioCapabilityDescriptor;
36
38
  readonly runtime: import('./runtime-types.js').StudioRuntimeInspection | null;
@@ -47,6 +49,10 @@ export type AIStudioHostPort = {
47
49
  readonly savePromptDraft: (key: StudioPromptDraftKey, prompt: string, enabled: boolean) => Promise<unknown>;
48
50
  readonly copyText: (text: string) => Promise<StudioHostCommandResult<{ readonly copied: boolean }>>;
49
51
  readonly exportText: (input: { readonly filename: string; readonly body: string }) => Promise<StudioTextExportResult>;
52
+ readonly exportAsset: (relativePath: string) => Promise<void>;
53
+ readonly openAssetMediaUrl: (relativePath: string, signal?: AbortSignal) => Promise<{
54
+ readonly url: string; readonly revoke: () => Promise<void>;
55
+ }>;
50
56
  };
51
57
  };
52
58
  readonly sdk: {
@@ -65,13 +71,12 @@ export type AIStudioHostPort = {
65
71
  readonly sizeBytes: number;
66
72
  readonly mimeType: NimiLocalAppArtifactUploadMime;
67
73
  }>;
68
- readonly assets: NimiLocalAppClient['storage']['assets'];
74
+ readonly assets: Omit<NimiLocalAppClient['storage']['assets'], 'reveal'>;
69
75
  readonly storage: Pick<NimiLocalAppClient['storage'], 'readJson' | 'writeJson'>;
70
76
  readonly aiConfig: {
71
77
  readonly getSnapshot: () => Promise<NimiAIConfigSnapshot>;
72
78
  readonly get: () => Promise<NimiPortableAppAIConfig | null>;
73
79
  };
74
- readonly revealLocalAppAsset: (relativePath: string) => Promise<{ readonly revealed: true }>;
75
80
  };
76
81
  };
77
82
 
@@ -65,6 +65,7 @@ export {
65
65
  createStudioRunTargetSummary,
66
66
  } from './run-target.js';
67
67
  export {
68
+ parseStudioRunHistoryRecord,
68
69
  DEFAULT_AI_STUDIO_HISTORY_PANEL_PREFERENCES,
69
70
  appendStudioRunHistoryRecord,
70
71
  cleanupStudioHistoryArtifacts,
@@ -185,6 +186,7 @@ export {
185
186
  type StudioRuntimeRunnerSet,
186
187
  } from './runtime.js';
187
188
  export {
189
+ createStudioPromptDraftRepository,
188
190
  STUDIO_PROMPT_DRAFTS_SCHEMA_VERSION,
189
191
  createEmptyStudioPromptDraftStore,
190
192
  parseStudioPromptDraftStore,
@@ -3,9 +3,15 @@ import { StudioHistoryResultContext, StudioHistoryPanelContext } from './context
3
3
  import { Button } from '@nimiplatform/kit/ui';
4
4
  import { useAIStudioHost } from './host-context.js';
5
5
  import type { StudioCapabilityRunResult } from './runtime-types.js';
6
+ import type { StudioRunHistoryRecord } from './history.js';
6
7
  import { forgetStudioJobRecovery, readStudioJobRecovery, type StudioJobRecoveryEntry, type StudioJobRecoveryCapability } from './job-recovery.js';
7
8
 
8
- export function StudioJobRecoveryPanel({ disabled, capability = 'music.generate' }: { readonly disabled: boolean; readonly capability?: StudioJobRecoveryCapability }) {
9
+ export function StudioJobRecoveryPanel({ disabled, capability = 'music.generate', history, onSelectHistoryRun }: {
10
+ readonly disabled: boolean;
11
+ readonly capability?: StudioJobRecoveryCapability;
12
+ readonly history?: readonly StudioRunHistoryRecord[];
13
+ readonly onSelectHistoryRun?: (record: StudioRunHistoryRecord) => void;
14
+ }) {
9
15
  const host = useAIStudioHost();
10
16
  const { translate: t } = host;
11
17
  const commitResult = useContext(StudioHistoryResultContext);
@@ -58,7 +64,8 @@ export function StudioJobRecoveryPanel({ disabled, capability = 'music.generate'
58
64
  if (next.ok) {
59
65
  controller.signal.throwIfAborted();
60
66
  if (!commitResult) throw new Error(t('Music.historyOwnerUnavailable'));
61
- await commitResult(next, entry.prompt ?? '', entry.runConfig);
67
+ const record = await commitResult(next, entry.prompt ?? '', entry.runConfig);
68
+ if (!view.signal.aborted) onSelectHistoryRun?.(record);
62
69
  }
63
70
  if (view.signal.aborted) return;
64
71
  setResult(next);
@@ -73,19 +80,22 @@ export function StudioJobRecoveryPanel({ disabled, capability = 'music.generate'
73
80
  }
74
81
  finally { if (observation.current === view) { abort.current = null; observation.current = null; if (!view.signal.aborted) setBusy(false); } }
75
82
  }
76
- if (!entries.length && !error) return null;
83
+ const visibleEntries = entries.filter((entry) => !entry.result?.ok || !history?.some((record) => (
84
+ record.result?.ok && 'jobId' in record.result && record.result.jobId === entry.jobId
85
+ )));
86
+ if (!visibleEntries.length && !error && !busy) return null;
77
87
  const summaryState = busy ? t('Music.recovering')
78
88
  : error || (result && !result.ok) ? t('Music.recoveryNeedsAttention')
79
89
  : result?.ok ? t('Music.recovered') : '';
80
90
  return <details ref={panel} className="studio-recovery" aria-label={t('Music.recoveryTitle')}>
81
91
  <summary>
82
- {t('Music.recoveryTitle')} <span>({entries.length})</span>
92
+ {t('Music.recoveryTitle')} <span>({visibleEntries.length})</span>
83
93
  {summaryState ? <span className="studio-recovery__state" role="status" title={summaryState}>{summaryState}</span> : null}
84
94
  </summary>
85
95
  <div className="studio-recovery__body">
86
96
  <p className="text-sm opacity-70">{t('Music.recoveryHint')}</p>
87
97
  <div className="max-h-48 space-y-2 overflow-y-auto">
88
- {[...entries].reverse().map((entry) => <div key={entry.clientSubmissionId} className="flex flex-wrap items-center gap-2">
98
+ {[...visibleEntries].reverse().map((entry) => <div key={entry.clientSubmissionId} className="flex flex-wrap items-center gap-2">
89
99
  <time dateTime={entry.createdAt}>{new Date(entry.createdAt).toLocaleString(host.locale)}</time>
90
100
  <Button disabled={disabled || busy} onClick={() => void recover(entry)}>{t(entry.result ? 'Music.openSaved' : 'Music.recover')}</Button>
91
101
  <Button disabled={disabled || busy} onClick={() => void forgetStudioJobRecovery(host.sdk.storage, entry.clientSubmissionId, capability).then(() => {
@@ -33,7 +33,7 @@ export type StudioJobRecoveryDetails = {
33
33
  readonly texts?: readonly string[];
34
34
  readonly faceSwap?: import('./runtime-types.js').StudioFaceSwap;
35
35
  };
36
- const paths = { 'audio.speaker.embed': 'studio/speaker-embedding-recovery.json', 'image.generate': 'studio/image-recovery.json', 'video.generate': 'studio/video-recovery.json', 'audio.synthesize': 'studio/speech-recovery.json', 'audio.transcribe': 'studio/transcript-recovery.json', 'voice.create': 'studio/voice-recovery.json', 'vision.locate': 'studio/locate-recovery.json', 'text.annotate': 'studio/annotation-recovery.json', 'image.face_swap': 'studio/image-face-recovery.json', 'video.face_swap': 'studio/video-face-recovery.json', 'music.generate': 'studio/music-recovery.json', 'music.transcribe': 'studio/music-transcription-recovery.json', 'audio.voice.convert': 'studio/voice-convert-recovery.json', 'audio.separate': 'studio/audio-separation-recovery.json' };
36
+ const paths = { 'image.upscale': 'studio/image-upscale-recovery.json', 'video.upscale': 'studio/video-upscale-recovery.json', 'audio.speaker.embed': 'studio/speaker-embedding-recovery.json', 'image.generate': 'studio/image-recovery.json', 'video.generate': 'studio/video-recovery.json', 'audio.synthesize': 'studio/speech-recovery.json', 'audio.transcribe': 'studio/transcript-recovery.json', 'voice.create': 'studio/voice-recovery.json', 'vision.locate': 'studio/locate-recovery.json', 'text.annotate': 'studio/annotation-recovery.json', 'image.face_swap': 'studio/image-face-recovery.json', 'video.face_swap': 'studio/video-face-recovery.json', 'music.generate': 'studio/music-recovery.json', 'music.transcribe': 'studio/music-transcription-recovery.json', 'audio.voice.convert': 'studio/voice-convert-recovery.json', 'audio.separate': 'studio/audio-separation-recovery.json' };
37
37
  let mutationTail: Promise<unknown> = Promise.resolve();
38
38
 
39
39
  export async function readStudioJobRecovery(storage: Storage, capability: StudioJobRecoveryCapability = 'music.generate'): Promise<readonly StudioJobRecoveryEntry[]> {
@@ -186,7 +186,7 @@ export function recordedStudioScenarioJobClient(context: import('./runtime.js').
186
186
  } });
187
187
  }
188
188
 
189
- export async function recoverStudioJobId(client: NimiLocalAppClient, entry: StudioJobRecoveryEntry, capability: StudioJobRecoveryCapability): Promise<string> {
189
+ export async function recoverStudioJobId(client: { readonly ai: Pick<NimiLocalAppClient['ai'], 'scenarioJobs'>; readonly storage: Storage }, entry: StudioJobRecoveryEntry, capability: StudioJobRecoveryCapability): Promise<string> {
190
190
  const response = entry.jobId ? await client.ai.scenarioJobs.get(entry.jobId) : await client.ai.scenarioJobs.lookupSubmission(entry.clientSubmissionId);
191
191
  await captureStudioJobRecoveryJobId(client.storage, entry.clientSubmissionId, response.job.jobId, capability);
192
192
  return response.job.jobId;
@@ -9,12 +9,25 @@
9
9
  "exportSaved": "File saved: {{path}}",
10
10
  "exportSavedRevealFailed": "The file was saved to {{path}}, but its folder could not be shown. Open it from this path. Exporting again creates another file.",
11
11
  "assetRevealed": "File shown in folder.",
12
+ "downloadRequested": "Download requested. Check your browser's downloads.",
12
13
  "assetRevealFailed": "The folder could not be shown for {{path}}. The file has not been changed; try again when the host is available."
13
14
  },
14
15
  "History": {
15
16
  "positionLoading": "Reading this saved result…",
16
17
  "positionUnavailable": "This saved result is unavailable. Retry reading it or go back to another page.",
17
18
  "title": "History",
19
+ "closePanel": "Close history panel",
20
+ "moreActions": "More history actions",
21
+ "compareRuns": "Compare runs",
22
+ "compareCount": "Select two runs of the same capability ({{count}} of 2 selected).",
23
+ "openComparison": "Show comparison",
24
+ "selectComparisonRun": "Compare {{run}}",
25
+ "comparisonDescription": "Review the recorded inputs, configuration and outputs for these runs.",
26
+ "compareInput": "Input",
27
+ "compareOutput": "Output",
28
+ "compareNoParameters": "No explicit parameters were recorded.",
29
+ "compareUnknown": "Not recorded",
30
+ "openRun": "Open run",
18
31
  "panelAriaLabel": "Runtime test History",
19
32
  "filterAriaLabel": "Filter history",
20
33
  "filtersAriaLabel": "History filters",
@@ -29,7 +42,7 @@
29
42
  "filters": {
30
43
  "status": {
31
44
  "all": "All statuses",
32
- "ready": "Runtime ready",
45
+ "ready": "Completed",
33
46
  "failed": "Failed",
34
47
  "canceled": "Canceled",
35
48
  "timedOut": "Timed out",
@@ -71,7 +84,8 @@
71
84
  "hideFailures": "Hide failed",
72
85
  "showFailures": "Show failed",
73
86
  "unsupportedCapability": "This record's capability cannot be opened here",
74
- "searchPlaceholder": "Search prompts or results",
87
+ "searchPlaceholder": "Search prompts, models or results",
88
+ "showMoreRuns": "Show more history",
75
89
  "deleteRun": "Delete this record",
76
90
  "deleteRecordOnly": "Delete record and keep managed asset",
77
91
  "deleteRecordAndAsset": "Delete record and managed asset",
@@ -108,6 +122,7 @@
108
122
  "recentRuns": "Recent runs",
109
123
  "emptyNone": "No runs yet",
110
124
  "emptyFiltered": "No runs match these filters",
125
+ "savedRefreshFailedTitle": "Saved. History could not refresh.",
111
126
  "loadFailedTitle": "History failed to load",
112
127
  "saveFailedTitle": "History failed to save",
113
128
  "deleteRecordAndDocument": "Delete record and its saved result",
@@ -138,13 +153,16 @@
138
153
  "runtimeTimeout": "This task timed out.",
139
154
  "streamInterrupted": "The live result connection ended before Runtime confirmed a final state.",
140
155
  "runtimeCallFailed": "This generation could not be completed.",
156
+ "contentFilterBlocked": "Content filtering blocked this request or response.",
141
157
  "inputLimitExceeded": "The configured model cannot take this whole input. Nothing was shortened or answered in part.",
142
158
  "textBehaviorUnsupported": "The selected model cannot run this request as set: its tools, structured output, reasoning or generation settings are not supported. No partial answer was accepted.",
143
159
  "mediaOptionUnsupported": "The selected model cannot use one or more media settings in this request.",
160
+ "embeddingPurposeUnsupported": "The selected model does not support the current retrieval purpose setting.",
144
161
  "modalityUnsupported": "The selected configuration does not support one or more inputs or options in this request.",
145
- "providerRateLimited": "The cloud service refused this request because a rate or usage limit was reached. For a ChatGPT plan connection, this is the plan's usage limit for this app.",
162
+ "providerRateLimited": "The cloud service refused this request because a rate, usage, or account credit limit was reached.",
146
163
  "mediaCodecUnavailable": "The audio and video tools required by this request were unavailable when it ran.",
147
164
  "localLoadFailed": "The current on-device configuration could not run this request.",
165
+ "localConfigurationMissing": "This on-device AI capability has no runnable configuration yet. Saving an App selection does not mean its model is ready.",
148
166
  "voiceInputRequired": "The selected speech model needs an explicit compatible voice before it can synthesize audio.",
149
167
  "voiceTargetMismatch": "This voice asset was created for a different speech model and cannot be used with the current selection.",
150
168
  "voiceUnavailable": "The selected voice is no longer available.",
@@ -156,7 +174,13 @@
156
174
  "configInvalid": "This capability's saved AI configuration can't run on the current Runtime, for example because its cloud service is no longer supported.",
157
175
  "modelNotFound": "The selected model is not available: its cloud account does not offer it, or no admitted implementation exists for it. Nothing was generated.",
158
176
  "fallback": "The generation did not complete.",
159
- "stoppedDirectCall": "You stopped waiting for this call. A result that arrives later will not be shown."
177
+ "stoppedDirectCall": "You stopped waiting for this call. A result that arrives later will not be shown.",
178
+ "providerAuthFailed": "The cloud service rejected this connection's credentials. Its API key may be expired, revoked, or invalid.",
179
+ "mediaStorageMissing": "This video request needs storage for its uploaded audio or video references.",
180
+ "mediaStorageCredentials": "OSS rejected the reference-media storage credentials.",
181
+ "mediaStorageVersioning": "Reference-media storage requires a bucket with versioning never enabled.",
182
+ "mediaStorageUnavailable": "The reference-media storage request could not complete.",
183
+ "mediaStorageCleanup": "The task could not confirm ownership or deletion of an uploaded reference object."
160
184
  },
161
185
  "action": {
162
186
  "runtimeUnavailable": "Return to Desktop, confirm Local AI is connected, then try again.",
@@ -169,13 +193,16 @@
169
193
  "runtimeTimeout": "Try again later. If it still times out, open Runtime details to find the cause.",
170
194
  "streamInterrupted": "Check the task status; retry only after confirming it did not complete.",
171
195
  "runtimeCallFailed": "Try again once. If it still fails, open Runtime details to find the cause.",
196
+ "contentFilterBlocked": "Try removing or redacting any restricted content, or adjusting the selected context, then submit your request again.",
172
197
  "inputLimitExceeded": "Shorten the input, or configure a model that accepts longer input, then run it again.",
173
- "textBehaviorUnsupported": "Open Parameters and reset the settings this model does not accept, or choose a model that supports this behavior in Desktop AI Capabilities, then run again.",
198
+ "textBehaviorUnsupported": "Open Parameters and reset the settings this model does not accept, or choose a model that supports this behavior in this App's AI configuration, then run again.",
174
199
  "mediaOptionUnsupported": "Open Parameters and reset the unsupported settings, then run again. You can also choose a model that supports those settings in App AI configuration.",
200
+ "embeddingPurposeUnsupported": "Open Parameters and choose \"Content to search\" when indexing documents or \"Search query\" when searching them, then run again. If that purpose is still unsupported, choose a model that supports it in App AI configuration.",
175
201
  "modalityUnsupported": "Change the request inputs or reset the unsupported options in Parameters before running again. You can also choose a configuration that supports the request.",
176
- "providerRateLimited": "Wait and try again later. For a ChatGPT plan connection, review usage at {{usageUrl}}. You can also open App AI configuration and choose another model.",
202
+ "providerRateLimited": "Check this provider's rate limits, account balance, plan, and any per-app usage allocation. Retry after the relevant limit is resolved.",
177
203
  "mediaCodecUnavailable": "In Nimi Desktop, open AI Capabilities → Advanced & Diagnostics → Audio and video tools. Install or repair it if needed, wait until the components are installed, then run this request again.",
178
- "localLoadFailed": "Check that the inputs and parameters match the selected model. In Desktop AI Capabilities, confirm that its model and components are prepared, or repair the setup before running again. Runtime details show the reported failure.",
204
+ "localLoadFailed": "Check that the inputs and parameters match the selected model. To inspect shared models and components, open AI Capabilities in Nimi Home on the host PC, then run again once the setup is ready. Runtime details show the reported failure.",
205
+ "localConfigurationMissing": "In Nimi Home, open AI Capabilities and finish setting up the local model for this capability. Once it is available, return here and submit your current input again. Runtime details retain the reported failure.",
179
206
  "voiceInputRequired": "Open Parameters and choose a supported preset or compatible local voice asset. If this model needs an asset and none is listed, create one under Voice Creation, then return here.",
180
207
  "voiceTargetMismatch": "Choose a voice asset compatible with the current speech model, or create one under Voice Creation before retrying.",
181
208
  "voiceUnavailable": "Open Parameters and choose an active voice compatible with this speech model. Repeating the deleted or expired voice request cannot restore it.",
@@ -187,7 +214,13 @@
187
214
  "configInvalid": "Open App AI configuration, choose a model for this capability again, then run it again.",
188
215
  "modelNotFound": "Open App AI configuration, choose an available model for this capability, then run it again.",
189
216
  "fallback": "Try again. If it still fails, open Runtime details to find the cause.",
190
- "stoppedDirectCall": "Run it again whenever you are ready."
217
+ "stoppedDirectCall": "Run it again whenever you are ready.",
218
+ "providerAuthFailed": "Update this connection's API key or sign in again in Nimi Cloud Services, then submit a new request.",
219
+ "mediaStorageMissing": "In Nimi Cloud Services, open this connection and configure Reference media storage. Then submit a new request.",
220
+ "mediaStorageCredentials": "Update the OSS credentials in this connection’s Reference media storage settings and verify its bucket permissions.",
221
+ "mediaStorageVersioning": "Configure an unversioned OSS bucket for this connection’s reference media.",
222
+ "mediaStorageUnavailable": "Check the OSS region, bucket and permissions in Nimi Cloud Services before submitting again.",
223
+ "mediaStorageCleanup": "Inspect this task’s cleanup result in Nimi diagnostics and the configured OSS bucket. Re-running generation does not prove cleanup."
191
224
  },
192
225
  "hint": {
193
226
  "runtimeUnavailable": "Restore the protected Runtime connection, then retry the same request.",
@@ -215,15 +248,22 @@
215
248
  "expandGeneratedImage": "Expand generated image",
216
249
  "imagePreview": "Image preview",
217
250
  "imagePreviewFailed": "The image preview could not be opened. Please try again.",
251
+ "mediaPreviewFailed": "The saved media could not be loaded. Retry loading the existing result.",
218
252
  "closeImagePreview": "Close image preview",
219
253
  "emptyBody": "(empty body)",
220
254
  "emptyTranscript": "(empty transcript)",
221
255
  "contextLabel": "Context",
222
- "requestSettings": "Request settings",
256
+ "requestSettings": "Run configuration and parameters",
257
+ "modelNotRecorded": "Model target not recorded",
258
+ "parametersNotRecorded": "This record does not contain request parameters.",
259
+ "configuredDefaults": "App defaults at submission",
260
+ "recordedConfigScope": "These are submission settings. The actual execution model and server-resolved defaults are not recorded here.",
223
261
  "showRequestSettings": "Show request settings",
224
262
  "hideRequestSettings": "Hide request settings",
225
263
  "legacyRecordHint": "This older persisted run record contains only status metadata. Run it again to persist the typed result snapshot.",
226
264
  "historyInputTruncated": "History keeps only the beginning of this long input, so this record cannot be reused as a draft or run again.",
265
+ "recordedInput": "Input for this run",
266
+ "editNextRun": "Edit the next run",
227
267
  "historyAdditionalDocumentsNotRetained": "Only the first document can be reused as a draft. Add the other documents again before running.",
228
268
  "generationFailed": "Generation could not be completed",
229
269
  "generationCanceled": "Generation canceled",
@@ -236,10 +276,10 @@
236
276
  "downloadGeneration": "Download generation",
237
277
  "revealAsset": "Show in folder",
238
278
  "revealGeneration": "Show generated file in folder",
239
- "regenerate": "Regenerate",
240
- "newRun": "New run",
241
- "useAsDraft": "Use as draft",
242
- "intentLabel": "Intent",
279
+ "regenerate": "Run again with current configuration",
280
+ "newRun": "Back to draft",
281
+ "useAsDraft": "Reuse input",
282
+ "intentLabel": "Configuration for this run",
243
283
  "embeddingSuccess": "Embedding generated successfully.",
244
284
  "voiceAssetSuccess": "This run created a voice.",
245
285
  "voiceExpiry": "Provider expiry: {{date}}. Active use may extend this time.",
@@ -254,7 +294,7 @@
254
294
  "promptLabel": "Prompt",
255
295
  "requestLabel": "Request",
256
296
  "generationLabel": "Generation",
257
- "runStatusReady": "runtime ready",
297
+ "runStatusReady": "Completed",
258
298
  "runStatusUnavailable": "sdk unavailable",
259
299
  "runStatusFailed": "failed",
260
300
  "runStatusCanceled": "canceled",
@@ -281,14 +321,21 @@
281
321
  "runtimeOwnedIntent": "Runtime-owned capability intent",
282
322
  "openIntentConfig": "Open AI intent configuration",
283
323
  "configureIntent": "Configure capability intent",
324
+ "inputRequired": "Add the input required for this experiment.",
284
325
  "context": "Context",
285
326
  "contextAttached": "Context attached",
286
- "attachContext": "Attach context",
327
+ "attachContext": "Attach file",
328
+ "inputTitle": "Experiment input",
329
+ "sourceUrl": "Source URL",
330
+ "runShortcut": "Ctrl / ⌘ + Enter",
287
331
  "removeAttachment": "Remove {{name}}",
288
332
  "requestAriaLabel": "{{capability}} request",
289
333
  "startAriaLabel": "{{capability}} start",
290
334
  "contextPlaceholder": "Optional context, audience, source notes, or constraints",
291
- "intentSummary": "Intent: {{intent}}"
335
+ "intentSummary": "Next run · {{intent}}",
336
+ "routeLocal": "Local",
337
+ "routeCloud": "Cloud",
338
+ "routeUnknown": "Route unknown"
292
339
  },
293
340
  "parameters": {
294
341
  "title": "Parameters",
@@ -307,7 +354,12 @@
307
354
  }
308
355
  },
309
356
  "run": {
310
- "aiConfigLoadFailed": "App AIConfig load failed."
357
+ "aiConfigLoadFailed": "Could not read the App's AI configuration.",
358
+ "runtimeConnected": "Runtime connected",
359
+ "runtimeChecking": "Checking Runtime",
360
+ "runtimeUnavailable": "Runtime unavailable",
361
+ "effectiveTargetUnavailable": "The configured target is unavailable. Check the selected model or Loadout.",
362
+ "retryPreparation": "Check again"
311
363
  },
312
364
  "drawerError": {
313
365
  "title": "Model Config unavailable",
@@ -318,6 +370,7 @@
318
370
  "admissionLabel": "Admission",
319
371
  "reasonLabel": "Reason",
320
372
  "traceLabel": "Trace",
373
+ "jobLabel": "Runtime job",
321
374
  "verboseConsoleNote": "Verbose console: capability {{capability}}; {{state}}.",
322
375
  "verboseTypedSuccess": "typed success",
323
376
  "verboseFailClosed": "fail-closed {{reason}}",
@@ -354,6 +407,7 @@
354
407
  "statState": "State",
355
408
  "stateUnknown": "unknown",
356
409
  "statVoices": "Voices",
410
+ "metricCharacters": "{{count}} characters",
357
411
  "metricWords_one": "{{count}} word",
358
412
  "metricWords_other": "{{count}} words",
359
413
  "metricArtifacts_one": "{{count}} artifact",
@@ -428,7 +482,8 @@
428
482
  "toolResult": "Tool result {{name}} · {{id}}",
429
483
  "toolError": "Tool error {{name}} · {{id}}",
430
484
  "structured": "Parsed structured result",
431
- "finalText": "Final text"
485
+ "finalText": "Final text",
486
+ "jsonObjectScenario": "JSON object test: the App parsed the final text and verified it is an object."
432
487
  },
433
488
  "decision": {
434
489
  "title": "Decisions",
@@ -454,7 +509,12 @@
454
509
  "nothingObserved": "No results were observed.",
455
510
  "notRestorable": "A closed Session cannot be restored. Open a new Session to run it again.",
456
511
  "stateClosed": "Closed",
457
- "stateTerminated": "Terminated"
512
+ "stateTerminated": "Terminated",
513
+ "audioUsageFinal": "Final reported cumulative audio: {{seconds}} s. This is not a token count or price estimate.",
514
+ "audioUsagePartial": "Audio reported so far: {{seconds}} s. The provider has not marked this total as final.",
515
+ "localClosureUnconfirmed": "The session ended; local resource release is unconfirmed.",
516
+ "providerClosureConfirmed": "Local resources released and provider session closure confirmed.",
517
+ "localClosureConfirmed": "Local connection and resources released. The provider has not confirmed that its session closed."
458
518
  },
459
519
  "faceSwap": {
460
520
  "inputs": "Face replacement inputs",