@theholocron/astromech 5.0.0-alpha.592 → 5.0.0-alpha.594

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.
@@ -1,4 +1,4 @@
1
- import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-WHAqMxwx.mjs";
1
+ import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-p1cNGQsb.mjs";
2
2
  import { createDefineConfig } from "@theholocron/datapad";
3
3
  // src/config/define/define.ts
4
4
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-WHAqMxwx.mjs";
1
+ import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-p1cNGQsb.mjs";
2
2
  import { t as editorconfig_checker_default } from "./editorconfig-checker-BKNGE7U2.mjs";
3
3
  import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join, relative } from "node:path";
@@ -424,6 +424,7 @@ var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line r
424
424
  var sync_dispatch_default = "name: Sync Dispatch\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n steps:\n description: >\n Sync steps to pass to each repo's sync.yml. Default is \"readme\"\n (only README marker blocks are updated).\n type: string\n required: false\n default: readme\n\npermissions:\n contents: read\n\njobs:\n broadcast:\n name: Broadcast sync to all repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Dispatch sync to all repos with sync.yml\n run: |\n gh api \"/orgs/$GITHUB_REPOSITORY_OWNER/repos\" --paginate --jq '.[].name' \\\n | while IFS= read -r repo; do\n gh api \"/repos/$GITHUB_REPOSITORY_OWNER/$repo/contents/.github/workflows/sync.yml\" --silent 2>/dev/null || continue\n echo \"Dispatching sync to $GITHUB_REPOSITORY_OWNER/$repo\"\n gh workflow run sync.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/$repo\" \\\n --field \"steps=$STEPS\" \\\n || echo \"Warning: could not dispatch to $GITHUB_REPOSITORY_OWNER/$repo — skipping\"\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n STEPS: ${{ inputs.steps }}\n";
425
425
  var sync_incidents_default$1 = "name: Sync incidents\n\n# Mirrors the status page's incidents into the forum the layout gives `feeds.incidents` (#2366, spec\n# `tech-incidents-to-discord`). It runs `holocron sync incidents --yes`, which reads state, not events: every incident\n# still open and those resolved in the last two days, and brings each one's post in step with it (a missing post is made,\n# a new update is appended once, the tag and the closed state follow the status). Nothing is deleted. It only reads\n# Checkly and only writes to Discord, so it changes no file and opens no pull request.\n#\n# Its caller runs it every ten minutes and on demand, with `dry-run` to see what a run would do. Incidents are rare and\n# written by hand, so a notice up to ten minutes late (plus GitHub's own delay, which also drops scheduled runs; the\n# heartbeat is more lenient than the cron) is acceptable. The first run posts only what is open or recent, so a page with\n# history is not dumped into the forum.\n#\n# It needs two secrets in the `ci` layer: `HOLOCRON_CHECKLY_TOKEN` (it only reads; the key held today can also write the\n# status page, because no narrower key is available, and a Read Only key would be enough here) and\n# `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot, which must be able to post in the forum and manage its threads). Without\n# either the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_CHECKLY_TOKEN:\n description: The Checkly API key that reads the status page's incidents. Without it the job warns and does nothing.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_INCIDENTS:\n description: The ping URL of the `sync-incidents` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-incidents:\n name: Sync status page incidents\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same incident.\n concurrency:\n group: sync-incidents\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n env:\n HOLOCRON_CHECKLY_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN }}\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that a token is missing\n if: env.HOLOCRON_CHECKLY_TOKEN == '' || env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_CHECKLY_TOKEN and HOLOCRON_DISCORD_BOT_TOKEN are both needed, and one is not set, so no incidents were synced. Add them as Actions secrets.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the incidents\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync incidents --dry-run\n else\n node cli/cli/dist/cli.mjs sync incidents --yes\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-incidents` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job. A dry run does not ping.\n - name: Ping the heartbeat\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_INCIDENTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_INCIDENTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
