贡献点参考
本参考面向正在连接 profile、workflow 和 slash command 的扩展作者。用它确认每个贡献点的字段、引用规则和碰撞规则。
contributes.profiles
标题为“contributes.profiles”的章节| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
id |
string | yes | none | Must match [a-z0-9][a-z0-9_-]{0,63} |
Pack-local id. |
path |
string | yes | none | Must point to a file inside the pack root | File is parsed as Agent Profile YAML. |
安装后,Jarvis 会写入 profile ownership metadata:
source: extensionowner_pack_idowner_contribution_idlocked: true
用户可以复制 extension-owned profile,复制件会变成 user-owned。
contributes.workflows
标题为“contributes.workflows”的章节| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
id |
string | yes | none | Must match [a-z0-9][a-z0-9_-]{0,63} |
Pack-local id. |
path |
string | yes | none | Must point to a file inside the pack root | File is parsed as PipelineDefinitionSpec. |
title |
string | no | empty | String | Human label for validation output. |
input |
object | no | {} |
Object | Optional command usage metadata. |
Workflow nodes can reference profiles from the same pack:
profile_id: "profile:tunnel-operator"Jarvis rewrites the symbolic ref during materialization. A missing local profile ref is a validation error.
contributes.commands
标题为“contributes.commands”的章节| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
command |
string | yes | none | Lowercase, must match /[a-z][a-z0-9-]{1,63} |
Must not collide with built-ins or enabled packs. |
title |
string | yes | none | String | Short command label. |
description |
string | no | empty | String | Shown in slash command menu. |
usage |
string | no | command name | String | Example invocation. |
action |
object | yes | none | Must be a supported action | Core-owned execution mapping. |
Action: startWorkflow
标题为“Action: startWorkflow”的章节Starts a workflow contributed by the same pack.
action: type: startWorkflow workflow: open-tunnel taskTemplate: "Tunnel request: {{args}}"| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
type |
string | yes | none | Must be startWorkflow |
Action discriminator. |
workflow |
string | yes | none | Must match a workflow contribution id | Resolved to materialized workflow id at execution time. |
taskTemplate |
string | no | {{args}} |
String | {{args}} is replaced with text after the slash command. |
Action: launchProfile
标题为“Action: launchProfile”的章节Launches a worker session with a profile contributed by the same pack.
action: type: launchProfile profile: reviewer promptTemplate: "Review: {{args}}"| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
type |
string | yes | none | Must be launchProfile |
Action discriminator. |
profile |
string | yes | none | Must match a profile contribution id | Resolved to materialized profile id. |
promptTemplate |
string | no | {{args}} |
String | Rendered into the worker prompt. |
Action: openRoute
标题为“Action: openRoute”的章节Returns a client action for an existing Jarvis route.
action: type: openRoute route: /studio| Field | Type | Required | Default | Validation | Notes |
|---|---|---|---|---|---|
type |
string | yes | none | Must be openRoute |
Action discriminator. |
route |
string | yes | none | Must be an allowlisted internal Jarvis route | The frontend navigates only after the host returns a client action. |
Collision Rules
标题为“Collision Rules”的章节- Built-in command names always win.
- A pack cannot repeat the same profile id, workflow id, or command name.
- Enabling a pack fails if any command conflicts with a built-in command.
- Enabling a pack fails if any command conflicts with another enabled pack.
- Disabled packs do not contribute commands to autocomplete or execution.