mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 13:34:33 +00:00
fix(quota): exclude agents from quota rules and usage records (#325)
* fix(quota): exclude agents from quota rules and usage records * refactor(quota): remove agent_skill_call_count resource type and related logic * chore(db): replace manual migration with prisma-generated migration
This commit is contained in:
-3
@@ -1015,7 +1015,6 @@ export * from "./quota_scope_user_description.js";
|
||||
export * from "./quota_resource.js";
|
||||
export * from "./quota_resource_agent_total_tokens.js";
|
||||
export * from "./quota_resource_agent_cost.js";
|
||||
export * from "./quota_resource_agent_skill_call_count.js";
|
||||
export * from "./quota_resource_agent_mcp_call_count.js";
|
||||
export * from "./quota_resource_agent_bash_call_count.js";
|
||||
export * from "./quota_resource_agent_tool_call_count.js";
|
||||
@@ -1064,14 +1063,12 @@ export * from "./quota_selected_users_count.js";
|
||||
export * from "./select_members.js";
|
||||
export * from "./select_role.js";
|
||||
export * from "./select_user.js";
|
||||
export * from "./select_skill.js";
|
||||
export * from "./select_mcp_server.js";
|
||||
export * from "./select_tool.js";
|
||||
export * from "./custom_id.js";
|
||||
export * from "./enter_custom_id.js";
|
||||
export * from "./bash_command_pattern.js";
|
||||
export * from "./bash_command_pattern_placeholder.js";
|
||||
export * from "./enter_skill_id.js";
|
||||
export * from "./enter_mcp_id.js";
|
||||
export * from "./quota_bash_hint.js";
|
||||
export * from "./quota_tool_hint.js";
|
||||
|
||||
-3
@@ -1017,7 +1017,6 @@ export * from './quota_scope_user_description.js'
|
||||
export * from './quota_resource.js'
|
||||
export * from './quota_resource_agent_total_tokens.js'
|
||||
export * from './quota_resource_agent_cost.js'
|
||||
export * from './quota_resource_agent_skill_call_count.js'
|
||||
export * from './quota_resource_agent_mcp_call_count.js'
|
||||
export * from './quota_resource_agent_bash_call_count.js'
|
||||
export * from './quota_resource_agent_tool_call_count.js'
|
||||
@@ -1066,14 +1065,12 @@ export * from './quota_selected_users_count.js'
|
||||
export * from './select_members.js'
|
||||
export * from './select_role.js'
|
||||
export * from './select_user.js'
|
||||
export * from './select_skill.js'
|
||||
export * from './select_mcp_server.js'
|
||||
export * from './select_tool.js'
|
||||
export * from './custom_id.js'
|
||||
export * from './enter_custom_id.js'
|
||||
export * from './bash_command_pattern.js'
|
||||
export * from './bash_command_pattern_placeholder.js'
|
||||
export * from './enter_skill_id.js'
|
||||
export * from './enter_mcp_id.js'
|
||||
export * from './quota_bash_hint.js'
|
||||
export * from './quota_tool_hint.js'
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter Skill ID" |
|
||||
*
|
||||
* @param {Enter_Skill_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_skill_id: ((inputs?: Enter_Skill_IdInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enter_Skill_IdInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Enter_Skill_IdInputs = {};
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Enter_Skill_IdInputs */
|
||||
|
||||
const en_enter_skill_id = /** @type {(inputs: Enter_Skill_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enter Skill ID`)
|
||||
};
|
||||
|
||||
const zh_enter_skill_id = /** @type {(inputs: Enter_Skill_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`输入技能 ID`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter Skill ID" |
|
||||
*
|
||||
* @param {Enter_Skill_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_skill_id = /** @type {((inputs?: Enter_Skill_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enter_Skill_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_enter_skill_id(inputs)
|
||||
return zh_enter_skill_id(inputs)
|
||||
});
|
||||
+1
-1
@@ -10,7 +10,7 @@ const en_no_quotas_description = /** @type {(inputs: No_Quotas_DescriptionInputs
|
||||
};
|
||||
|
||||
const zh_no_quotas_description = /** @type {(inputs: No_Quotas_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`为 AI Token、费用、Skill 执行和智能体工具调用设置限制,以便管理团队的使用情况。`)
|
||||
return /** @type {LocalizedString} */ (`为 AI Token、费用、MCP 服务和智能体工具调用设置限制,以便管理团队的使用情况。`)
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Skill Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Skill_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_skill_call_count: ((inputs?: Quota_Resource_Agent_Skill_Call_CountInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Skill_Call_CountInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Skill_Call_CountInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Skill_Call_CountInputs */
|
||||
|
||||
const en_quota_resource_agent_skill_call_count = /** @type {(inputs: Quota_Resource_Agent_Skill_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Skill Calls`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_skill_call_count = /** @type {(inputs: Quota_Resource_Agent_Skill_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Skill 调用次数`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Skill Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Skill_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_skill_call_count = /** @type {((inputs?: Quota_Resource_Agent_Skill_Call_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Skill_Call_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_skill_call_count(inputs)
|
||||
return zh_quota_resource_agent_skill_call_count(inputs)
|
||||
});
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Select Skill" |
|
||||
*
|
||||
* @param {Select_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const select_skill: ((inputs?: Select_SkillInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Select_SkillInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Select_SkillInputs = {};
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Select_SkillInputs */
|
||||
|
||||
const en_select_skill = /** @type {(inputs: Select_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Select Skill`)
|
||||
};
|
||||
|
||||
const zh_select_skill = /** @type {(inputs: Select_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`选择 Skill`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Select Skill" |
|
||||
*
|
||||
* @param {Select_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const select_skill = /** @type {((inputs?: Select_SkillInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Select_SkillInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_select_skill(inputs)
|
||||
return zh_select_skill(inputs)
|
||||
});
|
||||
Reference in New Issue
Block a user