opencode-swarm 7.184.16 → 7.185.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.
Files changed (106) hide show
  1. package/README.md +1 -0
  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-subscriptions.d.ts +18 -0
  5. package/dist/background/stage-b-dispatch-binding-store.d.ts +115 -0
  6. package/dist/cli/{auto-checkpoint-dccr5m5w.js → auto-checkpoint-adn8bg66.js} +7 -7
  7. package/dist/cli/{checkpoint-sntn9axf.js → checkpoint-dvyx8gee.js} +14 -14
  8. package/dist/cli/{coder-settlement-wvesf12p.js → coder-settlement-95dv9r28.js} +10 -10
  9. package/dist/cli/{config-doctor-2kf93041.js → config-doctor-f2jtx8y5.js} +2 -2
  10. package/dist/cli/{core-27f3zcnn.js → core-xn2epqfk.js} +3 -3
  11. package/dist/cli/{curation-policy-1rzheh1x.js → curation-policy-swnyg1jr.js} +4 -4
  12. package/dist/cli/{curator-26a9vxkj.js → curator-91rqz7xg.js} +39 -39
  13. package/dist/cli/{curator-drift-dcysavga.js → curator-drift-qem70sry.js} +8 -8
  14. package/dist/cli/curator-llm-factory-tr6rabws.js +81 -0
  15. package/dist/cli/{evidence-summary-service-7t4xgh9q.js → evidence-summary-service-n7ndpen0.js} +17 -17
  16. package/dist/cli/{gate-evidence-44ydv262.js → gate-evidence-ajh95p02.js} +5 -5
  17. package/dist/cli/guardrail-explain-cne2701m.js +82 -0
  18. package/dist/cli/{guardrail-log-ybxh0ama.js → guardrail-log-b23sf549.js} +6 -6
  19. package/dist/cli/{guardrail-reset-qx2nx56s.js → guardrail-reset-e6njf0hv.js} +39 -39
  20. package/dist/cli/{hive-promoter-hkzhaeyc.js → hive-promoter-8dqvfwsx.js} +39 -39
  21. package/dist/cli/{index-7r3pkgma.js → index-1zpgtnhp.js} +1 -1
  22. package/dist/cli/{index-7m4zf48w.js → index-26nhk01d.js} +1 -1
  23. package/dist/cli/{index-6dgghy8n.js → index-2e7h9yw5.js} +5 -5
  24. package/dist/cli/{index-gvnsfcj0.js → index-2tv5zp9x.js} +7 -7
  25. package/dist/cli/{index-8y9aq9f6.js → index-359w27b1.js} +4 -4
  26. package/dist/cli/{index-m1pqenq9.js → index-3fnpjy4g.js} +2 -2
  27. package/dist/cli/{index-v9ynrcst.js → index-4ysdy8sx.js} +4 -4
  28. package/dist/cli/{index-bntwj2tp.js → index-580t912d.js} +2 -1
  29. package/dist/cli/{index-jtg0zsnx.js → index-62z1vsvf.js} +1 -1
  30. package/dist/cli/{index-8pmx61z1.js → index-6wy9m25t.js} +10 -10
  31. package/dist/cli/{index-marmy421.js → index-73vnyt4b.js} +39 -39
  32. package/dist/cli/{index-cftva3pa.js → index-7jqnckzg.js} +1 -1
  33. package/dist/cli/{index-fxf3zhtq.js → index-97nbaxye.js} +1 -1
  34. package/dist/cli/{index-n5z3d8nc.js → index-9am1ry6w.js} +7 -7
  35. package/dist/cli/{index-a9cajj7y.js → index-cah5ffkh.js} +5 -5
  36. package/dist/cli/{index-ctd0xa67.js → index-djen6c7q.js} +1 -1
  37. package/dist/cli/{index-e2a3evhm.js → index-e5wczpj3.js} +2 -2
  38. package/dist/cli/{index-6h55yp6c.js → index-erv39311.js} +2 -2
  39. package/dist/cli/{index-kvd6jbzr.js → index-f3grtpy3.js} +3 -3
  40. package/dist/cli/{index-dggrcd8z.js → index-fkzv0hj4.js} +41 -41
  41. package/dist/cli/{index-rmr36a5k.js → index-fmxty2h3.js} +2 -2
  42. package/dist/cli/{index-7rzgdcvc.js → index-gemq38en.js} +1 -1
  43. package/dist/cli/{index-df845cwk.js → index-gxjy9y0t.js} +2 -2
  44. package/dist/cli/{index-2y9b45jj.js → index-h5f5q60s.js} +1 -1
  45. package/dist/cli/{index-rnqfz57d.js → index-hx9vyvx0.js} +3 -3
  46. package/dist/cli/{index-8gxb2xxe.js → index-m7g4dsr4.js} +5 -5
  47. package/dist/cli/{index-6drqsy4n.js → index-n0wyd905.js} +3 -3
  48. package/dist/cli/{index-yx5z4200.js → index-p544ppcp.js} +1 -1
  49. package/dist/cli/{index-jns2mnbz.js → index-qccnny3g.js} +3 -3
  50. package/dist/cli/{index-tyzmjw2s.js → index-qqjqpmhj.js} +420 -9
  51. package/dist/cli/{index-r2nr4qxg.js → index-rcx4kb02.js} +4 -4
  52. package/dist/cli/{index-g4d1d91p.js → index-rp0pyywc.js} +7 -7
  53. package/dist/cli/{index-9grg5gr3.js → index-s0c1wxtt.js} +1 -1
  54. package/dist/cli/{index-pwcbtbhd.js → index-s5xmvt3k.js} +1 -1
  55. package/dist/cli/{index-mfqge140.js → index-sz755xt1.js} +1 -1
  56. package/dist/cli/{index-dftztz4y.js → index-t9jr6zc7.js} +1 -1
  57. package/dist/cli/{index-tzrbeas0.js → index-tmd5j8kh.js} +4 -4
  58. package/dist/cli/{index-mdkydrnr.js → index-v5k5jw0r.js} +2 -2
  59. package/dist/cli/{index-fzen7z3b.js → index-vfr3z9rv.js} +5 -1
  60. package/dist/cli/{index-b3q241ze.js → index-w7sftxdy.js} +8 -3
  61. package/dist/cli/{index-yydv4jfy.js → index-yg15df3b.js} +2 -2
  62. package/dist/cli/{index-2fc9ecr0.js → index-zkm995wa.js} +4222 -3674
  63. package/dist/cli/{index-v2v8gdvy.js → index-zxm9h19f.js} +3 -3
  64. package/dist/cli/{index-4g4sr4ah.js → index-zyz0xp2b.js} +1 -1
  65. package/dist/cli/index.js +40 -40
  66. package/dist/cli/{knowledge-escalator-ebr3rw8e.js → knowledge-escalator-xdz6vg62.js} +11 -11
  67. package/dist/cli/{knowledge-events-bw9en61p.js → knowledge-events-dnca00ye.js} +9 -9
  68. package/dist/cli/{knowledge-link-vvyfhhmr.js → knowledge-link-y653vvr8.js} +3 -3
  69. package/dist/cli/{knowledge-store-z9y0rn82.js → knowledge-store-yc20na25.js} +4 -4
  70. package/dist/cli/{knowledge-validator-p1zxa4rp.js → knowledge-validator-c2kfrqdy.js} +6 -6
  71. package/dist/cli/{mcp-qtqcdjj3.js → mcp-mefjep3p.js} +1 -1
  72. package/dist/cli/{model-preflight-fz3dh7wj.js → model-preflight-5xcxc75n.js} +39 -39
  73. package/dist/cli/{pending-delegations-69kt91zp.js → pending-delegations-emhmdkn4.js} +10 -10
  74. package/dist/cli/{pr-subscriptions-yjwfaaqk.js → pr-subscriptions-amc1z05d.js} +10 -10
  75. package/dist/cli/{pr-workflow-gate-6wft8t65.js → pr-workflow-gate-gpq41zx9.js} +41 -39
  76. package/dist/cli/{runner-cwmgb9rw.js → runner-ss88pbb2.js} +4 -4
  77. package/dist/cli/{scan-cursor-srmwyzgp.js → scan-cursor-71gq82ez.js} +5 -5
  78. package/dist/cli/{schema-ks83tpk5.js → schema-108trhk6.js} +3 -1
  79. package/dist/cli/{scope-persistence-68sf3zbq.js → scope-persistence-9gfgvy3p.js} +13 -13
  80. package/dist/cli/{server-e9r2796f.js → server-pkk6y7fa.js} +39 -39
  81. package/dist/cli/{skill-generator-8em4gnwh.js → skill-generator-7g6xjwhr.js} +13 -13
  82. package/dist/cli/{snapshot-coordination-init-s1q9h6ex.js → snapshot-coordination-init-pactfmsy.js} +39 -39
  83. package/dist/cli/{speckit-checkoff-t2msmjh2.js → speckit-checkoff-xyp4c36r.js} +4 -4
  84. package/dist/cli/{workspace-snapshot-gnwak61t.js → workspace-snapshot-0hffyjhd.js} +3 -3
  85. package/dist/cli/{worktree-collision-ownership-r5p156gs.js → worktree-collision-ownership-g26m4c10.js} +11 -11
  86. package/dist/cli/{worktree-isolation-9x2vs2ym.js → worktree-isolation-52529c62.js} +39 -39
  87. package/dist/commands/_shared/url-security.d.ts +20 -9
  88. package/dist/commands/pr-ref.d.ts +44 -8
  89. package/dist/commands/pr-subscribe.d.ts +0 -8
  90. package/dist/commands/pr-unsubscribe.d.ts +2 -1
  91. package/dist/config/schema.d.ts +17 -0
  92. package/dist/config/skill-contract-digest.d.ts +20 -0
  93. package/dist/hooks/delegation-gate.d.ts +5 -1
  94. package/dist/hooks/pr-auto-subscribe.d.ts +5 -4
  95. package/dist/hooks/pr-workflow-gate.d.ts +387 -0
  96. package/dist/hooks/pr-workflow-response-gate.d.ts +2 -0
  97. package/dist/index.js +591 -585
  98. package/dist/providers/forge-provider.d.ts +167 -0
  99. package/dist/providers/host-guards.d.ts +31 -0
  100. package/dist/services/pr-workflow-skill-contract.d.ts +45 -0
  101. package/dist/utils/gh-executable.d.ts +10 -0
  102. package/dist/utils/glab-executable.d.ts +85 -0
  103. package/opencode-swarm.schema.json +19 -0
  104. package/package.json +1 -1
  105. package/dist/cli/curator-llm-factory-tq54zhpw.js +0 -81
  106. package/dist/cli/guardrail-explain-00zvh1zq.js +0 -82
