@open-document/core 0.14.3 → 0.15.1

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 (36) hide show
  1. package/dist/{build-4K9V8ysT.js → build-CBMroMqd.js} +1 -1
  2. package/dist/{check-B40JlWME.js → check-C2kIZr3f.js} +3 -3
  3. package/dist/cli/bin.js +9 -9
  4. package/dist/{context-Clm_nmr1.js → context-DGp1jwN5.js} +1 -1
  5. package/dist/{dev-De3pLYn_.js → dev-DmzGncKf.js} +1 -1
  6. package/dist/{diff-nU9ybiMk.js → diff-CMI_PVzz.js} +2 -2
  7. package/dist/{export-B9rrNBx2.js → export-BQMUBoBB.js} +3 -3
  8. package/dist/{import-C3542Wry.js → import-CiSRqZyo.js} +3 -3
  9. package/dist/ops/index.js +2 -2
  10. package/dist/{ops-ByJnGyuE.js → ops-DQbZmYRF.js} +1 -1
  11. package/dist/{preview-id9mj3IU.js → preview-CERhZ_FX.js} +1 -1
  12. package/dist/{session-CdkoJhi1.js → session-DdaKKd7_.js} +1007 -4
  13. package/dist/{templates-UJ_v7H-a.js → templates-CBeC-v7e.js} +3 -3
  14. package/dist/vite/index.js +1 -1
  15. package/package.json +1 -1
  16. package/skills/doc-authoring/SKILL.md +14 -62
  17. package/skills/doc-authoring/references/diagrams.md +32 -0
  18. package/skills/doc-authoring/references/runtime.md +15 -0
  19. package/src/agent/consent.ts +42 -0
  20. package/src/agent/provider.ts +24 -1
  21. package/src/agent/providers/antigravity-local.ts +193 -0
  22. package/src/agent/providers/antigravity.ts +656 -0
  23. package/src/agent/providers/index.ts +2 -1
  24. package/src/agent/runner.ts +4 -0
  25. package/src/agent/sandbox-sync.ts +178 -0
  26. package/src/agent/status.ts +33 -1
  27. package/src/agent/types.ts +21 -3
  28. package/src/app/components/agent/agent-panel.tsx +180 -42
  29. package/src/app/components/agent/connect-view.tsx +294 -26
  30. package/src/app/components/agent/provider-logo.tsx +4 -0
  31. package/src/app/lib/agent/use-agent.ts +14 -1
  32. package/src/app/lib/i18n-ja/agent-panel.ts +49 -0
  33. package/src/app/lib/i18n-ko/agent-panel.ts +48 -0
  34. package/src/app/lib/i18n-zh-cn/agent-panel.ts +46 -0
  35. package/src/app/lib/i18n-zh-tw/agent-panel.ts +46 -0
  36. package/src/app/lib/use-locale.ts +43 -0
@@ -1,9 +1,10 @@
1
- import { Check, Loader2, RotateCw, Terminal } from 'lucide-react';
1
+ import { Check, Cloud, KeyRound, Laptop, Loader2, RotateCw, Terminal } from 'lucide-react';
2
2
  import { useState } from 'react';
3
3
  import { Button } from '@/components/ui/button';
4
4
  import {
5
5
  installProvider,
6
6
  refreshStatus,
7
+ setProviderConsent,
7
8
  useAgentState,
8
9
  useAgentStatus,
9
10
  } from '@/lib/agent/use-agent';
@@ -13,22 +14,27 @@ import { cn } from '@/lib/utils';
13
14
  import type { AgentProviderId, AgentProviderStatus } from '../../../agent/types';
14
15
  import { ProviderLogo } from './provider-logo';
15
16
 
