@agentteams/cli 0.1.75 → 0.1.77

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 (93) hide show
  1. package/.eslintcache +1 -1
  2. package/dist/api/convention.d.ts +11 -0
  3. package/dist/api/convention.d.ts.map +1 -0
  4. package/dist/api/convention.js +26 -0
  5. package/dist/api/convention.js.map +1 -0
  6. package/dist/api/worktree.d.ts +13 -0
  7. package/dist/api/worktree.d.ts.map +1 -0
  8. package/dist/api/worktree.js +8 -0
  9. package/dist/api/worktree.js.map +1 -0
  10. package/dist/commands/convention.d.ts.map +1 -1
  11. package/dist/commands/convention.js +6 -8
  12. package/dist/commands/convention.js.map +1 -1
  13. package/dist/commands/index.d.ts.map +1 -1
  14. package/dist/commands/index.js +4 -19
  15. package/dist/commands/index.js.map +1 -1
  16. package/dist/commands/mcp.d.ts +13 -0
  17. package/dist/commands/mcp.d.ts.map +1 -0
  18. package/dist/commands/mcp.js +13 -0
  19. package/dist/commands/mcp.js.map +1 -0
  20. package/dist/commands/search.d.ts.map +1 -1
  21. package/dist/commands/search.js +8 -35
  22. package/dist/commands/search.js.map +1 -1
  23. package/dist/commands/worktree.d.ts +9 -0
  24. package/dist/commands/worktree.d.ts.map +1 -0
  25. package/dist/commands/worktree.js +119 -0
  26. package/dist/commands/worktree.js.map +1 -0
  27. package/dist/index.js +101 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/mcp/context.d.ts +15 -0
  30. package/dist/mcp/context.d.ts.map +1 -0
  31. package/dist/mcp/context.js +47 -0
  32. package/dist/mcp/context.js.map +1 -0
  33. package/dist/mcp/resources.d.ts +17 -0
  34. package/dist/mcp/resources.d.ts.map +1 -0
  35. package/dist/mcp/resources.js +50 -0
  36. package/dist/mcp/resources.js.map +1 -0
  37. package/dist/mcp/server.d.ts +20 -0
  38. package/dist/mcp/server.d.ts.map +1 -0
  39. package/dist/mcp/server.js +106 -0
  40. package/dist/mcp/server.js.map +1 -0
  41. package/dist/mcp/tools.d.ts +20 -0
  42. package/dist/mcp/tools.d.ts.map +1 -0
  43. package/dist/mcp/tools.js +172 -0
  44. package/dist/mcp/tools.js.map +1 -0
  45. package/dist/mcp-registration/atomicWrite.d.ts +26 -0
  46. package/dist/mcp-registration/atomicWrite.d.ts.map +1 -0
  47. package/dist/mcp-registration/atomicWrite.js +58 -0
  48. package/dist/mcp-registration/atomicWrite.js.map +1 -0
  49. package/dist/mcp-registration/clients.d.ts +5 -0
  50. package/dist/mcp-registration/clients.d.ts.map +1 -0
  51. package/dist/mcp-registration/clients.js +300 -0
  52. package/dist/mcp-registration/clients.js.map +1 -0
  53. package/dist/mcp-registration/detect.d.ts +23 -0
  54. package/dist/mcp-registration/detect.d.ts.map +1 -0
  55. package/dist/mcp-registration/detect.js +48 -0
  56. package/dist/mcp-registration/detect.js.map +1 -0
  57. package/dist/mcp-registration/index.d.ts +50 -0
  58. package/dist/mcp-registration/index.d.ts.map +1 -0
  59. package/dist/mcp-registration/index.js +205 -0
  60. package/dist/mcp-registration/index.js.map +1 -0
  61. package/dist/mcp-registration/install.d.ts +66 -0
  62. package/dist/mcp-registration/install.d.ts.map +1 -0
  63. package/dist/mcp-registration/install.js +244 -0
  64. package/dist/mcp-registration/install.js.map +1 -0
  65. package/dist/mcp-registration/jsonc.d.ts +44 -0
  66. package/dist/mcp-registration/jsonc.d.ts.map +1 -0
  67. package/dist/mcp-registration/jsonc.js +266 -0
  68. package/dist/mcp-registration/jsonc.js.map +1 -0
  69. package/dist/mcp-registration/render.d.ts +18 -0
  70. package/dist/mcp-registration/render.d.ts.map +1 -0
  71. package/dist/mcp-registration/render.js +91 -0
  72. package/dist/mcp-registration/render.js.map +1 -0
  73. package/dist/mcp-registration/serverSpec.d.ts +31 -0
  74. package/dist/mcp-registration/serverSpec.d.ts.map +1 -0
  75. package/dist/mcp-registration/serverSpec.js +29 -0
  76. package/dist/mcp-registration/serverSpec.js.map +1 -0
  77. package/dist/mcp-registration/types.d.ts +98 -0
  78. package/dist/mcp-registration/types.d.ts.map +1 -0
  79. package/dist/mcp-registration/types.js +12 -0
  80. package/dist/mcp-registration/types.js.map +1 -0
  81. package/dist/mcp-registration/vendorCommand.d.ts +18 -0
  82. package/dist/mcp-registration/vendorCommand.d.ts.map +1 -0
  83. package/dist/mcp-registration/vendorCommand.js +27 -0
  84. package/dist/mcp-registration/vendorCommand.js.map +1 -0
  85. package/dist/utils/apiContext.d.ts +13 -0
  86. package/dist/utils/apiContext.d.ts.map +1 -0
  87. package/dist/utils/apiContext.js +26 -0
  88. package/dist/utils/apiContext.js.map +1 -0
  89. package/dist/utils/searchParams.d.ts +21 -0
  90. package/dist/utils/searchParams.d.ts.map +1 -0
  91. package/dist/utils/searchParams.js +47 -0
  92. package/dist/utils/searchParams.js.map +1 -0
  93. package/package.json +5 -3
