replicas-engine 0.1.835 → 0.1.836

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.
@@ -5,11 +5,11 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-FHDW6RLP.js";
9
- import "./chunk-4T7IB2IL.js";
10
- import "./chunk-WMMIGCAV.js";
8
+ } from "./chunk-VX6UXEHB.js";
9
+ import "./chunk-UGHIPDUS.js";
10
+ import "./chunk-6LSFOGWT.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-YIBBAGHQ.js";
12
+ import "./chunk-IBKIJUQW.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES,
6
6
  isVersionBelow
7
- } from "./chunk-YIBBAGHQ.js";
7
+ } from "./chunk-IBKIJUQW.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -241,7 +241,7 @@ var DEFAULT_CODEX_ARGS = [
241
241
  var MIN_CODEX_CLI_VERSION = "0.153.3";
242
242
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
243
243
  var codexCliVersionEnsured = null;
244
- var ENGINE_PACKAGE_VERSION = "0.1.835";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.836";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -2402,7 +2402,7 @@ gh pr review 123 --request-changes --body "Changes needed"
2402
2402
 
2403
2403
  ## Media in GitHub workflows
2404
2404
 
2405
- 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 Replicas upload, GitHub's inline fallback, and the required **View in Replicas** link.
2405
+ 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.
2406
2406
  `;
2407
2407
  var GITHUB_ABILITY = {
2408
2408
  label: "GitHub",
@@ -2605,7 +2605,7 @@ Upload to Replicas in these cases \u2014 and **only** these cases:
2605
2605
 
2606
2606
  1. **Media you produce.** Any screenshot, screen recording, generated diagram, audio clip, or HTML page you create that the user might want to see. Upload before doing anything else with the file (analyzing, deleting, sending elsewhere). This applies even when you're also sending the file to Slack, Linear, GitHub, or GitLab.
2607
2607
  2. **Files the user explicitly asks you to upload.** If the user sends or points at a file (image, video, audio, HTML) and asks you to upload it, run \`replicas media upload\`. Otherwise leave it alone \u2014 files in the workspace the user did not ask about should not be auto-uploaded as media.
2608
- 3. **Anything you plan to share externally (Slack, Linear, GitHub, GitLab, etc.).** Upload to Replicas *in addition to* the platform's destination upload. Never as a replacement.
2608
+ 3. **Anything you plan to share externally (Slack, Linear, GitHub, GitLab, etc.).** Upload to Replicas first, then follow the destination's delivery path below.
2609
2609
 
2610
2610
  If none of these apply, don't upload.
2611
2611
 
@@ -2615,9 +2615,9 @@ If none of these apply, don't upload.
2615
2615
 
2616
2616
  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.
2617
2617
  2. Include the printed embed line in the Replicas chat reply, followed by the matching **View in Replicas** link. HTML uses its printed page link instead of an image embed.
2618
- 3. Identify every destination in the task and attempt to upload the same original bytes there. Use the destination's inline representation from the table below; do not replace the file with a Replicas link.
2618
+ 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.
2619
2619
  4. Put the **View in Replicas** dashboard link next to the destination embed as a secondary link.
2620
- 5. Check each destination response. If a native upload is unavailable or fails, say so explicitly and keep the dashboard link; never claim that a link is an inline upload.
2620
+ 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.
2621
2621
 
2622
2622
  | Destination | Required file delivery | Inline result |
2623
2623
  |---|---|---|
@@ -2625,9 +2625,9 @@ If none of these apply, don't upload.
2625
2625
  | Slack | \`files.getUploadURLExternal\` \u2192 raw-byte POST \u2192 \`files.completeUploadExternal\` | Uploaded file in the channel or thread |
2626
2626
  | Linear | \`fileUpload\` mutation \u2192 presigned upload \u2192 issue/comment mutation | Returned \`assetUrl\` in Markdown |
2627
2627
  | GitLab | Project \`/uploads\` endpoint with the original bytes | Returned GitLab Markdown |
2628
- | GitHub | \`gh\` v2.99.0+ \`--attach\` for images and videos; use a Replicas public forge share as the fallback | Native GitHub attachment URL, or a Forge embed fallback |
2628
+ | GitHub | Replicas public Forge share for an image or recording poster | Printed Forge embed, linked to the recording when needed |
2629
2629
 
2630
- The dashboard link is the subtitle and jump-back path. It is never a substitute for the destination upload.
2630
+ The dashboard link is the subtitle and jump-back path. It is never a substitute for the destination embed.
2631
2631
 
2632
2632
  ## Uploading to Replicas
2633
2633
 
@@ -2656,7 +2656,7 @@ Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\`
2656
2656
  For each media file, the CLI prints an embed line and a dashboard link:
2657
2657
 
2658
2658
  1. Default and organization access print \`Replicas chat embed: ![filename](<api-url>)\`; this authenticated URL renders inline in Replicas chat **only** \u2014 see below.
2659
- 2. Public access (\`--access public\` or \`--share\`) prints \`![filename](<public-url>)\` as the Forge embed instead. This is the public, stable bearer URL for GitHub fallback embeds when native \`--attach\` is unavailable and sharing is authorized.
2659
+ 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.
2660
2660
  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.
2661
2661
 
2662
2662
  Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
@@ -2685,7 +2685,7 @@ replicas media upload screenshot.png --name "Login page" --access public
2685
2685
  |---|---|---|
2686
2686
  | \`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. |
2687
2687
  | \`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. |
2688
- | \`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 fallback embeds, for image, video, or audio media. |
2688
+ | \`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. |
2689
2689
  | \`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. |
2690
2690
 
2691
2691
  ### NEVER link the API redirect URL outside the Replicas chat reply
@@ -2724,12 +2724,12 @@ After (or alongside) the embeds, include a \`[View in Replicas](<deep-link>)\` h
2724
2724
 
2725
2725
  After \`replicas media upload\` succeeds, external delivery has two required follow-up steps for every file:
2726
2726
 
2727
- 1. **Upload the raw bytes through that platform's supported inline path** so the recipient sees the media embedded in the message itself.
2727
+ 1. **Use the destination's inline representation:** upload the raw bytes to Slack, Linear, or GitLab; embed a public Forge share on GitHub.
2728
2728
  2. **Link the Replicas dashboard deep link** (\`?media=<id>\` form) so the user can jump straight to the file in the workspace.
2729
2729
 
2730
- A link alone is not enough. An upload without the dashboard link is not enough. Do both.
2730
+ A dashboard link alone is not enough. An embed without the dashboard link is not enough. Do both.
2731
2731
 
2732
- Slack, Linear, and GitLab receive the original bytes through their native upload APIs. GitHub image and video attachments use \`gh --attach\` when the installed CLI and host support it; use an explicit Replicas public share only as the fallback.
2732
+ 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.
2733
2733
 
2734
2734
  ### Slack \u2014 embed natively via the 3-step external file upload flow
2735
2735
 
@@ -2830,44 +2830,28 @@ The same flow works for issue bodies (use \`issueCreate\` / \`issueUpdate\` with
2830
2830
 
2831
2831
  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.
2832
2832
 
2833
- ### GitHub: native image and video attachments
2833
+ ### GitHub: inline images and recording previews via Forge
2834
2834
 
2835
- GitHub CLI v2.99.0+ supports a repeatable \`--attach\` flag on \`gh pr create\`, \`gh pr edit\`, and \`gh pr comment\` for GitHub.com and GitHub Enterprise Cloud. It uploads local images and videos to GitHub and writes the resulting attachment URL into the PR body or comment; it requires push access to the repository. GitHub Enterprise Server and unsupported media kinds are not covered by this path. See [GitHub's attachment guide](https://docs.github.com/en/github-cli/github-cli/attaching-files-with-github-cli).
2835
+ 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.
2836
2836
 
2837
- Check \`gh --version\` before choosing the delivery path. On a supported host with v2.99.0 or later:
2837
+ 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.
2838
2838
 
2839
- 1. Run \`replicas media upload\` with the original file first, without \`--share\`. Keep the matching **View in Replicas** dashboard link for the PR.
2840
- 2. Put each local file path in the Markdown body where the attachment should appear, and place its dashboard link next to it.
2841
- 3. Pass the same original path once with \`--attach\`. GitHub CLI rewrites a matching local reference in place, preserving its alt text; an unreferenced attachment is appended to the body.
2842
-
2843
- \`\`\`markdown
2844
- Before the change:
2845
-
2846
- ![Before state](/tmp/before.png)
2847
- [View in Replicas](https://app.replicas.dev/workspaces/<workspace-id>?media=<before-media-id>)
2848
- \`\`\`
2839
+ 1. Upload the image with public access. This creates both the Replicas dashboard copy and the Forge share:
2849
2840
 
2850
2841
  \`\`\`bash
2851
- gh pr create \\
2852
- --title "Describe the change" \\
2853
- --body-file /tmp/pr-body.md \\
2854
- --attach /tmp/before.png
2855
-
2856
- gh pr edit 456 --body-file /tmp/pr-body.md --attach /tmp/after.png
2857
- gh pr comment 456 --body-file /tmp/comment.md --attach /tmp/result.mp4
2842
+ replicas media upload /tmp/screenshot.png --name "PR screenshot" --access public
2858
2843
  \`\`\`
2859
2844
 
2860
- Repeat \`--attach\` for multiple files, up to 50 per command. For an appended image, add alt text after the path with \`#\`, for example \`--attach './error.png#Error state'\`. To render a video as a player, its local Markdown reference must be the only content in its paragraph. Do not paste a Replicas authenticated API URL into the body, and do not emulate GitHub's undocumented browser upload endpoint.
2861
-
2862
- ### GitHub attachment fallback
2863
-
2864
- If \`--attach\` is unavailable, the target is GitHub Enterprise Server, the file is not an image or video, or the native upload fails, keep the Replicas dashboard link and report the limitation. For an inline screenshot or video poster, create a Replicas public forge share only for a public repository or after explicit consent to publish media from a private repository, then use the printed \`Forge embed\` Markdown:
2845
+ 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.
2846
+ 3. Create or update the PR using the body file:
2865
2847
 
2866
2848
  \`\`\`bash
2867
- replicas media upload /tmp/screenshot.png --name "PR screenshot" --share
2849
+ gh pr create --title "Describe the change" --body-file /tmp/pr-body.md
2850
+ gh pr edit 456 --body-file /tmp/pr-body.md
2851
+ gh pr comment 456 --body-file /tmp/comment.md
2868
2852
  \`\`\`
2869
2853
 
2870
- For a fallback recording preview, upload the MP4 normally, generate a poster with \`ffmpeg -i /tmp/demo.mp4 -frames:v 1 /tmp/demo-poster.png\`, share the poster, and link its embed to the recording's **View in Replicas** URL:
2854
+ 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:
2871
2855
 
2872
2856
  \`\`\`markdown
2873
2857
  [![Demo recording](<public-poster-url>)](<recording-dashboard-url>)
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-YIBBAGHQ.js";
18
+ } from "./chunk-IBKIJUQW.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  shouldRefreshPullRequests
6
- } from "./chunk-YIBBAGHQ.js";
6
+ } from "./chunk-IBKIJUQW.js";
7
7
 
8
8
  // src/services/post-tool-pr-notifier.ts
9
9
  async function notifyPostToolUse(toolName, toolInput) {
@@ -5,13 +5,13 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-4T7IB2IL.js";
8
+ } from "./chunk-UGHIPDUS.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-WMMIGCAV.js";
14
+ } from "./chunk-6LSFOGWT.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -23,7 +23,7 @@ import {
23
23
  createSuccessResult,
24
24
  listOpenAICompatibleModels,
25
25
  resolveOpenAICompatibleModelsUrl
26
- } from "./chunk-YIBBAGHQ.js";
26
+ } from "./chunk-IBKIJUQW.js";
27
27
 
28
28
  // src/managers/codex-token-manager.ts
29
29
  import { promises as fs } from "fs";
@@ -238,7 +238,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
238
238
  const data = await response.json();
239
239
  await this.applyCredentialsResponse(data);
240
240
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
241
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-ULPZTUT2.js");
241
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-N46SGKAS.js");
242
242
  await restartCodexAspHostIfRunning2();
243
243
  }
244
244
  if (data.scope) {
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-4T7IB2IL.js";
6
+ } from "./chunk-UGHIPDUS.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-YIBBAGHQ.js";
11
+ } from "./chunk-IBKIJUQW.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -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-NGAPGKWO.js";
7
- import "./chunk-4T7IB2IL.js";
6
+ } from "./chunk-YD737SZV.js";
7
+ import "./chunk-UGHIPDUS.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-YIBBAGHQ.js";
11
+ import "./chunk-IBKIJUQW.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/command-protection-hook.ts
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-NGAPGKWO.js";
6
+ } from "./chunk-YD737SZV.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-MYD5ZGCU.js";
10
- import "./chunk-4T7IB2IL.js";
9
+ } from "./chunk-UXJA4LPH.js";
10
+ import "./chunk-UGHIPDUS.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-YIBBAGHQ.js";
12
+ import "./chunk-IBKIJUQW.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/deepseek-command-protection-plugin.ts
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-WMMIGCAV.js";
11
+ } from "./chunk-6LSFOGWT.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-YIBBAGHQ.js";
16
+ } from "./chunk-IBKIJUQW.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
 
19
19
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  evaluateCommandProtection,
92
92
  extractToolCommand,
93
93
  reportCommandProtectionBlock
94
- } from "./chunk-NGAPGKWO.js";
94
+ } from "./chunk-YD737SZV.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -131,20 +131,20 @@ import {
131
131
  recordCredentialFallback,
132
132
  recordExhaustedCredential,
133
133
  restartCodexAspHost
134
- } from "./chunk-FHDW6RLP.js";
134
+ } from "./chunk-VX6UXEHB.js";
135
135
  import {
136
136
  ENGINE_ENV,
137
137
  IS_WARMING_MODE,
138
138
  monolithRequest,
139
139
  monolithService,
140
140
  setAgentCredentialSnapshot
141
- } from "./chunk-4T7IB2IL.js";
141
+ } from "./chunk-UGHIPDUS.js";
142
142
  import {
143
143
  AspClient,
144
144
  SUBPROCESS_MAX_BUFFER,
145
145
  execAsync,
146
146
  execFileAsync
147
- } from "./chunk-WMMIGCAV.js";
147
+ } from "./chunk-6LSFOGWT.js";
148
148
  import {
149
149
  isRecord as isRecord2
150
150
  } from "./chunk-UZSNFLDQ.js";
@@ -352,7 +352,7 @@ import {
352
352
  spawnRelaySubagentRequestSchema,
353
353
  stripAgentDiagnosticErrors,
354
354
  withTimeout
355
- } from "./chunk-YIBBAGHQ.js";
355
+ } from "./chunk-IBKIJUQW.js";
356
356
  import {
357
357
  __commonJS,
358
358
  __export,
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  notifyPostToolUse
6
- } from "./chunk-MYD5ZGCU.js";
6
+ } from "./chunk-UXJA4LPH.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-YIBBAGHQ.js";
10
+ import "./chunk-IBKIJUQW.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/post-tool-pr-hook.ts
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  messageRelaySubagentRequestSchema,
9
9
  spawnRelaySubagentRequestSchema
10
- } from "./chunk-YIBBAGHQ.js";
10
+ } from "./chunk-IBKIJUQW.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.835",
3
+ "version": "0.1.836",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",