Skip to main content

plm-skill-kernel

Wave 2 Conv A (FTR-604). The Skill Kernel package — sibling of plm-engine-core — that hosts the decorator-based Skill SDK, the V1 in-process dispatcher, and the Kernel HTTP server stub matching CR.10 §7.bis verbatim.

Layout

02_App/plm-skill-kernel/
├── pyproject.toml             # editable install + import-linter contracts
├── plm_skill_kernel/
│   ├── __init__.py            # re-exports `skill`, `SkillContext`, etc.
│   ├── __main__.py            # `python -m plm_skill_kernel` → server
│   ├── server.py              # FastAPI app at POST /v1/skills/{id}/invoke
│   ├── dispatcher.py          # V1 in-process invoker
│   ├── registry.py            # boot wiring — discovers + registers skills
│   ├── sdk/
│   │   ├── decorator.py       # `@skill(id=, version=)`
│   │   ├── context.py         # SkillContext Pydantic
│   │   ├── types.py           # SkillInvokeRequest / SkillInvokeResult
│   │   └── _registry.py       # in-process decorator registry
│   └── skills/                # 3 starter skills (Q-W2A-1 nested layout)
│       ├── cleansing/
│       │   ├── normalise.py   # cleansing.normalise / 1.0.0 / L2
│       │   └── dedupe.py      # cleansing.dedupe / 1.0.0 / L2
│       └── bpmn/
│           └── generate.py    # bpmn.generate / 1.0.0 / L1 (thin proxy)
└── tests/                     # unit + ASGI in-process integration

Editable install

cd 02_App/backend
.\venv\Scripts\Activate.ps1                  # Windows
pip install -e ../plm-skill-kernel

Mirrors the plm-engine-core editable-install pattern.

Dev launch (Q-W2A-3)

python -m plm_skill_kernel               # uvicorn on port 8100
plm-skill-kernel --port 8100             # equivalent CLI

The backend at port 8000 is unaffected. The V1.1 loopback round-trip (D-CONV-M-4 closure) sends HTTP from the Engine Core dispatcher to this Kernel server when SKILL_KERNEL_LOOPBACK=on.

V1 wire contract

POST /v1/skills/{id}/invoke — frozen at CR.10 §7.bis.

Headers:
  X-Core-Caller: <UUID>            (required when caller is Core)
  Idempotency-Key: <uuid>          (optional, V1)
  traceparent: <W3C>               (optional)

Request body (SkillInvokeRequest):
  payload:        Dict[str, Any]
  version:        str  ("1.0.0", etc.)
  autonomy_hint:  Optional[str]    ("L1" / "L2" / "L3")

Response body (SkillInvokeResult):
  ok:             bool
  result:         Optional[Dict[str, Any]]
  error:          Optional[SkillErrorEnvelope]
  deferred_to:    Optional[str]
  cancelled:      Optional[bool]

Skill authoring (Decision #59 — decorator)

from plm_skill_kernel import skill, SkillContext

@skill(id="cleansing.normalise", version="1.0.0")
async def normalise(payload: dict, ctx: SkillContext) -> dict:
    return {"normalised": _normalise_records(payload["records"])}

The decorator auto-registers into the in-process registry at module import time + carries version through to the federated manifest builder (CR.9).

Import-linter contracts

Two Forbidden contracts live in pyproject.toml:

  1. plm_skill_kernel MUST NOT import plm_engine_core — federation contract preservation. The two communicate over HTTP, not Python.
  2. plm_skill_kernel MUST NOT import plm_accelerators (Workbench) — mirror of the plm-engine-core constraint.

Run:

lint-imports --config 02_App/plm-skill-kernel/pyproject.toml

Tests

cd 02_App/plm-skill-kernel
python -m pytest -q

The V1.1 HTTP round-trip integration test mounts the FastAPI app via httpx.AsyncClient(ASGITransport) — no subprocess, no real port (Q-W2A-4).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plm_skill_kernel-1.0.2.tar.gz (54.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plm_skill_kernel-1.0.2-py3-none-any.whl (60.8 kB view details)

Uploaded Python 3

File details

Details for the file plm_skill_kernel-1.0.2.tar.gz.

File metadata

  • Download URL: plm_skill_kernel-1.0.2.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for plm_skill_kernel-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9fd22921d6f48d310bf2d2eafc2fbf36868eaff029e907c21964ef7206b9a931
MD5 3b792a31bb4913bad8ff7546dba1daa4
BLAKE2b-256 36cd0064629634143c3cbf448da4e1f87d26ad9f0f675b7ace3d4ae1dd1a23e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for plm_skill_kernel-1.0.2.tar.gz:

Publisher: release-please.yml on plm-engine/plm-skill-kernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plm_skill_kernel-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for plm_skill_kernel-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3bda8a55d08f69c89477c7034de0696f5ab10087de12fb8a2d8ec55f0d81ccd4
MD5 f5d72b981a38a9ea763763a69823015a
BLAKE2b-256 d091b1b84e9e581b3aa74e2f82561779a5a5975badc61dadaeb19cbb51246c5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for plm_skill_kernel-1.0.2-py3-none-any.whl:

Publisher: release-please.yml on plm-engine/plm-skill-kernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page