codingbuddy 5.3.0 → 5.4.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 (47) hide show
  1. package/dist/src/agent/index.d.ts +1 -0
  2. package/dist/src/agent/index.js +1 -0
  3. package/dist/src/agent/stack-matcher.d.ts +13 -0
  4. package/dist/src/agent/stack-matcher.js +81 -0
  5. package/dist/src/collaboration/index.d.ts +0 -2
  6. package/dist/src/collaboration/index.js +1 -3
  7. package/dist/src/keyword/keyword.module.js +39 -2
  8. package/dist/src/keyword/keyword.service.d.ts +5 -0
  9. package/dist/src/keyword/keyword.service.js +90 -6
  10. package/dist/src/keyword/keyword.types.d.ts +24 -2
  11. package/dist/src/keyword/permission-forecast.d.ts +2 -0
  12. package/dist/src/keyword/permission-forecast.js +94 -0
  13. package/dist/src/mcp/handlers/agent.handler.js +1 -1
  14. package/dist/src/mcp/handlers/clarification-gate.d.ts +22 -0
  15. package/dist/src/mcp/handlers/clarification-gate.js +129 -0
  16. package/dist/src/mcp/handlers/council-scene.builder.d.ts +9 -0
  17. package/dist/src/mcp/handlers/council-scene.builder.js +115 -0
  18. package/dist/src/mcp/handlers/council-scene.types.d.ts +11 -0
  19. package/dist/src/{collaboration/council-summary.types.js → mcp/handlers/council-scene.types.js} +1 -1
  20. package/dist/src/mcp/handlers/discussion.handler.d.ts +1 -0
  21. package/dist/src/mcp/handlers/discussion.handler.js +23 -4
  22. package/dist/src/mcp/handlers/discussion.types.d.ts +12 -0
  23. package/dist/src/mcp/handlers/discussion.types.js +4 -1
  24. package/dist/src/mcp/handlers/execution-gate.d.ts +29 -0
  25. package/dist/src/mcp/handlers/execution-gate.js +49 -0
  26. package/dist/src/mcp/handlers/index.d.ts +1 -0
  27. package/dist/src/mcp/handlers/index.js +3 -1
  28. package/dist/src/mcp/handlers/mode.handler.d.ts +5 -0
  29. package/dist/src/mcp/handlers/mode.handler.js +127 -2
  30. package/dist/src/mcp/handlers/planning-contract.d.ts +2 -0
  31. package/dist/src/mcp/handlers/planning-contract.js +28 -0
  32. package/dist/src/mcp/handlers/planning-stage.d.ts +20 -0
  33. package/dist/src/mcp/handlers/planning-stage.js +58 -0
  34. package/dist/src/mcp/handlers/review-pr.handler.d.ts +12 -0
  35. package/dist/src/mcp/handlers/review-pr.handler.js +81 -0
  36. package/dist/src/mcp/mcp.module.js +1 -0
  37. package/dist/src/shared/version.d.ts +1 -1
  38. package/dist/src/shared/version.js +1 -1
  39. package/dist/src/ship/review-pr.service.d.ts +15 -0
  40. package/dist/src/ship/review-pr.service.js +136 -0
  41. package/dist/src/ship/review-pr.types.d.ts +21 -0
  42. package/dist/src/ship/review-pr.types.js +3 -0
  43. package/dist/src/ship/ship.module.js +5 -2
  44. package/package.json +2 -2
  45. package/dist/src/collaboration/council-summary.service.d.ts +0 -2
  46. package/dist/src/collaboration/council-summary.service.js +0 -114
  47. package/dist/src/collaboration/council-summary.types.d.ts +0 -24
