opencode-swarm 7.184.17 → 7.185.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.
Files changed (107) hide show
  1. package/README.md +6 -1
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/background/pr-review-trigger-receipt-reader.d.ts +35 -0
  5. package/dist/background/pr-subscriptions.d.ts +18 -0
  6. package/dist/background/stage-b-dispatch-binding-store.d.ts +115 -0
  7. package/dist/cli/{auto-checkpoint-8whpytsm.js → auto-checkpoint-2jecngee.js} +7 -7
  8. package/dist/cli/{checkpoint-zjtcn0tx.js → checkpoint-qm05wdbh.js} +14 -14
  9. package/dist/cli/{coder-settlement-0z8sr1ep.js → coder-settlement-56prayae.js} +10 -10
  10. package/dist/cli/{config-doctor-4zwh0dkn.js → config-doctor-3b99vx74.js} +2 -2
  11. package/dist/cli/{core-fqbga0z4.js → core-cxnqsrxp.js} +3 -3
  12. package/dist/cli/{curation-policy-1rzheh1x.js → curation-policy-ytzwb080.js} +4 -4
  13. package/dist/cli/{curator-fkebhqnh.js → curator-5k3mktpe.js} +39 -39
  14. package/dist/cli/{curator-drift-44ba54w1.js → curator-drift-dt4g79a4.js} +8 -8
  15. package/dist/cli/curator-llm-factory-hkk29g2y.js +81 -0
  16. package/dist/cli/{evidence-summary-service-e6wesfq2.js → evidence-summary-service-8e2fghz0.js} +17 -17
  17. package/dist/cli/{gate-evidence-8chc9f8q.js → gate-evidence-vk8rebsx.js} +5 -5
  18. package/dist/cli/guardrail-explain-ma658hkw.js +82 -0
  19. package/dist/cli/{guardrail-log-t0ketv64.js → guardrail-log-m6mydjet.js} +6 -6
  20. package/dist/cli/{guardrail-reset-rzva9emn.js → guardrail-reset-w41yndke.js} +39 -39
  21. package/dist/cli/{hive-promoter-h60dddna.js → hive-promoter-400xzdds.js} +39 -39
  22. package/dist/cli/{index-r472pepw.js → index-07bk0zm9.js} +1 -1
  23. package/dist/cli/{index-mfqge140.js → index-1fc5aj26.js} +1 -1
  24. package/dist/cli/{index-denfahc5.js → index-2b3bgm20.js} +1 -1
  25. package/dist/cli/{index-7n1pfpnj.js → index-2c6e1p7j.js} +3 -3
  26. package/dist/cli/{index-7rzgdcvc.js → index-373880cv.js} +1 -1
  27. package/dist/cli/{index-y0534tfs.js → index-5n08z6qj.js} +5 -5
  28. package/dist/cli/{index-jtg0zsnx.js → index-62akgg9d.js} +1 -1
  29. package/dist/cli/{index-2y9b45jj.js → index-6sffjy74.js} +1 -1
  30. package/dist/cli/{index-sfsydeh8.js → index-6wqv8f7d.js} +5 -5
  31. package/dist/cli/{index-pwcbtbhd.js → index-74yxwf8y.js} +1 -1
  32. package/dist/cli/{index-bktc2g9n.js → index-7jt24hpz.js} +2 -2
  33. package/dist/cli/{index-y8gxcmnj.js → index-7n3h39h9.js} +7 -7
  34. package/dist/cli/{index-fxf3zhtq.js → index-8nsjefpc.js} +1 -1
  35. package/dist/cli/{index-7r3pkgma.js → index-9g61bfj9.js} +1 -1
  36. package/dist/cli/{index-wxr5me67.js → index-9h93zjm3.js} +5 -1
  37. package/dist/cli/{index-dftztz4y.js → index-afmyp3kt.js} +1 -1
  38. package/dist/cli/{index-m8342y3n.js → index-cnbpht7m.js} +3 -3
  39. package/dist/cli/{index-tyzmjw2s.js → index-cp2nerjd.js} +420 -9
  40. package/dist/cli/{index-a7y29h92.js → index-dryhmaft.js} +3 -3
  41. package/dist/cli/{index-e708d35g.js → index-dz5cbkrm.js} +4 -4
  42. package/dist/cli/{index-naxrpyb0.js → index-ek5gvpvm.js} +7 -7
  43. package/dist/cli/{index-kxacpqwf.js → index-ekyg4p8b.js} +1 -1
  44. package/dist/cli/{index-hk2cap4d.js → index-fa014mra.js} +3 -3
  45. package/dist/cli/{index-pak3x772.js → index-hgfkcb1q.js} +1547 -1115
  46. package/dist/cli/{index-drndbj24.js → index-m1bhg85z.js} +2 -2
  47. package/dist/cli/{index-cftva3pa.js → index-nen885g8.js} +1 -1
  48. package/dist/cli/{index-hx4jkj05.js → index-nhw5rt5x.js} +4 -4
  49. package/dist/cli/{index-cyn2cb6k.js → index-nw16apxs.js} +5 -5
  50. package/dist/cli/{index-4v60grax.js → index-pa6fzbms.js} +4 -4
  51. package/dist/cli/{index-48we80k1.js → index-ppj5bjaq.js} +7 -7
  52. package/dist/cli/{index-gx03v1y5.js → index-pppjg0ct.js} +10 -10
  53. package/dist/cli/{index-vs1y869b.js → index-r9zc92pb.js} +41 -41
  54. package/dist/cli/{index-0pvvktht.js → index-rr1dggfe.js} +8 -3
  55. package/dist/cli/{index-8twhrz1w.js → index-rtznwf0g.js} +39 -39
  56. package/dist/cli/{index-m1pqenq9.js → index-s68z4a39.js} +2 -2
  57. package/dist/cli/{index-ww747mdg.js → index-s7va6n84.js} +3 -3
  58. package/dist/cli/{index-pef8ay7c.js → index-smwybqka.js} +2 -2
  59. package/dist/cli/{index-dky6qwrk.js → index-ss6b8jpz.js} +2 -2
  60. package/dist/cli/{index-yydv4jfy.js → index-vqz0avr4.js} +2 -2
  61. package/dist/cli/{index-yx5z4200.js → index-xgdypzch.js} +1 -1
  62. package/dist/cli/{index-0zjg4kt5.js → index-ycqsnfd1.js} +4 -4
  63. package/dist/cli/{index-bntwj2tp.js → index-yj7etak0.js} +3 -2
  64. package/dist/cli/{index-50q314wd.js → index-zt3taseq.js} +2 -2
  65. package/dist/cli/{index-4g4sr4ah.js → index-zxck9sr7.js} +1 -1
  66. package/dist/cli/index.js +40 -40
  67. package/dist/cli/{knowledge-escalator-kdeqdj0h.js → knowledge-escalator-30bb9fyg.js} +11 -11
  68. package/dist/cli/{knowledge-events-6fs0tz97.js → knowledge-events-gfbx97x0.js} +9 -9
  69. package/dist/cli/{knowledge-link-vvyfhhmr.js → knowledge-link-dv78fb9g.js} +3 -3
  70. package/dist/cli/{knowledge-store-z3fee1x1.js → knowledge-store-2ssd489f.js} +4 -4
  71. package/dist/cli/{knowledge-validator-sz1bmbvt.js → knowledge-validator-7bxvezgv.js} +6 -6
  72. package/dist/cli/{mcp-e1cnm4k3.js → mcp-apr65eya.js} +1 -1
  73. package/dist/cli/{model-preflight-936dhs10.js → model-preflight-g7b12yn2.js} +39 -39
  74. package/dist/cli/{pending-delegations-m0vf63yd.js → pending-delegations-x8q7cxr7.js} +10 -10
  75. package/dist/cli/{pr-subscriptions-2gvfff4q.js → pr-subscriptions-qwr6ybcb.js} +10 -10
  76. package/dist/cli/{pr-workflow-gate-68rg74bk.js → pr-workflow-gate-qd5tfkak.js} +39 -39
  77. package/dist/cli/{runner-cwmgb9rw.js → runner-tb3eppeg.js} +4 -4
  78. package/dist/cli/{scan-cursor-qzsanqx4.js → scan-cursor-1m6dj2s2.js} +5 -5
  79. package/dist/cli/{schema-jx4v0hg7.js → schema-yvhamv41.js} +3 -1
  80. package/dist/cli/{scope-persistence-qk1h0c13.js → scope-persistence-xdedbzdg.js} +13 -13
  81. package/dist/cli/{server-z9az3wc5.js → server-nhdkvdt2.js} +39 -39
  82. package/dist/cli/{skill-generator-h0veywz6.js → skill-generator-fzvp9m8z.js} +13 -13
  83. package/dist/cli/{snapshot-coordination-init-mwrvch16.js → snapshot-coordination-init-xqxek8kn.js} +39 -39
  84. package/dist/cli/{speckit-checkoff-skyray2c.js → speckit-checkoff-57tf4079.js} +4 -4
  85. package/dist/cli/{workspace-snapshot-gnwak61t.js → workspace-snapshot-kcfkk3a2.js} +3 -3
  86. package/dist/cli/{worktree-collision-ownership-wvxm7q1h.js → worktree-collision-ownership-80n814a8.js} +11 -11
  87. package/dist/cli/{worktree-isolation-bmzkxa64.js → worktree-isolation-kaxkr61t.js} +39 -39
  88. package/dist/commands/_shared/url-security.d.ts +20 -9
  89. package/dist/commands/pr-ref.d.ts +44 -8
  90. package/dist/commands/pr-subscribe.d.ts +0 -8
  91. package/dist/commands/pr-unsubscribe.d.ts +2 -1
  92. package/dist/config/schema.d.ts +17 -0
  93. package/dist/hooks/delegation-gate.d.ts +5 -1
  94. package/dist/hooks/extractors.d.ts +24 -0
  95. package/dist/hooks/pr-auto-subscribe.d.ts +5 -4
  96. package/dist/index.js +533 -529
  97. package/dist/pr-review/completion.d.ts +14 -1
  98. package/dist/pr-review/types.d.ts +8 -1
  99. package/dist/providers/forge-provider.d.ts +167 -0
  100. package/dist/providers/host-guards.d.ts +31 -0
  101. package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -0
  102. package/dist/utils/gh-executable.d.ts +10 -0
  103. package/dist/utils/glab-executable.d.ts +85 -0
  104. package/opencode-swarm.schema.json +19 -0
  105. package/package.json +1 -1
  106. package/dist/cli/curator-llm-factory-65qve6xk.js +0 -81
  107. package/dist/cli/guardrail-explain-2prdgvjk.js +0 -82
