@rebyteai/cli 0.2.0 → 0.2.2

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.
Files changed (3) hide show
  1. package/README.md +30 -1
  2. package/dist/cli.js +8 -6
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Manage saved Agents through the Rebyte Agent SDK fork. Install the release in your project:
4
4
 
5
5
  ```sh
6
- pnpm add -D @rebyteai/cli@0.2.0
6
+ pnpm add -D @rebyteai/cli
7
7
  ```
8
8
 
9
9
  No repository clone is required. The historical `ReByteAI/rebyte-cli` repository
@@ -63,3 +63,32 @@ represented in TOML; export fails without writing. Use the Rebyte SDK for JSON.
63
63
  See [migration](../../docs/migration.md) for retired manifest fields. The Commerce
64
64
  repository has its own local business manifest and Python converter; that file is
65
65
  not an input for this CLI.
66
+
67
+
68
+ ## Load client functions on demand
69
+
70
+ Tool Search requires CLI 0.2.1 or later. Include a `tool_search` entry, then set
71
+ `defer_loading = true` on selected function entries:
72
+
73
+ ```toml
74
+ model = "gpt-5.6-luna"
75
+
76
+ [[tools]]
77
+ type = "tool_search"
78
+
79
+ [[tools]]
80
+ type = "function"
81
+ name = "lookup_order"
82
+ description = "Look up an order by its ID."
83
+ defer_loading = true
84
+ parameters = { type = "object", properties = { order_id = { type = "string" } }, required = ["order_id"], additionalProperties = false }
85
+ ```
86
+
87
+ Omitted/false stays eager. Deferred functions without `tool_search` fail
88
+ validation. The CLI only manages definitions; your application handles
89
+ `required_actions` and returns `agent.session.input.tool_result`. MCP tools use
90
+ automatic search independently and need no `defer_loading` flag.
91
+
92
+ See the [function guide](https://rebyte.ai/docs/agents-api/tools/functions),
93
+ [MCP guide](https://rebyte.ai/docs/agents-api/tools/mcp) and
94
+ [runnable deferred-functions recipe](../../examples/agents-api/README.md).
package/dist/cli.js CHANGED
@@ -12057,7 +12057,7 @@ var functionTool = external_exports.object({
12057
12057
  name,
12058
12058
  description: external_exports.string(),
12059
12059
  parameters: record,
12060
- defer_loading: external_exports.literal(false).optional()
12060
+ defer_loading: external_exports.boolean().optional()
12061
12061
  }).strict();
12062
12062
  var transport = external_exports.union([
12063
12063
  external_exports.object({ type: external_exports.literal("http"), server_url: external_exports.string().url().refine((value) => {
@@ -12088,6 +12088,7 @@ var webSearch = external_exports.object({
12088
12088
  context_size: external_exports.enum(["low", "medium", "high"]).optional(),
12089
12089
  allowed_domains: external_exports.array(external_exports.string()).optional()
12090
12090
  }).strict();
12091
+ var toolSearch = external_exports.object({ type: external_exports.literal("tool_search") }).strict();
12091
12092
  var reasoning = external_exports.object({
12092
12093
  effort: external_exports.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
12093
12094
  summary: external_exports.enum(["auto", "concise", "detailed"]).optional()
@@ -12101,13 +12102,13 @@ var manifestSchema = external_exports.object({
12101
12102
  name: external_exports.string().max(128).optional(),
12102
12103
  instructions: external_exports.string().max(1048576).optional(),
12103
12104
  instructions_file: external_exports.string().min(1).optional(),
12104
- tools: external_exports.array(external_exports.union([functionTool, mcpTool, webSearch])).default([]),
12105
+ tools: external_exports.array(external_exports.union([functionTool, mcpTool, webSearch, toolSearch])).default([]),
12105
12106
  reasoning: reasoning.optional(),
12106
12107
  text: text.optional(),
12107
12108
  service_tier: external_exports.enum(["auto", "default", "flex", "priority"]).optional(),
12108
12109
  metadata: external_exports.record(external_exports.string().max(64), external_exports.string().max(512)).refine((value) => Object.keys(value).length <= 16).optional()
12109
12110
  }).strict();
12110
- var reserved = ["exec_command", "write_stdin", "apply_patch", "view_image", "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource"];
12111
+ var reserved = ["exec_command", "write_stdin", "apply_patch", "view_image", "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", "search_tools", "call_tool", "tool_search"];
12111
12112
  function validateSchema(schema) {
12112
12113
  const ajv = new import_ajv.default({ strict: false, allErrors: true, validateFormats: true });
12113
12114
  (0, import_ajv_formats.default)(ajv);
@@ -12138,9 +12139,10 @@ function readAgentManifest(file) {
12138
12139
  delete manifest.instructions_file;
12139
12140
  }
12140
12141
  const names = [];
12142
+ if (manifest.tools.some((tool) => tool.type === "function" && tool.defer_loading) && !manifest.tools.some((tool) => tool.type === "tool_search")) throw new Error("defer_loading=true requires a tool_search tool");
12141
12143
  for (const tool of manifest.tools) {
12142
- const label = tool.type === "mcp" ? tool.server_label : tool.type === "function" ? tool.name : "web_search";
12143
- if (names.includes(label) || reserved.includes(label) || label.startsWith("rebyte_")) throw new Error(`Duplicate or reserved tool name: ${label}`);
12144
+ const label = tool.type === "mcp" ? tool.server_label : tool.type === "function" ? tool.name : tool.type;
12145
+ if (names.includes(label) || (tool.type === "function" || tool.type === "mcp") && reserved.includes(label) || label.startsWith("rebyte_")) throw new Error(`Duplicate or reserved tool name: ${label}`);
12144
12146
  names.push(label);
12145
12147
  if (tool.type === "function") validateSchema(tool.parameters);
12146
12148
  if (tool.type === "mcp") {
@@ -12203,7 +12205,7 @@ function serializeAgentManifest(agent) {
12203
12205
  // package.json
12204
12206
  var package_default = {
12205
12207
  name: "@rebyteai/cli",
12206
- version: "0.2.0",
12208
+ version: "0.2.2",
12207
12209
  description: "Create and manage Rebyte Agents from agent.toml",
12208
12210
  license: "MIT",
12209
12211
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebyteai/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Create and manage Rebyte Agents from agent.toml",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "ajv-formats": "3.0.1",
37
37
  "smol-toml": "^1.8.0",
38
38
  "zod": "^3.25.76",
39
- "@rebyteai/agent-sdk": "0.2.0"
39
+ "@rebyteai/agent-sdk": "0.2.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "esbuild": "^0.27.2"