paperclip-github-plugin 0.14.0 → 0.15.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 +4 -2
- package/dist/manifest.js +6 -3
- package/dist/ui/index.js +5 -5
- package/dist/ui/index.js.map +3 -3
- package/dist/worker.js +91 -24
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -239,12 +239,14 @@ The plugin exposes GitHub workflow tools to Paperclip agents, including:
|
|
|
239
239
|
- review-thread reads, replies, resolve and unresolve actions, and `request_pull_request_reviewers` reviewer requests
|
|
240
240
|
- organization-level GitHub Project search/listing and pull-request-to-project association
|
|
241
241
|
|
|
242
|
-
`create_pull_request` is the single agent-facing delivery call for both branch publication and PR creation. The caller supplies the Paperclip issue id, a plain local branch name, the exact 40-character local branch-tip SHA, the base branch, and the PR metadata. The trusted plugin worker verifies checkout ownership, resolves the issue's execution worktree and GitHub secret, verifies the checked-out branch, worktree HEAD, local branch tip, and base ancestry, publishes only that exact commit with a non-forcing refspec, reads the remote branch SHA back, and only then
|
|
242
|
+
`create_pull_request` is the single agent-facing delivery call for both branch publication and PR creation. The caller supplies the Paperclip issue id, a plain local branch name, the exact 40-character local branch-tip SHA, the base branch, and the PR metadata. The optional `repository` may select any GitHub repository, including one that is not mapped in Paperclip, provided it matches the issue execution workspace; if omitted, the issue project must have exactly one mapped repository. The trusted plugin worker verifies checkout ownership, resolves the issue's execution worktree and GitHub secret, verifies the checked-out branch, worktree HEAD, local branch tip, and base ancestry, publishes only that exact commit with a non-forcing refspec, reads the remote branch SHA back, and only then asks GitHub to create and link the PR. GitHub token permissions determine whether publication and PR creation are allowed. The credential is never returned to or injected into the calling agent.
|
|
243
243
|
|
|
244
|
-
Branch publication uses an isolated temporary bare repository backed by the trusted workspace object database. It does not execute repository hooks, accept arbitrary refspecs, or honor
|
|
244
|
+
Branch publication uses an isolated temporary bare repository backed by the trusted workspace object database. It does not execute repository hooks, accept arbitrary refspecs, or honor repository-local remotes. The selected target repository is accepted only when it is a canonical GitHub `owner/repo` reference matching the trusted execution workspace. Publication rejects owner-qualified heads, base-branch targets, non-fast-forward updates, cross-project issues, mismatched local branch tips, and remote SHA mismatches.
|
|
245
245
|
|
|
246
246
|
The call is ordered and retry-safe rather than a cross-system transaction: a published branch may remain if GitHub PR creation or Paperclip link persistence fails. On retry, the tool re-verifies and republishes the exact SHA, then recovers an already-open PR only when repository, head, base, and head SHA all match before repairing the link and metric. It never deletes a branch or closes a PR as automatic compensation.
|
|
247
247
|
|
|
248
|
+
After that durable link is written, pull-request tools can use the same `paperclipIssueId` to read or update the PR immediately, even when the Paperclip issue was created natively and has no linked GitHub issue. If one Paperclip issue has same-number PRs in different repositories, the caller must also supply the repository so the worker can reject ambiguous or unlinked selections.
|
|
249
|
+
|
|
248
250
|
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`.
|
|
249
251
|
|
|
250
252
|
### KPI attribution API route
|
package/dist/manifest.js
CHANGED
|
@@ -260,10 +260,13 @@ var GITHUB_AGENT_TOOLS = [
|
|
|
260
260
|
additionalProperties: false,
|
|
261
261
|
required: ["paperclipIssueId", "head", "headCommitSha", "base", "title"],
|
|
262
262
|
properties: {
|
|
263
|
-
repository:
|
|
263
|
+
repository: {
|
|
264
|
+
type: "string",
|
|
265
|
+
description: "Target GitHub repository as owner/repo or https://github.com/owner/repo. It may be outside Paperclip repository mappings, but it must match the issue execution workspace. Omit only when the issue project has exactly one mapped repository."
|
|
266
|
+
},
|
|
264
267
|
paperclipIssueId: {
|
|
265
268
|
type: "string",
|
|
266
|
-
description: "Paperclip issue id used to resolve the trusted
|
|
269
|
+
description: "Paperclip issue id used to resolve the trusted execution workspace and durable pull-request link."
|
|
267
270
|
},
|
|
268
271
|
head: {
|
|
269
272
|
type: "string",
|
|
@@ -641,7 +644,7 @@ var COMPANY_METRIC_API_ROUTE_URL_PATH = `/api/plugins/${GITHUB_SYNC_PLUGIN_ID}/a
|
|
|
641
644
|
var require2 = createRequire(import.meta.url);
|
|
642
645
|
var packageJson = require2("../package.json");
|
|
643
646
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
644
|
-
var MANIFEST_VERSION = "0.
|
|
647
|
+
var MANIFEST_VERSION = "0.15.0"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
645
648
|
var manifest = {
|
|
646
649
|
id: GITHUB_SYNC_PLUGIN_ID,
|
|
647
650
|
apiVersion: 1,
|
package/dist/ui/index.js
CHANGED
|
@@ -370,7 +370,7 @@ import {
|
|
|
370
370
|
usePluginToast
|
|
371
371
|
} from "@paperclipai/plugin-sdk/ui";
|
|
372
372
|
|
|
373
|
-
// node_modules/.pnpm/@ungap+structured-clone@1.3.
|
|
373
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.3.2/node_modules/@ungap/structured-clone/esm/types.js
|
|
374
374
|
var VOID = -1;
|
|
375
375
|
var PRIMITIVE = 0;
|
|
376
376
|
var ARRAY = 1;
|
|
@@ -382,7 +382,7 @@ var SET = 6;
|
|
|
382
382
|
var ERROR = 7;
|
|
383
383
|
var BIGINT = 8;
|
|
384
384
|
|
|
385
|
-
// node_modules/.pnpm/@ungap+structured-clone@1.3.
|
|
385
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.3.2/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
386
386
|
var env = typeof self === "object" ? self : globalThis;
|
|
387
387
|
var guard = (name2, init) => {
|
|
388
388
|
switch (name2) {
|
|
@@ -460,7 +460,7 @@ var deserializer = ($2, _) => {
|
|
|
460
460
|
};
|
|
461
461
|
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
|
|
462
462
|
|
|
463
|
-
// node_modules/.pnpm/@ungap+structured-clone@1.3.
|
|
463
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.3.2/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
464
464
|
var EMPTY = "";
|
|
465
465
|
var { toString } = {};
|
|
466
466
|
var { keys } = Object;
|
|
@@ -559,7 +559,7 @@ var serializer = (strict, json, $2, _) => {
|
|
|
559
559
|
return index2;
|
|
560
560
|
}
|
|
561
561
|
case DATE:
|
|
562
|
-
return as([TYPE, value.toISOString()], value);
|
|
562
|
+
return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
|
|
563
563
|
case REGEXP: {
|
|
564
564
|
const { source, flags } = value;
|
|
565
565
|
return as([TYPE, { source, flags }], value);
|
|
@@ -593,7 +593,7 @@ var serialize = (value, { json, lossy } = {}) => {
|
|
|
593
593
|
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
594
594
|
};
|
|
595
595
|
|
|
596
|
-
// node_modules/.pnpm/@ungap+structured-clone@1.3.
|
|
596
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.3.2/node_modules/@ungap/structured-clone/esm/index.js
|
|
597
597
|
var esm_default = typeof structuredClone === "function" ? (
|
|
598
598
|
/* c8 ignore start */
|
|
599
599
|
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
|