mcp-feedback 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,92 @@
1
+ export declare const FEEDBACK_SCHEMA_VERSION = 1;
2
+ export declare const FEEDBACK_KINDS: readonly ["bug", "tool_failure", "feature_request", "friction", "praise", "other"];
3
+ export declare const FEEDBACK_SEVERITIES: readonly ["blocker", "major", "minor", "none"];
4
+ export declare const FEEDBACK_STATUSES: readonly ["new", "triaged", "resolved", "dismissed"];
5
+ export type FeedbackKind = (typeof FEEDBACK_KINDS)[number];
6
+ export type FeedbackSeverity = (typeof FEEDBACK_SEVERITIES)[number];
7
+ export type FeedbackStatus = (typeof FEEDBACK_STATUSES)[number];
8
+ export interface FeedbackToolCall {
9
+ name: string;
10
+ arguments_summary?: string;
11
+ error?: string;
12
+ is_error?: boolean;
13
+ }
14
+ export interface FeedbackContext {
15
+ goal?: string;
16
+ expected?: string;
17
+ actual?: string;
18
+ workaround?: string;
19
+ suggestion?: string;
20
+ tool_calls?: FeedbackToolCall[];
21
+ repro_steps?: string[];
22
+ excerpt?: string;
23
+ metadata?: Record<string, unknown>;
24
+ }
25
+ /** Who submitted the feedback. Always stamped by the server, never read from tool input. */
26
+ export interface FeedbackIdentity {
27
+ subject: string | null;
28
+ client_id: string | null;
29
+ session_id: string | null;
30
+ token_fingerprint: string | null;
31
+ scopes: string[];
32
+ client_name: string | null;
33
+ client_version: string | null;
34
+ user_agent: string | null;
35
+ }
36
+ export interface FeedbackServerInfo {
37
+ name: string | null;
38
+ version: string | null;
39
+ }
40
+ export interface FeedbackRecord {
41
+ schema_version: typeof FEEDBACK_SCHEMA_VERSION;
42
+ id: string;
43
+ /** UTC, always `YYYY-MM-DDTHH:mm:ss.sssZ`, so string order is time order. */
44
+ created_at: string;
45
+ kind: FeedbackKind;
46
+ title: string;
47
+ body: string;
48
+ severity: FeedbackSeverity;
49
+ tags: string[];
50
+ context: FeedbackContext;
51
+ identity: FeedbackIdentity;
52
+ server: FeedbackServerInfo;
53
+ status: FeedbackStatus;
54
+ triage_note: string | null;
55
+ triaged_by: string | null;
56
+ updated_at: string;
57
+ }
58
+ export interface FeedbackFilter {
59
+ kind?: FeedbackKind;
60
+ status?: FeedbackStatus;
61
+ severity?: FeedbackSeverity;
62
+ subject?: string;
63
+ /** Matches records whose context.tool_calls names include this tool. */
64
+ tool?: string;
65
+ tag?: string;
66
+ /** Inclusive lower bound on created_at. */
67
+ since?: string;
68
+ /** Exclusive upper bound on created_at. */
69
+ until?: string;
70
+ }
71
+ export interface FeedbackListQuery extends FeedbackFilter {
72
+ limit: number;
73
+ cursor?: string;
74
+ }
75
+ export interface FeedbackPage {
76
+ items: FeedbackRecord[];
77
+ next_cursor: string | null;
78
+ }
79
+ export interface FeedbackTriagePatch {
80
+ status?: FeedbackStatus;
81
+ /** `null` clears the note; `undefined` leaves it unchanged. */
82
+ triage_note?: string | null;
83
+ triaged_by: string | null;
84
+ updated_at: string;
85
+ }
86
+ export interface FeedbackStats {
87
+ total: number;
88
+ by_kind: Record<string, number>;
89
+ by_status: Record<string, number>;
90
+ by_severity: Record<string, number>;
91
+ by_tool: Record<string, number>;
92
+ }
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ // Data shapes defined by spec/feedback-record.schema.json. Field names are
2
+ // snake_case on purpose: they are the wire and storage format shared by every
3
+ // language implementation.
4
+ export const FEEDBACK_SCHEMA_VERSION = 1;
5
+ export const FEEDBACK_KINDS = ["bug", "tool_failure", "feature_request", "friction", "praise", "other"];
6
+ export const FEEDBACK_SEVERITIES = ["blocker", "major", "minor", "none"];
7
+ export const FEEDBACK_STATUSES = ["new", "triaged", "resolved", "dismissed"];
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
2
  "name": "mcp-feedback",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Drop-in feedback tools for MCP servers: agents submit structured feedback, stamped with the caller's identity, into a pluggable store.",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "feedback",
9
+ "agents",
10
+ "llm"
11
+ ],
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/krishchow/feedback#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/krishchow/feedback/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/krishchow/feedback.git",
20
+ "directory": "packages/typescript"
21
+ },
22
+ "type": "module",
23
+ "engines": {
24
+ "node": ">=22.13"
25
+ },
26
+ "bin": {
27
+ "mcp-feedback": "dist/cli.js"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "default": "./dist/index.js"
38
+ },
39
+ "./sqlite": {
40
+ "types": "./dist/stores/sqlite.d.ts",
41
+ "default": "./dist/stores/sqlite.js"
42
+ },
43
+ "./postgres": {
44
+ "types": "./dist/stores/postgres.d.ts",
45
+ "default": "./dist/stores/postgres.js"
46
+ },
47
+ "./testing": {
48
+ "types": "./dist/testing.d.ts",
49
+ "default": "./dist/testing.js"
50
+ },
51
+ "./drizzle": {
52
+ "types": "./dist/drizzle.d.ts",
53
+ "default": "./dist/drizzle.js"
54
+ }
55
+ },
56
+ "scripts": {
57
+ "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
58
+ "typecheck": "tsc -p tsconfig.json --noEmit",
59
+ "test": "vitest run",
60
+ "gen:spec": "UPDATE_SPEC=1 vitest run test/spec.test.ts",
61
+ "prepublishOnly": "pnpm run typecheck && pnpm run test && pnpm run build"
62
+ },
63
+ "peerDependencies": {
64
+ "@modelcontextprotocol/sdk": "^1.20.0",
65
+ "drizzle-orm": ">=0.36.0",
66
+ "pg": "^8.0.0",
67
+ "zod": "^3.25.0 || ^4.0.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "pg": {
71
+ "optional": true
72
+ },
73
+ "drizzle-orm": {
74
+ "optional": true
75
+ }
76
+ },
77
+ "devDependencies": {
78
+ "@electric-sql/pglite": "^0.3.0",
79
+ "@modelcontextprotocol/sdk": "^1.32.2",
80
+ "@types/node": "^24.0.0",
81
+ "@types/pg": "^8.23.1",
82
+ "ajv": "^8.17.1",
83
+ "drizzle-kit": "^0.31.11",
84
+ "drizzle-orm": "^0.45.4",
85
+ "pg": "^8.0.0",
86
+ "typescript": "^5.9.0",
87
+ "vitest": "^3.2.0",
88
+ "zod": "3.25.76"
89
+ }
90
+ }