@@ -21,63 +21,63 @@ import {
21
21
  sanitizeWorktreeTaskId,
22
22
  standardWorktreeByCallID,
23
23
  standardWorktreeSerializationSessions
24
- } from "./index-pak3x772.js";
25
- import"./index-dky6qwrk.js";
26
- import"./index-wxr5me67.js";
27
- import"./index-4v60grax.js";
24
+ } from "./index-hgfkcb1q.js";
25
+ import"./index-ss6b8jpz.js";
26
+ import"./index-9h93zjm3.js";
27
+ import"./index-pa6fzbms.js";
28
28
  import"./index-7bxssqaf.js";
29
- import"./index-mfqge140.js";
30
- import"./index-jtg0zsnx.js";
29
+ import"./index-1fc5aj26.js";
30
+ import"./index-62akgg9d.js";
31
31
  import"./index-txdagbh7.js";
32
- import"./index-pef8ay7c.js";
32
+ import"./index-smwybqka.js";
33
33
  import"./index-rdec0y3z.js";
34
- import"./index-ww747mdg.js";
35
- import"./index-naxrpyb0.js";
36
- import"./index-e708d35g.js";
37
- import"./index-y0534tfs.js";
38
- import"./index-m1pqenq9.js";
39
- import"./index-tyzmjw2s.js";
34
+ import"./index-s7va6n84.js";
35
+ import"./index-ek5gvpvm.js";
36
+ import"./index-dz5cbkrm.js";
37
+ import"./index-5n08z6qj.js";
38
+ import"./index-s68z4a39.js";
39
+ import"./index-cp2nerjd.js";
40
40
  import"./index-cjapb4hy.js";
