@qwen-code/channel-github 0.26.9 → 0.27.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/dist/GithubAdapter.d.ts +294 -25
- package/dist/GithubAdapter.d.ts.map +1 -1
- package/dist/GithubAdapter.js +1622 -312
- package/dist/GithubAdapter.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,aAAa,EAUd,MAAM,oBAAoB,CAAC;AA4D5B,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,eAAO,MAAM,MAAM,EAAE,aA4JpB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MAX_POLL_INTERVAL_MS, PR_BINDING_ROLES, } from '@qwen-code/channel-base';
|
|
2
|
-
import { GithubChannel, validateBoundSessionConfig, PR_NOTIFICATION_REASONS, PR_WATCH_EVENTS, } from './GithubAdapter.js';
|
|
2
|
+
import { GithubChannel, validateBoundSessionConfig, DEFAULT_PR_WATCH_LIMIT, MAX_PR_WATCH_LIMIT, DEFAULT_PR_WATCH_BUDGET_RESERVE, MAX_PR_WATCH_BUDGET_RESERVE, validateRepoFilterConfig, PR_NOTIFICATION_REASONS, PR_WATCH_EVENTS, REPO_FILTER_MODES, } from './GithubAdapter.js';
|
|
3
3
|
/**
|
|
4
4
|
* One-line meaning of each unqualified boundSessionActions key, shown by
|
|
5
5
|
* management UIs next to the key and in the add picker. Role-qualified
|
|
@@ -117,6 +117,22 @@ export const plugin = {
|
|
|
117
117
|
label: value,
|
|
118
118
|
})),
|
|
119
119
|
},
|
|
120
|
+
{
|
|
121
|
+
key: 'repoFilterMode',
|
|
122
|
+
label: 'Repository Filter',
|
|
123
|
+
kind: 'enum',
|
|
124
|
+
default: 'off',
|
|
125
|
+
description: 'Filter incoming notifications by repository: allowlist processes only the listed repositories, blocklist processes all except the listed ones. Notifications about PRs bound to a session are filtered too; only their PR state watch events bypass the filter.',
|
|
126
|
+
// Built from the adapter's exported vocabulary so the UI options
|
|
127
|
+
// cannot drift from the validator (the PR_WATCH_EVENTS pattern).
|
|
128
|
+
options: REPO_FILTER_MODES.map((value) => ({ value, label: value })),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
key: 'repoFilter',
|
|
132
|
+
label: 'Filtered Repositories',
|
|
133
|
+
kind: 'string-list',
|
|
134
|
+
description: 'Comma-separated owner/repo repository names used by the repository filter. Requires Repository Filter to be set to allowlist or blocklist.',
|
|
135
|
+
},
|
|
120
136
|
{
|
|
121
137
|
key: 'deliverToBoundSessions',
|
|
122
138
|
label: 'Deliver To PR-Bound Sessions',
|
|
@@ -124,6 +140,13 @@ export const plugin = {
|
|
|
124
140
|
description: 'Deliver events for PRs bound to a live session into that session as a prompt, instead of a channel-owned session. Requires a daemon-managed channel.',
|
|
125
141
|
default: 'false',
|
|
126
142
|
},
|
|
143
|
+
{
|
|
144
|
+
key: 'prCommentWatch',
|
|
145
|
+
label: 'PR Comment Watch',
|
|
146
|
+
kind: 'boolean',
|
|
147
|
+
description: 'Poll conversation and inline review comments on bound PRs and deliver each new one to every bound session that did not post it (including comments by the same GitHub account used by another session/agent). Requires Deliver To PR-Bound Sessions. Enabled by default; set false to disable.',
|
|
148
|
+
default: 'true',
|
|
149
|
+
},
|
|
127
150
|
{
|
|
128
151
|
key: 'prWatchEvents',
|
|
129
152
|
label: 'PR Watch Events',
|
|
@@ -133,6 +156,24 @@ export const plugin = {
|
|
|
133
156
|
// never drift from the validator/emit path (R2-18).
|
|
134
157
|
options: PR_WATCH_EVENTS.map((value) => ({ value, label: value })),
|
|
135
158
|
},
|
|
159
|
+
{
|
|
160
|
+
key: 'prWatchLimit',
|
|
161
|
+
label: 'PR Watch Limit',
|
|
162
|
+
kind: 'number',
|
|
163
|
+
exclusiveMinimum: 0,
|
|
164
|
+
maximum: MAX_PR_WATCH_LIMIT,
|
|
165
|
+
default: String(DEFAULT_PR_WATCH_LIMIT),
|
|
166
|
+
description: 'Maximum open bound PRs watched per poll (requires Deliver To PR-Bound Sessions and PR Watch Events). Open PRs keep the full budget; merged/closed bindings drain in an additional slice (20% of the limit, at least one) outside it, so they never crowd out open PRs. Each watched PR costs about one pulls.get per poll — at the 60s default that is ~60 requests/hour per PR, so a 5000/hour PAT budget admits ~80 watched PRs (~69 open while a terminal backlog drains at the 1.2x fan-out); an over-budget configuration makes every watch pass abort on rate limits. Raise Poll Interval when raising this. Leave empty for the default.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: 'prWatchBudgetReserve',
|
|
170
|
+
label: 'PR Watch Budget Reserve',
|
|
171
|
+
kind: 'number',
|
|
172
|
+
exclusiveMinimum: -1,
|
|
173
|
+
maximum: MAX_PR_WATCH_BUDGET_RESERVE,
|
|
174
|
+
default: String(DEFAULT_PR_WATCH_BUDGET_RESERVE),
|
|
175
|
+
description: 'REST requests held back for the interactive notification lane (requires Deliver To PR-Bound Sessions and PR Watch Events). When the last known remaining budget is at or below this, the PR state watch is skipped for that poll — and stopped mid-pass if a pass spends down to it — so a human mention is not starved by background polling; detection resumes once the budget recovers or its window resets. The default (200) is ~4% of a 5000/hour PAT budget. Set 0 to disable the gate. Leave empty for the default.',
|
|
176
|
+
},
|
|
136
177
|
{
|
|
137
178
|
key: 'boundSessionActions',
|
|
138
179
|
label: 'Bound Session Actions',
|
|
@@ -146,7 +187,8 @@ export const plugin = {
|
|
|
146
187
|
if (!token && config['useLocalGh'] !== true) {
|
|
147
188
|
return 'Channel requires a token or local GitHub CLI authentication (useLocalGh).';
|
|
148
189
|
}
|
|
149
|
-
return validateBoundSessionConfig(config, 'github')
|
|
190
|
+
return (validateBoundSessionConfig(config, 'github') ??
|
|
191
|
+
validateRepoFilterConfig(config, 'github'));
|
|
150
192
|
},
|
|
151
193
|
},
|
|
152
194
|
createChannel: (name, config, bridge, options) => new GithubChannel(name, config, bridge, options),
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EAClB,+BAA+B,EAC/B,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,yBAAyB,GAA2B;IACxD,OAAO,EAAE,6DAA6D;IACtE,kBAAkB,EAAE,qCAAqC;IACzD,sBAAsB,EAAE,kCAAkC;IAC1D,mBAAmB,EAAE,8BAA8B;IACnD,oBAAoB,EAAE,4BAA4B;IAClD,OAAO,EAAE,iCAAiC;IAC1C,gBAAgB,EAAE,gCAAgC;IAClD,MAAM,EAAE,4BAA4B;IACpC,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,gCAAg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wen-code/channel-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"description": "GitHub polling channel adapter for Qwen Code",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@octokit/rest": "^21.1.1",
|
|
28
|
-
"@qwen-code/channel-base": "0.
|
|
28
|
+
"@qwen-code/channel-base": "0.27.1",
|
|
29
29
|
"https-proxy-agent": "^7.0.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|