paperclip-github-plugin 0.3.1 → 0.3.2

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
@@ -150,7 +150,7 @@ The plugin is designed to avoid persisting raw credentials in plugin state.
150
150
 
151
151
  ### Optional worker-local token file
152
152
 
153
- If Paperclip-managed secrets are not available, the worker can read a local fallback file at `~/.paperclip/plugins/github-sync/config.json`:
153
+ If Paperclip-managed secrets are not available, the worker can read a local fallback file at `${PAPERCLIP_HOME:-~/.paperclip}/plugins/github-sync/config.json`:
154
154
 
155
155
  ```json
156
156
  {
@@ -177,7 +177,7 @@ When an agent posts a GitHub comment or review-thread reply through the plugin,
177
177
 
178
178
  ## Troubleshooting
179
179
 
180
- - If setup is reported as incomplete, confirm that a GitHub token has been saved or that `~/.paperclip/plugins/github-sync/config.json` contains `githubToken`, and make sure at least one mapping has a created Paperclip project.
180
+ - 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.
181
181
  - If Paperclip says board access is required, open plugin settings inside the affected company and complete the Paperclip board access flow before retrying sync.
182
182
  - 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.
183
183
  - 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.
package/dist/manifest.js CHANGED
@@ -435,7 +435,7 @@ var require2 = createRequire(import.meta.url);
435
435
  var packageJson = require2("../package.json");
436
436
  var DASHBOARD_WIDGET_CAPABILITY = "ui.dashboardWidget.register";
437
437
  var SCHEDULE_TICK_CRON = "* * * * *";
438
- var MANIFEST_VERSION = "0.3.1"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
438
+ var MANIFEST_VERSION = "0.3.2"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
439
439
  var manifest = {
440
440
  id: "paperclip-github-plugin",
441
441
  apiVersion: 1,
package/dist/worker.js CHANGED
@@ -551,7 +551,7 @@ var SYNC_PROGRESS_PERSIST_INTERVAL_MS = 250;
551
551
  var MAX_SYNC_FAILURE_LOG_ENTRIES = 25;
552
552
  var GITHUB_SECONDARY_RATE_LIMIT_FALLBACK_MS = 6e4;
553
553
  var MISSING_GITHUB_TOKEN_SYNC_MESSAGE = "Configure a GitHub token before running sync.";
554
- var MISSING_GITHUB_TOKEN_SYNC_ACTION = 'Open settings and save a GitHub token secret, or create ~/.paperclip/plugins/github-sync/config.json with a "githubToken" value, and then run sync again.';
554
+ var MISSING_GITHUB_TOKEN_SYNC_ACTION = 'Open settings and save a GitHub token secret, or create $PAPERCLIP_HOME/plugins/github-sync/config.json (or ~/.paperclip/plugins/github-sync/config.json when PAPERCLIP_HOME is unset) with a "githubToken" value, and then run sync again.';
555
555
  var MISSING_MAPPING_SYNC_MESSAGE = "Save at least one mapping with a created Paperclip project before running sync.";
556
556
  var MISSING_MAPPING_SYNC_ACTION = "Open settings, add a repository mapping, let Paperclip create the target project, and then retry sync.";
557
557
  var MISSING_BOARD_ACCESS_SYNC_MESSAGE = "Connect Paperclip board access before running sync on this authenticated deployment.";
@@ -559,7 +559,6 @@ var MISSING_BOARD_ACCESS_SYNC_ACTION = "Open plugin settings for each mapped com
559
559
  var ISSUE_LINK_ENTITY_TYPE = "paperclip-github-plugin.issue-link";
560
560
  var PULL_REQUEST_LINK_ENTITY_TYPE = "paperclip-github-plugin.pull-request-link";
561
561
  var COMMENT_ANNOTATION_ENTITY_TYPE = "paperclip-github-plugin.comment-annotation";
562
- var EXTERNAL_CONFIG_FILE_PATH_SEGMENTS = [".paperclip", "plugins", "github-sync", "config.json"];
563
562
  var AI_AUTHORED_COMMENT_FOOTER_PREFIX = "Created by a Paperclip AI agent using ";
564
563
  function normalizeCompanyId(value) {
565
564
  return typeof value === "string" && value.trim() ? value.trim() : void 0;
@@ -2703,13 +2702,17 @@ function normalizeGitHubToken(value) {
2703
2702
  return trimmed ? trimmed : void 0;
2704
2703
  }
2705
2704
  function getExternalConfigFilePath() {
2706
- const homeDirectory = getHomeDirectory();
2707
- return homeDirectory ? join(homeDirectory, ...EXTERNAL_CONFIG_FILE_PATH_SEGMENTS) : void 0;
2705
+ const paperclipHomeDirectory = getPaperclipHomeDirectory();
2706
+ return paperclipHomeDirectory ? join(paperclipHomeDirectory, "plugins", "github-sync", "config.json") : void 0;
2708
2707
  }
2709
- function getHomeDirectory() {
2708
+ function getPaperclipHomeDirectory() {
2709
+ const configuredPaperclipHome = process.env.PAPERCLIP_HOME?.trim();
2710
+ if (configuredPaperclipHome) {
2711
+ return resolve(configuredPaperclipHome);
2712
+ }
2710
2713
  try {
2711
2714
  const resolvedHomeDirectory = homedir();
2712
- return typeof resolvedHomeDirectory === "string" && resolvedHomeDirectory.trim() ? resolvedHomeDirectory : void 0;
2715
+ return typeof resolvedHomeDirectory === "string" && resolvedHomeDirectory.trim() ? join(resolvedHomeDirectory, ".paperclip") : void 0;
2713
2716
  } catch {
2714
2717
  return void 0;
2715
2718
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperclip-github-plugin",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Paperclip plugin for synchronizing GitHub issues into Paperclip projects.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",