@exulu/backend 5.17.2 → 5.19.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.
package/dist/index.d.cts CHANGED
@@ -1064,6 +1064,17 @@ type ExuluOauthToolContext = {
1064
1064
  declare const PUBLIC_TOOL_TYPES: readonly ["function", "web_search", "skill", "context"];
1065
1065
  type PublicToolType = (typeof PUBLIC_TOOL_TYPES)[number];
1066
1066
  type ToolType = PublicToolType | "agent" | "context";
1067
+ /**
1068
+ * Direct HTTP access to a tool, without an agent in between. An object rather
1069
+ * than a boolean so later options (rate limits, roles, …) have a place.
1070
+ */
1071
+ type ExuluToolApiConfig = {
1072
+ /**
1073
+ * true registers `POST /tools/<id>`: any authenticated caller may run the
1074
+ * tool with a JSON body matching `inputSchema`. Default false.
1075
+ */
1076
+ enabled: boolean;
1077
+ };
1067
1078
  declare class ExuluTool {
1068
1079
  id: string;
1069
1080
  name: string;
@@ -1090,13 +1101,15 @@ declare class ExuluTool {
1090
1101
  */
1091
1102
  alwaysAskWhen?: (input: unknown) => boolean;
1092
1103
  authentication?: ExuluAuthConfig;
1104
+ /** Always set; `{ enabled: false }` unless the tool opted in. See ExuluToolApiConfig. */
1105
+ api: ExuluToolApiConfig;
1093
1106
  config: {
1094
1107
  name: string;
1095
1108
  description: string;
1096
1109
  type: "boolean" | "string" | "number" | "variable" | "json";
1097
1110
  default?: string | boolean | number | object;
1098
1111
  }[];
1099
- constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, needsApprovalFn, alwaysAskWhen, authentication, }: {
1112
+ constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, needsApprovalFn, alwaysAskWhen, authentication, api, }: {
1100
1113
  id: string;
1101
1114
  name: string;
1102
1115
  description: string;
@@ -1116,6 +1129,7 @@ declare class ExuluTool {
1116
1129
  }) => Promise<boolean>;
1117
1130
  alwaysAskWhen?: (input: unknown) => boolean;
1118
1131
  authentication?: ExuluAuthConfig;
1132
+ api?: Partial<ExuluToolApiConfig>;
1119
1133
  execute: (inputs: any, options?: any) => Promise<{
1120
1134
  result?: string;
1121
1135
  job?: string;
package/dist/index.d.ts CHANGED
@@ -1064,6 +1064,17 @@ type ExuluOauthToolContext = {
1064
1064
  declare const PUBLIC_TOOL_TYPES: readonly ["function", "web_search", "skill", "context"];
1065
1065
  type PublicToolType = (typeof PUBLIC_TOOL_TYPES)[number];
1066
1066
  type ToolType = PublicToolType | "agent" | "context";
1067
+ /**
1068
+ * Direct HTTP access to a tool, without an agent in between. An object rather
1069
+ * than a boolean so later options (rate limits, roles, …) have a place.
1070
+ */
1071
+ type ExuluToolApiConfig = {
1072
+ /**
1073
+ * true registers `POST /tools/<id>`: any authenticated caller may run the
1074
+ * tool with a JSON body matching `inputSchema`. Default false.
1075
+ */
1076
+ enabled: boolean;
1077
+ };
1067
1078
  declare class ExuluTool {
1068
1079
  id: string;
1069
1080
  name: string;
@@ -1090,13 +1101,15 @@ declare class ExuluTool {
1090
1101
  */
1091
1102
  alwaysAskWhen?: (input: unknown) => boolean;
1092
1103
  authentication?: ExuluAuthConfig;
1104
+ /** Always set; `{ enabled: false }` unless the tool opted in. See ExuluToolApiConfig. */
1105
+ api: ExuluToolApiConfig;
1093
1106
  config: {
1094
1107
  name: string;
1095
1108
  description: string;
1096
1109
  type: "boolean" | "string" | "number" | "variable" | "json";
1097
1110
  default?: string | boolean | number | object;
1098
1111
  }[];
1099
- constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, needsApprovalFn, alwaysAskWhen, authentication, }: {
1112
+ constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, needsApprovalFn, alwaysAskWhen, authentication, api, }: {
1100
1113
  id: string;
1101
1114
  name: string;
1102
1115
  description: string;
@@ -1116,6 +1129,7 @@ declare class ExuluTool {
1116
1129
  }) => Promise<boolean>;
1117
1130
  alwaysAskWhen?: (input: unknown) => boolean;
1118
1131
  authentication?: ExuluAuthConfig;
1132
+ api?: Partial<ExuluToolApiConfig>;
1119
1133
  execute: (inputs: any, options?: any) => Promise<{
1120
1134
  result?: string;
1121
1135
  job?: string;