426
426
  var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one tracker up to date from another (SPEC-0071 section 4, #1859, spec\n# `tech-issue-sync-schedule-and-assignees`, #2251): runs `holocron sync issues --from <from> --to <to>`, which creates what the\n# target is missing, updates what an earlier sync made and adds the comments it lacks. With `both` it then runs the swapped\n# direction, after the first and in the same job, so two runs never touch the same issue at once (each direction never\n# echoes what the other made).\n#\n# `from` and `to` are the command's endpoints: `github`, or `provider:key=value,...` (`linear:team=ENG`). Only a repo whose\n# `tasks:` lists `sync-issues` (with these inputs under `with:`) gets the caller, so a repo with one tracker is untouched.\n#\n# Tokens reach the job in its environment, never on a command line: `HOLOCRON_LINEAR_TOKEN` from the secret of that name and\n# GitHub's from `HOLOCRON_ISSUES_TOKEN` (the job's own token when that is not set). Scheduled hourly by the caller; a failed\n# run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n from:\n description: Where the issues are read from (`github`, or `provider:key=value,...`).\n type: string\n required: true\n to:\n description: Where they are written, in the same form.\n type: string\n required: true\n since:\n description: Only issues changed since this date or span back from now (2026-03-01, 7d, 12h).\n type: string\n required: false\n default: 2d\n both:\n description: Also run the swapped direction after the first.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_LINEAR_TOKEN:\n description: The Linear API key, when an endpoint is Linear.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: A GitHub token that can read and write issues; the job's own token is used when it is not set.\n required: false\n\njobs:\n sync-issues:\n name: Sync issues between trackers\n permissions:\n contents: read\n issues: write\n runs-on: ubuntu-latest\n timeout-minutes: 20\n # Two runs could each create the same issue on the target, so a second waits for the first.\n concurrency:\n group: sync-issues\n cancel-in-progress: false\n env:\n HOLOCRON_LINEAR_TOKEN: ${{ secrets.HOLOCRON_LINEAR_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN || github.token }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues\n with:\n command: sync issues --yes --from ${{ inputs.from }} --to ${{ inputs.to }} --since ${{ inputs.since }}\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues, the other way\n if: ${{ inputs.both }}\n with:\n command: sync issues --yes --from ${{ inputs.to }} --to ${{ inputs.from }} --since ${{ inputs.since }}\n";
427
+ var sync_prs_default$1 = "name: Sync PRs\n\n# Keeps the pull request forum's posts in step with GitHub (#2853, spec `tech-discord-notifications-v2`, step 3). It runs\n# `holocron sync prs --yes`, which reads state, not events: every open pull request and the forum's posts, and puts each\n# post's tag, title and first message right and archives the post of a pull request that is closed or merged. Sentinel's\n# feed writes a post on each webhook delivery; this catches what a missed delivery, an outage or a hand-changed tag\n# left wrong. Discord does not set a pull request's state: a tag a person changed is set back. A post whose pull request\n# is gone is reported and left alone, and the post of a closed pull request is deleted only when `feeds.prs.retainDays`\n# says so and no person has written in it. It only reads GitHub and only writes to Discord, so it changes no file and\n# opens no pull request.\n#\n# Its caller runs it every fifteen minutes and on demand, with `dry-run` to see what a run would do. Sentinel's cron\n# starts it too (a `SCHEDULED_TASKS` row, #2868), and its `sync-prs` heartbeat tells Checkly each run finished.\n#\n# It needs the `HOLOCRON_DISCORD_BOT_TOKEN` secret (the Holonet bot, which must be able to edit and delete threads in the\n# forum). The pull requests are read with `HOLOCRON_PULLS_TOKEN` when there is one, else with the run's own token. Without\n# the bot token the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_PULLS_TOKEN:\n description: Reads the pull requests, their reviews and checks. Without it the run's own token is used.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_PRS:\n description: The ping URL of the `sync-prs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-prs:\n name: Sync pull request posts\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each edit the same post.\n concurrency:\n group: sync-prs\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n HOLOCRON_PULLS_TOKEN: ${{ secrets.HOLOCRON_PULLS_TOKEN || github.token }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that the Discord token is missing\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no pull request posts were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the pull request posts\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync prs --dry-run\n else\n node cli/cli/dist/cli.mjs sync prs --yes\n fi\n\n # Tells Checkly this run finished (#2868, the `sync-prs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job. A dry run does not ping.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_PRS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_PRS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
427
428
  var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
428
429
  var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061). It used to write one key,\n# `SENTINEL_AXIOM_INGEST_TOKEN`, to an organization Actions secret as well, for the dispatched check workflow; Sentinel no longer\n# dispatches it (#2263), so nothing in Actions needs a copy and no GitHub token is passed. apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync secrets\n with:\n command: sync\n args: >-\n secrets --env ${{ inputs.environment }} --cwd apps/sentinel --project-id sentinel\n --target production\n";