@@ -0,0 +1,106 @@
1
+ import { createRequire } from 'node:module';
2
+ import { McpServer, ResourceTemplate } from '@modelcontextprotocol/server';
3
+ import { serveStdio } from '@modelcontextprotocol/server/stdio';
4
+ import { handleError } from '../utils/errors.js';
5
+ import { resolveMcpToolContext } from './context.js';
6
+ import { getResourceSpecs } from './resources.js';
7
+ import { getToolSpecs } from './tools.js';
8
+ const require = createRequire(import.meta.url);
9
+ const pkg = require('../../package.json');
10
+ export const MCP_SERVER_NAME = '@agentteams/cli';
11
+ /**
12
+ * Build one MCP server instance. `serveStdio` calls this per connection (and
13
+ * per discarded `server/discover` probe), so it must stay side-effect free
14
+ * apart from stderr diagnostics.
15
+ *
16
+ * This module is the only place allowed to import the MCP SDK or assemble MCP
17
+ * response envelopes: domain handlers stay SDK-agnostic so upgrading the
18
+ * pinned beta only touches this adapter.
19
+ */
20
+ export function createMcpServer(context, version = pkg.version) {
21
+ // Read-only surface: tools plus single-entity resource templates. Prompts
22
+ // and Extensions stay out of scope for Phase 1.
23
+ const server = new McpServer({ name: MCP_SERVER_NAME, version }, { capabilities: { tools: {}, resources: {} } });
24
+ registerTools(server, context);
25
+ registerResources(server, context);
26
+ return server;
27
+ }
28
+ /** The single `registerTool` loop — tool envelopes are assembled only here. */
29
+ function registerTools(server, context) {
30
+ for (const spec of getToolSpecs()) {
31
+ server.registerTool(spec.name, {
32
+ title: spec.title,
33
+ description: spec.description,
34
+ inputSchema: spec.inputSchema,
35
+ }, async (args) => {
36
+ try {
37
+ // The SDK has already validated `args` against `spec.inputSchema`
38
+ // before this callback runs, so the record cast is safe.
39
+ const result = await spec.handler(args, context);
40
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
41
+ }
42
+ catch (error) {
43
+ // API failures are reported as a tool error so the connection survives.
44
+ return {
45
+ content: [{ type: 'text', text: handleError(error, { apiUrl: context.apiUrl }) }],
46
+ isError: true,
47
+ };
48
+ }
49
+ });
50
+ }
51
+ }
52
+ /**
53
+ * The single `registerResource` loop — resource envelopes and JSON-RPC error
54
+ * mapping live only here. Every template hides enumeration (`list: undefined`):
55
+ * entity listing is the search/list tools' job, and a full dump would be
56
+ * unbounded.
57
+ */
58
+ function registerResources(server, context) {
59
+ for (const spec of getResourceSpecs()) {
60
+ server.registerResource(spec.name, new ResourceTemplate(spec.uriTemplate, { list: undefined }), {
61
+ title: spec.title,
62
+ description: spec.description,
63
+ mimeType: 'application/json',
64
+ }, async (uri, variables) => {
65
+ try {
66
+ const result = await spec.handler(normalizeVariables(variables), context);
67
+ return {
68
+ contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(result) }],
69
+ };
70
+ }
71
+ catch (error) {
72
+ // Unlike tools (isError envelope), resource failures surface as
73
+ // JSON-RPC errors: rethrow with the translated message and let the
74
+ // SDK build the error frame — the connection itself survives.
75
+ throw new Error(handleError(error, { apiUrl: context.apiUrl }));
76
+ }
77
+ });
78
+ }
79
+ }
80
+ /** The SDK hands template variables as `string | string[]`; specs expect plain strings. */
81
+ function normalizeVariables(variables) {
82
+ const normalized = {};
83
+ for (const [key, value] of Object.entries(variables)) {
84
+ normalized[key] = Array.isArray(value) ? (value[0] ?? '') : value;
85
+ }
86
+ return normalized;
87
+ }
88
+ /**
89
+ * Start the stdio MCP server. stdout is reserved for JSON-RPC frames, so every
90
+ * diagnostic goes to stderr.
91
+ */
92
+ export function startMcpServer(options = {}) {
93
+ const context = resolveMcpToolContext(options);
94
+ writeDiagnostic(`serving stdio (cli ${pkg.version}) apiUrl=${context.apiUrl} projectId=${context.projectId}`);
95
+ return serveStdio((ctx) => {
96
+ // The era tells us whether the client negotiated the modern
97
+ // (`server/discover`) or legacy (`initialize`) revision — the key
98
+ // observation this spike has to record.
99
+ writeDiagnostic(`connection era=${ctx.era}`);
100
+ return createMcpServer(context);
101
+ });
102
+ }
103
+ function writeDiagnostic(message) {
104
+ process.stderr.write(`[agentteams mcp] ${message}\n`);
105
+ }
106
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,UAAU,EAA0B,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAuB,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAwB,CAAC;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,OAAuB,EAAE,UAAkB,GAAG,CAAC,OAAO;I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AK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACpE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,UAAmC,EAAE;IAClE,MAAM,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAE/C,eAAe,CAAC,sBAAsB,GAAG,CAAC,OAAO,YAAY,OAAO,CAAC,MAAM,cAAc,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAE9G,OAAO,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE;QACxB,4DAA4D;QAC5D,kEAAkE;QAClE,wCAAwC;QACxC,eAAe,CAAC,kBAAkB,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;QAC7C,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import type { McpToolContext } from './context.js';
3
+ export declare const SEARCH_TOOL_NAME = "agentteams_search";
4
+ /**
5
+ * SDK-agnostic tool description: the handler receives the parsed arguments and
6
+ * the resolved API context, and returns the upstream payload verbatim. Only the
7
+ * SDK adapter (`server.ts`) may wrap results into MCP envelopes — domain
8
+ * handlers must stay free of SDK types so a future SDK upgrade only touches the
9
+ * adapter.
10
+ */
11
+ export interface McpToolSpec {
12
+ name: string;
13
+ title: string;
14
+ description: string;
15
+ inputSchema: z.ZodType;
16
+ handler: (args: Record<string, unknown>, context: McpToolContext) => Promise<unknown>;
17
+ }
18
+ /** Every tool the MCP server exposes, in registration order. */
19
+ export declare function getToolSpecs(): McpToolSpec[];
20
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AASpD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACvF;AAkKD,gEAAgE;AAChE,wBAAgB,YAAY,IAAI,WAAW,EAAE,CAW5C"}
@@ -0,0 +1,172 @@
1
+ import { z } from 'zod';
2
+ import { getCoAction } from '../api/coaction.js';
3
+ import { getConvention, listConventions } from '../api/convention.js';
4
+ import { getDocument } from '../api/document.js';
5
+ import { getPlanRunbook } from '../api/plan.js';
6
+ import { getPostMortem } from '../api/postmortem.js';
7
+ import { getReport } from '../api/report.js';
8
+ import { searchEntities } from '../api/search.js';
9
+ import { stripEntityIdPrefix } from '../utils/entityId.js';
10
+ import { buildSearchParams, VALID_TYPES } from '../utils/searchParams.js';
11
+ export const SEARCH_TOOL_NAME = 'agentteams_search';
12
+ const SEARCH_TOOL_DESCRIPTION = [
13
+ 'Search AgentTeams entities (plans, co-actions, completion reports, post-mortems, conventions, comments, code reviews, documents) in this project.',
14
+ 'Scope: results are limited to the projectId configured for this CLI — the tool cannot search other projects.',
15
+ 'Truncation: when the token budget trims the response, meta.truncatedByTokenBudget is true; per-item contentTokenCount tells you what fetching the full entity would cost.',
16
+ 'Limitation: under agent API-key authentication the external issue/PR types (GITHUB_ISSUE, GITHUB_PR, GITLAB_ISSUE, GITLAB_MERGE_REQUEST, BITBUCKET_ISSUE, BITBUCKET_PR, LINEAR_ISSUE) always come back empty.',
17
+ ].join(' ');
18
+ const searchToolSpec = {
19
+ name: SEARCH_TOOL_NAME,
20
+ title: 'Search AgentTeams',
21
+ description: SEARCH_TOOL_DESCRIPTION,
22
+ // 1:1 with the backend's searchQuerySchema. Defaults for limit/maxTokens
23
+ // stay unset so the backend remains the single source of truth.
24
+ inputSchema: z.object({
25
+ query: z.string().min(1).describe('Search query'),
26
+ types: z.array(z.enum(VALID_TYPES)).optional().describe('Entity types to filter by'),
27
+ limit: z.number().int().min(1).max(100).optional().describe('Max results (backend default: 20)'),
28
+ maxTokens: z.number().int().min(1).optional().describe('Token budget for the response'),
29
+ }),
30
+ // The full payload is passed through verbatim: summarizing away `meta` or
31
+ // `partialFailures` would let an agent read a truncated or partially failed
32
+ // search as "no results".
33
+ handler: async (args, context) => {
34
+ return searchEntities(context.apiUrl, context.projectId, context.headers, buildSearchParams({
35
+ query: args.query,
36
+ types: args.types,
37
+ limit: args.limit,
38
+ maxTokens: args.maxTokens,
39
+ }));
40
+ },
41
+ };
42
+ /**
43
+ * Detail-tool factory: `{ id }` in, upstream envelope out — verbatim. The id
44
+ * accepts both bare uuids and `agentteams_<type>_`-prefixed ids as they appear
45
+ * in search results and web-UI entity references.
46
+ */
47
+ function createEntityGetToolSpec(options) {
48
+ return {
49
+ name: options.name,
50
+ title: options.title,
51
+ description: options.description,
52
+ inputSchema: z.object({
53
+ id: z.string().min(1).describe(options.idDescription),
54
+ }),
55
+ handler: async (args, context) => {
56
+ const id = stripEntityIdPrefix(args.id);
57
+ return options.fetch(context.apiUrl, context.projectId, context.headers, id);
58
+ },
59
+ };
60
+ }
61
+ const planGetToolSpec = createEntityGetToolSpec({
62
+ name: 'agentteams_plan_get',
63
+ title: 'Get AgentTeams Plan',
64
+ description: [
65
+ 'Fetch one plan from this project as its full execution runbook: metadata, the complete contentMarkdown body, structured V2 tasks (including dependsOnTaskIds) and progress.',
66
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
67
+ 'Responses can be large, so check contentTokenCount on the agentteams_search result before fetching the full plan.',
68
+ ].join(' '),
69
+ idDescription: 'Plan id (bare uuid or agentteams_pln_-prefixed)',
70
+ fetch: getPlanRunbook,
71
+ });
72
+ const reportGetToolSpec = createEntityGetToolSpec({
73
+ name: 'agentteams_report_get',
74
+ title: 'Get AgentTeams Completion Report',
75
+ description: [
76
+ 'Fetch one completion report from this project, including its full content and metrics.',
77
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
78
+ 'Responses can be large, so check contentTokenCount on the agentteams_search result before fetching the full report.',
79
+ ].join(' '),
80
+ idDescription: 'Completion report id (bare uuid or agentteams_rpt_-prefixed)',
81
+ fetch: getReport,
82
+ });
83
+ const coactionGetToolSpec = createEntityGetToolSpec({
84
+ name: 'agentteams_coaction_get',
85
+ title: 'Get AgentTeams Co-Action',
86
+ description: [
87
+ 'Fetch one co-action (handoff record) from this project, including its full content.',
88
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
89
+ 'Responses can be large, so check contentTokenCount on the agentteams_search result before fetching the full co-action.',
90
+ ].join(' '),
91
+ idDescription: 'Co-action id (bare uuid or agentteams_act_-prefixed)',
92
+ fetch: getCoAction,
93
+ });
94
+ const postmortemGetToolSpec = createEntityGetToolSpec({
95
+ name: 'agentteams_postmortem_get',
96
+ title: 'Get AgentTeams Post-Mortem',
97
+ description: [
98
+ 'Fetch one post-mortem from this project, including its full content.',
99
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
100
+ 'Responses can be large, so check contentTokenCount on the agentteams_search result before fetching the full post-mortem.',
101
+ ].join(' '),
102
+ idDescription: 'Post-mortem id (bare uuid or agentteams_pmt_-prefixed)',
103
+ fetch: getPostMortem,
104
+ });
105
+ const documentGetToolSpec = createEntityGetToolSpec({
106
+ name: 'agentteams_document_get',
107
+ title: 'Get AgentTeams Document',
108
+ description: [
109
+ 'Fetch one document from this project, including its full body.',
110
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
111
+ 'Responses can be large, so check contentTokenCount on the agentteams_search result before fetching the full document.',
112
+ ].join(' '),
113
+ idDescription: 'Document id (bare uuid or agentteams_doc_-prefixed)',
114
+ fetch: getDocument,
115
+ });
116
+ const conventionListToolSpec = {
117
+ name: 'agentteams_convention_list',
118
+ title: 'List AgentTeams Conventions',
119
+ description: [
120
+ 'List the conventions (coding rules, guides, skills) of this project with optional filters and pagination.',
121
+ 'Use agentteams_search to discover relevant conventions; use this tool when you need exact filters or a paginated inventory.',
122
+ 'The paginated data/meta envelope is returned verbatim; list items carry metadata only — fetch the full text with agentteams_convention_get.',
123
+ ].join(' '),
124
+ // 1:1 with the backend's conventionQuerySchema (+ paginationQuerySchema);
125
+ // defaults stay unset so the backend remains the single source of truth.
126
+ inputSchema: z.object({
127
+ category: z.string().optional().describe('Filter by category (e.g. rules, skills, guides, references)'),
128
+ scope: z.enum(['PROJECT', 'PERSONAL']).optional().describe('Filter by convention scope'),
129
+ archived: z
130
+ .enum(['ACTIVE', 'ARCHIVED', 'ALL'])
131
+ .optional()
132
+ .describe('Filter by archive state (backend default: ACTIVE)'),
133
+ search: z.string().optional().describe('Keyword filter on title/content'),
134
+ createdByMemberId: z.string().optional().describe('Filter by creator member id'),
135
+ page: z.number().int().min(0).optional().describe('Page number (backend default: 1)'),
136
+ pageSize: z.number().int().min(0).max(100).optional().describe('Page size (backend default: 20)'),
137
+ }),
138
+ handler: async (args, context) => {
139
+ const params = {};
140
+ for (const key of ['category', 'scope', 'archived', 'search', 'createdByMemberId', 'page', 'pageSize']) {
141
+ const value = args[key];
142
+ if (typeof value === 'string' || typeof value === 'number')
143
+ params[key] = value;
144
+ }
145
+ return listConventions(context.apiUrl, context.projectId, context.headers, params);
146
+ },
147
+ };
148
+ const conventionGetToolSpec = createEntityGetToolSpec({
149
+ name: 'agentteams_convention_get',
150
+ title: 'Get AgentTeams Convention',
151
+ description: [
152
+ 'Fetch one convention from this project, including its full contentMarkdown.',
153
+ 'Pass a convention id from agentteams_search, or use agentteams_convention_list first when you need exact filters.',
154
+ 'The upstream payload is returned verbatim — nothing is summarized or omitted.',
155
+ ].join(' '),
156
+ idDescription: 'Convention id (bare uuid or agentteams_cnv_-prefixed)',
157
+ fetch: getConvention,
158
+ });
159
+ /** Every tool the MCP server exposes, in registration order. */
160
+ export function getToolSpecs() {
161
+ return [
162
+ searchToolSpec,
163
+ planGetToolSpec,
164
+ reportGetToolSpec,
165
+ coactionGetToolSpec,
166
+ postmortemGetToolSpec,
167
+ documentGetToolSpec,
168
+ conventionListToolSpec,
169
+ conventionGetToolSpec,
170
+ ];
171
+ }
172
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEpD,MAAM,uBAAuB,GAAG;IAC9B,mJAAmJ;IACnJ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2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE;QACX,6EAA6E;QAC7E,mHAAmH;QACnH,+EAA+E;KAChF,CAAC,IAAI,CAAC,GAAG,CAAC;IACX,aAAa,EAAE,uDAAuD;IACtE,KAAK,EAAE,aAAa;CACrB,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,cAAc;QACd,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,qBAAqB;QACrB,mBAAmB;QACnB,sBAAsB;QACtB,qBAAqB;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Config files written here belong to the user, not to AgentTeams: they hold
3
+ * other MCP servers, editor preferences and (for user scope) API keys. Every
4
+ * write therefore goes backup → temp file in the same directory → rename, so a
5
+ * crash or a full disk can never leave a truncated config behind.
6
+ */
7
+ /** Suffix is deterministic so `install` twice does not accumulate backup files. */
8
+ export declare const BACKUP_SUFFIX = ".agentteams-backup";
9
+ /** User-scope files can carry a literal API key, so they must not be world-readable. */
10
+ export declare const USER_SCOPE_FILE_MODE = 384;
11
+ export declare const PROJECT_SCOPE_FILE_MODE = 420;
12
+ export interface AtomicWriteResult {
13
+ path: string;
14
+ /** Absolute path of the backup, or null when the file did not exist yet. */
15
+ backupPath: string | null;
16
+ created: boolean;
17
+ mode: number;
18
+ }
19
+ /**
20
+ * Replace `path` with `content` atomically.
21
+ *
22
+ * @param targetMode - when present, force the replacement to this mode while
23
+ * preserving the original mode on the backup.
24
+ */
25
+ export declare function writeConfigFileAtomically(path: string, content: string, defaultMode: number, targetMode?: number): AtomicWriteResult;
26
+ //# sourceMappingURL=atomicWrite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicWrite.d.ts","sourceRoot":"","sources":["../../src/mcp-registration/atomicWrite.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,mFAAmF;AACnF,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAElD,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,MAAQ,CAAC;AAC1C,eAAO,MAAM,uBAAuB,MAAQ,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAUD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,iBAAiB,CA+BnB"}
@@ -0,0 +1,58 @@
1
+ import { chmodSync, copyFileSync, mkdirSync, renameSync, statSync, unlinkSync, writeFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ /**
4
+ * Config files written here belong to the user, not to AgentTeams: they hold
5
+ * other MCP servers, editor preferences and (for user scope) API keys. Every
6
+ * write therefore goes backup → temp file in the same directory → rename, so a
7
+ * crash or a full disk can never leave a truncated config behind.
8
+ */
9
+ /** Suffix is deterministic so `install` twice does not accumulate backup files. */
10
+ export const BACKUP_SUFFIX = '.agentteams-backup';
11
+ /** User-scope files can carry a literal API key, so they must not be world-readable. */
12
+ export const USER_SCOPE_FILE_MODE = 0o600;
13
+ export const PROJECT_SCOPE_FILE_MODE = 0o644;
14
+ function existingMode(path) {
15
+ try {
16
+ return statSync(path).mode & 0o777;
17
+ }
18
+ catch {
19
+ return null;
20
+ }
21
+ }
22
+ /**
23
+ * Replace `path` with `content` atomically.
24
+ *
25
+ * @param targetMode - when present, force the replacement to this mode while
26
+ * preserving the original mode on the backup.
27
+ */
28
+ export function writeConfigFileAtomically(path, content, defaultMode, targetMode) {
29
+ const directory = dirname(path);
30
+ mkdirSync(directory, { recursive: true });
31
+ const previousMode = existingMode(path);
32
+ const created = previousMode === null;
33
+ const mode = targetMode ?? previousMode ?? defaultMode;
34
+ let backupPath = null;
35
+ if (!created) {
36
+ backupPath = `${path}${BACKUP_SUFFIX}`;
37
+ copyFileSync(path, backupPath);
38
+ chmodSync(backupPath, previousMode ?? defaultMode);
39
+ }
40
+ // Same directory as the target: `rename` is only atomic within a filesystem.
41
+ const temporaryPath = join(directory, `.${Date.now().toString(36)}-${process.pid}.agentteams-tmp`);
42
+ try {
43
+ writeFileSync(temporaryPath, content, { encoding: 'utf-8', mode });
44
+ chmodSync(temporaryPath, mode);
45
+ renameSync(temporaryPath, path);
46
+ }
47
+ catch (error) {
48
+ try {
49
+ unlinkSync(temporaryPath);
50
+ }
51
+ catch {
52
+ // The temp file may never have been created; the original is untouched either way.
53
+ }
54
+ throw error;
55
+ }
56
+ return { path, backupPath, created, mode };
57
+ }
58
+ //# sourceMappingURL=atomicWrite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicWrite.js","sourceRoot":"","sources":["../../src/mcp-registration/atomicWrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;GAKG;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAElD,wFAAwF;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAC1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC;AAU7C,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,U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CAAC;AAC7C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { McpClientDefinition, McpClientId } from './types.js';
2
+ export declare const MCP_CLIENTS: McpClientDefinition[];
3
+ export declare function findClient(clientId: string): McpClientDefinition | undefined;
4
+ export declare function listClientIds(): McpClientId[];
5
+ //# sourceMappingURL=clients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../src/mcp-registration/clients.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAiC,MAAM,YAAY,CAAC;AA+ClG,eAAO,MAAM,WAAW,EAAE,mBAAmB,EA+P5C,CAAC;AAEF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE5E;AAED,wBAAgB,aAAa,IAAI,WAAW,EAAE,CAE7C"}