paperclip-github-plugin 0.7.5 → 0.8.1

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/README.md CHANGED
@@ -44,7 +44,7 @@ The plugin adds a full in-host workflow instead of a one-off import script:
44
44
  2. Connect one or more GitHub repositories to Paperclip projects.
45
45
  3. Run a sync manually or let the scheduled job keep things up to date.
46
46
 
47
- During sync, the plugin imports one top-level Paperclip issue per GitHub issue, stamps it with a namespaced GitHub Sync plugin origin, updates already imported issues instead of recreating them, maps GitHub labels into Paperclip labels, and keeps GitHub-specific metadata in dedicated Paperclip surfaces rather than stuffing everything into the issue description.
47
+ During sync, the plugin imports one top-level Paperclip issue per GitHub issue, stamps it with a namespaced GitHub Sync plugin origin, updates already imported issues instead of recreating them, maps GitHub labels into Paperclip labels, and keeps GitHub-specific metadata in dedicated Paperclip surfaces rather than stuffing everything into the issue description. On Paperclip `2026.428.0` and newer, the detail surfaces can also recover GitHub issue and pull request links from Paperclip's own `originKind` / `originId` fields when the plugin registry or legacy hidden marker is missing.
48
48
 
49
49
  When the host exposes plugin issue creation, imported GitHub issues are created through the Paperclip plugin SDK path so they are not attributed to the connected board user. The worker still uses direct local Paperclip REST calls for label sync and for description, assignee, or status repair paths when those routes are available.
50
50
 
@@ -62,7 +62,7 @@ If a company already has a Paperclip project bound to a GitHub repository worksp
62
62
 
63
63
  ### Status sync with delivery context
64
64
 
65
- The plugin does more than mirror issue text. It looks at linked pull requests, mergeability, CI, review threads, and trusted new GitHub comments so imported Paperclip issues can reflect where the work actually is. When GitHub links an issue to a pull request in another repository, GitHub Sync now follows that pull request's actual repository for status checks, review-thread state, and deep links instead of assuming the issue repository. When sync closes an imported issue as `done` or `cancelled`, it also clears any pending Paperclip review or approval execution state so the host accepts the terminal transition cleanly.
65
+ The plugin does more than mirror issue text. It looks at linked pull requests, mergeability, CI, review decisions, review threads, and trusted new GitHub comments so imported Paperclip issues can reflect where the work actually is. When GitHub links an issue to a pull request in another repository, GitHub Sync now follows that pull request's actual repository for status checks, review state, and deep links instead of assuming the issue repository. When sync closes an imported issue as `done` or `cancelled`, it also clears any pending Paperclip review or approval execution state so the host accepts the terminal transition cleanly.
66
66
 
67
67
  ### Company KPI dashboard
68
68
 
@@ -78,7 +78,7 @@ Each mapped project can expose a **Pull Requests** entry in the sidebar that ope
78
78
 
79
79
  Paperclip issue linkage on the queue prefers the GitHub issue that the pull request closes, so imported GitHub issues and delivery work stay connected in the same project view. If a pull request has no closing-issue-backed link yet, the queue falls back to the Paperclip issue created directly from that pull request and updates the table immediately when that create action returns.
80
80
 
81
- Those pull-request-created Paperclip issues also stay in the scheduled/manual sync loop even when the pull request does not close a GitHub issue. GitHub Sync checks their CI, merge state, and review threads so new failures or unresolved feedback move the Paperclip issue back into active work. The same durable PR link is written when an agent creates a PR through the plugin tool with `paperclipIssueId`, when an authenticated agent records a `gh`-created PR through the agent API route with `paperclipIssueId`, or when an operator manually links an unlinked issue from the issue page.
81
+ Those pull-request-created Paperclip issues also stay in the scheduled/manual sync loop even when the pull request does not close a GitHub issue. GitHub Sync checks their CI, merge state, review decision, and review threads so new failures or requested feedback move the Paperclip issue back into active work. The same durable PR link is written when an agent creates a PR through the plugin tool with `paperclipIssueId`, when an authenticated agent records a `gh`-created PR through the agent API route with `paperclipIssueId`, or when an operator manually links an unlinked issue from the issue page.
82
82
 
