replicas-cli 0.2.554 → 0.2.556

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 (2) hide show
  1. package/dist/index.cjs +12 -5
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22786,6 +22786,7 @@ var WEB_APP_PATHS = {
22786
22786
  automations: `${HOME_PATH}/automations`,
22787
22787
  environment: `${HOME_PATH}/environment`,
22788
22788
  analytics: `${HOME_PATH}/analytics`,
22789
+ memory: `${HOME_PATH}/memory`,
22789
22790
  dashboard: DASHBOARD_PATH,
22790
22791
  agents: `${DASHBOARD_PATH}/agents`,
22791
22792
  integrations: `${DASHBOARD_PATH}/integrations`,
@@ -24411,7 +24412,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
24411
24412
  });
24412
24413
 
24413
24414
  // ../shared/src/cli-version.ts
24414
- var CLI_VERSION = "0.2.554";
24415
+ var CLI_VERSION = "0.2.556";
24415
24416
 
24416
24417
  // ../shared/src/version.ts
24417
24418
  function compareVersions(v1, v2) {
@@ -26058,7 +26059,11 @@ function parseClaudeEvents(events, parentToolUseId) {
26058
26059
  const assistantTextCounts = /* @__PURE__ */ new Map();
26059
26060
  const acceptedUserMessageIndexes = /* @__PURE__ */ new Set();
26060
26061
  const canonicalUserMessageIndexes = /* @__PURE__ */ new Set();
26061
- const findMatchingUserMessageIndex = (indexes, content, timestamp) => {
26062
+ const findMatchingUserMessageIndex = (indexes, content, timestamp, messageId) => {
26063
+ if (typeof messageId === "string") {
26064
+ const byId = messages.findIndex((message) => message.type === "user" && message.id === messageId);
26065
+ if (byId !== -1) return byId;
26066
+ }
26062
26067
  return [...indexes].find((index) => {
26063
26068
  const message = messages[index];
26064
26069
  return message?.type === "user" && areUserMessagesWithinMatchWindow(message, { content, timestamp });
@@ -26076,7 +26081,7 @@ function parseClaudeEvents(events, parentToolUseId) {
26076
26081
  const images = userMessageImages(event.payload.images);
26077
26082
  if (content || images) {
26078
26083
  const messageId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
26079
- const canonicalIndex = findMatchingUserMessageIndex(canonicalUserMessageIndexes, content, event.timestamp);
26084
+ const canonicalIndex = findMatchingUserMessageIndex(canonicalUserMessageIndexes, content, event.timestamp, messageId);
26080
26085
  const canonical = canonicalIndex === void 0 ? void 0 : messages[canonicalIndex];
26081
26086
  const message = {
26082
26087
  id: typeof messageId === "string" ? messageId : `user-${event.timestamp}`,
@@ -26151,14 +26156,16 @@ function parseClaudeEvents(events, parentToolUseId) {
26151
26156
  };
26152
26157
  }).filter((img) => img.data);
26153
26158
  if (textContent || images.length > 0) {
26159
+ const stampedId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
26154
26160
  const acceptedIndex = findMatchingUserMessageIndex(
26155
26161
  acceptedUserMessageIndexes,
26156
26162
  textContent,
26157
- event.timestamp
26163
+ event.timestamp,
26164
+ stampedId
26158
26165
  );
26159
26166
  const accepted = acceptedIndex === void 0 ? void 0 : messages[acceptedIndex];
26160
26167
  const message = {
26161
- id: accepted?.id ?? `user-${event.timestamp}`,
26168
+ id: accepted?.id ?? (typeof stampedId === "string" ? stampedId : `user-${event.timestamp}`),
26162
26169
  type: "user",
26163
26170
  content: textContent || (images.length > 0 ? `[${images.length} image${images.length > 1 ? "s" : ""} attached]` : ""),
26164
26171
  images: images.length > 0 ? images : accepted?.type === "user" ? accepted.images : void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.554",
3
+ "version": "0.2.556",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {