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
20 changes: 20 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "machoswiftsection",
"interface": {
"displayName": "MachOSwiftSection"
},
"plugins": [
{
"name": "swift-section",
"source": {
"source": "local",
"path": "./AgentPlugins/swift-section"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
]
}
17 changes: 17 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "machoswiftsection",
"owner": {
"name": "MxIris-Reverse-Engineering",
"url": "https://github.com/MxIris-Reverse-Engineering"
},
"metadata": {
"description": "Agent plugins for MachOSwiftSection and its swift-section CLI."
},
"plugins": [
{
"name": "swift-section",
"source": "./AgentPlugins/swift-section",
"description": "Teaches coding agents to drive the swift-section CLI: Swift and Objective-C declarations, memory layout and ABI diffs recovered from a Mach-O binary or a dyld shared cache."
}
]
}
20 changes: 20 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ jobs:
exit 1
fi
echo "Found $changelog"

- name: Verify agent plugin versions match
run: |
set -euo pipefail
value="${{ steps.version.outputs.version }}"
# Claude Code and Codex only update an installed plugin when its
# version changes, so a release that leaves these behind never
# reaches the users of the plugin.
status=0
for manifest in AgentPlugins/swift-section/.claude-plugin/plugin.json \
AgentPlugins/swift-section/.codex-plugin/plugin.json; do
pluginVersion=$(jq -r '.version // empty' "$manifest")
if [ "$pluginVersion" != "$value" ]; then
echo "::error file=$manifest::version is '$pluginVersion' but BundledVersion.value is '$value' — bump the plugin with the CLI."
status=1
else
echo "$manifest: $pluginVersion"
fi
done
exit $status
Comment on lines +47 to +65
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,17 @@ Keeping this file's module list and `Documentations/README.md`'s index in sync w

</important>

<important if="you are changing the swift-section CLI — a subcommand, a flag, its output or exit codes — or releasing a version">

`AgentPlugins/swift-section/` is the agent plugin users install into Claude Code and Codex to learn this CLI; its skill (`skills/swift-section-cli/SKILL.md`, `references/objc.md`) is the only copy anywhere, so nobody else will fix it.

- **A CLI change updates the skill in the same batch** — a new or renamed flag, a changed default, a new trap in the output. Check every flag it names still exists: `grep -ohE -- '--[a-z][a-z0-9-]+'` over the skill against the subcommands' `--help`.
- **A release sets `version` in both `plugin.json` files to `BundledVersion.value`.** Claude Code and Codex only update an installed plugin when that version changes; `version-check.yml` fails a PR to `main` that forgets.
- Validate before pushing: `claude plugin validate AgentPlugins/swift-section` and `claude plugin validate .claude-plugin/marketplace.json --strict`; for Codex, the `validate_plugin.py` of its `plugin-creator` skill.
- The directory is `AgentPlugins/`, never `plugins/`: on a case-insensitive disk that is SwiftPM's `Plugins/`. The two marketplace files are `.claude-plugin/marketplace.json` (Claude Code) and `.agents/plugins/marketplace.json` (Codex). Why and how: [0051-agent-plugin](Documentations/Evolutions/0051-agent-plugin.md).

</important>

## Work in progress

**GenericSpecializer** (`Sources/SwiftSpecialization/`) — interactive runtime specialization of generic types. Core implementation complete with tests. Two-step API: `makeRequest()` returns parameters and candidates, `specialize()` executes with the user's selections. Only protocol requirements need witness tables, passed in requirement order; `baseClass` / `layout` / `sameType` need validation only. Generic parameter names are derived from depth/index (A, B, A1, …) because the binary does not preserve them.
13 changes: 13 additions & 0 deletions AgentPlugins/swift-section/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "swift-section",
"version": "0.20.0",
"description": "Teaches coding agents to drive the swift-section CLI: Swift and Objective-C declarations, memory layout and ABI diffs recovered from a Mach-O binary or a dyld shared cache.",
"author": {
"name": "MxIris-Reverse-Engineering",
"url": "https://github.com/MxIris-Reverse-Engineering"
},
"homepage": "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection#agent-plugin",
"repository": "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection",
"license": "MIT",
"keywords": ["swift", "objective-c", "mach-o", "dyld-shared-cache", "reverse-engineering", "abi"]
}
28 changes: 28 additions & 0 deletions AgentPlugins/swift-section/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "swift-section",
"version": "0.20.0",
"description": "Teaches coding agents to drive the swift-section CLI: Swift and Objective-C declarations, memory layout and ABI diffs recovered from a Mach-O binary or a dyld shared cache.",
"author": {
"name": "MxIris-Reverse-Engineering",
"url": "https://github.com/MxIris-Reverse-Engineering"
},
"homepage": "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection#agent-plugin",
"repository": "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection",
"license": "MIT",
"keywords": ["swift", "objective-c", "mach-o", "dyld-shared-cache", "reverse-engineering", "abi"],
"skills": "./skills/",
"interface": {
"displayName": "swift-section",
"shortDescription": "Swift and ObjC declarations out of a Mach-O binary",
"longDescription": "How to drive the swift-section CLI: dump and interface for Swift declarations, objc for Objective-C headers with IMP addresses, static field-offset and enum-layout comments, and diff / snapshot / evolution for comparing the API of two builds. Covers the flag spellings and output traps that produce a plausible but wrong answer. Requires the swift-section CLI (brew install swift-section).",
"developerName": "MxIris-Reverse-Engineering",
"category": "Developer Tools",
"capabilities": ["Read"],
"websiteURL": "https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection",
"defaultPrompt": [
"Dump the Swift types in this binary",
"Diff the Swift ABI of these two builds",
"Show the ObjC interface of this class"
]
}
}
Loading
Loading