@penclipai/adapter-codex-local 2026.512.0 → 2026.514.0-canary.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penclipai/adapter-codex-local",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.514.0-canary.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/penclipai/paperclip-cn",
|
|
6
6
|
"bugs": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"skills"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@penclipai/adapter-utils": "2026.
|
|
41
|
+
"@penclipai/adapter-utils": "2026.514.0-canary.0",
|
|
42
42
|
"picocolors": "^1.1.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: paperclip-create-plugin
|
|
3
3
|
description: >
|
|
4
|
-
Create
|
|
5
|
-
scaffolding a plugin
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Create and develop external Paperclip plugins with the CLI-first workflow.
|
|
5
|
+
Use when scaffolding a new plugin, working on a local plugin against a running
|
|
6
|
+
Paperclip instance, or updating plugin authoring docs. Covers `penclip
|
|
7
|
+
plugin init`, the local install loop via `penclip plugin install <path>`,
|
|
8
|
+
worker/UI rebuild and reload semantics, and the required success checklist.
|
|
8
9
|
---
|
|
9
10
|
|
|
10
|
-
# Create a Paperclip
|
|
11
|
+
# Create and develop a Paperclip plugin
|
|
11
12
|
|
|
12
|
-
Use this skill when the task is to create, scaffold, or
|
|
13
|
+
Use this skill when the task is to create, scaffold, or iterate on a Paperclip plugin against a local Paperclip instance.
|
|
13
14
|
|
|
14
|
-
## 1.
|
|
15
|
+
## 1. Default: build the plugin OUTSIDE Paperclip core
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Plugins are their own packages. Unless the task **explicitly** asks for a bundled in-repo example, do not add plugin source under `packages/plugins/` in this repo.
|
|
18
|
+
|
|
19
|
+
- Scaffold the plugin into a directory outside the Paperclip checkout (e.g. `~/dev/paperclip-plugins/<name>`).
|
|
20
|
+
- Install it into the running Paperclip instance by local absolute path.
|
|
21
|
+
- Edit code in the external package; let Paperclip pick up rebuilt output.
|
|
22
|
+
|
|
23
|
+
Only edit Paperclip core itself when the user asks to surface a plugin as a bundled example (`server/src/routes/plugins.ts`, in-repo example lists, docs).
|
|
24
|
+
|
|
25
|
+
## 2. Ground rules
|
|
26
|
+
|
|
27
|
+
Reference docs when you need detail:
|
|
17
28
|
|
|
18
29
|
1. `doc/plugins/PLUGIN_AUTHORING_GUIDE.md`
|
|
19
30
|
2. `packages/plugins/sdk/README.md`
|
|
20
|
-
3. `doc/plugins/PLUGIN_SPEC.md`
|
|
31
|
+
3. `doc/plugins/PLUGIN_SPEC.md` — future-looking context only
|
|
21
32
|
|
|
22
33
|
Current runtime assumptions:
|
|
23
34
|
|
|
@@ -28,16 +39,25 @@ Current runtime assumptions:
|
|
|
28
39
|
- no host-provided shared plugin UI component kit yet
|
|
29
40
|
- `ctx.assets` is not supported in the current runtime
|
|
30
41
|
|
|
31
|
-
##
|
|
42
|
+
## 3. CLI-first scaffold workflow
|
|
32
43
|
|
|
33
|
-
Use the scaffold package
|
|
44
|
+
Use `penclip plugin init`. Do not invoke the scaffold package node entrypoint by hand unless the CLI command is unavailable in the environment.
|
|
34
45
|
|
|
35
46
|
```bash
|
|
36
|
-
|
|
37
|
-
node packages/plugins/create-paperclip-plugin/dist/index.js <npm-package-name> --output <target-dir>
|
|
47
|
+
penclip plugin init @acme/my-plugin --output ~/dev/paperclip-plugins
|
|
38
48
|
```
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
Useful flags (all optional):
|
|
51
|
+
|
|
52
|
+
- `--output <dir>` — parent directory; the command creates `<dir>/<unscoped-name>/`. Defaults to the current directory.
|
|
53
|
+
- `--template <default|connector|workspace|environment>` — starter template.
|
|
54
|
+
- `--category <connector|workspace|automation|ui|environment>` — manifest category.
|
|
55
|
+
- `--display-name <name>`, `--description <text>`, `--author <name>` — manifest metadata.
|
|
56
|
+
- `--sdk-path <path>` — snapshot the local SDK from a Paperclip checkout into `.paperclip-sdk/` (useful when developing against an unreleased SDK).
|
|
57
|
+
|
|
58
|
+
On success the command prints the exact next commands (`cd`, `pnpm install`, `pnpm dev`, `penclip plugin install <abs-path>`). Run them in order.
|
|
59
|
+
|
|
60
|
+
If `penclip` is not on PATH in your environment, fall back to:
|
|
41
61
|
|
|
42
62
|
```bash
|
|
43
63
|
pnpm --filter @penclipai/create-paperclip-plugin build
|
|
@@ -46,20 +66,40 @@ node packages/plugins/create-paperclip-plugin/dist/index.js @acme/plugin-name \
|
|
|
46
66
|
--sdk-path /absolute/path/to/paperclip/packages/plugins/sdk
|
|
47
67
|
```
|
|
48
68
|
|
|
49
|
-
|
|
69
|
+
## 4. Local install + rebuild loop
|
|
70
|
+
|
|
71
|
+
In the scaffolded plugin folder:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pnpm install
|
|
75
|
+
pnpm dev # esbuild --watch: rebuilds dist/manifest.js, dist/worker.js, dist/ui/
|
|
76
|
+
penclip plugin install /absolute/path/to/my-plugin
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Notes:
|
|
50
80
|
|
|
51
|
-
- `
|
|
52
|
-
-
|
|
81
|
+
- `penclip plugin install` auto-detects local paths (absolute, `./`, `../`, `~`, or an existing relative folder) and forwards `isLocalPath: true` to the server. Pass `--local` to force local mode if the heuristic is ambiguous.
|
|
82
|
+
- Paths are resolved to absolute paths before being sent to the server.
|
|
83
|
+
- The server watches built outputs (`dist/`) for local-path plugins and restarts the plugin worker on rebuild — you do not need to reinstall after every edit.
|
|
84
|
+
- UI hot reload via the SDK dev server (`pnpm dev:ui`, port `4177`) is optional and template-dependent; only mention it if the template wires `devUiUrl` and you verified it works end to end.
|
|
85
|
+
- `--version` only applies to npm package installs. Combining it with a local path is an error.
|
|
53
86
|
|
|
54
|
-
|
|
87
|
+
After install, inspect with:
|
|
55
88
|
|
|
56
|
-
|
|
89
|
+
```bash
|
|
90
|
+
penclip plugin list
|
|
91
|
+
penclip plugin inspect <plugin-key>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 5. After scaffolding, sanity-check the package
|
|
95
|
+
|
|
96
|
+
Open and confirm:
|
|
57
97
|
|
|
58
|
-
- `src/manifest.ts`
|
|
59
|
-
- `src/worker.ts`
|
|
60
|
-
- `src/ui/index.tsx`
|
|
61
|
-
- `tests/plugin.spec.ts`
|
|
62
|
-
- `package.json`
|
|
98
|
+
- `src/manifest.ts` — declared capabilities and slots
|
|
99
|
+
- `src/worker.ts` — worker entry
|
|
100
|
+
- `src/ui/index.tsx` — UI entry (if applicable)
|
|
101
|
+
- `tests/plugin.spec.ts` — placeholder test
|
|
102
|
+
- `package.json` — `paperclipPlugin` block points at `dist/manifest.js`, `dist/worker.js`, `dist/ui/`
|
|
63
103
|
|
|
64
104
|
Make sure the plugin:
|
|
65
105
|
|
|
@@ -68,34 +108,47 @@ Make sure the plugin:
|
|
|
68
108
|
- does not import host UI component stubs
|
|
69
109
|
- keeps UI self-contained
|
|
70
110
|
- uses `routePath` only on `page` slots
|
|
71
|
-
- is installed into Paperclip from an absolute local path during development
|
|
72
111
|
|
|
73
|
-
##
|
|
112
|
+
## 6. Verification (run before declaring success)
|
|
74
113
|
|
|
75
|
-
|
|
114
|
+
From the plugin folder:
|
|
76
115
|
|
|
77
|
-
|
|
78
|
-
|
|
116
|
+
```bash
|
|
117
|
+
pnpm typecheck
|
|
118
|
+
pnpm test
|
|
119
|
+
pnpm build
|
|
120
|
+
```
|
|
79
121
|
|
|
80
|
-
|
|
122
|
+
If the plugin is already running under `pnpm dev`, you can keep the watcher up and run `pnpm typecheck` and `pnpm test` in a separate shell.
|
|
81
123
|
|
|
82
|
-
|
|
124
|
+
If you changed Paperclip SDK/host/plugin runtime code in addition to the plugin, also run the relevant Paperclip workspace checks.
|
|
83
125
|
|
|
84
|
-
|
|
126
|
+
## 7. Success checklist (report this back)
|
|
85
127
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
pnpm
|
|
90
|
-
|
|
128
|
+
When you finish a local plugin task, report:
|
|
129
|
+
|
|
130
|
+
- **Scaffold path** — absolute path of the created plugin folder.
|
|
131
|
+
- **Commands run** — the exact `penclip plugin init`, `pnpm install`, `pnpm dev`, `penclip plugin install <path>` invocations (and any verification commands).
|
|
132
|
+
- **Install status** — output of `penclip plugin list` / `plugin inspect` (plugin key, version, status). Note if `status` is anything other than `ready` and include `lastError`.
|
|
133
|
+
- **Tests / build result** — `pnpm typecheck`, `pnpm test`, `pnpm build` pass/fail with the failing output if any.
|
|
134
|
+
- **Reload limitations** — call out anything that did not hot-reload (e.g. manifest changes required a reinstall, UI dev server was not wired, etc.).
|
|
135
|
+
|
|
136
|
+
If any item is missing, mark it as such — do not silently skip.
|
|
137
|
+
|
|
138
|
+
## 8. When NOT to edit Paperclip core
|
|
139
|
+
|
|
140
|
+
Do not add the plugin under `packages/plugins/` or update bundled-example wiring unless the user explicitly asks for a bundled example. Local-path installs are the supported development model; npm packages are the production deployment path.
|
|
141
|
+
|
|
142
|
+
If the user does ask for a bundled example, also update:
|
|
91
143
|
|
|
92
|
-
|
|
144
|
+
- `server/src/routes/plugins.ts` example list
|
|
145
|
+
- any docs that enumerate in-repo example plugins
|
|
93
146
|
|
|
94
|
-
##
|
|
147
|
+
## 9. Documentation expectations
|
|
95
148
|
|
|
96
149
|
When authoring or updating plugin docs:
|
|
97
150
|
|
|
98
151
|
- distinguish current implementation from future spec ideas
|
|
99
152
|
- be explicit about the trusted-code model
|
|
100
153
|
- do not promise host UI components or asset APIs
|
|
101
|
-
- prefer npm-package deployment guidance over repo-local workflows
|
|
154
|
+
- prefer local-path development + npm-package deployment guidance over repo-local workflows
|