paperclip-github-plugin 0.9.14 → 0.10.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 +3 -3
- package/dist/manifest.js +1 -1
- package/dist/worker.js +46 -36
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ They can also link a Paperclip issue to a GitHub issue or pull request in any ac
|
|
|
106
106
|
## Requirements
|
|
107
107
|
|
|
108
108
|
- Node.js 20+
|
|
109
|
-
- a Paperclip host with plugin installation enabled. GitHub Sync is built and tested against Paperclip `2026.
|
|
109
|
+
- a Paperclip host with plugin installation enabled. GitHub Sync is built and tested against Paperclip `2026.529.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.
|
|
110
110
|
- a GitHub token with API access to the repositories you want to sync
|
|
111
111
|
|
|
112
112
|
## Install from npm
|
|
@@ -365,8 +365,8 @@ Useful scripts:
|
|
|
365
365
|
|
|
366
366
|
- `pnpm dev` watches the manifest, worker, and UI bundles and rebuilds them into `dist/`
|
|
367
367
|
- `pnpm dev:ui` starts a local Paperclip plugin UI dev server from `dist/ui` on port `4177`
|
|
368
|
-
- `pnpm test:e2e` builds the plugin, boots an isolated Paperclip `2026.
|
|
369
|
-
- `pnpm verify:manual` builds the plugin, boots a local-trusted Paperclip `2026.
|
|
368
|
+
- `pnpm test:e2e` builds the plugin, boots an isolated Paperclip `2026.529.0` instance, installs the plugin, and verifies the hosted settings page renders
|
|
369
|
+
- `pnpm verify:manual` builds the plugin, boots a local-trusted Paperclip `2026.529.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.
|
|
370
370
|
|
|
371
371
|
For fast hosted UI iteration, run `pnpm dev` in one terminal and `pnpm dev:ui` in another.
|
|
372
372
|
|
package/dist/manifest.js
CHANGED
|
@@ -642,7 +642,7 @@ var PULL_REQUEST_ASSET_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_I
|
|
|
642
642
|
var require2 = createRequire(import.meta.url);
|
|
643
643
|
var packageJson = require2("../package.json");
|
|
644
644
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
645
|
-
var MANIFEST_VERSION = "0.
|
|
645
|
+
var MANIFEST_VERSION = "0.10.0"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
646
646
|
var manifest = {
|
|
647
647
|
id: GITHUB_SYNC_PLUGIN_ID,
|
|
648
648
|
apiVersion: 1,
|
package/dist/worker.js
CHANGED
|
@@ -836,6 +836,14 @@ var pluginRuntimeContext = null;
|
|
|
836
836
|
function normalizeCompanyId(value) {
|
|
837
837
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
838
838
|
}
|
|
839
|
+
function normalizeActionRecord(input, context) {
|
|
840
|
+
const record = input && typeof input === "object" ? { ...input } : {};
|
|
841
|
+
const scopedCompanyId = normalizeCompanyId(context?.companyId);
|
|
842
|
+
if (scopedCompanyId) {
|
|
843
|
+
record.companyId = scopedCompanyId;
|
|
844
|
+
}
|
|
845
|
+
return record;
|
|
846
|
+
}
|
|
839
847
|
var activeSyncPromise = null;
|
|
840
848
|
var activeRunningSyncState = null;
|
|
841
849
|
var activeRunningSyncCompanyId;
|
|
@@ -15908,8 +15916,8 @@ var plugin = definePlugin({
|
|
|
15908
15916
|
const record = input && typeof input === "object" ? input : {};
|
|
15909
15917
|
return buildCommentAnnotationData(ctx, record);
|
|
15910
15918
|
});
|
|
15911
|
-
ctx.actions.register("issue.linkGitHubItem", async (input) => {
|
|
15912
|
-
const record = input
|
|
15919
|
+
ctx.actions.register("issue.linkGitHubItem", async (input, actionContext) => {
|
|
15920
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
15913
15921
|
const kind = normalizeIssueGitHubLinkKind(record.kind);
|
|
15914
15922
|
if (!kind) {
|
|
15915
15923
|
throw new Error('kind must be "issue" or "pull_request".');
|
|
@@ -15936,8 +15944,8 @@ var plugin = definePlugin({
|
|
|
15936
15944
|
requireUnlinked: true
|
|
15937
15945
|
});
|
|
15938
15946
|
});
|
|
15939
|
-
ctx.actions.register("issue.unlinkGitHubItem", async (input) => {
|
|
15940
|
-
const record = input
|
|
15947
|
+
ctx.actions.register("issue.unlinkGitHubItem", async (input, actionContext) => {
|
|
15948
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
15941
15949
|
const companyId = normalizeCompanyId(record.companyId);
|
|
15942
15950
|
const issueId = normalizeOptionalString2(record.issueId);
|
|
15943
15951
|
if (!companyId || !issueId) {
|
|
@@ -15948,10 +15956,10 @@ var plugin = definePlugin({
|
|
|
15948
15956
|
issueId
|
|
15949
15957
|
});
|
|
15950
15958
|
});
|
|
15951
|
-
ctx.actions.register("settings.saveRegistration", async (input) => {
|
|
15959
|
+
ctx.actions.register("settings.saveRegistration", async (input, actionContext) => {
|
|
15952
15960
|
const previous = normalizeSettings(await ctx.state.get(SETTINGS_SCOPE));
|
|
15953
15961
|
const config = await getResolvedConfig(ctx);
|
|
15954
|
-
const record = input
|
|
15962
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
15955
15963
|
const requestedCompanyId = normalizeCompanyId(record.companyId);
|
|
15956
15964
|
const requestedGitHubTokenLogin = "githubTokenLogin" in record ? normalizeOptionalString2(record.githubTokenLogin) : void 0;
|
|
15957
15965
|
const hasMappingsPatch = "mappings" in record;
|
|
@@ -16053,10 +16061,10 @@ var plugin = definePlugin({
|
|
|
16053
16061
|
availableAssignees: requestedCompanyId ? await listAvailableAssignees(ctx, requestedCompanyId, next) : []
|
|
16054
16062
|
};
|
|
16055
16063
|
});
|
|
16056
|
-
ctx.actions.register("settings.updateBoardAccess", async (input) => {
|
|
16064
|
+
ctx.actions.register("settings.updateBoardAccess", async (input, actionContext) => {
|
|
16057
16065
|
const previous = normalizeSettings(await ctx.state.get(SETTINGS_SCOPE));
|
|
16058
16066
|
const config = await getResolvedConfig(ctx);
|
|
16059
|
-
const record = input
|
|
16067
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16060
16068
|
const companyId = normalizeCompanyId(record.companyId);
|
|
16061
16069
|
if (!companyId) {
|
|
16062
16070
|
throw new Error("A company id is required to update Paperclip board access.");
|
|
@@ -16127,16 +16135,17 @@ var plugin = definePlugin({
|
|
|
16127
16135
|
paperclipBoardAccessConfigured: hasConfiguredPaperclipBoardAccess(next, config, companyId)
|
|
16128
16136
|
};
|
|
16129
16137
|
});
|
|
16130
|
-
ctx.actions.register("settings.validateToken", async (input) => {
|
|
16131
|
-
const
|
|
16138
|
+
ctx.actions.register("settings.validateToken", async (input, actionContext) => {
|
|
16139
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16140
|
+
const token = "token" in record ? record.token : void 0;
|
|
16132
16141
|
const trimmedToken = typeof token === "string" ? token.trim() : "";
|
|
16133
16142
|
if (!trimmedToken) {
|
|
16134
16143
|
throw new Error("Enter a GitHub token.");
|
|
16135
16144
|
}
|
|
16136
16145
|
return validateGithubToken(ctx, trimmedToken);
|
|
16137
16146
|
});
|
|
16138
|
-
ctx.actions.register("settings.ensureGitHubTokenAvailable", async (input) => {
|
|
16139
|
-
const record = input
|
|
16147
|
+
ctx.actions.register("settings.ensureGitHubTokenAvailable", async (input, actionContext) => {
|
|
16148
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16140
16149
|
const companyId = normalizeCompanyId(record.companyId);
|
|
16141
16150
|
const githubTokenRef = normalizeSecretRef(record.githubTokenRef);
|
|
16142
16151
|
const token = normalizeGitHubToken(record.token);
|
|
@@ -16173,48 +16182,49 @@ var plugin = definePlugin({
|
|
|
16173
16182
|
fallbackStored: true
|
|
16174
16183
|
};
|
|
16175
16184
|
});
|
|
16176
|
-
ctx.actions.register("project.pullRequests.createIssue", async (input) => {
|
|
16177
|
-
const record = input
|
|
16185
|
+
ctx.actions.register("project.pullRequests.createIssue", async (input, actionContext) => {
|
|
16186
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16178
16187
|
return createProjectPullRequestPaperclipIssue(ctx, record);
|
|
16179
16188
|
});
|
|
16180
|
-
ctx.actions.register("project.pullRequests.refresh", async (input) => {
|
|
16181
|
-
const record = input
|
|
16189
|
+
ctx.actions.register("project.pullRequests.refresh", async (input, actionContext) => {
|
|
16190
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16182
16191
|
return refreshProjectPullRequests(ctx, record);
|
|
16183
16192
|
});
|
|
16184
|
-
ctx.actions.register("project.pullRequests.updateBranch", async (input) => {
|
|
16185
|
-
const record = input
|
|
16193
|
+
ctx.actions.register("project.pullRequests.updateBranch", async (input, actionContext) => {
|
|
16194
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16186
16195
|
return updateProjectPullRequestBranch(ctx, record);
|
|
16187
16196
|
});
|
|
16188
|
-
ctx.actions.register("project.pullRequests.requestCopilotAction", async (input) => {
|
|
16189
|
-
const record = input
|
|
16197
|
+
ctx.actions.register("project.pullRequests.requestCopilotAction", async (input, actionContext) => {
|
|
16198
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16190
16199
|
return requestProjectPullRequestCopilotAction(ctx, record);
|
|
16191
16200
|
});
|
|
16192
|
-
ctx.actions.register("project.pullRequests.merge", async (input) => {
|
|
16193
|
-
const record = input
|
|
16201
|
+
ctx.actions.register("project.pullRequests.merge", async (input, actionContext) => {
|
|
16202
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16194
16203
|
return mergeProjectPullRequest(ctx, record);
|
|
16195
16204
|
});
|
|
16196
|
-
ctx.actions.register("project.pullRequests.close", async (input) => {
|
|
16197
|
-
const record = input
|
|
16205
|
+
ctx.actions.register("project.pullRequests.close", async (input, actionContext) => {
|
|
16206
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16198
16207
|
return closeProjectPullRequest(ctx, record);
|
|
16199
16208
|
});
|
|
16200
|
-
ctx.actions.register("project.pullRequests.addComment", async (input) => {
|
|
16201
|
-
const record = input
|
|
16209
|
+
ctx.actions.register("project.pullRequests.addComment", async (input, actionContext) => {
|
|
16210
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16202
16211
|
return addProjectPullRequestComment(ctx, record);
|
|
16203
16212
|
});
|
|
16204
|
-
ctx.actions.register("project.pullRequests.review", async (input) => {
|
|
16205
|
-
const record = input
|
|
16213
|
+
ctx.actions.register("project.pullRequests.review", async (input, actionContext) => {
|
|
16214
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16206
16215
|
return reviewProjectPullRequest(ctx, record);
|
|
16207
16216
|
});
|
|
16208
|
-
ctx.actions.register("project.pullRequests.rerunCi", async (input) => {
|
|
16209
|
-
const record = input
|
|
16217
|
+
ctx.actions.register("project.pullRequests.rerunCi", async (input, actionContext) => {
|
|
16218
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16210
16219
|
return rerunProjectPullRequestCi(ctx, record);
|
|
16211
16220
|
});
|
|
16212
|
-
ctx.actions.register("sync.runNow", async (input) => {
|
|
16213
|
-
const
|
|
16214
|
-
const
|
|
16215
|
-
const
|
|
16216
|
-
const
|
|
16217
|
-
const
|
|
16221
|
+
ctx.actions.register("sync.runNow", async (input, actionContext) => {
|
|
16222
|
+
const record = normalizeActionRecord(input, actionContext);
|
|
16223
|
+
const waitForCompletion = "waitForCompletion" in record ? Boolean(record.waitForCompletion) : false;
|
|
16224
|
+
const paperclipApiBaseUrl = "paperclipApiBaseUrl" in record ? record.paperclipApiBaseUrl : void 0;
|
|
16225
|
+
const companyId = "companyId" in record && typeof record.companyId === "string" ? record.companyId : void 0;
|
|
16226
|
+
const projectId = "projectId" in record && typeof record.projectId === "string" ? record.projectId : void 0;
|
|
16227
|
+
const issueId = "issueId" in record && typeof record.issueId === "string" ? record.issueId : void 0;
|
|
16218
16228
|
const currentSettings = normalizeSettings(await ctx.state.get(SETTINGS_SCOPE));
|
|
16219
16229
|
const target = await resolveManualSyncTarget(ctx, currentSettings, {
|
|
16220
16230
|
...companyId ? { companyId } : {},
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paperclip-github-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Paperclip plugin for synchronizing GitHub issues into Paperclip projects.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"packageManager": "pnpm@11.
|
|
7
|
+
"packageManager": "pnpm@11.5.0",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=20"
|
|
10
10
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@octokit/rest": "^22.0.1",
|
|
44
|
-
"@paperclipai/plugin-sdk": "^2026.
|
|
44
|
+
"@paperclipai/plugin-sdk": "^2026.529.0",
|
|
45
45
|
"react": "^19.2.6",
|
|
46
46
|
"react-markdown": "^10.1.0",
|
|
47
47
|
"rehype-raw": "^7.0.0",
|