replicas-engine 0.1.788 → 0.1.789

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-MVZP26JI.js";
9
- import "./chunk-YRK3AKS5.js";
10
- import "./chunk-LCK6ZT5V.js";
8
+ } from "./chunk-AMU3NUHT.js";
9
+ import "./chunk-PUCWTNBF.js";
10
+ import "./chunk-RTI7OXYX.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-YSUQDUHX.js";
12
+ import "./chunk-N2J2OQAM.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
  findCodeHostPullRequestUrls,
6
6
  mayCreatePullRequest
7
- } from "./chunk-YSUQDUHX.js";
7
+ } from "./chunk-N2J2OQAM.js";
8
8
 
9
9
  // src/services/post-tool-pr-notifier.ts
10
10
  async function notifyPostToolUse(toolName, toolInput, toolResult) {
@@ -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-YRK3AKS5.js";
6
+ } from "./chunk-PUCWTNBF.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-YSUQDUHX.js";
11
+ } from "./chunk-N2J2OQAM.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -5,18 +5,18 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-YRK3AKS5.js";
8
+ } from "./chunk-PUCWTNBF.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  buildCodexAgentEnv
12
- } from "./chunk-LCK6ZT5V.js";
12
+ } from "./chunk-RTI7OXYX.js";
13
13
  import {
14
14
  CODEX_AUTH_ENV_KEYS,
15
15
  CODEX_AUTH_ENV_KEYS_BY_METHOD,
16
16
  codexAuthEnvFromResponse,
17
17
  createErrorResult,
18
18
  createSuccessResult
19
- } from "./chunk-YSUQDUHX.js";
19
+ } from "./chunk-N2J2OQAM.js";
20
20
 
21
21
  // src/managers/codex-token-manager.ts
22
22
  import { promises as fs } from "fs";
@@ -232,7 +232,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
232
232
  const data = await response.json();
233
233
  await this.applyCredentialsResponse(data);
234
234
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
235
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-7TFROVY7.js");
235
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-I3TNYGKC.js");
236
236
  await restartCodexAspHostIfRunning2();
237
237
  }
