@bragduck/mcp 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.js +1856 -117
  2. package/dist/index.js.map +1 -1
  3. package/package.json +6 -4
  4. package/dist/api-client.d.ts +0 -29
  5. package/dist/api-client.js +0 -146
  6. package/dist/api-client.js.map +0 -1
  7. package/dist/auth.d.ts +0 -8
  8. package/dist/auth.js +0 -202
  9. package/dist/auth.js.map +0 -1
  10. package/dist/credentials.d.ts +0 -31
  11. package/dist/credentials.js +0 -150
  12. package/dist/credentials.js.map +0 -1
  13. package/dist/index.d.ts +0 -2
  14. package/dist/org-preference.d.ts +0 -7
  15. package/dist/org-preference.js +0 -22
  16. package/dist/org-preference.js.map +0 -1
  17. package/dist/tools/link-brag-to-key-result.d.ts +0 -30
  18. package/dist/tools/link-brag-to-key-result.js +0 -81
  19. package/dist/tools/link-brag-to-key-result.js.map +0 -1
  20. package/dist/tools/list-brags.d.ts +0 -53
  21. package/dist/tools/list-brags.js +0 -110
  22. package/dist/tools/list-brags.js.map +0 -1
  23. package/dist/tools/list-objectives.d.ts +0 -15
  24. package/dist/tools/list-objectives.js +0 -66
  25. package/dist/tools/list-objectives.js.map +0 -1
  26. package/dist/tools/list-organisations.d.ts +0 -15
  27. package/dist/tools/list-organisations.js +0 -73
  28. package/dist/tools/list-organisations.js.map +0 -1
  29. package/dist/tools/log-brag.d.ts +0 -88
  30. package/dist/tools/log-brag.js +0 -175
  31. package/dist/tools/log-brag.js.map +0 -1
  32. package/dist/tools/log-story.d.ts +0 -76
  33. package/dist/tools/log-story.js +0 -116
  34. package/dist/tools/log-story.js.map +0 -1
  35. package/dist/tools/login.d.ts +0 -24
  36. package/dist/tools/login.js +0 -46
  37. package/dist/tools/login.js.map +0 -1
  38. package/dist/tools/preview-brag.d.ts +0 -71
  39. package/dist/tools/preview-brag.js +0 -103
  40. package/dist/tools/preview-brag.js.map +0 -1
  41. package/dist/tools/quick-brag.d.ts +0 -38
  42. package/dist/tools/quick-brag.js +0 -143
  43. package/dist/tools/quick-brag.js.map +0 -1
  44. package/dist/tools/save-org-preference.d.ts +0 -30
  45. package/dist/tools/save-org-preference.js +0 -47
  46. package/dist/tools/save-org-preference.js.map +0 -1
