replicas-cli 0.2.562 → 0.2.564
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/index.cjs +52 -34
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23807,6 +23807,7 @@ Use this when:
|
|
|
23807
23807
|
- The user asks to discover which external services are connected
|
|
23808
23808
|
- The user asks to create or control an E2B sandbox
|
|
23809
23809
|
- The user asks to invoke a connected Modal function
|
|
23810
|
+
- The user asks to access Vercel projects, deployments, domains, logs, or infrastructure
|
|
23810
23811
|
- The user asks to query or update a connected turbopuffer namespace
|
|
23811
23812
|
- The user asks for PlanetScale organizations, databases, branches, or Insights data
|
|
23812
23813
|
- The user asks to analyze text with Pangram`;
|
|
@@ -23874,6 +23875,17 @@ const databases = await replicas.planetscale.request('/organizations/acme/databa
|
|
|
23874
23875
|
|
|
23875
23876
|
OAuth scopes control permitted operations. Confirm mutations before using POST, PUT, PATCH, or DELETE.
|
|
23876
23877
|
|
|
23878
|
+
## Vercel
|
|
23879
|
+
|
|
23880
|
+
Vercel is a native access-token integration. Pass a relative path from the Vercel REST API, including a \`teamId\` query parameter for team-owned resources:
|
|
23881
|
+
|
|
23882
|
+
\`\`\`ts
|
|
23883
|
+
const projects = await replicas.vercel.request('/v9/projects?teamId=team_123');
|
|
23884
|
+
const deployments = await replicas.vercel.request('/v6/deployments?teamId=team_123');
|
|
23885
|
+
\`\`\`
|
|
23886
|
+
|
|
23887
|
+
Confirm mutations before using POST, PUT, PATCH, or DELETE.
|
|
23888
|
+
|
|
23877
23889
|
## Modal
|
|
23878
23890
|
|
|
23879
23891
|
Modal is a native integration and uses its official JavaScript SDK behind the Replicas gateway. Invoke a deployed function by name:
|
|
@@ -24431,7 +24443,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
24431
24443
|
});
|
|
24432
24444
|
|
|
24433
24445
|
// ../shared/src/cli-version.ts
|
|
24434
|
-
var CLI_VERSION = "0.2.
|
|
24446
|
+
var CLI_VERSION = "0.2.564";
|
|
24435
24447
|
|
|
24436
24448
|
// ../shared/src/version.ts
|
|
24437
24449
|
function compareVersions(v1, v2) {
|
|
@@ -24662,7 +24674,7 @@ var EXPLICIT_PLUGIN_CATALOG = [
|
|
|
24662
24674
|
},
|
|
24663
24675
|
{
|
|
24664
24676
|
id: "vercel",
|
|
24665
|
-
backend: "
|
|
24677
|
+
backend: "native",
|
|
24666
24678
|
toolkit: "vercel",
|
|
24667
24679
|
authType: "api_key",
|
|
24668
24680
|
category: "data",
|
|
@@ -24753,6 +24765,7 @@ var HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
|
|
|
24753
24765
|
["xero", "xero", "OAUTH2", false, "business", "Xero"],
|
|
24754
24766
|
["brex", "brex", "API_KEY", false, "business", "Brex"],
|
|
24755
24767
|
["buffer", "buffer", "OAUTH2", false, "business", "Buffer"],
|
|
24768
|
+
["docusign", "docusign", "OAUTH2", false, "business", "DocuSign"],
|
|
24756
24769
|
["canva", "canva", "OAUTH2", true, "productivity", "Canva"],
|
|
24757
24770
|
["webflow", "webflow", "API_KEY", false, "business", "Webflow"],
|
|
24758
24771
|
["firecrawl", "firecrawl", "API_KEY", false, "data", "Firecrawl"],
|
|
@@ -25074,6 +25087,24 @@ function normalizeBackgroundTaskStatus(status) {
|
|
|
25074
25087
|
// ../shared/src/display-message/constants.ts
|
|
25075
25088
|
var USER_MESSAGE_MATCH_GRACE_PERIOD_MS = 3e4;
|
|
25076
25089
|
|
|
25090
|
+
// ../shared/src/user-message-matching.ts
|
|
25091
|
+
function parseTimestampMs(timestamp) {
|
|
25092
|
+
const value = Date.parse(timestamp);
|
|
25093
|
+
return Number.isFinite(value) ? value : 0;
|
|
25094
|
+
}
|
|
25095
|
+
function areUserMessagesWithinMatchWindow(a, b) {
|
|
25096
|
+
return a.content === b.content && Math.abs(parseTimestampMs(a.timestamp) - parseTimestampMs(b.timestamp)) <= USER_MESSAGE_MATCH_GRACE_PERIOD_MS;
|
|
25097
|
+
}
|
|
25098
|
+
|
|
25099
|
+
// ../shared/src/agent-event-utils.ts
|
|
25100
|
+
function getUserMessage(event) {
|
|
25101
|
+
return event.type === "event_msg" && event.payload.type === "user_message" && typeof event.payload.message === "string" ? event.payload.message : null;
|
|
25102
|
+
}
|
|
25103
|
+
function getUserMessageId(event) {
|
|
25104
|
+
const messageId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
25105
|
+
return typeof messageId === "string" ? messageId : null;
|
|
25106
|
+
}
|
|
25107
|
+
|
|
25077
25108
|
// ../shared/src/json.ts
|
|
25078
25109
|
function safeJsonParse(str, fallback) {
|
|
25079
25110
|
try {
|
|
@@ -25154,6 +25185,12 @@ function createCallDisplayMessage(message) {
|
|
|
25154
25185
|
timestamp: message.timestamp
|
|
25155
25186
|
};
|
|
25156
25187
|
}
|
|
25188
|
+
function insertDisplayMessageByTimestamp(messages, message) {
|
|
25189
|
+
const messageMs = parseTimestampMs(message.timestamp);
|
|
25190
|
+
let index = messages.length;
|
|
25191
|
+
while (index > 0 && parseTimestampMs(messages[index - 1].timestamp) > messageMs) index--;
|
|
25192
|
+
messages.splice(index, 0, message);
|
|
25193
|
+
}
|
|
25157
25194
|
|
|
25158
25195
|
// ../shared/src/display-message/format.ts
|
|
25159
25196
|
function unquoteShellArg(value) {
|
|
@@ -25221,24 +25258,6 @@ function skillNamesFromCommand(command) {
|
|
|
25221
25258
|
})));
|
|
25222
25259
|
}
|
|
25223
25260
|
|
|
25224
|
-
// ../shared/src/user-message-matching.ts
|
|
25225
|
-
function parseTimestampMs(timestamp) {
|
|
25226
|
-
const value = Date.parse(timestamp);
|
|
25227
|
-
return Number.isFinite(value) ? value : 0;
|
|
25228
|
-
}
|
|
25229
|
-
function areUserMessagesWithinMatchWindow(a, b) {
|
|
25230
|
-
return a.content === b.content && Math.abs(parseTimestampMs(a.timestamp) - parseTimestampMs(b.timestamp)) <= USER_MESSAGE_MATCH_GRACE_PERIOD_MS;
|
|
25231
|
-
}
|
|
25232
|
-
|
|
25233
|
-
// ../shared/src/agent-event-utils.ts
|
|
25234
|
-
function getUserMessage(event) {
|
|
25235
|
-
return event.type === "event_msg" && event.payload.type === "user_message" && typeof event.payload.message === "string" ? event.payload.message : null;
|
|
25236
|
-
}
|
|
25237
|
-
function getUserMessageId(event) {
|
|
25238
|
-
const messageId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
25239
|
-
return typeof messageId === "string" ? messageId : null;
|
|
25240
|
-
}
|
|
25241
|
-
|
|
25242
25261
|
// ../shared/src/display-message/parsers/codex-parser.ts
|
|
25243
25262
|
function getStatusFromExitCode(exitCode) {
|
|
25244
25263
|
return exitCode === 0 ? "completed" : "failed";
|
|
@@ -27022,6 +27041,7 @@ function duplicateBucketKey(message, bucketOffset = 0) {
|
|
|
27022
27041
|
}
|
|
27023
27042
|
function mergeCodexAspDisplayMessages(primary, supplemental) {
|
|
27024
27043
|
const merged = [...primary];
|
|
27044
|
+
const primaryCount = primary.length;
|
|
27025
27045
|
const firstIndexById = /* @__PURE__ */ new Map();
|
|
27026
27046
|
const indexesByDuplicateBucket = /* @__PURE__ */ new Map();
|
|
27027
27047
|
const indexMessage = (message, index) => {
|
|
@@ -27058,14 +27078,18 @@ function mergeCodexAspDisplayMessages(primary, supplemental) {
|
|
|
27058
27078
|
unindexMessage(merged[duplicateIndex], duplicateIndex);
|
|
27059
27079
|
merged[duplicateIndex] = {
|
|
27060
27080
|
...merged[duplicateIndex],
|
|
27061
|
-
id: message.id
|
|
27062
|
-
timestamp: message.timestamp
|
|
27081
|
+
id: message.id
|
|
27063
27082
|
};
|
|
27064
27083
|
firstIndexById.set(message.id, duplicateIndex);
|
|
27065
27084
|
indexMessage(merged[duplicateIndex], duplicateIndex);
|
|
27066
27085
|
}
|
|
27067
27086
|
}
|
|
27068
|
-
|
|
27087
|
+
const ordered = merged.slice(0, primaryCount);
|
|
27088
|
+
const supplementalOnly = merged.slice(primaryCount).map((message, index) => ({ message, index })).sort((a, b) => parseTimestampMs(a.message.timestamp) - parseTimestampMs(b.message.timestamp) || a.index - b.index);
|
|
27089
|
+
for (const { message } of supplementalOnly) {
|
|
27090
|
+
insertDisplayMessageByTimestamp(ordered, message);
|
|
27091
|
+
}
|
|
27092
|
+
return ordered;
|
|
27069
27093
|
}
|
|
27070
27094
|
function parseCodexAspTranscript(transcript) {
|
|
27071
27095
|
const messages = [];
|
|
@@ -27151,24 +27175,18 @@ function parseDisplayMessages(events, agentType, codexAspTranscript, options = {
|
|
|
27151
27175
|
const shouldFilter = options.filter ?? true;
|
|
27152
27176
|
const parsedEvents = agentType === "claude" || agentType === "relay" ? parseClaudeEvents(events, options.parentToolUseId) : parseAgentEvents(events, agentType);
|
|
27153
27177
|
const legacyMessages = shouldFilter ? filterDisplayMessages(parsedEvents, agentType) : parsedEvents;
|
|
27154
|
-
const
|
|
27178
|
+
const applySyntheticNotices = (messages) => shouldFilter ? applyAuthFallbackNotices(applyInterruptions(messages, events), events) : messages;
|
|
27155
27179
|
if (agentType !== "codex" || !codexAspTranscript) {
|
|
27156
|
-
return
|
|
27180
|
+
return applySyntheticNotices(legacyMessages);
|
|
27157
27181
|
}
|
|
27158
27182
|
const nativeCodexMessages = shouldFilter ? filterDisplayMessages(parseCodexAspTranscript(codexAspTranscript), agentType) : parseCodexAspTranscript(codexAspTranscript);
|
|
27159
|
-
return
|
|
27160
|
-
}
|
|
27161
|
-
function insertByTimestamp(messages, message) {
|
|
27162
|
-
const messageMs = parseTimestampMs(message.timestamp);
|
|
27163
|
-
let index = messages.length;
|
|
27164
|
-
while (index > 0 && parseTimestampMs(messages[index - 1].timestamp) > messageMs) index--;
|
|
27165
|
-
messages.splice(index, 0, message);
|
|
27183
|
+
return applySyntheticNotices(mergeCodexAspDisplayMessages(nativeCodexMessages, legacyMessages));
|
|
27166
27184
|
}
|
|
27167
27185
|
function applyInterruptions(messages, events) {
|
|
27168
27186
|
const result = [...messages];
|
|
27169
27187
|
for (const event of events) {
|
|
27170
27188
|
if (event.type !== CHAT_INTERRUPTED_EVENT_TYPE) continue;
|
|
27171
|
-
|
|
27189
|
+
insertDisplayMessageByTimestamp(result, {
|
|
27172
27190
|
id: `interruption-${event.timestamp}`,
|
|
27173
27191
|
type: "interruption",
|
|
27174
27192
|
timestamp: event.timestamp
|
|
@@ -27215,7 +27233,7 @@ function applyAuthFallbackNotices(messages, events) {
|
|
|
27215
27233
|
});
|
|
27216
27234
|
if (notices.length === 0) return messages;
|
|
27217
27235
|
const result = [...messages];
|
|
27218
|
-
for (const notice of notices)
|
|
27236
|
+
for (const notice of notices) insertDisplayMessageByTimestamp(result, notice);
|
|
27219
27237
|
return result;
|
|
27220
27238
|
}
|
|
27221
27239
|
function isCodexInitializationPrompt(message) {
|