@overaihq/cli 0.14.2 → 0.14.4

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 webPageConfigSchema = external_exports.object({
390
- language: external_exports.enum(["react"]).catch("react"),
391
- /* Missing on legacy versions; invalid modes fail closed instead of granting workspace access. */
392
- authorizationMode: external_exports.enum(["workspace", "viewer"]).default("workspace"),
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().default(reactDefaultTemplate),
394
+ code: external_exports.string(),
395
395
  dataSourceUrl: external_exports.string().nullish(),
396
- filter: itemFilterExpressionRootSchema.nullish().catch(null),
396
+ filter: itemFilterExpressionRootSchema.nullish(),
397
397
  /* Drops the iframe's sandbox attribute — needed for storage, cookies, forms. */
398
- noSandbox: configFlag,
398
+ noSandbox: external_exports.boolean().nullish(),
399
399
  /* Renders the page fullscreen for end users by hiding the workspace top bar. */
400
- hideTopBar: configFlag,
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). Absent or invalid reads as "v1" so a legacy
405
- * config never fails to parse over the toggle.
404
+ * process, real localStorage).
406
405
  */
407
- runtime: external_exports.enum(["v1", "v2"]).catch("v1")
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-FTBTDB2B.js";
9
+ } from "./chunk-4QWKERK2.js";
9
10
  import {
10
11
  external_exports
11
12
  } from "./chunk-PF6GZFT4.js";
@@ -27811,6 +27812,112 @@ var runAutomation = async (args) => {
27811
27812
  process.exitCode = 1;
27812
27813
  };
27813
27814
 
27815
+ // ../common/src/agent.ts
27816
+ var agentVersionConfigSchema = external_exports.object({
27817
+ systemPrompt: external_exports.string(),
27818
+ model: external_exports.string(),
27819
+ temperature: external_exports.number(),
27820
+ maxTokens: external_exports.number(),
27821
+ rateLimitRequestsPerMinute: external_exports.number(),
27822
+ rateLimitTokensPerMinute: external_exports.number()
27823
+ });
27824
+ var defaultAgentVersionConfig = {
27825
+ systemPrompt: "You are a helpful assistant.",
27826
+ model: "claude-sonnet-4-6",
27827
+ temperature: 0.7,
27828
+ maxTokens: 4096,
27829
+ rateLimitRequestsPerMinute: 20,
27830
+ rateLimitTokensPerMinute: 2e5
27831
+ };
27832
+ var agentTableSpaceAccessModeSchema = external_exports.enum(["read", "read_write"]);
27833
+ var BUILTIN_TOOL_SETS = {
27834
+ web: {
27835
+ label: "Web search",
27836
+ description: "Search the web. Runs on the model provider's infrastructure; not every model offers it."
27837
+ },
27838
+ documents: {
27839
+ label: "Read documents",
27840
+ description: "Read PDFs, Word documents, spreadsheets and text files from this organization's storage."
27841
+ },
27842
+ storage: {
27843
+ label: "Save files",
27844
+ description: "Write text files to this organization's storage for other tools and people to use."
27845
+ }
27846
+ };
27847
+ var isBuiltinToolSetName = (name2) => Object.hasOwn(BUILTIN_TOOL_SETS, name2);
27848
+ var agentEditableConfigSchema = agentVersionConfigSchema.extend({
27849
+ agentVersionFunctionsByAgentIdAndVersionNumber: external_exports.object({
27850
+ nodes: external_exports.array(
27851
+ external_exports.object({
27852
+ functionId: external_exports.string()
27853
+ })
27854
+ )
27855
+ }),
27856
+ agentVersionTableSpacesByAgentIdAndVersionNumber: external_exports.object({
27857
+ nodes: external_exports.array(
27858
+ external_exports.object({
27859
+ tableSpaceId: external_exports.string(),
27860
+ accessMode: agentTableSpaceAccessModeSchema
27861
+ })
27862
+ )
27863
+ }),
27864
+ agentVersionAgentsByAgentIdAndVersionNumber: external_exports.object({
27865
+ nodes: external_exports.array(
27866
+ external_exports.object({
27867
+ attachedAgentId: external_exports.string()
27868
+ })
27869
+ )
27870
+ }),
27871
+ agentVersionKnowledgeBasesByAgentIdAndVersionNumber: external_exports.object({
27872
+ nodes: external_exports.array(
27873
+ external_exports.object({
27874
+ knowledgeBaseId: external_exports.string()
27875
+ })
27876
+ )
27877
+ }),
27878
+ // Prefaulted: configs from before built-ins (stale clients, saved drafts)
27879
+ // still parse.
27880
+ agentVersionBuiltinToolSetsByAgentIdAndVersionNumber: external_exports.object({
27881
+ nodes: external_exports.array(
27882
+ external_exports.object({
27883
+ toolSet: external_exports.string()
27884
+ })
27885
+ )
27886
+ }).prefault({ nodes: [] })
27887
+ });
27888
+ var agentToolHttpMethodSchema = external_exports.enum([
27889
+ "GET",
27890
+ "POST",
27891
+ "PUT",
27892
+ "PATCH",
27893
+ "DELETE"
27894
+ ]);
27895
+ var agentToolRequestSchema = external_exports.object({
27896
+ method: agentToolHttpMethodSchema,
27897
+ // Sub-path under the function base URL; functions route on it
27898
+ path: external_exports.string().prefault("/").transform((p) => p.startsWith("/") ? p : `/${p}`),
27899
+ headers: external_exports.record(external_exports.string(), external_exports.string()).prefault({}),
27900
+ queryParams: external_exports.record(external_exports.string(), external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])).prefault({}),
27901
+ body: external_exports.unknown()
27902
+ });
27903
+ var agentToolRequestJsonSchemaSchema = external_exports.object({
27904
+ type: external_exports.literal("object"),
27905
+ properties: external_exports.object({
27906
+ method: external_exports.object({ type: external_exports.literal("string") }).loose(),
27907
+ headers: external_exports.object({ type: external_exports.literal("object") }).loose(),
27908
+ queryParams: external_exports.object({ type: external_exports.literal("object") }).loose(),
27909
+ body: external_exports.object({}).loose()
27910
+ }).loose(),
27911
+ required: external_exports.array(external_exports.string()).refine(
27912
+ (arr) => ["method", "headers", "queryParams", "body"].every(
27913
+ (key) => arr.includes(key)
27914
+ ),
27915
+ {
27916
+ message: "required array must include: method, headers, queryParams, body"
27917
+ }
27918
+ )
27919
+ }).loose();
27920
+
27814
27921
  // src/workspace/validateElements.ts