41
- import"./index-yydv4jfy.js";
41
+ import"./index-vqz0avr4.js";
42
42
  import"./index-pt7h91zc.js";
43
43
  import"./index-q7sjgr1y.js";
44
- import"./index-hx4jkj05.js";
45
- import"./index-gx03v1y5.js";
44
+ import"./index-nhw5rt5x.js";
45
+ import"./index-pppjg0ct.js";
46
46
  import"./index-6b295cas.js";
47
47
  import"./index-9nyqt3kb.js";
48
- import"./index-denfahc5.js";
48
+ import"./index-2b3bgm20.js";
49
49
  import"./index-zsrtt42s.js";
50
- import"./index-50q314wd.js";
51
- import"./index-m8342y3n.js";
52
- import"./index-7n1pfpnj.js";
50
+ import"./index-zt3taseq.js";
51
+ import"./index-cnbpht7m.js";
52
+ import"./index-2c6e1p7j.js";
53
53
  import"./index-g4fs6z4e.js";
54
- import"./index-cyn2cb6k.js";
55
- import"./index-48we80k1.js";
56
- import"./index-dftztz4y.js";
54
+ import"./index-nw16apxs.js";
55
+ import"./index-ppj5bjaq.js";
56
+ import"./index-afmyp3kt.js";
57
57
  import"./index-2s7dvzff.js";
