roboto.domain.skills.operations#

Module Contents#

class roboto.domain.skills.operations.CreateSkillRequest(/, **data)#

Bases: pydantic.BaseModel

Create a new skill plus its first version (version=1) in one call.

The author is auto-subscribed at creation time with ai_version set to 1 so the skill is immediately offered to the author’s AI.

Parameters:

data (Any)

accessibility: roboto.domain.skills.record.SkillAccessibility#

Private (only the author), Org (visible to every org member, author-only to edit), or OrgEditable (visible to every org member, editable by any member who subscribes). The author can flip this later via UpdateSkillMetadataRequest.

Type:

Visibility scope

body: str#

Procedure text v1 — the instructions the model executes when this version is invoked. Bumping the version creates a new row; this field never re-edits v1’s body after the fact (use UpdateSkillVersionRequest for that).

description: str = None#

“When to use” text for v1. Surfaces verbatim in the load_skill tool’s description so the model can decide whether to invoke this skill. Bumping the version replaces this text on the new row; this field never re-edits v1’s description after the fact.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str = None#

Skill name. Unique per org across every org-visible skill (Org and OrgEditable share one name namespace); private skills are unique per (org_id, created_by). A user’s private skill and an org-shared skill may therefore share a name without conflict. Must match SKILL_NAME_PATTERN so the name is parseable inside the chat composer’s /slug token (no whitespace, letters/digits/hyphens/underscores only).

tags: list[str] = None#

Initial set of tags. Edits after creation flow through UpdateSkillMetadataRequest.put_tags / .remove_tags so concurrent updates merge cleanly — see SkillRecord.tags.

class roboto.domain.skills.operations.CreateSkillVersionRequest(/, **data)#

Bases: pydantic.BaseModel

Add a new version to an existing skill. The new version is assigned MAX(version) + 1.

Parameters:

data (Any)

body: str#

Procedure text the model executes when this version is invoked.

description: str = None#

“When to use” text for this version. Surfaces verbatim in the load_skill tool’s description on every turn this version is offered to the AI.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

roboto.domain.skills.operations.SKILL_NAME_PATTERN = '^[A-Za-z0-9_-]+$'#
class roboto.domain.skills.operations.SetSkillSubscriptionRequest(/, **data)#

Bases: pydantic.BaseModel

Upsert the caller’s subscription for a skill.

Idempotent: creates the subscription row if missing, otherwise updates ai_version in place. Visibility-gated only — the caller does not need to be the skill’s author. The server enforces that ai_version, if provided, references an existing version of the skill.

Parameters:

data (Any)

ai_version: int | None = None#

Pinned AI-available version. None means “subscribed, but not exposed to AI”.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class roboto.domain.skills.operations.SkillListScope#

Bases: roboto.compat.StrEnum

Which caller-relative slice of the visible skills a list-skills query targets.

Org = 'org'#

Org-shared skills authored by someone else, regardless of whether the caller has subscribed.

Personal = 'personal'#

Skills the caller authored or has subscribed to — their personal set.

class roboto.domain.skills.operations.UpdateSkillMetadataRequest(/, **data)#

Bases: pydantic.BaseModel

Update top-level skill identity.

Editing name / put_tags / remove_tags is permitted for the author and — on an OrgEditable skill — for any subscribed org member. Changing accessibility is always author-only.

Parameters:

data (Any)

accessibility: roboto.domain.skills.record.SkillAccessibility | roboto.sentinels.NotSetType#

New visibility scope. Omit to leave unchanged. Author-only — a subscribed non-author editor of an OrgEditable skill cannot change it. Flipping PrivateOrg / OrgEditable immediately exposes the skill to every org member; flipping to Private prunes every non-author subscription.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | roboto.sentinels.NotSetType = None#

New skill name. Omit (the NotSet default) to leave unchanged. Must match SKILL_NAME_PATTERN and stays unique per org (private skills per author).

put_tags: list[str] = None#

Tags to add. Empty (the default) means “no change to tags.” Additive semantics — does not clear other tags.

remove_tags: list[str] = None#

Tags to remove. Empty (the default) means “no change to tags.” Removing a tag the skill doesn’t have is a no-op.

class roboto.domain.skills.operations.UpdateSkillVersionRequest(/, **data)#

Bases: pydantic.BaseModel

Edit fields on an existing version (mutates in place).

Parameters:

data (Any)

body: str | roboto.sentinels.NotSetType#

New procedure text. Omit (the NotSet default) to leave unchanged. The change applies in place to this version — subscribers pinned to it will see the new body on their next AI invocation; there is no per-edit revision.

description: str | roboto.sentinels.NotSetType = None#

New “when to use” text. Omit (the NotSet default) to leave unchanged.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].