Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/workflows/plugin-api-v2.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/plugin-api-v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: plugin-api-v3

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: akashic-plugins/plugin-contracts
ref: 4dd69dd621e029e51e99aa428443fa3a4ec1f6cf
path: .plugin-contracts
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Check Plugin API v3
env:
PYTHONPATH: .plugin-contracts
run: python -m akashic_plugin_contracts check plugin.py

composition-parity:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: kachofugetsu09/akashic-agent
ref: 3005f838bcd96e2cbc58616aede46e4f39df4523
path: .akashic-core
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
cache-dependency-path: .akashic-core/requirements.txt
- name: Install exact Core runtime
run: |
python -m venv .venv
.venv/bin/python -m pip install \
-r .akashic-core/requirements.txt \
-r .akashic-core/requirements-dev.txt \
pytest pytest-asyncio
- name: Verify Plugin Undo v3 composition
env:
AKASHIC_AGENT_ROOT: ${{ github.workspace }}/.akashic-core
PYTHONPATH: ${{ github.workspace }}/.akashic-core
run: cd tests && ../.venv/bin/python -m pytest -q .
- name: Check v3 source types
env:
PYTHONPATH: .akashic-core
run: .venv/bin/pyright --pythonpath .venv/bin/python --level error plugin.py
- name: Compile Python sources
run: python -m compileall -q .
- name: Check diff formatting
run: git diff --check
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Plugin Undo

Plugin Undo 提供 `/undo`,撤销当前 Session 最后一个完整的 completed interaction。

插件是 pure Plugin API v3,只声明 `COMMANDS` 与 `INTERACTION_UNDO`。SessionDB backup、
interaction transcript/embedding 删除、Default Memory durable reconciliation 和 Akasha rebuild
都由 Core `189c25a3e011c90cc8106fdda0b57c8c0ae71730` 拥有;插件不接触 SessionManager、SQL、
memory engine 或正式 workspace。

候选 generation 只验证拓扑与 command catalog,不能调用 destructive owner。正式 `/undo` 若
Session 删除已提交但 Default Memory 尚待收敛,会明确返回 error 结果,Core 在当前进程 retry 或
进程重启时重放 pending receipt。
5 changes: 5 additions & 0 deletions akashic.plugin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
schema_version = 1
name = "plugin_undo"
version = "2.0.0"
api_version = 3
entrypoint = "plugin.py"
Loading
Loading