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
6 changes: 6 additions & 0 deletions PORTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ Everything below `pstack/skills` and `pstack/agents` is outside this port. The b
`.cursor-plugin/plugin.json` is not vendored and never was in the current build: it sits outside the
two subtrees `omp-port/lib.sh` archives, and omp never read it. Nothing in the tree parses it.

`pstack/plugin.json`, upstream's Agent Plugins manifest, is not carried either. At the plugin root it
makes omp's `agent-plugins` provider claim the package, and that provider checks skill frontmatter
against a closed field set. It skipped every skill with `disable-model-invocation`, `icon`, `color`,
or `globs`, 54 of 56 at 0.15.25 on omp 18.12.2. Without it, the `omp-plugins` provider reads the
plugin root's `skills/` directory and loads all of them. The `plugin manifest` gate asserts the absence.

## Install, the two live shapes

`omp plugin link <checkout>/plugins/pstack` is the maintainer shape. It registers the checkout as an
Expand Down
23 changes: 6 additions & 17 deletions omp-port/check-port.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,25 +522,14 @@ else
report "owned" "PASS $ownn owned path(s) present"
fi

# Upstream ships an Agent Plugins manifest so the plugin loads in any harness. The port copies it
# through rather than rewriting it, because it is pure metadata: it names the plugin and says
# nothing about how a task is spawned. Its absence is not visible anywhere else, so it is asserted
# here. A manifest whose version disagrees with the pin means one of the two was written by hand.
mfbad=""
if [ ! -f plugin.json ]; then
mfbad="plugins/pstack/plugin.json missing; upstream's Agent Plugins manifest is not carried through"
elif ! jq -e . >/dev/null 2>&1 <plugin.json; then
mfbad="plugins/pstack/plugin.json is not valid JSON"
elif [ "$(jq -r '.version // empty' <plugin.json)" != "$(jq -r '.version' <package.json)" ]; then
mfbad="plugin.json version $(jq -r '.version // "none"' <plugin.json) disagrees with package.json $(jq -r '.version' <package.json)"
elif [ "$(jq -r '.name // empty' <plugin.json)" != "pstack" ]; then
mfbad="plugin.json name is $(jq -r '.name // "none"' <plugin.json), not pstack"
fi
if [ -n "$mfbad" ]; then
# omp's agent-plugins provider claims a package with plugin.json at its root, checks skill
# frontmatter against a closed field set, and skips every skill that carries
# disable-model-invocation, icon, color, or globs.
if [ -e plugin.json ]; then
report "plugin manifest" "FAIL"
while read -r m; do [ -n "$m" ] && violate "$m"; done <<<"$mfbad"
violate "plugins/pstack/plugin.json present; omp's agent-plugins provider skips every skill with an omp-only frontmatter field"
else
report "plugin manifest" "PASS Agent Plugins manifest present and version-matched"
report "plugin manifest" "PASS no Agent Plugins manifest, so omp-plugins loads every skill"
fi

# Owning a path makes an upstream edit to it vanish silently, so the count is surfaced on every gate
Expand Down
7 changes: 1 addition & 6 deletions omp-port/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ensure_canon() {
# Step 1, upstream text as it is, with pstack/ stripped so skills and agents land at the root.
extract_upstream() {
local sha="$1" work="$2"
git -C "$CANON" archive "$sha" pstack/skills pstack/agents pstack/plugin.json |
git -C "$CANON" archive "$sha" pstack/skills pstack/agents |
tar -x --strip-components=1 -C "$work" || return 1
[ -d "$work/skills" ] && [ -d "$work/agents" ]
}
Expand Down Expand Up @@ -139,11 +139,6 @@ install_tree() {
done < <(owned_paths)
rm -rf "$REPO_ROOT/plugins/pstack/skills" "$REPO_ROOT/plugins/pstack/agents" || return 1
mv "$work/skills" "$work/agents" "$REPO_ROOT/plugins/pstack/" || return 1
# Copied verbatim: upstream added this so the plugin loads in any harness, and it is pure
# metadata, so there is nothing in it to substitute.
if [ -f "$work/plugin.json" ]; then
cp -a "$work/plugin.json" "$REPO_ROOT/plugins/pstack/plugin.json" || return 1
fi
while IFS= read -r p; do
src="$REPO_ROOT/plugins/pstack/$p"
if [ -e "$keep/$p" ]; then
Expand Down
3 changes: 0 additions & 3 deletions omp-port/sync-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ do_build() {

read -r n p k < <(port_counts plugins/pstack)
write_json plugins/pstack/package.json --arg v "$version" '.version = $v'
# Overwritten so the two manifests cannot disagree; upstream only bumps its own copy.
[ -f plugins/pstack/plugin.json ] &&
write_json plugins/pstack/plugin.json --arg v "$version" '.version = $v'
write_json .omp-plugin/marketplace.json --arg v "$version" \
--arg d "$n skills, $p playbooks, $k principles, the poteto-mode pin, and two agents. Upstream cursor/plugins pstack at ${sha:0:7}." \
'.metadata.version = $v
Expand Down
21 changes: 0 additions & 21 deletions plugins/pstack/plugin.json

This file was deleted.