238
238
  if (data.scope) {
@@ -3312,6 +3312,11 @@ var SENTRY_ABILITY = {
3312
3312
  referenceFile: { name: "SENTRY.md", content: REFERENCE11 }
3313
3313
  };
3314
3314
 
3315
+ // ../shared/src/slack-response-style.ts
3316
+ var SLACK_CONCISE_REPLY_SHAPE = "one to three plain sentences on what you did and what it means, with no headers, bullet lists, command logs, or step-by-step narration";
3317
+ var SLACK_BLOCK_KIT_GUIDANCE = "Use Block Kit whenever structure or a link would make the message faster to scan or use. You have broad leeway to combine supported display elements: `section` and `fields` for compact updates; `context` for secondary metadata; `header` and `divider` for genuinely distinct sections; images for useful previews; and `actions` with URL buttons for pull requests, dashboards, downloads, or next steps. Consult the [Slack Block Kit reference](https://docs.slack.dev/reference/block-kit/blocks) for exact schemas before using an unfamiliar block. Do not add selects, date pickers, approval buttons, or other controls that require an interaction callback. Keep simple replies as plain text, do not add decorative UI or repeat content across blocks, and always keep `text` as a concise, complete fallback for notifications and accessibility.";
3318
+ var SLACK_PR_BUTTON_GUIDANCE = 'The first time you share a given pull request or merge request link in a thread \u2014 the message announcing you opened it \u2014 attach a button for it: send `blocks` alongside `text` \u2014 a `section` block holding your message as `mrkdwn`, then an `actions` block with one element per newly shared link, `{"type": "button", "style": "primary", "text": {"type": "plain_text", "text": "View PR"}, "url": "<pr url>", "action_id": "view_pr"}`. Later messages about a pull request you already linked in this thread keep the link in the sentence and get no button, and never re-post a button for a link someone already has. Label it "View MR" for GitLab, and if there are several give each button a unique `action_id` and name its repository in the label ("View PR \xB7 web"). Always keep `text` populated with the same message \u2014 Slack uses it for notifications and fallback \u2014 and keep the link in the sentence too.';
3319
+
3315
3320
  // ../shared/src/default-skills/replicas-agent/abilities/slack.ts
3316
3321
  var SECTION12 = `### Slack
3317
3322
  Send messages, read threads, search conversations, and transfer files through the workspace-scoped TypeScript SDK.
@@ -3359,6 +3364,10 @@ await Bun.write('/tmp/recording.mov', response);
3359
3364
 
3360
3365
  ## Send and attach a message
3361
3366
 
3367
+ Write like a teammate, not a report. Lead with the outcome, remove repetition and filler, and preserve the facts needed to understand the result, blocker, or next action. A routine update is ${SLACK_CONCISE_REPLY_SHAPE}.
3368
+
3369
+ ${SLACK_BLOCK_KIT_GUIDANCE}
3370
+
3362
3371
  \`\`\`ts
3363
3372
  const message = await replicas.slack.call<{ channel: string; ts: string }>('chat.postMessage', {
3364
3373
  channel: 'C0123ABC',
@@ -3367,26 +3376,7 @@ const message = await replicas.slack.call<{ channel: string; ts: string }>('chat
3367
3376
  await replicas.slack.attachThread({ channel: message.channel, threadTs: message.ts });
3368
3377
  \`\`\`
3369
3378
 
3370
- A link in the message text stays plain text, so the message that first shares a pull request or merge request link passes \`blocks\` alongside \`text\` to render a button for it. Keep \`text\` set to the same message \u2014 Slack uses it for notifications and fallback.
3371
-
3372
- \`\`\`ts
3373
- await replicas.slack.call('chat.postMessage', {
3374
- channel: 'C0123ABC',
3375
- thread_ts: '1234567890.123456',
3376
- text: summary,
3377
- blocks: [
3378
- { type: 'section', text: { type: 'mrkdwn', text: summary } },
3379
- {
3380
- type: 'actions',
3381
- elements: [
3382
- { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'View PR' }, url: prUrl, action_id: 'view_pr' },
3383
- ],
3384
- },
3385
- ],
3386
- });
3387
- \`\`\`
3388
-
3389
- Only the announcing message gets the button \u2014 follow-ups about a pull request already linked in the thread keep the link in the text and drop the \`blocks\`. Use "View MR" for GitLab. With several links, give each button a unique \`action_id\` and name its repository in the label ("View PR \xB7 web").
3379
+ ${SLACK_PR_BUTTON_GUIDANCE}
3390
3380
 
3391
3381
  For screenshots, recordings, diagrams, or other media, read \`references/MEDIA.md\` before posting. It is the single source of truth for uploading the Replicas copy and the raw file to Slack; a dashboard link in \`text\` is not an inline attachment.
3392
3382
 
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-YSUQDUHX.js";
18
+ } from "./chunk-N2J2OQAM.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -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-YSUQDUHX.js";
7
+ } from "./chunk-N2J2OQAM.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.788";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.789";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -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-65OJBHL5.js";
7
- import "./chunk-YRK3AKS5.js";
6
+ } from "./chunk-5VWPIDAT.js";
7
+ import "./chunk-PUCWTNBF.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-YSUQDUHX.js";
11
+ import "./chunk-N2J2OQAM.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-65OJBHL5.js";
6
+ } from "./chunk-5VWPIDAT.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-F7EM7PIH.js";
10
- import "./chunk-YRK3AKS5.js";
9
+ } from "./chunk-2DPLS32P.js";
10
+ import "./chunk-PUCWTNBF.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-YSUQDUHX.js";
12
+ import "./chunk-N2J2OQAM.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-LCK6ZT5V.js";
11
+ } from "./chunk-RTI7OXYX.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-YSUQDUHX.js";
16
+ } from "./chunk-N2J2OQAM.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-65OJBHL5.js";
94
+ } from "./chunk-5VWPIDAT.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -124,20 +124,20 @@ import {
124
124
  recordCredentialFallback,
125
125
  recordExhaustedCredential,
126
126
  restartCodexAspHost
127
- } from "./chunk-MVZP26JI.js";
127
+ } from "./chunk-AMU3NUHT.js";
128
128
  import {
129
129
  ENGINE_ENV,
130
130
  IS_WARMING_MODE,
131
131
  monolithRequest,
132
132
  monolithService,
133
133
  setAgentCredentialSnapshot
134
- } from "./chunk-YRK3AKS5.js";
134
+ } from "./chunk-PUCWTNBF.js";
135
135
  import {
136
136
  AspClient,
137
137
  SUBPROCESS_MAX_BUFFER,
138
138
  execAsync,
139
139
  execFileAsync
140
- } from "./chunk-LCK6ZT5V.js";
140
+ } from "./chunk-RTI7OXYX.js";
141
141
  import {
142
142
  isRecord as isRecord2
143
143
  } from "./chunk-UZSNFLDQ.js";
@@ -338,7 +338,7 @@ import {
338
338
  spawnRelaySubagentRequestSchema,
339
339
  stripAgentDiagnosticErrors,
340
340
  withTimeout
341
- } from "./chunk-YSUQDUHX.js";
341
+ } from "./chunk-N2J2OQAM.js";
342
342
  import {
343
343
  __commonJS,
344
344
  __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-F7EM7PIH.js";
6
+ } from "./chunk-2DPLS32P.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-YSUQDUHX.js";
10
+ import "./chunk-N2J2OQAM.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/post-tool-pr-hook.ts
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  messageRelaySubagentRequestSchema,
6
6
  spawnRelaySubagentRequestSchema
7
- } from "./chunk-YSUQDUHX.js";
7
+ } from "./chunk-N2J2OQAM.js";
8
8
  import "./chunk-VEQXQN22.js";
9
9
 
10
10
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.788",
3
+ "version": "0.1.789",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",