@@ -21,63 +21,63 @@ import {
21
21
  sanitizeWorktreeTaskId,
22
22
  standardWorktreeByCallID,
23
23
  standardWorktreeSerializationSessions
24
- } from "./index-2fc9ecr0.js";
25
- import"./index-df845cwk.js";
26
- import"./index-fzen7z3b.js";
27
- import"./index-tzrbeas0.js";
24
+ } from "./index-zkm995wa.js";
25
+ import"./index-gxjy9y0t.js";
26
+ import"./index-vfr3z9rv.js";
27
+ import"./index-tmd5j8kh.js";
28
28
  import"./index-7bxssqaf.js";
29
- import"./index-mfqge140.js";
30
- import"./index-jtg0zsnx.js";
29
+ import"./index-sz755xt1.js";
30
+ import"./index-62z1vsvf.js";
31
31
  import"./index-txdagbh7.js";
32
- import"./index-6h55yp6c.js";
32
+ import"./index-erv39311.js";
33
33
  import"./index-rdec0y3z.js";
34
- import"./index-6drqsy4n.js";
35
- import"./index-gvnsfcj0.js";
36
- import"./index-8y9aq9f6.js";
37
- import"./index-a9cajj7y.js";
38
- import"./index-m1pqenq9.js";
39
- import"./index-tyzmjw2s.js";
34
+ import"./index-n0wyd905.js";
35
+ import"./index-2tv5zp9x.js";
36
+ import"./index-359w27b1.js";
37
+ import"./index-cah5ffkh.js";
38
+ import"./index-3fnpjy4g.js";
39
+ import"./index-qqjqpmhj.js";
40
40
  import"./index-cjapb4hy.js";