429
430
  var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_SPECS:\n description: The ping URL of the `sync-specs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-specs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. Not for a dry run, nor when there is no Discord token (the job did nothing).\n # A no-op until the secret exists; the URL is a credential: it goes in through `env` only, is masked, and a failed\n # ping never fails the job.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_SPECS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_SPECS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
@@ -506,6 +507,7 @@ const WORKFLOWS = Object.fromEntries(Object.entries(/* @__PURE__ */ Object.assig
506
507
  "../workflows/sync-dispatch.yml": sync_dispatch_default,
507
508
  "../workflows/sync-incidents.yml": sync_incidents_default$1,
508
509
  "../workflows/sync-issues.yml": sync_issues_default$1,
510
+ "../workflows/sync-prs.yml": sync_prs_default$1,
509
511
  "../workflows/sync-repo.yml": sync_repo_default$1,
510
512
  "../workflows/sync-secrets.yml": sync_secrets_default$1,
511
513
  "../workflows/sync-specs.yml": sync_specs_default$1,
@@ -798,6 +800,13 @@ const LEGACY_CALLERS = {
798
800
  name: "Sync incidents"
799
801
  } }
800
802
  },
803
+ "sync-prs": {
804
+ name: "Sync PRs",
805
+ jobs: { "sync-prs": {
806
+ id: "sync-prs",
807
+ name: "Sync PRs"
808
+ } }
809
+ },
801
810
  "open-incident": {
802
811
  name: "Open incident",
803
812
  jobs: { "open-incident": {
@@ -1323,6 +1332,8 @@ var secrets_default = "name: scan:secrets\n\non: # yamllint disable-line rule:tr
1323
1332
  var sync_incidents_default = "name: sync-incidents\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"7,17,27,37,47,57 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-incidents:\n name: sync-incidents\n uses: theholocron/.github/.github/workflows/sync-incidents.yml@main\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
1324
1333
  // src/templates/workflows/sync-issues.yml
1325
1334
  var sync_issues_default = "name: sync-issues\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"47 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n issues: write\n\njobs:\n sync-issues:\n name: sync-issues\n uses: theholocron/.github/.github/workflows/sync-issues.yml@main\n secrets: inherit\n";
1335
+ // src/templates/workflows/sync-prs.yml
1336
+ var sync_prs_default = "name: sync-prs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"4,19,34,49 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n\njobs:\n sync-prs:\n name: sync-prs\n uses: theholocron/.github/.github/workflows/sync-prs.yml@main\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
1326
1337
  // src/templates/workflows/sync-repo.yml
1327
1338
  var sync_repo_default = "name: sync-repo\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n paths:\n - holocron.config.ts\n - package.json\n - pnpm-workspace.yaml\n workflow_dispatch:\n inputs:\n steps:\n description: \"Sync steps to run (default: all)\"\n type: string\n required: false\n\nconcurrency:\n group: sync-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n sync-repo:\n name: sync-repo\n uses: theholocron/.github/.github/workflows/sync-repo.yml@main\n with:\n steps: ${{ inputs.steps }}\n secrets: inherit\n";
1328
1339
  // src/templates/workflows/sync-secrets.yml
@@ -1582,6 +1593,7 @@ const WORKFLOW_TEMPLATES = rehomeAll(Object.fromEntries(Object.entries(/* @__PUR
1582
1593
  "../../templates/workflows/scan/secrets.yml": secrets_default,
1583
1594
  "../../templates/workflows/sync-incidents.yml": sync_incidents_default,
1584
1595
  "../../templates/workflows/sync-issues.yml": sync_issues_default,
1596
+ "../../templates/workflows/sync-prs.yml": sync_prs_default,
1585
1597
  "../../templates/workflows/sync-repo.yml": sync_repo_default,
1586
1598
  "../../templates/workflows/sync-secrets.yml": sync_secrets_default,
1587
1599
  "../../templates/workflows/sync-specs.yml": sync_specs_default,
@@ -356,6 +356,11 @@ const TASKS = {
356
356
  scope: "repo",
357
357
  local: { command: "sync incidents --yes" }
358
358
  },
359
+ "sync-prs": {
360
+ group: "Platform",
361
+ scope: "repo",
362
+ local: { command: "sync prs --yes" }
363
+ },
359
364
  "open-incident": {
360
365
  group: "Platform",
361
366
  scope: "repo",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.0.0-alpha.592",
3
+ "version": "5.0.0-alpha.594",
4
4
  "description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
5
5
  "keywords": [
6
6
  "ci",
@@ -55,7 +55,7 @@
55
55
  "@commitlint/lint": "^21.3.0",
56
56
  "@commitlint/load": "^21.3.0",
57
57
  "@commitlint/types": "^21.3.0",
58
- "@theholocron/datapad": "5.0.0-alpha.592",
58
+ "@theholocron/datapad": "5.0.0-alpha.594",
59
59
  "@theholocron/fs-utils": "^1.17.0-alpha.9",
60
60
  "@theholocron/json-utils": "^1.17.0-alpha.9",
61
61
  "@theholocron/misc-utils": "^1.17.0-alpha.9",