16
- const CLI_INSTALL: Record<AgentProviderId, string> = {
17
+ const CLI_INSTALL: Partial<Record<AgentProviderId, string>> = {
17
18
  codex: 'npm install -g @openai/codex',
18
19
  };
19
20
 
20
21
  function needsCli(p: AgentProviderStatus): boolean {
21
- return !p.cliFound && !p.ready;
22
+ return p.auth === 'sdk' && !p.cliFound && !p.ready;
22
23
  }
23
24
 
24
- export function ConnectView() {
25
+ // Nothing the panel can do for it yet: a CLI to install or a key to add.
26
+ function needsSetup(p: AgentProviderStatus): boolean {
27
+ return needsCli(p) || (p.auth === 'api-key' && !p.keyFound);
28
+ }
29
+
30
+ export function ConnectView({ onConnected }: { onConnected?: () => void } = {}) {
25
31
  const t = useLocale();
26
32
  const { status, loading, enabled } = useAgentStatus();
27
33
  const { installing, connectErrors } = useAgentState();
28
34
  const [checking, setChecking] = useState(false);
29
35
  const providers = status?.providers ?? [];
30
- const needCli = providers.length > 0 && providers.every(needsCli);
31
- const anyMissing = providers.some(needsCli);
36
+ const needCli = providers.some(needsCli) && providers.every(needsSetup);
37
+ const anyMissing = providers.some(needsSetup);
32
38
 
33
39
  const checkAgain = async () => {
34
40
  setChecking(true);
@@ -57,26 +63,30 @@ export function ConnectView() {
57
63
  <p className="text-[12px] text-muted-foreground">{t.agent.disabled}</p>
58
64
  ) : (
59
65
  <div className="flex flex-col gap-2.5">
60
- {providers.map((provider) => (
61
- <ProviderCard
62
- key={provider.id}
63
- provider={provider}
64
- packageManager={status?.packageManager ?? 'npm'}
65
- installing={installing === provider.id}
66
- busy={installing !== null}
67
- error={connectErrors[provider.id]}
68
- onConnect={async () => {
69
- try {
70
- await installProvider(provider.id);
71
- toast.success(format(t.agent.toastConnected, { name: provider.name }));
72
- } catch (err) {
73
- toast.error(format(t.agent.toastConnectFailed, { pkg: provider.sdkPackage }), {
74
- description: err instanceof Error ? err.message : undefined,
75
- });
76
- }
77
- }}
78
- />
79
- ))}
66
+ {providers.map((provider) =>
67
+ provider.auth === 'api-key' ? (
68
+ <ApiKeyCard key={provider.id} provider={provider} onConnected={onConnected} />
69
+ ) : (
70
+ <ProviderCard
71
+ key={provider.id}
72
+ provider={provider}
73
+ packageManager={status?.packageManager ?? 'npm'}
74
+ installing={installing === provider.id}
75
+ busy={installing !== null}
76
+ error={connectErrors[provider.id]}
77
+ onConnect={async () => {
78
+ try {
79
+ await installProvider(provider.id);
80
+ toast.success(format(t.agent.toastConnected, { name: provider.name }));
81
+ } catch (err) {
82
+ toast.error(format(t.agent.toastConnectFailed, { pkg: provider.sdkPackage }), {
83
+ description: err instanceof Error ? err.message : undefined,
84
+ });
85
+ }
86
+ }}
87
+ />
88
+ ),
89
+ )}
80
90
  {anyMissing && (
81
91
  <Button
82
92
  size="sm"
@@ -181,3 +191,261 @@ function ProviderCard({
181
191
  </div>
182
192
  );
183
193
  }
194
+
195
+ export function PreviewBadge({ className }: { className?: string }) {
196
+ const t = useLocale();
197
+ return (
198
+ <span
199
+ title={t.agent.previewHint}
200
+ className={cn(
201
+ 'inline-flex shrink-0 items-center rounded-[4px] bg-amber-500/12 px-1.5 py-px text-[10px] font-semibold tracking-wide text-amber-700 uppercase dark:text-amber-400',
202
+ className,
203
+ )}
204
+ >
205
+ {t.agent.preview}
206
+ </span>
207
+ );
208
+ }
209
+
210
+ const TERM_KEYS = [
211
+ 'preview',
212
+ 'local',
213
+ 'upload',
214
+ 'billing',
215
+ 'writeBack',
216
+ 'auth',
217
+ 'withdraw',
218
+ ] as const;
219
+
220
+ /**
221
+ * The terms an agent needs accepted, and the setup accepting them starts. It
222
+ * settles only once local mode is ready, so the first turn after it never runs
223
+ * in the cloud by accident. The checkbox and button stay pinned at the bottom
224
+ * of the nearest scroll container while the terms scroll under them.
225
+ */
226
+ export function ProviderConsent({
227
+ provider,
228
+ onDone,
229
+ onCancel,
230
+ }: {
231
+ provider: AgentProviderStatus;
232
+ onDone?: () => void;
233
+ onCancel: () => void;
234
+ }) {
235
+ const t = useLocale();
236
+ const [agreed, setAgreed] = useState(false);
237
+ const [phase, setPhase] = useState<'idle' | 'saving' | 'preparing'>('idle');
238
+ const consent = provider.consent;
239
+ if (!consent) return null;
240
+ const runtime = provider.runtime;
241
+ const busy = phase !== 'idle';
242
+
243
+ const accept = async () => {
244
+ setPhase('saving');
245
+ try {
246
+ await setProviderConsent(provider.id, consent.version, true);
247
+ } catch (err) {
248
+ setPhase('idle');
249
+ toast.error(t.agent.toastTermsFailed, {
250
+ description: err instanceof Error ? err.message : undefined,
251
+ });
252
+ return;
253
+ }
254
+ if (runtime?.mode === 'cloud' && runtime.localSupported) {
255
+ setPhase('preparing');
256
+ try {
257
+ await installProvider(provider.id);
258
+ } catch (err) {
259
+ toast.error(t.agent.toastLocalFailed, {
260
+ description: err instanceof Error ? err.message : undefined,
261
+ });
262
+ }
263
+ }
264
+ toast.success(format(t.agent.toastConnected, { name: provider.name }));
265
+ onDone?.();
266
+ };
267
+
268
+ return (
269
+ <div className="flex flex-col gap-2.5" data-agent-terms>
270
+ <div>
271
+ <h4 className="font-heading text-[12.5px] font-semibold tracking-tight">
272
+ {format(t.agent.termsTitle, { name: provider.name })}
273
+ </h4>
274
+ <p className="mt-1 text-[11px] leading-relaxed text-muted-foreground">
275
+ {format(t.agent.termsIntro, { name: provider.name })}
276
+ </p>
277
+ </div>
278
+ <ol className="flex list-decimal flex-col gap-1.5 pl-4 text-[11.5px] leading-relaxed">
279
+ {TERM_KEYS.map((key) => (
280
+ <li key={key}>{t.agent.terms[key]}</li>
281
+ ))}
282
+ </ol>
283
+ <div className="sticky bottom-0 -mx-3 -mb-3 flex flex-col gap-2 rounded-b-[8px] border-t border-border bg-card px-3 py-2.5">
284
+ <label className="flex cursor-pointer items-start gap-2 text-[11.5px] font-medium">
285
+ <input
286
+ type="checkbox"
287
+ className="mt-0.5"
288
+ checked={agreed}
289
+ disabled={busy}
290
+ onChange={(e) => setAgreed(e.target.checked)}
291
+ />
292
+ {t.agent.termsAgree}
293
+ </label>
294
+ <div className="flex items-center gap-2">
295
+ <Button size="sm" disabled={!agreed || busy} onClick={accept}>
296
+ {busy && (
297
+ <Loader2 className="size-3 animate-spin motion-reduce:animate-none" aria-hidden />
298
+ )}
299
+ {phase === 'preparing' ? `${t.agent.runtimeEnabling}…` : t.agent.termsAccept}
300
+ </Button>
301
+ {!busy && (
302
+ <Button size="sm" variant="outline" onClick={onCancel}>
303
+ {t.agent.cancelEdit}
304
+ </Button>
305
+ )}
306
+ </div>
307
+ </div>
308
+ </div>
309
+ );
310
+ }
311
+
312
+ function ApiKeyCard({
313
+ provider,
314
+ onConnected,
315
+ }: {
316
+ provider: AgentProviderStatus;
317
+ onConnected?: () => void;
318
+ }) {
319
+ const t = useLocale();
320
+ const [reading, setReading] = useState(false);
321
+ const [withdrawing, setWithdrawing] = useState(false);
322
+ const { installing } = useAgentState();
323
+ const consent = provider.consent;
324
+ const accepted = consent?.accepted ?? true;
325
+ const runtime = provider.runtime;
326
+ const settingUp = installing === provider.id;
327
+ const canGoLocal = runtime?.mode === 'cloud' && runtime.localSupported;
328
+
329
+ const goLocal = async () => {
330
+ try {
331
+ await installProvider(provider.id);
332
+ } catch (err) {
333
+ toast.error(t.agent.toastLocalFailed, {
334
+ description: err instanceof Error ? err.message : undefined,
335
+ });
336
+ }
337
+ };
338
+
339
+ const withdraw = async () => {
340
+ if (!consent) return;
341
+ setWithdrawing(true);
342
+ try {
343
+ await setProviderConsent(provider.id, consent.version, false);
344
+ } catch (err) {
345
+ toast.error(t.agent.toastTermsFailed, {
346
+ description: err instanceof Error ? err.message : undefined,
347
+ });
348
+ } finally {
349
+ setWithdrawing(false);
350
+ }
351
+ };
352
+
353
+ return (
354
+ <div
355
+ data-agent-provider-card={provider.id}
356
+ className="rounded-[8px] border border-border bg-card p-3 shadow-edge"
357
+ >
358
+ <div className="flex items-center justify-between gap-2">
359
+ <div className="min-w-0">
360
+ <h3 className="flex items-center gap-1.5 font-heading text-[13px] font-semibold tracking-tight">
361
+ <ProviderLogo provider={provider.id} className="size-3.5 shrink-0" />
362
+ {provider.name}
363
+ {provider.preview && <PreviewBadge />}
364
+ </h3>
365
+ <p
366
+ className={cn(
367
+ 'mt-0.5 flex items-center gap-1 text-[11px]',
368
+ provider.keyFound ? 'text-muted-foreground' : 'text-amber-600 dark:text-amber-400',
369
+ )}
370
+ >
371
+ <KeyRound className="size-3" aria-hidden />
372
+ {provider.keyFound ? t.agent.keyFound : t.agent.keyMissing}
373
+ </p>
374
+ </div>
375
+ {provider.ready && !settingUp ? (
376
+ <span className="inline-flex items-center gap-1 rounded-[5px] bg-emerald-500/10 px-2 py-1 text-[11px] font-medium text-emerald-700 dark:text-emerald-400">
377
+ <Check className="size-3" aria-hidden />
378
+ {t.agent.connected}
379
+ </span>
380
+ ) : !accepted && !reading && provider.keyFound ? (
381
+ <Button size="sm" onClick={() => setReading(true)}>
382
+ {t.agent.termsReview}
383
+ </Button>
384
+ ) : null}
385
+ </div>
386
+
387
+ {!provider.keyFound && (
388
+ <p className="mt-2 text-[11px] leading-relaxed text-muted-foreground">{t.agent.keyHint}</p>
389
+ )}
390
+
391
+ {reading && (
392
+ <div className="mt-3 border-t border-border pt-3">
393
+ <ProviderConsent
394
+ provider={provider}
395
+ onCancel={() => setReading(false)}
396
+ onDone={() => {
397
+ setReading(false);
398
+ onConnected?.();
399
+ }}
400
+ />
401
+ </div>
402
+ )}
403
+
404
+ {runtime && accepted && !reading && (
405
+ <div className="mt-2 flex flex-col gap-1.5" data-agent-runtime={runtime.mode}>
406
+ {settingUp ? (
407
+ <span className="inline-flex items-center gap-1.5 text-[11px] text-muted-foreground">
408
+ <Loader2 className="size-3 animate-spin motion-reduce:animate-none" aria-hidden />
409
+ {t.agent.runtimeEnabling}…
410
+ </span>
411
+ ) : (
412
+ <p className="flex items-center gap-1 text-[11px] text-muted-foreground">
413
+ {runtime.mode === 'local' ? (
414
+ <Laptop className="size-3" aria-hidden />
415
+ ) : (
416
+ <Cloud className="size-3" aria-hidden />
417
+ )}
418
+ {runtime.mode === 'local' ? t.agent.runtimeLocal : t.agent.runtimeCloud}
419
+ </p>
420
+ )}
421
+ {!settingUp && canGoLocal ? (
422
+ <div className="flex flex-col items-start gap-1">
423
+ <Button size="xs" variant="outline" onClick={goLocal}>
424
+ {t.agent.runtimeEnable}
425
+ </Button>
426
+ <p className="text-[10.5px] leading-relaxed text-muted-foreground">
427
+ {t.agent.runtimeHint}
428
+ </p>
429
+ </div>
430
+ ) : runtime.mode === 'cloud' && !runtime.localSupported ? (
431
+ <p className="text-[10.5px] text-muted-foreground">{t.agent.runtimeUnsupported}</p>
432
+ ) : null}
433
+ </div>
434
+ )}
435
+
436
+ {consent?.accepted && (
437
+ <div className="mt-2 flex items-center justify-between gap-2 text-[11px] text-muted-foreground">
438
+ <span>{format(t.agent.termsAccepted, { version: consent.version })}</span>
439
+ <button
440
+ type="button"
441
+ className="underline-offset-2 hover:text-foreground hover:underline disabled:opacity-50"
442
+ disabled={withdrawing || settingUp}
443
+ onClick={withdraw}
444
+ >
445
+ {t.agent.termsWithdraw}
446
+ </button>
447
+ </div>
448
+ )}
449
+ </div>
450
+ );
451
+ }
@@ -1,3 +1,4 @@
1
+ import { Orbit } from 'lucide-react';
1
2
  import type { SVGProps } from 'react';
2
3
  import type { AgentProviderId } from '../../../agent/types';
3
4
 
@@ -19,5 +20,8 @@ export function ProviderLogo({
19
20
  provider,
20
21
  ...props
21
22
  }: { provider: AgentProviderId } & SVGProps<SVGSVGElement>) {
23
+ if (provider === 'antigravity') {
24
+ return <Orbit data-provider={provider} aria-hidden="true" {...props} />;
25
+ }
22
26
  return <OpenAILogo data-provider={provider} {...props} />;
23
27
  }
@@ -365,6 +365,19 @@ export async function installProvider(provider: AgentProviderId): Promise<void>
365
365
  }
366
366
  }
367
367
 
368
+ export async function setProviderConsent(
369
+ provider: AgentProviderId,
370
+ version: string,
371
+ accept: boolean,
372
+ ): Promise<void> {
373
+ await request('/__agent/consent', post({ provider, version, accept }));
374
+ if (accept) {
375
+ writeStorage(PROVIDER_KEY, provider);
376
+ setState({ provider });
377
+ }
378
+ await refreshStatus();
379
+ }
380
+
368
381
  let autoConnecting: Promise<void> | null = null;
369
382
 
370
383
  export function autoConnect(): Promise<void> {
@@ -372,7 +385,7 @@ export function autoConnect(): Promise<void> {
372
385
  const status = state.status;
373
386
  if (!status?.enabled) return Promise.resolve();
374
387
  const pending = status.providers.filter(
375
- (p) => p.cliFound && !p.ready && !state.connectErrors[p.id],
388
+ (p) => p.auth === 'sdk' && p.cliFound && !p.ready && !state.connectErrors[p.id],
376
389
  );
377
390
  if (pending.length === 0) return Promise.resolve();
378
391
  autoConnecting = (async () => {
@@ -112,4 +112,53 @@ export const AGENT_PANEL: Record<string, string> = {
112
112
  'The check found {count} problems': 'チェックで {count} 件の問題が見つかりました',
113
113
  '+{count} more': 'ほか {count} 件',
114
114
  'Ask the agent to fix': 'エージェントに修正を依頼',
115
+ 'Preview version': 'プレビュー版',
116
+ 'Its behavior, models and prices may change.': '動作、モデル、料金は変更される場合があります。',
117
+ 'GEMINI_API_KEY found': 'GEMINI_API_KEY が見つかりました',
118
+ 'GEMINI_API_KEY not set': 'GEMINI_API_KEY が未設定です',
119
+ 'Add GEMINI_API_KEY to .env in this workspace, or to the environment the dev server runs in, then check again. The key stays on this machine.':
120
+ 'このワークスペースの .env、または dev server を実行する環境変数に GEMINI_API_KEY を追加してから、もう一度確認してください。キーはこのマシンの外に出ません。',
121
+ 'Set GEMINI_API_KEY and accept the preview terms to use {name}.':
122
+ '{name} を使うには、GEMINI_API_KEY を設定してプレビュー版の利用条件に同意してください。',
123
+ 'Review terms': '利用条件を読む',
124
+ 'Before you use {name}': '{name} を使う前に',
125
+ 'Read these terms. The panel runs {name} only after you accept them.':
126
+ '以下の利用条件をお読みください。同意するまで、パネルは {name} を実行しません。',
127
+ 'I have read and agree to these terms': '利用条件を読み、同意します',
128
+ Accept: '同意する',
129
+ 'Terms accepted · {version}': '利用条件に同意済み · {version}',
130
+ 'Withdraw consent': '同意を取り消す',
131
+ 'Could not save your answer': '回答を保存できませんでした',
132
+ 'Antigravity here is a Google preview (antigravity-preview-09-2026). Its behavior, models, prices and availability may change or stop without notice, and this integration is itself an early prototype.':
133
+ 'ここでの Antigravity は Google のプレビュー版(antigravity-preview-09-2026)です。動作、モデル、料金、提供状況は予告なく変更・終了される場合があり、この連携自体も初期のプロトタイプです。',
134
+ 'Usage is billed to the key in GEMINI_API_KEY at Gemini API rates. One turn is capped at 500,000 tokens. The cost shown after a turn is an estimate; your Google bill is what counts.':
135
+ '利用料金は Gemini API の料金で、GEMINI_API_KEY のキーに請求されます。1 ターンの上限は 500,000 トークンです。ターン後に表示される金額は見積もりで、実際の金額は Google の請求に従います。',
136
+ 'open-doc uses only your API key. It never uses your Antigravity or Google account sign-in, and the key is never sent to the browser.':
137
+ 'open-doc が使うのは API キーだけです。Antigravity や Google アカウントのログインは使わず、キーがブラウザに送られることもありません。',
138
+ 'You can withdraw your consent at any time from Manage agents.':
139
+ '同意は「エージェントを管理」からいつでも取り消せます。',
140
+ "With local mode on, open-doc downloads Google's gemini-api CLI (v0.4.6, checksum-verified) into node_modules/.open-doc and runs it while the dev server runs. The agent's file tools then work directly on this project folder on your computer, with shell commands disabled.":
141
+ 'ローカルモードをオンにすると、open-doc は Google の gemini-api CLI(v0.4.6、checksum 検証済み)を node_modules/.open-doc にダウンロードし、dev server の実行中に起動します。エージェントのファイルツールは、このコンピューター上のプロジェクトフォルダで直接動作し、シェルコマンドは無効になります。',
142
+ "Without local mode, every turn uploads the open document's folder and the workspace's .agents/skills to a Google cloud sandbox. In both modes your messages and the files the agent reads are sent to Google through the Gemini API, so do not use it on documents you may not share with Google. The Gemini API terms apply, and on the free tier Google may use the data to improve its products.":
143
+ 'ローカルモードでない場合、ターンごとに開いているドキュメントのフォルダとワークスペースの .agents/skills を Google のクラウド sandbox にアップロードします。どちらのモードでも、メッセージとエージェントが読むファイルは Gemini API 経由で Google に送られるため、Google と共有できないドキュメントには使わないでください。Gemini API の利用規約が適用され、無料枠ではデータが Google のサービス改善に使われる場合があります。',
144
+ "In the cloud sandbox, the agent's edits are copied back into the document's folder when a turn ends; a file you changed during the turn is not overwritten, and deletions are not copied back. In local mode the agent edits your files directly. Either way, review the changes before you rely on them.":
145
+ 'クラウド sandbox では、ターン終了時にエージェントの編集がドキュメントのフォルダに書き戻されます。ターン中に変更したファイルは上書きされず、削除は反映されません。ローカルモードではエージェントがファイルを直接編集します。どちらの場合も、変更は確認してから使ってください。',
146
+ 'Runs on this computer · edits appear live':
147
+ 'このコンピューターで実行 · 編集がすぐに表示されます',
148
+ 'Runs in a Google cloud sandbox · edits arrive when a turn ends':
149
+ 'Google のクラウド sandbox で実行 · 編集はターン終了時に反映されます',
150
+ 'Run on this computer': 'このコンピューターで実行する',
151
+ 'Setting up local mode': 'ローカルモードを設定中',
152
+ "Recommended. Downloads Google's gemini-api CLI into this project; no Docker or terminal needed.":
153
+ 'おすすめ。Google の gemini-api CLI をこのプロジェクトにダウンロードします。Docker やターミナルは不要です。',
154
+ 'Local mode is not available on this system yet.':
155
+ 'このシステムではまだローカルモードを使えません。',
156
+ 'Could not set up local mode': 'ローカルモードを設定できませんでした',
157
+ 'Try {name}': '{name} を試す',
158
+ 'Gemini edits this document right on your computer, and you watch each change land on the page.':
159
+ 'Gemini がこのコンピューター上でドキュメントを直接編集し、変更はすぐにページに反映されます。',
160
+ Enable: '有効にする',
161
+ 'Not now': 'あとで',
162
+ 'Accept the preview terms to use {name}.':
163
+ 'プレビュー版の利用条件に同意すると {name} を使えます。',
115
164
  };
@@ -111,4 +111,52 @@ export const AGENT_PANEL: Record<string, string> = {
111
111
  'The check found {count} problems': '검사에서 문제 {count}개를 찾았습니다',
112
112
  '+{count} more': '그 외 {count}개',
113
113
  'Ask the agent to fix': '에이전트에게 수정 요청',
114
+ 'Preview version': '프리뷰 버전',
115
+ 'Its behavior, models and prices may change.': '동작, 모델, 가격이 바뀔 수 있습니다.',
116
+ 'GEMINI_API_KEY found': 'GEMINI_API_KEY 찾음',
117
+ 'GEMINI_API_KEY not set': 'GEMINI_API_KEY 설정 안 됨',
118
+ 'Add GEMINI_API_KEY to .env in this workspace, or to the environment the dev server runs in, then check again. The key stays on this machine.':
119
+ '이 워크스페이스의 .env 또는 dev server를 실행하는 환경 변수에 GEMINI_API_KEY를 추가한 뒤 다시 확인하세요. 키는 이 컴퓨터 밖으로 나가지 않습니다.',
120
+ 'Set GEMINI_API_KEY and accept the preview terms to use {name}.':
121
+ '{name}을(를) 사용하려면 GEMINI_API_KEY를 설정하고 프리뷰 이용 약관에 동의하세요.',
122
+ 'Review terms': '약관 읽기',
123
+ 'Before you use {name}': '{name} 사용 전 확인',
124
+ 'Read these terms. The panel runs {name} only after you accept them.':
125
+ '아래 약관을 읽어 주세요. 동의하기 전에는 패널이 {name}을(를) 실행하지 않습니다.',
126
+ 'I have read and agree to these terms': '약관을 읽었으며 동의합니다',
127
+ Accept: '동의',
128
+ 'Terms accepted · {version}': '약관 동의함 · {version}',
129
+ 'Withdraw consent': '동의 철회',
130
+ 'Could not save your answer': '선택을 저장하지 못했습니다',
131
+ 'Antigravity here is a Google preview (antigravity-preview-09-2026). Its behavior, models, prices and availability may change or stop without notice, and this integration is itself an early prototype.':
132
+ '여기서 사용하는 Antigravity는 Google의 프리뷰 버전(antigravity-preview-09-2026)입니다. 동작, 모델, 가격, 제공 여부가 예고 없이 바뀌거나 중단될 수 있으며, 이 연동 자체도 초기 프로토타입입니다.',
133
+ 'Usage is billed to the key in GEMINI_API_KEY at Gemini API rates. One turn is capped at 500,000 tokens. The cost shown after a turn is an estimate; your Google bill is what counts.':
134
+ '사용 요금은 Gemini API 가격으로 GEMINI_API_KEY의 키에 청구됩니다. 한 턴의 상한은 500,000토큰입니다. 턴이 끝난 뒤 표시되는 비용은 추정치이며, 실제 금액은 Google 청구서를 따릅니다.',
135
+ 'open-doc uses only your API key. It never uses your Antigravity or Google account sign-in, and the key is never sent to the browser.':
136
+ 'open-doc은 API 키만 사용합니다. Antigravity나 Google 계정 로그인은 사용하지 않으며, 키는 브라우저로 전송되지 않습니다.',
137
+ 'You can withdraw your consent at any time from Manage agents.':
138
+ '동의는 「에이전트 관리」에서 언제든 철회할 수 있습니다.',
139
+ "With local mode on, open-doc downloads Google's gemini-api CLI (v0.4.6, checksum-verified) into node_modules/.open-doc and runs it while the dev server runs. The agent's file tools then work directly on this project folder on your computer, with shell commands disabled.":
140
+ '로컬 모드를 켜면 open-doc이 Google의 gemini-api CLI(v0.4.6, checksum 검증 완료)를 node_modules/.open-doc에 내려받아 dev server가 실행되는 동안 실행합니다. 그러면 에이전트의 파일 도구가 이 컴퓨터의 프로젝트 폴더에서 바로 작업하며, 셸 명령은 비활성화됩니다.',
141
+ "Without local mode, every turn uploads the open document's folder and the workspace's .agents/skills to a Google cloud sandbox. In both modes your messages and the files the agent reads are sent to Google through the Gemini API, so do not use it on documents you may not share with Google. The Gemini API terms apply, and on the free tier Google may use the data to improve its products.":
142
+ '로컬 모드가 아니면 턴마다 열려 있는 문서의 폴더와 워크스페이스의 .agents/skills를 Google 클라우드 sandbox에 업로드합니다. 두 모드 모두 메시지와 에이전트가 읽는 파일이 Gemini API를 통해 Google로 전송되므로, Google과 공유할 수 없는 문서에는 사용하지 마세요. Gemini API 약관이 적용되며, 무료 등급에서는 데이터가 Google 제품 개선에 사용될 수 있습니다.',
143
+ "In the cloud sandbox, the agent's edits are copied back into the document's folder when a turn ends; a file you changed during the turn is not overwritten, and deletions are not copied back. In local mode the agent edits your files directly. Either way, review the changes before you rely on them.":
144
+ '클라우드 sandbox에서는 턴이 끝날 때 에이전트의 수정 내용이 문서 폴더에 다시 기록됩니다. 턴 중에 바꾼 파일은 덮어쓰지 않으며, 삭제는 반영되지 않습니다. 로컬 모드에서는 에이전트가 파일을 직접 수정합니다. 어느 쪽이든 변경 사항은 확인한 뒤 사용하세요.',
145
+ 'Runs on this computer · edits appear live': '이 컴퓨터에서 실행 · 수정 내용이 바로 표시됨',
146
+ 'Runs in a Google cloud sandbox · edits arrive when a turn ends':
147
+ 'Google 클라우드 sandbox에서 실행 · 턴이 끝날 때 반영됨',
148
+ 'Run on this computer': '이 컴퓨터에서 실행',
149
+ 'Setting up local mode': '로컬 모드 설정 중',
150
+ "Recommended. Downloads Google's gemini-api CLI into this project; no Docker or terminal needed.":
151
+ '권장. Google의 gemini-api CLI를 이 프로젝트에 내려받습니다. Docker나 터미널이 필요 없습니다.',
152
+ 'Local mode is not available on this system yet.':
153
+ '이 시스템에서는 아직 로컬 모드를 사용할 수 없습니다.',
154
+ 'Could not set up local mode': '로컬 모드를 설정하지 못했습니다',
155
+ 'Try {name}': '{name} 사용해 보기',
156
+ 'Gemini edits this document right on your computer, and you watch each change land on the page.':
157
+ 'Gemini가 이 컴퓨터에서 문서를 바로 수정하고, 변경 사항이 페이지에 즉시 반영됩니다.',
158
+ Enable: '사용',
159
+ 'Not now': '나중에',
160
+ 'Accept the preview terms to use {name}.':
161
+ '프리뷰 약관에 동의하면 {name}을(를) 사용할 수 있습니다.',
114
162
  };
@@ -110,4 +110,50 @@ export const AGENT_PANEL: Record<string, string> = {
110
110
  'The check found {count} problems': '检查发现 {count} 个问题',
111
111
  '+{count} more': '还有 {count} 个',
112
112
  'Ask the agent to fix': '请 agent 修正',
113
+ 'Preview version': '预览版',
114
+ 'Its behavior, models and prices may change.': '行为、模型与价格都可能变动。',
115
+ 'GEMINI_API_KEY found': '已找到 GEMINI_API_KEY',
116
+ 'GEMINI_API_KEY not set': '尚未设置 GEMINI_API_KEY',
117
+ 'Add GEMINI_API_KEY to .env in this workspace, or to the environment the dev server runs in, then check again. The key stays on this machine.':
118
+ '请在这个工作区的 .env,或 dev server 运行的环境变量中加入 GEMINI_API_KEY,再重新检查。密钥只会留在这台电脑。',
119
+ 'Set GEMINI_API_KEY and accept the preview terms to use {name}.':
120
+ '设置 GEMINI_API_KEY 并同意预览版条款后,才能使用 {name}。',
121
+ 'Review terms': '阅读条款',
122
+ 'Before you use {name}': '使用 {name} 之前',
123
+ 'Read these terms. The panel runs {name} only after you accept them.':
124
+ '请阅读以下条款。同意之后,面板才会运行 {name}。',
125
+ 'I have read and agree to these terms': '我已阅读并同意以上条款',
126
+ Accept: '同意',
127
+ 'Terms accepted · {version}': '已同意条款 · {version}',
128
+ 'Withdraw consent': '撤回同意',
129
+ 'Could not save your answer': '无法保存你的选择',
130
+ 'Antigravity here is a Google preview (antigravity-preview-09-2026). Its behavior, models, prices and availability may change or stop without notice, and this integration is itself an early prototype.':
131
+ '这里的 Antigravity 是 Google 的预览版(antigravity-preview-09-2026)。它的行为、模型、价格与可用性可能随时变动或停止,而且这个集成本身也还是早期原型。',
132
+ 'Usage is billed to the key in GEMINI_API_KEY at Gemini API rates. One turn is capped at 500,000 tokens. The cost shown after a turn is an estimate; your Google bill is what counts.':
133
+ '费用会以 Gemini API 的价格,计入 GEMINI_API_KEY 对应的账户。每个 turn 上限 500,000 tokens。turn 结束后显示的费用是估算值,实际以 Google 账单为准。',
134
+ 'open-doc uses only your API key. It never uses your Antigravity or Google account sign-in, and the key is never sent to the browser.':
135
+ 'open-doc 只使用你的 API key,不会使用你的 Antigravity 或 Google 账号登录,密钥也不会发送到浏览器。',
136
+ 'You can withdraw your consent at any time from Manage agents.':
137
+ '你可以随时在“管理 agent”撤回同意。',
138
+ "With local mode on, open-doc downloads Google's gemini-api CLI (v0.4.6, checksum-verified) into node_modules/.open-doc and runs it while the dev server runs. The agent's file tools then work directly on this project folder on your computer, with shell commands disabled.":
139
+ '开启本机模式后,open-doc 会把 Google 的 gemini-api CLI(v0.4.6,已验证 checksum)下载到 node_modules/.open-doc,并在 dev server 运行期间启动它。之后 agent 的文件工具会直接在你电脑上的这个项目文件夹里工作,并且禁用 shell 命令。',
140
+ "Without local mode, every turn uploads the open document's folder and the workspace's .agents/skills to a Google cloud sandbox. In both modes your messages and the files the agent reads are sent to Google through the Gemini API, so do not use it on documents you may not share with Google. The Gemini API terms apply, and on the free tier Google may use the data to improve its products.":
141
+ '未开启本机模式时,每个 turn 都会把当前文档的文件夹与工作区的 .agents/skills 上传到 Google 的云端 sandbox。两种模式下,你的消息和 agent 读取的文件都会通过 Gemini API 发送给 Google,不能交给 Google 的文档请不要使用。使用时适用 Gemini API 的服务条款;免费层的数据可能会被 Google 用来改进产品。',
142
+ "In the cloud sandbox, the agent's edits are copied back into the document's folder when a turn ends; a file you changed during the turn is not overwritten, and deletions are not copied back. In local mode the agent edits your files directly. Either way, review the changes before you rely on them.":
143
+ '在云端 sandbox 中,agent 的修改会在 turn 结束时写回文档文件夹;turn 进行中你改过的文件不会被覆盖,删除文件也不会同步回来。本机模式下,agent 会直接修改你的文件。无论哪种模式,依赖这些修改之前请先检查。',
144
+ 'Runs on this computer · edits appear live': '在这台电脑运行 · 修改实时显示',
145
+ 'Runs in a Google cloud sandbox · edits arrive when a turn ends':
146
+ '在 Google 云端 sandbox 运行 · turn 结束时才同步修改',
147
+ 'Run on this computer': '改为在这台电脑运行',
148
+ 'Setting up local mode': '正在设置本机模式',
149
+ "Recommended. Downloads Google's gemini-api CLI into this project; no Docker or terminal needed.":
150
+ '推荐使用。会把 Google 的 gemini-api CLI 下载到这个项目,不需要 Docker 或终端。',
151
+ 'Local mode is not available on this system yet.': '这个系统目前还不支持本机模式。',
152
+ 'Could not set up local mode': '无法设置本机模式',
153
+ 'Try {name}': '试用 {name}',
154
+ 'Gemini edits this document right on your computer, and you watch each change land on the page.':
155
+ 'Gemini 会直接在你的电脑上编辑这份文档,每一处修改都会实时出现在页面上。',
156
+ Enable: '启用',
157
+ 'Not now': '稍后再说',
158
+ 'Accept the preview terms to use {name}.': '同意预览版条款后即可使用 {name}。',
113
159
  };
@@ -110,4 +110,50 @@ export const AGENT_PANEL: Record<string, string> = {
110
110
  'The check found {count} problems': '檢查發現 {count} 個問題',
111
111
  '+{count} more': '還有 {count} 個',
112
112
  'Ask the agent to fix': '請 agent 修正',
113
+ 'Preview version': '預覽版',
114
+ 'Its behavior, models and prices may change.': '行為、模型與價格都可能變動。',
115
+ 'GEMINI_API_KEY found': '已找到 GEMINI_API_KEY',
116
+ 'GEMINI_API_KEY not set': '尚未設定 GEMINI_API_KEY',
117
+ 'Add GEMINI_API_KEY to .env in this workspace, or to the environment the dev server runs in, then check again. The key stays on this machine.':
118
+ '請在這個工作區的 .env,或 dev server 執行的環境變數中加入 GEMINI_API_KEY,再重新檢查。金鑰只會留在這台電腦。',
119
+ 'Set GEMINI_API_KEY and accept the preview terms to use {name}.':
120
+ '設定 GEMINI_API_KEY 並同意預覽版條款後,才能使用 {name}。',
121
+ 'Review terms': '閱讀條款',
122
+ 'Before you use {name}': '使用 {name} 之前',
123
+ 'Read these terms. The panel runs {name} only after you accept them.':
124
+ '請閱讀以下條款。同意之後,面板才會執行 {name}。',
125
+ 'I have read and agree to these terms': '我已閱讀並同意以上條款',
126
+ Accept: '同意',
127
+ 'Terms accepted · {version}': '已同意條款 · {version}',
128
+ 'Withdraw consent': '撤回同意',
129
+ 'Could not save your answer': '無法儲存你的選擇',
130
+ 'Antigravity here is a Google preview (antigravity-preview-09-2026). Its behavior, models, prices and availability may change or stop without notice, and this integration is itself an early prototype.':
131
+ '這裡的 Antigravity 是 Google 的預覽版(antigravity-preview-09-2026)。它的行為、模型、價格與可用性可能隨時變動或停止,而且這個整合本身也還是早期雛形。',
132
+ 'Usage is billed to the key in GEMINI_API_KEY at Gemini API rates. One turn is capped at 500,000 tokens. The cost shown after a turn is an estimate; your Google bill is what counts.':
133
+ '費用會以 Gemini API 的價格,計入 GEMINI_API_KEY 對應的帳戶。每個 turn 上限 500,000 tokens。turn 結束後顯示的費用是估算值,實際以 Google 帳單為準。',
134
+ 'open-doc uses only your API key. It never uses your Antigravity or Google account sign-in, and the key is never sent to the browser.':
135
+ 'open-doc 只使用你的 API key,不會使用你的 Antigravity 或 Google 帳號登入,金鑰也不會傳到瀏覽器。',
136
+ 'You can withdraw your consent at any time from Manage agents.':
137
+ '你可以隨時在「管理 agent」撤回同意。',
138
+ "With local mode on, open-doc downloads Google's gemini-api CLI (v0.4.6, checksum-verified) into node_modules/.open-doc and runs it while the dev server runs. The agent's file tools then work directly on this project folder on your computer, with shell commands disabled.":
139
+ '開啟本機模式後,open-doc 會把 Google 的 gemini-api CLI(v0.4.6,已驗證 checksum)下載到 node_modules/.open-doc,並在 dev server 執行期間啟動它。之後 agent 的檔案工具會直接在你電腦上的這個專案資料夾裡作業,而且停用 shell 指令。',
140
+ "Without local mode, every turn uploads the open document's folder and the workspace's .agents/skills to a Google cloud sandbox. In both modes your messages and the files the agent reads are sent to Google through the Gemini API, so do not use it on documents you may not share with Google. The Gemini API terms apply, and on the free tier Google may use the data to improve its products.":
141
+ '未開啟本機模式時,每個 turn 都會把目前文件的資料夾與工作區的 .agents/skills 上傳到 Google 的雲端 sandbox。兩種模式下,你的訊息和 agent 讀取的檔案都會透過 Gemini API 傳給 Google,不能交給 Google 的文件請不要使用。使用時適用 Gemini API 的服務條款;免費層的資料可能會被 Google 用來改善產品。',
142
+ "In the cloud sandbox, the agent's edits are copied back into the document's folder when a turn ends; a file you changed during the turn is not overwritten, and deletions are not copied back. In local mode the agent edits your files directly. Either way, review the changes before you rely on them.":
143
+ '在雲端 sandbox 中,agent 的修改會在 turn 結束時寫回文件資料夾;turn 進行中你改過的檔案不會被覆蓋,刪除檔案也不會同步回來。本機模式下,agent 會直接修改你的檔案。不論哪種模式,依賴這些修改之前請先檢查。',
144
+ 'Runs on this computer · edits appear live': '在這台電腦執行 · 修改即時顯示',
145
+ 'Runs in a Google cloud sandbox · edits arrive when a turn ends':
146
+ '在 Google 雲端 sandbox 執行 · turn 結束時才同步修改',
147
+ 'Run on this computer': '改為在這台電腦執行',
148
+ 'Setting up local mode': '正在設定本機模式',
149
+ "Recommended. Downloads Google's gemini-api CLI into this project; no Docker or terminal needed.":
150
+ '建議使用。會把 Google 的 gemini-api CLI 下載到這個專案,不需要 Docker 或終端機。',
151
+ 'Local mode is not available on this system yet.': '這個系統目前還不支援本機模式。',
152
+ 'Could not set up local mode': '無法設定本機模式',
153
+ 'Try {name}': '試用 {name}',
154
+ 'Gemini edits this document right on your computer, and you watch each change land on the page.':
155
+ 'Gemini 會直接在你的電腦上編輯這份文件,每一處修改都會即時出現在頁面上。',
156
+ Enable: '啟用',
157
+ 'Not now': '稍後再說',
158
+ 'Accept the preview terms to use {name}.': '同意預覽版條款後即可使用 {name}。',
113
159
  };