41
- import"./index-yydv4jfy.js";
41
+ import"./index-yg15df3b.js";
42
42
  import"./index-pt7h91zc.js";
43
43
  import"./index-q7sjgr1y.js";
44
- import"./index-r2nr4qxg.js";
45
- import"./index-8pmx61z1.js";
44
+ import"./index-rcx4kb02.js";
45
+ import"./index-6wy9m25t.js";
46
46
  import"./index-6b295cas.js";
47
47
  import"./index-9nyqt3kb.js";
48
- import"./index-9grg5gr3.js";
48
+ import"./index-s0c1wxtt.js";
49
49
  import"./index-zsrtt42s.js";
50
- import"./index-rmr36a5k.js";
51
- import"./index-jns2mnbz.js";
52
- import"./index-v2v8gdvy.js";
50
+ import"./index-fmxty2h3.js";
51
+ import"./index-qccnny3g.js";
52
+ import"./index-zxm9h19f.js";
53
53
  import"./index-g4fs6z4e.js";
54
- import"./index-6dgghy8n.js";
55
- import"./index-g4d1d91p.js";
56
- import"./index-dftztz4y.js";
54
+ import"./index-2e7h9yw5.js";
55
+ import"./index-rp0pyywc.js";
56
+ import"./index-t9jr6zc7.js";
57
57
  import"./index-2s7dvzff.js";
