paperclip-github-plugin 0.3.5 → 0.4.0

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
@@ -19,6 +19,7 @@ With this plugin, you can:
19
19
  - import open GitHub issues into Paperclip without adding title prefixes or duplicate issues
20
20
  - keep descriptions, labels, and status aligned with GitHub over time
21
21
  - configure mappings and import defaults per Paperclip company
22
+ - on authenticated Paperclip deployments, choose exactly which company agents should receive the saved GitHub token as `GITHUB_TOKEN`
22
23
  - run sync manually or on a schedule
23
24
  - triage open pull requests from mapped Paperclip projects in a hosted queue
24
25
  - give Paperclip agents native GitHub tools for issues, pull requests, CI, review threads, and org-level projects
@@ -28,6 +29,7 @@ With this plugin, you can:
28
29
  The plugin adds a full in-host workflow instead of a one-off import script:
29
30
 
30
31
  - a hosted settings page for GitHub auth, repository mappings, company defaults, and sync controls
32
+ - authenticated-only setup controls for Paperclip board access and company-scoped agent token propagation
31
33
  - a dashboard widget that shows readiness, sync status, and last-run results
32
34
  - saved sync diagnostics that let operators inspect the latest per-issue failures, raw errors, and suggested next steps
33
35
  - a project sidebar item that opens a live project-scoped Pull Requests page for the mapped repository and can show the open PR count through a lightweight badge read
@@ -43,6 +45,8 @@ The plugin adds a full in-host workflow instead of a one-off import script:
43
45
 
44
46
  During sync, the plugin imports one top-level Paperclip issue per GitHub issue, 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.
45
47
 
48
+ 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 or status repair paths when those routes are available.
49
+
46
50
  Long-running syncs continue in the background, so quick actions do not have to wait for the whole import to finish. Once a sync has started, the settings page, dashboard widget, and toolbar actions can request cancellation; the worker stops cooperatively after the current repository or issue step finishes.
47
51
 
48
52
  ## Highlights
@@ -103,13 +107,14 @@ npx paperclipai plugin install --local "$PWD"
103
107
 
104
108
  1. Open the plugin settings for **GitHub Sync** from inside the Paperclip company you want to configure.
105
109
  2. Paste a GitHub token, validate it, and save it.
106
- 3. If the deployment requires authenticated Paperclip board access, connect it from the same settings page and complete the approval flow.
107
- 4. Add one or more repository mappings for the current company.
108
- 5. For each mapping, either choose an existing GitHub-linked Paperclip project or enter the project name that should receive synced issues.
109
- 6. Optionally configure company-wide defaults for imported issues, including the default assignee, the default Paperclip status, and ignored GitHub usernames. Bot aliases such as `renovate[bot]` are matched when you save `renovate`.
110
- 7. Choose the automatic sync interval in minutes.
111
- 8. Save the settings and run the first manual sync.
112
- 9. Repeat inside other companies if they need their own mappings, defaults, or board access.
110
+ 3. If the deployment is authenticated, connect Paperclip board access from the same settings page and complete the approval flow.
111
+ 4. If the deployment is authenticated, choose which agents in the current company should receive the saved GitHub token as `GITHUB_TOKEN`.
112
+ 5. Add one or more repository mappings for the current company.
113
+ 6. For each mapping, either choose an existing GitHub-linked Paperclip project or enter the project name that should receive synced issues.
114
+ 7. Optionally configure company-wide defaults for imported issues, including the default assignee, the default Paperclip status, and ignored GitHub usernames. Bot aliases such as `renovate[bot]` are matched when you save `renovate`.
115
+ 8. Choose the automatic sync interval in minutes.
116
+ 9. Save the settings and run the first manual sync.
117
+ 10. Repeat inside other companies if they need their own mappings, defaults, board access, or agent token propagation.
113
118
 
114
119
  Repository input accepts either `owner/repo` or `https://github.com/owner/repo`.
115
120
  When a token is saved, the settings page audits the mapped repositories for the permissions needed by pull request actions and warns when permissions are missing or GitHub cannot verify them yet.
@@ -150,6 +155,8 @@ The plugin is designed to avoid persisting raw credentials in plugin state.
150
155
 
151
156
  - GitHub tokens saved through the UI are stored as Paperclip secret references.
152
157
  - Paperclip board access tokens are also stored as per-company secret references.
158
+ - The settings UI also keeps lightweight non-secret identity labels for those saved connections, so later visits can still show who the shared GitHub token and company board access are connected as.
159
+ - On authenticated deployments, any selected propagation agents receive `GITHUB_TOKEN` as an agent env secret-ref binding that points at the same saved GitHub token secret instead of a copied raw token.
153
160
  - The worker resolves those secret references at runtime instead of storing raw tokens in plugin state.
154
161
  - On authenticated Paperclip deployments, sync is blocked until the relevant company has connected Paperclip board access.
155
162
 
@@ -181,10 +188,13 @@ The plugin exposes GitHub workflow tools to Paperclip agents, including:
181
188
 
182
189
  When an agent posts a GitHub comment or review-thread reply through the plugin, the message includes a footer disclosing that it was created by a Paperclip AI agent and which model was used.
183
190
 
191
+ Current host caveat: on authenticated Paperclip deployments, the Paperclip host currently guards `GET /api/plugins/tools` and `POST /api/plugins/tools/execute` with board authentication before dispatching to any plugin worker. If an agent run does not have board access for the target company, GitHub Sync tool discovery and execution fail with `403 {"error":"Board access required"}` before this plugin's worker code runs.
192
+
184
193
  ## Troubleshooting
185
194
 
186
195
  - If setup is reported as incomplete, confirm that a GitHub token has been saved or that `${PAPERCLIP_HOME:-~/.paperclip}/plugins/github-sync/config.json` contains `githubToken`, and make sure at least one mapping has a created Paperclip project.
187
196
  - If Paperclip says board access is required, open plugin settings inside the affected company and complete the Paperclip board access flow before retrying sync.
197
+ - If GitHub Sync agent tools fail with `403 {"error":"Board access required"}` on `/api/plugins/tools` or `/api/plugins/tools/execute`, the current Paperclip host rejected the request before the plugin worker ran. Re-run from a board-authenticated session or agent run that has board access to the target company.
188
198
  - If the worker reaches an authenticated HTML page instead of the Paperclip API JSON responses it expects, connect Paperclip board access for that company or set `PAPERCLIP_API_URL` to a worker-accessible Paperclip API origin.
189
199
  - If a sync run finishes with partial failures, open the saved troubleshooting panel in GitHub Sync to inspect the repository, issue number, raw error, and suggested fix for each recorded failure.
190
200
  - If sync says the Paperclip API URL is not trusted, reopen the plugin from the current Paperclip host so the settings UI can refresh the saved origin, or set `PAPERCLIP_API_URL` for the worker.
package/dist/manifest.js CHANGED
@@ -503,7 +503,7 @@ var require2 = createRequire(import.meta.url);
503
503
  var packageJson = require2("../package.json");
504
504
  var DASHBOARD_WIDGET_CAPABILITY = "ui.dashboardWidget.register";
505
505
  var SCHEDULE_TICK_CRON = "* * * * *";
506
- var MANIFEST_VERSION = "0.3.5"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
506
+ var MANIFEST_VERSION = "0.4.0"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
507
507
  var manifest = {
508
508
  id: "paperclip-github-plugin",
509
509
  apiVersion: 1,