58
- import"./index-0zjg4kt5.js";
59
- import"./index-fxf3zhtq.js";
58
+ import"./index-ycqsnfd1.js";
59
+ import"./index-8nsjefpc.js";
60
60
  import"./index-rtry5xyf.js";
61
61
  import {
62
62
  resolveWorktreeIsolationConfig
63
- } from "./index-bktc2g9n.js";
63
+ } from "./index-7jt24hpz.js";
64
64
  import"./index-frcemc0b.js";
65
65
  import"./index-0725jpp7.js";
66
- import"./index-sfsydeh8.js";
67
- import"./index-a7y29h92.js";
68
- import"./index-7rzgdcvc.js";
69
- import"./index-7r3pkgma.js";
70
- import"./index-cftva3pa.js";
71
- import"./index-pwcbtbhd.js";
66
+ import"./index-6wqv8f7d.js";
67
+ import"./index-dryhmaft.js";
68
+ import"./index-373880cv.js";
69
+ import"./index-9g61bfj9.js";
70
+ import"./index-nen885g8.js";
71
+ import"./index-74yxwf8y.js";
72
72
  import"./index-ry16d01s.js";
73
73
  import"./index-rdm3px0g.js";
74
74
  import"./index-7pmbnjvj.js";
75
- import"./index-yx5z4200.js";
76
- import"./index-y8gxcmnj.js";
75
+ import"./index-xgdypzch.js";
76
+ import"./index-7n3h39h9.js";
77
77
  import"./index-vzm6zre7.js";
78
78
  import"./index-ae75rja9.js";
79
- import"./index-4g4sr4ah.js";
80
- import"./index-2y9b45jj.js";
79
+ import"./index-zxck9sr7.js";
80
+ import"./index-6sffjy74.js";
81
81
  import"./index-6cjpmvpa.js";
82
82
  import"./index-t7hmqgjy.js";
83
83
  import"./index-w6w6ny06.js";
@@ -85,11 +85,11 @@ import"./index-mc72pk74.js";
85
85
  import"./index-c1ggtmpm.js";
86
86
  import"./index-ejhxgyvm.js";
87
87
  import"./index-7g4c7s5r.js";
88
- import"./index-bntwj2tp.js";
88
+ import"./index-yj7etak0.js";
89
89
  import"./index-gx2vp8gx.js";
90
- import"./index-kxacpqwf.js";
90
+ import"./index-ekyg4p8b.js";
91
91
  import"./index-zxdawwc7.js";
92
- import"./index-0pvvktht.js";
92
+ import"./index-rr1dggfe.js";
93
93
  import"./index-48jvqqfa.js";
94
94
  import"./index-bk5tah7q.js";
95
95
  import"./index-gknz3bv1.js";
@@ -1,4 +1,7 @@
1
1
  import * as child_process from 'node:child_process';
2
+ import { type ForgeContext } from '../../providers/forge-provider.js';
3
+ import { containsControlCharacters, isIPv4ZeroNetwork, isIpv4MappedPrivateHost, isPrivateHost } from '../../providers/host-guards.js';
4
+ export { containsControlCharacters, isIPv4ZeroNetwork, isIpv4MappedPrivateHost, isPrivateHost, };
2
5
  export declare const MAX_URL_LEN = 2048;
