@overaihq/cli 0.13.6 → 0.13.7

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.js CHANGED
@@ -27517,7 +27517,7 @@ var runAutomation = async (args) => {
27517
27517
  // src/workspace/validateElements.ts
27518
27518
  var findings = (parsed) => parsed.success ? [] : parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`);
27519
27519
  var validateAutomationElements = async (elements) => {
27520
- const { automationNodesSchema } = await import("./types-QDEUVRZP.js");
27520
+ const { automationNodesSchema } = await import("./types-M4YAYTNG.js");
27521
27521
  return findings(automationNodesSchema.safeParse(elements));
27522
27522
  };
27523
27523
  var validateWebPageConfig = async (config) => {
@@ -34117,6 +34117,10 @@ var lintDiagnosticSchema = external_exports.object({
34117
34117
  var lintRequestSchema = external_exports.object({
34118
34118
  code: external_exports.string(),
34119
34119
  surface: lintSurfaceSchema,
34120
+ // See PageLintContext. Client-supplied like the rest of the request —
34121
+ // advisory, so nothing is trusted from it. Ignored off the webPage surface.
34122
+ pageRuntime: external_exports.enum(["v1", "v2"]).optional(),
34123
+ flipCheck: external_exports.boolean().optional(),
34120
34124
  // The workspace the code is being authored in. Used to (a) authorize the
34121
34125
  // caller as a builder in that workspace and (b) resolve its real resources so
34122
34126
  // env id references are type-narrowed. A user token carries no workspace, so
@@ -35039,6 +35043,147 @@ var runKnowledgeBase = async (args) => {
35039
35043
  );
35040
35044
  };
35041
35045
 
35046
+ // ../common/src/random/index.ts
35047
+ var UNMISTAKABLE_CHARS = "0123456789abcdefghjkmnpqrstvwxyz";
35048
+ var nanoid2 = customAlphabet(UNMISTAKABLE_CHARS, 12);
35049
+ var MFA_SECRET_CHARS = "234567ABCDEFGHIJKLMNOPQRSTUVWXYZ";
35050
+ var generateMfaSecret = customAlphabet(MFA_SECRET_CHARS, 32);
35051
+ var VALID_VARIABLE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_";
35052
+ var generateRandomVariableName = customAlphabet(
35053
+ VALID_VARIABLE_CHARS,
35054
+ 12
35055
+ );
35056
+
35057
+ // ../common/src/ids.ts
35058
+ var ID_PREFIXES = {
35059
+ action_runner: { prefix: "ar", body: 10 },
35060
+ action_runner_email_alert: { prefix: "area", body: 10 },
35061
+ action_runner_email_subscription: { prefix: "ares", body: 10 },
35062
+ action_runner_token: { prefix: "art", body: 10 },
35063
+ admin_chat_view_log: { prefix: "acvl", body: 16 },
35064
+ agent: { prefix: "agt", body: 10 },
35065
+ agent_conversation: { prefix: "agcv", body: 20 },
35066
+ agent_message: { prefix: "agmsg", body: 20 },
35067
+ architect_chat: {
35068
+ prefix: "ac",
35069
+ body: 12,
35070
+ legacy: [{ prefix: "cc", body: 12 }]
35071
+ },
35072
+ architect_chat_feedback: { prefix: "acf", body: 20 },
35073
+ architect_chat_message: {
35074
+ prefix: "acm",
35075
+ body: 16,
35076
+ legacy: [{ prefix: "ccm", body: 16 }]
35077
+ },
35078
+ architect_chat_message_part: { prefix: "acmp", body: 16 },
35079
+ architect_mcp_connection: { prefix: "amc", body: 10 },
35080
+ automatic_top_up_attempt: { prefix: "atp", body: 12 },
35081
+ automation: { prefix: "at", body: 10 },
35082
+ automation_email_address: { prefix: "aea", body: 10 },
35083
+ automation_email_alert: { prefix: "aes", body: 10 },
35084
+ automation_error_alert_queue: { prefix: "aeaq", body: 10 },
35085
+ browser_automation: { prefix: "bra", body: 10 },
35086
+ browser_automation_run: { prefix: "brr", body: 20 },
35087
+ browser_session_usage: { prefix: "bsu", body: 12 },
35088
+ chat_execution: { prefix: "chx", body: 20 },
35089
+ chat_tool_invocation: { prefix: "cti", body: 20 },
35090
+ cli_auth_request: { prefix: "cac", body: 32 },
35091
+ data_file: { prefix: "df", body: 10 },
35092
+ data_stream: { prefix: "ds", body: 10 },
35093
+ file_bucket: { prefix: "fb", body: 10 },
35094
+ file_bucket_entry: { prefix: "fbe", body: 16 },
35095
+ file_bucket_file_version: { prefix: "fbv", body: 20 },
35096
+ file_bucket_sftp_access: { prefix: "fba", body: 16 },
35097
+ file_bucket_sftp_key: { prefix: "fbk", body: 16 },
35098
+ file_bucket_share_link: { prefix: "fsl", body: 16 },
35099
+ file_bucket_upload_request: { prefix: "fbu", body: 16 },
35100
+ function: { prefix: "fn", body: 10 },
35101
+ function_execution: { prefix: "fex", body: 20 },
35102
+ game_score: { prefix: "gsc", body: 16 },
35103
+ identity_architect_memory: { prefix: "iam", body: 10 },
35104
+ identity_invite_token: { prefix: "iit", body: 10 },
35105
+ integration: { prefix: "in", body: 10 },
35106
+ integration_email_alert: { prefix: "iea", body: 10 },
35107
+ integration_email_subscription: { prefix: "ies", body: 10 },
35108
+ knowledge_base: { prefix: "kb", body: 10 },
35109
+ knowledge_base_chunk: { prefix: "kbc", body: 20 },
35110
+ knowledge_base_document: { prefix: "kbd", body: 20 },
35111
+ mailbox: { prefix: "mbx", body: 10 },
35112
+ mailbox_address: { prefix: "mba", body: 10 },
35113
+ mailbox_message: { prefix: "mbm", body: 10 },
35114
+ organization_usage_credit: { prefix: "crd", body: 12 },
35115
+ organization_usage_transaction: { prefix: "utx", body: 12 },
35116
+ page: { prefix: "pg", body: 10 },
35117
+ personal_access_token: { prefix: "pat", body: 10 },
35118
+ plaid_connection: { prefix: "plc", body: 12 },
35119
+ printable_page: { prefix: "pp", body: 10 },
35120
+ resource_group: { prefix: "rgp", body: 10 },
35121
+ saml_config: { prefix: "slc", body: 10 },
35122
+ saml_group_mapping: { prefix: "sgm", body: 10 },
35123
+ saml_session: { prefix: "sls", body: 10 },
35124
+ siem_event_outbox: { prefix: "seo", body: 10 },
35125
+ // Shared `stc` with storage_transcription until 2026-09; its old rows keep it.
35126
+ snaptrade_connection: {
35127
+ prefix: "snc",
35128
+ body: 12,
35129
+ legacy: [{ prefix: "stc", body: 12 }]
35130
+ },
35131
+ snaptrade_user: { prefix: "stu", body: 12 },
35132
+ storage_transcription: { prefix: "stc", body: 10 },
35133
+ storage_vision_conversion: {
35134
+ prefix: "svc",
35135
+ body: 20,
35136
+ legacy: [{ prefix: "svc", body: 10 }]
35137
+ },
35138
+ table_space: { prefix: "tbs", body: 10 },
35139
+ table_space_credential: { prefix: "tbsc", body: 10 },
35140
+ table_space_duplication_job: { prefix: "tsdj", body: 10 },
35141
+ table_space_query_execution: { prefix: "tbsq", body: 10 },
35142
+ web_page: { prefix: "wp", body: 10 },
35143
+ web_page_error: {
35144
+ prefix: "wpe",
35145
+ body: 20,
35146
+ legacy: [{ prefix: "wpe", body: 10 }]
35147
+ },
35148
+ web_page_log: { prefix: "wpl", body: 20 },
35149
+ web_page_view: {
35150
+ prefix: "wpv",
35151
+ body: 20,
35152
+ legacy: [{ prefix: "wpv", body: 10 }]
35153
+ },
35154
+ workspace: { prefix: "ws", body: 10 },
35155
+ workspace_architect_memory: { prefix: "wam", body: 10 },
35156
+ workspace_duplication_job: { prefix: "wdj", body: 10 },
35157
+ workspace_invite_token: { prefix: "wit", body: 10 },
35158
+ workspace_resource_share: { prefix: "wrs", body: 10 }
35159
+ };
35160
+ var shapesOf = (table) => {
35161
+ const spec = ID_PREFIXES[table];
35162
+ return [spec, ...spec.legacy ?? []];
35163
+ };
35164
+ var isIdOf = (table, id) => {
35165
+ if (typeof id !== "string") return false;
35166
+ const lower = id.toLowerCase();
35167
+ return shapesOf(table).some(
35168
+ ({ prefix, body }) => lower.length === prefix.length + body && lower.startsWith(prefix) && /^[a-z0-9_-]+$/.test(lower.slice(prefix.length))
35169
+ );
35170
+ };
35171
+ var idTable = (id) => Object.keys(ID_PREFIXES).find((table) => isIdOf(table, id)) ?? null;
35172
+ var idTableByPrefix = (id) => {
35173
+ const exact = idTable(id);
35174
+ if (exact) return exact;
35175
+ const lower = id.toLowerCase();
35176
+ let best = null;
35177
+ for (const table of Object.keys(ID_PREFIXES)) {
35178
+ for (const { prefix } of shapesOf(table)) {
35179
+ if (lower.startsWith(prefix) && prefix.length > (best?.length ?? 0)) {
35180
+ best = { table, length: prefix.length };
35181
+ }
35182
+ }
35183
+ }
35184
+ return best?.table ?? null;
35185
+ };
35186
+
35042
35187
  // src/commands/open.ts
35043
35188
  var ROUTE_BY_TYPE = {
35044
35189
  automation: "automations",
@@ -35047,20 +35192,20 @@ var ROUTE_BY_TYPE = {
35047
35192
  printablePage: "printable-pages",
35048
35193
  agent: "agents"
35049
35194
  };
35050
- var ROUTE_BY_PREFIX = [
35051
- ["WS", "workspaces"],
35052
- ["WP", "web-pages"],
35053
- ["PP", "printable-pages"],
35054
- ["FN", "functions"],
35055
- ["AT", "automations"],
35056
- ["TBS", "table-spaces"],
35057
- ["DF", "data-files"],
35058
- ["AGT", "agents"],
35059
- ["IN", "integrations"],
35060
- ["DS", "data-streams"],
35061
- ["AR", "action-runners"],
35062
- ["PG", "pages"]
35063
- ];
35195
+ var ROUTE_BY_TABLE = {
35196
+ workspace: "workspaces",
35197
+ web_page: "web-pages",
35198
+ printable_page: "printable-pages",
35199
+ function: "functions",
35200
+ automation: "automations",
35201
+ table_space: "table-spaces",
35202
+ data_file: "data-files",
35203
+ agent: "agents",
35204
+ integration: "integrations",
35205
+ data_stream: "data-streams",
35206
+ action_runner: "action-runners",
35207
+ page: "pages"
35208
+ };
35064
35209
  var runOpen = async (args) => {
35065
35210
  const filter2 = args.find((a) => !a.startsWith("-"));
35066
35211
  const { organizationId } = await getAccessToken();
@@ -35089,15 +35234,14 @@ var runOpen = async (args) => {
35089
35234
  "Not inside a cloned workspace \u2014 pass a resource id (WP..., FN..., WS..., AT...)."
35090
35235
  );
35091
35236
  }
35092
- const prefixed = ROUTE_BY_PREFIX.find(
35093
- ([prefix]) => filter2.startsWith(prefix)
35094
- );
35095
- if (prefixed == null) {
35237
+ const table = idTableByPrefix(filter2);
35238
+ const route = table == null ? void 0 : ROUTE_BY_TABLE[table];
35239
+ if (route == null) {
35096
35240
  throw new Error(
35097
35241
  `Nothing matched "${filter2}" (not a tracked resource or a recognized id prefix).`
35098
35242
  );
35099
35243
  }
35100
- return `${appBaseUrl(apiBaseUrl())}/${organizationId}/${prefixed[1]}/${filter2}`;
35244
+ return `${appBaseUrl(apiBaseUrl())}/${organizationId}/${route}/${filter2}`;
35101
35245
  })();
35102
35246
  process.stdout.write(`${url}
35103
35247
  `);
@@ -35725,23 +35869,26 @@ var runReport = async (args) => {
35725
35869
 
35726
35870
  // src/commands/resource.ts
35727
35871
  var resources = {
35728
- WS: { collection: "workspaces", mutation: "updateWorkspace", result: "workspace", patch: "WorkspacePatch", fields: "id name description isArchived", editable: ["name", "description", "isArchived"] },
35729
- AT: { collection: "automations", mutation: "updateAutomation", result: "automation", patch: "AutomationPatch", fields: "id name description isArchived isActive workspaceId", editable: ["name", "description", "isArchived", "isActive"] },
35730
- FN: { collection: "functions", mutation: "updateFunction", result: "function", patch: "FunctionPatch", fields: "id name description isArchived isEnabled workspaceId", editable: ["name", "description", "isArchived", "isEnabled"] },
35731
- WP: { collection: "webPages", mutation: "updateWebPage", result: "webPage", patch: "WebPagePatch", fields: "id name isArchived workspaceId", editable: ["name", "isArchived"] },
35732
- PP: { collection: "printablePages", mutation: "updatePrintablePage", result: "printablePage", patch: "PrintablePagePatch", fields: "id name isArchived workspaceId", editable: ["name", "isArchived"] },
35733
- AGT: { collection: "agents", mutation: "updateAgent", result: "agent", patch: "AgentPatch", fields: "id name description isArchived isEnabled workspaceId", editable: ["name", "description", "isArchived", "isEnabled"] },
35734
- IN: { collection: "integrations", mutation: "updateIntegration", result: "integration", patch: "IntegrationPatch", fields: "id name description isArchived integrationTypeId workspaceId", editable: ["name", "description", "isArchived", "integrationTypeId"] },
35735
- TBS: { collection: "tableSpaces", mutation: "updateTableSpace", result: "tableSpace", patch: "TableSpacePatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35736
- DS: { collection: "dataStreams", mutation: "updateDataStream", result: "dataStream", patch: "DataStreamPatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35737
- KB: { collection: "knowledgeBases", mutation: "updateKnowledgeBase", result: "knowledgeBase", patch: "KnowledgeBasePatch", fields: "id name description isArchived embeddingModel workspaceId", editable: ["name", "description", "isArchived"] },
35738
- DF: { collection: "dataFiles", mutation: "updateDataFile", result: "dataFile", patch: "DataFilePatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35739
- AR: { collection: "actionRunners", mutation: "updateActionRunner", result: "actionRunner", patch: "ActionRunnerPatch", fields: "id isArchived actionTimeoutSeconds config workspaceId identityId identity { name }", editable: ["isArchived", "actionTimeoutSeconds", "config"] }
35872
+ workspace: { collection: "workspaces", mutation: "updateWorkspace", result: "workspace", patch: "WorkspacePatch", fields: "id name description isArchived", editable: ["name", "description", "isArchived"] },
35873
+ automation: { collection: "automations", mutation: "updateAutomation", result: "automation", patch: "AutomationPatch", fields: "id name description isArchived isActive workspaceId", editable: ["name", "description", "isArchived", "isActive"] },
35874
+ function: { collection: "functions", mutation: "updateFunction", result: "function", patch: "FunctionPatch", fields: "id name description isArchived isEnabled workspaceId", editable: ["name", "description", "isArchived", "isEnabled"] },
35875
+ web_page: { collection: "webPages", mutation: "updateWebPage", result: "webPage", patch: "WebPagePatch", fields: "id name isArchived workspaceId", editable: ["name", "isArchived"] },
35876
+ printable_page: { collection: "printablePages", mutation: "updatePrintablePage", result: "printablePage", patch: "PrintablePagePatch", fields: "id name isArchived workspaceId", editable: ["name", "isArchived"] },
35877
+ agent: { collection: "agents", mutation: "updateAgent", result: "agent", patch: "AgentPatch", fields: "id name description isArchived isEnabled workspaceId", editable: ["name", "description", "isArchived", "isEnabled"] },
35878
+ integration: { collection: "integrations", mutation: "updateIntegration", result: "integration", patch: "IntegrationPatch", fields: "id name description isArchived integrationTypeId workspaceId", editable: ["name", "description", "isArchived", "integrationTypeId"] },
35879
+ table_space: { collection: "tableSpaces", mutation: "updateTableSpace", result: "tableSpace", patch: "TableSpacePatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35880
+ data_stream: { collection: "dataStreams", mutation: "updateDataStream", result: "dataStream", patch: "DataStreamPatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35881
+ knowledge_base: { collection: "knowledgeBases", mutation: "updateKnowledgeBase", result: "knowledgeBase", patch: "KnowledgeBasePatch", fields: "id name description isArchived embeddingModel workspaceId", editable: ["name", "description", "isArchived"] },
35882
+ data_file: { collection: "dataFiles", mutation: "updateDataFile", result: "dataFile", patch: "DataFilePatch", fields: "id name description isArchived workspaceId", editable: ["name", "description", "isArchived"] },
35883
+ action_runner: { collection: "actionRunners", mutation: "updateActionRunner", result: "actionRunner", patch: "ActionRunnerPatch", fields: "id isArchived actionTimeoutSeconds config workspaceId identityId identity { name }", editable: ["isArchived", "actionTimeoutSeconds", "config"] }
35884
+ // Keyed by table so `idTableByPrefix` can index it; `satisfies` rejects a key
35885
+ // the registry does not know.
35740
35886
  };
35741
35887
  var resourceFor = (id) => {
35742
- const entry = Object.entries(resources).find(([prefix]) => id.startsWith(prefix));
35743
- if (entry == null) throw new Error(`Unsupported resource id: ${id}`);
35744
- return entry[1];
35888
+ const table = idTableByPrefix(id);
35889
+ const resource = table == null ? void 0 : resources[table];
35890
+ if (resource == null) throw new Error(`Unsupported resource id: ${id}`);
35891
+ return resource;
35745
35892
  };
35746
35893
  var readResource = async (id, resource) => {
35747
35894
  const data = await gqlRequest(
@@ -35798,7 +35945,7 @@ var runResource = async (args) => {
35798
35945
  }
35799
35946
  }
35800
35947
  const name2 = flagValue(args, "--name");
35801
- if (name2 != null && id.startsWith("AR")) {
35948
+ if (name2 != null && idTableByPrefix(id) === "action_runner") {
35802
35949
  const current = await readResource(id, resource);
35803
35950
  const result = await gqlRequest(
35804
35951
  `mutation CliRenameRunner($id: String!, $name: String!) {
@@ -35816,7 +35963,7 @@ var runResource = async (args) => {
35816
35963
  { id, patch }
35817
35964
  );
35818
35965
  if (result[resource.mutation]?.updated == null) throw new Error(`Resource ${id} was not updated; check that it exists and your workspace role allows editing.`);
35819
- } else if (!(name2 != null && id.startsWith("AR"))) {
35966
+ } else if (!(name2 != null && idTableByPrefix(id) === "action_runner")) {
35820
35967
  throw new Error(`No supported changes supplied for ${id}.`);
35821
35968
  }
35822
35969
  printResult(await readResource(id, resource), resolveFormat(flagValue(args, "-o", "--output")));
@@ -35872,7 +36019,9 @@ characters in the middle while preserving their ends), env.STORAGE.text
35872
36019
  without AI; \`{ vision: true }\` uses AI to represent PDFs or images as text and
35873
36020
  is required for images), env.STORAGE.csv (one Excel worksheet selected by name
35874
36021
  or zero-based index), env.STORAGE.image (PNG representation of a raster image,
35875
- SVG, or single-page PDF),
36022
+ SVG, or single-page PDF), env.STORAGE.transcribe (AI transcription of a stored
36023
+ audio file; optional ISO-639-1 language like "en"; the same backend is also
36024
+ reachable as env.AI.speechToText),
35876
36025
  env.AI.generateText/generateObject,
35877
36026
  env.GRAPHQL.request().
35878
36027
 
@@ -40,6 +40,7 @@ var ServiceEnum = /* @__PURE__ */ ((ServiceEnum2) => {
40
40
  ServiceEnum2["OracleCloud"] = "ORACLE_CLOUD";
41
41
  ServiceEnum2["OracleDatabase"] = "ORACLE_DATABASE";
42
42
  ServiceEnum2["Plaid"] = "PLAID";
43
+ ServiceEnum2["Quickbooks"] = "QUICKBOOKS";
43
44
  ServiceEnum2["Redis"] = "REDIS";
44
45
  ServiceEnum2["Sftp"] = "SFTP";
45
46
  ServiceEnum2["Snaptrade"] = "SNAPTRADE";
@@ -277,6 +278,7 @@ var NodeEnum = /* @__PURE__ */ ((NodeEnum2) => {
277
278
  NodeEnum2["qualysGetQidsFromCves"] = "QUALYS_GET_QIDS_FROM_CVES";
278
279
  NodeEnum2["queryDataStream"] = "QUERY_DATA_STREAM";
279
280
  NodeEnum2["queryForItems"] = "QUERY_FOR_ITEMS";
281
+ NodeEnum2["quickbooksAction"] = "QUICKBOOKS_ACTION";
280
282
  NodeEnum2["rapidSevenAction"] = "RAPID_SEVEN_ACTION";
281
283
  NodeEnum2["readFilesFromLocalFolder"] = "READ_FILES_FROM_LOCAL_FOLDER";
282
284
  NodeEnum2["readFoldersFromLocalFolder"] = "READ_FOLDERS_FROM_LOCAL_FOLDER";
@@ -320,6 +322,7 @@ var NodeEnum = /* @__PURE__ */ ((NodeEnum2) => {
320
322
  NodeEnum2["sharePointUpdateFileProperties"] = "SHARE_POINT_UPDATE_FILE_PROPERTIES";
321
323
  NodeEnum2["sharePointUploadFile"] = "SHARE_POINT_UPLOAD_FILE";
322
324
  NodeEnum2["sharepointV2Action"] = "SHAREPOINT_V2_ACTION";
325
+ NodeEnum2["sharepointV2RestAction"] = "SHAREPOINT_V2_REST_ACTION";
323
326
  NodeEnum2["sharepointV2CreatePermission"] = "SHAREPOINT_V2_CREATE_PERMISSION";
324
327
  NodeEnum2["sharepointV2DeletePermission"] = "SHAREPOINT_V2_DELETE_PERMISSION";
325
328
  NodeEnum2["sharepointV2GetFile"] = "SHAREPOINT_V2_GET_FILE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overaihq/cli",
3
- "version": "0.13.6",
3
+ "version": "0.13.7",
4
4
  "description": "Create, edit, deploy, and run OverAI workspace resources from the command line",
5
5
  "type": "module",
6
6
  "homepage": "https://overai.com",