replicas-engine 0.1.908 → 0.1.910

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.
@@ -7,9 +7,7 @@ var AGENT = {
7
7
  CLAUDE: "claude",
8
8
  CODEX: "codex",
9
9
  CURSOR: "cursor",
10
- DEEPSEEK: "deepseek",
11
10
  FX: "fx",
12
- GEMINI: "gemini",
13
11
  KIMI: "kimi",
14
12
  MUSE: "muse",
15
13
  OPENCODE: "opencode",
@@ -21,7 +19,6 @@ var VALID_RELAY_SUBAGENT_PROVIDERS = VALID_AGENT_PROVIDERS;
21
19
  var VALID_RELAY_BASE_PROVIDERS = [
22
20
  AGENT.CLAUDE,
23
21
  AGENT.CODEX,
24
- AGENT.DEEPSEEK,
25
22
  AGENT.OPENCODE,
26
23
  AGENT.PI
27
24
  ];
@@ -44,9 +41,7 @@ var THINKING_LEVELS_BY_AGENT = {
44
41
  claude: [...STANDARD_THINKING_LEVELS, "ultracode"],
45
42
  codex: [...STANDARD_THINKING_LEVELS, "ultra"],
46
43
  cursor: STANDARD_THINKING_LEVELS,
47
- deepseek: STANDARD_THINKING_LEVELS,
48
44
  fx: STANDARD_THINKING_LEVELS,
49
- gemini: STANDARD_THINKING_LEVELS,
50
45
  kimi: STANDARD_THINKING_LEVELS,
51
46
  muse: VALID_THINKING_LEVELS.filter((level) => level !== "max" && level !== "ultracode"),
52
47
  opencode: STANDARD_THINKING_LEVELS,
@@ -74,12 +69,8 @@ function getProviderDisplayName(provider, variant = "short") {
74
69
  return "Codex";
75
70
  case "cursor":
76
71
  return "Cursor";
77
- case "deepseek":
78
- return variant === "long" ? "DeepSeek Harness" : "DeepSeek";
79
72
  case "fx":
80
73
  return "fx";
81
- case "gemini":
82
- return "Gemini";
83
74
  case "kimi":
84
75
  return variant === "long" ? "Kimi Code" : "Kimi";
85
76
  case "muse":
@@ -195,9 +186,7 @@ var DEFAULT_CHAT_TITLES = {
195
186
  claude: "Claude Code",
196
187
  codex: "Codex",
197
188
  cursor: "Cursor",
198
- deepseek: "DeepSeek Harness",
199
189
  fx: "fx",
200
- gemini: "Gemini CLI",
201
190
  kimi: "Kimi Code",
202
191
  muse: "Muse Code",
203
192
  opencode: "Opencode",
@@ -237,9 +226,7 @@ var GLM_5_3_FLASH_MODEL = "z-ai/glm-5.3-flash";
237
226
  var OX_ALPHA_MODEL = "stealth/ox-alpha";
238
227
  var DEEPSEEK_V4_PRO_MODEL = "deepseek/deepseek-v4-pro-0813";
239
228
  var DEEPSEEK_V4_FLASH_MODEL = "deepseek/deepseek-v4-flash-0731";
240
- var DEFAULT_DEEPSEEK_MODEL = DEEPSEEK_V4_PRO_MODEL;
241
229
  var DEFAULT_FX_MODEL = "zai/glm-5.2";
242
- var DEFAULT_GEMINI_MODEL = "gemini-3.8-flash";
243
230
  var DEFAULT_KIMI_MODEL = "moonshotai/kimi-k2.6";
244
231
  var MUSE_SPARK_1_3_MODEL = "muse-spark-1.3";
245
232
  var DEFAULT_MUSE_MODEL = "muse-spark-1.2";
@@ -261,19 +248,11 @@ var OPENROUTER_MODELS = [
261
248
  "xiaomi/mimo-v2.5-pro",
262
249
  "meta/muse-spark-1.3"
263
250
  ];
264
- function prioritizeDeepseekModels(models) {
265
- return [
266
- ...models.filter((model) => model.startsWith("deepseek/")),
267
- ...models.filter((model) => !model.startsWith("deepseek/"))
268
- ];
269
- }
270
251
  var FALLBACK_AGENT_MODEL = {
271
252
  claude: DEFAULT_CLAUDE_MODEL,
272
253
  codex: DEFAULT_CODEX_MODEL,
273
254
  cursor: DEFAULT_CURSOR_MODEL,
274
- deepseek: DEFAULT_DEEPSEEK_MODEL,
275
255
  fx: DEFAULT_FX_MODEL,
276
- gemini: DEFAULT_GEMINI_MODEL,
277
256
  kimi: DEFAULT_KIMI_MODEL,
278
257
  muse: DEFAULT_MUSE_MODEL,
279
258
  opencode: DEFAULT_OPENCODE_MODEL,
@@ -375,9 +354,7 @@ var AGENT_MODELS = {
375
354
  CLAUDE_HAIKU_4_5_MODEL,
376
355
  "kimi-k2.5"
377
356
  ],
378
- deepseek: prioritizeDeepseekModels(DEFAULT_OPENROUTER_MODELS),
379
357
  fx: [DEFAULT_FX_MODEL],
380
- gemini: [DEFAULT_GEMINI_MODEL, "gemini-3.1-pro-preview"],
381
358
  kimi: [DEFAULT_KIMI_MODEL],
382
359
  muse: [MUSE_SPARK_1_3_MODEL, DEFAULT_MUSE_MODEL],
383
360
  opencode: [...DEFAULT_OPENROUTER_MODELS, ...ASTER_MODELS],
@@ -432,8 +409,6 @@ var MODEL_LABELS = {
432
409
  "xiaomi/mimo-v2.5-pro": "MiMo V2.5 Pro via OpenRouter",
433
410
  "moonshotai/kimi-k2.6": "Kimi K2.6 via OpenRouter",
434
411
  "moonshotai/kimi-k3": "Kimi K3 via OpenRouter",
435
- "gemini-3-flash-preview": "Gemini 3 Flash Preview",
436
- "gemini-3.1-pro-preview": "Gemini 3.1 Pro Preview",
437
412
  [MUSE_SPARK_1_3_MODEL]: "Muse Spark 1.3",
438
413
  [DEFAULT_MUSE_MODEL]: "Muse Spark 1.2",
439
414
  "meta/muse-spark-1.3": "Muse Spark 1.3 via OpenRouter",
@@ -698,7 +673,7 @@ function resolveOpenAICompatibleModelsUrl(values) {
698
673
  }
699
674
 
700
675
  // ../shared/src/credentials/ollama.ts
701
- var OLLAMA_AGENTS = ["claude", "codex", "deepseek", "kimi", "opencode", "pi"];
676
+ var OLLAMA_AGENTS = ["claude", "codex", "kimi", "opencode", "pi"];
702
677
  function ollamaAuthEnvKeys(agent) {
703
678
  return ["API_KEY", "BASE_URL"].map((key) => `REPLICAS_${agent.toUpperCase()}_OLLAMA_${key}`);
704
679
  }
@@ -809,7 +784,6 @@ var CREDENTIAL_TYPE = {
809
784
  ASTER_API_KEY: "aster_api_key",
810
785
  OPENROUTER_API_KEY: "openrouter_api_key",
811
786
  AI_GATEWAY_API_KEY: "ai_gateway_api_key",
812
- GEMINI_API_KEY: "gemini_api_key",
813
787
  MUSE_OAUTH: "muse_oauth",
814
788
  MUSE_API_KEY: "muse_api_key"
815
789
  };
@@ -837,16 +811,9 @@ var AGENT_CREDENTIAL_METHODS_IN_ORDER = {
837
811
  [AGENT.CURSOR]: [
838
812
  { method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.CURSOR_API_KEY }
839
813
  ],
840
- [AGENT.DEEPSEEK]: [
841
- { method: CREDENTIAL_METHOD.OPENROUTER, credentialType: CREDENTIAL_TYPE.OPENROUTER_API_KEY },
842
- { method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
843
- ],
844
814
  [AGENT.FX]: [
845
815
  { method: CREDENTIAL_METHOD.AI_GATEWAY, credentialType: CREDENTIAL_TYPE.AI_GATEWAY_API_KEY }
846
816
  ],
847
- [AGENT.GEMINI]: [
848
- { method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.GEMINI_API_KEY }
849
- ],
850
817
  [AGENT.KIMI]: [
851
818
  { method: CREDENTIAL_METHOD.AI_GATEWAY, credentialType: CREDENTIAL_TYPE.AI_GATEWAY_API_KEY },
852
819
  { method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
@@ -879,7 +846,6 @@ function getCredentialMethodLabel(agent, method) {
879
846
  case CREDENTIAL_METHOD.API_KEY:
880
847
  if (agent === AGENT.CODEX) return "OpenAI API key";
881
848
  if (agent === AGENT.CURSOR) return "Cursor API key";
882
- if (agent === AGENT.GEMINI) return "Gemini API key";
883
849
  if (agent === AGENT.MUSE) return "Muse API key";
884
850
  return "Anthropic API key";
885
851
  case CREDENTIAL_METHOD.OPENAI_COMPATIBLE:
@@ -992,10 +958,15 @@ function hasAgentChatActivityFields(value) {
992
958
  function isAgentChatActivityRecord(value) {
993
959
  return hasAgentChatActivityFields(value) && typeof value.provider === "string" && isValidAgentProvider(value.provider);
994
960
  }
961
+ var credentialAccountSchema = z2.object({
962
+ ownerName: z2.string().optional(),
963
+ email: z2.string().optional()
964
+ });
995
965
  var agentCredentialSnapshotSchema = z2.object({
996
966
  method: z2.enum(CREDENTIAL_METHOD),
997
967
  scope: z2.enum(CREDENTIAL_SCOPE),
998
- revision: z2.string().optional()
968
+ revision: z2.string().optional(),
969
+ account: credentialAccountSchema.optional()
999
970
  });
1000
971
  function isAuthMethod(value) {
1001
972
  return typeof value === "string" && Object.values(CREDENTIAL_METHOD).some((method) => method === value);
@@ -1077,6 +1048,8 @@ var CURSOR_CONNECTION_STATUS_EVENT_TYPE = "cursor-connection-status";
1077
1048
  var AUTH_FALLBACK_EVENT_TYPE = "auth-fallback";
1078
1049
  function coerceAuthFallbackPayload(payload) {
1079
1050
  const { provider, reason, exhaustedMethod, exhaustedScope, candidateMethod, candidateScope, status, detail } = payload;
1051
+ const exhaustedAccount = credentialAccountSchema.safeParse(payload.exhaustedAccount).data;
1052
+ const candidateAccount = credentialAccountSchema.safeParse(payload.candidateAccount).data;
1080
1053
  if (typeof provider !== "string" || !isValidCodingAgentProvider(provider) || reason !== "rate_limit" && reason !== "out_of_credits" || !isAuthMethod(exhaustedMethod) || !isAuthMethod(candidateMethod) || !isCredentialScope(candidateScope) || status !== "switched" && status !== "failed") {
1081
1054
  return null;
1082
1055
  }
@@ -1085,8 +1058,10 @@ function coerceAuthFallbackPayload(payload) {
1085
1058
  reason,
1086
1059
  exhaustedMethod,
1087
1060
  ...isCredentialScope(exhaustedScope) ? { exhaustedScope } : {},
1061
+ ...exhaustedAccount ? { exhaustedAccount } : {},
1088
1062
  candidateMethod,
1089
1063
  candidateScope,
1064
+ ...candidateAccount ? { candidateAccount } : {},
1090
1065
  status,
1091
1066
  ...typeof detail === "string" && detail ? { detail } : {}
1092
1067
  };
@@ -1920,19 +1895,27 @@ function detectAgentQuotaLimit(text) {
1920
1895
  }
1921
1896
 
1922
1897
  // ../shared/src/auth-fallback.ts
1923
- function credentialLabel(payload, method, scope) {
1924
- const label = getCredentialMethodLabel(payload.provider, method);
1925
- if (scope === CREDENTIAL_SCOPE.USER) return `your ${label}`;
1926
- if (scope === CREDENTIAL_SCOPE.ORG) return `the organization ${label}`;
1927
- return `the ${label}`;
1898
+ function describeCredential(provider, credential) {
1899
+ const label = getCredentialMethodLabel(provider, credential.method);
1900
+ const { ownerName, email } = credential.account ?? {};
1901
+ const owner = credential.scope === CREDENTIAL_SCOPE.USER ? ownerName ? `${ownerName}'s personal ${label}` : `your ${label}` : credential.scope === CREDENTIAL_SCOPE.ORG ? `the organization's ${label}` : `the ${label}`;
1902
+ return email ? `${owner} (${email})` : owner;
1928
1903
  }
1929
1904
  function describeAuthFallback(payload) {
1930
1905
  const agent = getProviderDisplayName(payload.provider);
1931
- const exhausted = credentialLabel(payload, payload.exhaustedMethod, payload.exhaustedScope);
1906
+ const exhausted = describeCredential(payload.provider, {
1907
+ method: payload.exhaustedMethod,
1908
+ scope: payload.exhaustedScope,
1909
+ account: payload.exhaustedAccount
1910
+ });
1932
1911
  const switched = payload.status === "switched";
1933
1912
  return {
1934
1913
  headline: payload.reason === "out_of_credits" ? `${agent} is out of credits on ${exhausted}` : `${agent} hit its usage limit on ${exhausted}`,
1935
- outcomeClause: switched ? `switched to ${credentialLabel(payload, payload.candidateMethod, payload.candidateScope)}` : "could not use the configured fallback credential"
1914
+ outcomeClause: switched ? `switched to ${describeCredential(payload.provider, {
1915
+ method: payload.candidateMethod,
1916
+ scope: payload.candidateScope,
1917
+ account: payload.candidateAccount
1918
+ })}` : "could not use the configured fallback credential"
1936
1919
  };
1937
1920
  }
1938
1921
 
@@ -1940,7 +1923,7 @@ function describeAuthFallback(payload) {
1940
1923
  import { z as z6 } from "zod";
1941
1924
  var WORKSPACE_CREDENTIAL_PROVIDERS = ["claude", "codex"];
1942
1925
  var workspaceCredentialProviderSchema = z6.enum(WORKSPACE_CREDENTIAL_PROVIDERS);
1943
- var workspaceCredentialSelectionSchema = agentCredentialSnapshotSchema.omit({ revision: true });
1926
+ var workspaceCredentialSelectionSchema = agentCredentialSnapshotSchema.omit({ revision: true, account: true });
1944
1927
  var createWorkspaceCredentialSchema = workspaceCredentialSelectionSchema.extend({
1945
1928
  provider: z6.enum(VALID_CODING_AGENT_PROVIDERS)
1946
1929
  }).refine(({ provider, method }) => agentCredentialMethods(provider).includes(method), {
@@ -2815,7 +2798,7 @@ gh pr review 123 --request-changes --body "Changes needed"
2815
2798
 
2816
2799
  ## Media in GitHub workflows
2817
2800
 
2818
- Media delivery is owned by \`references/MEDIA.md\`. Read its GitHub section before adding screenshots, recordings, diagrams, or HTML reports to a pull request, issue, review comment, or commit; it covers public Forge embeds for images and recording previews, organization-only HTML links, and the required **View in Replicas** link.
2801
+ Media delivery is owned by \`references/MEDIA.md\`. Read its GitHub section before adding screenshots, recordings, diagrams, or HTML reports to a pull request, issue, review comment, or commit; it covers the public links every image upload prints, recording previews, organization-only HTML links, and the required **View in Replicas** link.
2819
2802
  `;
2820
2803
  var GITHUB_ABILITY = {
2821
2804
  label: "GitHub",
@@ -3026,11 +3009,11 @@ If none of these apply, don't upload.
3026
3009
 
3027
3010
  \`replicas media upload\` is always the first delivery action. When the current task has an external destination, every other delivery step follows only after that command succeeds. For every file:
3028
3011
 
3029
- 1. First, run \`replicas media upload\` with the original file. Do not begin any destination upload until the command succeeds. This creates the canonical dashboard copy and prints a chat embed plus a per-file dashboard link. With public access, the printed Forge embed is the chat embed and is also safe to use on GitHub.
3012
+ 1. First, run \`replicas media upload\` with the original file. Do not begin any destination upload until the command succeeds. This creates the canonical dashboard copy and prints an embed plus a per-file dashboard link. Every image gets a public link, so its printed embed works in chat and on GitHub.
3030
3013
  2. Include the printed embed line in the Replicas chat reply, followed by **View in Canvas** using the matching per-file dashboard URL. HTML uses its printed page link instead of an image embed.
3031
- 3. Identify every destination in the task and use its inline representation from the table below. Slack, Linear, and GitLab require an upload of the same original bytes; GitHub uses the public Forge embed.
3014
+ 3. Identify every destination in the task and use its inline representation from the table below. Slack, Linear, and GitLab require an upload of the same original bytes; GitHub uses the image's printed public embed.
3032
3015
  4. Put the **View in Replicas** dashboard link next to the destination embed as a secondary link.
3033
- 5. Check each destination response. If its upload or Forge share fails, say so explicitly and keep the dashboard link; never claim that a dashboard link is an inline embed.
3016
+ 5. Check each destination response. If its upload or public link fails, say so explicitly and keep the dashboard link; never claim that a dashboard link is an inline embed.
3034
3017
 
3035
3018
  | Destination | Required file delivery | Inline result |
3036
3019
  |---|---|---|
@@ -3038,7 +3021,7 @@ If none of these apply, don't upload.
3038
3021
  | Slack | \`files.getUploadURLExternal\` \u2192 raw-byte POST \u2192 \`files.completeUploadExternal\` | Uploaded file in the channel or thread |
3039
3022
  | Linear | \`fileUpload\` mutation \u2192 presigned upload \u2192 issue/comment mutation | Returned \`assetUrl\` in Markdown |
3040
3023
  | GitLab | Project \`/uploads\` endpoint with the original bytes | Returned GitLab Markdown |
3041
- | GitHub | Replicas public Forge share for an image or recording poster | Printed Forge embed, linked to the recording when needed |
3024
+ | GitHub | Printed public embed for an image or recording poster | Printed embed, linked to the recording when needed |
3042
3025
 
3043
3026
  The dashboard link is the subtitle and jump-back path. It is never a substitute for the destination embed.
3044
3027
 
@@ -3068,8 +3051,8 @@ Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\`
3068
3051
 
3069
3052
  For each media file, the CLI prints an embed line and a dashboard link:
3070
3053
 
3071
- 1. Default and organization access print \`Replicas chat embed: ![filename](<api-url>)\`; this authenticated URL renders inline in Replicas chat **only** \u2014 see below.
3072
- 2. Public access (\`--access public\` or \`--share\`) prints \`![filename](<public-url>)\` as the Forge embed instead. This is the public, stable bearer URL to paste into GitHub when sharing is authorized.
3054
+ 1. Images always print \`![filename](<public-url>)\`. This public, stable link works in Replicas chat, GitHub, and anywhere else Markdown images render. No flag is needed.
3055
+ 2. Video and audio print \`Replicas chat embed: ![filename](<api-url>)\` by default; this authenticated URL renders inline in Replicas chat **only** \u2014 see below. \`--access public\` prints a public embed instead.
3073
3056
  3. \`View in Replicas: <deep-link>\` is a per-file dashboard URL of the form \`https://app.replicas.dev/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
3074
3057
 
3075
3058
  Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
@@ -3084,13 +3067,13 @@ replicas media upload recap.html --name "Visual recap" --access organization
3084
3067
 
3085
3068
  The printed \`Forge link (organization only)\` opens a dedicated page. Signed-in organization members go straight to it; signed-out members sign in and return to the page.
3086
3069
 
3087
- Use public access only when the media must render without Replicas authentication:
3070
+ Video and audio stay private unless they must play without Replicas sign-in; then pass \`--access public\` (alias \`--share\`):
3088
3071
 
3089
3072
  \`\`\`bash
3090
- replicas media upload screenshot.png --name "Login page" --access public
3073
+ replicas media upload demo.mp4 --name "Checkout demo" --access public
3091
3074
  \`\`\`
3092
3075
 
3093
- \`--share\` remains an alias for \`--access public\`. Public access prints the raw \`Forge embed\` Markdown instead of the authenticated chat-only embed for image, video, or audio media, backed by an opt-in bearer URL. Anyone with that unguessable URL can view the asset until it is rotated or revoked. HTML pages only support organization access. Use \`replicas media share <media-id>\` to rotate a public media URL and \`replicas media revoke <media-id>\` to revoke it.
3076
+ Public links are unguessable bearer URLs: anyone with the link can view the file until it is rotated or revoked. HTML pages only support organization access. Reuse the link printed at upload. \`replicas media share <media-id>\` issues a new link and breaks the old one everywhere it is embedded, and \`replicas media revoke <media-id>\` removes public access.
3094
3077
 
3095
3078
  Permanently delete an upload with \`replicas media delete <media-id>\`. The backend only permits deletion when the media belongs to the current workspace; media from another workspace returns not found.
3096
3079
 
@@ -3098,14 +3081,14 @@ Permanently delete an upload with \`replicas media delete <media-id>\`. The back
3098
3081
 
3099
3082
  | URL | What it is | Where it's allowed |
3100
3083
  |---|---|---|
3101
- | \`https://api.replicas.dev/v1/media/<id>\` (inside \`![\u2026](\u2026)\`) | Authenticated API redirect to a presigned blob \u2014 requires the Replicas chat session | **Only** in the Replicas chat reply. Nowhere else. |
3084
+ | \`https://api.replicas.dev/v1/media/<id>\` (inside \`![\u2026](\u2026)\`) | Authenticated API redirect printed for private video, audio, and HTML \u2014 requires the Replicas chat session | **Only** in the Replicas chat reply. Nowhere else. |
3102
3085
  | \`https://replicas.dev/organizations/<organization-id>/media/<media-id>\` | Organization-only page printed by \`--access organization\` | Pull requests and other places where every viewer belongs to the Replicas organization. |
3103
- | \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | The Replicas chat reply and GitHub embeds, for image, video, or audio media. |
3086
+ | \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Public bearer URL printed for every image, and for video or audio with \`--access public\` | The Replicas chat reply and GitHub embeds. |
3104
3087
  | \`https://app.replicas.dev/workspaces/<workspace-id>?media=<media-id>\` | Authenticated dashboard deep link that opens the media file in the workspace | Everywhere external: Slack, GitHub, GitLab, Linear, PR bodies, comments, emails. |
3105
3088
 
3106
3089
  ### NEVER link the API redirect URL outside the Replicas chat reply
3107
3090
 
3108
- The \`api.replicas.dev/v1/media/<id>\` URL is **not public**. It's an authenticated redirect that only resolves to a presigned download when the Replicas chat session token is present. Anywhere else (Slack, Linear, GitHub, a browser tab the user opens directly, a customer copy-pasting from chat) it returns \`{"error":"Missing authorization token"}\` and renders as a broken image.
3091
+ The \`api.replicas.dev/v1/media/<id>\` URL is **not public**. Image uploads never print it; if you have one for an image from an older upload, run \`replicas media share <media-id>\` to get a public link. It's an authenticated redirect that only resolves to a presigned download when the Replicas chat session token is present. Anywhere else (Slack, Linear, GitHub, a browser tab the user opens directly, a customer copy-pasting from chat) it returns \`{"error":"Missing authorization token"}\` and renders as a broken image.
3109
3092
 
3110
3093
  This rule has no exceptions:
3111
3094
  - \u274C Never paste it in a Slack message \u2014 upload the actual bytes via the 3-step \`files.getUploadURLExternal\` \u2192 POST bytes \u2192 \`files.completeUploadExternal\` flow instead (see below).
@@ -3139,12 +3122,12 @@ After (or alongside) the embeds, include a \`[View in Canvas](<deep-link>)\` hyp
3139
3122
 
3140
3123
  After \`replicas media upload\` succeeds, external delivery has two required follow-up steps for every file:
3141
3124
 
3142
- 1. **Use the destination's inline representation:** upload the raw bytes to Slack, Linear, or GitLab; embed a public Forge share on GitHub.
3125
+ 1. **Use the destination's inline representation:** upload the raw bytes to Slack, Linear, or GitLab; embed the image's printed public link on GitHub.
3143
3126
  2. **Link the Replicas dashboard deep link** (\`?media=<id>\` form) so the user can jump straight to the file in the workspace.
3144
3127
 
3145
3128
  A dashboard link alone is not enough. An embed without the dashboard link is not enough. Do both.
3146
3129
 
3147
- Slack, Linear, and GitLab receive the original bytes through their native upload APIs. GitHub uses a Replicas public Forge share for screenshots and recording previews.
3130
+ Slack, Linear, and GitLab receive the original bytes through their native upload APIs. GitHub uses the printed public link for screenshots and recording previews.
3148
3131
 
3149
3132
  ### Slack \u2014 embed natively via the 3-step external file upload flow
3150
3133
 
@@ -3245,19 +3228,17 @@ The same flow works for issue bodies (use \`issueCreate\` / \`issueUpdate\` with
3245
3228
 
3246
3229
  Never paste the \`api.replicas.dev/v1/media/<id>\` URL into a Linear body or comment \u2014 it will render as a broken image to anyone outside your Replicas chat.
3247
3230
 
3248
- ### GitHub: inline images and recording previews via Forge
3249
-
3250
- Replicas authenticates GitHub with GitHub App tokens, which native GitHub CLI attachment uploads do not support. Do not use \`gh --attach\` for media. Use a public Forge share for images in PR descriptions, issues, and comments.
3231
+ ### GitHub: inline images and recording previews
3251
3232
 
3252
- Create a public share only for a public repository or after explicit consent to publish media from a private repository. If sharing is not authorized, keep the media private and include its **View in Replicas** link, explaining that inline GitHub images require a public share.
3233
+ Replicas authenticates GitHub with GitHub App tokens, which GitHub's attachment upload rejects, so \`gh --attach\` does not work. Use the public link every image upload prints, in public and private repositories alike, for PR descriptions, issues, and comments.
3253
3234
 
3254
- 1. Upload the image with public access. This creates both the Replicas dashboard copy and the Forge share:
3235
+ 1. Upload the image:
3255
3236
 
3256
3237
  \`\`\`bash
3257
- replicas media upload /tmp/screenshot.png --name "PR screenshot" --access public
3238
+ replicas media upload /tmp/screenshot.png --name "PR screenshot"
3258
3239
  \`\`\`
3259
3240
 
3260
- 2. Copy the printed \`![filename](<public-url>)\` Forge embed into the body file, followed by the matching **View in Replicas** link. Use the printed public URL verbatim; never use a local file path, the authenticated API URL, or an expiring storage URL.
3241
+ 2. Copy the printed \`![filename](<public-url>)\` line verbatim into the body file, followed by the matching **View in Replicas** link. Never use a local file path, a \`/v1/media/<id>\` URL, a Linear \`assetUrl\`, or an expiring storage URL.
3261
3242
  3. Create or update the PR using the body file:
3262
3243
 
3263
3244
  \`\`\`bash
@@ -3266,13 +3247,13 @@ gh pr edit 456 --body-file /tmp/pr-body.md
3266
3247
  gh pr comment 456 --body-file /tmp/comment.md
3267
3248
  \`\`\`
3268
3249
 
3269
- GitHub does not reliably render external videos as inline players. For a recording preview, upload the MP4 normally, generate a poster with \`ffmpeg -i /tmp/demo.mp4 -frames:v 1 /tmp/demo-poster.png\`, upload the poster with \`--access public\`, and link its Forge embed to the recording's **View in Replicas** URL:
3250
+ Videos stay private, and GitHub does not play external videos inline. Upload the MP4 normally, generate a poster with \`ffmpeg -i /tmp/demo.mp4 -frames:v 1 /tmp/demo-poster.png\`, upload the poster like any image, and link its printed embed to the recording's **View in Replicas** URL:
3270
3251
 
3271
3252
  \`\`\`markdown
3272
3253
  [![Demo recording](<public-poster-url>)](<recording-dashboard-url>)
3273
3254
  \`\`\`
3274
3255
 
3275
- Public forge shares are unauthenticated bearer capabilities. Revoke with \`replicas media revoke <media-id>\` **only** when the user asks or the media should intentionally stop rendering; never as routine post-task cleanup, since revoking breaks every embed already posted on the PR.
3256
+ Public links are unauthenticated bearer capabilities. Revoke with \`replicas media revoke <media-id>\` **only** when the user asks or the media should intentionally stop rendering; never as routine post-task cleanup, since revoking breaks every embed already posted on the PR.
3276
3257
 
3277
3258
  For a self-contained HTML report, upload it with \`--access organization\` and put the printed \`Forge link\` Markdown in the PR body or comment. GitHub cannot render the page inline, so use the normal link rather than image syntax. HTML pages cannot be shared publicly.
3278
3259
 
@@ -3282,7 +3263,7 @@ Do **not** commit screenshots to the repo, use placeholder URLs, expose the auth
3282
3263
 
3283
3264
  GitLab supports native project Markdown uploads. For a GitLab destination, always upload the media to Replicas first, then POST the same original file to the repository's \`/projects/:id/uploads\` API using the workspace GitLab credential. Insert the returned \`markdown\` value into the merge request body or comment and include the Replicas dashboard link. Image uploads render inline; MP4, MOV, and WebM uploads render as inline video players.
3284
3265
 
3285
- Do not use a Replicas public forge share for GitLab when the native project upload succeeds; native uploads preserve project access controls.
3266
+ Do not use a Replicas public link for GitLab when the native project upload succeeds; native uploads preserve project access controls.
3286
3267
 
3287
3268
  ## Recording defaults
3288
3269
 
@@ -3324,7 +3305,7 @@ replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Err
3324
3305
  - \`--kind <image|video|audio|html>\` \u2014 override auto-detection
3325
3306
  - \`--name <name>\`: required display name shown in the dashboard, one per file in order
3326
3307
  - \`--session-id <id>\` \u2014 associate the upload with a specific session
3327
- - \`--access organization|public\`: create an organization-only link, or a public bearer URL for non-HTML media
3308
+ - \`--access organization|public\`: for video, audio, and HTML, create an organization-only link or a public bearer URL (video and audio only). Images are always public
3328
3309
  - \`--share\`: alias for \`--access public\`; not supported for HTML
3329
3310
  `;
3330
3311
  var MEDIA_ABILITY = {
@@ -4844,165 +4825,6 @@ function parseCursorEvents(events) {
4844
4825
  return messages;
4845
4826
  }
4846
4827
 
4847
- // ../shared/src/display-message/parsers/deepseek-parser.ts
4848
- function parseArguments(value) {
4849
- if (typeof value !== "string") return void 0;
4850
- const parsed = safeJsonParse(value, value);
4851
- return isRecord(parsed) ? parsed : stringifyDisplayValue(parsed);
4852
- }
4853
- function getDeepseekAssistantMessageText(event, blockType) {
4854
- if (!isRecord(event) || event.type !== "assistant/message" || !isRecord(event.data) || !isRecord(event.data.message) || !Array.isArray(event.data.message.content)) return "";
4855
- return event.data.message.content.flatMap((block) => isRecord(block) && block.type === blockType && typeof block.text === "string" ? [block.text] : []).join("");
4856
- }
4857
- function parseDeepseekEvents(events) {
4858
- const messages = [];
4859
- for (const source of events) {
4860
- if (source.type === "event_msg" && source.payload.type === "user_message") {
4861
- if (typeof source.payload.message === "string" && source.payload.message.trim()) {
4862
- const messageId = source.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
4863
- messages.push({
4864
- id: typeof messageId === "string" ? messageId : `deepseek-user-${source.timestamp}`,
4865
- type: "user",
4866
- content: source.payload.message,
4867
- timestamp: source.timestamp
4868
- });
4869
- }
4870
- continue;
4871
- }
4872
- if (source.type === "deepseek-error") {
4873
- messages.push({
4874
- id: `deepseek-error-${source.timestamp}`,
4875
- type: "error",
4876
- message: typeof source.payload.message === "string" ? source.payload.message : "DeepSeek Harness failed",
4877
- timestamp: source.timestamp
4878
- });
4879
- continue;
4880
- }
4881
- if (source.type === "deepseek-input-request") {
4882
- const requestId = typeof source.payload.requestId === "string" ? source.payload.requestId : `deepseek-input-${source.timestamp}`;
4883
- if (source.payload.kind === "approval") {
4884
- upsertDisplayMessage(messages, createCallDisplayMessage({
4885
- id: requestId,
4886
- server: "deepseek",
4887
- tool: typeof source.payload.toolName === "string" ? source.payload.toolName : "approval",
4888
- input: typeof source.payload.reason === "string" ? source.payload.reason : void 0,
4889
- status: "in_progress",
4890
- timestamp: source.timestamp,
4891
- inputRequest: {
4892
- requestId,
4893
- status: "pending",
4894
- options: [
4895
- { id: "deny", label: "Deny", variant: "secondary" },
4896
- { id: "allow", label: "Allow once", variant: "primary" }
4897
- ]
4898
- }
4899
- }));
4900
- } else {
4901
- const questions = Array.isArray(source.payload.questions) ? source.payload.questions : [];
4902
- upsertDisplayMessage(messages, createCallDisplayMessage({
4903
- id: requestId,
4904
- server: "deepseek",
4905
- tool: "ask_user",
4906
- status: "in_progress",
4907
- timestamp: source.timestamp,
4908
- inputRequest: {
4909
- requestId,
4910
- status: "pending",
4911
- questions: questions.flatMap((question) => {
4912
- if (!isRecord(question) || typeof question.id !== "string" || typeof question.question !== "string") return [];
4913
- const options = Array.isArray(question.options) ? question.options : [];
4914
- return [{
4915
- id: question.id,
4916
- prompt: question.question,
4917
- multiSelect: question.multiSelect === true,
4918
- options: options.flatMap((option) => isRecord(option) && typeof option.label === "string" ? [{ id: `${question.id}:${option.label}`, label: option.label, ...typeof option.description === "string" ? { description: option.description } : {} }] : [])
4919
- }];
4920
- })
4921
- }
4922
- }));
4923
- }
4924
- continue;
4925
- }
4926
- if (source.type === "deepseek-input-resolved") {
4927
- const requestId = typeof source.payload.requestId === "string" ? source.payload.requestId : "";
4928
- const existing = messages.find((message) => message.type === "tool_call" && message.inputRequest?.requestId === requestId);
4929
- if (existing?.type === "tool_call" && existing.inputRequest) {
4930
- existing.inputRequest.status = source.payload.status === "aborted" ? "aborted" : "resolved";
4931
- existing.status = source.payload.status === "aborted" ? "failed" : "completed";
4932
- }
4933
- continue;
4934
- }
4935
- if (source.type === "deepseek-jobs" && Array.isArray(source.payload.jobs)) {
4936
- for (const job of source.payload.jobs) {
4937
- if (!isRecord(job) || typeof job.id !== "string") continue;
4938
- const existing = messages.find((message) => message.type === "background_task" && message.taskId === job.id);
4939
- const status = normalizeBackgroundTaskStatus(job.status);
4940
- const next = {
4941
- id: existing?.id ?? `deepseek-job-${job.id}`,
4942
- type: "background_task",
4943
- taskId: job.id,
4944
- status,
4945
- description: typeof job.label === "string" ? job.label : void 0,
4946
- taskType: typeof job.kind === "string" ? job.kind : void 0,
4947
- error: status === "failed" && typeof job.detail === "string" ? job.detail : void 0,
4948
- timestamp: existing?.timestamp ?? source.timestamp
4949
- };
4950
- if (existing?.type === "background_task") Object.assign(existing, next);
4951
- else messages.push(next);
4952
- }
4953
- continue;
4954
- }
4955
- if (source.type !== "deepseek-session-event" || !isRecord(source.payload.event)) continue;
4956
- const event = source.payload.event;
4957
- const data = isRecord(event.data) ? event.data : {};
4958
- const seq = typeof event.seq === "number" ? event.seq : source.timestamp;
4959
- if (event.type === "assistant/message") {
4960
- const content = getDeepseekAssistantMessageText(event, "text");
4961
- const reasoning = getDeepseekAssistantMessageText(event, "reasoning");
4962
- if (reasoning.trim()) messages.push({ id: `deepseek-reasoning-${seq}`, type: "reasoning", content: reasoning, status: "completed", timestamp: source.timestamp });
4963
- if (content.trim()) messages.push({ id: `deepseek-assistant-${seq}`, type: "agent", content, timestamp: source.timestamp });
4964
- continue;
4965
- }
4966
- if (event.type === "tool/call") {
4967
- const callId = typeof data.callId === "string" ? data.callId : String(seq);
4968
- upsertDisplayMessage(messages, createCallDisplayMessage({
4969
- id: `deepseek-tool-${callId}`,
4970
- server: "deepseek",
4971
- tool: typeof data.name === "string" ? data.name : "tool",
4972
- input: parseArguments(data.arguments),
4973
- status: "in_progress",
4974
- timestamp: source.timestamp
4975
- }));
4976
- continue;
4977
- }
4978
- if (event.type === "tool/result") {
4979
- const message = isRecord(data.message) ? data.message : {};
4980
- const messageSource = isRecord(message.source) ? message.source : {};
4981
- const result = Array.isArray(message.content) && isRecord(message.content[0]) ? message.content[0] : {};
4982
- const callId = typeof messageSource.callId === "string" ? messageSource.callId : typeof data.callId === "string" ? data.callId : String(seq);
4983
- const existing = messages.find((message2) => message2.id === `deepseek-tool-${callId}` && message2.type === "tool_call");
4984
- if (existing?.type === "tool_call") {
4985
- existing.output = stringifyDisplayValue(result.content ?? data.result);
4986
- existing.status = result.isError === true || data.isError === true ? "failed" : "completed";
4987
- }
4988
- continue;
4989
- }
4990
- if (event.type === "todo/write" && Array.isArray(data.items)) {
4991
- messages.push({
4992
- id: `deepseek-todo-${seq}`,
4993
- type: "todo_list",
4994
- items: data.items.flatMap((item) => {
4995
- if (!isRecord(item) || typeof item.content !== "string") return [];
4996
- const itemStatus = item.status === "in_progress" || item.status === "completed" ? item.status : "pending";
4997
- return [{ text: item.content, completed: itemStatus === "completed", itemStatus }];
4998
- }),
4999
- timestamp: source.timestamp
5000
- });
5001
- }
5002
- }
5003
- return messages;
5004
- }
5005
-
5006
4828
  // ../shared/src/display-message/parsers/acp-parser.ts
5007
4829
  var FX_CONTEXT_DIAGNOSTIC = /^\[context\] skill catalog omitted .*?(?:\r?\n|$)/;
5008
4830
  function getAcpTextChunk(update, kind) {
@@ -6226,18 +6048,12 @@ function parseAgentEvents(events, agentType) {
6226
6048
  if (agentType === "cursor") {
6227
6049
  return parseCursorEvents(events);
6228
6050
  }
6229
- if (agentType === "deepseek") {
6230
- return parseDeepseekEvents(events);
6231
- }
6232
6051
  if (agentType === "fx") {
6233
6052
  return parseFxEvents(events);
6234
6053
  }
6235
6054
  if (agentType === "kimi") {
6236
6055
  return parseAcpEvents(events, "kimi");
6237
6056
  }
6238
- if (agentType === "gemini") {
6239
- return parseAcpEvents(events, "gemini");
6240
- }
6241
6057
  if (agentType === "muse") {
6242
6058
  return parseMuseEvents(events);
6243
6059
  }
@@ -6952,7 +6768,7 @@ var SLASH_COMMANDS = [
6952
6768
  command: "/plan",
6953
6769
  description: "Switch to plan mode and optionally send a prompt.",
6954
6770
  argumentHint: "[prompt]",
6955
- providers: ["claude", "codex", "cursor", "deepseek", "fx", "gemini", "kimi", "muse", "opencode", "pi", "relay"]
6771
+ providers: ["claude", "codex", "cursor", "fx", "kimi", "muse", "opencode", "pi", "relay"]
6956
6772
  },
6957
6773
  {
6958
6774
  command: "/fast",
@@ -8227,6 +8043,7 @@ export {
8227
8043
  listOllamaModels,
8228
8044
  CREDENTIAL_METHOD,
8229
8045
  AGENT_CREDENTIAL_METHODS_IN_ORDER,
8046
+ describeCredential,
8230
8047
  agentCredentialSnapshotSchema,
8231
8048
  isAgentChatTurnActivityRecord,
8232
8049
  isAgentChatSkillActivityRecord,
@@ -8265,9 +8082,7 @@ export {
8265
8082
  DEFAULT_CODEX_MODEL,
8266
8083
  DEFAULT_CURSOR_MODEL,
8267
8084
  DEFAULT_OPENCODE_MODEL,
8268
- DEFAULT_DEEPSEEK_MODEL,
8269
8085
  DEFAULT_FX_MODEL,
8270
- DEFAULT_GEMINI_MODEL,
8271
8086
  DEFAULT_KIMI_MODEL,
8272
8087
  DEFAULT_MUSE_MODEL,
8273
8088
  DEFAULT_PI_MODEL,
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-T4HLIO43.js";
8
+ } from "./chunk-PZHMAH33.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-FC2Z2DIV.js";
7
- import "./chunk-7R7AQ77Z.js";
6
+ } from "./chunk-K7TEHLJA.js";
7
+ import "./chunk-PRJY4Y7V.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-T4HLIO43.js";
11
+ import "./chunk-PZHMAH33.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/command-protection-hook.ts
@@ -28,7 +28,7 @@ function writeResult(allowed, reason) {
28
28
  }
29
29
  }
30
30
  async function main() {
31
- if (provider !== "cursor" && provider !== "gemini" && provider !== "kimi" && provider !== "opencode") {
31
+ if (provider !== "cursor" && provider !== "kimi" && provider !== "opencode") {
32
32
  throw new Error("Unknown command protection hook provider.");
33
33
  }
34
34
  let body = "";
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-XALZL5AE.js";
11
+ } from "./chunk-EE6PRRN4.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-T4HLIO43.js";
16
+ } from "./chunk-PZHMAH33.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
 
19
19
  // src/headless-agent.ts