27815
27922
  var findings = (parsed) => parsed.success ? [] : parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`);
27816
27923
  var validateAutomationElements = async (elements) => {
@@ -27818,45 +27925,51 @@ var validateAutomationElements = async (elements) => {
27818
27925
  return findings(automationNodesSchema.safeParse(elements));
27819
27926
  };
27820
27927
  var validateWebPageConfig = async (config) => {
27821
- const { webPageConfigWriteSchema } = await import("./webPage-7BXDGWX5.js");
27928
+ const { webPageConfigWriteSchema } = await import("./webPage-ICODVQMY.js");
27822
27929
  return findings(webPageConfigWriteSchema.safeParse(config));
27823
27930
  };
27824
27931
 
27825
27932
  // ../common/src/function.ts
27826
- var defaultAgentFunctionInputSchema = `{
27827
- "type": "object",
27828
- "properties": {
27829
- "method": {
27830
- "type": "string",
27831
- "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"],
27832
- "default": "POST",
27833
- "description": "HTTP method for this function call."
27933
+ var agentToolPathJsonSchema = {
27934
+ type: "string",
27935
+ default: "/",
27936
+ description: 'Sub-path under the function URL, e.g. "/notes". Use "/" for the base.'
27937
+ };
27938
+ var defaultAgentFunctionInputSchema = JSON.stringify(
27939
+ {
27940
+ type: "object",
27941
+ properties: {
27942
+ method: {
27943
+ type: "string",
27944
+ enum: ["GET", "POST", "PUT", "PATCH", "DELETE"],
27945
+ default: "POST",
27946
+ description: "HTTP method for this function call."
27834
27947
  },
27835
- "headers": {
27836
- "type": "object",
27837
- "description": "Request headers. Use {} when none are needed.",
27838
- "default": {},
27839
- "additionalProperties": {
27840
- "type": "string"
27841
- }
27948
+ path: agentToolPathJsonSchema,
27949
+ headers: {
27950
+ type: "object",
27951
+ description: "Request headers. Use {} when none are needed.",
27952
+ default: {},
27953
+ additionalProperties: { type: "string" }
27842
27954
  },
27843
- "queryParams": {
27844
- "type": "object",
27845
- "description": "URL query params. Use {} when none are needed.",
27846
- "default": {},
27847
- "additionalProperties": {
27848
- "type": ["string", "number", "boolean"]
27849
- }
27955
+ queryParams: {
27956
+ type: "object",
27957
+ description: "URL query params. Use {} when none are needed.",
27958
+ default: {},
27959
+ additionalProperties: { type: ["string", "number", "boolean"] }
27850
27960
  },
27851
- "body": {
27852
- "type": "object",
27853
- "description": "Request body payload. Use {} when none is needed.",
27854
- "default": {},
27855
- "additionalProperties": true
27961
+ body: {
27962
+ type: "object",
27963
+ description: "Request body payload. Use {} when none is needed.",
27964
+ default: {},
27965
+ additionalProperties: true
27856
27966
  }
27857
27967
  },
27858
- "required": ["method", "headers", "queryParams", "body"]
27859
- }`;
27968
+ required: ["method", "headers", "queryParams", "body"]
27969
+ },
27970
+ null,
27971
+ 2
27972
+ );
27860
27973
  var DEFAULT_FUNCTION_EXECUTION_TIMEOUT_MS = 3e4;
27861
27974
  var DEFAULT_FUNCTION_EXECUTION_MEMORY_MB = 512;
27862
27975
 
@@ -27874,6 +27987,7 @@ var functionFiles = (id, name2, version) => {
27874
27987
  [`${stem}.ts`]: version.code,
27875
27988
  [`${stem}.meta.json`]: metaJson({
27876
27989
  inputSchema: version.inputSchema,
27990
+ callerAccess: version.callerAccess,
27877
27991
  outputSchema: version.outputSchema,
27878
27992
  executionTimeout: version.executionTimeout,
27879
27993
  executionCpu: version.executionCpu,
@@ -27890,7 +28004,7 @@ var functionAdapter = {
27890
28004
  nodes {
27891
28005
  id name
27892
28006
  functionVersions(orderBy: [VERSION_NUMBER_DESC], first: 1) {
27893
- nodes { versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory }
28007
+ nodes { versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory callerAccess }
27894
28008
  }
27895
28009
  functionDeployedVersion { versionNumber }
27896
28010
  }
@@ -27932,7 +28046,7 @@ var functionAdapter = {
27932
28046
  const data = await gqlRequest(
27933
28047
  `query CliFunctionVersion($functionId: String!, $versionNumber: Int!) {
27934
28048
  functionVersion(functionId: $functionId, versionNumber: $versionNumber) {
27935
- versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory
28049
+ versionNumber code inputSchema outputSchema executionTimeout executionCpu executionMemory callerAccess
27936
28050
  }
27937
28051
  }`,
27938
28052
  { functionId: id, versionNumber }
@@ -27947,12 +28061,12 @@ var functionAdapter = {
27947
28061
  push: async (id, files, message, expectedLatestVersion) => {
27948
28062
  const meta = JSON.parse(fileBySuffix(files, ".meta.json"));
27949
28063
  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) {
28064
+ `mutation CliCreateFunctionVersion($expectedLatestVersion: Int, $functionId: String!, $code: String!, $message: String, $inputSchema: String, $outputSchema: String, $executionTimeout: Int, $executionCpu: Int, $executionMemory: Int, $callerAccess: String) {
27951
28065
  createFunctionVersion(input: { expectedLatestVersion: $expectedLatestVersion, functionVersion: {
27952
28066
  functionId: $functionId, code: $code, message: $message,
27953
28067
  inputSchema: $inputSchema, outputSchema: $outputSchema,
27954
28068
  executionTimeout: $executionTimeout, executionCpu: $executionCpu,
27955
- executionMemory: $executionMemory
28069
+ executionMemory: $executionMemory, callerAccess: $callerAccess
27956
28070
  }}) { functionVersion { versionNumber } }
27957
28071
  }`,
27958
28072
  {
@@ -27960,6 +28074,8 @@ var functionAdapter = {
27960
28074
  functionId: id,
27961
28075
  code: fileBySuffix(files, ".ts"),
27962
28076
  message,
28077
+ // Omission in older clones lets the database inherit the latest policy.
28078
+ callerAccess: meta.callerAccess ?? null,
27963
28079
  // Match the webapp's save defaults so a missing meta doesn't zero out
27964
28080
  // limits, and so an explicit null doesn't hit the NOT NULL column.
27965
28081
  inputSchema: meta.inputSchema ?? "",
@@ -28255,6 +28371,9 @@ var agentFiles = (id, name2, version) => ({
28255
28371
  ),
28256
28372
  knowledgeBaseIds: version.agentVersionKnowledgeBasesByAgentIdAndVersionNumber.nodes.map(
28257
28373
  (link) => link.knowledgeBaseId
28374
+ ),
28375
+ builtinToolSets: version.agentVersionBuiltinToolSetsByAgentIdAndVersionNumber.nodes.map(
28376
+ (link) => link.toolSet
28258
28377
  )
28259
28378
  })
28260
28379
  });
@@ -28273,6 +28392,9 @@ var agentVersionFields = `
28273
28392
  agentVersionKnowledgeBasesByAgentIdAndVersionNumber(orderBy: [KNOWLEDGE_BASE_ID_ASC]) {
28274
28393
  nodes { knowledgeBaseId }
28275
28394
  }
28395
+ agentVersionBuiltinToolSetsByAgentIdAndVersionNumber(orderBy: [TOOL_SET_ASC]) {
28396
+ nodes { toolSet }
28397
+ }
28276
28398
  `;
28277
28399
  var agentAdapter = {
28278
28400
  type: "agent",
@@ -28338,13 +28460,21 @@ var agentAdapter = {
28338
28460
  },
28339
28461
  push: async (id, files, message, expectedLatestVersion) => {
28340
28462
  const config = JSON.parse(fileBySuffix(files, ".json"));
28463
+ const unknownToolSets = (config.builtinToolSets ?? []).filter(
28464
+ (name2) => !isBuiltinToolSetName(name2)
28465
+ );
28466
+ if (unknownToolSets.length > 0) {
28467
+ throw new Error(
28468
+ `Unknown builtinToolSets: ${unknownToolSets.join(", ")}. Known: ${Object.keys(BUILTIN_TOOL_SETS).join(", ")}. If the name is new, upgrade the CLI.`
28469
+ );
28470
+ }
28341
28471
  const data = await gqlRequest(
28342
28472
  `mutation CliCreateAgentVersion($expectedLatestVersion: Int,
28343
28473
  $agentId: String!, $message: String!, $systemPrompt: String!,
28344
28474
  $model: String!, $temperature: Float!, $maxTokens: Int!,
28345
28475
  $rateLimitRequestsPerMinute: Int!, $rateLimitTokensPerMinute: Int!,
28346
28476
  $functionIds: [String], $tableSpaceBindings: JSON, $agentIds: [String],
28347
- $knowledgeBaseIds: [String]
28477
+ $knowledgeBaseIds: [String], $builtinToolSets: [String]
28348
28478
  ) {
28349
28479
  createAgentVersionWithAttachments(input: { expectedLatestVersion: $expectedLatestVersion,
28350
28480
  agentId: $agentId, message: $message, systemPrompt: $systemPrompt,
@@ -28352,7 +28482,8 @@ var agentAdapter = {
28352
28482
  rateLimitRequestsPerMinute: $rateLimitRequestsPerMinute,
28353
28483
  rateLimitTokensPerMinute: $rateLimitTokensPerMinute,
28354
28484
  functionIds: $functionIds, tableSpaceBindings: $tableSpaceBindings,
28355
- agentIds: $agentIds, knowledgeBaseIds: $knowledgeBaseIds
28485
+ agentIds: $agentIds, knowledgeBaseIds: $knowledgeBaseIds,
28486
+ builtinToolSets: $builtinToolSets
28356
28487
  }) { result { versionNumber } }
28357
28488
  }`,
28358
28489
  {
@@ -28362,6 +28493,7 @@ var agentAdapter = {
28362
28493
  tableSpaceBindings: config.tableSpaceBindings ?? [],
28363
28494
  agentIds: config.agentIds ?? [],
28364
28495
  knowledgeBaseIds: config.knowledgeBaseIds ?? [],
28496
+ builtinToolSets: config.builtinToolSets ?? null,
28365
28497
  expectedLatestVersion
28366
28498
  }
28367
28499
  );
@@ -28550,86 +28682,6 @@ var runRunner = async (args) => {
28550
28682
  process.exitCode = 1;
28551
28683
  };
28552
28684
 
28553
- // ../common/src/agent.ts
28554
- var agentVersionConfigSchema = external_exports.object({
28555
- systemPrompt: external_exports.string(),
28556
- model: external_exports.string(),
28557
- temperature: external_exports.number(),
28558
- maxTokens: external_exports.number(),
28559
- rateLimitRequestsPerMinute: external_exports.number(),
28560
- rateLimitTokensPerMinute: external_exports.number()
28561
- });
28562
- var defaultAgentVersionConfig = {
28563
- systemPrompt: "You are a helpful assistant.",
28564
- model: "claude-sonnet-4-6",
28565
- temperature: 0.7,
28566
- maxTokens: 4096,
28567
- rateLimitRequestsPerMinute: 20,
28568
- rateLimitTokensPerMinute: 2e5
28569
- };
28570
- var agentTableSpaceAccessModeSchema = external_exports.enum(["read", "read_write"]);
28571
- var agentEditableConfigSchema = agentVersionConfigSchema.extend({
28572
- agentVersionFunctionsByAgentIdAndVersionNumber: external_exports.object({
28573
- nodes: external_exports.array(
28574
- external_exports.object({
28575
- functionId: external_exports.string()
28576
- })
28577
- )
28578
- }),
28579
- agentVersionTableSpacesByAgentIdAndVersionNumber: external_exports.object({
28580
- nodes: external_exports.array(
28581
- external_exports.object({
28582
- tableSpaceId: external_exports.string(),
28583
- accessMode: agentTableSpaceAccessModeSchema
28584
- })
28585
- )
28586
- }),
28587
- agentVersionAgentsByAgentIdAndVersionNumber: external_exports.object({
28588
- nodes: external_exports.array(
28589
- external_exports.object({
28590
- attachedAgentId: external_exports.string()
28591
- })
28592
- )
28593
- }),
28594
- agentVersionKnowledgeBasesByAgentIdAndVersionNumber: external_exports.object({
28595
- nodes: external_exports.array(
28596
- external_exports.object({
28597
- knowledgeBaseId: external_exports.string()
28598
- })
28599
- )
28600
- })
28601
- });
28602
- var agentToolHttpMethodSchema = external_exports.enum([
28603
- "GET",
28604
- "POST",
28605
- "PUT",
28606
- "PATCH",
28607
- "DELETE"
28608
- ]);
28609
- var agentToolRequestSchema = external_exports.object({
28610
- method: agentToolHttpMethodSchema,
28611
- headers: external_exports.record(external_exports.string(), external_exports.string()).prefault({}),
28612
- queryParams: external_exports.record(external_exports.string(), external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])).prefault({}),
28613
- body: external_exports.unknown()
28614
- });
28615
- var agentToolRequestJsonSchemaSchema = external_exports.object({
28616
- type: external_exports.literal("object"),
28617
- properties: external_exports.object({
28618
- method: external_exports.object({ type: external_exports.literal("string") }).loose(),
28619
- headers: external_exports.object({ type: external_exports.literal("object") }).loose(),
28620
- queryParams: external_exports.object({ type: external_exports.literal("object") }).loose(),
28621
- body: external_exports.object({}).loose()
28622
- }).loose(),
28623
- required: external_exports.array(external_exports.string()).refine(
28624
- (arr) => ["method", "headers", "queryParams", "body"].every(
28625
- (key) => arr.includes(key)
28626
- ),
28627
- {
28628
- message: "required array must include: method, headers, queryParams, body"
28629
- }
28630
- )
28631
- }).loose();
28632
-
28633
28685
  // ../common/src/liquidjs/liquidjs.ts
28634
28686
  var import_jmespath = __toESM(require_jmespath(), 1);
28635
28687
 
@@ -33936,31 +33988,37 @@ engine.registerTag("generatePassword", GeneratePasswordTag);
33936
33988
 
33937
33989
  // ../common/src/printablePage.ts
33938
33990
  var printablePageLanguage = ["liquid", "react"];
33939
- var reactDefaultTemplate = `function App() {
33940
- return (
33941
- <div className="page">
33942
- <h1>My Page Title</h1>
33943
- <p>Page content goes here...</p>
33944
- </div>
33945
- );
33946
- }`;
33991
+ var printablePageConfigFields = {
33992
+ pageSize: external_exports.object({ width: external_exports.string(), height: external_exports.string() }),
33993
+ pageMargins: external_exports.object({
33994
+ top: external_exports.string(),
33995
+ right: external_exports.string(),
33996
+ bottom: external_exports.string(),
33997
+ left: external_exports.string()
33998
+ }),
33999
+ language: external_exports.enum(printablePageLanguage),
34000
+ code: external_exports.string(),
34001
+ dataSourceUrl: external_exports.string().nullish(),
34002
+ filter: itemFilterExpressionRootSchema.nullish(),
34003
+ customTitle: external_exports.string().nullish()
34004
+ };
33947
34005
  var printablePageConfigSchema = external_exports.object({
33948
- pageSize: external_exports.object({
34006
+ ...printablePageConfigFields,
34007
+ // Per-key defaults so a stored object missing one dimension still reads.
34008
+ pageSize: printablePageConfigFields.pageSize.extend({
33949
34009
  width: external_exports.string().default("8.5in"),
33950
34010
  height: external_exports.string().default("11in")
33951
34011
  }).prefault({}),
33952
- pageMargins: external_exports.object({
34012
+ pageMargins: printablePageConfigFields.pageMargins.extend({
33953
34013
  top: external_exports.string().default("0.5in"),
33954
34014
  right: external_exports.string().default("0.5in"),
33955
34015
  bottom: external_exports.string().default("0.5in"),
33956
34016
  left: external_exports.string().default("0.5in")
33957
34017
  }).prefault({}),
33958
- language: external_exports.enum(printablePageLanguage).default("react"),
33959
- code: external_exports.string().default(reactDefaultTemplate),
33960
- dataSourceUrl: external_exports.string().nullish(),
33961
- filter: itemFilterExpressionRootSchema.nullish(),
33962
- customTitle: external_exports.string().nullish()
34018
+ language: printablePageConfigFields.language.default("react"),
34019
+ code: printablePageConfigFields.code.default(reactDefaultTemplate)
33963
34020
  });
34021
+ var printablePageConfigUpdateSchema = external_exports.object(printablePageConfigFields).partial();
33964
34022
  var printablePageRenderDiagnosticsSchema = external_exports.object({
33965
34023
  /** Absent when the render itself failed before any text existed. */
33966
34024
  renderedTextLength: external_exports.number().optional(),
@@ -35363,6 +35421,9 @@ var ID_PREFIXES = {
35363
35421
  agent: { prefix: "agt", body: 10 },
35364
35422
  agent_conversation: { prefix: "agcv", body: 20 },
35365
35423
  agent_message: { prefix: "agmsg", body: 20 },
35424
+ agent_message_part: { prefix: "amp", body: 16 },
35425
+ agent_tool_invocation: { prefix: "ati", body: 16 },
35426
+ agent_turn: { prefix: "atn", body: 16 },
35366
35427
  architect_chat: {
35367
35428
  prefix: "ac",
35368
35429
  body: 12,
@@ -35410,6 +35471,7 @@ var ID_PREFIXES = {
35410
35471
  mailbox: { prefix: "mbx", body: 10 },
35411
35472
  mailbox_address: { prefix: "mba", body: 10 },
35412
35473
  mailbox_message: { prefix: "mbm", body: 10 },
35474
+ notification: { prefix: "ntf", body: 12 },
35413
35475
  organization_usage_credit: { prefix: "crd", body: 12 },
35414
35476
  organization_usage_transaction: { prefix: "utx", body: 12 },
35415
35477
  page: { prefix: "pg", body: 10 },
@@ -36668,8 +36730,15 @@ Rules that keep graphs healthy:
36668
36730
  of the same parent; never connect across loop boundaries.
36669
36731
  - Keep TYPESCRIPT_CODE nodes small and focused \u2014 split logic across nodes and
36670
36732
  let the graph orchestrate, rather than one big code block.
36671
- - Node inputs reference upstream state via variableIds (e.g. STATE.S1, Liquid
36672
- {{S1.field}}). After renaming/removing a node, grep the document for its
36733
+ - Write TYPESCRIPT_CODE as a module:
36734
+ \`export default async function step(state: StepState, ctx: StepContext, env: Env) { const s1 = await state.get("S1"); return s1.rows; }\`.
36735
+ Annotate every parameter you declare \u2014 module code is checked with
36736
+ noImplicitAny, so an unannotated one is an error.
36737
+ \`state.get\` fetches one step's output on first read (cached for that node's execution),
36738
+ resolves undefined for a skipped step, and rejects for an id not visible
36739
+ from the node. Bare snippets (STATE/OUTPUT globals) are legacy, being retired.
36740
+ - Node inputs reference upstream state via variableIds (e.g.
36741
+ \`await state.get("S1")\`, Liquid {{S1.field}}). After renaming/removing a node, grep the document for its
36673
36742
  variableId \u2014 dangling references fail at runtime, not at push.
36674
36743
  - Bring IF_ELSE branches back together with an ALWAYS node.
36675
36744
  - A loop (LOOP_ARRAY/LOOP_RANGE) always resolves to its success handle once all
@@ -36733,9 +36802,10 @@ language, customTitle, hideTopBar, ...). Push reassembles them.
36733
36802
  - SQL from pages: env.TBSxxx.sql tagged templates only; compose dynamic SQL by
36734
36803
  nesting sql fragments, sql([...]) for IN lists. sql.unsafe only for dynamic
36735
36804
  identifiers.
36736
- - For end-user-facing workspaces, add page-to-page navigation (end users land
36737
- on the workspace homepage and can only follow links). "Hide Top Bar" gives
36738
- an app-like experience.
36805
+ - End-user-facing workspaces have two modes. App (the default): end users land
36806
+ on the workspace homepage and can only follow links, so add page-to-page
36807
+ navigation; "Hide Top Bar" gives an app-like experience. Pages: the top bar
36808
+ lists every deployed page, so pages only need links to ones marked hidden.
36739
36809
  - Public pages (/public/:id) have no viewer identity \u2014 useCurrentUser() is
36740
36810
  null. Identity-scoped features degrade: useAgentChat streams but persists
36741
36811
  nothing (conversationId stays null, useAgentConversations is empty, the
@@ -36784,8 +36854,14 @@ var functions = `# Function best practices
36784
36854
  Functions are TypeScript HTTP handlers in a Deno sandbox: full env SDK,
36785
36855
  esm.sh imports allowed. The CLI materializes <slug>.<id>.ts (code) and
36786
36856
  <slug>.<id>.meta.json (inputSchema, outputSchema, executionTimeout ms,
36787
- executionMemory MB).
36857
+ executionMemory MB, callerAccess).
36788
36858
 
36859
+ - New functions allow only callers with workspace access by default. Set
36860
+ callerAccess to "public" in meta.json only when an unauthenticated endpoint is
36861
+ intended. Existing functions retain their saved policy when older meta.json
36862
+ files omit this field. The policy is versioned: deploy the saved version to
36863
+ change who can call the live endpoint. Workspace uses Authorization for the
36864
+ platform bearer token; put additional application credentials in another header.
36789
36865
  - Functions are full HTTP apps: method + sub-path are forwarded to your code,
36790
36866
  and each execution records requestMethod/requestPath. Callers reach a route
36791
36867
  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-FTBTDB2B.js";
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.2",
3
+ "version": "0.14.4",
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.13.5",
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",