83
83
  The issue detail panel and sync-created comment annotations also preserve cross-repository linked pull requests, showing those PRs with their real repository path so operators land in the right place on GitHub.
84
84
 
@@ -90,12 +90,12 @@ Manual GitHub issue links are added to the same import registry and issue-link e
90
90
 
91
91
  ### Agent workflows built in
92
92
 
93
- Paperclip agents can search GitHub for duplicates, read and update issues, post comments, create pull requests, inspect changed files and CI, reply to review threads, resolve or unresolve threads, request reviewers, search org-level GitHub Projects, and associate pull requests with those projects without leaving the Paperclip plugin surface.
93
+ Paperclip agents can search GitHub for duplicates, read and update issues, assign issues to the saved token owner, post comments, create pull requests, inspect changed files and CI, reply to review threads, resolve or unresolve threads, request reviewers, search org-level GitHub Projects, and associate pull requests with those projects without leaving the Paperclip plugin surface.
94
94
 
95
95
  ## Requirements
96
96
 
97
97
  - Node.js 20+
98
- - a Paperclip host with plugin installation enabled. GitHub Sync is built and tested against Paperclip `2026.427.0`; the manifest relies on explicit capabilities instead of a strict host-version gate because current latest/development hosts can report `0.0.0` during plugin upgrade.
98
+ - a Paperclip host with plugin installation enabled. GitHub Sync is built and tested against Paperclip `2026.428.0`; the manifest relies on explicit capabilities instead of a strict host-version gate because current latest/development hosts can report `0.0.0` during plugin upgrade.
99
99
  - a GitHub token with API access to the repositories you want to sync
100
100
 
101
101
  ## Install from npm
@@ -155,8 +155,8 @@ When the local Paperclip API is available, the plugin also syncs labels by name,
155
155
  | Open issue with no linked pull request, created by a repository maintainer | `todo` on first import |
156
156
  | Open issue with no linked pull request | Configured default status, which defaults to `backlog` |
157
157
  | Open issue with a linked pull request and unfinished CI | `in_progress` |
158
- | Open issue with failing CI, a non-mergeable linked pull request, or unresolved review threads | `todo`, or `in_progress` when GitHub Sync can hand the work back to an executor |
159
- | Open issue with green CI, a merge-ready linked pull request, and all review threads resolved | `in_review` |
158
+ | Open issue with failing CI, a non-mergeable linked pull request, requested changes, or unresolved review threads | `todo`, or `in_progress` when GitHub Sync can hand the work back to an executor |
159
+ | Open issue with green CI, a merge-ready linked pull request, no requested changes, and all review threads resolved | `in_review` |
160
160
  | Closed issue completed as finished work | `done` |
161
161
  | Closed issue closed as `not_planned` or `duplicate` | `cancelled` |
162
162
 
@@ -165,7 +165,7 @@ Additional behavior:
165
165
  - Open issues with no linked pull request that are created by a verified repository maintainer/admin bypass the default imported status and start in `todo`.
166
166
  - When Paperclip board access is connected for a company, the advanced assignee dropdowns list both company agents and `Me` for the connected board user.
167
167
  - Newly imported issues that finish sync in `todo` and are assigned to an agent enqueue an assignee wakeup so the agent can pick them up promptly.
