scenario-team-admin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScenario Team Administration
Scenario团队管理
Overview
概述
Enterprise teams govern Scenario from the same agent that generates on it: which models anyone may run, who is on the team and in which projects, how much each member may spend, and which API keys exist with which roles. Every tool here is catalog-only: returns the schema and lane, and / / runs it with , scope ids inside (see the skill). Two facts decide most failures before any argument does: the identity behind the call, since team-level writes need a human team admin over OAuth and refuse API keys, and the list mode the team runs, since the same model-access edit means the opposite thing in blocklist and allowlist mode. already tells you both: each team row carries , its model lists, , and . A credential that reaches one team and one project has its scope; more than one is a stop-and-list, per the skill. If a sibling skill named here is missing from your available skills, ask the user to install it (); unattended, proceed from tool schemas and flag the gap.
scenario_tools_searchscenario_tool_execute_readwritedelete{name, parameters}parametersscenarioteams_listmodelsManagementplancontext.userRolescenarionpx skills add scenario-labs/skills --skill <name>企业团队可通过用于生成内容的同一个Agent来治理Scenario:包括谁可以运行哪些模型、团队成员名单及所属项目、每位成员的消费额度,以及存在哪些角色的API密钥。此处的所有工具均为目录式: 返回schema和通道(lane), / / 通过 执行工具,权限范围ID位于 中(参见 skill)。大多数故障在传入参数前就由两个因素决定:一是调用背后的身份——团队级别的写入操作需要通过OAuth认证的人类团队管理员执行,拒绝API密钥调用;二是团队运行的列表模式——同一项模型访问编辑操作在blocklist和allowlist模式下的效果完全相反。 可以同时告知这两个信息:每个团队条目都包含 (其模型列表)、 和 。仅关联一个团队和一个项目的凭证具有明确的权限范围;若关联多个,则需按 skill的要求暂停并列出范围。如果你的可用技能中缺少此处提到的关联技能,请让用户安装();在无人值守模式下,可基于工具schema继续操作并标记缺失的技能。
scenario_tools_searchscenario_tool_execute_readwritedelete{name, parameters}parametersscenarioteams_listmodelsManagementplancontext.userRolescenarionpx skills add scenario-labs/skills --skill <name>Quick reference
快速参考
| Task | Tool | Lane | Notes |
|---|---|---|---|
| Read model access | | read | Mode plus the team's active list; |
| Change model access | | write | |
| Team roster | | read | Members and pending invitations |
| Invite | | write | 1 to 32 |
| Roles and spend caps | | write | |
| Remove from the team | | delete | Also withdraws invitations; access ends immediately |
| Project roster | | read, write, delete | Roles |
| API keys | | read, write, delete | Project scope; |
| Who spent what | | read (default tools) | Per-user and per-model consumption in the default response |
| 任务 | 工具 | 通道 | 说明 |
|---|---|---|---|
| 读取模型访问权限 | | read | 返回模式及团队的生效列表;传入 |
| 修改模型访问权限 | | write | |
| 团队成员名单 | | read | 成员及待处理邀请 |
| 邀请成员 | | write | 1至32个 |
| 角色与消费上限 | | write | |
| 移除团队成员 | | delete | 同时撤回邀请;访问权限立即终止 |
| 项目成员名单 | | read、write、delete | 角色包括 |
| API密钥 | | read、write、delete | 项目范围; |
| 消费统计 | | read(默认工具) | 默认返回按用户和按模型的消耗数据 |
Model access: read the mode before editing
模型访问:编辑前先读取模式
model_access_getmodels_managementmodel_access_updateadd_modelsremove_modelslevel: "team"level: "project"projectsproject_idupdated: falsescenario-moderationmodel_access_getmodels_managementmodel_access_updateadd_modelsremove_modelslevel: "team"level: "project"projectsproject_id在allowlist模式下,项目管理员只能添加已在团队allowlist中的模型(项目列表只能收窄目录范围,不能扩大);从团队allowlist中移除基础模型会级联移除基于该模型训练的所有模型;团队级别的添加操作会校验每个ID,只要有一个未知ID就会导致整个调用失败。 表示差异为空,操作无变化,不是错误。被封禁的模型会从成员可运行的列表中消失,成员若尝试运行被封禁的模型,收到的错误是权限限制提示,而非内容审核提示(参见 )。
updated: falsescenario-moderationMembers and spend caps
成员与消费上限
team_members_updatemember_idsteam_members_listroleadminmembermax_consumption-1nullteam.members.managestatus: "partial"remainingteam_members_addrolememberproject_idsinvitedfailedskippedproject_idteam.members.manageproject_members_addteam_idRemoval is the delete lane and immediate: ends the person's access everywhere and withdraws pending invitations, leaves team membership and other projects untouched. List first, confirm the exact names with the user, then remove; unattended, remove only the members the task instructions name.
team_members_removeproject_members_removeteam_members_updateteam_members_listmember_idsroleadminmembermax_consumption-1null角色设置可由通过OAuth认证的团队管理员执行,或由具有 权限的团队范围API密钥执行;但消费上限设置必须由真实的团队管理员操作,使用API密钥尝试设置会被逐成员拒绝。降级最后一个admin的操作会在服务端失败。批量成员工具每次处理一条记录,并逐成员返回结果;若响应中 ,可使用返回的 列表再次调用以完成剩余操作。
team.members.managestatus: "partial"remainingteam_members_addrolememberproject_idsinvitedfailedskippedproject_idteam.members.manageproject_members_addteam_id移除操作属于delete通道,且立即生效: 会终止用户在所有地方的访问权限,并撤回待处理的邀请; 则不会影响用户的团队成员身份和其他项目的权限。操作前请先列出名单,与用户确认具体人员后再移除;在无人值守模式下,仅移除任务指令中明确指定的成员。
team_members_removeproject_members_removeAPI keys
API密钥
api_keys_listapi_key_getidapi_key_idmanage_keys_urlapi_key_updateroleadmineditorreader;assets.read;models.runapi_key_createscenarioapi_key_deletekey_ididapi_key_idapi_keys_listapi_key_getidapi_key_idmanage_keys_urlapi_key_updateroleadmineditorreaderassets.read;models.run密钥创建特意不设为MCP操作: 仅返回门户链接,密钥明文仅在门户中显示一次,永远不会经过对话传输( skill的密钥规则在此处同样适用)。
api_key_createscenarioapi_key_deletekey_ididapi_key_idWho spent what
消费统计
usagestart_dateend_dateproject_idtotalsconsumptionuserIdtotalstart_dateend_dateinclude: ["usages.daily"]["modelUsages.daily"]nsfwUsagesactivityusagestart_dateend_dateproject_id未传入日期的调用会返回项目全生命周期的数据,因此请务必传入时间范围: 和按用户的 行(、)都基于 和 ,成员排名可从这些行中得出。每日数据系列(按使用类型传入 ,按模型传入 )不包含用户维度; 会返回内容审核统计, 返回原始事件日志。
totalsconsumptionuserIdtotalstart_dateend_dateinclude: ["usages.daily"]["modelUsages.daily"]nsfwUsagesactivity绝对不要通过累加自身调用的方式统计消费。设置消费上限前请先读取消耗数据:两者都以计费周期内的CU为单位,如果上限低于成员已消耗的额度,会立即停止其使用权限。
Worked example: lock a project to approved models and cap the contractors
示例:将项目锁定为批准的模型集,并设置外包人员消费上限
- with
scenario_tools_search, thenquery="model access": schemas and lanes for the calls below.query="team members" - with
scenario_tool_execute_read,name: "model_access_get". The team is in blocklist mode, so "only these three models" is not expressible: tell the user to switch the team to allowlist in the web app's team settings, then re-read; unattended, log the gap with the calls below and stop, blocking any models the task names as unwanted at project level in the meantime.parameters: {"team_id", "project_id"} - In allowlist mode, the team list first: with
scenario_tool_execute_write,name: "model_access_update"; this is the call that needs the caller to be a team admin over OAuth (parameters: {"team_id", "project_id", "level": "team", "add_models": [<the three ids>]}on thecontext.userRolerow says whether they are). Then the project:teams_list,level: "project", the sameprojects: [<project id>], which succeeds only because the team list now carries them.add_models - with
scenario_tool_execute_read: the two contractors' member ids.name: "team_members_list"withscenario_tool_execute_write,name: "team_members_update". Onparameters: {"team_id", "project_id", "member_ids": [<two ids>], "max_consumption": 2000}, call again withstatus: "partial".remaining - with
scenario_tool_execute_readfor the project. A render-farm key running asname: "api_keys_list"is narrowed withadmin,api_key_update, and any key nobody can account for is deleted only after the user confirms it by name.role: "assets.read;models.run" - Confirm: with
model_access_getshows the project listproject_idwith the three ids; later in the period,configuredwith the date range andusageshows the contractors' consumption against the cap.include: ["usages.daily"]
- 调用 ,先传入
scenario_tools_search,再传入query="model access":获取后续调用所需的schema和通道信息。query="team members" - 调用 ,传入
scenario_tool_execute_read,name: "model_access_get"。如果团队处于blocklist模式,则无法实现“仅允许这三个模型”的需求:告知用户需在Web应用的团队设置中将团队切换为allowlist模式,然后重新读取;在无人值守模式下,记录该限制及后续待执行的调用并暂停,同时先在项目层级封禁任务中指定的不需要的模型。parameters: {"team_id", "project_id"} - 切换到allowlist模式后,先配置团队列表:调用 ,传入
scenario_tool_execute_write,name: "model_access_update";该调用需要调用者是通过OAuth认证的团队管理员(可通过parameters: {"team_id", "project_id", "level": "team", "add_models": [<三个模型ID>]}条目中的teams_list判断)。然后配置项目列表:context.userRole,level: "project",传入相同的projects: [<项目ID>],只有团队列表已包含这些模型时,项目级操作才会成功。add_models - 调用 ,传入
scenario_tool_execute_read:获取两位外包人员的成员ID。调用name: "team_members_list",传入scenario_tool_execute_write,name: "team_members_update"。如果返回parameters: {"team_id", "project_id", "member_ids": [<两个ID>], "max_consumption": 2000},使用status: "partial"列表再次调用。remaining - 调用 ,传入
scenario_tool_execute_read获取项目的密钥列表。对于一个以name: "api_keys_list"身份运行的渲染农场密钥,使用admin将其权限收窄为api_key_update;对于无人认领的密钥,需由用户按名称确认后再删除。role: "assets.read;models.run" - 验证:调用 并传入
model_access_get,确认项目列表已project_id这三个ID;在计费周期后期,调用configured并传入日期范围和usage,查看外包人员的消耗与上限的对比。include: ["usages.daily"]
Common mistakes
常见错误
- Editing model access without reading :
models_managementblocks in one mode and allows in the other.add_models - Trying to lock a team to a short list while in blocklist mode: that is an allowlist job, and the mode switch is a web-app setting.
- Team-level writes through an API key: refused by design; the caller is a human team admin over OAuth.
- instead of
argumentson the executor: dropped silently and surfaced as a scope error (seeparameters).scenario - Setting caps with a key: it can change roles, not caps.
team.members.manage - Reading an undated call as the period's spend: its figures are project-lifetime. Pass
usageandstart_date, rank members from the datedend_daterows, and use the per-day series only to cross-check a period total, since it carries no user dimension.consumption - Expecting to show team-scoped keys: they exist only in the portal.
api_keys_list - Passing to
project_idto grant project access:team_members_addgrants;project_idsis tenant context.project_id - Deleting a key or removing a member without listing and confirming first: the delete lane is irreversible, and refuses the session's own key.
api_key_delete
- 未读取 就编辑模型访问权限:
models_management在两种模式下的作用完全相反(一种是封禁,一种是放行)。add_models - 在blocklist模式下尝试将团队锁定为少量模型:这是allowlist模式的功能,模式切换需在Web应用中设置。
- 通过API密钥执行团队级写入操作:这是设计上的拒绝规则,必须由通过OAuth认证的人类团队管理员调用。
- 执行器中使用 而非
arguments:参数会被静默丢弃,并表现为权限范围错误(参见parametersskill)。scenario - 使用具有 权限的密钥设置消费上限:该密钥只能修改角色,不能设置上限。
team.members.manage - 将未传日期的 调用结果当作当期消费:其数据是项目全生命周期的。请传入
usage和start_date,从带日期的end_date行中得出成员排名,每日数据系列仅用于交叉验证周期总消耗,因为它不包含用户维度。consumption - 期望 显示团队范围的密钥:这类密钥仅在门户中存在。
api_keys_list - 向 传入
team_members_add来授予项目权限:授予项目权限的参数是project_id;project_ids只是租户上下文。project_id - 未先列出并确认就删除密钥或移除成员:delete通道的操作不可逆,且 会拒绝删除当前会话使用的密钥。
api_key_delete