paput-mcp 4.2.21 → 4.2.22
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 +6 -7
- package/dist/cli/rules/paput-knowledge-capture.md +1 -1
- package/dist/handlers/add-knowledge-candidates/tool.js +1 -1
- package/dist/handlers/add-knowledge-candidates/tool.js.map +1 -1
- package/dist/handlers/create-memos/tool.js +1 -1
- package/dist/handlers/create-memos/tool.js.map +1 -1
- package/dist/handlers/get-dashboard-analysis-context/handler.js +1 -1
- package/dist/handlers/get-skill-sheet/handler.js +20 -23
- package/dist/handlers/get-skill-sheet/handler.js.map +1 -1
- package/dist/handlers/get-skill-sheet-project-episodes-context/handler.js +128 -0
- package/dist/handlers/get-skill-sheet-project-episodes-context/handler.js.map +1 -0
- package/dist/handlers/get-skill-sheet-project-episodes-context/index.js +2 -0
- package/dist/handlers/get-skill-sheet-project-episodes-context/index.js.map +1 -0
- package/dist/handlers/get-skill-sheet-project-episodes-context/tool.js +19 -0
- package/dist/handlers/get-skill-sheet-project-episodes-context/tool.js.map +1 -0
- package/dist/handlers/index.js +2 -4
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/save-pending-candidate/tool.js +1 -1
- package/dist/handlers/save-pending-candidate/tool.js.map +1 -1
- package/dist/handlers/search-memo/tool.js +2 -2
- package/dist/handlers/search-memo/tool.js.map +1 -1
- package/dist/handlers/update-memo/tool.js +1 -1
- package/dist/handlers/update-memo/tool.js.map +1 -1
- package/dist/handlers/update-pending-candidate/tool.js +1 -1
- package/dist/handlers/update-pending-candidate/tool.js.map +1 -1
- package/dist/handlers/update-skill-sheet-project-episodes/handler.js +99 -0
- package/dist/handlers/update-skill-sheet-project-episodes/handler.js.map +1 -0
- package/dist/handlers/update-skill-sheet-project-episodes/index.js +2 -0
- package/dist/handlers/update-skill-sheet-project-episodes/index.js.map +1 -0
- package/dist/handlers/update-skill-sheet-project-episodes/tool.js +58 -0
- package/dist/handlers/update-skill-sheet-project-episodes/tool.js.map +1 -0
- package/dist/handlers/upsert-skill-sheet-project/handler.js +6 -0
- package/dist/handlers/upsert-skill-sheet-project/handler.js.map +1 -1
- package/dist/handlers/upsert-skill-sheet-project/tool.js +9 -0
- package/dist/handlers/upsert-skill-sheet-project/tool.js.map +1 -1
- package/dist/plugin/skills/capture/SKILL.md +6 -6
- package/dist/plugin/skills/dashboard-analysis/SKILL.md +1 -1
- package/dist/plugin/skills/harvest/SKILL.md +5 -5
- package/dist/plugin/skills/principle-synthesizer/SKILL.md +7 -7
- package/dist/plugin/skills/project-episodes/SKILL.md +60 -0
- package/dist/plugin/skills/self-pr-draft/SKILL.md +37 -0
- package/dist/schemas/tool-input.js +42 -67
- package/dist/schemas/tool-input.js.map +1 -1
- package/dist/services/api/skill-sheet.js +3 -9
- package/dist/services/api/skill-sheet.js.map +1 -1
- package/dist/tool.js +3 -5
- package/dist/tool.js.map +1 -1
- package/docs/reviewer-guide.md +1 -1
- package/docs/tools.md +15 -21
- package/docs/usage-examples.md +28 -9
- package/package.json +1 -1
- package/dist/plugin/skills/project-summary/SKILL.md +0 -43
- package/dist/plugin/skills/public-profile-summary/SKILL.md +0 -73
package/README.md
CHANGED
|
@@ -142,8 +142,8 @@ Generated skills:
|
|
|
142
142
|
- `paput-analyze-discard-policy` - Analyze discarded candidates and save a capture policy used by future captures.
|
|
143
143
|
- `paput-dashboard-analysis` - Analyze PaPut dashboard context and optionally save the generated dashboard analysis.
|
|
144
144
|
- `paput-project-document` - Save a project-specific design decision or repeatable procedure as a PaPut project document.
|
|
145
|
-
- `paput-project-
|
|
146
|
-
- `paput-
|
|
145
|
+
- `paput-project-episodes` - Draft and optionally save design-and-judgment episodes for a skill sheet project.
|
|
146
|
+
- `paput-self-pr-draft` - Draft the skill sheet self PR and save it only after explicit approval.
|
|
147
147
|
|
|
148
148
|
For Claude Desktop, export skill ZIP files and upload them from
|
|
149
149
|
`Customize > Skills`:
|
|
@@ -229,13 +229,11 @@ Detailed public tool documentation is available in [docs/tools.md](docs/tools.md
|
|
|
229
229
|
- `paput_get_skill_sheet` - Get the full skill sheet.
|
|
230
230
|
- `paput_update_skill_sheet_basic_info` - Update basic profile fields.
|
|
231
231
|
- `paput_update_skill_sheet_self_pr` - Update the self PR section.
|
|
232
|
-
- `paput_update_skill_sheet_public_profile` - Save the AI-generated public profile (headline, summary, strength labels, and project highlights) shown on the AI Summary tab.
|
|
233
232
|
- `paput_set_skill_sheet_skills` - Replace the full skill list with the provided final state.
|
|
234
|
-
- `paput_upsert_skill_sheet_project` - Add or update a skill sheet project.
|
|
233
|
+
- `paput_upsert_skill_sheet_project` - Add or update a skill sheet project, including optional achievement bullets.
|
|
235
234
|
- `paput_delete_skill_sheet_project` - Delete a skill sheet project.
|
|
236
|
-
- `
|
|
237
|
-
- `
|
|
238
|
-
- `paput_get_public_profile_context` - Get public materials so the MCP client AI model can generate a public profile summary.
|
|
235
|
+
- `paput_get_skill_sheet_project_episodes_context` - Get project information and public linked memo bodies so the MCP client AI model can draft design-and-judgment episodes.
|
|
236
|
+
- `paput_update_skill_sheet_project_episodes` - Full-replace the generated project episodes after explicit user approval.
|
|
239
237
|
|
|
240
238
|
### Goal Management
|
|
241
239
|
|
|
@@ -294,6 +292,7 @@ Write and destructive tools should be used only when the user intent is clear. I
|
|
|
294
292
|
|
|
295
293
|
- `paput_save_pending_candidate` requires explicit user approval to save a pending candidate to PaPut.
|
|
296
294
|
- `paput_delete_skill_sheet_project` should be used only when the user intends to delete a project.
|
|
295
|
+
- `paput_update_skill_sheet_project_episodes` should be used only after the MCP client AI model has drafted project episodes and the user intends to save them.
|
|
297
296
|
- `paput_delete_goal` should be used only when the user intends to delete a goal.
|
|
298
297
|
- `paput_set_skill_sheet_skills` replaces the full skill list and should be used only when the desired final list is known.
|
|
299
298
|
- `paput_update_dashboard_analysis` should be used only after the MCP client AI model has generated an analysis and the user intends to save it.
|
|
@@ -8,7 +8,7 @@ Before adding any candidate to pending, always follow the `paput-capture` workfl
|
|
|
8
8
|
|
|
9
9
|
Only keep technical knowledge, decision criteria, and procedures that can be reused in other projects. Do not keep project-specific specifications, implementation details, operational rules, code, secrets, or customer data.
|
|
10
10
|
|
|
11
|
-
When candidates exist, use the `paput-capture` workflow to check duplicates before adding them: semantically similar existing memos with `paput_find_similar_memos` and existing pending candidates. Classify each candidate by memo type (`knowledge` / `decision` / `operation` / `principle`, multi-label) via `memo_type_keys`; `decision` / `operation` / `principle` are
|
|
11
|
+
When candidates exist, use the `paput-capture` workflow to check duplicates before adding them: semantically similar existing memos with `paput_find_similar_memos` and existing pending candidates. Classify each candidate by memo type (`knowledge` / `decision` / `operation` / `principle`, multi-label) via `memo_type_keys`; `decision` / `operation` / `principle` are material for durable judgment and working-practice summaries, and `knowledge` is commodity. If a candidate is reusable, non-duplicate, non-sensitive, not project-specific, and allowed by the capture policy, add it to pending without waiting for user approval. After adding it, briefly report the title, categories, memo type, and candidate ID.
|
|
12
12
|
|
|
13
13
|
Use `paput_save_pending_candidate` only when the user explicitly approves saving a pending candidate to PaPut.
|
|
14
14
|
|
|
@@ -27,7 +27,7 @@ export const addKnowledgeCandidatesTool = {
|
|
|
27
27
|
type: 'string',
|
|
28
28
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
29
29
|
},
|
|
30
|
-
description: 'Memo type classification keys (a memo can have multiple). decision/operation/principle are the primary material for
|
|
30
|
+
description: 'Memo type classification keys (a memo can have multiple). decision/operation/principle are the primary material for durable judgment and working-practice summaries.',
|
|
31
31
|
},
|
|
32
32
|
confidence: { type: 'number' },
|
|
33
33
|
is_public: { type: 'boolean', default: false },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/add-knowledge-candidates/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,0BAA0B,GAAgB;IACrD,UAAU,EAAE;QACV,IAAI,EAAE,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AE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;oBACzB,WAAW,EAAE,yBAAyB;iBACvC;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,6BAA6B;oBAC1C,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACxB,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;4BACxD,cAAc,EAAE;gCACd,IAAI,EAAE,OAAO;gCACb,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ;oCACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;iCAC1D;gCACD,WAAW,EACT,sKAAsK;6BACzK;4BACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;yBAC/C;wBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;qBAC5B;iBACF;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC;SACjD;KACF;IACD,OAAO,EAAE,4BAA4B;CACtC,CAAC"}
|
|
@@ -32,7 +32,7 @@ const memoInputSchema = {
|
|
|
32
32
|
type: 'string',
|
|
33
33
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
34
34
|
},
|
|
35
|
-
description: 'Memo type classification keys (a memo can have multiple). knowledge: technical know-how (commodity); decision: reusable judgment criteria; operation: observability/eval/test/review practices; principle: explicitly stated
|
|
35
|
+
description: 'Memo type classification keys (a memo can have multiple). knowledge: technical know-how (commodity); decision: reusable judgment criteria; operation: observability/eval/test/review practices; principle: explicitly stated principles. decision/operation/principle are the primary material for durable judgment and working-practice summaries.',
|
|
36
36
|
},
|
|
37
37
|
projects: {
|
|
38
38
|
type: 'array',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/create-memos/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,YAAY;SAC1B;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,WAAW;SACzB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,6BAA6B;YAC1C,OAAO,EAAE,KAAK;SACf;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,8EAA8E;SACjF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE,iBAAiB;SAC/B;QACD,cAAc,EAAE;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;aAC1D;
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/create-memos/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,YAAY;SAC1B;QACD,IAAI,EAAE;YACJ,IAA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EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD,OAAO,EAAE,iBAAiB;CAC3B,CAAC"}
|
|
@@ -95,7 +95,7 @@ function buildPrompt(context) {
|
|
|
95
95
|
const memoTypeLine = `decision ${countOf('decision')}, operation ${countOf('operation')}, principle ${countOf('principle')}, knowledge ${countOf('knowledge')}`;
|
|
96
96
|
return `Create a dashboard analysis as the MCP client AI, using the PaPut data in structuredContent. paput-mcp does not contain analysis logic, so you should read the source data and adapt the analysis to the user's goals and context. Write the final output in the user's language and match the user's tone when possible.
|
|
97
97
|
|
|
98
|
-
Lead with the judgment axis, not raw volume. The durable, hard-to-commoditize part of what the user accumulates is their JUDGMENT and PRACTICE — captured as memo_type: decision (judgment criteria), operation (operating practices: observability, eval, testing, review), and principle (stated
|
|
98
|
+
Lead with the judgment axis, not raw volume. The durable, hard-to-commoditize part of what the user accumulates is their JUDGMENT and PRACTICE — captured as memo_type: decision (judgment criteria), operation (operating practices: observability, eval, testing, review), and principle (stated principles). knowledge is commodity. So assess the user by how thick those three axes are, not by how many memos or categories they have. structuredContent.dashboard_summary.memo_type_counts holds the per-type accumulation.
|
|
99
99
|
|
|
100
100
|
The judgment axis is the LENS, not a replacement for goal analysis. The dashboard's core job is "where am I against my goals", so keep goals first-class: read each active goal THROUGH the axis — which judgment/practice/principle axis that goal requires, and whether it is currently thick or thin. Do not drop the goal overview in favor of axis-only talk.
|
|
101
101
|
|
|
@@ -23,31 +23,36 @@ export async function handleGetSkillSheet(_args, apiClient) {
|
|
|
23
23
|
.map((t) => t.name)
|
|
24
24
|
.join(', ');
|
|
25
25
|
const memoNames = project.memos.map((m) => m.title).join(', ');
|
|
26
|
+
const achievements = project.achievements && project.achievements.length > 0
|
|
27
|
+
? project.achievements
|
|
28
|
+
.map((achievement) => ` - ${achievement}`)
|
|
29
|
+
.join('\n')
|
|
30
|
+
: ' None';
|
|
31
|
+
const episodes = project.episodes && project.episodes.length > 0
|
|
32
|
+
? project.episodes
|
|
33
|
+
.map((episode) => {
|
|
34
|
+
const supportingMemoCount = episode.supporting_memos?.length ??
|
|
35
|
+
episode.supporting_memo_ids?.length ??
|
|
36
|
+
0;
|
|
37
|
+
return ` - ${episode.claim} (supporting memos: ${supportingMemoCount})`;
|
|
38
|
+
})
|
|
39
|
+
.join('\n')
|
|
40
|
+
: ' None';
|
|
26
41
|
return ` 【${project.title}】(ID: ${project.id}, ${projectType})
|
|
27
42
|
Period: ${period}
|
|
28
43
|
Role: ${project.role}
|
|
29
44
|
Scale: ${project.scale}
|
|
30
45
|
Description: ${project.description}
|
|
31
46
|
Technologies: ${techNames || 'None'}
|
|
32
|
-
Memos: ${memoNames || 'None'}
|
|
47
|
+
Memos: ${memoNames || 'None'}
|
|
48
|
+
Achievements:
|
|
49
|
+
${achievements}
|
|
50
|
+
Episodes:
|
|
51
|
+
${episodes}`;
|
|
33
52
|
})
|
|
34
53
|
.join('\n\n')
|
|
35
54
|
: ' None';
|
|
36
55
|
const genderText = GENDER[skillSheet.gender] || `Other`;
|
|
37
|
-
const strengthLabelsText = skillSheet.strength_labels && skillSheet.strength_labels.length > 0
|
|
38
|
-
? skillSheet.strength_labels
|
|
39
|
-
.map((sl) => {
|
|
40
|
-
const parts = [` - ${sl.label}`];
|
|
41
|
-
if (sl.description) {
|
|
42
|
-
parts.push(` ${sl.description}`);
|
|
43
|
-
}
|
|
44
|
-
if (sl.category_names && sl.category_names.length > 0) {
|
|
45
|
-
parts.push(` Categories: ${sl.category_names.join(', ')}`);
|
|
46
|
-
}
|
|
47
|
-
return parts.join('\n');
|
|
48
|
-
})
|
|
49
|
-
.join('\n')
|
|
50
|
-
: ' None';
|
|
51
56
|
const content = `Skill sheet:
|
|
52
57
|
ID: ${skillSheet.id}
|
|
53
58
|
Nearest station: ${skillSheet.nearest_station || 'Not set'}
|
|
@@ -58,14 +63,6 @@ Years of experience: ${skillSheet.years_of_experience} year(s)
|
|
|
58
63
|
Self PR:
|
|
59
64
|
${skillSheet.self_pr || 'Not set'}
|
|
60
65
|
|
|
61
|
-
Public Profile:
|
|
62
|
-
Headline: ${skillSheet.headline || 'Not set'}
|
|
63
|
-
Profile Summary:
|
|
64
|
-
${skillSheet.profile_summary || 'Not set'}
|
|
65
|
-
|
|
66
|
-
Strength Labels:
|
|
67
|
-
${strengthLabelsText}
|
|
68
|
-
|
|
69
66
|
Skills:
|
|
70
67
|
${skillsText}
|
|
71
68
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/get-skill-sheet/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE3E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAA0C,EAC1C,SAAoB;IAEpB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;QAElD,MAAM,UAAU,GACd,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAC1B,CAAC,CAAC,UAAU,CAAC,MAAM;iBACd,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,MAAM,YAAY,GAChB,aAAa,CACX,KAAK,CAAC,aAA2C,CAClD,IAAI,QAAQ,KAAK,CAAC,aAAa,EAAE,CAAC;gBACrC,OAAO,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY,MAAM,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,UAAU,CAAC;YAChG,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;YACf,CAAC,CAAC,QAAQ,CAAC;QAEf,MAAM,YAAY,GAChB,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAC5B,CAAC,CAAC,UAAU,CAAC,QAAQ;iBAChB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBACf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AK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QAE3D,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACvE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uCAAuC;qBAC9C;iBACF;aACF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qCAAqC,YAAY,EAAE;iBAC1D;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { searchMemos } from '../../services/api/memo.js';
|
|
2
|
+
import { getSkillSheet } from '../../services/api/skill-sheet.js';
|
|
3
|
+
const MEMO_PAGE_LIMIT = 100;
|
|
4
|
+
export async function handler(params, apiClient) {
|
|
5
|
+
if (!params || typeof params.project_id !== 'number') {
|
|
6
|
+
return {
|
|
7
|
+
content: [
|
|
8
|
+
{
|
|
9
|
+
type: 'text',
|
|
10
|
+
text: 'Project ID is required',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
isError: true,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const projectId = params.project_id;
|
|
17
|
+
const skillSheet = await getSkillSheet(apiClient);
|
|
18
|
+
const project = skillSheet.projects.find((item) => item.id === projectId);
|
|
19
|
+
if (!project) {
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: `Project was not found: ${projectId}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const publicMemos = await fetchProjectMemos(apiClient, projectId, true);
|
|
31
|
+
const privateMemoCount = await countProjectMemos(apiClient, projectId, false);
|
|
32
|
+
const memoText = publicMemos.length > 0
|
|
33
|
+
? publicMemos
|
|
34
|
+
.map((memo) => {
|
|
35
|
+
const memoTypes = memo.memo_types && memo.memo_types.length > 0
|
|
36
|
+
? memo.memo_types.map((type) => type.key).join(', ')
|
|
37
|
+
: 'none';
|
|
38
|
+
return `---\nID: ${memo.id}\nTitle: ${memo.title}\nTypes: ${memoTypes}\nBody:\n${memo.body}`;
|
|
39
|
+
})
|
|
40
|
+
.join('\n\n')
|
|
41
|
+
: 'None';
|
|
42
|
+
const prompt = `Generate project design-and-judgment episode drafts from the project information and public linked memo bodies in structuredContent. Write the draft in the user's language and match the user's tone when possible. Do not save anything automatically.
|
|
43
|
+
|
|
44
|
+
Project:
|
|
45
|
+
ID: ${project.id}
|
|
46
|
+
Title: ${project.title}
|
|
47
|
+
Description: ${project.description}
|
|
48
|
+
Role: ${project.role}
|
|
49
|
+
Scale: ${project.scale}
|
|
50
|
+
Technologies: ${project.technologies.map((technology) => technology.name).join(', ') || 'None'}
|
|
51
|
+
Achievements: ${(project.achievements ?? []).join('; ') || 'None'}
|
|
52
|
+
Existing episodes: ${(project.episodes ?? []).length}
|
|
53
|
+
|
|
54
|
+
Public linked memos:
|
|
55
|
+
${memoText}
|
|
56
|
+
|
|
57
|
+
Private linked memo count: ${privateMemoCount}
|
|
58
|
+
|
|
59
|
+
Episode requirements:
|
|
60
|
+
- Generate 2-3 episodes when the material supports them; generate fewer, or none, when the public memos are thin.
|
|
61
|
+
- Prefer decision and operation memos. Use knowledge memos only as background.
|
|
62
|
+
- Each episode must have claim, situation, decision, reason, and supporting_memo_ids.
|
|
63
|
+
- The claim is the visible lead line. Keep it understandable to a recruiter or interviewer, and preserve the meaningful contrast ("chose B over A") when the source material supports it.
|
|
64
|
+
- Keep situation, decision, and reason to 1-2 sentences each.
|
|
65
|
+
- supporting_memo_ids must use only IDs from the public linked memos above. Never invent IDs and never use private memo IDs.
|
|
66
|
+
- Do not claim anything that is not backed by at least one public linked memo.
|
|
67
|
+
- Do not treat memo count as proof of ability.
|
|
68
|
+
- If the material is too thin, report what is missing instead of forcing episodes.
|
|
69
|
+
|
|
70
|
+
Present the draft to the user first. Save only after the user explicitly approves it by calling paput_update_skill_sheet_project_episodes with project_id and the approved episodes. Report any dropped_ids from the save response.`;
|
|
71
|
+
return {
|
|
72
|
+
structuredContent: {
|
|
73
|
+
project,
|
|
74
|
+
public_memos: publicMemos,
|
|
75
|
+
private_memo_count: privateMemoCount,
|
|
76
|
+
prompt,
|
|
77
|
+
},
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: 'text',
|
|
81
|
+
text: `Project episodes context:
|
|
82
|
+
Project: ${project.title} (ID: ${project.id})
|
|
83
|
+
Current episode count: ${(project.episodes ?? []).length}
|
|
84
|
+
Current achievement count: ${(project.achievements ?? []).length}
|
|
85
|
+
Public linked memo count: ${publicMemos.length}
|
|
86
|
+
Private linked memo count: ${privateMemoCount}
|
|
87
|
+
|
|
88
|
+
${prompt}`,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async function fetchProjectMemos(apiClient, projectId, isPublic) {
|
|
94
|
+
const memos = [];
|
|
95
|
+
let page = 1;
|
|
96
|
+
let total;
|
|
97
|
+
do {
|
|
98
|
+
const result = await searchMemos(apiClient, {
|
|
99
|
+
project_id: projectId,
|
|
100
|
+
is_public: isPublic,
|
|
101
|
+
page,
|
|
102
|
+
limit: MEMO_PAGE_LIMIT,
|
|
103
|
+
});
|
|
104
|
+
if (!result.success) {
|
|
105
|
+
throw new Error(result.error || 'Failed to search project memos');
|
|
106
|
+
}
|
|
107
|
+
const pageMemos = result.memos || [];
|
|
108
|
+
memos.push(...pageMemos);
|
|
109
|
+
total = result.total;
|
|
110
|
+
if (pageMemos.length === 0)
|
|
111
|
+
break;
|
|
112
|
+
page += 1;
|
|
113
|
+
} while (total === undefined || memos.length < total);
|
|
114
|
+
return memos;
|
|
115
|
+
}
|
|
116
|
+
async function countProjectMemos(apiClient, projectId, isPublic) {
|
|
117
|
+
const result = await searchMemos(apiClient, {
|
|
118
|
+
project_id: projectId,
|
|
119
|
+
is_public: isPublic,
|
|
120
|
+
page: 1,
|
|
121
|
+
limit: 1,
|
|
122
|
+
});
|
|
123
|
+
if (!result.success) {
|
|
124
|
+
throw new Error(result.error || 'Failed to count project memos');
|
|
125
|
+
}
|
|
126
|
+
return result.total ?? result.memos?.length ?? 0;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/get-skill-sheet-project-episodes-context/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,MAA2C,EAC3C,SAAoB;IAEpB,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,wBAAwB;iBAC/B;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC;IACpC,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IAE1E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAA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AK,CAAC;YAAE,MAAM;QAClC,IAAI,IAAI,CAAC,CAAC;IACZ,CAAC,QAAQ,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,EAAE;IAEtD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,SAAoB,EACpB,SAAiB,EACjB,QAAiB;IAEjB,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE;QAC1C,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACT,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,+BAA+B,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/get-skill-sheet-project-episodes-context/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { handler } from './handler.js';
|
|
2
|
+
export const getSkillSheetProjectEpisodesContextTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_get_skill_sheet_project_episodes_context',
|
|
5
|
+
description: 'Get project information and public linked memo bodies so the MCP client AI model can draft design-and-judgment episodes for a skill sheet project. Private linked memos are returned only as a count.',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
project_id: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
description: 'Project ID',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ['project_id'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
handler,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/get-skill-sheet-project-episodes-context/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,MAAM,uCAAuC,GAAgB;IAClE,UAAU,EAAE;QACV,IAAI,EAAE,gDAAgD;QACtD,WAAW,EACT,uMAAuM;QACzM,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,YAAY;iBAC1B;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;KACF;IACD,OAAO;CACR,CAAC"}
|
package/dist/handlers/index.js
CHANGED
|
@@ -12,12 +12,11 @@ export * from './update-note/index.js';
|
|
|
12
12
|
export * from './get-skill-sheet/index.js';
|
|
13
13
|
export * from './update-skill-sheet-basic-info/index.js';
|
|
14
14
|
export * from './update-skill-sheet-self-pr/index.js';
|
|
15
|
-
export * from './update-skill-sheet-public-profile/index.js';
|
|
16
15
|
export * from './update-skill-sheet-skills/index.js';
|
|
17
16
|
export * from './upsert-skill-sheet-project/index.js';
|
|
18
17
|
export * from './delete-skill-sheet-project/index.js';
|
|
19
|
-
export * from './get-skill-sheet-project-
|
|
20
|
-
export * from './update-skill-sheet-project-
|
|
18
|
+
export * from './get-skill-sheet-project-episodes-context/index.js';
|
|
19
|
+
export * from './update-skill-sheet-project-episodes/index.js';
|
|
21
20
|
export * from './list-goals/index.js';
|
|
22
21
|
export * from './create-goal/index.js';
|
|
23
22
|
export * from './update-goal/index.js';
|
|
@@ -25,7 +24,6 @@ export * from './delete-goal/index.js';
|
|
|
25
24
|
export * from './get-dashboard-analysis/index.js';
|
|
26
25
|
export * from './update-dashboard-analysis/index.js';
|
|
27
26
|
export * from './get-dashboard-analysis-context/index.js';
|
|
28
|
-
export * from './get-public-profile-context/index.js';
|
|
29
27
|
export * from './get-project-context/index.js';
|
|
30
28
|
export * from './get-project-document/index.js';
|
|
31
29
|
export * from './add-project-document/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qDAAqD,CAAC;AACpE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC"}
|
|
@@ -24,7 +24,7 @@ export const savePendingCandidateTool = {
|
|
|
24
24
|
type: 'string',
|
|
25
25
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
26
26
|
},
|
|
27
|
-
description: 'Memo type classification keys override when saving (a memo can have multiple). decision/operation/principle are the primary material for
|
|
27
|
+
description: 'Memo type classification keys override when saving (a memo can have multiple). decision/operation/principle are the primary material for durable judgment and working-practice summaries.',
|
|
28
28
|
},
|
|
29
29
|
projects: {
|
|
30
30
|
type: 'array',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/save-pending-candidate/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,CAAC,MAAM,wBAAwB,GAAgB;IACnD,UAAU,EAAE;QACV,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACT,sIAAsI;QACx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,WAAW,EAAE,4BAA4B,EAAE;gBACpE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2BAA2B,EAAE;gBAClE,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+IAA+I;iBAClJ;gBACD,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBACxD,cAAc,EAAE;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;qBAC1D;oBACD,WAAW,EACT,2LAA2L;iBAC9L;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,8BAA8B;oBAC3C,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACtB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;yBAC1B;wBACD,QAAQ,EAAE,CAAC,IAAI,CAAC;qBACjB;iBACF;gBACD,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;aAC/C;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC3B;KACF;IACD,OAAO,EAAE,0BAA0B;CACpC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { handleSearchMemo } from './handler.js';
|
|
|
2
2
|
export const searchMemoTool = {
|
|
3
3
|
definition: {
|
|
4
4
|
name: 'paput_search_memo',
|
|
5
|
-
description: 'Search PaPut memos by keyword, category, memo type, IDs, date, visibility, or pagination. Use this to find existing knowledge before creating or saving a memo, or to gather typed public memos (decision/operation/principle) for
|
|
5
|
+
description: 'Search PaPut memos by keyword, category, memo type, IDs, date, visibility, or pagination. Use this to find existing knowledge before creating or saving a memo, or to gather typed public memos (decision/operation/principle) for judgment summaries.',
|
|
6
6
|
inputSchema: {
|
|
7
7
|
type: 'object',
|
|
8
8
|
properties: {
|
|
@@ -17,7 +17,7 @@ export const searchMemoTool = {
|
|
|
17
17
|
memo_type: {
|
|
18
18
|
type: 'string',
|
|
19
19
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
20
|
-
description: 'Filter by memo type key. Combine with is_public=true to collect public decision/operation/principle memos as material for
|
|
20
|
+
description: 'Filter by memo type key. Combine with is_public=true to collect public decision/operation/principle memos as material for judgment summaries.',
|
|
21
21
|
},
|
|
22
22
|
ids: {
|
|
23
23
|
type: 'array',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/search-memo/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/search-memo/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,wPAAwP;QAC1P,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gBAAgB;iBAC9B;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,aAAa;iBAC3B;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;oBACzD,WAAW,EACT,+IAA+I;iBAClJ;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;qBACf;oBACD,WAAW,EAAE,UAAU;iBACxB;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;iBACzC;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,mBAAmB;iBACjC;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,aAAa;iBAC3B;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;iBACzC;aACF;SACF;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC"}
|
|
@@ -46,7 +46,7 @@ export const updateMemoTool = {
|
|
|
46
46
|
type: 'string',
|
|
47
47
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
48
48
|
},
|
|
49
|
-
description: 'Memo type classification keys (a memo can have multiple). This replaces the full set on update, so pass the complete list to keep existing types; omitting it clears them. decision/operation/principle are the primary material for
|
|
49
|
+
description: 'Memo type classification keys (a memo can have multiple). This replaces the full set on update, so pass the complete list to keep existing types; omitting it clears them. decision/operation/principle are the primary material for durable judgment and working-practice summaries.',
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
required: ['id', 'title', 'body', 'is_public'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/update-memo/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,2GAA2G;QAC7G,WAAW,EAAE;YACX,IAAI,EA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gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,YAAY;iBAC1B;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,WAAW;iBACzB;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,6BAA6B;iBAC3C;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,EAAE,EAAE;gCACF,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,gDAAgD;6BAC9D;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,eAAe;6BAC7B;yBACF;wBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;qBACnB;oBACD,WAAW,EAAE,YAAY;iBAC1B;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;qBAC1D;oBACD,WAAW,EACT,uRAAuR;iBAC1R;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC;SAC/C;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const updatePendingCandidateTool = {
|
|
|
23
23
|
type: 'string',
|
|
24
24
|
enum: ['knowledge', 'decision', 'operation', 'principle'],
|
|
25
25
|
},
|
|
26
|
-
description: 'Memo type classification keys (a memo can have multiple). decision/operation/principle are the primary material for
|
|
26
|
+
description: 'Memo type classification keys (a memo can have multiple). decision/operation/principle are the primary material for durable judgment and working-practice summaries.',
|
|
27
27
|
},
|
|
28
28
|
confidence: { type: 'number', description: 'Confidence score' },
|
|
29
29
|
is_public: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/update-pending-candidate/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,0BAA0B,GAAgB;IACrD,UAAU,EAAE;QACV,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,+WAA+W;QACjX,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gCAAgC;iBAC9C;gBACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;gBAC3D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBACzD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;qBAC1D;oBACD,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/update-pending-candidate/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,0BAA0B,GAAgB;IACrD,UAAU,EAAE;QACV,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,+WAA+W;QACjX,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gCAAgC;iBAC9C;gBACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;gBAC3D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBACzD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;qBAC1D;oBACD,WAAW,EACT,sKAAsK;iBACzK;gBACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBAC/D,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,uCAAuC;iBACrD;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,6BAA6B;oBAC1C,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACtB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;yBAC1B;wBACD,QAAQ,EAAE,CAAC,IAAI,CAAC;qBACjB;iBACF;aACF;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC3B;KACF;IACD,OAAO,EAAE,4BAA4B;CACtC,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { updateSkillSheetProjectEpisodes } from '../../services/api/skill-sheet.js';
|
|
2
|
+
export async function handler(params, apiClient) {
|
|
3
|
+
const parsed = parseParams(params);
|
|
4
|
+
if (!parsed) {
|
|
5
|
+
return {
|
|
6
|
+
content: [
|
|
7
|
+
{
|
|
8
|
+
type: 'text',
|
|
9
|
+
text: 'Project ID and a valid episodes array are required',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
isError: true,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const result = await updateSkillSheetProjectEpisodes(apiClient, parsed.projectId, parsed.episodes);
|
|
16
|
+
const droppedIds = result.episodes.flatMap((episode) => episode.dropped_ids ?? []);
|
|
17
|
+
const unresolvedCount = result.episodes.filter((episode) => (episode.supporting_memos ?? []).length === 0).length;
|
|
18
|
+
const warnings = [];
|
|
19
|
+
if (droppedIds.length > 0) {
|
|
20
|
+
warnings.push(`Dropped supporting memo IDs: ${Array.from(new Set(droppedIds)).join(', ')}`);
|
|
21
|
+
}
|
|
22
|
+
if (unresolvedCount > 0) {
|
|
23
|
+
warnings.push(`${unresolvedCount} episode(s) have no resolved public supporting memos and may be hidden on the public profile.`);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
structuredContent: {
|
|
27
|
+
success: true,
|
|
28
|
+
project_id: result.project_id,
|
|
29
|
+
episodes: result.episodes,
|
|
30
|
+
episodes_updated_at: result.episodes_updated_at,
|
|
31
|
+
warnings,
|
|
32
|
+
},
|
|
33
|
+
content: [
|
|
34
|
+
{
|
|
35
|
+
type: 'text',
|
|
36
|
+
text: [
|
|
37
|
+
`Project episodes were updated for project ID ${result.project_id}.`,
|
|
38
|
+
`Saved episodes: ${result.episodes.length}`,
|
|
39
|
+
...warnings,
|
|
40
|
+
].join('\n'),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function parseParams(params) {
|
|
46
|
+
if (!params ||
|
|
47
|
+
typeof params.project_id !== 'number' ||
|
|
48
|
+
!Number.isInteger(params.project_id) ||
|
|
49
|
+
params.project_id <= 0 ||
|
|
50
|
+
!Array.isArray(params.episodes) ||
|
|
51
|
+
params.episodes.length > 5) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
const episodes = params.episodes.map(parseEpisode);
|
|
55
|
+
if (episodes.some((episode) => !episode)) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
projectId: params.project_id,
|
|
60
|
+
episodes: episodes,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function parseEpisode(value) {
|
|
64
|
+
if (typeof value !== 'object' || value === null) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const episodeInput = value;
|
|
68
|
+
if (typeof episodeInput.claim !== 'string' ||
|
|
69
|
+
episodeInput.claim.trim().length === 0 ||
|
|
70
|
+
episodeInput.claim.length > 200) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
const supportingMemoIds = parseSupportingMemoIds(episodeInput.supporting_memo_ids);
|
|
74
|
+
if (!supportingMemoIds) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
const episode = {
|
|
78
|
+
claim: episodeInput.claim.trim(),
|
|
79
|
+
supporting_memo_ids: supportingMemoIds,
|
|
80
|
+
};
|
|
81
|
+
for (const key of ['situation', 'decision', 'reason']) {
|
|
82
|
+
const value = episodeInput[key];
|
|
83
|
+
if (typeof value === 'string') {
|
|
84
|
+
if (value.length > 1000) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
episode[key] = value.trim();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return episode;
|
|
91
|
+
}
|
|
92
|
+
function parseSupportingMemoIds(value) {
|
|
93
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
const ids = value.filter((id) => typeof id === 'number' && Number.isInteger(id) && id > 0);
|
|
97
|
+
return ids.length === value.length ? ids : undefined;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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