168
- - For linked pull requests, GitHub Sync treats merge-conflict, behind-branch, blocked, draft, and unstable merge states as executor work, while merge-ready states such as `CLEAN` and `HAS_HOOKS` can move work into `in_review` when CI and review threads are also clear.
168
+ - For linked pull requests, GitHub Sync treats merge-conflict, behind-branch, blocked, draft, unstable merge states, and requested-changes review decisions as executor work, while merge-ready states such as `CLEAN` and `HAS_HOOKS` can move work into `in_review` when CI is green and there are no requested changes or unresolved review threads.
169
169
  - When sync moves work into `in_review`, GitHub Sync first follows the Paperclip issue execution policy's current reviewer or approver when that stage is visible on the issue. If Paperclip exposes an internal review or approval stage but not yet the participant, the plugin falls back to the configured reviewer or approver handoff assignee. If the transition is only a healthy linked-PR wait with no visible internal review or approval stage, GitHub Sync leaves the issue unassigned so it can wait on normal maintainer review without waking an internal owner.
170
170
  - When sync moves work back into active execution, GitHub Sync first follows the Paperclip issue execution policy `returnAssignee` when it is available. Otherwise it falls back to the configured executor handoff assignee and then to the default imported assignee.
171
171
  - Sync-driven handoffs to agent assignees best-effort enqueue an explicit wakeup so the next reviewer, approver, or executor can pick the issue up even when their agent is not running heartbeats.
@@ -207,9 +207,9 @@ Notes:
207
207
  The plugin exposes GitHub workflow tools to Paperclip agents, including:
208
208
 
209
209
  - repository-scoped search for issues and pull requests
210
- - issue reads, comment reads, comment writes, and metadata updates
210
+ - issue reads, comment reads, comment writes, metadata updates, and `assign_to_current_user` assignment to the saved token owner
211
211
  - pull request creation, reads, updates, changed-file inspection, and CI-check inspection
212
- - review-thread reads, replies, resolve and unresolve actions, and reviewer requests
212
+ - review-thread reads, replies, resolve and unresolve actions, and `request_pull_request_reviewers` reviewer requests
213
213
  - organization-level GitHub Project search/listing and pull-request-to-project association
214
214
 
215
215
  When an agent sends GitHub body content through the plugin, including issue bodies, pull request descriptions, comments, and review-thread replies, the plugin adds a GitHub-flavored Markdown footer with a horizontal rule and compact heading that discloses AI authorship. If the tool caller supplies `llmModel`, the footer also includes the model name, for example `###### ✨ This comment was AI-generated using gpt-5.4`.
@@ -283,11 +283,13 @@ Useful scripts:
283
283
 
284
284
  - `pnpm dev` watches the manifest, worker, and UI bundles and rebuilds them into `dist/`
285
285
  - `pnpm dev:ui` starts a local Paperclip plugin UI dev server from `dist/ui` on port `4177`
286
- - `pnpm test:e2e` builds the plugin, boots an isolated Paperclip instance, installs the plugin, and verifies the hosted settings page renders
287
- - `pnpm verify:manual` builds the plugin, boots a local-trusted Paperclip instance for manual inspection, seeds a `Dummy Company` with a mapped review project and a `CEO` agent on the Codex local adapter using model `gpt-5.4`, installs the plugin, and opens the company dashboard without seeding KPI history.
286
+ - `pnpm test:e2e` builds the plugin, boots an isolated Paperclip `2026.428.0` instance, installs the plugin, and verifies the hosted settings page renders
287
+ - `pnpm verify:manual` builds the plugin, boots a local-trusted Paperclip `2026.428.0` instance for manual inspection, seeds a `Dummy Company` with a mapped review project and a `CEO` agent on the Codex local adapter using model `gpt-5.4`, installs the plugin, and opens the company dashboard without seeding KPI history.
288
288
 
289
289
  For fast hosted UI iteration, run `pnpm dev` in one terminal and `pnpm dev:ui` in another.
290
290
 
291
+ Set `PAPERCLIP_E2E_PAPERCLIPAI_VERSION` to run e2e or manual verification against a different Paperclip release.
292
+
291
293
  If you want the seeded `CEO` agent used in manual verification to opt into Codex's bypass flag, set `PAPERCLIP_E2E_CEO_BYPASS_APPROVALS_AND_SANDBOX=true`.
