harness-alchemist 0.1.0
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/.claude-plugin/plugin.json +14 -0
- package/.codex-plugin/plugin.json +13 -0
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/bin/harness-alchemist.mjs +43 -0
- package/cordis.patch.yml +3 -0
- package/dist/deepseek.d.ts +4 -0
- package/dist/deepseek.d.ts.map +1 -0
- package/dist/deepseek.js +5 -0
- package/dist/deepseek.js.map +1 -0
- package/dist/opencode.d.ts +3 -0
- package/dist/opencode.d.ts.map +1 -0
- package/dist/opencode.js +5 -0
- package/dist/opencode.js.map +1 -0
- package/lib/create.mjs +319 -0
- package/lib/validate.mjs +433 -0
- package/package.json +86 -0
- package/plugin.json +5 -0
- package/skills/harness-alchemist/SKILL.md +58 -0
- package/skills/harness-alchemist/references/antigravity.md +37 -0
- package/skills/harness-alchemist/references/claude-code.md +51 -0
- package/skills/harness-alchemist/references/codex.md +37 -0
- package/skills/harness-alchemist/references/compatibility.md +53 -0
- package/skills/harness-alchemist/references/deepseek-harness.md +56 -0
- package/skills/harness-alchemist/references/opencode.md +51 -0
- package/skills/harness-alchemist/references/publishing.md +66 -0
- package/templates/README.md +9 -0
- package/templates/v0.1.0/licenses/Apache-2.0.txt +201 -0
- package/templates/v0.1.0/template.json +13 -0
- package/templates/v0.1.0/universal-typescript/.agents/plugins/marketplace.json.tpl +20 -0
- package/templates/v0.1.0/universal-typescript/.agents/skills/develop-template/SKILL.md.tpl +33 -0
- package/templates/v0.1.0/universal-typescript/.agents/skills/develop-template/references/compatibility.md.tpl +23 -0
- package/templates/v0.1.0/universal-typescript/.agents/skills/develop-template/scripts/check-package.mjs.tpl +69 -0
- package/templates/v0.1.0/universal-typescript/.agents/skills/develop-template/scripts/sync-metadata.mjs.tpl +124 -0
- package/templates/v0.1.0/universal-typescript/.claude-plugin/marketplace.json.tpl +19 -0
- package/templates/v0.1.0/universal-typescript/.claude-plugin/plugin.json.tpl +14 -0
- package/templates/v0.1.0/universal-typescript/.codex-plugin/plugin.json.tpl +13 -0
- package/templates/v0.1.0/universal-typescript/.github/workflows/npm-publish.yml.tpl +43 -0
- package/templates/v0.1.0/universal-typescript/.gitignore.tpl +9 -0
- package/templates/v0.1.0/universal-typescript/AGENTS.md.tpl +16 -0
- package/templates/v0.1.0/universal-typescript/README.md.tpl +131 -0
- package/templates/v0.1.0/universal-typescript/cordis.patch.yml.tpl +3 -0
- package/templates/v0.1.0/universal-typescript/package.json.tpl +70 -0
- package/templates/v0.1.0/universal-typescript/plugin.json.tpl +5 -0
- package/templates/v0.1.0/universal-typescript/skills/shared-skill/SKILL.md.tpl +18 -0
- package/templates/v0.1.0/universal-typescript/src/deepseek.ts.tpl +7 -0
- package/templates/v0.1.0/universal-typescript/src/opencode.ts.tpl +7 -0
- package/templates/v0.1.0/universal-typescript/tests/runtimes.test.mjs.tpl +15 -0
- package/templates/v0.1.0/universal-typescript/tsconfig.json.tpl +17 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Codex and ChatGPT Plugins
|
|
2
|
+
|
|
3
|
+
## Required Shape
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
.codex-plugin/plugin.json
|
|
7
|
+
skills/<name>/SKILL.md
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
For a repository marketplace, add `.agents/plugins/marketplace.json`. Marketplace entries need `name`, `source`, `policy`, and `category`.
|
|
11
|
+
|
|
12
|
+
Only `plugin.json` belongs inside `.codex-plugin/`. Keep skills, hooks, MCP files, app mappings, and assets at the plugin root.
|
|
13
|
+
|
|
14
|
+
## Components
|
|
15
|
+
|
|
16
|
+
- `skills/<name>/SKILL.md`.
|
|
17
|
+
- `hooks/hooks.json`.
|
|
18
|
+
- `.mcp.json` for bundled MCP servers.
|
|
19
|
+
- `.app.json` for registered ChatGPT MCP connection mappings.
|
|
20
|
+
- `assets/` for icons, logos, and screenshots.
|
|
21
|
+
|
|
22
|
+
Manifest component paths start with `./` and must stay inside the plugin root. Codex also checks the default `hooks/hooks.json` path when the manifest omits `hooks`.
|
|
23
|
+
|
|
24
|
+
The rich `interface` object is recommended for public presentation but is not required for a minimal local plugin. Never generate fake privacy, terms, connector, or application URLs.
|
|
25
|
+
|
|
26
|
+
## Distribution
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
codex plugin marketplace add owner/repo
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Open `/plugins` to install from a configured marketplace, then start a new session. Codex npm marketplace sources download packages without running lifecycle scripts, so published packages must already contain built runtime files.
|
|
33
|
+
|
|
34
|
+
Official references:
|
|
35
|
+
|
|
36
|
+
- https://learn.chatgpt.com/docs/plugins
|
|
37
|
+
- https://learn.chatgpt.com/plugins/build/plugins.md
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Compatibility Model
|
|
2
|
+
|
|
3
|
+
## Canonical Project Shape
|
|
4
|
+
|
|
5
|
+
Use a universal repository root with shared skills and separate manifests/runtime entrypoints:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
project/
|
|
9
|
+
├── .agents/plugins/marketplace.json
|
|
10
|
+
├── .agents/skills/develop-<name>/
|
|
11
|
+
├── .claude-plugin/marketplace.json
|
|
12
|
+
├── .claude-plugin/plugin.json
|
|
13
|
+
├── .codex-plugin/plugin.json
|
|
14
|
+
├── skills/<name>/SKILL.md
|
|
15
|
+
├── src/opencode.ts
|
|
16
|
+
├── src/deepseek.ts
|
|
17
|
+
├── cordis.patch.yml
|
|
18
|
+
├── plugin.json
|
|
19
|
+
└── package.json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Capability Matrix
|
|
23
|
+
|
|
24
|
+
| Artifact | Claude | Codex | OpenCode | Antigravity | DeepSeek |
|
|
25
|
+
| --- | --- | --- | --- | --- | --- |
|
|
26
|
+
| `skills/<name>/SKILL.md` | Plugin-native | Plugin-native | Install separately | Plugin-native | Install separately |
|
|
27
|
+
| `.agents/skills/` | Discoverable by installers | Project-native | Project-native | Project-native | Project-native |
|
|
28
|
+
| npm JavaScript entrypoint | Optional dependency support | Optional npm source | Native plugin | No | Bundle module |
|
|
29
|
+
| Hooks | Claude schema | Codex schema | Plugin callbacks | Antigravity schema | Cordis events |
|
|
30
|
+
| MCP | `.mcp.json` | `.mcp.json` / `.app.json` | Config or plugin tools | `mcp_config.json` | Cordis MCP client row |
|
|
31
|
+
|
|
32
|
+
Only skills follow a broadly shared specification. Hook, agent, permission, MCP, and runtime APIs are not universal merely because their names are similar.
|
|
33
|
+
|
|
34
|
+
## Naming
|
|
35
|
+
|
|
36
|
+
- Use lowercase letters, digits, and single hyphens.
|
|
37
|
+
- Keep the plugin name at 56 characters or fewer so `develop-<name>` remains a valid 64-character Agent Skill name.
|
|
38
|
+
- Make the npm package basename equal the plugin name. `@scope/my-plugin` is valid for plugin `my-plugin`.
|
|
39
|
+
- Keep every skill frontmatter `name` equal to its parent directory.
|
|
40
|
+
|
|
41
|
+
## Source Baseline
|
|
42
|
+
|
|
43
|
+
The design was derived from these inspected snapshots on 2026-08-23:
|
|
44
|
+
|
|
45
|
+
- `anthropics/claude-plugins-official` commit `340e33aef211d95769d252324854497af871dafe`.
|
|
46
|
+
- `anthropics/knowledge-work-plugins` commit `5267cf7bff3031921d4474b8e8f86ad02d2b8f6d`.
|
|
47
|
+
- `openai/plugins` commit `11c74d6ba24d3a6d48f54a194cd00ef3beea18f9`.
|
|
48
|
+
- Local OpenCode examples at commits `22124b8e52e6e94b1cccf75b4c501cebe5ddf2df`, `cf5a390bcdac4f775e6e7e9b559e411b48ff5a93`, and `dbdbc7f713b5032aeb75e3755d31e851c91ab63e`.
|
|
49
|
+
- OpenPackage commit `399187d6cc4f4c86391fa07ff23b5387f898d2bf`.
|
|
50
|
+
- DeepSeek Harness tag `dsh-v0.1.1-rc.2`, commit `b150a551b8d465e31e418e1b2eaf5e79bbb7d28e`.
|
|
51
|
+
- Vercel Skills commit `435076e78988e1e6ec40d00b0b1d76bdbbc5419a`, package version `1.5.23`.
|
|
52
|
+
|
|
53
|
+
Recheck official documentation before adding a newer or experimental component.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# DeepSeek Harness and Cordis
|
|
2
|
+
|
|
3
|
+
## Supported Distribution
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness uses Cordis plugins composed through profile bundles. The removed `.dsh-plugin` repository format is not supported.
|
|
6
|
+
|
|
7
|
+
A package contributes a bundle through:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"dsh": {
|
|
12
|
+
"bundle": {
|
|
13
|
+
"patch": "./cordis.patch.yml"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The patch inserts the package's Cordis entrypoint:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
- insert:
|
|
23
|
+
- id: my-plugin
|
|
24
|
+
name: '@scope/my-plugin/deepseek'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Cordis Entrypoint
|
|
28
|
+
|
|
29
|
+
Function plugins use named exports and no default export:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import type { Context } from "@deepseek-ai/cordis"
|
|
33
|
+
|
|
34
|
+
export const name = "my-plugin"
|
|
35
|
+
|
|
36
|
+
export function apply(ctx: Context): void {
|
|
37
|
+
// Register lifecycle-owned behavior.
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Loader resolves modules as `exports.default ?? exports`. A default export would hide namespace metadata such as `inject` and `Config` from a named-export function plugin.
|
|
42
|
+
|
|
43
|
+
Declare required services through `inject`. Use `ctx.get()` for optional services. Register cleanup through Cordis effects or returned disposers.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
dsh plugin --profile demo add @scope/my-plugin
|
|
49
|
+
dsh --profile demo --dump-config
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Bundle membership changes require a profile restart. Profile patch edits may hot-reload.
|
|
53
|
+
|
|
54
|
+
Shared Agent Skills are discovered from project `.agents/skills` and other configured filesystem roots. Package-relative skill assets are not automatically activated by a bundle; install repository skills separately when needed.
|
|
55
|
+
|
|
56
|
+
DeepSeek Harness remains a developer preview. Reinspect its source contract before adding advanced UI, agent-preset, or dynamic Host/Client templates.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# OpenCode Plugins
|
|
2
|
+
|
|
3
|
+
## Runtime Contract
|
|
4
|
+
|
|
5
|
+
An OpenCode plugin is an ESM JavaScript or TypeScript module exporting one or more plugin functions. Each function receives the OpenCode context and returns a hooks object.
|
|
6
|
+
|
|
7
|
+
For npm publication, expose compiled JavaScript from the package root:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/opencode.d.ts",
|
|
15
|
+
"import": "./dist/opencode.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use `import type { Plugin } from "@opencode-ai/plugin"` for type-only entrypoints. Import `tool` at runtime only when registering custom tools.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
OpenCode accepts npm package names in `opencode.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"$schema": "https://opencode.ai/config.json",
|
|
30
|
+
"plugin": ["@scope/my-plugin"]
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
OpenCode installs npm plugins with Bun at startup. For local development, register an absolute `file://` URL to compiled JavaScript or a direct TypeScript file with all of its dependencies available.
|
|
35
|
+
|
|
36
|
+
Skills are separate from the npm plugin. Install them from the Git repository:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx skills add owner/repo --agent opencode
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Extension Rules
|
|
43
|
+
|
|
44
|
+
- Return `{}` when no hooks are registered.
|
|
45
|
+
- Custom tools live under the returned `tool` map.
|
|
46
|
+
- Mutating hooks alter the provided output object in place.
|
|
47
|
+
- Use `client.app.log()` for structured logs.
|
|
48
|
+
- Release resources in `dispose` when a plugin owns long-lived clients.
|
|
49
|
+
- Restart OpenCode after plugin or skill installation changes.
|
|
50
|
+
|
|
51
|
+
Official reference: https://opencode.ai/docs/plugins/
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Publishing and Installation
|
|
2
|
+
|
|
3
|
+
## Before Publishing
|
|
4
|
+
|
|
5
|
+
Run:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm run sync
|
|
10
|
+
npm run verify
|
|
11
|
+
npm pack --dry-run
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Inspect the dry-run payload. It must contain:
|
|
15
|
+
|
|
16
|
+
- `dist/opencode.js` and `dist/deepseek.js`.
|
|
17
|
+
- `cordis.patch.yml`.
|
|
18
|
+
- `.claude-plugin/plugin.json`.
|
|
19
|
+
- `.codex-plugin/plugin.json`.
|
|
20
|
+
- Root `plugin.json`.
|
|
21
|
+
- Shared `skills/`.
|
|
22
|
+
- README and license.
|
|
23
|
+
|
|
24
|
+
Marketplace catalogs are Git repository entrypoints and do not need to ship in the npm tarball.
|
|
25
|
+
|
|
26
|
+
## Git Repository Distribution
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude plugin marketplace add owner/repo
|
|
30
|
+
codex plugin marketplace add owner/repo
|
|
31
|
+
npx skills add owner/repo
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Claude and Codex marketplace files both point to the repository root. Vercel Skills discovers both `skills/` and `.agents/skills/`.
|
|
35
|
+
|
|
36
|
+
## npm Distribution
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm publish
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
OpenCode users add the package name to `opencode.json`. DeepSeek users add the same package to a profile with `dsh plugin`.
|
|
43
|
+
|
|
44
|
+
The package root exports OpenCode. The `./deepseek` subpath exports Cordis. Keep both compiled and included in `files`.
|
|
45
|
+
|
|
46
|
+
## GitHub Release Publishing
|
|
47
|
+
|
|
48
|
+
`.github/workflows/npm-publish.yml` publishes when a GitHub release is
|
|
49
|
+
published. Tag the release as `vX.Y.Z` (or a semver prerelease such as
|
|
50
|
+
`vX.Y.Z-rc.1`); the workflow applies that version to `package.json`, runs
|
|
51
|
+
`npm run sync`, verifies the package, and publishes it with npm provenance.
|
|
52
|
+
|
|
53
|
+
Configure the repository `NPM_TOKEN` secret with an npm publish token before
|
|
54
|
+
creating a release. The workflow never publishes from pull requests or pushes.
|
|
55
|
+
|
|
56
|
+
## Public Catalog Metadata
|
|
57
|
+
|
|
58
|
+
Minimal manifests are suitable for development and private distribution. Before public submission, add only verified metadata:
|
|
59
|
+
|
|
60
|
+
- Homepage and repository URLs.
|
|
61
|
+
- Publisher contact details.
|
|
62
|
+
- Privacy policy and terms URLs when required.
|
|
63
|
+
- Codex presentation icons, screenshots, capabilities, and starter prompts.
|
|
64
|
+
- Connector or application IDs created by the target platform.
|
|
65
|
+
|
|
66
|
+
Do not fabricate these values to satisfy a checker.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Canonical Templates
|
|
2
|
+
|
|
3
|
+
Each published versioned directory is a complete, immutable scaffold contract.
|
|
4
|
+
|
|
5
|
+
- `v0.1.0/universal-typescript/` is the unreleased canonical universal plugin layout and may be updated in place.
|
|
6
|
+
- `v0.1.0/licenses/` contains license source text used during rendering.
|
|
7
|
+
- `lib/create.mjs` maps template directory names, renders metadata tokens, injects the validator and license, validates in staging, and atomically installs the result.
|
|
8
|
+
|
|
9
|
+
After a version is published, make incompatible changes in a new `v<version>/` directory and require callers to select that version explicitly. Do not silently redirect old template identifiers.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": {{MARKETPLACE_JSON}},
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": {{DISPLAY_NAME_JSON}}
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": {{NAME_JSON}},
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_INSTALL"
|
|
16
|
+
},
|
|
17
|
+
"category": "Developer Tools"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: develop-{{NAME}}
|
|
3
|
+
description: {{DEVELOPMENT_SKILL_DESCRIPTION_JSON}}
|
|
4
|
+
compatibility: Requires Node.js 22.20 or newer for project scripts.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Maintain {{DISPLAY_NAME}}
|
|
8
|
+
|
|
9
|
+
Use this tier-3 skill to maintain this generated plugin repository. It does not
|
|
10
|
+
describe development of the Harness Alchemist CLI or its canonical templates.
|
|
11
|
+
|
|
12
|
+
## Repository Layout
|
|
13
|
+
|
|
14
|
+
- `skills/{{NAME}}/SKILL.md` is the plugin's end-user workflow. Replace the
|
|
15
|
+
starter procedure with the capability's domain-specific instructions.
|
|
16
|
+
- `.agents/skills/develop-{{NAME}}/` is this repository's maintenance guidance
|
|
17
|
+
and validation tooling.
|
|
18
|
+
- `.claude-plugin/`, `.codex-plugin/`, `.agents/plugins/`, root `plugin.json`,
|
|
19
|
+
and `cordis.patch.yml` are harness-specific manifests and bundles.
|
|
20
|
+
- `src/opencode.ts` and `src/deepseek.ts` contain separate OpenCode and Cordis
|
|
21
|
+
runtime behavior.
|
|
22
|
+
- `package.json` owns shared metadata; use `npm run sync` after changing it.
|
|
23
|
+
|
|
24
|
+
## Maintenance
|
|
25
|
+
|
|
26
|
+
1. Read `references/compatibility.md` before changing manifests or entrypoints.
|
|
27
|
+
2. Put portable end-user workflows in `skills/` and host-specific runtime code
|
|
28
|
+
only in its corresponding entrypoint.
|
|
29
|
+
3. Run `npm run verify` before reporting completion. Before publishing, inspect
|
|
30
|
+
`npm pack --dry-run` and run `claude plugin validate . --strict` when Claude
|
|
31
|
+
Code is installed.
|
|
32
|
+
|
|
33
|
+
Do not add invented credentials, connector IDs, legal URLs, or public metadata.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# {{DISPLAY_NAME}} Compatibility
|
|
2
|
+
|
|
3
|
+
## Shared Contract
|
|
4
|
+
|
|
5
|
+
- `skills/{{NAME}}/SKILL.md` is bundled natively by Claude Code, Codex, and Antigravity.
|
|
6
|
+
- `.agents/skills/develop-{{NAME}}/` is repository-local development guidance and is discoverable by Vercel Skills.
|
|
7
|
+
- OpenCode and DeepSeek users install shared skills separately from the npm runtime plugin.
|
|
8
|
+
|
|
9
|
+
## Harness-Specific Contract
|
|
10
|
+
|
|
11
|
+
| Harness | Files | Rule |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| Claude Code | `.claude-plugin/` | Components stay at repository root; marketplace source is `./`. |
|
|
14
|
+
| Codex/ChatGPT | `.codex-plugin/`, `.agents/plugins/` | Local marketplace entries require policy and category. |
|
|
15
|
+
| OpenCode | `src/opencode.ts` | Package root exports a plugin function returning hooks. |
|
|
16
|
+
| Antigravity | `plugin.json` | Skills use nested `<name>/SKILL.md`. |
|
|
17
|
+
| DeepSeek | `src/deepseek.ts`, `cordis.patch.yml` | Function plugin uses named exports and no default export. |
|
|
18
|
+
|
|
19
|
+
## Metadata
|
|
20
|
+
|
|
21
|
+
`package.json` owns version, description, author, repository, license, and npm package name. `scripts/sync-metadata.mjs` propagates these values without replacing harness-specific fields.
|
|
22
|
+
|
|
23
|
+
The npm package basename must remain `{{NAME}}`; the package may be scoped.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from "node:fs"
|
|
4
|
+
import { readFile } from "node:fs/promises"
|
|
5
|
+
import { dirname, join, resolve } from "node:path"
|
|
6
|
+
import { fileURLToPath } from "node:url"
|
|
7
|
+
import { spawnSync } from "node:child_process"
|
|
8
|
+
|
|
9
|
+
function findRoot(start) {
|
|
10
|
+
let current = resolve(start)
|
|
11
|
+
while (true) {
|
|
12
|
+
if (existsSync(join(current, "package.json")) && existsSync(join(current, ".claude-plugin"))) {
|
|
13
|
+
return current
|
|
14
|
+
}
|
|
15
|
+
const parent = dirname(current)
|
|
16
|
+
if (parent === current) return undefined
|
|
17
|
+
current = parent
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function exportTargets(exports) {
|
|
22
|
+
const targets = []
|
|
23
|
+
for (const value of Object.values(exports ?? {})) {
|
|
24
|
+
if (typeof value === "string") targets.push(value)
|
|
25
|
+
else if (value && typeof value === "object") {
|
|
26
|
+
if (typeof value.import === "string") targets.push(value.import)
|
|
27
|
+
if (typeof value.types === "string") targets.push(value.types)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return targets
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const scriptDirectory = dirname(fileURLToPath(import.meta.url))
|
|
34
|
+
const root = findRoot(process.cwd()) ?? findRoot(scriptDirectory)
|
|
35
|
+
if (!root) throw new Error("Could not find the plugin project root")
|
|
36
|
+
|
|
37
|
+
const result = spawnSync(
|
|
38
|
+
"npm",
|
|
39
|
+
["pack", "--dry-run", "--json", "--ignore-scripts"],
|
|
40
|
+
{ cwd: root, encoding: "utf8" },
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
if (result.error) throw result.error
|
|
44
|
+
if (result.status !== 0) throw new Error(result.stderr || result.stdout || "npm pack failed")
|
|
45
|
+
|
|
46
|
+
const report = JSON.parse(result.stdout)
|
|
47
|
+
const files = new Set(report[0]?.files?.map((file) => file.path) ?? [])
|
|
48
|
+
const packageJson = JSON.parse(await readFile(join(root, "package.json"), "utf8"))
|
|
49
|
+
|
|
50
|
+
for (const required of [
|
|
51
|
+
".claude-plugin/plugin.json",
|
|
52
|
+
".codex-plugin/plugin.json",
|
|
53
|
+
"cordis.patch.yml",
|
|
54
|
+
"dist/deepseek.js",
|
|
55
|
+
"dist/opencode.js",
|
|
56
|
+
"plugin.json",
|
|
57
|
+
]) {
|
|
58
|
+
if (!files.has(required)) throw new Error(`npm package is missing ${required}`)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
for (const target of exportTargets(packageJson.exports)) {
|
|
62
|
+
if (!target.startsWith("./") || target.includes("..")) {
|
|
63
|
+
throw new Error(`Invalid package export target: ${target}`)
|
|
64
|
+
}
|
|
65
|
+
const path = target.slice(2)
|
|
66
|
+
if (!files.has(path)) throw new Error(`Package export target is not packed: ${target}`)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
console.log(`Validated ${files.size} files in the npm dry-run payload`)
|