@kawacode/mcp 6.9.4 → 7.0.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.
- package/CLAUDE.md.example +23 -0
- package/README.md +88 -1
- package/build/index.js +20 -18
- package/build/index.js.map +1 -1
- package/build/prompts/intent-first-workflow.js +6 -8
- package/build/prompts/intent-first-workflow.js.map +1 -1
- package/build/services/muninn-ipc.js +6 -2
- package/build/services/muninn-ipc.js.map +1 -1
- package/build/tools/_mangled-args.d.ts +63 -0
- package/build/tools/_mangled-args.js +116 -0
- package/build/tools/_mangled-args.js.map +1 -0
- package/build/tools/_mangled-args.test.js +110 -0
- package/build/tools/_mangled-args.test.js.map +1 -0
- package/build/tools/activate-intent.d.ts +8 -52
- package/build/tools/activate-intent.js +26 -7
- package/build/tools/activate-intent.js.map +1 -1
- package/build/tools/arbiter-apply.d.ts +0 -52
- package/build/tools/arbiter-apply.js +0 -3
- package/build/tools/arbiter-apply.js.map +1 -1
- package/build/tools/arbiter-resolve.d.ts +0 -52
- package/build/tools/arbiter-resolve.js +0 -3
- package/build/tools/arbiter-resolve.js.map +1 -1
- package/build/tools/check-active-intent.d.ts +0 -52
- package/build/tools/check-active-intent.js +2 -24
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +4 -56
- package/build/tools/complete-intent.js +15 -44
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/create-intent.d.ts +0 -52
- package/build/tools/create-intent.js +0 -4
- package/build/tools/create-intent.js.map +1 -1
- package/build/tools/detect-intent-conflicts.d.ts +0 -52
- package/build/tools/detect-intent-conflicts.js +0 -3
- package/build/tools/detect-intent-conflicts.js.map +1 -1
- package/build/tools/edit-session-decision.d.ts +0 -52
- package/build/tools/edit-session-decision.js +0 -3
- package/build/tools/edit-session-decision.js.map +1 -1
- package/build/tools/get-decision-detail.d.ts +19 -55
- package/build/tools/get-decision-detail.js +12 -7
- package/build/tools/get-decision-detail.js.map +1 -1
- package/build/tools/get-intents-for-file.d.ts +35 -53
- package/build/tools/get-intents-for-file.js +61 -26
- package/build/tools/get-intents-for-file.js.map +1 -1
- package/build/tools/get-project-decisions.d.ts +0 -52
- package/build/tools/get-project-decisions.js +0 -3
- package/build/tools/get-project-decisions.js.map +1 -1
- package/build/tools/get-relevant-context.d.ts +0 -52
- package/build/tools/get-relevant-context.js +0 -3
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-resolution-context.d.ts +0 -52
- package/build/tools/get-resolution-context.js +0 -4
- package/build/tools/get-resolution-context.js.map +1 -1
- package/build/tools/get-session-decisions.d.ts +10 -53
- package/build/tools/get-session-decisions.js +2 -4
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +11 -675
- package/build/tools/index.js +2 -11
- package/build/tools/index.js.map +1 -1
- package/build/tools/infer-history.js +5 -19
- package/build/tools/infer-history.js.map +1 -1
- package/build/tools/list-team-intents.d.ts +4 -56
- package/build/tools/list-team-intents.js +0 -3
- package/build/tools/list-team-intents.js.map +1 -1
- package/build/tools/log-work.d.ts +0 -52
- package/build/tools/log-work.js +0 -3
- package/build/tools/log-work.js.map +1 -1
- package/build/tools/pre-edit-acknowledge.d.ts +0 -52
- package/build/tools/pre-edit-acknowledge.js +0 -2
- package/build/tools/pre-edit-acknowledge.js.map +1 -1
- package/build/tools/pre-edit-decision-check.d.ts +0 -52
- package/build/tools/pre-edit-decision-check.js +0 -4
- package/build/tools/pre-edit-decision-check.js.map +1 -1
- package/build/tools/record-decision.d.ts +2 -52
- package/build/tools/record-decision.js +6 -5
- package/build/tools/record-decision.js.map +1 -1
- package/build/tools/resume-intent.d.ts +9 -60
- package/build/tools/resume-intent.js +40 -23
- package/build/tools/resume-intent.js.map +1 -1
- package/build/tools/update-intent.d.ts +0 -52
- package/build/tools/update-intent.js +1 -5
- package/build/tools/update-intent.js.map +1 -1
- package/build/types/refs.d.ts +73 -0
- package/build/types/refs.js +73 -0
- package/build/types/refs.js.map +1 -0
- package/package.json +1 -1
- package/build/tools/_fork-fields.d.ts +0 -84
- package/build/tools/_fork-fields.js +0 -65
- package/build/tools/_fork-fields.js.map +0 -1
- package/build/tools/_salvage-mangled-args.d.ts +0 -38
- package/build/tools/_salvage-mangled-args.js +0 -87
- package/build/tools/_salvage-mangled-args.js.map +0 -1
- package/build/tools/_salvage-mangled-args.test.js +0 -73
- package/build/tools/_salvage-mangled-args.test.js.map +0 -1
- package/build/tools/evolve-decisions.d.ts +0 -96
- package/build/tools/evolve-decisions.js +0 -42
- package/build/tools/evolve-decisions.js.map +0 -1
- package/build/tools/get-intent-changes.d.ts +0 -101
- package/build/tools/get-intent-changes.js +0 -61
- package/build/tools/get-intent-changes.js.map +0 -1
- package/build/tools/get-intents-for-lines.d.ts +0 -123
- package/build/tools/get-intents-for-lines.js +0 -67
- package/build/tools/get-intents-for-lines.js.map +0 -1
- package/build/tools/update-features.d.ts +0 -31
- package/build/tools/update-features.js +0 -51
- package/build/tools/update-features.js.map +0 -1
- /package/build/tools/{_salvage-mangled-args.test.d.ts → _mangled-args.test.d.ts} +0 -0
package/build/tools/index.js
CHANGED
|
@@ -4,9 +4,7 @@ import { createAndActivateIntentTool, createAndActivateIntent, createAndActivate
|
|
|
4
4
|
import { activateIntentTool, activateIntent, activateIntentSchema } from './activate-intent.js';
|
|
5
5
|
import { resumeIntentTool, resumeIntent, resumeIntentSchema } from './resume-intent.js';
|
|
6
6
|
import { getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema } from './get-intents-for-file.js';
|
|
7
|
-
import { getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema } from './get-intents-for-lines.js';
|
|
8
7
|
import { listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema } from './list-team-intents.js';
|
|
9
|
-
import { getIntentChangesTool, getIntentChanges, getIntentChangesSchema } from './get-intent-changes.js';
|
|
10
8
|
import { completeIntentTool, completeIntent, completeIntentSchema } from './complete-intent.js';
|
|
11
9
|
import { updateIntentTool, updateIntent, updateIntentSchema } from './update-intent.js';
|
|
12
10
|
import { logWorkTool, logWork, logWorkSchema } from './log-work.js';
|
|
@@ -17,8 +15,6 @@ import { getDecisionDetailTool, getDecisionDetail, getDecisionDetailSchema } fro
|
|
|
17
15
|
import { editSessionDecisionTool, editSessionDecision, editSessionDecisionSchema } from './edit-session-decision.js';
|
|
18
16
|
import { detectIntentConflictsTool, detectIntentConflicts, detectIntentConflictsSchema } from './detect-intent-conflicts.js';
|
|
19
17
|
import { inferHistoryTool, inferHistory, inferHistorySchema } from './infer-history.js';
|
|
20
|
-
import { evolveDecisionsTool, evolveDecisions, evolveDecisionsSchema } from './evolve-decisions.js';
|
|
21
|
-
import { updateFeaturesTool, updateFeatures, updateFeaturesSchema } from './update-features.js';
|
|
22
18
|
import { preEditDecisionCheckTool, preEditDecisionCheck, preEditDecisionCheckSchema } from './pre-edit-decision-check.js';
|
|
23
19
|
import { preEditAcknowledgeTool, preEditAcknowledge, preEditAcknowledgeSchema } from './pre-edit-acknowledge.js';
|
|
24
20
|
import { getResolutionContextTool, getResolutionContext, getResolutionContextSchema } from './get-resolution-context.js';
|
|
@@ -29,7 +25,7 @@ export {
|
|
|
29
25
|
// Relevance-based context (call per request)
|
|
30
26
|
getRelevantContextTool, getRelevantContext, getRelevantContextSchema,
|
|
31
27
|
// Intent tools
|
|
32
|
-
checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, activateIntentTool, activateIntent, activateIntentSchema, resumeIntentTool, resumeIntent, resumeIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema,
|
|
28
|
+
checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, activateIntentTool, activateIntent, activateIntentSchema, resumeIntentTool, resumeIntent, resumeIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema, listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema, completeIntentTool, completeIntent, completeIntentSchema, updateIntentTool, updateIntent, updateIntentSchema,
|
|
33
29
|
// Lightweight logging
|
|
34
30
|
logWorkTool, logWork, logWorkSchema,
|
|
35
31
|
// Decision recording tools
|
|
@@ -37,9 +33,8 @@ recordDecisionTool, recordDecision, recordDecisionSchema, getSessionDecisionsToo
|
|
|
37
33
|
// Conflict detection
|
|
38
34
|
detectIntentConflictsTool, detectIntentConflicts, detectIntentConflictsSchema,
|
|
39
35
|
// Inference pipeline tools
|
|
40
|
-
inferHistoryTool, inferHistory, inferHistorySchema,
|
|
36
|
+
inferHistoryTool, inferHistory, inferHistorySchema,
|
|
41
37
|
// Feature catalog
|
|
42
|
-
updateFeaturesTool, updateFeatures, updateFeaturesSchema,
|
|
43
38
|
// Pre-edit decision check
|
|
44
39
|
preEditDecisionCheckTool, preEditDecisionCheck, preEditDecisionCheckSchema, preEditAcknowledgeTool, preEditAcknowledge, preEditAcknowledgeSchema, getResolutionContextTool, getResolutionContext, getResolutionContextSchema, arbiterResolveTool, arbiterResolve, arbiterResolveSchema, arbiterApplyTool, arbiterApply, arbiterApplySchema };
|
|
45
40
|
export const allTools = [
|
|
@@ -51,9 +46,7 @@ export const allTools = [
|
|
|
51
46
|
activateIntentTool,
|
|
52
47
|
resumeIntentTool,
|
|
53
48
|
getIntentsForFileTool,
|
|
54
|
-
getIntentsForLinesTool,
|
|
55
49
|
listTeamIntentsTool,
|
|
56
|
-
getIntentChangesTool,
|
|
57
50
|
completeIntentTool,
|
|
58
51
|
updateIntentTool,
|
|
59
52
|
// Lightweight logging
|
|
@@ -68,9 +61,7 @@ export const allTools = [
|
|
|
68
61
|
detectIntentConflictsTool,
|
|
69
62
|
// Inference pipeline tools
|
|
70
63
|
inferHistoryTool,
|
|
71
|
-
evolveDecisionsTool,
|
|
72
64
|
// Feature catalog
|
|
73
|
-
updateFeaturesTool,
|
|
74
65
|
// Pre-edit decision check
|
|
75
66
|
preEditDecisionCheckTool,
|
|
76
67
|
preEditAcknowledgeTool,
|
package/build/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAC5G,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChH,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AACxH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAC7G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAC5G,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChH,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AACxH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAC7G,OAAO,EAAE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AkB;IAClB,gBAAgB;IAChB,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,WAAW;IACX,2BAA2B;IAC3B,kBAAkB;IAClB,uBAAuB;IACvB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,qBAAqB;IACrB,yBAAyB;IACzB,2BAA2B;IAC3B,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,wBAAwB;IACxB,sBAAsB;IACtB,8BAA8B;IAC9B,wBAAwB;IACxB,mDAAmD;IACnD,kBAAkB;IAClB,gBAAgB;CACjB,CAAA"}
|
|
@@ -5,7 +5,7 @@ export const inferHistorySchema = z.object({
|
|
|
5
5
|
commits: z.number().optional().describe('Number of recent commits to analyze. If omitted, the server resumes from the last commit infer_history processed for this repo (or falls back to 50 on first run). Mutually exclusive with `commitRange`.'),
|
|
6
6
|
commitRange: z.string().optional().describe('Optional git revspec to process a specific commit range instead of the N most recent (e.g. "sha1..sha2", "branch1..branch2", "sha1^!" for a single commit). Useful for recovering from dropped batches or targeted backfills. Mutually exclusive with `commits`.'),
|
|
7
7
|
contextIssues: z.boolean().optional().default(false).describe('Include context issues from commit date range (requires gh/glab CLI)'),
|
|
8
|
-
model: z.string().optional().default('claude-sonnet-4-20250514').describe('
|
|
8
|
+
model: z.string().optional().default('claude-sonnet-4-20250514').describe('Model slug used for the token/cost estimate only. It does NOT select the model the run uses — that is configured in the Kawa Code app.'),
|
|
9
9
|
maxStories: z.number().optional().default(0).describe('Maximum number of stories to analyze in this run (0 = unlimited).'),
|
|
10
10
|
allowCommitSplitting: z.boolean().optional().default(false).describe('Allow splitting a single commit into multiple stories when it contains unrelated changes (recommended for repos with messy commit history)'),
|
|
11
11
|
estimateOnly: z.boolean().optional().default(true).describe('If true (default), only estimate token cost without running the pipeline. Set to false to run the full pipeline.'),
|
|
@@ -119,27 +119,13 @@ export async function inferHistory(input) {
|
|
|
119
119
|
}
|
|
120
120
|
export const inferHistoryTool = {
|
|
121
121
|
name: 'infer_history',
|
|
122
|
-
description: `
|
|
122
|
+
description: `One-time-ish bootstrap: mine a repo's git history into intents and decisions. Rare — use it to seed a repo that has no recorded history yet, or to extend coverage after many new commits. NOT part of the per-turn workflow.
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
- To bootstrap a repository that has no recorded intents/decisions yet.
|
|
126
|
-
- To extend coverage for new commits since the last run (resumes automatically when no \`commits\` value is provided).
|
|
124
|
+
Costs real money and time, so it is a two-step call: run with estimateOnly (the default) to preview tokens/cost, show the user, then re-call with estimateOnly: false only if they agree. The run is asynchronous and reports progress in the Kawa Code app; it resumes automatically if interrupted.
|
|
127
125
|
|
|
128
|
-
|
|
129
|
-
- \`estimateOnly\` (default true): returns a token/cost estimate without running. Call with \`estimateOnly: true\` first to preview cost, then re-call with \`estimateOnly: false\` to run.
|
|
130
|
-
- \`commits\` (optional): how many recent commits to analyze. Omit to resume from where the last run stopped (or fall back to a sensible default on first run).
|
|
131
|
-
- \`commitRange\` (optional): git revspec selecting a specific window — \`"sha1..sha2"\`, \`"branch1..branch2"\`, \`"sha1^!"\` for a single commit. Mutually exclusive with \`commits\`. Useful for recovering from dropped batches or backfilling specific PRs / branches without re-running the full history.
|
|
132
|
-
- \`contextIssues\`: include PR/MR descriptions and issue discussions when an authenticated forge CLI (\`gh\` or \`glab\`) is available; auto-skipped otherwise.
|
|
133
|
-
- \`allowCommitSplitting\`: enable when commit history is messy and a single commit may cover unrelated changes.
|
|
134
|
-
- \`model\`, \`maxStories\`: Anthropic model and per-run cap.
|
|
135
|
-
- \`force\` (default false): override the re-run guard (see Behavior).
|
|
126
|
+
Re-run guard — do not defeat this casually. If the repo already has intents and the run cannot cleanly resume, or HEAD is not on the default branch, the call STOPS and returns needsDecision rather than running, because re-running blind risks duplicate intents. Show the user the reason and only re-call with force: true if they confirm. Prefer running on main/master.
|
|
136
127
|
|
|
137
|
-
|
|
138
|
-
- A run is asynchronous — returns immediately with a started/pending status; progress is reported separately.
|
|
139
|
-
- Results are persisted as intents and decisions for the repo on completion.
|
|
140
|
-
- If interrupted, re-running resumes from where it left off.
|
|
141
|
-
- Re-run guard: a clean incremental resume runs automatically. But if the repo already has intents and the run cannot cleanly resume (missing/unreachable cursor), or HEAD is not on the default branch, the call STOPS and returns \`needsDecision\` instead of running — re-running blind there risks duplicate intents. Present the reason to the user and, if they confirm, re-call with \`force: true\`. Run on the default branch (main/master) whenever possible; inferring a feature branch is what \`force\` is for.
|
|
142
|
-
- GitHub and GitLab are supported; the forge is detected from the remote origin.`,
|
|
128
|
+
Omit commits to resume from the last run. See the README for the full parameter list.`,
|
|
143
129
|
inputSchema: inferHistorySchema,
|
|
144
130
|
handler: inferHistory
|
|
145
131
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infer-history.js","sourceRoot":"","sources":["../../src/tools/infer-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2MAA2M,CAAC;IACpP,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kQAAkQ,CAAC;IAC/S,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,sEAAsE,CAAC;IACrI,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,QAAQ,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CAAC,KAAK;KACnB,CAAA;IACD,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAAE,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;IACnE,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS;QAAE,UAAU,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;IAE/E,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAA;IAEzD,IAAI,GAAG,CAAC,MAAM,KAAK,gBAAgB,EAAE,CAAC;QACpC,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAA;IACtF,CAAC;IAED,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAEvE,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,iFAAiF,CAAC,GAAG,YAAY;KAC3H,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;sFAMuE;IACpF,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,YAAY;CACtB,CAAA"}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const listTeamIntentsSchema: z.ZodObject<{
|
|
3
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
-
user: z.ZodString;
|
|
6
|
-
forkOrigin: z.ZodString;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
platform: "github" | "gitlab";
|
|
9
|
-
user: string;
|
|
10
|
-
forkOrigin: string;
|
|
11
|
-
}, {
|
|
12
|
-
platform: "github" | "gitlab";
|
|
13
|
-
user: string;
|
|
14
|
-
forkOrigin: string;
|
|
15
|
-
}>>;
|
|
16
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
17
3
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
18
4
|
repoPath: z.ZodString;
|
|
19
5
|
status: z.ZodOptional<z.ZodEnum<["active", "committed", "pushed", "done", "abandoned"]>>;
|
|
@@ -26,27 +12,15 @@ export declare const listTeamIntentsSchema: z.ZodObject<{
|
|
|
26
12
|
repoPath: string;
|
|
27
13
|
limit: number;
|
|
28
14
|
offset: number;
|
|
29
|
-
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
30
15
|
repoOrigin?: string | undefined;
|
|
31
|
-
|
|
32
|
-
platform: "github" | "gitlab";
|
|
33
|
-
user: string;
|
|
34
|
-
forkOrigin: string;
|
|
35
|
-
} | undefined;
|
|
36
|
-
workspaceId?: string | undefined;
|
|
16
|
+
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
37
17
|
author?: string | undefined;
|
|
38
18
|
since?: string | undefined;
|
|
39
19
|
until?: string | undefined;
|
|
40
20
|
}, {
|
|
41
21
|
repoPath: string;
|
|
42
|
-
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
43
22
|
repoOrigin?: string | undefined;
|
|
44
|
-
|
|
45
|
-
platform: "github" | "gitlab";
|
|
46
|
-
user: string;
|
|
47
|
-
forkOrigin: string;
|
|
48
|
-
} | undefined;
|
|
49
|
-
workspaceId?: string | undefined;
|
|
23
|
+
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
50
24
|
author?: string | undefined;
|
|
51
25
|
since?: string | undefined;
|
|
52
26
|
until?: string | undefined;
|
|
@@ -76,20 +50,6 @@ export declare const listTeamIntentsTool: {
|
|
|
76
50
|
name: string;
|
|
77
51
|
description: string;
|
|
78
52
|
inputSchema: z.ZodObject<{
|
|
79
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
80
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
81
|
-
user: z.ZodString;
|
|
82
|
-
forkOrigin: z.ZodString;
|
|
83
|
-
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
platform: "github" | "gitlab";
|
|
85
|
-
user: string;
|
|
86
|
-
forkOrigin: string;
|
|
87
|
-
}, {
|
|
88
|
-
platform: "github" | "gitlab";
|
|
89
|
-
user: string;
|
|
90
|
-
forkOrigin: string;
|
|
91
|
-
}>>;
|
|
92
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
93
53
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
94
54
|
repoPath: z.ZodString;
|
|
95
55
|
status: z.ZodOptional<z.ZodEnum<["active", "committed", "pushed", "done", "abandoned"]>>;
|
|
@@ -102,27 +62,15 @@ export declare const listTeamIntentsTool: {
|
|
|
102
62
|
repoPath: string;
|
|
103
63
|
limit: number;
|
|
104
64
|
offset: number;
|
|
105
|
-
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
106
65
|
repoOrigin?: string | undefined;
|
|
107
|
-
|
|
108
|
-
platform: "github" | "gitlab";
|
|
109
|
-
user: string;
|
|
110
|
-
forkOrigin: string;
|
|
111
|
-
} | undefined;
|
|
112
|
-
workspaceId?: string | undefined;
|
|
66
|
+
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
113
67
|
author?: string | undefined;
|
|
114
68
|
since?: string | undefined;
|
|
115
69
|
until?: string | undefined;
|
|
116
70
|
}, {
|
|
117
71
|
repoPath: string;
|
|
118
|
-
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
119
72
|
repoOrigin?: string | undefined;
|
|
120
|
-
|
|
121
|
-
platform: "github" | "gitlab";
|
|
122
|
-
user: string;
|
|
123
|
-
forkOrigin: string;
|
|
124
|
-
} | undefined;
|
|
125
|
-
workspaceId?: string | undefined;
|
|
73
|
+
status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
|
|
126
74
|
author?: string | undefined;
|
|
127
75
|
since?: string | undefined;
|
|
128
76
|
until?: string | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
-
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
4
|
export const listTeamIntentsSchema = z.object({
|
|
6
5
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
7
6
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
@@ -12,7 +11,6 @@ export const listTeamIntentsSchema = z.object({
|
|
|
12
11
|
until: z.string().optional().describe('Filter intents updated before this ISO8601 date'),
|
|
13
12
|
limit: z.number().optional().default(50).describe('Maximum number of intents to return (default: 50)'),
|
|
14
13
|
offset: z.number().optional().default(0).describe('Number of intents to skip for pagination (default: 0)'),
|
|
15
|
-
...forkFieldsExtensions,
|
|
16
14
|
});
|
|
17
15
|
export async function listTeamIntents(input) {
|
|
18
16
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -30,7 +28,6 @@ export async function listTeamIntents(input) {
|
|
|
30
28
|
author: input.author,
|
|
31
29
|
since: input.since,
|
|
32
30
|
until: input.until,
|
|
33
|
-
...extractForkFields(input),
|
|
34
31
|
});
|
|
35
32
|
const intents = (res.intents || []).map((intent) => ({
|
|
36
33
|
id: intent.id || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-team-intents.js","sourceRoot":"","sources":["../../src/tools/list-team-intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,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WAAW,IAAI,MAAM,CAAC,UAAU;QACnD,SAAS,EAAE,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC;QACrD,SAAS,EAAE,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,IAAI,EAAE;KACvD,CAAC,CAAC,CAAA;IAEH,kFAAkF;IAClF,MAAM,KAAK,GAAG,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAA;IAClF,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM,CAAA;IACrE,MAAM,OAAO,GAAG,KAAK,KAAK,CAAC;QACzB,CAAC,CAAC,kBAAkB;QACpB,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,wBAAwB,KAAK,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,WAAW,SAAS,CAAA;IAE3H,OAAO;QACL,OAAO;QACP,KAAK,EAAE,KAAK;QACZ,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE;;;;;;;0OAO2N;IACxO,WAAW,EAAE,qBAAqB;IAClC,OAAO,EAAE,eAAe;CACzB,CAAA"}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const logWorkSchema: z.ZodObject<{
|
|
3
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
-
user: z.ZodString;
|
|
6
|
-
forkOrigin: z.ZodString;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
platform: "github" | "gitlab";
|
|
9
|
-
user: string;
|
|
10
|
-
forkOrigin: string;
|
|
11
|
-
}, {
|
|
12
|
-
platform: "github" | "gitlab";
|
|
13
|
-
user: string;
|
|
14
|
-
forkOrigin: string;
|
|
15
|
-
}>>;
|
|
16
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
17
3
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
18
4
|
repoPath: z.ZodString;
|
|
19
5
|
title: z.ZodString;
|
|
@@ -22,23 +8,11 @@ export declare const logWorkSchema: z.ZodObject<{
|
|
|
22
8
|
repoPath: string;
|
|
23
9
|
title: string;
|
|
24
10
|
repoOrigin?: string | undefined;
|
|
25
|
-
forkAuthor?: {
|
|
26
|
-
platform: "github" | "gitlab";
|
|
27
|
-
user: string;
|
|
28
|
-
forkOrigin: string;
|
|
29
|
-
} | undefined;
|
|
30
|
-
workspaceId?: string | undefined;
|
|
31
11
|
files?: string[] | undefined;
|
|
32
12
|
}, {
|
|
33
13
|
repoPath: string;
|
|
34
14
|
title: string;
|
|
35
15
|
repoOrigin?: string | undefined;
|
|
36
|
-
forkAuthor?: {
|
|
37
|
-
platform: "github" | "gitlab";
|
|
38
|
-
user: string;
|
|
39
|
-
forkOrigin: string;
|
|
40
|
-
} | undefined;
|
|
41
|
-
workspaceId?: string | undefined;
|
|
42
16
|
files?: string[] | undefined;
|
|
43
17
|
}>;
|
|
44
18
|
export type LogWorkInput = z.infer<typeof logWorkSchema>;
|
|
@@ -52,20 +26,6 @@ export declare const logWorkTool: {
|
|
|
52
26
|
name: string;
|
|
53
27
|
description: string;
|
|
54
28
|
inputSchema: z.ZodObject<{
|
|
55
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
56
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
57
|
-
user: z.ZodString;
|
|
58
|
-
forkOrigin: z.ZodString;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
platform: "github" | "gitlab";
|
|
61
|
-
user: string;
|
|
62
|
-
forkOrigin: string;
|
|
63
|
-
}, {
|
|
64
|
-
platform: "github" | "gitlab";
|
|
65
|
-
user: string;
|
|
66
|
-
forkOrigin: string;
|
|
67
|
-
}>>;
|
|
68
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
69
29
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
70
30
|
repoPath: z.ZodString;
|
|
71
31
|
title: z.ZodString;
|
|
@@ -74,23 +34,11 @@ export declare const logWorkTool: {
|
|
|
74
34
|
repoPath: string;
|
|
75
35
|
title: string;
|
|
76
36
|
repoOrigin?: string | undefined;
|
|
77
|
-
forkAuthor?: {
|
|
78
|
-
platform: "github" | "gitlab";
|
|
79
|
-
user: string;
|
|
80
|
-
forkOrigin: string;
|
|
81
|
-
} | undefined;
|
|
82
|
-
workspaceId?: string | undefined;
|
|
83
37
|
files?: string[] | undefined;
|
|
84
38
|
}, {
|
|
85
39
|
repoPath: string;
|
|
86
40
|
title: string;
|
|
87
41
|
repoOrigin?: string | undefined;
|
|
88
|
-
forkAuthor?: {
|
|
89
|
-
platform: "github" | "gitlab";
|
|
90
|
-
user: string;
|
|
91
|
-
forkOrigin: string;
|
|
92
|
-
} | undefined;
|
|
93
|
-
workspaceId?: string | undefined;
|
|
94
42
|
files?: string[] | undefined;
|
|
95
43
|
}>;
|
|
96
44
|
handler: typeof logWork;
|
package/build/tools/log-work.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
-
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
4
|
export const logWorkSchema = z.object({
|
|
6
5
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
7
6
|
repoPath: z.string().describe('Local path to repository root'),
|
|
8
7
|
title: z.string().max(200).describe('Short description of the work done'),
|
|
9
8
|
files: z.array(z.string()).optional().describe('File paths modified (relative to repo root)'),
|
|
10
|
-
...forkFieldsExtensions,
|
|
11
9
|
});
|
|
12
10
|
export async function logWork(input) {
|
|
13
11
|
const origin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -15,7 +13,6 @@ export async function logWork(input) {
|
|
|
15
13
|
repoOrigin: origin,
|
|
16
14
|
title: input.title,
|
|
17
15
|
files: input.files || [],
|
|
18
|
-
...extractForkFields(input),
|
|
19
16
|
});
|
|
20
17
|
// Positive receipt required: a logged work item always comes back with an id.
|
|
21
18
|
// `res.success !== false` alone would report success for any response that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-work.js","sourceRoot":"","sources":["../../src/tools/log-work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"log-work.js","sourceRoot":"","sources":["../../src/tools/log-work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC9D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACzE,KAAK,EAAE,CA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
|
export declare const preEditAcknowledgeSchema: z.ZodObject<{
|
|
17
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
18
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
19
|
-
user: z.ZodString;
|
|
20
|
-
forkOrigin: z.ZodString;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
platform: "github" | "gitlab";
|
|
23
|
-
user: string;
|
|
24
|
-
forkOrigin: string;
|
|
25
|
-
}, {
|
|
26
|
-
platform: "github" | "gitlab";
|
|
27
|
-
user: string;
|
|
28
|
-
forkOrigin: string;
|
|
29
|
-
}>>;
|
|
30
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
31
17
|
decisionIds: z.ZodArray<z.ZodString, "many">;
|
|
32
18
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
33
19
|
repoPath: z.ZodOptional<z.ZodString>;
|
|
@@ -35,22 +21,10 @@ export declare const preEditAcknowledgeSchema: z.ZodObject<{
|
|
|
35
21
|
decisionIds: string[];
|
|
36
22
|
repoOrigin?: string | undefined;
|
|
37
23
|
repoPath?: string | undefined;
|
|
38
|
-
forkAuthor?: {
|
|
39
|
-
platform: "github" | "gitlab";
|
|
40
|
-
user: string;
|
|
41
|
-
forkOrigin: string;
|
|
42
|
-
} | undefined;
|
|
43
|
-
workspaceId?: string | undefined;
|
|
44
24
|
}, {
|
|
45
25
|
decisionIds: string[];
|
|
46
26
|
repoOrigin?: string | undefined;
|
|
47
27
|
repoPath?: string | undefined;
|
|
48
|
-
forkAuthor?: {
|
|
49
|
-
platform: "github" | "gitlab";
|
|
50
|
-
user: string;
|
|
51
|
-
forkOrigin: string;
|
|
52
|
-
} | undefined;
|
|
53
|
-
workspaceId?: string | undefined;
|
|
54
28
|
}>;
|
|
55
29
|
export type PreEditAcknowledgeInput = z.infer<typeof preEditAcknowledgeSchema>;
|
|
56
30
|
export interface PreEditAcknowledgeResponse {
|
|
@@ -61,20 +35,6 @@ export declare const preEditAcknowledgeTool: {
|
|
|
61
35
|
name: string;
|
|
62
36
|
description: string;
|
|
63
37
|
inputSchema: z.ZodObject<{
|
|
64
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
65
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
66
|
-
user: z.ZodString;
|
|
67
|
-
forkOrigin: z.ZodString;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
platform: "github" | "gitlab";
|
|
70
|
-
user: string;
|
|
71
|
-
forkOrigin: string;
|
|
72
|
-
}, {
|
|
73
|
-
platform: "github" | "gitlab";
|
|
74
|
-
user: string;
|
|
75
|
-
forkOrigin: string;
|
|
76
|
-
}>>;
|
|
77
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
78
38
|
decisionIds: z.ZodArray<z.ZodString, "many">;
|
|
79
39
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
80
40
|
repoPath: z.ZodOptional<z.ZodString>;
|
|
@@ -82,22 +42,10 @@ export declare const preEditAcknowledgeTool: {
|
|
|
82
42
|
decisionIds: string[];
|
|
83
43
|
repoOrigin?: string | undefined;
|
|
84
44
|
repoPath?: string | undefined;
|
|
85
|
-
forkAuthor?: {
|
|
86
|
-
platform: "github" | "gitlab";
|
|
87
|
-
user: string;
|
|
88
|
-
forkOrigin: string;
|
|
89
|
-
} | undefined;
|
|
90
|
-
workspaceId?: string | undefined;
|
|
91
45
|
}, {
|
|
92
46
|
decisionIds: string[];
|
|
93
47
|
repoOrigin?: string | undefined;
|
|
94
48
|
repoPath?: string | undefined;
|
|
95
|
-
forkAuthor?: {
|
|
96
|
-
platform: "github" | "gitlab";
|
|
97
|
-
user: string;
|
|
98
|
-
forkOrigin: string;
|
|
99
|
-
} | undefined;
|
|
100
|
-
workspaceId?: string | undefined;
|
|
101
49
|
}>;
|
|
102
50
|
handler: typeof preEditAcknowledge;
|
|
103
51
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { forkFieldsExtensions } from './_fork-fields.js';
|
|
3
2
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
3
|
import { emitActedOn } from '../telemetry.js';
|
|
5
4
|
/**
|
|
@@ -29,7 +28,6 @@ export const preEditAcknowledgeSchema = z.object({
|
|
|
29
28
|
.string()
|
|
30
29
|
.optional()
|
|
31
30
|
.describe('Local path to the repository root. Enables repo attribution of the acted-on value-metric.'),
|
|
32
|
-
...forkFieldsExtensions,
|
|
33
31
|
});
|
|
34
32
|
export async function preEditAcknowledge(input) {
|
|
35
33
|
// Track-B acted-on (VALUE_METRICS Phase 2): an explicit acknowledge IS the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-edit-acknowledge.js","sourceRoot":"","sources":["../../src/tools/pre-edit-acknowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pre-edit-acknowledge.js","sourceRoot":"","sources":["../../src/tools/pre-edit-acknowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,CAAC;SACX,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,0FAA0F,CAAC;IACvG,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yIAAyI,CAAC;IACtJ,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2FAA2F,CAAC;CACzG,CAAC,CAAA;AAQF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAA8B;IAE9B,2EAA2E;IAC3E,4EAA4E;IAC5E,4EAA4E;IAC5E,0EAA0E;IAC1E,IAAI,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAS,CAAC,CAAA;YAC/D,KAAK,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QACxH,CAAC;QAAC,MAAM,CAAC,CAAC,4CAA4C,CAAC,CAAC;IAC1D,CAAC;IAED,oEAAoE;IACpE,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,CAAA;AACnD,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;oDAOqC;IAClD,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,kBAAkB;CAC5B,CAAA"}
|
|
@@ -9,20 +9,6 @@ import { z } from 'zod';
|
|
|
9
9
|
* Zod-schema validation, origin resolution, and forwarding the request.
|
|
10
10
|
*/
|
|
11
11
|
export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
12
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
13
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
14
|
-
user: z.ZodString;
|
|
15
|
-
forkOrigin: z.ZodString;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
platform: "github" | "gitlab";
|
|
18
|
-
user: string;
|
|
19
|
-
forkOrigin: string;
|
|
20
|
-
}, {
|
|
21
|
-
platform: "github" | "gitlab";
|
|
22
|
-
user: string;
|
|
23
|
-
forkOrigin: string;
|
|
24
|
-
}>>;
|
|
25
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
26
12
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
27
13
|
repoPath: z.ZodString;
|
|
28
14
|
filePath: z.ZodString;
|
|
@@ -36,12 +22,6 @@ export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
|
36
22
|
startLine: number;
|
|
37
23
|
endLine: number;
|
|
38
24
|
repoOrigin?: string | undefined;
|
|
39
|
-
forkAuthor?: {
|
|
40
|
-
platform: "github" | "gitlab";
|
|
41
|
-
user: string;
|
|
42
|
-
forkOrigin: string;
|
|
43
|
-
} | undefined;
|
|
44
|
-
workspaceId?: string | undefined;
|
|
45
25
|
intentId?: string | undefined;
|
|
46
26
|
sessionToken?: string | undefined;
|
|
47
27
|
}, {
|
|
@@ -50,12 +30,6 @@ export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
|
50
30
|
startLine: number;
|
|
51
31
|
endLine: number;
|
|
52
32
|
repoOrigin?: string | undefined;
|
|
53
|
-
forkAuthor?: {
|
|
54
|
-
platform: "github" | "gitlab";
|
|
55
|
-
user: string;
|
|
56
|
-
forkOrigin: string;
|
|
57
|
-
} | undefined;
|
|
58
|
-
workspaceId?: string | undefined;
|
|
59
33
|
intentId?: string | undefined;
|
|
60
34
|
sessionToken?: string | undefined;
|
|
61
35
|
}>;
|
|
@@ -87,20 +61,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
87
61
|
name: string;
|
|
88
62
|
description: string;
|
|
89
63
|
inputSchema: z.ZodObject<{
|
|
90
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
91
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
92
|
-
user: z.ZodString;
|
|
93
|
-
forkOrigin: z.ZodString;
|
|
94
|
-
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
platform: "github" | "gitlab";
|
|
96
|
-
user: string;
|
|
97
|
-
forkOrigin: string;
|
|
98
|
-
}, {
|
|
99
|
-
platform: "github" | "gitlab";
|
|
100
|
-
user: string;
|
|
101
|
-
forkOrigin: string;
|
|
102
|
-
}>>;
|
|
103
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
104
64
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
105
65
|
repoPath: z.ZodString;
|
|
106
66
|
filePath: z.ZodString;
|
|
@@ -114,12 +74,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
114
74
|
startLine: number;
|
|
115
75
|
endLine: number;
|
|
116
76
|
repoOrigin?: string | undefined;
|
|
117
|
-
forkAuthor?: {
|
|
118
|
-
platform: "github" | "gitlab";
|
|
119
|
-
user: string;
|
|
120
|
-
forkOrigin: string;
|
|
121
|
-
} | undefined;
|
|
122
|
-
workspaceId?: string | undefined;
|
|
123
77
|
intentId?: string | undefined;
|
|
124
78
|
sessionToken?: string | undefined;
|
|
125
79
|
}, {
|
|
@@ -128,12 +82,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
128
82
|
startLine: number;
|
|
129
83
|
endLine: number;
|
|
130
84
|
repoOrigin?: string | undefined;
|
|
131
|
-
forkAuthor?: {
|
|
132
|
-
platform: "github" | "gitlab";
|
|
133
|
-
user: string;
|
|
134
|
-
forkOrigin: string;
|
|
135
|
-
} | undefined;
|
|
136
|
-
workspaceId?: string | undefined;
|
|
137
85
|
intentId?: string | undefined;
|
|
138
86
|
sessionToken?: string | undefined;
|
|
139
87
|
}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
-
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
4
|
/**
|
|
6
5
|
* Thin proxy to Muninn's `pre-edit-check:evaluate` handler.
|
|
7
6
|
*
|
|
@@ -38,11 +37,9 @@ export const preEditDecisionCheckSchema = z.object({
|
|
|
38
37
|
.string()
|
|
39
38
|
.optional()
|
|
40
39
|
.describe('Session scope for the force-override cache. Defaults to the MCP server\'s SESSION_ID; PreToolUse hook callers should pass Claude Code\'s session_id so writes from one process are visible to the other.'),
|
|
41
|
-
...forkFieldsExtensions,
|
|
42
40
|
});
|
|
43
41
|
export async function preEditDecisionCheck(input) {
|
|
44
42
|
const repoOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
45
|
-
const forkFields = extractForkFields(input);
|
|
46
43
|
const res = await request('pre-edit-check', 'evaluate', {
|
|
47
44
|
repoOrigin,
|
|
48
45
|
repoPath: input.repoPath,
|
|
@@ -51,7 +48,6 @@ export async function preEditDecisionCheck(input) {
|
|
|
51
48
|
endLine: input.endLine,
|
|
52
49
|
intentId: input.intentId,
|
|
53
50
|
sessionToken: input.sessionToken,
|
|
54
|
-
...forkFields,
|
|
55
51
|
});
|
|
56
52
|
return res;
|
|
57
53
|
}
|