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
16 changes: 12 additions & 4 deletions .github/scripts/lerna-signed-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,15 @@ else
# pass nested JSON with large base64 payloads is unreliable; --input avoids
# all shell escaping and size issues.
GQL_TMPFILE=$(mktemp /tmp/lerna-release-graphql-XXXXXX.json)
trap 'rm -f "$GQL_TMPFILE"' EXIT
ADDITIONS_FILE=$(mktemp /tmp/lerna-release-additions-XXXXXX.json)
DELETIONS_FILE=$(mktemp /tmp/lerna-release-deletions-XXXXXX.json)
trap 'rm -f "$GQL_TMPFILE" "$ADDITIONS_FILE" "$DELETIONS_FILE"' EXIT

# Spill additions/deletions to files and load with --slurpfile. Passing the
# base64-encoded file contents via --argjson exceeds ARG_MAX (~128 KB on
# Linux) once a release touches more than a handful of sizeable files.
printf '%s' "$ADDITIONS" > "$ADDITIONS_FILE"
printf '%s' "$DELETIONS" > "$DELETIONS_FILE"

jq -n \
--arg query 'mutation CreateSignedCommit($input: CreateCommitOnBranchInput!) {
Expand All @@ -280,15 +288,15 @@ else
--arg headline "$COMMIT_HEADLINE" \
--arg body "$COMMIT_BODY" \
--arg expectedHeadOid "$PARENT_SHA" \
--argjson additions "$ADDITIONS" \
--argjson deletions "$DELETIONS" \
--slurpfile additions "$ADDITIONS_FILE" \
--slurpfile deletions "$DELETIONS_FILE" \
'{
"query": $query,
"variables": {
"input": {
"branch": {"repositoryNameWithOwner": $repo, "branchName": $branch},
"message": {"headline": $headline, "body": $body},
"fileChanges": {"additions": $additions, "deletions": $deletions},
"fileChanges": {"additions": $additions[0], "deletions": $deletions[0]},
"expectedHeadOid": $expectedHeadOid
}
}
Expand Down
64 changes: 0 additions & 64 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,66 +1,2 @@
# =============================================================================
# SKILL.md sync
#
# skills/ is the single source of truth for all agent skill definitions.
# The entire directory is synced to two locations on every commit:
#
# packages/connector-ui/public/SKILL.md
# Served at https://agentconnect.polygon.technology/SKILL.md — the root
# skill entry point for the agent.
#
# packages/connector-ui/public/skills/
# Served at https://agentconnect.polygon.technology/skills/ — full tree.
#
# packages/connector-ui/public/<sub-skill>/
# Also served at https://agentconnect.polygon.technology/<sub-skill>/SKILL.md
# (e.g. /polygon-discovery/SKILL.md) to match the URLs in the root SKILL.md.
#
# packages/polygon-agent-cli/skills/
# Bundled inside the published npm package so skills are available
# locally after install. The `name` field in SKILL.md is rewritten from
# `polygon-agent-kit` (monorepo name) to `polygon-agent-cli` (the
# installed skill identifier) to match what Claude Code registers.
#
# DO NOT edit the package copies directly — they will be overwritten.
# Always edit files under skills/ at the repo root.
# =============================================================================
node -e "
const fs = require('fs');
const path = require('path');

function copyDir(src, dest) {
fs.mkdirSync(dest, { recursive: true });
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
const srcPath = path.join(src, entry.name);
const destPath = path.join(dest, entry.name);
if (entry.isDirectory()) {
copyDir(srcPath, destPath);
} else {
fs.copyFileSync(srcPath, destPath);
}
}
}

// Sync root SKILL.md to connector-ui public root (served at /SKILL.md)
fs.copyFileSync('skills/SKILL.md', 'packages/connector-ui/public/SKILL.md');

// Sync to connector-ui (verbatim — full tree under /skills/)
copyDir('skills', 'packages/connector-ui/public/skills');

// Also serve each sub-skill at the root level (e.g. /polygon-discovery/SKILL.md)
// to match the URLs referenced in the root SKILL.md
for (const entry of fs.readdirSync('skills', { withFileTypes: true })) {
if (entry.isDirectory()) {
copyDir(path.join('skills', entry.name), path.join('packages/connector-ui/public', entry.name));
}
}

// Sync to CLI package (rewrite name field in root SKILL.md only)
copyDir('skills', 'packages/polygon-agent-cli/skills');
const cliSkill = path.join('packages/polygon-agent-cli/skills/SKILL.md');
fs.writeFileSync(cliSkill, fs.readFileSync(cliSkill, 'utf8').replace('name: polygon-agent-kit', 'name: polygon-agent-cli'));
"
git add packages/connector-ui/public/SKILL.md packages/connector-ui/public/skills packages/connector-ui/public/polygon-* packages/polygon-agent-cli/skills

pnpm exec lint-staged
pnpm run typecheck
221 changes: 0 additions & 221 deletions packages/connector-ui/public/SKILL.md

This file was deleted.

Loading
Loading