3
6
  export type ValidationResult = {
4
7
  sanitized: string;
@@ -28,16 +31,20 @@ export declare function sanitizeUrl(raw: string): string;
28
31
  * Strip control characters from user-visible error echoes and bound the result.
29
32
  */
30
33
  export declare function sanitizeErrorEcho(raw: string, maxLength?: number): string;
31
- export declare function containsControlCharacters(value: string): boolean;
32
- export declare function isIpv4MappedPrivateHost(inner: string): boolean;
33
34
  /**
34
- * Blocklist of private/localhost hostnames and IP ranges.
35
+ * Validate and sanitize a forge resource URL for a specific resource kind.
36
+ *
37
+ * Provider-aware since issue #2733: accepts GitHub issue/PR URLs
38
+ * (`https://github.com/owner/repo/issues|pull/N`) and GitLab issue/MR URLs
39
+ * (`https://<gitlab-host>/owner/repo/-/issues|merge_requests/N`, where the
40
+ * owner may be a nested namespace path and the host is gitlab.com or any
41
+ * `gitlab.`-prefixed self-hosted instance). Every security control applies
42
+ * identically to both providers and to every origin: HTTPS-only, IDN
43
+ * (non-ASCII) host rejection, private/localhost host rejection, credential
44
+ * stripping, bounded URL length, and control-character sanitization — the
45
+ * shared guards in src/providers/host-guards.ts.
35
46
  */
36
- export declare function isPrivateHost(url: URL): boolean;
37
- /**
38
- * Validate and sanitize a GitHub URL for a specific resource kind.
39
- */
40
- export declare function validateAndSanitizeGithubUrl(rawUrl: string, resource: 'issues' | 'pull'): ValidationResult;
47
+ export declare function validateAndSanitizeGithubUrl(rawUrl: string, resource: 'issues' | 'pull', configured?: ForgeContext): ValidationResult;
41
48
  /**
42
49
  * Detect the `origin` remote URL from git config.
43
50
  * @param cwd - Optional working directory
@@ -46,9 +53,13 @@ export declare function validateAndSanitizeGithubUrl(rawUrl: string, resource: '
46
53
  export declare function detectGitRemote(cwd?: string, laneEnv?: Record<string, string>): string | null;
47
54
  /**
48
55
  * Parse owner/repo from a git remote URL.
56
+ *
57
+ * GitHub-specific HTTPS/SSH forms plus an any-host path fallback (the
58
+ * fallback preserves the documented GHE/proxy bare-number resolution). For
59
+ * host-aware parsing that preserves the instance host and GitLab nested
60
+ * namespaces, use `parseForgeRemoteUrl` in src/providers/forge-provider.ts.
49
61
  */
50
62
  export declare function parseGitRemoteUrl(remoteUrl: string): {
51
63
  owner: string;
52
64
  repo: string;
53
65
  } | null;
54
- export declare function isIPv4ZeroNetwork(host: string): boolean;
@@ -1,17 +1,27 @@
1
1
  /**
2
- * Shared GitHub PR-reference parsing and sanitization for the
2
+ * Shared forge PR-reference parsing and sanitization for the
3
3
  * `/swarm pr-review` and `/swarm pr-feedback` commands.
4
4
  *
5
- * Both commands accept a PR reference in three formats (full URL,
5
+ * Both commands accept a PR/MR reference in three formats (full URL,
6
6
  * `owner/repo#N`, or a bare PR number resolved against the `origin` remote)
7
7
  * and may be followed by free-text instructions that are forwarded to the
8
8
  * architect in the emitted `[MODE: ...]` signal. All parsing here is hardened
9
9
  * against prompt injection: rival `[MODE: ...]` headers, query strings,
10
10
  * fragments, and embedded credentials are stripped before the value is ever
11
11
  * placed back into a signal string.
12
+ *
13
+ * Provider-aware since issue #2733: GitLab merge-request URLs
14
+ * (`https://<gitlab-host>/owner/repo/-/merge_requests/N`, owner may be a
15
+ * nested namespace path) resolve through the same three formats, and the
16
+ * canonical URL is rebuilt with the matched provider's shape via
17
+ * `src/providers/forge-provider.ts`. GitHub behavior is byte-identical to the
18
+ * pre-provider implementation, including the any-host path fallback used for
19
+ * GHE/proxy bare-number resolution.
12
20
  */
21
+ import { type ForgeContext } from '../providers/forge-provider.js';
13
22
  import { _internals, detectGitRemote, parseGitRemoteUrl, sanitizeUrl, type ValidationResult } from './_shared/url-security.js';
14
23
  export { _internals, detectGitRemote, parseGitRemoteUrl, sanitizeUrl };
24
+ export type { ValidationResult };
15
25
  /**
16
26
  * Sanitize free-text instructions so they cannot forge a competing MODE
17
27
  * header, inject control sequences, or break out of the signal line.
@@ -19,17 +29,31 @@ export { _internals, detectGitRemote, parseGitRemoteUrl, sanitizeUrl };
19
29
  * headers, and truncates to a bounded length.
20
30
  */
21
31
  export declare function sanitizeInstructions(raw: string): string;
22
- export declare function validateAndSanitizeUrl(rawUrl: string): ValidationResult;
32
+ export declare function validateAndSanitizeUrl(rawUrl: string, configured?: ForgeContext): ValidationResult;
23
33
  export interface ParsedPr {
24
34
  owner: string;
25
35
  repo: string;
26
36
  number: number;
27
37
  }
38
+ /** Parsed PR plus the provider context the reference resolved to. */
39
+ export interface ResolvedPrRef extends ParsedPr {
40
+ context: ForgeContext;
41
+ }
28
42
  /**
29
- * Parse a PR reference from three formats:
30
- * 1. Full URL: https://github.com/owner/repo/pull/N
31
- * 2. Shorthand: owner/repo#N
32
- * 3. Bare number: N (resolved against the `origin` git remote in `cwd`)
43
+ * Resolve a PR/MR reference from three formats, preserving the provider
44
+ * context needed to rebuild the canonical URL:
45
+ * 1. Full URL: https://github.com/owner/repo/pull/N or
46
+ * https://<gitlab-host>/owner/repo/-/merge_requests/N
47
+ * 2. Shorthand: owner/repo#N (GitHub-shaped; namespace shorthands are
48
+ * ambiguous without a configured provider, so they stay GitHub)
49
+ * 3. Bare number: N (resolved against the `origin` git remote in `cwd`,
50
+ * provider-aware when the remote is GitLab-indicating)
51
+ */
52
+ export declare function resolvePrRef(input: string, cwd?: string): ResolvedPrRef | null;
53
+ /**
54
+ * Parse a PR reference from three formats (see `resolvePrRef`). Public API
55
+ * unchanged since the pre-provider implementation: returns owner/repo/number
56
+ * only — the GitLab owner may be a multi-segment namespace path.
33
57
  */
34
58
  export declare function parsePrRef(input: string, cwd?: string): ParsedPr | null;
35
59
  /**
@@ -42,9 +66,21 @@ export declare function parsePrRef(input: string, cwd?: string): ParsedPr | null
42
66
  * instructions" (forward them).
43
67
  */
44
68
  export declare function looksLikePrRef(token: string): boolean;
69
+ /**
70
+ * Resolve a PR reference to its canonical URL plus parsed fields — the
71
+ * provider-aware construction shared by subscribe/unsubscribe and the review
72
+ * commands. GitHub output is byte-identical to the previous hardcoded
73
+ * `https://github.com/...` template.
74
+ */
75
+ export declare function resolveCanonicalPrUrl(input: string, cwd?: string): {
76
+ prUrl: string;
77
+ owner: string;
78
+ repo: string;
79
+ number: number;
80
+ } | null;
45
81
  /**
46
82
  * Resolve the leading token of a PR command's positional args into a validated
47
- * GitHub PR URL, and collect any trailing tokens as free-text instructions.
83
+ * forge PR URL, and collect any trailing tokens as free-text instructions.
48
84
  *
49
85
  * `rest` is the positional token list AFTER flag parsing (e.g. `--council`
50
86
  * already removed). The first token is the PR reference; everything after it
@@ -20,14 +20,6 @@
20
20
  */
21
21
  import { subscribe } from '../background/pr-subscriptions.js';
22
22
  import { loadPluginConfig } from '../config/loader.js';
23
- /**
24
- * Subscribe the current session to PR monitoring notifications.
25
- *
26
- * Requires a PR reference argument (no bare invocation). The subscription is
27
- * idempotent — if an active subscription with the same composite key
28
- * (`sessionID::repoFullName::prNumber`) already exists, the existing record
29
- * is returned without duplication.
30
- */
31
23
  export declare function handlePrSubscribeCommand(directory: string, args: string[], sessionID: string): Promise<string>;
32
24
  export declare const _internals: {
33
25
  loadPluginConfig: typeof loadPluginConfig;
@@ -15,7 +15,7 @@
15
15
  * and /swarm pr subscribe via ./pr-ref.ts.
16
16
  */
17
17
  import { buildCorrelationId, unsubscribe } from '../background/pr-subscriptions.js';
18
- import { looksLikePrRef, parsePrRef } from './pr-ref.js';
18
+ import { looksLikePrRef, parsePrRef, resolveCanonicalPrUrl } from './pr-ref.js';
19
19
  /**
20
20
  * Unsubscribe the current session from PR monitoring notifications.
21
21
  *
@@ -28,5 +28,6 @@ export declare const _internals: {
28
28
  unsubscribe: typeof unsubscribe;
29
29
  buildCorrelationId: typeof buildCorrelationId;
30
30
  parsePrRef: typeof parsePrRef;
31
+ resolveCanonicalPrUrl: typeof resolveCanonicalPrUrl;
31
32
  looksLikePrRef: typeof looksLikePrRef;
32
33
  };
@@ -949,6 +949,15 @@ export declare const ObservabilityConfigSchema: z.ZodObject<{
949
949
  }, z.core.$strip>>;
950
950
  }, z.core.$strip>;
951
951
  export type ObservabilityConfig = z.infer<typeof ObservabilityConfigSchema>;
952
+ export declare const ForgeConfigSchema: z.ZodObject<{
953
+ provider: z.ZodDefault<z.ZodEnum<{
954
+ auto: "auto";
955
+ github: "github";
956
+ gitlab: "gitlab";
957
+ }>>;
958
+ base_url: z.ZodOptional<z.ZodString>;
959
+ }, z.core.$strip>;
960
+ export type ForgeConfig = z.infer<typeof ForgeConfigSchema>;
952
961
  export declare const MemoryConfigSchema: z.ZodObject<{
953
962
  enabled: z.ZodDefault<z.ZodBoolean>;
954
963
  provider: z.ZodDefault<z.ZodEnum<{
@@ -2691,6 +2700,14 @@ export declare const PluginConfigSchema: z.ZodObject<{
2691
2700
  latencyBudgetMs: z.ZodDefault<z.ZodNumber>;
2692
2701
  }, z.core.$strip>>;
2693
2702
  }, z.core.$strip>>;
2703
+ forge: z.ZodOptional<z.ZodObject<{
2704
+ provider: z.ZodDefault<z.ZodEnum<{
2705
+ auto: "auto";
2706
+ github: "github";
2707
+ gitlab: "gitlab";
2708
+ }>>;
2709
+ base_url: z.ZodOptional<z.ZodString>;
2710
+ }, z.core.$strip>>;
2694
2711
  observability: z.ZodOptional<z.ZodObject<{
2695
2712
  export: z.ZodOptional<z.ZodObject<{
2696
2713
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -5,6 +5,7 @@
5
5
  * Uses experimental.chat.messages.transform to provide non-blocking guidance.
6
6
  */
7
7
  import type { BackgroundDelegationRecord } from '../background/pending-delegations.js';
8
+ import { deleteStageBDispatchBindings, readStageBDispatchBindings, recordStageBDispatchBindings } from '../background/stage-b-dispatch-binding-store.js';
8
9
  import type { PluginConfig } from '../config';
9
10
  import { type Plan } from '../config/plan-schema';
10
11
  import { type QaGates } from '../db/qa-gate-profile.js';
@@ -517,6 +518,9 @@ declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined
517
518
  * that test mutations on this object propagate to the extracted module.
518
519
  */
519
520
  export declare const _internals: {
521
+ recordStageBDispatchBindings: typeof recordStageBDispatchBindings;
522
+ readStageBDispatchBindings: typeof readStageBDispatchBindings;
523
+ deleteStageBDispatchBindings: typeof deleteStageBDispatchBindings;
520
524
  resolveEvidenceTaskId: typeof resolveEvidenceTaskId;
521
525
  resolveDelegatedPlanTaskId: typeof resolveDelegatedPlanTaskId;
522
526
  describeCoderScopeFailure: typeof describeCoderScopeFailure;
@@ -573,5 +577,5 @@ export declare function createDelegationGateHook(config: PluginConfig, directory
573
577
  }) => Promise<void>;
574
578
  sessionEnded: (sessionID: string, includeOwnedChildren?: boolean) => void;
575
579
  backgroundCompletionClaimed: (record: BackgroundDelegationRecord) => void;
576
- abortDeniedSettlementForCall: (callID: string) => Promise<void>;
580
+ abortDeniedSettlementForCall: (callID: string, sessionID?: string) => Promise<void>;
577
581
  };
@@ -7,10 +7,17 @@ import { type Plan } from '../config/plan-schema';
7
7
  */
8
8
  /**
9
9
  * Extracts the current phase information from plan content.
10
+ *
11
+ * #2841: plan.md is user-writeable content and this one-liner feeds the
12
+ * `[SWARM CONTEXT] Phase:` architect-context injection, so it MUST pass the
13
+ * shared sanitizer (input-side, the same pattern as `extractPlanCursor`).
10
14
  */
11
15
  export declare function extractCurrentPhase(planContent: string): string | null;
12
16
  /**
13
17
  * Extracts the first incomplete task from the current IN PROGRESS phase.
18
+ *
19
+ * #2841: feeds the `[SWARM CONTEXT] Current task:` injection — sanitized
20
+ * input-side like its siblings.
14
21
  */
15
22
  export declare function extractCurrentTask(planContent: string): string | null;
16
23
  /**
@@ -24,14 +31,28 @@ export declare function extractCurrentTask(planContent: string): string | null;
24
31
  * indented sub-bullets are filtered out here).
25
32
  * - Lines are reproduced verbatim from `raw` — bullet prefix, markers
26
33
  * (✅ / [timestamps]) and all — then joined, trimmed and truncated.
34
+ *
35
+ * #2886: context.md is agent-written after consuming untrusted task/issue
36
+ * text and this return feeds the compaction `SWARM DECISIONS` LLM-context
37
+ * fact, so it MUST pass the shared sanitizer input-side (the same pattern as
38
+ * `extractCurrentPhase`); the system-enhancer wraps of this output become
39
+ * idempotent no-ops.
27
40
  */
28
41
  export declare function extractDecisions(contextContent: string, maxChars?: number): string | null;
29
42
  /**
30
43
  * Extracts incomplete tasks from plan content under the current IN PROGRESS phase.
44
+ *
45
+ * #2841: feeds the `SWARM TASKS` compaction fact (LLM-context injection) —
46
+ * sanitized input-side like its siblings.
31
47
  */
32
48
  export declare function extractIncompleteTasks(planContent: string, maxChars?: number): string | null;
33
49
  /**
34
50
  * Extracts patterns section from context content.
51
+ *
52
+ * #2886: context.md is agent-written after consuming untrusted task/issue
53
+ * text and this return feeds the compaction `SWARM PATTERNS` LLM-context
54
+ * fact, so it MUST pass the shared sanitizer input-side (the same pattern as
55
+ * `extractCurrentPhase`).
35
56
  */
36
57
  export declare function extractPatterns(contextContent: string, maxChars?: number): string | null;
37
58
  /**
@@ -44,6 +65,9 @@ export declare function extractPatterns(contextContent: string, maxChars?: numbe
44
65
  export declare function extractCurrentPhaseFromPlan(plan: Plan): string | null;
45
66
  /**
46
67
  * Extracts the first incomplete task from the current phase of a Plan object.
68
+ *
69
+ * #2841: task fields feed the `[SWARM CONTEXT] Current task:` injection —
70
+ * the composed line must pass the shared sanitizer before it is returned.
47
71
  */
48
72
  export declare function extractCurrentTaskFromPlan(plan: Plan): string | null;
49
73
  /**
@@ -37,10 +37,11 @@ export declare const _internals: {
37
37
  log: typeof log;
38
38
  };
39
39
  /**
40
- * Extract `{ repoFullName, prNumber, prUrl }` from the first GitHub PR URL
41
- * in the given text, or null when none is present. The returned prUrl is
42
- * re-canonicalized from the captures so it always satisfies the
43
- * subscription store's strict URL schema.
40
+ * Extract `{ repoFullName, prNumber, prUrl }` from the first GitHub PR or
41
+ * GitLab MR URL in the given text, or null when none is present. The returned
42
+ * prUrl is re-canonicalized from the captures (provider-aware: github
43
+ * `/pull/N`, gitlab `/-/merge_requests/N` with the matched host) so it always
44
+ * satisfies the subscription store's URL schema.
44
45
  */
45
46
  export declare function extractPrUrl(text: string): {
46
47
  repoFullName: string;