58
- import"./index-v9ynrcst.js";
59
- import"./index-fxf3zhtq.js";
58
+ import"./index-4ysdy8sx.js";
59
+ import"./index-97nbaxye.js";
60
60
  import"./index-rtry5xyf.js";
61
61
  import {
62
62
  resolveWorktreeIsolationConfig
63
- } from "./index-mdkydrnr.js";
63
+ } from "./index-v5k5jw0r.js";
64
64
  import"./index-frcemc0b.js";
65
65
  import"./index-0725jpp7.js";
66
- import"./index-8gxb2xxe.js";
67
- import"./index-rnqfz57d.js";
68
- import"./index-7rzgdcvc.js";
69
- import"./index-7r3pkgma.js";
70
- import"./index-cftva3pa.js";
71
- import"./index-pwcbtbhd.js";
66
+ import"./index-m7g4dsr4.js";
67
+ import"./index-hx9vyvx0.js";
68
+ import"./index-gemq38en.js";
69
+ import"./index-1zpgtnhp.js";
70
+ import"./index-7jqnckzg.js";
71
+ import"./index-s5xmvt3k.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-n5z3d8nc.js";
75
+ import"./index-p544ppcp.js";
76
+ import"./index-9am1ry6w.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-zyz0xp2b.js";
80
+ import"./index-h5f5q60s.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-580t912d.js";
89
89
  import"./index-gx2vp8gx.js";
90
- import"./index-ctd0xa67.js";
90
+ import"./index-djen6c7q.js";
91
91
  import"./index-zxdawwc7.js";
92
- import"./index-b3q241ze.js";
92
+ import"./index-w7sftxdy.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>;
@@ -0,0 +1,20 @@
1
+ export declare const SKILL_CONTRACT_DIGEST_KEY = "swarm-contract-digest";
2
+ /**
3
+ * Split a SKILL.md into its frontmatter block (fences included) and body.
4
+ * A file without a well-formed opening/closing fence pair has no frontmatter.
5
+ */
6
+ export declare function splitSkillFrontmatter(content: string): {
7
+ frontmatter: string;
8
+ body: string;
9
+ };
10
+ /**
11
+ * 12-hex content digest of a skill BODY (frontmatter excluded, line endings
12
+ * normalized) — stable across platforms regardless of checkout EOL settings.
13
+ */
14
+ export declare function skillContractDigest(body: string): string;
15
+ /**
16
+ * Read the stamped contract digest from a frontmatter block, if present.
17
+ * String.match rather than RegExp.exec: the SAST callee-binding classifier
18
+ * (issue #2300) flags an unresolved .exec member call as exec-like.
19
+ */
20
+ export declare function readSkillContractStamp(frontmatter: string): string | undefined;
@@ -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
  };
@@ -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;