@studiometa/productive-mcp 0.10.5 → 0.10.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/handlers/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAozB7C;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAevD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,UAAU,CAY/C"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/handlers/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAs7B7C;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAevD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,UAAU,CAY/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AA8B7D,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6J7C;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,qBAAqB,GACjC,OAAO,CAAC,UAAU,CAAC,CA6KrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AA+B7D,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAwI7C;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,qBAAqB,GACjC,OAAO,CAAC,UAAU,CAAC,CA0IrB"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Pre-validation guard pipeline for the productive MCP tool.
3
+ *
4
+ * Guards run against raw args BEFORE Zod schema parsing. This catches common
5
+ * agent mistakes that Zod `.strip()` would silently swallow (e.g. passing
6
+ * `params` instead of `filter`).
7
+ *
8
+ * Each guard returns a `ToolResult` when it detects a bad pattern, or `null`
9
+ * to signal that the args look fine and the next guard should run.
10
+ */
11
+ import type { ToolResult } from './types.js';
12
+ /**
13
+ * A pre-validation guard function.
14
+ * Returns a ToolResult (error) when a bad pattern is detected, or null to pass.
15
+ */
16
+ export type PreValidationGuard = (args: Record<string, unknown>) => ToolResult | null;
17
+ /**
18
+ * Detects the classic `params` mistake.
19
+ *
20
+ * Agents familiar with REST conventions often pass `params` as a top-level
21
+ * field. Zod's `.strip()` silently removes it before any post-parse check
22
+ * could fire, so this must run on the raw args.
23
+ */
24
+ export declare function detectParamsField(args: Record<string, unknown>): ToolResult | null;
25
+ /**
26
+ * Detects `resource="budgets"` and redirects to `deals` with a type filter.
27
+ *
28
+ * The "budgets" resource was removed. Budgets are deals with `type=2`.
29
+ */
30
+ export declare function detectBudgetsResource(args: Record<string, unknown>): ToolResult | null;
31
+ /**
32
+ * Detects `resource="docs"` and redirects to `pages`.
33
+ */
34
+ export declare function detectDocsResource(args: Record<string, unknown>): ToolResult | null;
35
+ /**
36
+ * Detects `action="search"` used on a specific resource.
37
+ *
38
+ * Agents should use `action="list"` with a `query` parameter for text
39
+ * filtering within a single resource, or `resource="search"` for
40
+ * cross-resource search. This guard only fires when `resource` is not
41
+ * already `"search"` to avoid blocking the legitimate search resource.
42
+ */
43
+ export declare function detectSearchAction(args: Record<string, unknown>): ToolResult | null;
44
+ /**
45
+ * Detects `action` values that start with `get_`.
46
+ *
47
+ * Agents using function-style naming (e.g. `get_tasks`, `get_projects`)
48
+ * should use plain verbs: `action="get"` for a single item or
49
+ * `action="list"` for multiple items.
50
+ */
51
+ export declare function detectGetUnderscoreAction(args: Record<string, unknown>): ToolResult | null;
52
+ /**
53
+ * Ordered list of pre-validation guards.
54
+ * Guards are evaluated in order; the first match short-circuits the pipeline.
55
+ */
56
+ export declare const PRE_VALIDATION_GUARDS: PreValidationGuard[];
57
+ /**
58
+ * Run all pre-validation guards against raw args.
59
+ *
60
+ * Returns the first guard's ToolResult on a match, or `null` if all guards
61
+ * pass (meaning the args look structurally sound and Zod parsing can proceed).
62
+ */
63
+ export declare function runPreValidationGuards(args: Record<string, unknown>): ToolResult | null;
64
+ //# sourceMappingURL=pre-validation-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pre-validation-guards.d.ts","sourceRoot":"","sources":["../../src/handlers/pre-validation-guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAK7C;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,UAAU,GAAG,IAAI,CAAC;AAMtF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,GAAG,IAAI,CASlF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,GAAG,IAAI,CAUtF;AAED;;GAEG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