@overaihq/cli 0.14.2 → 0.14.3
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/README.md
CHANGED
|
@@ -157,6 +157,10 @@ send a literal value that starts with `@`.
|
|
|
157
157
|
|
|
158
158
|
## For AI agents
|
|
159
159
|
|
|
160
|
+
To onboard an agent, point it at this README and paste:
|
|
161
|
+
|
|
162
|
+
> I use OverAI. Help me get set up with the CLI (https://www.npmjs.com/package/@overaihq/cli): install it, get me logged in, and then walk me through onboarding.
|
|
163
|
+
|
|
160
164
|
The CLI bundles its own guidance — no extra setup files needed. Point your
|
|
161
165
|
agent at a cloned workspace and have it run:
|
|
162
166
|
|
|
@@ -386,26 +386,39 @@ var injectCodeMessageSchema = external_exports.object({
|
|
|
386
386
|
// ../common/src/webPage.ts
|
|
387
387
|
var webPageLanguage = ["react"];
|
|
388
388
|
var configFlag = external_exports.union([external_exports.boolean(), external_exports.string()]).nullish().transform((value) => value === true || value === "true").catch(false);
|
|
389
|
-
var
|
|
390
|
-
language: external_exports.enum(
|
|
391
|
-
/*
|
|
392
|
-
authorizationMode: external_exports.enum(["workspace", "viewer"])
|
|
389
|
+
var webPageConfigFields = {
|
|
390
|
+
language: external_exports.enum(webPageLanguage),
|
|
391
|
+
/* Invalid modes fail closed instead of granting workspace access. */
|
|
392
|
+
authorizationMode: external_exports.enum(["workspace", "viewer"]),
|
|
393
393
|
customTitle: external_exports.string().nullish(),
|
|
394
|
-
code: external_exports.string()
|
|
394
|
+
code: external_exports.string(),
|
|
395
395
|
dataSourceUrl: external_exports.string().nullish(),
|
|
396
|
-
filter: itemFilterExpressionRootSchema.nullish()
|
|
396
|
+
filter: itemFilterExpressionRootSchema.nullish(),
|
|
397
397
|
/* Drops the iframe's sandbox attribute — needed for storage, cookies, forms. */
|
|
398
|
-
noSandbox:
|
|
398
|
+
noSandbox: external_exports.boolean().nullish(),
|
|
399
399
|
/* Renders the page fullscreen for end users by hiding the workspace top bar. */
|
|
400
|
-
hideTopBar:
|
|
400
|
+
hideTopBar: external_exports.boolean().nullish(),
|
|
401
401
|
/*
|
|
402
402
|
* Which iframe runtime renders the page. "v1" is the sandboxed srcdoc
|
|
403
403
|
* iframe; "v2" serves the page from its own origin (separate renderer
|
|
404
|
-
* process, real localStorage).
|
|
405
|
-
* config never fails to parse over the toggle.
|
|
404
|
+
* process, real localStorage).
|
|
406
405
|
*/
|
|
407
|
-
runtime: external_exports.enum(["v1", "v2"])
|
|
406
|
+
runtime: external_exports.enum(["v1", "v2"])
|
|
407
|
+
};
|
|
408
|
+
var webPageConfigSchema = external_exports.object({
|
|
409
|
+
...webPageConfigFields,
|
|
410
|
+
language: webPageConfigFields.language.catch("react"),
|
|
411
|
+
// Missing on legacy versions.
|
|
412
|
+
authorizationMode: webPageConfigFields.authorizationMode.default("workspace"),
|
|
413
|
+
code: webPageConfigFields.code.default(reactDefaultTemplate),
|
|
414
|
+
filter: webPageConfigFields.filter.catch(null),
|
|
415
|
+
noSandbox: configFlag,
|
|
416
|
+
hideTopBar: configFlag,
|
|
417
|
+
// Absent or invalid reads as "v1" so a legacy config never fails to parse
|
|
418
|
+
// over the toggle.
|
|
419
|
+
runtime: webPageConfigFields.runtime.catch("v1")
|
|
408
420
|
});
|
|
421
|
+
var webPageConfigUpdateSchema = external_exports.object(webPageConfigFields).partial();
|
|
409
422
|
var webPageConfigWriteSchema = webPageConfigSchema.extend({
|
|
410
423
|
noSandbox: external_exports.union([external_exports.boolean(), external_exports.enum(["true", "false"])]).nullish(),
|
|
411
424
|
hideTopBar: external_exports.union([external_exports.boolean(), external_exports.enum(["true", "false"])]).nullish(),
|
|
@@ -420,8 +433,10 @@ var defaultWebPageTemplate = reactDefaultTemplate.replace(
|
|
|
420
433
|
|
|
421
434
|
export {
|
|
422
435
|
itemFilterExpressionRootSchema,
|
|
436
|
+
reactDefaultTemplate,
|
|
423
437
|
webPageLanguage,
|
|
424
438
|
webPageConfigSchema,
|
|
439
|
+
webPageConfigUpdateSchema,
|
|
425
440
|
webPageConfigWriteSchema,
|
|
426
441
|
defaultWebPageTemplate
|
|
427
442
|
};
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
} from "./chunk-WGPBYGU6.js";
|
|
5
5
|
import {
|
|
6
6
|
itemFilterExpressionRootSchema,
|
|
7
|
+
reactDefaultTemplate,
|
|
7
8
|
webPageConfigSchema
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4QWKERK2.js";
|
|
9
10
|
import {
|
|
10
11
|
external_exports
|
|
11
12
|
} from "./chunk-PF6GZFT4.js";
|
|
@@ -27818,7 +27819,7 @@ var validateAutomationElements = async (elements) => {
|
|
|
27818
27819
|
return findings(automationNodesSchema.safeParse(elements));
|
|
27819
27820
|
};
|
|
27820
27821
|
var validateWebPageConfig = async (config) => {
|
|
27821
|
-
const { webPageConfigWriteSchema } = await import("./webPage-
|
|
27822
|
+
const { webPageConfigWriteSchema } = await import("./webPage-ICODVQMY.js");
|
|
27822
27823
|
return findings(webPageConfigWriteSchema.safeParse(config));
|
|
27823
27824
|
};
|
|
27824
27825
|
|
|
@@ -27874,6 +27875,7 @@ var functionFiles = (id, name2, version) => {
|
|
|
27874
27875
|
[`${stem}.ts`]: version.code,
|
|
27875
27876
|
[`${stem}.meta.json`]: metaJson({
|
|
27876
27877
|
inputSchema: version.inputSchema,
|
|
27878
|
+
callerAccess: version.callerAccess,
|
|
27877
27879
|
outputSchema: version.outputSchema,
|
|
27878
27880
|
executionTimeout: version.executionTimeout,
|
|
27879
27881
|
executionCpu: version.executionCpu,
|
|
@@ -27890,7 +27892,7 @@ var functionAdapter = {
|
|
|
27890
27892
|
nodes {
|
|
27891
27893
|
id name
|
|
27892
27894
|
functionVersions(orderBy: [VERSION_NUMBER_DESC], first: 1) {
|
|
27893
|
-
nodes { versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory }
|
|
27895
|
+
nodes { versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory callerAccess }
|
|
27894
27896
|
}
|
|
27895
27897
|
functionDeployedVersion { versionNumber }
|
|
27896
27898
|
}
|
|
@@ -27932,7 +27934,7 @@ var functionAdapter = {
|
|
|
27932
27934
|
const data = await gqlRequest(
|
|
27933
27935
|
`query CliFunctionVersion($functionId: String!, $versionNumber: Int!) {
|
|
27934
27936
|
functionVersion(functionId: $functionId, versionNumber: $versionNumber) {
|
|
27935
|
-
versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory
|
|
27937
|
+
versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory callerAccess
|
|
27936
27938
|
}
|
|
27937
27939
|
}`,
|
|
27938
27940
|
{ functionId: id, versionNumber }
|
|
@@ -27947,12 +27949,12 @@ var functionAdapter = {
|
|
|
27947
27949
|
push: async (id, files, message, expectedLatestVersion) => {
|
|
27948
27950
|
const meta = JSON.parse(fileBySuffix(files, ".meta.json"));
|
|
27949
27951
|
const data = await gqlRequest(
|
|
27950
|
-
`mutation CliCreateFunctionVersion($expectedLatestVersion: Int, $functionId: String!, $code: String!, $message: String, $inputSchema: String, $outputSchema: String, $executionTimeout: Int, $executionCpu: Int, $executionMemory: Int) {
|
|
27952
|
+
`mutation CliCreateFunctionVersion($expectedLatestVersion: Int, $functionId: String!, $code: String!, $message: String, $inputSchema: String, $outputSchema: String, $executionTimeout: Int, $executionCpu: Int, $executionMemory: Int, $callerAccess: String) {
|
|
27951
27953
|
createFunctionVersion(input: { expectedLatestVersion: $expectedLatestVersion, functionVersion: {
|
|
27952
27954
|
functionId: $functionId, code: $code, message: $message,
|
|
27953
27955
|
inputSchema: $inputSchema, outputSchema: $outputSchema,
|
|
27954
27956
|
executionTimeout: $executionTimeout, executionCpu: $executionCpu,
|
|
27955
|
-
executionMemory: $executionMemory
|
|
27957
|
+
executionMemory: $executionMemory, callerAccess: $callerAccess
|
|
27956
27958
|
}}) { functionVersion { versionNumber } }
|
|
27957
27959
|
}`,
|
|
27958
27960
|
{
|
|
@@ -27960,6 +27962,8 @@ var functionAdapter = {
|
|
|
27960
27962
|
functionId: id,
|
|
27961
27963
|
code: fileBySuffix(files, ".ts"),
|
|
27962
27964
|
message,
|
|
27965
|
+
// Omission in older clones lets the database inherit the latest policy.
|
|
27966
|
+
callerAccess: meta.callerAccess ?? null,
|
|
27963
27967
|
// Match the webapp's save defaults so a missing meta doesn't zero out
|
|
27964
27968
|
// limits, and so an explicit null doesn't hit the NOT NULL column.
|
|
27965
27969
|
inputSchema: meta.inputSchema ?? "",
|
|
@@ -33936,31 +33940,37 @@ engine.registerTag("generatePassword", GeneratePasswordTag);
|
|
|
33936
33940
|
|
|
33937
33941
|
// ../common/src/printablePage.ts
|
|
33938
33942
|
var printablePageLanguage = ["liquid", "react"];
|
|
33939
|
-
var
|
|
33940
|
-
|
|
33941
|
-
|
|
33942
|
-
|
|
33943
|
-
|
|
33944
|
-
|
|
33945
|
-
|
|
33946
|
-
}
|
|
33943
|
+
var printablePageConfigFields = {
|
|
33944
|
+
pageSize: external_exports.object({ width: external_exports.string(), height: external_exports.string() }),
|
|
33945
|
+
pageMargins: external_exports.object({
|
|
33946
|
+
top: external_exports.string(),
|
|
33947
|
+
right: external_exports.string(),
|
|
33948
|
+
bottom: external_exports.string(),
|
|
33949
|
+
left: external_exports.string()
|
|
33950
|
+
}),
|
|
33951
|
+
language: external_exports.enum(printablePageLanguage),
|
|
33952
|
+
code: external_exports.string(),
|
|
33953
|
+
dataSourceUrl: external_exports.string().nullish(),
|
|
33954
|
+
filter: itemFilterExpressionRootSchema.nullish(),
|
|
33955
|
+
customTitle: external_exports.string().nullish()
|
|
33956
|
+
};
|
|
33947
33957
|
var printablePageConfigSchema = external_exports.object({
|
|
33948
|
-
|
|
33958
|
+
...printablePageConfigFields,
|
|
33959
|
+
// Per-key defaults so a stored object missing one dimension still reads.
|
|
33960
|
+
pageSize: printablePageConfigFields.pageSize.extend({
|
|
33949
33961
|
width: external_exports.string().default("8.5in"),
|
|
33950
33962
|
height: external_exports.string().default("11in")
|
|
33951
33963
|
}).prefault({}),
|
|
33952
|
-
pageMargins:
|
|
33964
|
+
pageMargins: printablePageConfigFields.pageMargins.extend({
|
|
33953
33965
|
top: external_exports.string().default("0.5in"),
|
|
33954
33966
|
right: external_exports.string().default("0.5in"),
|
|
33955
33967
|
bottom: external_exports.string().default("0.5in"),
|
|
33956
33968
|
left: external_exports.string().default("0.5in")
|
|
33957
33969
|
}).prefault({}),
|
|
33958
|
-
language:
|
|
33959
|
-
code:
|
|
33960
|
-
dataSourceUrl: external_exports.string().nullish(),
|
|
33961
|
-
filter: itemFilterExpressionRootSchema.nullish(),
|
|
33962
|
-
customTitle: external_exports.string().nullish()
|
|
33970
|
+
language: printablePageConfigFields.language.default("react"),
|
|
33971
|
+
code: printablePageConfigFields.code.default(reactDefaultTemplate)
|
|
33963
33972
|
});
|
|
33973
|
+
var printablePageConfigUpdateSchema = external_exports.object(printablePageConfigFields).partial();
|
|
33964
33974
|
var printablePageRenderDiagnosticsSchema = external_exports.object({
|
|
33965
33975
|
/** Absent when the render itself failed before any text existed. */
|
|
33966
33976
|
renderedTextLength: external_exports.number().optional(),
|
|
@@ -35410,6 +35420,7 @@ var ID_PREFIXES = {
|
|
|
35410
35420
|
mailbox: { prefix: "mbx", body: 10 },
|
|
35411
35421
|
mailbox_address: { prefix: "mba", body: 10 },
|
|
35412
35422
|
mailbox_message: { prefix: "mbm", body: 10 },
|
|
35423
|
+
notification: { prefix: "ntf", body: 12 },
|
|
35413
35424
|
organization_usage_credit: { prefix: "crd", body: 12 },
|
|
35414
35425
|
organization_usage_transaction: { prefix: "utx", body: 12 },
|
|
35415
35426
|
page: { prefix: "pg", body: 10 },
|
|
@@ -36668,8 +36679,13 @@ Rules that keep graphs healthy:
|
|
|
36668
36679
|
of the same parent; never connect across loop boundaries.
|
|
36669
36680
|
- Keep TYPESCRIPT_CODE nodes small and focused \u2014 split logic across nodes and
|
|
36670
36681
|
let the graph orchestrate, rather than one big code block.
|
|
36671
|
-
-
|
|
36672
|
-
|
|
36682
|
+
- Write TYPESCRIPT_CODE as a module:
|
|
36683
|
+
\`export default async function step(state: StepState, ctx, env) { const s1 = await state.get("S1"); return s1.rows; }\`.
|
|
36684
|
+
\`state.get\` fetches one step's output on first read (cached for that node's execution),
|
|
36685
|
+
resolves undefined for a skipped step, and rejects for an id not visible
|
|
36686
|
+
from the node. Bare snippets (STATE/OUTPUT globals) are legacy, being retired.
|
|
36687
|
+
- Node inputs reference upstream state via variableIds (e.g.
|
|
36688
|
+
\`await state.get("S1")\`, Liquid {{S1.field}}). After renaming/removing a node, grep the document for its
|
|
36673
36689
|
variableId \u2014 dangling references fail at runtime, not at push.
|
|
36674
36690
|
- Bring IF_ELSE branches back together with an ALWAYS node.
|
|
36675
36691
|
- A loop (LOOP_ARRAY/LOOP_RANGE) always resolves to its success handle once all
|
|
@@ -36733,9 +36749,10 @@ language, customTitle, hideTopBar, ...). Push reassembles them.
|
|
|
36733
36749
|
- SQL from pages: env.TBSxxx.sql tagged templates only; compose dynamic SQL by
|
|
36734
36750
|
nesting sql fragments, sql([...]) for IN lists. sql.unsafe only for dynamic
|
|
36735
36751
|
identifiers.
|
|
36736
|
-
-
|
|
36737
|
-
on the workspace homepage and can only follow links
|
|
36738
|
-
an app-like experience.
|
|
36752
|
+
- End-user-facing workspaces have two modes. App (the default): end users land
|
|
36753
|
+
on the workspace homepage and can only follow links, so add page-to-page
|
|
36754
|
+
navigation; "Hide Top Bar" gives an app-like experience. Pages: the top bar
|
|
36755
|
+
lists every deployed page, so pages only need links to ones marked hidden.
|
|
36739
36756
|
- Public pages (/public/:id) have no viewer identity \u2014 useCurrentUser() is
|
|
36740
36757
|
null. Identity-scoped features degrade: useAgentChat streams but persists
|
|
36741
36758
|
nothing (conversationId stays null, useAgentConversations is empty, the
|
|
@@ -36784,8 +36801,14 @@ var functions = `# Function best practices
|
|
|
36784
36801
|
Functions are TypeScript HTTP handlers in a Deno sandbox: full env SDK,
|
|
36785
36802
|
esm.sh imports allowed. The CLI materializes <slug>.<id>.ts (code) and
|
|
36786
36803
|
<slug>.<id>.meta.json (inputSchema, outputSchema, executionTimeout ms,
|
|
36787
|
-
executionMemory MB).
|
|
36804
|
+
executionMemory MB, callerAccess).
|
|
36788
36805
|
|
|
36806
|
+
- New functions allow only callers with workspace access by default. Set
|
|
36807
|
+
callerAccess to "public" in meta.json only when an unauthenticated endpoint is
|
|
36808
|
+
intended. Existing functions retain their saved policy when older meta.json
|
|
36809
|
+
files omit this field. The policy is versioned: deploy the saved version to
|
|
36810
|
+
change who can call the live endpoint. Workspace uses Authorization for the
|
|
36811
|
+
platform bearer token; put additional application credentials in another header.
|
|
36789
36812
|
- Functions are full HTTP apps: method + sub-path are forwarded to your code,
|
|
36790
36813
|
and each execution records requestMethod/requestPath. Callers reach a route
|
|
36791
36814
|
with env.FNxxx.call({ method, path: "/features/123" }) \u2014 path defaults to the
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultWebPageTemplate,
|
|
3
3
|
webPageConfigSchema,
|
|
4
|
+
webPageConfigUpdateSchema,
|
|
4
5
|
webPageConfigWriteSchema,
|
|
5
6
|
webPageLanguage
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4QWKERK2.js";
|
|
7
8
|
import "./chunk-PF6GZFT4.js";
|
|
8
9
|
import "./chunk-U67V476Y.js";
|
|
9
10
|
export {
|
|
10
11
|
defaultWebPageTemplate,
|
|
11
12
|
webPageConfigSchema,
|
|
13
|
+
webPageConfigUpdateSchema,
|
|
12
14
|
webPageConfigWriteSchema,
|
|
13
15
|
webPageLanguage
|
|
14
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overaihq/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@perygee/common": "0.0.0",
|
|
24
|
-
"@types/node": "^24.
|
|
24
|
+
"@types/node": "^24.19.0",
|
|
25
25
|
"@types/proper-lockfile": "^4.1.4",
|
|
26
26
|
"tsup": "^8.5.1",
|
|
27
27
|
"typescript": "^7.0.2",
|