292
294
 
293
295
  ## Release process
package/dist/manifest.js CHANGED
@@ -214,6 +214,21 @@ var GITHUB_AGENT_TOOLS = [
214
214
  }
215
215
  }
216
216
  },
217
+ {
218
+ name: "assign_to_current_user",
219
+ displayName: "Assign To Current User",
220
+ description: "Assign a GitHub issue to the GitHub user authenticated by the saved token, preserving any existing assignees.",
221
+ parametersSchema: {
222
+ type: "object",
223
+ additionalProperties: false,
224
+ ...issueTargetSchema,
225
+ properties: {
226
+ repository: repositoryProperty,
227
+ issueNumber: issueNumberProperty,
228
+ paperclipIssueId: paperclipIssueIdProperty
229
+ }
230
+ }
231
+ },
217
232
  {
218
233
  name: "add_issue_comment",
219
234
  displayName: "Add Issue Comment",
@@ -520,7 +535,7 @@ var COMPANY_METRIC_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_ID}/a
520
535
  var require2 = createRequire(import.meta.url);
521
536
  var packageJson = require2("../package.json");
522
537
  var SCHEDULE_TICK_CRON = "* * * * *";
523
- var MANIFEST_VERSION = "0.7.5"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
538
+ var MANIFEST_VERSION = "0.8.1"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
524
539
  var manifest = {
525
540
  id: GITHUB_SYNC_PLUGIN_ID,
526
541
  apiVersion: 1,
package/dist/ui/index.js CHANGED
@@ -34663,6 +34663,7 @@ function GitHubSyncIssueDetailTabContent(props) {
34663
34663
  const issueDetailsKind = issueDetails?.kind ?? "issue";
34664
34664
  const githubUrl = issueDetailsKind === "pull_request" ? issueDetails?.githubPullRequestUrl : issueDetails?.githubIssueUrl;
34665
34665
  const githubStateLabel = issueDetailsKind === "pull_request" ? issueDetails?.githubPullRequestState === "closed" ? "Closed" : "Open" : formatGitHubIssueState(issueDetails?.githubIssueState, issueDetails?.githubIssueStateReason);
34666
+ const showRecoveredLinkNote = issueDetails?.source === "issue_origin" || issueDetails?.kind !== "pull_request" && issueDetails?.source !== "entity";
34666
34667
  function closeManualLinkModal() {
34667
34668
  if (manualLinkPending) {
34668
34669
  return;
@@ -34841,7 +34842,7 @@ function GitHubSyncIssueDetailTabContent(props) {
34841
34842
  `${label.name}:${label.color ?? "none"}`
34842
34843
  )) })
34843
34844
  ] }) : null,
34844
- issueDetails.kind !== "pull_request" && issueDetails.source !== "entity" ? /* @__PURE__ */ jsx2("div", { className: "ghsync-extension-note", children: "GitHub Sync recovered this link from older sync metadata. Run sync once to refresh the creator, GitHub state, labels, and linked PRs in this panel." }) : null
34845
+ showRecoveredLinkNote ? /* @__PURE__ */ jsx2("div", { className: "ghsync-extension-note", children: issueDetails.source === "issue_origin" ? "GitHub Sync recovered this link from the Paperclip issue origin. Run sync once to refresh richer GitHub metadata in this panel." : "GitHub Sync recovered this link from older sync metadata. Run sync once to refresh the creator, GitHub state, labels, and linked PRs in this panel." }) : null
34845
34846
  ] }) : null,
34846
34847
  manualLinkOpen ? /* @__PURE__ */ jsx2("div", { className: "ghsync-link-modal-backdrop", onClick: closeManualLinkModal, children: /* @__PURE__ */ jsxs2(
34847
34848
  "div",