feat(claw): load skills and subagents and edit the identity files
android / debug (push) Successful in 2m12s
ci / checks (push) Successful in 3m42s
ci / web (push) Successful in 12s
android / release (push) Successful in 2m5s
ci / test (push) Successful in 2m12s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 1m58s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m55s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 4s
android / debug (push) Successful in 2m12s
ci / checks (push) Successful in 3m42s
ci / web (push) Successful in 12s
android / release (push) Successful in 2m5s
ci / test (push) Successful in 2m12s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 1m58s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m55s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 4s
The claw's agents had no skills and no way to delegate, and the settings
surface could only read a pair of booleans.
Skills now seed the bundled `commit-message` and `unslop` folders into
the global directory, discover the global and workspace tiers on every
dispatch, and list them in the prompt. The settings table owns an off
switch per skill, so the Skills page can hold one back without editing
YAML. The config set is the seed.
Subagents build on `rhema-subagents`. Definitions are `SUBAGENT.md`
folders under the global directory and the workspace tier, and the
parent prompt advertises the `subagent` tool. The wire passes the
parent's skills, environment report, and USER.md to the child, so a
delegated turn knows the same context.
The Bootstrap page reads the three identity files and writes SOUL.md
and USER.md. ENVIRONMENT.md stays read-only because the boot pass
rewrites it. The MCP page reads the client's config through the same
file the shell uses and shows servers, transports, and the daemon's
mute set. It stays read-only: the standalone client owns that file.
`GET` and `PUT /v1/bootstrap/{kind}`, `GET /v1/bootstrap/files`, `GET`
and `PUT /v1/skills`, and `GET /v1/mcp` carry the pages. The config
gains `skills_root`, `skills_disabled`, `subagents_root`, and
`disabled_subagents`.
fmt, clippy with -D warnings over all targets, the 304 lib and 46 HTTP
tests, and nuxt typecheck and build pass.
This commit is contained in:
1 parent
eb9f4e9ec5
commit
829f30d27e
31 files changed
+2604
-102
No files matched your search
@@ -0,0 +1,179 @@
|
||||
<script setup lang="ts">
|
||||
// The Skills page: what discovery finds for the chat workspace, what
|
||||
// each skill's trigger is, and its on/off switch. Toggles persist in
|
||||
// the daemon's settings table, so a row flips without editing config.
|
||||
import type { ClawSkill, SkillsState } from '~/composables/useClaw'
|
||||
|
||||
defineProps<{
|
||||
state: SkillsState | null
|
||||
loading: boolean
|
||||
/** The skill whose toggle is in flight. */
|
||||
saving: string | null
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
refresh: []
|
||||
toggle: [name: string, enabled: boolean]
|
||||
}>()
|
||||
|
||||
const TIERS: Record<ClawSkill['tier'], string> = {
|
||||
workspace: 'workspace',
|
||||
global: 'global',
|
||||
'workspace-agents': 'workspace .agents',
|
||||
'home-agents': 'home .agents',
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
<PageHeader title="Skills" subtitle="Instruction files the agent reads on demand.">
|
||||
<template #actions>
|
||||
<button :disabled="loading" @click="$emit('refresh')">
|
||||
{{ loading ? 'Refreshing…' : 'Refresh' }}
|
||||
</button>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div class="scroll">
|
||||
<p v-if="!state" class="muted">loading skills…</p>
|
||||
|
||||
<template v-else>
|
||||
<AppCallout
|
||||
v-if="state.disabled.length"
|
||||
variant="info"
|
||||
title="Some skills are held back"
|
||||
>
|
||||
A disabled skill keeps its files and disappears from the prompt
|
||||
and the transcript. The switch persists across restarts.
|
||||
</AppCallout>
|
||||
|
||||
<SettingCard title="Installed" :meta="`${state.skills.length} found`">
|
||||
<p v-if="state.skills.length === 0" class="empty">
|
||||
No skills found. Put a <code>SKILL.md</code> under a folder in the
|
||||
global directory, or in the workspace's
|
||||
<code>.rhema/skills</code>.
|
||||
</p>
|
||||
|
||||
<template v-else>
|
||||
<div v-for="skill in state.skills" :key="skill.name" class="skill">
|
||||
<div class="skill-head">
|
||||
<span class="skill-name mono">{{ skill.name }}</span>
|
||||
<span class="skill-tier">{{ TIERS[skill.tier] }}</span>
|
||||
<span class="skill-state" :class="{ off: !skill.enabled }">
|
||||
{{ skill.enabled ? 'enabled' : 'disabled' }}
|
||||
</span>
|
||||
<button
|
||||
class="skill-toggle"
|
||||
:disabled="saving === skill.name"
|
||||
:aria-label="`${skill.enabled ? 'Disable' : 'Enable'} ${skill.name}`"
|
||||
@click="$emit('toggle', skill.name, !skill.enabled)"
|
||||
>
|
||||
{{ saving === skill.name ? 'Saving…' : skill.enabled ? 'Disable' : 'Enable' }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="skill-trigger">{{ skill.description }}</p>
|
||||
<p class="skill-path mono">{{ skill.path }}</p>
|
||||
</div>
|
||||
</template>
|
||||
</SettingCard>
|
||||
|
||||
<p class="footnote">
|
||||
Discovery reads <span class="mono">{{ state.root }}</span>, then the
|
||||
chat workspace's <code>.rhema/skills</code> and
|
||||
<code>.agents/skills</code> under
|
||||
<span class="mono">{{ state.workspace }}</span>. A skill in a rhema
|
||||
directory shadows the same name in an <code>.agents</code> directory.
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0 24px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
max-width: 860px;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--text3);
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 0;
|
||||
padding: 13px 16px;
|
||||
color: var(--text3);
|
||||
}
|
||||
|
||||
.skill {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.skill-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.skill-name {
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.skill-tier {
|
||||
color: var(--text3);
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.skill-state {
|
||||
margin-left: auto;
|
||||
color: var(--ok);
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.skill-state.off {
|
||||
color: var(--text3);
|
||||
}
|
||||
|
||||
.skill-toggle {
|
||||
padding: 2px 9px;
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.skill-trigger {
|
||||
margin: 0;
|
||||
color: var(--text2);
|
||||
font-size: 12.5px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.skill-path {
|
||||
margin: 0;
|
||||
color: var(--text3);
|
||||
font-size: 11.5px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.footnote {
|
||||
margin: 0;
|
||||
padding: 0 2px;
|
||||
color: var(--text3);
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user