mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat(skills): add effective skill resolution and actions (#377)
* feat(skills): add effective skill resolution and actions * refactor(workspace): normalize skill-related env and prompt * chore(api): regenerate skills OpenAPI and SDK artifacts * feat(web): surface effective skill state in console * test(skills): cover API and runtime effective state * fix(web): show adopt action for discovered skills * fix(web): align skill header and show stateful visibility icon * refactor(web): compact skill metadata on narrow layouts * fix(web): constrain long skill text in cards * refactor(skills): narrow default discovery roots * fix(skills): harden managed skill path validation * feat: add path in the results of `use_skill` --------- Co-authored-by: Acbox <acbox0328@gmail.com>
This commit is contained in:
+84
-3
@@ -1508,7 +1508,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"containerd"
|
||||
],
|
||||
"summary": "List skills from data directory",
|
||||
"summary": "List skills from the bot container",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1549,7 +1549,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"containerd"
|
||||
],
|
||||
"summary": "Upload skills into data directory",
|
||||
"summary": "Upload skills into Memoh-managed directory",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1599,7 +1599,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"containerd"
|
||||
],
|
||||
"summary": "Delete skills from data directory",
|
||||
"summary": "Delete Memoh-managed skills",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1646,6 +1646,58 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{bot_id}/container/skills/actions": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"containerd"
|
||||
],
|
||||
"summary": "Apply an action to a discovered or managed skill source",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "bot_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Skill action payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.SkillsActionRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.skillsOpResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{bot_id}/container/snapshots": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -11109,6 +11161,9 @@ const docTemplate = `{
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"managed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
@@ -11118,6 +11173,32 @@ const docTemplate = `{
|
||||
},
|
||||
"raw": {
|
||||
"type": "string"
|
||||
},
|
||||
"shadowed_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_root": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handlers.SkillsActionRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"target_path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user