Publish hermes-skills-autonomous-ai-agents via gitea-publish skill
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Reference user widget: a live clock docked above the status bar.
|
||||
* Copy to ~/.hermes/tui-widgets/clock.mjs, then `/widgets-reload` and `/clock`.
|
||||
*/
|
||||
export default function register(sdk) {
|
||||
const { Box, Dialog, React, Text, defineWidgetApp, h } = sdk
|
||||
|
||||
function Face({ label, t }) {
|
||||
const [now, setNow] = React.useState(() => new Date())
|
||||
|
||||
React.useEffect(() => {
|
||||
const id = setInterval(() => setNow(new Date()), 1000)
|
||||
|
||||
return () => clearInterval(id)
|
||||
}, [])
|
||||
|
||||
return h(
|
||||
Box,
|
||||
{ columnGap: 1, flexDirection: 'row' },
|
||||
h(Text, { bold: true, color: t.color.label }, label),
|
||||
h(Text, { color: t.color.text }, now.toLocaleTimeString('en-GB', { hour12: false, timeZone: label === 'local' ? undefined : label }))
|
||||
)
|
||||
}
|
||||
|
||||
defineWidgetApp({
|
||||
id: 'clock',
|
||||
help: 'live clock in the dock (arg: IANA timezone)',
|
||||
mode: 'ambient',
|
||||
usage: 'usage: /clock [timezone] e.g. /clock UTC · /clock Asia/Tokyo',
|
||||
|
||||
init(arg) {
|
||||
const label = arg.trim() || 'local'
|
||||
|
||||
try {
|
||||
new Date().toLocaleTimeString('en-GB', { timeZone: label === 'local' ? undefined : label })
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
|
||||
return { label }
|
||||
},
|
||||
|
||||
reduce(state, { ch, key }) {
|
||||
return key.escape || ch === 'q' ? null : state
|
||||
},
|
||||
|
||||
render({ state, t }) {
|
||||
return h(Dialog, { width: 30 }, h(Face, { label: state.label, t }))
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Hermes desktop plugin template. Save as:
|
||||
* <hermes home>/desktop-plugins/<id>/plugin.js (folder name == id)
|
||||
* where <hermes home> is ~/.hermes by default, or ~/.hermes/profiles/<name>
|
||||
* when running a named profile (`hermes -p <name>`). Run `hermes doctor` (or
|
||||
* check the app's Settings → Plugins folder path) if unsure which is active.
|
||||
* Then run "Reload desktop plugins" from ⌘K in the desktop app.
|
||||
*
|
||||
* Plain ESM, loaded uncompiled — UI is jsx() calls, not JSX syntax.
|
||||
* Only these imports resolve: @hermes/plugin-sdk, react, react/jsx-runtime.
|
||||
*/
|
||||
|
||||
import { cn, haptic, host, Tip, usePluginI18n, useValue } from '@hermes/plugin-sdk'
|
||||
import { jsx, jsxs } from 'react/jsx-runtime'
|
||||
|
||||
// Ship your OWN strings (never edit core en.ts). `usePluginI18n` resolves them
|
||||
// against the app's active locale, falling back to `en`, then the raw key.
|
||||
const ID = 'my-plugin'
|
||||
|
||||
function MyPane() {
|
||||
const t = usePluginI18n(ID)
|
||||
const gateway = useValue(host.state.gateway)
|
||||
|
||||
return jsxs('div', {
|
||||
className: 'flex h-full flex-col gap-2 p-3 text-sm',
|
||||
children: [
|
||||
jsx('div', { className: 'font-medium', children: t('paneTitle') }),
|
||||
jsx('div', {
|
||||
className: 'text-(--ui-text-tertiary)',
|
||||
children: t('gateway', gateway)
|
||||
})
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
function MyChip() {
|
||||
const t = usePluginI18n(ID)
|
||||
|
||||
return jsx(Tip, {
|
||||
label: t('chipTip'),
|
||||
children: jsx('button', {
|
||||
className: cn(
|
||||
'inline-flex h-full items-center gap-1 px-1.5 text-[0.6875rem] transition-colors',
|
||||
'text-(--ui-text-tertiary) hover:bg-(--chrome-action-hover) hover:text-foreground'
|
||||
),
|
||||
type: 'button',
|
||||
onClick: () => {
|
||||
haptic('tap')
|
||||
host.notify({ kind: 'info', message: t('hello') })
|
||||
},
|
||||
children: 'my-plugin'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
id: ID, // must match the folder name
|
||||
name: 'My Plugin',
|
||||
register(ctx) {
|
||||
// Register locale bundles — scoped to this plugin, torn down on reload.
|
||||
// Values are literals or interpolators (`arg => `…${arg}…``).
|
||||
ctx.i18n.register({
|
||||
en: {
|
||||
paneTitle: 'My Plugin Pane',
|
||||
gateway: state => `gateway: ${state}`,
|
||||
chipTip: 'My plugin — click me',
|
||||
hello: 'Hello from my plugin!'
|
||||
},
|
||||
ja: {
|
||||
paneTitle: 'マイプラグイン',
|
||||
gateway: state => `ゲートウェイ: ${state}`,
|
||||
chipTip: 'マイプラグイン — クリック',
|
||||
hello: 'マイプラグインからこんにちは!'
|
||||
}
|
||||
})
|
||||
|
||||
// A layout pane — auto-placed by the placement hint; user can drag it.
|
||||
// To land on a specific edge instead of stacking, add a dock gesture,
|
||||
// e.g. below the conversation:
|
||||
// data: { placement: 'bottom', dock: { pane: 'workspace', pos: 'bottom' }, height: '200px' }
|
||||
ctx.register({
|
||||
id: 'pane',
|
||||
area: 'panes',
|
||||
title: 'my plugin',
|
||||
data: { placement: 'right', width: '237px' },
|
||||
render: () => jsx(MyPane, {})
|
||||
})
|
||||
|
||||
// A statusbar chip.
|
||||
ctx.register({
|
||||
id: 'chip',
|
||||
area: 'statusBar.right',
|
||||
order: 130,
|
||||
render: () => jsx(MyChip, {})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
# Hermes skin template — themes the CLI, TUI, and desktop GUI from one file.
|
||||
# Copy to <hermes-home>/skins/<name>.yaml, edit the palette, then set
|
||||
# `display.skin: <name>` in config.yaml. Missing keys inherit the default skin.
|
||||
|
||||
name: synthwave
|
||||
description: Neon dusk — magenta and cyan on deep indigo
|
||||
|
||||
colors:
|
||||
# Base surface — set this. The GUI derives its palette from it; the TUI
|
||||
# status bar and CLI chrome seed from it too.
|
||||
background: "#1a1030"
|
||||
|
||||
# Brand accent — buttons, focus rings, GUI primary. Keep it legible (~4.5:1)
|
||||
# against `background`.
|
||||
ui_accent: "#ff5fd2"
|
||||
banner_accent: "#ff5fd2"
|
||||
|
||||
# Text hierarchy.
|
||||
banner_title: "#7ef9ff" # headings / primary
|
||||
banner_text: "#e6e0ff" # body foreground
|
||||
ui_text: "#e6e0ff"
|
||||
banner_dim: "#8a7fb5" # muted / secondary
|
||||
banner_border: "#3a2a63"
|
||||
ui_border: "#3a2a63"
|
||||
|
||||
# Semantic status.
|
||||
ui_ok: "#5af7b0"
|
||||
ui_warn: "#ffcf5f"
|
||||
ui_error: "#ff6b7d"
|
||||
|
||||
# CLI / TUI chrome.
|
||||
prompt: "#e6e0ff"
|
||||
input_rule: "#ff5fd2"
|
||||
response_border: "#7ef9ff"
|
||||
status_bar_bg: "#120a24"
|
||||
status_bar_text: "#e6e0ff"
|
||||
status_bar_good: "#5af7b0"
|
||||
status_bar_warn: "#ffcf5f"
|
||||
status_bar_critical: "#ff6b7d"
|
||||
session_label: "#7ef9ff"
|
||||
session_border: "#3a2a63"
|
||||
|
||||
# Optional flavor — safe to delete.
|
||||
branding:
|
||||
agent_name: Hermes Agent
|
||||
prompt_symbol: "❯"
|
||||
help_header: "(^_^)? Commands"
|
||||
|
||||
tool_prefix: "┊"
|
||||
Reference in New Issue
Block a user