@@ -1,114 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateCouncilSummary = generateCouncilSummary;
4
- function generateCouncilSummary(inputs) {
5
- const opinions = [];
6
- const failedAgents = [];
7
- for (const input of inputs) {
8
- if (input.opinion !== null) {
9
- opinions.push(input.opinion);
10
- }
11
- else {
12
- failedAgents.push(input.agentName);
13
- }
14
- }
15
- const partialFailure = failedAgents.length > 0;
16
- const consensus = detectConsensus(opinions);
17
- const disagreements = detectDisagreements(opinions);
18
- const blockingRisks = extractBlockingRisks(opinions);
19
- const nextStep = determineNextStep(opinions, failedAgents, blockingRisks);
20
- return {
21
- opinions,
22
- failedAgents,
23
- consensus,
24
- disagreements,
25
- blockingRisks,
26
- nextStep,
27
- partialFailure,
28
- };
29
- }
30
- function detectConsensus(opinions) {
31
- if (opinions.length === 0)
32
- return [];
33
- const points = [];
34
- const stances = new Set(opinions.map(o => o.stance));
35
- if (stances.size === 1) {
36
- const stance = opinions[0].stance;
37
- points.push(`All specialists ${stanceVerb(stance)}`);
38
- }
39
- const sharedChanges = findSharedSuggestedChanges(opinions);
40
- for (const change of sharedChanges) {
41
- points.push(`Shared recommendation: ${change}`);
42
- }
43
- return points;
44
- }
45
- function findSharedSuggestedChanges(opinions) {
46
- const changeCounts = new Map();
47
- for (const opinion of opinions) {
48
- for (const change of opinion.suggestedChanges) {
49
- changeCounts.set(change, (changeCounts.get(change) ?? 0) + 1);
50
- }
51
- }
52
- const shared = [];
53
- for (const [change, count] of changeCounts) {
54
- if (count >= 2) {
55
- shared.push(change);
56
- }
57
- }
58
- return shared;
59
- }
60
- function stanceVerb(stance) {
61
- switch (stance) {
62
- case 'approve':
63
- return 'approve';
64
- case 'concern':
65
- return 'express concerns';
66
- case 'reject':
67
- return 'reject';
68
- }
69
- }
70
- function detectDisagreements(opinions) {
71
- if (opinions.length < 2)
72
- return [];
73
- const stances = new Set(opinions.map(o => o.stance));
74
- if (stances.size <= 1)
75
- return [];
76
- const positions = opinions.map(o => ({
77
- agentName: o.agentName,
78
- stance: o.stance,
79
- reasoning: o.reasoning,
80
- }));
81
- return [
82
- {
83
- topic: 'Overall assessment',
84
- positions,
85
- },
86
- ];
87
- }
88
- function extractBlockingRisks(opinions) {
89
- return opinions.filter(o => o.stance === 'reject').map(o => `${o.agentName}: ${o.reasoning}`);
90
- }
91
- function determineNextStep(opinions, failedAgents, blockingRisks) {
92
- if (opinions.length === 0 && failedAgents.length === 0) {
93
- return 'No specialist input available. Run specialist analysis first.';
94
- }
95
- if (opinions.length === 0 && failedAgents.length > 0) {
96
- return `Re-run failed specialists (${failedAgents.join(', ')}) to obtain analysis.`;
97
- }
98
- if (blockingRisks.length > 0) {
99
- return `Address ${blockingRisks.length} blocking risk(s) before proceeding.`;
100
- }
101
- const concerns = opinions.filter(o => o.stance === 'concern');
102
- const parts = [];
103
- if (failedAgents.length > 0) {
104
- parts.push(`re-run failed specialists (${failedAgents.join(', ')})`);
105
- }
106
- if (concerns.length > 0) {
107
- parts.push(`review ${concerns.length} concern(s)`);
108
- }
109
- if (parts.length > 0) {
110
- return `Proceed with caution: ${parts.join(', ')}.`;
111
- }
112
- return 'Proceed with implementation — all specialists approve.';
113
- }
114
- //# sourceMappingURL=council-summary.service.js.map
@@ -1,24 +0,0 @@
1
- import type { AgentOpinion, Stance } from './types';
2
- export interface CouncilInput {
3
- readonly agentName: string;
4
- readonly opinion: AgentOpinion | null;
5
- readonly error?: string;
6
- }
7
- export interface DisagreementPosition {
8
- readonly agentName: string;
9
- readonly stance: Stance;
10
- readonly reasoning: string;
11
- }
12
- export interface Disagreement {
13
- readonly topic: string;
14
- readonly positions: readonly DisagreementPosition[];
15
- }
16
- export interface CouncilSummary {
17
- readonly opinions: readonly AgentOpinion[];
18
- readonly failedAgents: readonly string[];
19
- readonly consensus: readonly string[];
20
- readonly disagreements: readonly Disagreement[];
21
- readonly blockingRisks: readonly string[];
22
- readonly nextStep: string;
23
- readonly partialFailure: boolean;
24
- }