replicas-cli 0.2.478 → 0.2.479
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.mjs +43 -43
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8755,9 +8755,9 @@ The integration is configured at the org or user level by the Replicas admin. Fr
|
|
|
8755
8755
|
Quick check that the integration is connected:
|
|
8756
8756
|
|
|
8757
8757
|
\`\`\`bash
|
|
8758
|
-
curl -s -X GET "$
|
|
8758
|
+
curl -s -X GET "$REPLICAS_MONOLITH_URL/v1/gdrive/credentials" \\
|
|
8759
8759
|
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
8760
|
-
-H "X-Workspace-Id: $
|
|
8760
|
+
-H "X-Workspace-Id: $REPLICAS_WORKSPACE_ID"
|
|
8761
8761
|
\`\`\`
|
|
8762
8762
|
|
|
8763
8763
|
- If \`hasCredentials\` is \`true\`: you're good to go.
|
|
@@ -8767,13 +8767,13 @@ Standard auth headers used by every call below:
|
|
|
8767
8767
|
|
|
8768
8768
|
\`\`\`
|
|
8769
8769
|
Authorization: Bearer $REPLICAS_ENGINE_SECRET
|
|
8770
|
-
X-Workspace-Id: $
|
|
8770
|
+
X-Workspace-Id: $REPLICAS_WORKSPACE_ID
|
|
8771
8771
|
\`\`\`
|
|
8772
8772
|
|
|
8773
8773
|
For brevity the examples below use a shell variable:
|
|
8774
8774
|
|
|
8775
8775
|
\`\`\`bash
|
|
8776
|
-
GDRIVE_AUTH=(-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" -H "X-Workspace-Id: $
|
|
8776
|
+
GDRIVE_AUTH=(-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" -H "X-Workspace-Id: $REPLICAS_WORKSPACE_ID")
|
|
8777
8777
|
\`\`\`
|
|
8778
8778
|
|
|
8779
8779
|
## Important constraint: drive.file scope
|
|
@@ -8791,7 +8791,7 @@ If the user asks you to edit an existing doc that Replicas didn't create, tell t
|
|
|
8791
8791
|
### Create a new doc
|
|
8792
8792
|
|
|
8793
8793
|
\`\`\`bash
|
|
8794
|
-
curl -s -X POST "$
|
|
8794
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/docs" "\${GDRIVE_AUTH[@]}" \\
|
|
8795
8795
|
-H "Content-Type: application/json" \\
|
|
8796
8796
|
-d '{"title":"Meeting notes 2026-05-14"}'
|
|
8797
8797
|
\`\`\`
|
|
@@ -8801,7 +8801,7 @@ Returns the full Doc object; grab \`.documentId\` for follow-up calls.
|
|
|
8801
8801
|
### Read a doc
|
|
8802
8802
|
|
|
8803
8803
|
\`\`\`bash
|
|
8804
|
-
curl -s "$
|
|
8804
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/docs/$DOC_ID" "\${GDRIVE_AUTH[@]}"
|
|
8805
8805
|
\`\`\`
|
|
8806
8806
|
|
|
8807
8807
|
Returns the full document structure \u2014 \`body.content\` is an ordered list of structural elements (paragraphs, tables, etc.) with character indexes you can target for edits.
|
|
@@ -8811,7 +8811,7 @@ Returns the full document structure \u2014 \`body.content\` is an ordered list o
|
|
|
8811
8811
|
The Docs API edits use a list of [structural requests](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request). Insert text, then style it; or insert tables, images, page breaks, etc.
|
|
8812
8812
|
|
|
8813
8813
|
\`\`\`bash
|
|
8814
|
-
curl -s -X POST "$
|
|
8814
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/docs/$DOC_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
8815
8815
|
-H "Content-Type: application/json" \\
|
|
8816
8816
|
-d '{
|
|
8817
8817
|
"requests": [
|
|
@@ -8838,7 +8838,7 @@ Edits are verbose but powerful. Prefer batching many requests into a single \`ba
|
|
|
8838
8838
|
### Create a new spreadsheet
|
|
8839
8839
|
|
|
8840
8840
|
\`\`\`bash
|
|
8841
|
-
curl -s -X POST "$
|
|
8841
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/sheets" "\${GDRIVE_AUTH[@]}" \\
|
|
8842
8842
|
-H "Content-Type: application/json" \\
|
|
8843
8843
|
-d '{"title":"Q2 metrics"}'
|
|
8844
8844
|
\`\`\`
|
|
@@ -8849,7 +8849,7 @@ Returns the full Spreadsheet object; grab \`.spreadsheetId\`.
|
|
|
8849
8849
|
|
|
8850
8850
|
\`\`\`bash
|
|
8851
8851
|
# Range is in A1 notation, e.g. "Sheet1!A1:C10"
|
|
8852
|
-
curl -s "$
|
|
8852
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/values/$(printf %s 'Sheet1!A1:C10' | jq -sRr @uri)" \\
|
|
8853
8853
|
"\${GDRIVE_AUTH[@]}"
|
|
8854
8854
|
\`\`\`
|
|
8855
8855
|
|
|
@@ -8857,7 +8857,7 @@ curl -s "$MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/values/$(printf %s 'Sheet1!A1:
|
|
|
8857
8857
|
|
|
8858
8858
|
\`\`\`bash
|
|
8859
8859
|
curl -s -X PUT \\
|
|
8860
|
-
"$
|
|
8860
|
+
"$REPLICAS_MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/values/$(printf %s 'Sheet1!A1:B2' | jq -sRr @uri)?valueInputOption=USER_ENTERED" \\
|
|
8861
8861
|
"\${GDRIVE_AUTH[@]}" \\
|
|
8862
8862
|
-H "Content-Type: application/json" \\
|
|
8863
8863
|
-d '{
|
|
@@ -8875,7 +8875,7 @@ curl -s -X PUT \\
|
|
|
8875
8875
|
### Bulk operations (formatting, charts, new tabs, etc.)
|
|
8876
8876
|
|
|
8877
8877
|
\`\`\`bash
|
|
8878
|
-
curl -s -X POST "$
|
|
8878
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
8879
8879
|
-H "Content-Type: application/json" \\
|
|
8880
8880
|
-d '{ "requests": [ { "addSheet": { "properties": { "title": "Raw data" } } } ] }'
|
|
8881
8881
|
\`\`\`
|
|
@@ -8887,7 +8887,7 @@ curl -s -X POST "$MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/batchUpdate" "\${GDRIV
|
|
|
8887
8887
|
### Create a new form
|
|
8888
8888
|
|
|
8889
8889
|
\`\`\`bash
|
|
8890
|
-
curl -s -X POST "$
|
|
8890
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/forms" "\${GDRIVE_AUTH[@]}" \\
|
|
8891
8891
|
-H "Content-Type: application/json" \\
|
|
8892
8892
|
-d '{"title":"Customer feedback"}'
|
|
8893
8893
|
\`\`\`
|
|
@@ -8899,7 +8899,7 @@ Returns the form. Grab \`.formId\`.
|
|
|
8899
8899
|
The Forms API uses its own \`batchUpdate\`:
|
|
8900
8900
|
|
|
8901
8901
|
\`\`\`bash
|
|
8902
|
-
curl -s -X POST "$
|
|
8902
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/forms/$FORM_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
8903
8903
|
-H "Content-Type: application/json" \\
|
|
8904
8904
|
-d '{
|
|
8905
8905
|
"requests": [
|
|
@@ -8926,7 +8926,7 @@ See the [Forms API Request reference](https://developers.google.com/workspace/fo
|
|
|
8926
8926
|
### Read responses
|
|
8927
8927
|
|
|
8928
8928
|
\`\`\`bash
|
|
8929
|
-
curl -s "$
|
|
8929
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/forms/$FORM_ID/responses" "\${GDRIVE_AUTH[@]}"
|
|
8930
8930
|
\`\`\`
|
|
8931
8931
|
|
|
8932
8932
|
Pagination: pass \`?pageToken=...&pageSize=...\` to walk through responses.
|
|
@@ -8936,7 +8936,7 @@ Pagination: pass \`?pageToken=...&pageSize=...\` to walk through responses.
|
|
|
8936
8936
|
### Share a file with a person
|
|
8937
8937
|
|
|
8938
8938
|
\`\`\`bash
|
|
8939
|
-
curl -s -X POST "$
|
|
8939
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}" \\
|
|
8940
8940
|
-H "Content-Type: application/json" \\
|
|
8941
8941
|
-d '{
|
|
8942
8942
|
"type": "user",
|
|
@@ -8951,7 +8951,7 @@ Roles: \`reader\`, \`commenter\`, \`writer\`. Types: \`user\`, \`group\`, \`doma
|
|
|
8951
8951
|
### Make a file viewable by anyone with the link
|
|
8952
8952
|
|
|
8953
8953
|
\`\`\`bash
|
|
8954
|
-
curl -s -X POST "$
|
|
8954
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}" \\
|
|
8955
8955
|
-H "Content-Type: application/json" \\
|
|
8956
8956
|
-d '{ "type": "anyone", "role": "reader" }'
|
|
8957
8957
|
\`\`\`
|
|
@@ -8959,13 +8959,13 @@ curl -s -X POST "$MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_
|
|
|
8959
8959
|
### List existing permissions
|
|
8960
8960
|
|
|
8961
8961
|
\`\`\`bash
|
|
8962
|
-
curl -s "$
|
|
8962
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}"
|
|
8963
8963
|
\`\`\`
|
|
8964
8964
|
|
|
8965
8965
|
### Rename / move a file
|
|
8966
8966
|
|
|
8967
8967
|
\`\`\`bash
|
|
8968
|
-
curl -s -X PATCH "$
|
|
8968
|
+
curl -s -X PATCH "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID" "\${GDRIVE_AUTH[@]}" \\
|
|
8969
8969
|
-H "Content-Type: application/json" \\
|
|
8970
8970
|
-d '{"name":"Final report.docx"}'
|
|
8971
8971
|
\`\`\`
|
|
@@ -8975,7 +8975,7 @@ To move into a folder, also pass \`addParents\` and \`removeParents\` as query p
|
|
|
8975
8975
|
### Get file metadata
|
|
8976
8976
|
|
|
8977
8977
|
\`\`\`bash
|
|
8978
|
-
curl -s "$
|
|
8978
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID?fields=id,name,mimeType,webViewLink,parents,modifiedTime" \\
|
|
8979
8979
|
"\${GDRIVE_AUTH[@]}"
|
|
8980
8980
|
\`\`\`
|
|
8981
8981
|
|
|
@@ -8984,13 +8984,13 @@ curl -s "$MONOLITH_URL/v1/gdrive/files/$FILE_ID?fields=id,name,mimeType,webViewL
|
|
|
8984
8984
|
### Delete a file
|
|
8985
8985
|
|
|
8986
8986
|
\`\`\`bash
|
|
8987
|
-
curl -s -X DELETE "$
|
|
8987
|
+
curl -s -X DELETE "$REPLICAS_MONOLITH_URL/v1/gdrive/files/$FILE_ID" "\${GDRIVE_AUTH[@]}"
|
|
8988
8988
|
\`\`\`
|
|
8989
8989
|
|
|
8990
8990
|
### List Replicas-created files
|
|
8991
8991
|
|
|
8992
8992
|
\`\`\`bash
|
|
8993
|
-
curl -s "$
|
|
8993
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/files?pageSize=50" "\${GDRIVE_AUTH[@]}"
|
|
8994
8994
|
\`\`\`
|
|
8995
8995
|
|
|
8996
8996
|
Pass \`?q=...\` to filter using [Drive API search syntax](https://developers.google.com/workspace/drive/api/guides/search-files). Only files the app created or was granted access to will appear.
|
|
@@ -9004,20 +9004,20 @@ Property identifiers must be URL-encoded as query parameters. URL-prefix propert
|
|
|
9004
9004
|
### List accessible properties
|
|
9005
9005
|
|
|
9006
9006
|
\`\`\`bash
|
|
9007
|
-
curl -s "$
|
|
9007
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/search-console/sites" "\${GDRIVE_AUTH[@]}"
|
|
9008
9008
|
\`\`\`
|
|
9009
9009
|
|
|
9010
9010
|
### Get a property
|
|
9011
9011
|
|
|
9012
9012
|
\`\`\`bash
|
|
9013
9013
|
SITE_URL=$(printf %s 'sc-domain:example.com' | jq -sRr @uri)
|
|
9014
|
-
curl -s "$
|
|
9014
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/search-console/site?siteUrl=$SITE_URL" "\${GDRIVE_AUTH[@]}"
|
|
9015
9015
|
\`\`\`
|
|
9016
9016
|
|
|
9017
9017
|
### Query search performance
|
|
9018
9018
|
|
|
9019
9019
|
\`\`\`bash
|
|
9020
|
-
curl -s -X POST "$
|
|
9020
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/search-console/search-analytics/query?siteUrl=$SITE_URL" "\${GDRIVE_AUTH[@]}" \\
|
|
9021
9021
|
-H "Content-Type: application/json" \\
|
|
9022
9022
|
-d '{
|
|
9023
9023
|
"startDate": "2026-06-01",
|
|
@@ -9032,7 +9032,7 @@ Results contain clicks, impressions, CTR, and average position. Use \`startRow\`
|
|
|
9032
9032
|
### List sitemaps
|
|
9033
9033
|
|
|
9034
9034
|
\`\`\`bash
|
|
9035
|
-
curl -s "$
|
|
9035
|
+
curl -s "$REPLICAS_MONOLITH_URL/v1/gdrive/search-console/sitemaps?siteUrl=$SITE_URL" "\${GDRIVE_AUTH[@]}"
|
|
9036
9036
|
\`\`\`
|
|
9037
9037
|
|
|
9038
9038
|
Pass a URL-encoded \`sitemapIndex\` query parameter to list sitemaps referenced by a sitemap index. To fetch one sitemap, call \`/v1/gdrive/search-console/sitemap\` with URL-encoded \`siteUrl\` and \`feedpath\` query parameters.
|
|
@@ -9040,7 +9040,7 @@ Pass a URL-encoded \`sitemapIndex\` query parameter to list sitemaps referenced
|
|
|
9040
9040
|
### Inspect an indexed URL
|
|
9041
9041
|
|
|
9042
9042
|
\`\`\`bash
|
|
9043
|
-
curl -s -X POST "$
|
|
9043
|
+
curl -s -X POST "$REPLICAS_MONOLITH_URL/v1/gdrive/search-console/url-inspection" "\${GDRIVE_AUTH[@]}" \\
|
|
9044
9044
|
-H "Content-Type: application/json" \\
|
|
9045
9045
|
-d '{
|
|
9046
9046
|
"inspectionUrl": "https://example.com/page",
|
|
@@ -9111,7 +9111,7 @@ This guide covers how to interact with Linear from within your Replicas workspac
|
|
|
9111
9111
|
Check that the workspace has the Replicas engine credentials needed to proxy Linear requests:
|
|
9112
9112
|
|
|
9113
9113
|
\`\`\`bash
|
|
9114
|
-
test -n "$
|
|
9114
|
+
test -n "$REPLICAS_MONOLITH_URL" && test -n "$REPLICAS_ENGINE_SECRET" && test -n "$REPLICAS_WORKSPACE_ID" && echo set
|
|
9115
9115
|
\`\`\`
|
|
9116
9116
|
|
|
9117
9117
|
- If **set**: Use the Replicas Linear proxy below. It refreshes Linear OAuth tokens for you.
|
|
@@ -9120,9 +9120,9 @@ test -n "$MONOLITH_URL" && test -n "$REPLICAS_ENGINE_SECRET" && test -n "$WORKSP
|
|
|
9120
9120
|
Then verify Linear is connected:
|
|
9121
9121
|
|
|
9122
9122
|
\`\`\`bash
|
|
9123
|
-
curl -fsS -X POST "$
|
|
9123
|
+
curl -fsS -X POST "$REPLICAS_MONOLITH_URL/v1/engine/linear/refresh-token" \\
|
|
9124
9124
|
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
9125
|
-
-H "X-Workspace-Id: $
|
|
9125
|
+
-H "X-Workspace-Id: $REPLICAS_WORKSPACE_ID" \\
|
|
9126
9126
|
-H "Content-Type: application/json" \\
|
|
9127
9127
|
-d '{}' >/dev/null
|
|
9128
9128
|
\`\`\`
|
|
@@ -9135,9 +9135,9 @@ Linear uses a GraphQL API. Always call it through Replicas so the access token s
|
|
|
9135
9135
|
|
|
9136
9136
|
\`\`\`bash
|
|
9137
9137
|
linear_graphql() {
|
|
9138
|
-
curl -sS -X POST "$
|
|
9138
|
+
curl -sS -X POST "$REPLICAS_MONOLITH_URL/v1/engine/linear/graphql" \\
|
|
9139
9139
|
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
9140
|
-
-H "X-Workspace-Id: $
|
|
9140
|
+
-H "X-Workspace-Id: $REPLICAS_WORKSPACE_ID" \\
|
|
9141
9141
|
-H "Content-Type: application/json" \\
|
|
9142
9142
|
--data-binary @-
|
|
9143
9143
|
}
|
|
@@ -9374,9 +9374,9 @@ ISSUE_UUID=... # the Linear issue's UUID
|
|
|
9374
9374
|
MEDIA_ID=... # the media ID printed by \`replicas media upload\`
|
|
9375
9375
|
|
|
9376
9376
|
linear_graphql() {
|
|
9377
|
-
curl -sS -X POST "$
|
|
9377
|
+
curl -sS -X POST "$REPLICAS_MONOLITH_URL/v1/engine/linear/graphql" \\
|
|
9378
9378
|
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
9379
|
-
-H "X-Workspace-Id: $
|
|
9379
|
+
-H "X-Workspace-Id: $REPLICAS_WORKSPACE_ID" \\
|
|
9380
9380
|
-H "Content-Type: application/json" \\
|
|
9381
9381
|
--data-binary @-
|
|
9382
9382
|
}
|
|
@@ -9407,7 +9407,7 @@ curl -s -X PUT "$UPLOAD_URL" \\
|
|
|
9407
9407
|
|
|
9408
9408
|
# 3. Reference assetUrl inline in the comment body, alongside the dashboard link.
|
|
9409
9409
|
BODY=$(printf '\\n\\n[View in Replicas](https://tryreplicas.com/workspaces/%s?media=%s)' \\
|
|
9410
|
-
"$ASSET_URL" "$
|
|
9410
|
+
"$ASSET_URL" "$REPLICAS_WORKSPACE_ID" "$MEDIA_ID")
|
|
9411
9411
|
|
|
9412
9412
|
jq -n \\
|
|
9413
9413
|
--arg issueId "$ISSUE_UUID" \\
|
|
@@ -9913,7 +9913,7 @@ replicas list
|
|
|
9913
9913
|
replicas slack thread switch <workspace-id-or-name> --channel <channel-id> --thread-ts <thread-root-ts>
|
|
9914
9914
|
\`\`\`
|
|
9915
9915
|
|
|
9916
|
-
The channel and thread flags default to \`
|
|
9916
|
+
The channel and thread flags default to \`REPLICAS_SLACK_CHANNEL_ID\` and \`REPLICAS_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.
|
|
9917
9917
|
|
|
9918
9918
|
### Searching Messages
|
|
9919
9919
|
|
|
@@ -10084,7 +10084,7 @@ function formatTurnElapsed(ms) {
|
|
|
10084
10084
|
}
|
|
10085
10085
|
|
|
10086
10086
|
// ../shared/src/cli-version.ts
|
|
10087
|
-
var CLI_VERSION = "0.2.
|
|
10087
|
+
var CLI_VERSION = "0.2.479";
|
|
10088
10088
|
|
|
10089
10089
|
// ../shared/src/version.ts
|
|
10090
10090
|
function compareVersions(v1, v2) {
|
|
@@ -27498,7 +27498,7 @@ async function readSseStream(body, onEvent, shouldContinue = () => true) {
|
|
|
27498
27498
|
}
|
|
27499
27499
|
|
|
27500
27500
|
// src/lib/monolith-url.ts
|
|
27501
|
-
var MONOLITH_URL = process.env.
|
|
27501
|
+
var MONOLITH_URL = process.env.REPLICAS_MONOLITH_URL || process.env.MONOLITH_URL || "https://api.tryreplicas.com";
|
|
27502
27502
|
|
|
27503
27503
|
// src/lib/api.ts
|
|
27504
27504
|
async function buildOrgAuthHeaders() {
|
|
@@ -30624,13 +30624,13 @@ async function mediaListCommand(options) {
|
|
|
30624
30624
|
// src/commands/slack.ts
|
|
30625
30625
|
import chalk19 from "chalk";
|
|
30626
30626
|
function getThreadOptions(options) {
|
|
30627
|
-
const channelId = options.channel || process.env.SLACK_CHANNEL_ID;
|
|
30628
|
-
const threadTs = options.threadTs || process.env.SLACK_THREAD_TS;
|
|
30627
|
+
const channelId = options.channel || process.env.REPLICAS_SLACK_CHANNEL_ID || process.env.SLACK_CHANNEL_ID;
|
|
30628
|
+
const threadTs = options.threadTs || process.env.REPLICAS_SLACK_THREAD_TS || process.env.SLACK_THREAD_TS;
|
|
30629
30629
|
if (!channelId) {
|
|
30630
|
-
throw new Error("--channel is required when
|
|
30630
|
+
throw new Error("--channel is required when REPLICAS_SLACK_CHANNEL_ID is not set");
|
|
30631
30631
|
}
|
|
30632
30632
|
if (!threadTs) {
|
|
30633
|
-
throw new Error("--thread-ts is required when
|
|
30633
|
+
throw new Error("--thread-ts is required when REPLICAS_SLACK_THREAD_TS is not set");
|
|
30634
30634
|
}
|
|
30635
30635
|
return { channelId, threadTs };
|
|
30636
30636
|
}
|
|
@@ -34797,7 +34797,7 @@ program.name("replicas").description("CLI for managing Replicas workspaces").ver
|
|
|
34797
34797
|
function registerSlackCommands(parent) {
|
|
34798
34798
|
const slack = parent.command("slack").description("Manage Slack thread routing");
|
|
34799
34799
|
const slackThread = slack.command("thread").description("Attach or switch the Slack thread that routes to a workspace");
|
|
34800
|
-
slackThread.command("attach").description("Attach the current Slack thread to this workspace").option("-c, --channel <channelId>", "Slack channel ID (defaults to
|
|
34800
|
+
slackThread.command("attach").description("Attach the current Slack thread to this workspace").option("-c, --channel <channelId>", "Slack channel ID (defaults to REPLICAS_SLACK_CHANNEL_ID)").option("-t, --thread-ts <threadTs>", "Slack thread timestamp (defaults to REPLICAS_SLACK_THREAD_TS)").action(async (options) => {
|
|
34801
34801
|
try {
|
|
34802
34802
|
await slackThreadAttachCommand(options);
|
|
34803
34803
|
} catch (error51) {
|
|
@@ -34809,7 +34809,7 @@ function registerSlackCommands(parent) {
|
|
|
34809
34809
|
process.exit(1);
|
|
34810
34810
|
}
|
|
34811
34811
|
});
|
|
34812
|
-
slackThread.command("switch <workspace>").description("Point the current Slack thread at another workspace ID or name").option("-c, --channel <channelId>", "Slack channel ID (defaults to
|
|
34812
|
+
slackThread.command("switch <workspace>").description("Point the current Slack thread at another workspace ID or name").option("-c, --channel <channelId>", "Slack channel ID (defaults to REPLICAS_SLACK_CHANNEL_ID)").option("-t, --thread-ts <threadTs>", "Slack thread timestamp (defaults to REPLICAS_SLACK_THREAD_TS)").action(async (workspace, options) => {
|
|
34813
34813
|
try {
|
|
34814
34814
|
await slackThreadSwitchCommand(workspace, options);
|
|
34815
34815
|
} catch (error51) {
|