@@ -1,110 +0,0 @@
1
- import { apiRequest, requirePaidPlan } from '../api-client.js';
2
- export const listBragsTool = {
3
- name: 'list_brags',
4
- description: 'List recent brags (career achievements) from BragDuck. ' +
5
- 'Use this to review past accomplishments, find brags to link to keyResults, or check recent entries.',
6
- inputSchema: {
7
- type: 'object',
8
- properties: {
9
- limit: {
10
- type: 'number',
11
- description: 'Number of brags to return (default: 10, max: 100)',
12
- },
13
- search: {
14
- type: 'string',
15
- description: 'Search term to filter brags by title or description',
16
- },
17
- tags: {
18
- type: 'array',
19
- items: { type: 'string' },
20
- description: 'Filter brags by tags',
21
- },
22
- date_from: {
23
- type: 'string',
24
- description: 'Filter brags from this date (YYYY-MM-DD)',
25
- },
26
- date_to: {
27
- type: 'string',
28
- description: 'Filter brags up to this date (YYYY-MM-DD)',
29
- },
30
- sort: {
31
- type: 'string',
32
- enum: ['date_asc', 'date_desc', 'title_asc', 'title_desc', 'created_asc', 'created_desc'],
33
- description: 'Sort order (default: date_desc)',
34
- },
35
- },
36
- },
37
- };
38
- const IMPACT_LABELS = {
39
- 0: 'None',
40
- 1: 'Low',
41
- 2: 'Medium',
42
- 3: 'High',
43
- };
44
- export async function handleListBrags(input) {
45
- const planError = await requirePaidPlan();
46
- if (planError)
47
- return planError;
48
- try {
49
- const params = {
50
- limit: String(input.limit || 10),
51
- offset: '0',
52
- };
53
- if (input.search)
54
- params.search = input.search;
55
- if (input.tags && input.tags.length > 0)
56
- params['tags[]'] = input.tags;
57
- if (input.date_from)
58
- params.date_from = input.date_from;
59
- if (input.date_to)
60
- params.date_to = input.date_to;
61
- if (input.sort)
62
- params.sort = input.sort;
63
- const response = await apiRequest('/v1/brags', { params });
64
- if (response.brags.length === 0) {
65
- return {
66
- content: [{ type: 'text', text: 'No brags found.' }],
67
- };
68
- }
69
- const lines = response.brags.map((brag) => {
70
- const tags = brag.tags.length > 0 ? ` [${brag.tags.join(', ')}]` : '';
71
- const date = new Date(brag.date).toLocaleDateString();
72
- const impact = `Impact: ${IMPACT_LABELS[brag.impactLevel ?? 0] ?? (brag.impactLevel ?? 0)}`;
73
- const type = brag.type ? ` | Type: ${brag.type}` : '';
74
- const keyResultNote = brag.keyResultIds?.length > 0
75
- ? `\n Linked to key result: ${brag.keyResultIds[0]}`
76
- : '';
77
- const impactDesc = brag.impactDescription ? `\n Impact: ${brag.impactDescription}` : '';
78
- return (`- **${brag.title}** (ID: ${brag.id}, ${date})${tags}\n` +
79
- ` ${impact}${type}` +
80
- impactDesc +
81
- keyResultNote +
82
- `\n ${brag.description.slice(0, 150)}${brag.description.length > 150 ? '...' : ''}` +
83
- `\n View: ${brag.url}`);
84
- });
85
- const { total, has_more } = response.pagination;
86
- const summary = `Found ${total} brags (showing ${response.brags.length}${has_more ? ', more available' : ''}):`;
87
- return {
88
- content: [{ type: 'text', text: `${summary}\n\n${lines.join('\n\n')}` }],
89
- };
90
- }
91
- catch (error) {
92
- if (error instanceof Error && (error.message === 'NOT_AUTHENTICATED' || error.message === 'TOKEN_EXPIRED')) {
93
- return {
94
- content: [{
95
- type: 'text',
96
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
97
- }],
98
- isError: true,
99
- };
100
- }
101
- return {
102
- content: [{
103
- type: 'text',
104
- text: `Failed to list brags: ${error instanceof Error ? error.message : String(error)}`,
105
- }],
106
- isError: true,
107
- };
108
- }
109
- }
110
- //# sourceMappingURL=list-brags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-brags.js","sourceRoot":"","sources":["../../src/tools/list-brags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/D,MAAM,CAAC,M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AAK,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,mBAAmB,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,CAAC,EAAE,CAAC;YAC3G,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,sEAAsE;qBAC7E,CAAC;gBACF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;iBACxF,CAAC;YACF,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,15 +0,0 @@
1
- export declare const listObjectivesTool: {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: {};
7
- };
8
- };
9
- export declare function handleListObjectives(): Promise<{
10
- content: Array<{
11
- type: string;
12
- text: string;
13
- }>;
14
- isError?: boolean;
15
- }>;
@@ -1,66 +0,0 @@
1
- import { apiRequest, requirePaidPlan } from '../api-client.js';
2
- import { getUserInfo } from '../credentials.js';
3
- export const listObjectivesTool = {
4
- name: 'list_objectives',
5
- description: 'List OKRs (Objectives and Key Results) from BragDuck. ' +
6
- 'Use this to see current keyResults and their IDs, which can be used to link brags to specific keyResults.',
7
- inputSchema: {
8
- type: 'object',
9
- properties: {},
10
- },
11
- };
12
- export async function handleListObjectives() {
13
- const planError = await requirePaidPlan();
14
- if (planError)
15
- return planError;
16
- try {
17
- const userInfo = getUserInfo();
18
- if (!userInfo) {
19
- return {
20
- content: [{
21
- type: 'text',
22
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
23
- }],
24
- isError: true,
25
- };
26
- }
27
- const response = await apiRequest(`/v1/users/${userInfo.id}/objectives`);
28
- if (response.items.length === 0) {
29
- return {
30
- content: [{ type: 'text', text: 'No objectives found.' }],
31
- };
32
- }
33
- const lines = response.items.map((obj) => {
34
- const keyResults = obj.keyResults
35
- .map((g) => ` - ${g.label} (KeyResult ID: ${g.id}, status: ${g.status})`)
36
- .join('\n');
37
- const category = obj.category ? ` [${obj.category}]` : '';
38
- return `- **${obj.title}** (ID: ${obj.id}, status: ${obj.status})${category}\n${keyResults || ' (no keyResults)'}`;
39
- });
40
- return {
41
- content: [{
42
- type: 'text',
43
- text: `Found ${response.total} objectives:\n\n${lines.join('\n\n')}`,
44
- }],
45
- };
46
- }
47
- catch (error) {
48
- if (error instanceof Error && (error.message === 'NOT_AUTHENTICATED' || error.message === 'TOKEN_EXPIRED')) {
49
- return {
50
- content: [{
51
- type: 'text',
52
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
53
- }],
54
- isError: true,
55
- };
56
- }
57
- return {
58
- content: [{
59
- type: 'text',
60
- text: `Failed to list objectives: ${error instanceof Error ? error.message : String(error)}`,
61
- }],
62
- isError: true,
63
- };
64
- }
65
- }
66
- //# sourceMappingURL=list-objectives.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-objectives.js","sourceRoot":"","sources":["../../src/tools/list-objectives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,wDAAwD;QACxD,2GAA2G;IAC7G,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE,EAAE;KACf;CACF,CAAC;AAOF,MAAM,CAAC,KAAK,UAAU,oBAAoB;IAIxC,MAAM,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;IAC1C,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC;IAEhC,IAAI,CAAC;QACH,M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C,EAAE;iBACrE,CAAC;SACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,mBAAmB,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,CAAC,EAAE,CAAC;YAC3G,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,sEAAsE;qBAC7E,CAAC;gBACF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;iBAC7F,CAAC;YACF,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,15 +0,0 @@
1
- export declare const listOrganisationsTool: {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: {};
7
- };
8
- };
9
- export declare function handleListOrganisations(): Promise<{
10
- content: Array<{
11
- type: string;
12
- text: string;
13
- }>;
14
- isError?: boolean;
15
- }>;
@@ -1,73 +0,0 @@
1
- import { apiRequest, requirePaidPlan } from '../api-client.js';
2
- import { getUserInfo } from '../credentials.js';
3
- import { getOrgPreference } from '../org-preference.js';
4
- export const listOrganisationsTool = {
5
- name: 'list_organisations',
6
- description: 'List the user\'s organisations (companies) from BragDuck. ' +
7
- 'Also returns the saved organisation preference for the current working directory, if any. ' +
8
- 'Use this before logging a brag to determine which company to associate it with.',
9
- inputSchema: {
10
- type: 'object',
11
- properties: {},
12
- },
13
- };
14
- export async function handleListOrganisations() {
15
- const planError = await requirePaidPlan();
16
- if (planError)
17
- return planError;
18
- try {
19
- const userInfo = getUserInfo();
20
- if (!userInfo) {
21
- return {
22
- content: [{
23
- type: 'text',
24
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
25
- }],
26
- isError: true,
27
- };
28
- }
29
- const response = await apiRequest(`/v1/users/${userInfo.id}/organisations`);
30
- if (response.items.length === 0) {
31
- return {
32
- content: [{
33
- type: 'text',
34
- text: 'No organisations found. You can add companies in the BragDuck web app.',
35
- }],
36
- };
37
- }
38
- const cwd = process.cwd();
39
- const saved = getOrgPreference(cwd);
40
- const lines = response.items.map((org) => {
41
- const status = org.current ? 'current' : 'former';
42
- return `- **${org.name}** (ID: ${org.id}, role: ${org.role}, ${status})`;
43
- });
44
- const savedLine = saved
45
- ? `\nSaved preference for this directory: **${saved.orgName}** (ID: ${saved.orgId})`
46
- : '\nNo saved preference for this directory.';
47
- return {
48
- content: [{
49
- type: 'text',
50
- text: `Found ${response.items.length} organisation(s):\n\n${lines.join('\n')}${savedLine}`,
51
- }],
52
- };
53
- }
54
- catch (error) {
55
- if (error instanceof Error && (error.message === 'NOT_AUTHENTICATED' || error.message === 'TOKEN_EXPIRED')) {
56
- return {
57
- content: [{
58
- type: 'text',
59
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
60
- }],
61
- isError: true,
62
- };
63
- }
64
- return {
65
- content: [{
66
- type: 'text',
67
- text: `Failed to list organisations: ${error instanceof Error ? error.message : String(error)}`,
68
- }],
69
- isError: true,
70
- };
71
- }
72
- }
73
- //# sourceMappingURL=list-organisations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-organisations.js","sourceRoot":"","sources":["../../src/tools/list-organisations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAexD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,4D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KAAK;YACrB,CAAC,CAAC,4CAA4C,KAAK,CAAC,OAAO,WAAW,KAAK,CAAC,KAAK,GAAG;YACpF,CAAC,CAAC,2CAA2C,CAAC;QAEhD,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS,QAAQ,CAAC,KAAK,CAAC,MAAM,wBAAwB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,EAAE;iBAC3F,CAAC;SACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,mBAAmB,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,CAAC,EAAE,CAAC;YAC3G,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,sEAAsE;qBAC7E,CAAC;gBACF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;iBAChG,CAAC;YACF,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,88 +0,0 @@
1
- export declare const logBragTool: {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: {
7
- title: {
8
- type: string;
9
- minLength: number;
10
- maxLength: number;
11
- description: string;
12
- };
13
- description: {
14
- type: string;
15
- minLength: number;
16
- maxLength: number;
17
- description: string;
18
- };
19
- tags: {
20
- type: string;
21
- items: {
22
- type: string;
23
- minLength: number;
24
- maxLength: number;
25
- };
26
- maxItems: number;
27
- description: string;
28
- };
29
- date: {
30
- type: string;
31
- description: string;
32
- };
33
- impact_level: {
34
- type: string;
35
- enum: number[];
36
- description: string;
37
- };
38
- impact_description: {
39
- type: string;
40
- description: string;
41
- };
42
- type: {
43
- type: string;
44
- enum: string[];
45
- description: string;
46
- };
47
- references: {
48
- type: string;
49
- items: {
50
- type: string;
51
- format: string;
52
- };
53
- maxItems: number;
54
- description: string;
55
- };
56
- orgId: {
57
- type: string;
58
- description: string;
59
- };
60
- agent: {
61
- type: string;
62
- maxLength: number;
63
- description: string;
64
- };
65
- };
66
- required: string[];
67
- };
68
- };
69
- interface LogBragInput {
70
- title: string;
71
- description: string;
72
- type: string;
73
- impact_level: number;
74
- impact_description: string;
75
- tags?: string[];
76
- date?: string;
77
- references?: string[];
78
- orgId?: string;
79
- agent?: string;
80
- }
81
- export declare function handleLogBrag(input: LogBragInput): Promise<{
82
- content: Array<{
83
- type: string;
84
- text: string;
85
- }>;
86
- isError?: boolean;
87
- }>;
88
- export {};
@@ -1,175 +0,0 @@
1
- import { apiRequest, requirePaidPlan } from '../api-client.js';
2
- export const logBragTool = {
3
- name: 'log_brag',
4
- description: 'Persist a career achievement (brag) to BragDuck. ' +
5
- 'Call this in the same response as the preview table — the tool permission prompt (Allow/Deny) ' +
6
- 'that appears to the user IS the confirmation. Do not ask the user to type anything.',
7
- inputSchema: {
8
- type: 'object',
9
- properties: {
10
- title: {
11
- type: 'string',
12
- minLength: 10,
13
- maxLength: 200,
14
- description: 'Short title of the achievement (must be 10-200 characters)',
15
- },
16
- description: {
17
- type: 'string',
18
- minLength: 50,
19
- maxLength: 2000,
20
- description: 'Detailed description of what was accomplished and its impact (must be 50-2000 characters)',
21
- },
22
- tags: {
23
- type: 'array',
24
- items: { type: 'string', minLength: 2, maxLength: 30 },
25
- maxItems: 10,
26
- description: 'Tags to categorize the brag (e.g., "performance", "leadership", "backend"). Each tag must be 2-30 characters. Maximum 10 tags.',
27
- },
28
- date: {
29
- type: 'string',
30
- description: 'ISO datetime string for when this happened (defaults to now)',
31
- },
32
- impact_level: {
33
- type: 'number',
34
- enum: [0, 1, 2, 3],
35
- description: 'Impact level of the achievement. ' +
36
- '0 = none (personal learning, routine tasks). ' +
37
- '1 = low (individual contributor impact, fixed small bug). ' +
38
- '2 = medium (team-level impact, improved team process, led project). ' +
39
- '3 = high (organization-level impact, reduced costs, improved key metrics).',
40
- },
41
- impact_description: {
42
- type: 'string',
43
- description: 'Narrative description of the impact. ' +
44
- 'Start with scope (Individual/Team/Organization/Company-wide), ' +
45
- 'then include 1-3 measurable outcomes. ' +
46
- 'Example: "Team impact: Reduced deploy time by 60%, unblocking 4 engineers"',
47
- },
48
- type: {
49
- type: 'string',
50
- enum: [
51
- 'progress',
52
- 'achievement',
53
- 'recognition',
54
- 'support',
55
- 'code',
56
- 'leadership',
57
- 'learning',
58
- 'collaboration',
59
- 'challenge',
60
- 'innovation',
61
- 'meeting',
62
- 'bug',
63
- 'others',
64
- ],
65
- description: 'Type of achievement. Choose the most appropriate category for this brag.',
66
- },
67
- references: {
68
- type: 'array',
69
- items: { type: 'string', format: 'uri' },
70
- maxItems: 10,
71
- description: 'URLs to reference materials for this achievement. ' +
72
- 'Include any relevant links that provide context or proof: ' +
73
- 'pull request URLs, Jira/Linear tickets, commit URLs, design docs, Notion pages, etc. ' +
74
- 'Example: ["https://github.com/org/repo/pull/123", "https://jira.company.com/browse/PROJ-456"]',
75
- },
76
- orgId: {
77
- type: 'string',
78
- description: 'Organisation ID to associate the brag with',
79
- },
80
- agent: {
81
- type: 'string',
82
- maxLength: 50,
83
- description: 'Optional AI agent/client name for MCP-origin brags, e.g. "claude", "codex", "cursor", or "copilot".',
84
- },
85
- },
86
- required: ['title', 'description', 'type', 'impact_level', 'impact_description', 'references'],
87
- },
88
- };
89
- function toAgentExternalType(agent) {
90
- if (!agent)
91
- return undefined;
92
- const normalized = agent
93
- .trim()
94
- .toLowerCase()
95
- .replace(/\s+/g, '-')
96
- .replace(/[^a-z0-9_-]/g, '');
97
- if (normalized.length === 0)
98
- return undefined;
99
- return `agent:${normalized.slice(0, 50)}`;
100
- }
101
- export async function handleLogBrag(input) {
102
- const planError = await requirePaidPlan();
103
- if (planError)
104
- return planError;
105
- try {
106
- const brag = {
107
- title: input.title,
108
- message: input.description,
109
- description: input.description,
110
- tags: input.tags || [],
111
- date: input.date || new Date().toISOString(),
112
- visibility: 'private',
113
- };
114
- if (input.impact_level !== undefined)
115
- brag.impactLevel = input.impact_level;
116
- if (input.impact_description)
117
- brag.impact_description = input.impact_description;
118
- if (input.type)
119
- brag.typeKey = input.type;
120
- if (input.references && input.references.length > 0)
121
- brag.attachments = input.references;
122
- if (input.orgId)
123
- brag.orgId = input.orgId;
124
- const agentExternalType = toAgentExternalType(input.agent);
125
- if (agentExternalType)
126
- brag.externalType = agentExternalType;
127
- const response = await apiRequest('/v1/brags', {
128
- method: 'POST',
129
- body: { brags: [brag], source: 'mcp' },
130
- });
131
- if (response.brags && response.brags.length > 0) {
132
- const created = response.brags[0];
133
- const lines = [`Brag logged: "${created.title}"\nView it at: ${created.url}`];
134
- if (created.keyResultIds && created.keyResultIds.length > 0) {
135
- lines.push(`Automatically linked to key result: ${created.keyResultIds[0]}`);
136
- }
137
- return {
138
- content: [{
139
- type: 'text',
140
- text: lines.join('\n'),
141
- }],
142
- };
143
- }
144
- // Creation failed — surface the first error message from the server
145
- const firstError = response.errors && response.errors.length > 0
146
- ? response.errors[0].message
147
- : 'Server returned no brag and no error detail';
148
- return {
149
- content: [{
150
- type: 'text',
151
- text: `Failed to create brag: ${firstError}`,
152
- }],
153
- isError: true,
154
- };
155
- }
156
- catch (error) {
157
- if (error instanceof Error && (error.message === 'NOT_AUTHENTICATED' || error.message === 'TOKEN_EXPIRED')) {
158
- return {
159
- content: [{
160
- type: 'text',
161
- text: 'Not authenticated with BragDuck. Please call the "login" tool first.',
162
- }],
163
- isError: true,
164
- };
165
- }
166
- return {
167
- content: [{
168
- type: 'text',
169
- text: `Failed to create brag: ${error instanceof Error ? error.message : String(error)}`,
170
- }],
171
- isError: true,
172
- };
173
- }
174
- }
175
- //# sourceMappingURL=log-brag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log-brag.js","sourceRoot":"","sources":["../../src/tools/log-brag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,mDAAmD;QACnD,gGAAgG;QAChG,qFAAqF;IACvF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,GAAG;gBACd,WAAW,EAAE,4DAA4D;aAC1E;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,2FAA2F;aACzG;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;gBACtD,QAAQ,EAAE,EAAE;gBACZ,WAAW,EAAE,gIAAgI;aAC9I;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8DAA8D;aAC5E;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBAClB,WAAW,EACT,mCAAmC;oBACnC,+CAA+C;oBAC/C,4DAA4D;oBAC5D,sEAAsE;oBACtE,4EAA4E;aAC/E;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,uCAAuC;oBACvC,gEAAgE;oBAChE,wCAAwC;oBACxC,4EAA4E;aAC/E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EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;iBACzF,CAAC;YACF,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,76 +0,0 @@
1
- export declare const logStoryTool: {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: {
7
- title: {
8
- type: string;
9
- minLength: number;
10
- maxLength: number;
11
- description: string;
12
- };
13
- situation: {
14
- type: string;
15
- minLength: number;
16
- description: string;
17
- };
18
- task: {
19
- type: string;
20
- minLength: number;
21
- description: string;
22
- };
23
- action: {
24
- type: string;
25
- minLength: number;
26
- description: string;
27
- };
28
- result: {
29
- type: string;
30
- minLength: number;
31
- description: string;
32
- };
33
- competencies: {
34
- type: string;
35
- items: {
36
- type: string;
37
- minLength: number;
38
- maxLength: number;
39
- };
40
- maxItems: number;
41
- description: string;
42
- };
43
- bragIds: {
44
- type: string;
45
- items: {
46
- type: string;
47
- };
48
- maxItems: number;
49
- description: string;
50
- };
51
- orgId: {
52
- type: string;
53
- description: string;
54
- };
55
- };
56
- required: string[];
57
- };
58
- };
59
- interface LogStoryInput {
60
- title: string;
61
- situation: string;
62
- task: string;
63
- action: string;
64
- result: string;
65
- competencies?: string[];
66
- bragIds?: string[];
67
- orgId?: string;
68
- }
69
- export declare function handleLogStory(input: LogStoryInput): Promise<{
70
- content: Array<{
71
- type: string;
72
- text: string;
73
- }>;
74
- isError?: boolean;
75
- }>;
76
- export {};