agent-plugkit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -21
- package/dist/application/plugin-document-contract.d.ts +1 -1
- package/dist/application/workspace-health-contract.d.ts +1 -1
- package/dist/application/workspace-operation.d.ts +2 -2
- package/dist/application/workspace-operation.js +2 -2
- package/dist/generated/skill-content.js +3 -3
- package/dist/generated/skill-content.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -254,17 +254,11 @@ Generated files should be regenerated, not edited by hand.
|
|
|
254
254
|
}
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
##
|
|
257
|
+
## Official Marketplace
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
### Mermaid Render
|
|
264
|
-
|
|
265
|
-
`mermaid-render@0.2.0` turns Mermaid into a designed visual through two independent paths: editable `html`, or direct `imagent` image creation that may actively illustrate individual nodes. Imagent does not render, screenshot, or imitate an HTML intermediate.
|
|
266
|
-
|
|
267
|
-
The built-in art directions are Swiss Style, Neo-Brutalism, and JAPANESE MA. They are concise design definitions with a few Good/Bad cases—not fixed templates, reference-image hashes, layout algorithms, or theme presets—so the Agent retains room to make diagram-specific visual decisions.
|
|
259
|
+
Curated plugins and generated client indexes are maintained separately in
|
|
260
|
+
[`agent-plugkit/plugkit-marketplace`](https://github.com/agent-plugkit/plugkit-marketplace). This CLI repository does
|
|
261
|
+
not contain or build that catalog; its integration tests create isolated temporary marketplaces.
|
|
268
262
|
|
|
269
263
|
## Development
|
|
270
264
|
|
|
@@ -272,24 +266,15 @@ The built-in art directions are Swiss Style, Neo-Brutalism, and JAPANESE MA. The
|
|
|
272
266
|
npm install
|
|
273
267
|
npm run build
|
|
274
268
|
npm test
|
|
275
|
-
npm run mp:check # build --all + index + validate --all against marketplace/
|
|
276
269
|
npm run pack:cli
|
|
270
|
+
npm run check:public
|
|
277
271
|
```
|
|
278
272
|
|
|
279
|
-
### Desktop status
|
|
280
|
-
|
|
281
|
-
The previous private desktop workspace was removed on 2026-08-15. The current product and
|
|
282
|
-
distribution surface is CLI-only. Historical desktop specifications and design evidence remain
|
|
283
|
-
for traceability, but they are superseded by
|
|
284
|
-
[ADR-0006](https://github.com/agent-plugkit/agent-plugkit/blob/main/docs/adr/0006-remove-desktop-implementation.md); any future desktop rebuild starts from
|
|
285
|
-
a new confirmed product, design, and engineering contract.
|
|
286
|
-
|
|
287
273
|
The public contract is the CLI, `marketplace.yaml`, `plugin.yaml`, and generated marketplace artifacts. Internal TypeScript functions are intentionally not documented as a Node library API yet (see [ADR-0001](https://github.com/agent-plugkit/agent-plugkit/blob/main/docs/adr/0001-cli-only-public-contract.md)).
|
|
288
274
|
|
|
289
275
|
## Project Docs
|
|
290
276
|
|
|
291
277
|
- [`AGENTS.md`](https://github.com/agent-plugkit/agent-plugkit/blob/main/AGENTS.md) — repository rules, architecture boundaries, and definition of done.
|
|
292
278
|
- [`docs/architecture/overview.md`](https://github.com/agent-plugkit/agent-plugkit/blob/main/docs/architecture/overview.md) — layering, invariants, and known debt.
|
|
293
|
-
- [`docs/product/`](https://github.com/agent-plugkit/agent-plugkit/tree/main/docs/product) — positioning, roadmap,
|
|
279
|
+
- [`docs/product/`](https://github.com/agent-plugkit/agent-plugkit/tree/main/docs/product) — positioning, roadmap, and risks.
|
|
294
280
|
- [`docs/release/`](https://github.com/agent-plugkit/agent-plugkit/tree/main/docs/release) — release plan and gates.
|
|
295
|
-
- [`specs/`](https://github.com/agent-plugkit/agent-plugkit/tree/main/specs) — per-iteration scope, specs, and task lists.
|
|
@@ -14,7 +14,7 @@ export interface CodexInterfaceDraft {
|
|
|
14
14
|
readonly defaultPrompts: readonly string[];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* This document contract owns only plugin identity, descriptive metadata and Codex interface
|
|
18
18
|
* overrides. Components and every other legal source node stay outside this
|
|
19
19
|
* draft and therefore cannot be exposed as editable state to untrusted callers.
|
|
20
20
|
*/
|
|
@@ -78,7 +78,7 @@ export interface WorkspaceHealthSnapshot {
|
|
|
78
78
|
readonly checkedAt: string;
|
|
79
79
|
readonly access: 'read-only';
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Workspace health deliberately matches the existing `validate` contract: plugin-level
|
|
82
82
|
* manifests/configs only. Marketplace index/CATALOG freshness remains outside
|
|
83
83
|
* this snapshot until the build/index operation slice owns that contract.
|
|
84
84
|
*/
|
|
@@ -14,8 +14,8 @@ export interface WorkspaceOperationCoordinationFact {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Operation-scoped coordination only. Existing editor revision/write guards
|
|
17
|
-
* remain the authority for their document commits.
|
|
18
|
-
*
|
|
17
|
+
* remain the authority for their document commits. Long-running build and release
|
|
18
|
+
* operations acquire the write side without redefining those guards.
|
|
19
19
|
*/
|
|
20
20
|
export declare class WorkspaceOperationCoordinator {
|
|
21
21
|
#private;
|
|
@@ -5,8 +5,8 @@ import { AuthorizedPathError, authorizeExistingDirectory, resolveAuthorizedPath,
|
|
|
5
5
|
import { scanWorkspaceHealth, } from "./workspace-health.js";
|
|
6
6
|
/**
|
|
7
7
|
* Operation-scoped coordination only. Existing editor revision/write guards
|
|
8
|
-
* remain the authority for their document commits.
|
|
9
|
-
*
|
|
8
|
+
* remain the authority for their document commits. Long-running build and release
|
|
9
|
+
* operations acquire the write side without redefining those guards.
|
|
10
10
|
*/
|
|
11
11
|
export class WorkspaceOperationCoordinator {
|
|
12
12
|
#states = new Map();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// 此文件由 scripts/generate-skill.ts 自动生成,请勿手动编辑
|
|
2
2
|
// 源头:
|
|
3
|
-
// -
|
|
4
|
-
// -
|
|
5
|
-
// -
|
|
3
|
+
// - resources/plugkit/plugin.yaml
|
|
4
|
+
// - resources/plugkit/skills/setup/SKILL.md
|
|
5
|
+
// - resources/plugkit/skills/maintain/SKILL.md
|
|
6
6
|
export const PLUGKIT_PLUGIN_YAML = "name: plugkit\nversion: \"0.1.0\"\ndescription: \"Official agent-plugkit maintenance plugin\"\nauthor:\n name: \"Agent Plugkit\"\ncategory: tooling\ntags:\n - plugkit\n - marketplace\n\ncomponents:\n skills:\n - name: setup\n path: skills/setup\n description: \"Guide agents to install, update, or uninstall the agent-plugkit CLI and bootstrap a marketplace repository.\"\n - name: maintain\n path: skills/maintain\n description: \"Guide agents to create, validate, build, and release plugkit plugins.\"\n\nplatform:\n codex:\n interface:\n displayName: \"Plugkit\"\n shortDescription: \"Setup and maintain agent-plugkit marketplaces\"\n longDescription: \"Official guidance for installing agent-plugkit and maintaining agent-plugkit marketplace repositories.\"\n category: \"Tooling\"\n developerName: \"Agent Plugkit\"\n";
|
|
7
7
|
export const PLUGKIT_SETUP_SKILL = "---\nname: setup\ndescription: \"Guide agents to install, update, or uninstall the agent-plugkit CLI and bootstrap a marketplace repository.\"\nargument-hint: \"<install|update|uninstall>\"\n---\n\n# setup\n\nUse this skill for the lifecycle of the `agent-plugkit` CLI tool and its marketplace repository scaffold: getting it installed, keeping it current, or removing it. Once a repository is bootstrapped, switch to the `maintain` skill for day-to-day plugin work (adding components, build/index/validate/release).\n\n## Install\n\n1. Check whether `marketplace.yaml` already exists at the repo root. If it does, this repo is already bootstrapped — skip straight to `agent-plugkit validate --all` instead of re-initializing.\n2. Add the CLI as a pinned dev dependency: `npm install --save-dev agent-plugkit`. For a one-off run without a persistent install, `npx agent-plugkit --help` works too.\n3. If `marketplace.yaml` does not exist yet, scaffold the marketplace: `npx agent-plugkit init-repo [name] --organization \"<org>\"`. Leave `--no-plugkit` off unless the user explicitly does not want the official `plugkit` plugin in this repo.\n4. Confirm the scaffold: `marketplace.yaml`, `plugins/plugkit/` (with both `setup` and `maintain` skills), and the `mp`/`validate:plugins`/`build:plugins`/`build:index` scripts in `package.json`.\n5. Run `agent-plugkit build --all && agent-plugkit index && agent-plugkit validate --all` to confirm the fresh scaffold is healthy.\n\n## Update\n\n1. Check the current pinned version against latest: `npm view agent-plugkit version`.\n2. `npm install --save-dev agent-plugkit@latest` (or a specific version if the user wants to pin one).\n3. Re-run `agent-plugkit build --all && agent-plugkit index && agent-plugkit validate --all` to surface any schema or generated-artifact drift introduced by the new CLI version.\n4. Updating the CLI does not rewrite files already scaffolded under `plugins/plugkit/` in this repo — `init-repo` never overwrites existing files. If the official `plugkit` skill content changed upstream and the user wants it, diff it manually before deciding whether to overwrite.\n5. If the `plugkit` plugin is installed in an Agent Plugins-compatible or native Claude Code / Codex client, refresh it there too through that client's own update flow — the npm upgrade only updates the CLI binary, not an already-installed agent-side copy.\n\n## Uninstall\n\n1. `npm uninstall agent-plugkit` to remove the CLI dev dependency.\n2. **Never delete `marketplace.yaml`, `plugins/`, or any generated manifests as part of this.** That is the user's real marketplace content, independent of the CLI tool. Only remove it if the user explicitly asks to tear down the marketplace itself, as a separate decision.\n3. Optionally, if the user also wants the `plugkit` plugin removed from an agent client, do that through the client's own plugin-removal flow — uninstalling the npm package does not touch anything already installed there.\n\n## Contracts\n\n- This skill owns the CLI tool and repository bootstrap lifecycle only. Once a marketplace exists, route ongoing plugin work (adding skills/mcp/hooks/lsp, build, validate, release) to the `maintain` skill instead of duplicating it here.\n- Never run `init-repo` against a directory that already has `marketplace.yaml` — it fails loudly by design; treat that as \"already installed,\" not an error to route around.\n- Do not hand-edit generated root `plugin.json`/`mcp.json`, `.claude-plugin`, `.codex-plugin`, `.mcp.json`, `.lsp.json`, `hooks/hooks.json`, or marketplace indexes.\n";
|
|
8
8
|
export const PLUGKIT_MAINTAIN_SKILL = "---\nname: maintain\ndescription: \"Guide agents to maintain agent-plugkit marketplace plugins.\"\nargument-hint: \"<plugin-name-or-task>\"\n---\n\n# maintain\n\nUse this skill when creating or maintaining an `agent-plugkit` marketplace repository.\n\n## Working Model\n\n- Treat `plugin.yaml` as the source of truth for the Agent Plugins 1.0 portable package, Claude Code and Codex native artifacts, and all client marketplace indexes.\n- Keep portable and client-specific layers distinct: Agent Plugins discovers only root `plugin.json`, immediate-child `skills/`, and optional root `mcp.json`; marketplace registration and installation belong to each client.\n- Treat a plugin as the namespace and container. Add related skills or platform components under the existing plugin when they belong together.\n- Prefer `agent-plugkit add <skill|mcp|hook|lsp> <plugin-name> <component-name>` when extending an existing plugin.\n- Prefer `agent-plugkit init <plugin-name> --type <skill|mcp|hook|lsp>` when creating a new plugin.\n- Prefer `agent-plugkit import-skill <source-dir> [plugin-name]` when the skill already exists on disk (for example `~/.claude/skills/<name>`) — it creates a new single-skill plugin and copies `SKILL.md` verbatim.\n\n## Flow\n\n1. Inspect the existing marketplace shape before editing.\n2. Choose the plugin ID and component type.\n3. Add or edit source files under `plugins/<plugin-name>/`.\n4. Run:\n\n ```bash\n agent-plugkit build --all\n agent-plugkit index\n agent-plugkit validate --all\n ```\n\n5. Before handing off a release candidate, run `agent-plugkit release-local` or the repository's release script and inspect the local directory/archive. This does not publish, push, register, or install anything remotely.\n6. Once a ready Marketplace has an intended local or Git source, register it only when the user asks:\n\n ```bash\n agent-plugkit install-repo OWNER/REPO\n agent-plugkit install-repo OWNER/REPO --agent claude --agent codex\n agent-plugkit install-repo /path/to/marketplace --all\n ```\n\n## Client Delivery\n\n`install-repo` accepts an existing local Marketplace directory, `owner/repo`, or an HTTPS/SSH Git\nURL. With no selection flags it provides a numbered TTY multi-select; automation must pass repeated\n`--agent` values or `--all`. Sources containing C0/C1/DEL control characters, including controls\nrevealed by URL percent-decoding, are rejected before terminal output or client execution. It\nprocesses these client adapters in a fixed order:\n\n- Claude Code: native `claude plugin marketplace add <source>`.\n- Codex: native `codex plugin marketplace add <source>`.\n- GitHub Copilot: native `copilot plugin marketplace add <source>`.\n- VS Code: atomically enable `chat.plugins.enabled` and deduplicate the source in the current user's\n `chat.plugins.marketplaces`; local directories become `file://` URIs. If safe deduplication would\n lose an existing JSONC comment, the configuration root is not an absolute user path, or the file\n is not lossless UTF-8, the file remains unchanged for manual cleanup. Reload the VS Code window\n after a completed update. Revision checks and an open-file guard reject or restore detectable\n conflicts, but this pure Node transaction is not filesystem compare-and-swap: an uncooperative\n new-inode replacement after the last observable check but before either candidate commit or\n guard-content recovery rename can be overwritten. Failure output asks the user to inspect the\n current file rather than claiming every failed transaction left the original untouched. Keep a\n local Marketplace outside the VS Code user configuration tree; overlapping or symlink-resolved\n paths fail before any settings write.\n- Cursor: never write private state or call an undocumented command. Tell a Team/Enterprise\n administrator to use Dashboard → Plugins → Add Marketplace → Import from Repo.\n\nMissing native CLIs and old versions remain explicit incomplete results; do not install them\nautomatically. Exit `0` means every selected target completed, `2` means a mixed result, `1` means\nnone completed or preflight failed, and `130` means interruption. Do not claim registration happened\nmerely because `build`, `index`, `validate`, or `release-local` passed; use the per-target\n`install-repo` summary as the evidence.\n\nMarketplace registration is not plugin installation. Run a client's plugin-install command only\nunder a separate explicit request.\n\n## Contracts\n\n- Do not edit generated root `plugin.json`/`mcp.json`, `.claude-plugin`, `.codex-plugin`, `.mcp.json`, `.lsp.json`, `hooks/hooks.json`, `.github/plugin/marketplace.json`, `.cursor-plugin/marketplace.json`, root `marketplace.json`, or other generated indexes by hand.\n- Keep canonical plugin names to 2–64 lowercase letters, digits, or single hyphens; start and end with an alphanumeric character and never use consecutive `--`.\n- Keep component paths relative to the plugin directory.\n- Keep every portable Skill at `skills/<name>/SKILL.md`; its frontmatter `name` must match the immediate parent directory and its `description` must be present.\n- Use legacy/explicit `stdio` MCP only with command fields, and `streamable-http`/`sse` only with URL/header fields. Do not silently convert an invalid transport.\n- Treat MCP `env` and `headers` as visible package data; never put credentials or other secrets in generated plugin configuration.\n- For multi-skill plugins, add child skills under the plugin instead of creating unrelated top-level plugin IDs.\n- When adding MCP, hook, or LSP components, keep the component name stable because generated manifests use it as an identifier.\n- `import-skill` never rewrites the copied `SKILL.md`. Fix a mismatched frontmatter name or description at the source, or edit the plugin after import.\n- `install-repo` treats its source as read-only. It does not build, validate, repair, commit, push, publish, or install Marketplace contents.\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-content.js","sourceRoot":"","sources":["../../src/generated/skill-content.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM;AACN,4CAA4C;AAC5C
|
|
1
|
+
{"version":3,"file":"skill-content.js","sourceRoot":"","sources":["../../src/generated/skill-content.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM;AACN,kCAAkC;AAClC,4CAA4C;AAC5C,+CAA+C;AAE/C,MAAM,CAAC,MAAM,mBAAmB,GAAW,m3BAAm3B,CAAC;AAC/5B,MAAM,CAAC,MAAM,mBAAmB,GAAW,ggHAAggH,CAAC;AAC5iH,MAAM,CAAC,MAAM,sBAAsB,GAAW,w2LAAw2L,CAAC"}
|