@anyforge/mcp-server 2.4.0 → 3.0.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 +186 -13
- package/dist/index.js +258 -95
- package/package.json +7 -6
- package/dist/index.d.ts +0 -20
- package/dist/index.js.map +0 -1
- package/dist/lib/apiClient.d.ts +0 -20
- package/dist/lib/apiClient.js +0 -64
- package/dist/lib/apiClient.js.map +0 -1
- package/dist/lib/credentials.d.ts +0 -20
- package/dist/lib/credentials.js +0 -33
- package/dist/lib/credentials.js.map +0 -1
- package/dist/prompts/genesis.d.ts +0 -3
- package/dist/prompts/genesis.js +0 -68
- package/dist/prompts/genesis.js.map +0 -1
- package/dist/tools/coverage.d.ts +0 -12
- package/dist/tools/coverage.js +0 -62
- package/dist/tools/coverage.js.map +0 -1
- package/dist/tools/crews.d.ts +0 -6
- package/dist/tools/crews.js +0 -82
- package/dist/tools/crews.js.map +0 -1
- package/dist/tools/hil.d.ts +0 -7
- package/dist/tools/hil.js +0 -56
- package/dist/tools/hil.js.map +0 -1
- package/dist/tools/initiatives.d.ts +0 -7
- package/dist/tools/initiatives.js +0 -113
- package/dist/tools/initiatives.js.map +0 -1
- package/dist/tools/programs.d.ts +0 -5
- package/dist/tools/programs.js +0 -82
- package/dist/tools/programs.js.map +0 -1
- package/dist/tools/repos.d.ts +0 -11
- package/dist/tools/repos.js +0 -120
- package/dist/tools/repos.js.map +0 -1
- package/dist/tools/types.d.ts +0 -39
- package/dist/tools/types.js +0 -9
- package/dist/tools/types.js.map +0 -1
- package/dist/tools/work.d.ts +0 -5
- package/dist/tools/work.js +0 -104
- package/dist/tools/work.js.map +0 -1
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { callControl, qs } from '../lib/apiClient.js';
|
|
2
|
-
/**
|
|
3
|
-
* Initiative tools — read initiatives + their crews/spend, and approve
|
|
4
|
-
* the proposed backlog / mid-flight task proposals (HIL #1 and task
|
|
5
|
-
* proposals).
|
|
6
|
-
*/
|
|
7
|
-
export const initiativeTools = {
|
|
8
|
-
tools: [
|
|
9
|
-
{
|
|
10
|
-
name: 'anyforge_list_initiatives',
|
|
11
|
-
description: 'List initiatives with status, progress, token budget/spend. Optionally filter by a ' +
|
|
12
|
-
'comma-separated status list (DRAFT, BACKLOG_PROPOSED, IN_PROGRESS, COMPLETE, ARCHIVED).',
|
|
13
|
-
inputSchema: {
|
|
14
|
-
type: 'object',
|
|
15
|
-
properties: {
|
|
16
|
-
status: { type: 'string', description: 'Comma-separated InitiativeStatus filter.' },
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: 'anyforge_get_initiative',
|
|
22
|
-
description: 'Get an initiative with its crews, lifetime spend, and daily burn-down series.',
|
|
23
|
-
inputSchema: {
|
|
24
|
-
type: 'object',
|
|
25
|
-
properties: { initiativeId: { type: 'string', description: 'The initiative id.' } },
|
|
26
|
-
required: ['initiativeId'],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'anyforge_approve_backlog',
|
|
31
|
-
description: 'Approve the proposed backlog for an initiative (HIL #1). Promotes its BACKLOG items to ' +
|
|
32
|
-
'READY and moves the initiative to IN_PROGRESS. Requires `approve` scope.',
|
|
33
|
-
inputSchema: {
|
|
34
|
-
type: 'object',
|
|
35
|
-
properties: { initiativeId: { type: 'string', description: 'The initiative id.' } },
|
|
36
|
-
required: ['initiativeId'],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'anyforge_approve_task_proposal',
|
|
41
|
-
description: 'Approve a mid-flight task proposal card, materialising a READY work item. Requires ' +
|
|
42
|
-
'`approve` scope.',
|
|
43
|
-
inputSchema: {
|
|
44
|
-
type: 'object',
|
|
45
|
-
properties: {
|
|
46
|
-
initiativeId: { type: 'string', description: 'The initiative id.' },
|
|
47
|
-
crewId: { type: 'string', description: 'The crew whose chat holds the proposal card.' },
|
|
48
|
-
messageId: { type: 'string', description: 'The task_proposal chat message id.' },
|
|
49
|
-
},
|
|
50
|
-
required: ['initiativeId', 'crewId', 'messageId'],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: 'anyforge_create_initiative',
|
|
55
|
-
description: 'Create an initiative (optionally under a program). De-dupes on name within the same ' +
|
|
56
|
-
'codebase or program+repo, so re-runs return the existing one. Starts in DRAFT; dispatch ' +
|
|
57
|
-
'the architect to decompose it into a backlog. Requires `write` scope.',
|
|
58
|
-
inputSchema: {
|
|
59
|
-
type: 'object',
|
|
60
|
-
properties: {
|
|
61
|
-
name: { type: 'string', description: 'Initiative name.' },
|
|
62
|
-
description: { type: 'string', description: 'What needs to be done (the intent).' },
|
|
63
|
-
programId: { type: 'string', description: 'Parent program id (links it under a program).' },
|
|
64
|
-
defaultGithubRepo: { type: 'string', description: 'Repo the crews run on, "owner/name".' },
|
|
65
|
-
defaultGithubBranch: { type: 'string', description: 'Base branch (default "main").' },
|
|
66
|
-
priority: { type: 'string', description: 'P0 / P1 (default) / P2 / P3.' },
|
|
67
|
-
tokenBudget: { type: 'number', description: 'Token budget cap (default 50000).' },
|
|
68
|
-
contextNotes: { type: 'string', description: 'Extra context for the architect.' },
|
|
69
|
-
brdContent: { type: 'string', description: 'Business-requirements doc text (seeds decomposition).' },
|
|
70
|
-
codebaseId: { type: 'string', description: 'Linked codebase id, when created from a gap finding.' },
|
|
71
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Free-form tags.' },
|
|
72
|
-
},
|
|
73
|
-
required: ['name', 'description'],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'anyforge_dispatch_architect',
|
|
78
|
-
description: 'Run (or re-run) the architect decomposition for an initiative: (re)creates the ' +
|
|
79
|
-
'decomposition crew, clears any prior error, and starts the architect, which proposes a ' +
|
|
80
|
-
'backlog for HIL #1 approval. Use after creating an initiative, or to retry a failed ' +
|
|
81
|
-
'decomposition. Requires `write` scope.',
|
|
82
|
-
inputSchema: {
|
|
83
|
-
type: 'object',
|
|
84
|
-
properties: { initiativeId: { type: 'string', description: 'The initiative id.' } },
|
|
85
|
-
required: ['initiativeId'],
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
handlers: {
|
|
90
|
-
anyforge_list_initiatives: args => callControl('GET', `/initiatives${qs({ status: args.status })}`),
|
|
91
|
-
anyforge_get_initiative: args => callControl('GET', `/initiatives/${encodeURIComponent(String(args.initiativeId))}`),
|
|
92
|
-
anyforge_approve_backlog: args => callControl('POST', `/initiatives/${encodeURIComponent(String(args.initiativeId))}/approve-backlog`),
|
|
93
|
-
anyforge_approve_task_proposal: args => callControl('POST', `/initiatives/${encodeURIComponent(String(args.initiativeId))}/approve-task-proposal`, {
|
|
94
|
-
crewId: args.crewId,
|
|
95
|
-
messageId: args.messageId,
|
|
96
|
-
}),
|
|
97
|
-
anyforge_create_initiative: args => callControl('POST', '/initiatives', {
|
|
98
|
-
name: args.name,
|
|
99
|
-
description: args.description,
|
|
100
|
-
programId: args.programId,
|
|
101
|
-
defaultGithubRepo: args.defaultGithubRepo,
|
|
102
|
-
defaultGithubBranch: args.defaultGithubBranch,
|
|
103
|
-
priority: args.priority,
|
|
104
|
-
tokenBudget: args.tokenBudget,
|
|
105
|
-
contextNotes: args.contextNotes,
|
|
106
|
-
brdContent: args.brdContent,
|
|
107
|
-
codebaseId: args.codebaseId,
|
|
108
|
-
tags: args.tags,
|
|
109
|
-
}),
|
|
110
|
-
anyforge_dispatch_architect: args => callControl('POST', `/initiatives/${encodeURIComponent(String(args.initiativeId))}/dispatch-architect`),
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
//# sourceMappingURL=initiatives.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initiatives.js","sourceRoot":"","sources":["../../tools/initiatives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE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,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QACJ,2BAA2B,EAAE,IAAI,CAAC,EAAE,CAClC,WAAW,CAAC,MAAM,EAAE,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,qBAAqB,CAAC;KAC1G;CACF,CAAA"}
|
package/dist/tools/programs.d.ts
DELETED
package/dist/tools/programs.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { callControl, qs } from '../lib/apiClient.js';
|
|
2
|
-
/**
|
|
3
|
-
* Program tools — read the cross-initiative planning layer.
|
|
4
|
-
*/
|
|
5
|
-
export const programTools = {
|
|
6
|
-
tools: [
|
|
7
|
-
{
|
|
8
|
-
name: 'anyforge_list_programs',
|
|
9
|
-
description: 'List programs (the cross-initiative planning grouping) with status and owner. ' +
|
|
10
|
-
'Optionally filter by comma-separated status (PLANNING, IN_PROGRESS, COMPLETE, CANCELLED).',
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
properties: {
|
|
14
|
-
status: { type: 'string', description: 'Comma-separated ProgramStatus filter.' },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'anyforge_get_program',
|
|
20
|
-
description: 'Get a single program by id.',
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: { programId: { type: 'string', description: 'The program id.' } },
|
|
24
|
-
required: ['programId'],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'anyforge_create_program',
|
|
29
|
-
description: 'Create a program (the cross-initiative grouping). Use this to set up a body of work ' +
|
|
30
|
-
'before adding initiatives under it. Requires `write` scope.',
|
|
31
|
-
inputSchema: {
|
|
32
|
-
type: 'object',
|
|
33
|
-
properties: {
|
|
34
|
-
name: { type: 'string', description: 'Program name.' },
|
|
35
|
-
description: { type: 'string', description: 'What the program is for.' },
|
|
36
|
-
status: { type: 'string', description: 'PLANNING (default), IN_PROGRESS, COMPLETE, or CANCELLED.' },
|
|
37
|
-
ownerId: { type: 'string', description: 'Owning operator uid. Defaults to the key user.' },
|
|
38
|
-
targetDate: { type: 'string', description: 'Target completion date (ISO yyyy-mm-dd).' },
|
|
39
|
-
coverageTarget: { type: 'number', description: 'Test-coverage goal 0–100 (e.g. 90).' },
|
|
40
|
-
brief: { type: 'string', description: 'Program charter / brief (markdown).' },
|
|
41
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Free-form tags.' },
|
|
42
|
-
},
|
|
43
|
-
required: ['name'],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'anyforge_write_program_brief',
|
|
48
|
-
description: "Write or update a program's Brief — the canonical markdown charter (Purpose, Goals, Rationale, " +
|
|
49
|
-
'Scope (in/out), Success metrics, Key context & sources). Synthesize it from the program goal, the ' +
|
|
50
|
-
'codebases scoped in, this conversation, and any documents the user shared. The brief grounds future ' +
|
|
51
|
-
"Genesis chats and seeds each initiative's architect context, so a clear program purpose flows down " +
|
|
52
|
-
'to work-item decomposition. Call it once scope is clear, before creating the per-codebase ' +
|
|
53
|
-
'initiatives. Requires `write` scope.',
|
|
54
|
-
inputSchema: {
|
|
55
|
-
type: 'object',
|
|
56
|
-
properties: {
|
|
57
|
-
programId: { type: 'string', description: 'The program to write the brief on.' },
|
|
58
|
-
brief: { type: 'string', description: 'The full program brief in markdown (≤16000 chars). Replaces the current brief.' },
|
|
59
|
-
},
|
|
60
|
-
required: ['programId', 'brief'],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
handlers: {
|
|
65
|
-
anyforge_write_program_brief: args => callControl('PATCH', `/programs/${encodeURIComponent(String(args.programId))}`, {
|
|
66
|
-
brief: args.brief,
|
|
67
|
-
}),
|
|
68
|
-
anyforge_list_programs: args => callControl('GET', `/programs${qs({ status: args.status })}`),
|
|
69
|
-
anyforge_get_program: args => callControl('GET', `/programs/${encodeURIComponent(String(args.programId))}`),
|
|
70
|
-
anyforge_create_program: args => callControl('POST', '/programs', {
|
|
71
|
-
name: args.name,
|
|
72
|
-
description: args.description,
|
|
73
|
-
status: args.status,
|
|
74
|
-
ownerId: args.ownerId,
|
|
75
|
-
targetDate: args.targetDate,
|
|
76
|
-
coverageTarget: args.coverageTarget,
|
|
77
|
-
brief: args.brief,
|
|
78
|
-
tags: args.tags,
|
|
79
|
-
}),
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=programs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"programs.js","sourceRoot":"","sources":["../../tools/programs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAGrD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAe;IACtC,KAAK,EAAE;QACL;YACE,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EACT,gFAAgF;gBAChF,2FAA2F;YAC7F,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uCAAuC,EAAE;iBACjF;aACF;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE;gBAC7E,QAAQ,EAAE,CAAC,WAAW,CAAC;aACx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AE,CAAC,WAAW,EAAE,OAAO,CAAC;aACjC;SACF;KACF;IACD,QAAQ,EAAE;QACR,4BAA4B,EAAE,IAAI,CAAC,EAAE,CACnC,WAAW,CAAC,OAAO,EAAE,aAAa,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE;YAC9E,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;QACJ,sBAAsB,EAAE,IAAI,CAAC,EAAE,CAC7B,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAA4B,EAAE,CAAC,EAAE,CAAC;QACrF,oBAAoB,EAAE,IAAI,CAAC,EAAE,CAC3B,WAAW,CAAC,KAAK,EAAE,aAAa,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QAC/E,uBAAuB,EAAE,IAAI,CAAC,EAAE,CAC9B,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE;YAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;KACL;CACF,CAAA"}
|
package/dist/tools/repos.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ToolModule } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Repo tools — read the org repo index and a single repo's analysis
|
|
4
|
-
* (the READ primitives Program Genesis uses to scope a program), kick
|
|
5
|
-
* codebase analysis directly, or launch the server-side paced coverage
|
|
6
|
-
* sweep that walks every repo through Phase 1 then Phase 2 without
|
|
7
|
-
* exhausting the operator's token window. Analysis/sweep run on the key
|
|
8
|
-
* user's credential (per-user OAuth → company key) and require `write`
|
|
9
|
-
* scope; the reads need only `read`.
|
|
10
|
-
*/
|
|
11
|
-
export declare const repoTools: ToolModule;
|
package/dist/tools/repos.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { callControl, qs } from '../lib/apiClient.js';
|
|
2
|
-
/**
|
|
3
|
-
* Repo tools — read the org repo index and a single repo's analysis
|
|
4
|
-
* (the READ primitives Program Genesis uses to scope a program), kick
|
|
5
|
-
* codebase analysis directly, or launch the server-side paced coverage
|
|
6
|
-
* sweep that walks every repo through Phase 1 then Phase 2 without
|
|
7
|
-
* exhausting the operator's token window. Analysis/sweep run on the key
|
|
8
|
-
* user's credential (per-user OAuth → company key) and require `write`
|
|
9
|
-
* scope; the reads need only `read`.
|
|
10
|
-
*/
|
|
11
|
-
export const repoTools = {
|
|
12
|
-
tools: [
|
|
13
|
-
{
|
|
14
|
-
name: 'anyforge_list_repo_index',
|
|
15
|
-
description: "List the repositories in this company's org-level repo index, with activity classification " +
|
|
16
|
-
'(active = pushed recently, stable = no recent pushes, deprecated = archived), whether each repo ' +
|
|
17
|
-
'already has an AnyForge analysis, and its known coverage %. Use this FIRST when scoping a ' +
|
|
18
|
-
'program to discover candidate codebases. Defaults to active repos. To scope a coverage/quality ' +
|
|
19
|
-
'program in one shot, pass belowCoverage (e.g. 90) — returns only repos with known coverage ' +
|
|
20
|
-
'below it, worst-first. The result includes total counts so you know how many were omitted by the cap.',
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
activityStatus: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
enum: ['active', 'stable', 'deprecated', 'all'],
|
|
27
|
-
description: 'Activity filter. Default "active".',
|
|
28
|
-
},
|
|
29
|
-
language: { type: 'string', description: 'Primary-language filter (exact, case-insensitive), e.g. "Go".' },
|
|
30
|
-
belowCoverage: { type: 'number', description: 'Only repos with KNOWN coverage below this % (worst-first). Repos with unknown coverage are excluded.' },
|
|
31
|
-
limit: { type: 'number', description: 'Max repos to return (default 100, max 200).' },
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'anyforge_get_repo_analysis',
|
|
37
|
-
description: 'Get the AnyForge analysis summary for a single repo (coverage %, architecture red/amber/green ' +
|
|
38
|
-
'counts, open gap count, languages) to assess its relevance and distance from the program goal. ' +
|
|
39
|
-
'Returns `analyzed: false` with a note when the repo has no analysis yet — it can still be scoped ' +
|
|
40
|
-
'in. Call this for the handful of repos you are unsure about, NOT for every repo in a large org.',
|
|
41
|
-
inputSchema: {
|
|
42
|
-
type: 'object',
|
|
43
|
-
properties: {
|
|
44
|
-
repoFullName: { type: 'string', description: 'The "owner/name" repo, exactly as listed by anyforge_list_repo_index.' },
|
|
45
|
-
},
|
|
46
|
-
required: ['repoFullName'],
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'anyforge_analyze_repos',
|
|
51
|
-
description: 'Start Phase-1 codebase analysis for one or more repos. Idempotent — already-analyzed ' +
|
|
52
|
-
'repos return `already_analyzed`, in-flight ones `already_running` (never re-run). Up to ' +
|
|
53
|
-
'25 repos per call; chunk larger sets or use anyforge_start_coverage_sweep instead. ' +
|
|
54
|
-
'Requires `write` scope.',
|
|
55
|
-
inputSchema: {
|
|
56
|
-
type: 'object',
|
|
57
|
-
properties: {
|
|
58
|
-
repos: {
|
|
59
|
-
type: 'array',
|
|
60
|
-
items: { type: 'string' },
|
|
61
|
-
description: 'Repo full names ("owner/name"), max 25 per call.',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
required: ['repos'],
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'anyforge_start_coverage_sweep',
|
|
69
|
-
description: 'Launch a hands-off, paced analysis sweep: runs Phase 1 across every repo, then Phase 2, ' +
|
|
70
|
-
'keeping at most `concurrency` analyses in flight so the operator OAuth token window is ' +
|
|
71
|
-
'never exhausted. Seed from a programId (derives repos from its initiatives) or an explicit ' +
|
|
72
|
-
'repos list. Re-seeding overwrites the current sweep. Requires `write` scope.',
|
|
73
|
-
inputSchema: {
|
|
74
|
-
type: 'object',
|
|
75
|
-
properties: {
|
|
76
|
-
programId: {
|
|
77
|
-
type: 'string',
|
|
78
|
-
description: 'Derive the repo set from this program’s initiatives.',
|
|
79
|
-
},
|
|
80
|
-
repos: {
|
|
81
|
-
type: 'array',
|
|
82
|
-
items: { type: 'string' },
|
|
83
|
-
description: 'Explicit repo full names ("owner/name"). Used when programId is omitted.',
|
|
84
|
-
},
|
|
85
|
-
concurrency: {
|
|
86
|
-
type: 'number',
|
|
87
|
-
description: 'Max in-flight analyses per phase (default 5, 1–10).',
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'anyforge_refresh_repo_index',
|
|
94
|
-
description: 'Refresh the org repo index now instead of waiting for the nightly sweep. Re-lists every ' +
|
|
95
|
-
"repo's metadata AND auto-detects COMMITTED coverage: for repos with no crew/CI coverage, it " +
|
|
96
|
-
'reads the repo tree for a checked-in coverage report (lcov.info, coverage-summary.json, ' +
|
|
97
|
-
'cobertura, clover) and records the parsed %, so a repo that publishes coverage in git shows ' +
|
|
98
|
-
'a number without a crew run or a manual upload. Runs in the background — re-read the repo ' +
|
|
99
|
-
'index / coverage panel shortly after. Requires `write` scope.',
|
|
100
|
-
inputSchema: { type: 'object', properties: {} },
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
handlers: {
|
|
104
|
-
anyforge_list_repo_index: args => callControl('GET', `/repos${qs({
|
|
105
|
-
activityStatus: args.activityStatus,
|
|
106
|
-
language: args.language,
|
|
107
|
-
belowCoverage: args.belowCoverage,
|
|
108
|
-
limit: args.limit,
|
|
109
|
-
})}`),
|
|
110
|
-
anyforge_get_repo_analysis: args => callControl('GET', `/repos/analysis${qs({ repo: args.repoFullName })}`),
|
|
111
|
-
anyforge_analyze_repos: args => callControl('POST', '/repos/analyze', { repos: args.repos }),
|
|
112
|
-
anyforge_start_coverage_sweep: args => callControl('POST', '/repos/analyze-sweep', {
|
|
113
|
-
programId: args.programId,
|
|
114
|
-
repos: args.repos,
|
|
115
|
-
concurrency: args.concurrency,
|
|
116
|
-
}),
|
|
117
|
-
anyforge_refresh_repo_index: () => callControl('POST', '/repos/index-refresh', {}),
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
//# sourceMappingURL=repos.js.map
|
package/dist/tools/repos.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repos.js","sourceRoot":"","sources":["../../tools/repos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAGrD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,KAAK,EAAE;QACL;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EACT,6FAA6F;gBAC7F,kGAAkG;gBAClG,4FAA4F;gBAC5F,iGAAiG;gBACjG,6FAA6F;gBAC7F,uGAAuG;YACzG,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,cAAc,EAAE;wBACd,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC;wBAC/C,WAAW,EAAE,oCAAoC;qBAClD;oBACD,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+DAA+D,EAAE;oBAC1G,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sGAAsG,EAAE;oBACtJ,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6CAA6C,EAAE;i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9F,4FAA4F;gBAC5F,+DAA+D;YACjE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;SAChD;KACF;IACD,QAAQ,EAAE;QACR,wBAAwB,EAAE,IAAI,CAAC,EAAE,CAC/B,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAoC;YACzD,QAAQ,EAAE,IAAI,CAAC,QAA8B;YAC7C,aAAa,EAAE,IAAI,CAAC,aAAmC;YACvD,KAAK,EAAE,IAAI,CAAC,KAA2B;SACxC,CAAC,EAAE,CAAC;QACP,0BAA0B,EAAE,IAAI,CAAC,EAAE,CACjC,WAAW,CAAC,KAAK,EAAE,kBAAkB,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,YAAkC,EAAE,CAAC,EAAE,CAAC;QAC/F,sBAAsB,EAAE,IAAI,CAAC,EAAE,CAC7B,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9D,6BAA6B,EAAE,IAAI,CAAC,EAAE,CACpC,WAAW,CAAC,MAAM,EAAE,sBAAsB,EAAE;YAC1C,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;QACJ,2BAA2B,EAAE,GAAG,EAAE,CAChC,WAAW,CAAC,MAAM,EAAE,sBAAsB,EAAE,EAAE,CAAC;KAClD;CACF,CAAA"}
|
package/dist/tools/types.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared shapes for the MCP tool modules. Each domain file exports a
|
|
3
|
-
* `tools` array (the MCP tool definitions) and a `handlers` map
|
|
4
|
-
* (name → async function returning JSON-serialisable data). index.ts
|
|
5
|
-
* merges them and JSON-stringifies handler results into MCP text
|
|
6
|
-
* content.
|
|
7
|
-
*/
|
|
8
|
-
export interface ToolDef {
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: 'object';
|
|
13
|
-
properties: Record<string, unknown>;
|
|
14
|
-
required?: string[];
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export type ToolHandler = (args: Record<string, unknown>) => Promise<unknown>;
|
|
18
|
-
export interface ToolModule {
|
|
19
|
-
tools: ToolDef[];
|
|
20
|
-
handlers: Record<string, ToolHandler>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* MCP prompt — a server-provided, parameterised conversation starter.
|
|
24
|
-
* Claude Code surfaces these as slash commands (e.g.
|
|
25
|
-
* `/mcp__anyforge__genesis`), so they're the discoverable entry point
|
|
26
|
-
* for a guided flow. `render` turns the invocation arguments into the
|
|
27
|
-
* user-message text the client injects to kick off the conversation.
|
|
28
|
-
*/
|
|
29
|
-
export interface PromptArg {
|
|
30
|
-
name: string;
|
|
31
|
-
description: string;
|
|
32
|
-
required?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface PromptDef {
|
|
35
|
-
name: string;
|
|
36
|
-
description: string;
|
|
37
|
-
arguments: PromptArg[];
|
|
38
|
-
render: (args: Record<string, string>) => string;
|
|
39
|
-
}
|
package/dist/tools/types.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared shapes for the MCP tool modules. Each domain file exports a
|
|
3
|
-
* `tools` array (the MCP tool definitions) and a `handlers` map
|
|
4
|
-
* (name → async function returning JSON-serialisable data). index.ts
|
|
5
|
-
* merges them and JSON-stringifies handler results into MCP text
|
|
6
|
-
* content.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
package/dist/tools/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../tools/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/dist/tools/work.d.ts
DELETED
package/dist/tools/work.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { callControl, qs } from '../lib/apiClient.js';
|
|
2
|
-
/**
|
|
3
|
-
* Work-item tools — read the backlog and add / modify items.
|
|
4
|
-
*/
|
|
5
|
-
export const workTools = {
|
|
6
|
-
tools: [
|
|
7
|
-
{
|
|
8
|
-
name: 'anyforge_list_work_items',
|
|
9
|
-
description: 'List work items in the AnyForge backlog with status, priority, and any linked crew ' +
|
|
10
|
-
'state. By default archived items are excluded.',
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
properties: {
|
|
14
|
-
includeArchived: { type: 'boolean', description: 'Include archived items (default false).' },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'anyforge_get_work_item',
|
|
20
|
-
description: 'Get a single work item by id.',
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: { itemId: { type: 'string', description: 'The work item id.' } },
|
|
24
|
-
required: ['itemId'],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'anyforge_create_work_item',
|
|
29
|
-
description: 'Create a new work item in the backlog (status BACKLOG). Requires `write` scope.',
|
|
30
|
-
inputSchema: {
|
|
31
|
-
type: 'object',
|
|
32
|
-
properties: {
|
|
33
|
-
title: { type: 'string', description: 'Work item title.' },
|
|
34
|
-
description: { type: 'string', description: 'Detailed description.' },
|
|
35
|
-
type: { type: 'string', description: 'FEATURE, BUG, ENHANCEMENT, KTLO, TECH_DEBT, INCIDENT.' },
|
|
36
|
-
priority: { type: 'string', description: 'P0, P1, P2, P3.' },
|
|
37
|
-
acceptanceCriteria: { type: 'string', description: 'Optional acceptance criteria.' },
|
|
38
|
-
initiativeId: { type: 'string', description: 'Optional parent initiative id (allocates a {CODE}-NNN).' },
|
|
39
|
-
},
|
|
40
|
-
required: ['title', 'type', 'priority'],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: 'anyforge_update_work_item',
|
|
45
|
-
description: 'Mutate a work item. `action` selects the operation: ' +
|
|
46
|
-
"'update' (edit title/description/type/priority/acceptanceCriteria/dependsOn), " +
|
|
47
|
-
"'advance' (BACKLOG→REFINED), 'approve_refinement' (REFINED→READY), " +
|
|
48
|
-
"'dispatch' (requires crewId), 'complete', 'archive', 'unarchive', 'reorder' (sortOrder), " +
|
|
49
|
-
"'reopen' (DONE→IN_CREW so it can be retried), " +
|
|
50
|
-
"'close-as-fixed' (requires closedReason). Requires `write` scope.",
|
|
51
|
-
inputSchema: {
|
|
52
|
-
type: 'object',
|
|
53
|
-
properties: {
|
|
54
|
-
itemId: { type: 'string', description: 'The work item id.' },
|
|
55
|
-
action: { type: 'string', description: 'The mutation to apply (see description).' },
|
|
56
|
-
title: { type: 'string' },
|
|
57
|
-
description: { type: 'string' },
|
|
58
|
-
type: { type: 'string' },
|
|
59
|
-
priority: { type: 'string' },
|
|
60
|
-
acceptanceCriteria: { type: 'string' },
|
|
61
|
-
bumpKind: { type: 'string', description: 'breaking | feat | fix | none.' },
|
|
62
|
-
dependsOn: { type: 'array', items: { type: 'string' }, description: 'Work-item ids this depends on.' },
|
|
63
|
-
crewId: { type: 'string', description: "For action='dispatch'." },
|
|
64
|
-
crewType: { type: 'string' },
|
|
65
|
-
sortOrder: { type: 'number', description: "For action='reorder'." },
|
|
66
|
-
closedReason: { type: 'string', description: "For action='close-as-fixed'." },
|
|
67
|
-
closedAsFixedByWorkItemId: { type: 'string' },
|
|
68
|
-
},
|
|
69
|
-
required: ['itemId', 'action'],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: 'anyforge_retry_work_item',
|
|
74
|
-
description: 'Re-run a work item: terminate its current crew and dispatch a fresh one that reuses the ' +
|
|
75
|
-
'same feature branch (lands new commits on the existing open PR) and re-reads the company\'s ' +
|
|
76
|
-
'current agent config, so updated skills/guardrails take effect. Returns the new crew id. ' +
|
|
77
|
-
'If the item is DONE/DROPPED this fails with `terminal_item` — reopen it first via ' +
|
|
78
|
-
"anyforge_update_work_item action='reopen'. Requires `write` scope.",
|
|
79
|
-
inputSchema: {
|
|
80
|
-
type: 'object',
|
|
81
|
-
properties: { itemId: { type: 'string', description: 'The work item id.' } },
|
|
82
|
-
required: ['itemId'],
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
handlers: {
|
|
87
|
-
anyforge_list_work_items: args => callControl('GET', `/work${qs({ includeArchived: args.includeArchived })}`),
|
|
88
|
-
anyforge_get_work_item: args => callControl('GET', `/work/${encodeURIComponent(String(args.itemId))}`),
|
|
89
|
-
anyforge_create_work_item: args => callControl('POST', '/work', {
|
|
90
|
-
title: args.title,
|
|
91
|
-
description: args.description,
|
|
92
|
-
type: args.type,
|
|
93
|
-
priority: args.priority,
|
|
94
|
-
...(args.acceptanceCriteria ? { acceptanceCriteria: args.acceptanceCriteria } : {}),
|
|
95
|
-
...(args.initiativeId ? { initiativeId: args.initiativeId } : {}),
|
|
96
|
-
}),
|
|
97
|
-
anyforge_update_work_item: args => {
|
|
98
|
-
const { itemId, ...rest } = args;
|
|
99
|
-
return callControl('PATCH', `/work/${encodeURIComponent(String(itemId))}`, rest);
|
|
100
|
-
},
|
|
101
|
-
anyforge_retry_work_item: args => callControl('POST', `/work/${encodeURIComponent(String(args.itemId))}/retry`),
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
//# sourceMappingURL=work.js.map
|
package/dist/tools/work.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"work.js","sourceRoot":"","sources":["../../tools/work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAGrD;;GAEG;AACH,MAAM,CAAC,MAAM,S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