@overaihq/cli 0.12.1 → 0.13.0
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.
|
@@ -370,12 +370,22 @@ var pageErrorPayloadSchema = external_exports.object({
|
|
|
370
370
|
message: external_exports.string(),
|
|
371
371
|
stack: external_exports.string().optional()
|
|
372
372
|
});
|
|
373
|
+
var screenshotResultPayloadSchema = external_exports.object({
|
|
374
|
+
requestId: external_exports.string(),
|
|
375
|
+
error: external_exports.string().optional(),
|
|
376
|
+
mediaType: external_exports.string().optional(),
|
|
377
|
+
data: external_exports.string().optional(),
|
|
378
|
+
width: external_exports.number().optional(),
|
|
379
|
+
height: external_exports.number().optional()
|
|
380
|
+
});
|
|
373
381
|
|
|
374
382
|
// ../common/src/webPage.ts
|
|
375
383
|
var webPageLanguage = ["react"];
|
|
376
384
|
var configFlag = external_exports.union([external_exports.boolean(), external_exports.string()]).nullish().transform((value) => value === true || value === "true").catch(false);
|
|
377
385
|
var webPageConfigSchema = external_exports.object({
|
|
378
386
|
language: external_exports.enum(["react"]).catch("react"),
|
|
387
|
+
/* Missing on legacy versions; invalid modes fail closed instead of granting workspace access. */
|
|
388
|
+
authorizationMode: external_exports.enum(["workspace", "viewer"]).default("workspace"),
|
|
379
389
|
customTitle: external_exports.string().nullish(),
|
|
380
390
|
code: external_exports.string().default(reactDefaultTemplate),
|
|
381
391
|
dataSourceUrl: external_exports.string().nullish(),
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
itemFilterExpressionRootSchema,
|
|
7
7
|
webPageConfigSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-56E4CWBE.js";
|
|
9
9
|
import {
|
|
10
10
|
external_exports
|
|
11
11
|
} from "./chunk-XCJJTK3H.js";
|
|
@@ -27083,7 +27083,7 @@ var validateAutomationElements = async (elements) => {
|
|
|
27083
27083
|
return findings(automationNodesSchema.safeParse(elements));
|
|
27084
27084
|
};
|
|
27085
27085
|
var validateWebPageConfig = async (config) => {
|
|
27086
|
-
const { webPageConfigWriteSchema } = await import("./webPage-
|
|
27086
|
+
const { webPageConfigWriteSchema } = await import("./webPage-4HUHD7FS.js");
|
|
27087
27087
|
return findings(webPageConfigWriteSchema.safeParse(config));
|
|
27088
27088
|
};
|
|
27089
27089
|
|
|
@@ -35077,14 +35077,50 @@ var runGraphql = async (args) => {
|
|
|
35077
35077
|
};
|
|
35078
35078
|
|
|
35079
35079
|
// src/commands/integration.ts
|
|
35080
|
+
var USAGE2 = "Usage: overai integration configure <id> --config <json|@file|@-> | integration config <id> | integration secret set <id> <KEY> --value <@file|@->";
|
|
35081
|
+
var setSecret = async (integrationId, key, rawValue) => {
|
|
35082
|
+
if (rawValue == null) {
|
|
35083
|
+
throw new Error("Integration secret set requires --value.");
|
|
35084
|
+
}
|
|
35085
|
+
if (!rawValue.startsWith("@")) {
|
|
35086
|
+
throw new Error(
|
|
35087
|
+
"--value must be @- (stdin) or @<file>, so the secret stays out of your shell history."
|
|
35088
|
+
);
|
|
35089
|
+
}
|
|
35090
|
+
const value = await readValue(rawValue, "--value");
|
|
35091
|
+
if (value == null || value === "") {
|
|
35092
|
+
throw new Error("--value resolved to an empty string.");
|
|
35093
|
+
}
|
|
35094
|
+
await gqlRequest(
|
|
35095
|
+
`mutation SetIntegrationSecret($input: UpdateIntegrationConfigInput!) {
|
|
35096
|
+
updateIntegrationConfig(input: $input) { success }
|
|
35097
|
+
}`,
|
|
35098
|
+
{ input: { integrationId, partialConfig: { [key]: value } } }
|
|
35099
|
+
);
|
|
35100
|
+
};
|
|
35080
35101
|
var runIntegration = async (args) => {
|
|
35081
|
-
const [operation
|
|
35102
|
+
const [operation] = args;
|
|
35103
|
+
if (operation === "secret") {
|
|
35104
|
+
const [, action, id2, key] = args;
|
|
35105
|
+
if (action !== "set" || id2 == null || key == null || key.startsWith("-")) {
|
|
35106
|
+
throw new Error(USAGE2);
|
|
35107
|
+
}
|
|
35108
|
+
await setSecret(id2, key, flagValue(args, "--value"));
|
|
35109
|
+
const result2 = await userTrpcMutation(
|
|
35110
|
+
"getMaskedIntegrationConfig",
|
|
35111
|
+
{ id: id2 }
|
|
35112
|
+
);
|
|
35113
|
+
printResult(result2, resolveFormat(flagValue(args, "-o", "--output")));
|
|
35114
|
+
return;
|
|
35115
|
+
}
|
|
35116
|
+
const [, id] = args;
|
|
35082
35117
|
if (id == null || operation !== "configure" && operation !== "config") {
|
|
35083
|
-
throw new Error(
|
|
35118
|
+
throw new Error(USAGE2);
|
|
35084
35119
|
}
|
|
35085
35120
|
if (operation === "configure") {
|
|
35086
35121
|
const raw2 = await readValue(flagValue(args, "--config"), "--config");
|
|
35087
|
-
if (raw2 == null)
|
|
35122
|
+
if (raw2 == null)
|
|
35123
|
+
throw new Error("Integration configure requires --config.");
|
|
35088
35124
|
const value = (() => {
|
|
35089
35125
|
try {
|
|
35090
35126
|
return JSON.parse(raw2);
|
|
@@ -35094,7 +35130,9 @@ var runIntegration = async (args) => {
|
|
|
35094
35130
|
})();
|
|
35095
35131
|
await userTrpcMutation("putIntegrationConfig", { id, value });
|
|
35096
35132
|
}
|
|
35097
|
-
const result = await userTrpcMutation("getMaskedIntegrationConfig", {
|
|
35133
|
+
const result = await userTrpcMutation("getMaskedIntegrationConfig", {
|
|
35134
|
+
id
|
|
35135
|
+
});
|
|
35098
35136
|
printResult(result, resolveFormat(flagValue(args, "-o", "--output")));
|
|
35099
35137
|
};
|
|
35100
35138
|
|
|
@@ -35589,11 +35627,13 @@ The env SDK is mostly shared across pages, functions, and automation code
|
|
|
35589
35627
|
nodes:
|
|
35590
35628
|
env.TBSxxx.sql\`...\` (postgres.js tagged template \u2014 interpolations are
|
|
35591
35629
|
auto-parameterized, never string-concatenate user input; each table space also
|
|
35592
|
-
gets a generated
|
|
35593
|
-
type \u2014 env.TBSxxx.sql<TBSxxx.Tables["users"]>\`...\` \u2014 for typed rows and
|
|
35630
|
+
gets a generated Env.TBSxxx.Tables interface, so annotate the row element
|
|
35631
|
+
type \u2014 env.TBSxxx.sql<Env.TBSxxx.Tables["users"]>\`...\` \u2014 for typed rows and
|
|
35594
35632
|
column autocomplete; joins/aggregates/projections take a hand-written type or
|
|
35595
35633
|
Pick<...>), env.FNxxx.call()
|
|
35596
|
-
(pass \`path\` to hit a sub-path of a function that routes internally
|
|
35634
|
+
(pass \`path\` to hit a sub-path of a function that routes internally; a
|
|
35635
|
+
function with declared schemas also gets Env.FNxxx.Input / Env.FNxxx.Output
|
|
35636
|
+
types for annotating payloads and results),
|
|
35597
35637
|
env.ATxxx.start(inputs?) (fire-and-forget), env.DFxxx.read.json()/.saveVersion(),
|
|
35598
35638
|
env.FBxxx.list()/read(entryId)/upload()/createFolder(),
|
|
35599
35639
|
env.STORAGE.fetch/upload/presign (upload shortens stored names over 128
|
|
@@ -35651,12 +35691,24 @@ A page version's config JSON carries the code; the CLI splits it into
|
|
|
35651
35691
|
language, customTitle, hideTopBar, ...). Push reassembles them.
|
|
35652
35692
|
|
|
35653
35693
|
- Web pages are React (TSX). Printable pages are React or Liquid.
|
|
35694
|
+
- Web page config authorizationMode defaults to "workspace" for shared access.
|
|
35695
|
+
Opt into "viewer" for personal pages spanning the signed-in viewer's workspaces.
|
|
35696
|
+
Page code uses their permissions; results/access errors can differ by user.
|
|
35697
|
+
Public links require sign-in. Save and deploy publishes the mode with the code.
|
|
35698
|
+
Called functions retain their own execution permissions.
|
|
35654
35699
|
- Web page code is concatenated with an SDK that already provides React and
|
|
35655
35700
|
its hooks, then appends the <App /> render call. Declare a plain
|
|
35656
35701
|
\`function App() { ... }\` \u2014 no \`export default\`, no
|
|
35657
35702
|
\`import ... from "react"\` (redeclaring hooks is a SyntaxError \u2192 blank
|
|
35658
35703
|
page). Imports must be https URLs (\`https://esm.sh/...\`) \u2014 the sandbox
|
|
35659
35704
|
cannot resolve bare or relative specifiers.
|
|
35705
|
+
- In a React page, HTML from somewhere else (an exported dashboard, a mockup,
|
|
35706
|
+
a page from another tool) gets rebuilt as native React, preserving the
|
|
35707
|
+
original styling closely. Don't load a foreign HTML file into a \`srcDoc\`
|
|
35708
|
+
iframe or inject it into the DOM: embedded HTML is opaque to the outline and
|
|
35709
|
+
patchable only by blind string replacement that silently no-ops when the
|
|
35710
|
+
source drifts. A Liquid printable page is the exception \u2014 Liquid is HTML
|
|
35711
|
+
templating, so imported markup becomes the template body directly.
|
|
35660
35712
|
- Pages run sandboxed in an iframe with the env SDK plus hooks: useCurrentUser,
|
|
35661
35713
|
useSearchParam, useTheme, useLLMText/Object/Chat, useAgentChat, useDataFile
|
|
35662
35714
|
(legacy \u2014 prefer env.DFxxx), navigateToPage, openPrintablePage.
|
|
@@ -36368,7 +36420,7 @@ var listWorkspaceUsers = async (args) => {
|
|
|
36368
36420
|
resolveFormat(flagValue(args, "-o", "--output"))
|
|
36369
36421
|
);
|
|
36370
36422
|
};
|
|
36371
|
-
var
|
|
36423
|
+
var USAGE3 = `Usage:
|
|
36372
36424
|
overai workspace list [--archived] [--limit <n>]
|
|
36373
36425
|
overai workspace show [workspaceId]
|
|
36374
36426
|
overai workspace users [workspaceId]
|
|
@@ -36386,7 +36438,7 @@ var runWorkspace = async (args) => {
|
|
|
36386
36438
|
await listWorkspaceUsers(args.slice(1));
|
|
36387
36439
|
return;
|
|
36388
36440
|
}
|
|
36389
|
-
process.stderr.write(
|
|
36441
|
+
process.stderr.write(USAGE3);
|
|
36390
36442
|
process.exitCode = 1;
|
|
36391
36443
|
};
|
|
36392
36444
|
|
|
@@ -36468,6 +36520,9 @@ Other resources:
|
|
|
36468
36520
|
overai knowledge-base search <id> <query> [--limit N]
|
|
36469
36521
|
overai integration configure <id> --config <json|@file|@->
|
|
36470
36522
|
overai integration config <id> Read its masked configuration
|
|
36523
|
+
overai integration secret set <id> <KEY> --value <@file|@->
|
|
36524
|
+
Set one credential, leaving the rest of
|
|
36525
|
+
the config alone
|
|
36471
36526
|
overai printable-page render <id> [--search-params <json|@file>]
|
|
36472
36527
|
|
|
36473
36528
|
Self-hosted runners (enabling remote access stays on-device \u2014 not a CLI action):
|