replicas-engine 0.1.425 → 0.1.427
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.
- package/dist/src/index.js +44 -4
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -504,7 +504,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
504
504
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
505
505
|
|
|
506
506
|
// ../shared/src/e2b.ts
|
|
507
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-
|
|
507
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-11-v2";
|
|
508
508
|
|
|
509
509
|
// ../shared/src/runtime-env.ts
|
|
510
510
|
function shellQuotePosix(value) {
|
|
@@ -2037,6 +2037,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
2037
2037
|
| \`replicas automation ...\` | Manage automations (cron + GitHub/GitLab event triggers) |
|
|
2038
2038
|
| \`replicas preview ...\` | Register / list preview URLs (covered in \`PREVIEWS.md\`) |
|
|
2039
2039
|
| \`replicas media ...\` | Upload screenshots, videos, audio (covered in \`MEDIA.md\`) |
|
|
2040
|
+
| \`replicas slack thread ...\` | Attach or switch Slack thread routing (covered in \`SLACK.md\`) |
|
|
2040
2041
|
|
|
2041
2042
|
\`replicas <command> --help\` is always the source of truth for flags.
|
|
2042
2043
|
|
|
@@ -2270,6 +2271,30 @@ curl -s -X POST "https://slack.com/api/chat.postMessage" \\
|
|
|
2270
2271
|
|
|
2271
2272
|
Omit \`thread_ts\` to post a new message to the channel. Include it to reply in a thread.
|
|
2272
2273
|
|
|
2274
|
+
#### Attach every new conversation
|
|
2275
|
+
|
|
2276
|
+
Whenever you send a Slack message outside the thread that already routes to the current workspace, immediately attach the destination thread so future replies are delivered to this workspace:
|
|
2277
|
+
|
|
2278
|
+
\`\`\`bash
|
|
2279
|
+
replicas slack thread attach --channel <channel-id> --thread-ts <thread-root-ts>
|
|
2280
|
+
\`\`\`
|
|
2281
|
+
|
|
2282
|
+
- For a new top-level message or DM, use the \`channel\` and \`ts\` from the successful \`chat.postMessage\` response. That message's \`ts\` is the new thread root.
|
|
2283
|
+
- For a reply in another existing thread, use its root \`thread_ts\`, not the reply's \`ts\`.
|
|
2284
|
+
- Do not attach the originating thread again when it already routes to the current workspace.
|
|
2285
|
+
- Treat sending and attaching as one operation: check that both API calls succeed, and report an attachment failure instead of implying future replies will reach you.
|
|
2286
|
+
|
|
2287
|
+
#### Switch a thread to an existing workspace
|
|
2288
|
+
|
|
2289
|
+
When the user wants a Slack thread to continue in a particular existing workspace, resolve the target and switch the thread:
|
|
2290
|
+
|
|
2291
|
+
\`\`\`bash
|
|
2292
|
+
replicas list
|
|
2293
|
+
replicas slack thread switch <workspace-id-or-name> --channel <channel-id> --thread-ts <thread-root-ts>
|
|
2294
|
+
\`\`\`
|
|
2295
|
+
|
|
2296
|
+
The channel and thread flags default to \`SLACK_CHANNEL_ID\` and \`SLACK_THREAD_TS\` for a Slack-triggered workspace. Workspace-authenticated agents may target only their current workspace; switching to a different workspace requires running the command with user authentication outside agent mode. If that restriction applies, give the user the exact command to run rather than claiming the switch succeeded.
|
|
2297
|
+
|
|
2273
2298
|
### Searching Messages
|
|
2274
2299
|
|
|
2275
2300
|
\`\`\`bash
|
|
@@ -8412,7 +8437,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
8412
8437
|
var MIN_CODEX_CLI_VERSION = "0.144.0";
|
|
8413
8438
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
8414
8439
|
var codexCliVersionEnsured = null;
|
|
8415
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
8440
|
+
var ENGINE_PACKAGE_VERSION = "0.1.427";
|
|
8416
8441
|
var INITIALIZE_METHOD = "initialize";
|
|
8417
8442
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
8418
8443
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -9326,9 +9351,10 @@ async function readCodexAspThreadHistory(threadId) {
|
|
|
9326
9351
|
entries = await readdir4(CODEX_HISTORY_DIR, { withFileTypes: true });
|
|
9327
9352
|
} catch (error) {
|
|
9328
9353
|
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
|
|
9329
|
-
|
|
9354
|
+
entries = [];
|
|
9355
|
+
} else {
|
|
9356
|
+
throw error;
|
|
9330
9357
|
}
|
|
9331
|
-
throw error;
|
|
9332
9358
|
}
|
|
9333
9359
|
for (const entry of entries) {
|
|
9334
9360
|
if (!entry.isFile() || !entry.name.endsWith(".jsonl")) continue;
|
|
@@ -9343,6 +9369,20 @@ async function readCodexAspThreadHistory(threadId) {
|
|
|
9343
9369
|
};
|
|
9344
9370
|
}
|
|
9345
9371
|
}
|
|
9372
|
+
try {
|
|
9373
|
+
const host = await getCodexAspHost();
|
|
9374
|
+
const response = await host.client.request(
|
|
9375
|
+
THREAD_READ_METHOD,
|
|
9376
|
+
{ threadId, includeTurns: true }
|
|
9377
|
+
);
|
|
9378
|
+
return {
|
|
9379
|
+
thread_id: threadId,
|
|
9380
|
+
events: [],
|
|
9381
|
+
codexAspTranscript: threadToAspTranscript(response.thread),
|
|
9382
|
+
goal: null
|
|
9383
|
+
};
|
|
9384
|
+
} catch {
|
|
9385
|
+
}
|
|
9346
9386
|
throw new CodexThreadNotFoundError(threadId);
|
|
9347
9387
|
}
|
|
9348
9388
|
function skillToSlashCommand(skill) {
|