oh-my-opencode 5.1.84 → 5.1.86
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/.agents/command/remove-deadcode.md +1 -1
- package/.agents/skills/remove-deadcode/SKILL.md +1 -1
- package/.agents/skills/work-with-pr/SKILL.md +2 -2
- package/.opencode/command/remove-deadcode.md +1 -1
- package/.opencode/skills/work-with-pr/SKILL.md +2 -2
- package/THIRD-PARTY-NOTICES.md +9 -3
- package/dist/cli/index.js +1022 -842
- package/dist/cli/service-auth/devices.d.ts +5 -2
- package/dist/cli-node/index.js +1022 -842
- package/dist/config/schema/agent-names.d.ts +1 -0
- package/dist/index.js +180 -205
- package/dist/skills/browser/SKILL.md +4 -1
- package/dist/skills/browser/references/commands.md +5 -2
- package/dist/skills/browser/references/desktop.md +1 -0
- package/dist/skills/browser/references/owned-engine/README.md +2 -0
- package/dist/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
- package/dist/skills/browser/references/owned-engine/network.md +10 -5
- package/dist/skills/browser/references/recipes/1password.md +2 -0
- package/dist/skills/browser/runtime/omowright/index.js +11 -11
- package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
- package/dist/skills/debugging/SKILL.md +1 -1
- package/dist/skills/git/SKILL.md +62 -0
- package/dist/skills/git/agents/openai.yaml +13 -0
- package/dist/skills/github/SKILL.md +94 -0
- package/dist/skills/github/references/branch-rules.md +129 -0
- package/dist/skills/github/references/evidence-attachments.md +16 -0
- package/dist/skills/github/references/repo-setup.md +152 -0
- package/dist/skills/github/references/waiting.md +52 -0
- package/dist/skills/github/references/workflows.md +161 -0
- package/dist/skills/github/scripts/cli.ts +8 -0
- package/dist/skills/github/scripts/package.json +12 -0
- package/dist/skills/github/scripts/sdk.ts +11 -0
- package/dist/skills/github/scripts/src/account.ts +243 -0
- package/dist/skills/github/scripts/src/actions-write.ts +86 -0
- package/dist/skills/github/scripts/src/actions.ts +210 -0
- package/dist/skills/github/scripts/src/attestations.ts +136 -0
- package/dist/skills/github/scripts/src/blake2b.ts +102 -0
- package/dist/skills/github/scripts/src/branch-protection.ts +192 -0
- package/dist/skills/github/scripts/src/caches.ts +105 -0
- package/dist/skills/github/scripts/src/checks.ts +107 -0
- package/dist/skills/github/scripts/src/codespaces.ts +230 -0
- package/dist/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/dist/skills/github/scripts/src/discussion-list.ts +126 -0
- package/dist/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/dist/skills/github/scripts/src/discussions.ts +234 -0
- package/dist/skills/github/scripts/src/env.ts +100 -0
- package/dist/skills/github/scripts/src/errors.ts +79 -0
- package/dist/skills/github/scripts/src/fields.ts +27 -0
- package/dist/skills/github/scripts/src/gist-shape.ts +58 -0
- package/dist/skills/github/scripts/src/gists-write.ts +130 -0
- package/dist/skills/github/scripts/src/gists.ts +118 -0
- package/dist/skills/github/scripts/src/git-auth.ts +46 -0
- package/dist/skills/github/scripts/src/http.ts +159 -0
- package/dist/skills/github/scripts/src/issue-develop.ts +118 -0
- package/dist/skills/github/scripts/src/issues-extra.ts +135 -0
- package/dist/skills/github/scripts/src/issues-write.ts +174 -0
- package/dist/skills/github/scripts/src/issues.ts +156 -0
- package/dist/skills/github/scripts/src/keys.ts +176 -0
- package/dist/skills/github/scripts/src/labels.ts +209 -0
- package/dist/skills/github/scripts/src/merge.ts +115 -0
- package/dist/skills/github/scripts/src/poly1305.ts +22 -0
- package/dist/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/dist/skills/github/scripts/src/pr-view.ts +106 -0
- package/dist/skills/github/scripts/src/project-fields.ts +144 -0
- package/dist/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/dist/skills/github/scripts/src/project-items.ts +191 -0
- package/dist/skills/github/scripts/src/project-links.ts +104 -0
- package/dist/skills/github/scripts/src/project-ref.ts +145 -0
- package/dist/skills/github/scripts/src/project-state.ts +99 -0
- package/dist/skills/github/scripts/src/projects.ts +158 -0
- package/dist/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/dist/skills/github/scripts/src/pulls-read.ts +176 -0
- package/dist/skills/github/scripts/src/pulls-review.ts +206 -0
- package/dist/skills/github/scripts/src/pulls-write.ts +187 -0
- package/dist/skills/github/scripts/src/raw.ts +78 -0
- package/dist/skills/github/scripts/src/read.ts +77 -0
- package/dist/skills/github/scripts/src/release-assets.ts +111 -0
- package/dist/skills/github/scripts/src/release-download.ts +151 -0
- package/dist/skills/github/scripts/src/release-write.ts +197 -0
- package/dist/skills/github/scripts/src/repo-admin.ts +112 -0
- package/dist/skills/github/scripts/src/repo-content.ts +187 -0
- package/dist/skills/github/scripts/src/repo-create.ts +139 -0
- package/dist/skills/github/scripts/src/repo-extras.ts +217 -0
- package/dist/skills/github/scripts/src/repo-list.ts +143 -0
- package/dist/skills/github/scripts/src/repo-settings.ts +176 -0
- package/dist/skills/github/scripts/src/repo-sync.ts +81 -0
- package/dist/skills/github/scripts/src/repo-url.ts +104 -0
- package/dist/skills/github/scripts/src/repos.ts +87 -0
- package/dist/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/dist/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/dist/skills/github/scripts/src/rulesets.ts +80 -0
- package/dist/skills/github/scripts/src/run-download.ts +88 -0
- package/dist/skills/github/scripts/src/salsa20.ts +97 -0
- package/dist/skills/github/scripts/src/scopes.ts +165 -0
- package/dist/skills/github/scripts/src/sealed-box.ts +75 -0
- package/dist/skills/github/scripts/src/search-commits.ts +114 -0
- package/dist/skills/github/scripts/src/search.ts +116 -0
- package/dist/skills/github/scripts/src/secrets.ts +131 -0
- package/dist/skills/github/scripts/src/snappy.ts +57 -0
- package/dist/skills/github/scripts/src/status-search.ts +55 -0
- package/dist/skills/github/scripts/src/transfer.ts +97 -0
- package/dist/skills/github/scripts/src/types.ts +75 -0
- package/dist/skills/github/scripts/src/variables.ts +86 -0
- package/dist/skills/github/scripts/src/wait.ts +164 -0
- package/dist/skills/github/scripts/src/wire.ts +159 -0
- package/dist/skills/github/scripts/src/workflows.ts +144 -0
- package/dist/skills/github/scripts/src/zip.ts +104 -0
- package/dist/skills/github/scripts/surface.ts +106 -0
- package/dist/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/dist/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/dist/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/dist/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/dist/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/dist/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/dist/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/dist/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/dist/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/dist/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/dist/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/dist/skills/programming/SKILL.md +1 -1
- package/dist/skills/ulw-execute/SKILL.md +1 -1
- package/dist/tui.js +30 -27
- package/package.json +28 -26
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +3 -3
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +4 -1
- package/packages/omo-codex/plugin/skills/browser/references/commands.md +5 -2
- package/packages/omo-codex/plugin/skills/browser/references/desktop.md +1 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +2 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +10 -5
- package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +2 -0
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +11 -11
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/git/SKILL.md +62 -0
- package/packages/omo-codex/plugin/skills/git/agents/openai.yaml +13 -0
- package/packages/omo-codex/plugin/skills/github/SKILL.md +94 -0
- package/packages/omo-codex/plugin/skills/github/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/github/references/branch-rules.md +129 -0
- package/packages/omo-codex/plugin/skills/github/references/evidence-attachments.md +16 -0
- package/packages/omo-codex/plugin/skills/github/references/repo-setup.md +152 -0
- package/packages/omo-codex/plugin/skills/github/references/waiting.md +52 -0
- package/packages/omo-codex/plugin/skills/github/references/workflows.md +161 -0
- package/packages/omo-codex/plugin/skills/github/scripts/cli.ts +8 -0
- package/packages/omo-codex/plugin/skills/github/scripts/package.json +12 -0
- package/packages/omo-codex/plugin/skills/github/scripts/sdk.ts +11 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/account.ts +243 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/actions-write.ts +86 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/actions.ts +210 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/attestations.ts +136 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/blake2b.ts +102 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/branch-protection.ts +192 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/caches.ts +105 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/checks.ts +107 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/codespaces.ts +230 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-list.ts +126 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussions.ts +234 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/env.ts +100 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/errors.ts +79 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/fields.ts +27 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gist-shape.ts +58 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gists-write.ts +130 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gists.ts +118 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/git-auth.ts +46 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/http.ts +159 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issue-develop.ts +118 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues-extra.ts +135 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues-write.ts +174 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues.ts +156 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/keys.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/labels.ts +209 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/merge.ts +115 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/poly1305.ts +22 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pr-view.ts +106 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-fields.ts +144 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-items.ts +191 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-links.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-ref.ts +145 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-state.ts +99 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/projects.ts +158 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-read.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-review.ts +206 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-write.ts +187 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/raw.ts +78 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/read.ts +77 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-assets.ts +111 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-download.ts +151 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-write.ts +197 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-admin.ts +112 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-content.ts +187 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-create.ts +139 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-extras.ts +217 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-list.ts +143 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-settings.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-sync.ts +81 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-url.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repos.ts +87 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets.ts +80 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/run-download.ts +88 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/salsa20.ts +97 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/scopes.ts +165 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/sealed-box.ts +75 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/search-commits.ts +114 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/search.ts +116 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/secrets.ts +131 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/snappy.ts +57 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/status-search.ts +55 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/transfer.ts +97 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/types.ts +75 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/variables.ts +86 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/wait.ts +164 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/wire.ts +159 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/workflows.ts +144 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/zip.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/surface.ts +106 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +3 -3
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +5 -5
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +20 -15
- package/packages/shared-skills/skills/browser/SKILL.md +4 -1
- package/packages/shared-skills/skills/browser/references/commands.md +5 -2
- package/packages/shared-skills/skills/browser/references/desktop.md +1 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/README.md +2 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/network.md +10 -5
- package/packages/shared-skills/skills/browser/references/recipes/1password.md +2 -0
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +11 -11
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
- package/packages/shared-skills/skills/git/SKILL.md +62 -0
- package/packages/shared-skills/skills/git/agents/openai.yaml +13 -0
- package/packages/shared-skills/skills/github/SKILL.md +94 -0
- package/packages/shared-skills/skills/github/references/branch-rules.md +129 -0
- package/packages/shared-skills/skills/github/references/evidence-attachments.md +16 -0
- package/packages/shared-skills/skills/github/references/repo-setup.md +152 -0
- package/packages/shared-skills/skills/github/references/waiting.md +52 -0
- package/packages/shared-skills/skills/github/references/workflows.md +161 -0
- package/packages/shared-skills/skills/github/scripts/cli.ts +8 -0
- package/packages/shared-skills/skills/github/scripts/package.json +12 -0
- package/packages/shared-skills/skills/github/scripts/sdk.ts +11 -0
- package/packages/shared-skills/skills/github/scripts/src/account.ts +243 -0
- package/packages/shared-skills/skills/github/scripts/src/actions-write.ts +86 -0
- package/packages/shared-skills/skills/github/scripts/src/actions.ts +210 -0
- package/packages/shared-skills/skills/github/scripts/src/attestations.ts +136 -0
- package/packages/shared-skills/skills/github/scripts/src/blake2b.ts +102 -0
- package/packages/shared-skills/skills/github/scripts/src/branch-protection.ts +192 -0
- package/packages/shared-skills/skills/github/scripts/src/caches.ts +105 -0
- package/packages/shared-skills/skills/github/scripts/src/checks.ts +107 -0
- package/packages/shared-skills/skills/github/scripts/src/codespaces.ts +230 -0
- package/packages/shared-skills/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/packages/shared-skills/skills/github/scripts/src/discussion-list.ts +126 -0
- package/packages/shared-skills/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/packages/shared-skills/skills/github/scripts/src/discussions.ts +234 -0
- package/packages/shared-skills/skills/github/scripts/src/env.ts +100 -0
- package/packages/shared-skills/skills/github/scripts/src/errors.ts +79 -0
- package/packages/shared-skills/skills/github/scripts/src/fields.ts +27 -0
- package/packages/shared-skills/skills/github/scripts/src/gist-shape.ts +58 -0
- package/packages/shared-skills/skills/github/scripts/src/gists-write.ts +130 -0
- package/packages/shared-skills/skills/github/scripts/src/gists.ts +118 -0
- package/packages/shared-skills/skills/github/scripts/src/git-auth.ts +46 -0
- package/packages/shared-skills/skills/github/scripts/src/http.ts +159 -0
- package/packages/shared-skills/skills/github/scripts/src/issue-develop.ts +118 -0
- package/packages/shared-skills/skills/github/scripts/src/issues-extra.ts +135 -0
- package/packages/shared-skills/skills/github/scripts/src/issues-write.ts +174 -0
- package/packages/shared-skills/skills/github/scripts/src/issues.ts +156 -0
- package/packages/shared-skills/skills/github/scripts/src/keys.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/labels.ts +209 -0
- package/packages/shared-skills/skills/github/scripts/src/merge.ts +115 -0
- package/packages/shared-skills/skills/github/scripts/src/poly1305.ts +22 -0
- package/packages/shared-skills/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/packages/shared-skills/skills/github/scripts/src/pr-view.ts +106 -0
- package/packages/shared-skills/skills/github/scripts/src/project-fields.ts +144 -0
- package/packages/shared-skills/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/packages/shared-skills/skills/github/scripts/src/project-items.ts +191 -0
- package/packages/shared-skills/skills/github/scripts/src/project-links.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/src/project-ref.ts +145 -0
- package/packages/shared-skills/skills/github/scripts/src/project-state.ts +99 -0
- package/packages/shared-skills/skills/github/scripts/src/projects.ts +158 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-read.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-review.ts +206 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-write.ts +187 -0
- package/packages/shared-skills/skills/github/scripts/src/raw.ts +78 -0
- package/packages/shared-skills/skills/github/scripts/src/read.ts +77 -0
- package/packages/shared-skills/skills/github/scripts/src/release-assets.ts +111 -0
- package/packages/shared-skills/skills/github/scripts/src/release-download.ts +151 -0
- package/packages/shared-skills/skills/github/scripts/src/release-write.ts +197 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-admin.ts +112 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-content.ts +187 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-create.ts +139 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-extras.ts +217 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-list.ts +143 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-settings.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-sync.ts +81 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-url.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/src/repos.ts +87 -0
- package/packages/shared-skills/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/packages/shared-skills/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/packages/shared-skills/skills/github/scripts/src/rulesets.ts +80 -0
- package/packages/shared-skills/skills/github/scripts/src/run-download.ts +88 -0
- package/packages/shared-skills/skills/github/scripts/src/salsa20.ts +97 -0
- package/packages/shared-skills/skills/github/scripts/src/scopes.ts +165 -0
- package/packages/shared-skills/skills/github/scripts/src/sealed-box.ts +75 -0
- package/packages/shared-skills/skills/github/scripts/src/search-commits.ts +114 -0
- package/packages/shared-skills/skills/github/scripts/src/search.ts +116 -0
- package/packages/shared-skills/skills/github/scripts/src/secrets.ts +131 -0
- package/packages/shared-skills/skills/github/scripts/src/snappy.ts +57 -0
- package/packages/shared-skills/skills/github/scripts/src/status-search.ts +55 -0
- package/packages/shared-skills/skills/github/scripts/src/transfer.ts +97 -0
- package/packages/shared-skills/skills/github/scripts/src/types.ts +75 -0
- package/packages/shared-skills/skills/github/scripts/src/variables.ts +86 -0
- package/packages/shared-skills/skills/github/scripts/src/wait.ts +164 -0
- package/packages/shared-skills/skills/github/scripts/src/wire.ts +159 -0
- package/packages/shared-skills/skills/github/scripts/src/workflows.ts +144 -0
- package/packages/shared-skills/skills/github/scripts/src/zip.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/surface.ts +106 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/packages/shared-skills/skills/programming/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
- package/dist/skills/git-master/SKILL.md +0 -114
- package/dist/skills/git-master/agents/openai.yaml +0 -13
- package/packages/omo-codex/plugin/skills/git-master/SKILL.md +0 -114
- package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +0 -13
- package/packages/shared-skills/skills/git-master/SKILL.md +0 -114
- package/packages/shared-skills/skills/git-master/agents/openai.yaml +0 -13
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Projects (v2) themselves: list, view, create, delete and copy; state changes and links are spread in.
|
|
2
|
+
import { op, s, SurfaceError } from "../vendor/surface/index.ts";
|
|
3
|
+
import { irreversible, limitField, reads, writes } from "./fields.ts";
|
|
4
|
+
import type { GitHub } from "./http.ts";
|
|
5
|
+
import { linkOp } from "./project-links.ts";
|
|
6
|
+
import {
|
|
7
|
+
collect,
|
|
8
|
+
declare,
|
|
9
|
+
missing,
|
|
10
|
+
mutate,
|
|
11
|
+
ownerField,
|
|
12
|
+
ownerRoot,
|
|
13
|
+
pageInfo,
|
|
14
|
+
PROJECT_FIELDS as FIELDS,
|
|
15
|
+
projectGraphql,
|
|
16
|
+
projectNumberField,
|
|
17
|
+
projectQuery,
|
|
18
|
+
projectSummary as project,
|
|
19
|
+
resolveOwner,
|
|
20
|
+
resolveProject,
|
|
21
|
+
} from "./project-ref.ts";
|
|
22
|
+
import { projectStateOps } from "./project-state.ts";
|
|
23
|
+
import { at, bool, num, optStr, str } from "./read.ts";
|
|
24
|
+
|
|
25
|
+
export const projectOps = (gh: GitHub) => ({
|
|
26
|
+
list: op({
|
|
27
|
+
description:
|
|
28
|
+
"Projects of a user or organization, open ones only unless `closed` is true. Replaces `gh project list`.",
|
|
29
|
+
input: s.object({
|
|
30
|
+
owner: ownerField,
|
|
31
|
+
closed: s.optional(
|
|
32
|
+
s.boolean({ description: "Include closed projects." }),
|
|
33
|
+
),
|
|
34
|
+
limit: limitField(30),
|
|
35
|
+
}),
|
|
36
|
+
annotations: reads,
|
|
37
|
+
run: async ({ owner, closed, limit }) => {
|
|
38
|
+
const o = ownerRoot(owner);
|
|
39
|
+
const query = `query${declare("$first: Int!", "$after: String", o.decl)} { owner: ${o.root} { login ... on ProjectV2Owner { projectsV2(first: $first, after: $after) { nodes { ${FIELDS} } ${pageInfo} } } } }`;
|
|
40
|
+
let login = owner;
|
|
41
|
+
const raw = await collect(
|
|
42
|
+
limit ?? 30,
|
|
43
|
+
async (first, after) => {
|
|
44
|
+
const data = await projectGraphql(gh, query, {
|
|
45
|
+
first,
|
|
46
|
+
after,
|
|
47
|
+
...o.vars,
|
|
48
|
+
});
|
|
49
|
+
if (at(data, "owner") == null) throw missing(`owner ${owner}`);
|
|
50
|
+
login = str(data, "owner", "login");
|
|
51
|
+
return at(data, "owner", "projectsV2");
|
|
52
|
+
},
|
|
53
|
+
(p) => closed === true || !bool(p, "closed"),
|
|
54
|
+
);
|
|
55
|
+
return { owner: login, items: raw.map(project) };
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
view: op({
|
|
59
|
+
description:
|
|
60
|
+
"One project with its readme and item and field counts. Replaces `gh project view`.",
|
|
61
|
+
input: s.object({ owner: ownerField, number: projectNumberField }),
|
|
62
|
+
annotations: reads,
|
|
63
|
+
run: async ({ owner, number }) => {
|
|
64
|
+
const { login, project: p } = await projectQuery(
|
|
65
|
+
gh,
|
|
66
|
+
owner,
|
|
67
|
+
number,
|
|
68
|
+
`${FIELDS} readme items { totalCount } fields { totalCount }`,
|
|
69
|
+
);
|
|
70
|
+
return {
|
|
71
|
+
owner: login,
|
|
72
|
+
...project(p),
|
|
73
|
+
readme: optStr(p, "readme"),
|
|
74
|
+
itemCount: num(p, "items", "totalCount"),
|
|
75
|
+
fieldCount: num(p, "fields", "totalCount"),
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
create: op({
|
|
80
|
+
description:
|
|
81
|
+
"Create an empty project under a user or organization. Replaces `gh project create`.",
|
|
82
|
+
input: s.object({ owner: ownerField, title: s.string() }),
|
|
83
|
+
annotations: writes,
|
|
84
|
+
run: async ({ owner, title }) => {
|
|
85
|
+
const o = await resolveOwner(gh, owner);
|
|
86
|
+
const result = await mutate(
|
|
87
|
+
gh,
|
|
88
|
+
"createProjectV2",
|
|
89
|
+
{ ownerId: o.id, title },
|
|
90
|
+
`projectV2 { ${FIELDS} }`,
|
|
91
|
+
);
|
|
92
|
+
return { owner: o.login, ...project(at(result, "projectV2")) };
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
delete: op({
|
|
96
|
+
description:
|
|
97
|
+
"Delete a project with all its items and fields; this cannot be undone. `confirm` must equal the project's title. Replaces `gh project delete`.",
|
|
98
|
+
input: s.object({
|
|
99
|
+
owner: ownerField,
|
|
100
|
+
number: projectNumberField,
|
|
101
|
+
confirm: s.string({ description: "The project's exact title." }),
|
|
102
|
+
}),
|
|
103
|
+
annotations: irreversible,
|
|
104
|
+
run: async ({ owner, number, confirm }) => {
|
|
105
|
+
const p = await resolveProject(gh, owner, number);
|
|
106
|
+
if (confirm !== p.title)
|
|
107
|
+
throw new SurfaceError(
|
|
108
|
+
"usage",
|
|
109
|
+
`confirm "${confirm}" does not match the project title "${p.title}"`,
|
|
110
|
+
"pass the project's exact title as confirm",
|
|
111
|
+
);
|
|
112
|
+
await mutate(
|
|
113
|
+
gh,
|
|
114
|
+
"deleteProjectV2",
|
|
115
|
+
{ projectId: p.id },
|
|
116
|
+
"projectV2 { id }",
|
|
117
|
+
);
|
|
118
|
+
return { id: p.id, title: p.title, deleted: true };
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
copy: op({
|
|
122
|
+
description:
|
|
123
|
+
"Copy a project's fields and views (and draft issues with `drafts`) into a new project. Replaces `gh project copy`.",
|
|
124
|
+
input: s.object({
|
|
125
|
+
owner: s.string({
|
|
126
|
+
description: 'Source project owner login, or "@me".',
|
|
127
|
+
}),
|
|
128
|
+
number: projectNumberField,
|
|
129
|
+
targetOwner: s.optional(
|
|
130
|
+
s.string({ description: "New project owner (default: owner)." }),
|
|
131
|
+
),
|
|
132
|
+
title: s.string({ description: "Title for the new project." }),
|
|
133
|
+
drafts: s.optional(
|
|
134
|
+
s.boolean({ description: "Include draft issues when copying." }),
|
|
135
|
+
),
|
|
136
|
+
}),
|
|
137
|
+
annotations: writes,
|
|
138
|
+
run: async ({ owner, number, targetOwner, title, drafts }) => {
|
|
139
|
+
const source = await resolveProject(gh, owner, number);
|
|
140
|
+
const target = await resolveOwner(gh, targetOwner ?? owner);
|
|
141
|
+
const result = await mutate(
|
|
142
|
+
gh,
|
|
143
|
+
"copyProjectV2",
|
|
144
|
+
{
|
|
145
|
+
projectId: source.id,
|
|
146
|
+
ownerId: target.id,
|
|
147
|
+
title,
|
|
148
|
+
includeDraftIssues: drafts === true,
|
|
149
|
+
},
|
|
150
|
+
`projectV2 { ${FIELDS} }`,
|
|
151
|
+
);
|
|
152
|
+
return { owner: target.login, ...project(at(result, "projectV2")) };
|
|
153
|
+
},
|
|
154
|
+
}),
|
|
155
|
+
link: linkOp(gh, "link"),
|
|
156
|
+
unlink: linkOp(gh, "unlink"),
|
|
157
|
+
...projectStateOps(gh),
|
|
158
|
+
});
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Pull request operations beyond create/edit/merge: locks, branch updates, reverts, status and checkout.
|
|
2
|
+
import { op, s, SurfaceError } from "../vendor/surface/index.ts";
|
|
3
|
+
import { lockOps } from "./conversation-lock.ts";
|
|
4
|
+
import { limitField, numberField, reads, repoField, writes } from "./fields.ts";
|
|
5
|
+
import type { GitHub } from "./http.ts";
|
|
6
|
+
import { checkoutOp } from "./pr-checkout.ts";
|
|
7
|
+
import { pullNodeId } from "./pulls-read.ts";
|
|
8
|
+
import { at, bool, nodes, num, optStr, str } from "./read.ts";
|
|
9
|
+
import { byNumber, statusSearch } from "./status-search.ts";
|
|
10
|
+
|
|
11
|
+
const PULL = `fragment P on PullRequest{number title url state isDraft headRefName author{login} updatedAt reviewDecision
|
|
12
|
+
mergeable @include(if:$conflicts) mergeStateStatus @include(if:$conflicts) commits(last:1){nodes{commit{statusCheckRollup{state}}}}}`;
|
|
13
|
+
|
|
14
|
+
const statusPull = (conflicts: boolean) => (p: unknown) => ({
|
|
15
|
+
number: num(p, "number"),
|
|
16
|
+
title: str(p, "title"),
|
|
17
|
+
url: str(p, "url"),
|
|
18
|
+
state: str(p, "state"),
|
|
19
|
+
draft: bool(p, "isDraft"),
|
|
20
|
+
head: str(p, "headRefName"),
|
|
21
|
+
author: optStr(p, "author", "login"),
|
|
22
|
+
updatedAt: str(p, "updatedAt"),
|
|
23
|
+
checks: optStr(
|
|
24
|
+
nodes(p, "commits")[0],
|
|
25
|
+
"commit",
|
|
26
|
+
"statusCheckRollup",
|
|
27
|
+
"state",
|
|
28
|
+
),
|
|
29
|
+
reviewDecision: optStr(p, "reviewDecision"),
|
|
30
|
+
...(conflicts
|
|
31
|
+
? {
|
|
32
|
+
mergeable: optStr(p, "mergeable"),
|
|
33
|
+
mergeState: optStr(p, "mergeStateStatus"),
|
|
34
|
+
}
|
|
35
|
+
: {}),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const pullExtraOps = (gh: GitHub) => ({
|
|
39
|
+
...lockOps(gh, "pr"),
|
|
40
|
+
updateBranch: op({
|
|
41
|
+
description:
|
|
42
|
+
"Bring a PR branch up to date with its base by merging the base in, or with rebase by rebasing onto it; GitHub applies it asynchronously. With expectedHeadSha a moved head is refused. Replaces `gh pr update-branch`.",
|
|
43
|
+
input: s.object({
|
|
44
|
+
repo: repoField,
|
|
45
|
+
number: numberField,
|
|
46
|
+
rebase: s.optional(s.boolean()),
|
|
47
|
+
expectedHeadSha: s.optional(
|
|
48
|
+
s.string({ description: "Refuse unless the PR head is this commit." }),
|
|
49
|
+
),
|
|
50
|
+
}),
|
|
51
|
+
annotations: writes,
|
|
52
|
+
run: async ({ repo, number, rebase, expectedHeadSha }) => {
|
|
53
|
+
const r = await gh.repo(repo);
|
|
54
|
+
const pr = await pullNodeId(gh, r.full, number);
|
|
55
|
+
const method = rebase === true ? "REBASE" : "MERGE";
|
|
56
|
+
await gh
|
|
57
|
+
.graphql(
|
|
58
|
+
`mutation($id:ID!,$method:PullRequestBranchUpdateMethod!,$sha:GitObjectID){updatePullRequestBranch(input:{pullRequestId:$id,updateMethod:$method,expectedHeadOid:$sha}){pullRequest{number}}}`,
|
|
59
|
+
{
|
|
60
|
+
id: pr.id,
|
|
61
|
+
method,
|
|
62
|
+
...(expectedHeadSha === undefined ? {} : { sha: expectedHeadSha }),
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
.catch((error: unknown) => {
|
|
66
|
+
// GitHub reports a moved head as a plain GraphQL error; callers branch on `conflict`.
|
|
67
|
+
if (
|
|
68
|
+
error instanceof SurfaceError &&
|
|
69
|
+
error.message.includes("head sha didn't match")
|
|
70
|
+
)
|
|
71
|
+
throw new SurfaceError(
|
|
72
|
+
"conflict",
|
|
73
|
+
error.message,
|
|
74
|
+
"the PR head moved; re-read pr view and pass the new head",
|
|
75
|
+
);
|
|
76
|
+
throw error;
|
|
77
|
+
});
|
|
78
|
+
return { repo: r.full, number, method: method.toLowerCase() };
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
revert: op({
|
|
82
|
+
description:
|
|
83
|
+
"Open a pull request that reverts a merged PR; returns the new PR's number and url. Replaces `gh pr revert`.",
|
|
84
|
+
input: s.object({
|
|
85
|
+
repo: repoField,
|
|
86
|
+
number: numberField,
|
|
87
|
+
title: s.optional(s.string()),
|
|
88
|
+
body: s.optional(s.string()),
|
|
89
|
+
draft: s.optional(s.boolean()),
|
|
90
|
+
}),
|
|
91
|
+
annotations: writes,
|
|
92
|
+
run: async ({ repo, number, title, body, draft }) => {
|
|
93
|
+
const r = await gh.repo(repo);
|
|
94
|
+
const pr = await pullNodeId(gh, r.full, number);
|
|
95
|
+
const data = await gh.graphql(
|
|
96
|
+
`mutation($id:ID!,$title:String,$body:String,$draft:Boolean){revertPullRequest(input:{pullRequestId:$id,title:$title,body:$body,draft:$draft}){revertPullRequest{number url}}}`,
|
|
97
|
+
Object.fromEntries(
|
|
98
|
+
Object.entries({ id: pr.id, title, body, draft }).filter(
|
|
99
|
+
([, v]) => v !== undefined,
|
|
100
|
+
),
|
|
101
|
+
),
|
|
102
|
+
);
|
|
103
|
+
const revert = at(data, "revertPullRequest", "revertPullRequest");
|
|
104
|
+
return {
|
|
105
|
+
repo: r.full,
|
|
106
|
+
reverted: number,
|
|
107
|
+
number: num(revert, "number"),
|
|
108
|
+
url: str(revert, "url"),
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
status: op({
|
|
113
|
+
description:
|
|
114
|
+
"Open PRs in the repo created by the authenticated user or requesting their review, plus the newest PR for `branch` when given, each with checks rollup state, review decision, mergeability with `conflicts`, and the reasons it matched. Replaces `gh pr status`.",
|
|
115
|
+
input: s.object({
|
|
116
|
+
repo: repoField,
|
|
117
|
+
branch: s.optional(
|
|
118
|
+
s.string({
|
|
119
|
+
description:
|
|
120
|
+
"Head branch whose PR to include (the SDK does not read the local checkout).",
|
|
121
|
+
}),
|
|
122
|
+
),
|
|
123
|
+
conflicts: s.optional(s.boolean()),
|
|
124
|
+
limit: limitField(30),
|
|
125
|
+
}),
|
|
126
|
+
annotations: reads,
|
|
127
|
+
run: async ({ repo, branch, conflicts, limit }) => {
|
|
128
|
+
const r = await gh.repo(repo);
|
|
129
|
+
const scope = `repo:${r.full} is:pr is:open`;
|
|
130
|
+
const { data, user, hits } = await statusSearch(gh, {
|
|
131
|
+
groups: {
|
|
132
|
+
created: `${scope} author:@me`,
|
|
133
|
+
reviewRequested: `${scope} review-requested:@me`,
|
|
134
|
+
},
|
|
135
|
+
select: "...P",
|
|
136
|
+
limit: limit ?? 30,
|
|
137
|
+
declare:
|
|
138
|
+
",$conflicts:Boolean!,$owner:String!,$name:String!,$branch:String!,$hasBranch:Boolean!",
|
|
139
|
+
extra:
|
|
140
|
+
"branch:repository(owner:$owner,name:$name) @include(if:$hasBranch){pullRequests(headRefName:$branch,first:1,orderBy:{field:CREATED_AT,direction:DESC}){nodes{...P}}}",
|
|
141
|
+
fragments: PULL,
|
|
142
|
+
variables: {
|
|
143
|
+
conflicts: conflicts === true,
|
|
144
|
+
owner: r.owner,
|
|
145
|
+
name: r.name,
|
|
146
|
+
branch: branch ?? "",
|
|
147
|
+
hasBranch: branch !== undefined,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
const branchHits = nodes(data, "branch", "pullRequests").map((node) => ({
|
|
151
|
+
reason: "branch",
|
|
152
|
+
node,
|
|
153
|
+
}));
|
|
154
|
+
return {
|
|
155
|
+
repo: r.full,
|
|
156
|
+
user,
|
|
157
|
+
items: byNumber(
|
|
158
|
+
[...branchHits, ...hits],
|
|
159
|
+
statusPull(conflicts === true),
|
|
160
|
+
),
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
164
|
+
checkout: checkoutOp(gh),
|
|
165
|
+
});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { op, s } from "../vendor/surface/index.ts";
|
|
2
|
+
import { fetchChecks } from "./checks.ts";
|
|
3
|
+
import { pullViewOp } from "./pr-view.ts";
|
|
4
|
+
import { enc, limitField, numberField, reads, repoField } from "./fields.ts";
|
|
5
|
+
import type { GitHub } from "./http.ts";
|
|
6
|
+
import { bool, num, optStr, str } from "./read.ts";
|
|
7
|
+
import { searchRaw } from "./search.ts";
|
|
8
|
+
|
|
9
|
+
const pullFromRest = (p: unknown) => ({
|
|
10
|
+
number: num(p, "number"),
|
|
11
|
+
title: str(p, "title"),
|
|
12
|
+
state: str(p, "state"),
|
|
13
|
+
draft: bool(p, "draft"),
|
|
14
|
+
author: optStr(p, "user", "login"),
|
|
15
|
+
head: optStr(p, "head", "ref"),
|
|
16
|
+
base: optStr(p, "base", "ref"),
|
|
17
|
+
url: str(p, "html_url"),
|
|
18
|
+
createdAt: optStr(p, "created_at"),
|
|
19
|
+
updatedAt: optStr(p, "updated_at"),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const pullReadOps = (gh: GitHub) => ({
|
|
23
|
+
view: pullViewOp(gh),
|
|
24
|
+
list: op({
|
|
25
|
+
description:
|
|
26
|
+
"List pull requests. Plain state/base/head filters use the pulls API; author, label, merged-only or free text go through search. Replaces `gh pr list`.",
|
|
27
|
+
input: s.object({
|
|
28
|
+
repo: repoField,
|
|
29
|
+
state: s.optional(s.enum(["open", "closed", "merged", "all"])),
|
|
30
|
+
base: s.optional(s.string({ description: "Base branch." })),
|
|
31
|
+
head: s.optional(
|
|
32
|
+
s.string({ description: "Head branch (owner:branch for forks)." }),
|
|
33
|
+
),
|
|
34
|
+
author: s.optional(s.string()),
|
|
35
|
+
label: s.optional(s.string()),
|
|
36
|
+
search: s.optional(
|
|
37
|
+
s.string({ description: "Extra GitHub search qualifiers or words." }),
|
|
38
|
+
),
|
|
39
|
+
limit: limitField(30),
|
|
40
|
+
}),
|
|
41
|
+
annotations: reads,
|
|
42
|
+
run: async ({ repo, state, base, head, author, label, search, limit }) => {
|
|
43
|
+
const r = await gh.repo(repo);
|
|
44
|
+
const max = limit ?? 30;
|
|
45
|
+
if (
|
|
46
|
+
author !== undefined ||
|
|
47
|
+
label !== undefined ||
|
|
48
|
+
search !== undefined ||
|
|
49
|
+
state === "merged"
|
|
50
|
+
) {
|
|
51
|
+
const q = [
|
|
52
|
+
`repo:${r.full}`,
|
|
53
|
+
"is:pr",
|
|
54
|
+
state === "merged"
|
|
55
|
+
? "is:merged"
|
|
56
|
+
: state === "all"
|
|
57
|
+
? ""
|
|
58
|
+
: `is:${state ?? "open"}`,
|
|
59
|
+
base === undefined ? "" : `base:${base}`,
|
|
60
|
+
head === undefined ? "" : `head:${head}`,
|
|
61
|
+
author === undefined ? "" : `author:${author}`,
|
|
62
|
+
label === undefined ? "" : `label:"${label}"`,
|
|
63
|
+
search ?? "",
|
|
64
|
+
];
|
|
65
|
+
return {
|
|
66
|
+
repo: r.full,
|
|
67
|
+
items: (
|
|
68
|
+
await searchRaw(gh, q.filter(Boolean).join(" "), max)
|
|
69
|
+
).raw.map(pullFromRest),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const raw = await gh.list(`repos/${r.full}/pulls`, max, {
|
|
73
|
+
query: {
|
|
74
|
+
state: state ?? "open",
|
|
75
|
+
base,
|
|
76
|
+
head:
|
|
77
|
+
head === undefined || head.includes(":")
|
|
78
|
+
? head
|
|
79
|
+
: `${r.owner}:${head}`,
|
|
80
|
+
sort: "updated",
|
|
81
|
+
direction: "desc",
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
return { repo: r.full, items: raw.map(pullFromRest) };
|
|
85
|
+
},
|
|
86
|
+
}),
|
|
87
|
+
checks: op({
|
|
88
|
+
description:
|
|
89
|
+
"Checks on a PR's head commit: each check run and commit status with bucket pass|fail|pending|skipping|cancel, required flag and Actions run id, plus counts. Replaces `gh pr checks`.",
|
|
90
|
+
input: s.object({
|
|
91
|
+
repo: repoField,
|
|
92
|
+
number: numberField,
|
|
93
|
+
only: s.optional(
|
|
94
|
+
s.array(s.enum(["pass", "fail", "pending", "skipping", "cancel"]), {
|
|
95
|
+
description: "Return only checks in these buckets.",
|
|
96
|
+
}),
|
|
97
|
+
),
|
|
98
|
+
requiredOnly: s.optional(s.boolean()),
|
|
99
|
+
}),
|
|
100
|
+
annotations: reads,
|
|
101
|
+
run: async ({ repo, number, only, requiredOnly }) => {
|
|
102
|
+
const r = await gh.repo(repo);
|
|
103
|
+
const all = await fetchChecks(gh, r, number);
|
|
104
|
+
const checks = all.checks.filter(
|
|
105
|
+
(c) =>
|
|
106
|
+
(only === undefined || only.includes(c.bucket)) &&
|
|
107
|
+
(requiredOnly !== true || c.required),
|
|
108
|
+
);
|
|
109
|
+
return { repo: r.full, number, ...all, checks };
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
diff: op({
|
|
113
|
+
description:
|
|
114
|
+
"Unified diff of a PR, truncated at maxBytes. Use `files` first when you only need the changed paths. Replaces `gh pr diff`.",
|
|
115
|
+
input: s.object({
|
|
116
|
+
repo: repoField,
|
|
117
|
+
number: numberField,
|
|
118
|
+
maxBytes: s.optional(s.integer({ description: "Default 200000." })),
|
|
119
|
+
}),
|
|
120
|
+
annotations: reads,
|
|
121
|
+
run: async ({ repo, number, maxBytes }) => {
|
|
122
|
+
const r = await gh.repo(repo);
|
|
123
|
+
const diff = await gh.text(
|
|
124
|
+
`repos/${r.full}/pulls/${number}`,
|
|
125
|
+
"application/vnd.github.diff",
|
|
126
|
+
);
|
|
127
|
+
const cap = maxBytes ?? 200_000;
|
|
128
|
+
return {
|
|
129
|
+
repo: r.full,
|
|
130
|
+
number,
|
|
131
|
+
bytes: diff.length,
|
|
132
|
+
truncated: diff.length > cap,
|
|
133
|
+
diff: diff.slice(0, cap),
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
}),
|
|
137
|
+
files: op({
|
|
138
|
+
description:
|
|
139
|
+
"Changed files of a PR with status and line counts; patches only when asked. Replaces `gh pr diff --name-only` / `gh pr view --json files`.",
|
|
140
|
+
input: s.object({
|
|
141
|
+
repo: repoField,
|
|
142
|
+
number: numberField,
|
|
143
|
+
patch: s.optional(s.boolean()),
|
|
144
|
+
limit: limitField(300),
|
|
145
|
+
}),
|
|
146
|
+
annotations: reads,
|
|
147
|
+
run: async ({ repo, number, patch, limit }) => {
|
|
148
|
+
const r = await gh.repo(repo);
|
|
149
|
+
const raw = await gh.list(
|
|
150
|
+
`repos/${r.full}/pulls/${number}/files`,
|
|
151
|
+
limit ?? 300,
|
|
152
|
+
);
|
|
153
|
+
return raw.map((f) => ({
|
|
154
|
+
path: str(f, "filename"),
|
|
155
|
+
status: str(f, "status"),
|
|
156
|
+
additions: num(f, "additions"),
|
|
157
|
+
deletions: num(f, "deletions"),
|
|
158
|
+
previousPath: optStr(f, "previous_filename"),
|
|
159
|
+
...(patch === true ? { patch: optStr(f, "patch") } : {}),
|
|
160
|
+
}));
|
|
161
|
+
},
|
|
162
|
+
}),
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export const pullNodeId = async (
|
|
166
|
+
gh: GitHub,
|
|
167
|
+
full: string,
|
|
168
|
+
number: number,
|
|
169
|
+
): Promise<{ id: string; head: string; headRepo: string | null }> => {
|
|
170
|
+
const p = await gh.rest("GET", `repos/${full}/pulls/${enc(String(number))}`);
|
|
171
|
+
return {
|
|
172
|
+
id: str(p, "node_id"),
|
|
173
|
+
head: str(p, "head", "ref"),
|
|
174
|
+
headRepo: optStr(p, "head", "repo", "full_name"),
|
|
175
|
+
};
|
|
176
|
+
};
|