@zibby/skills 0.1.3 → 0.1.5

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/src/jira.js DELETED
@@ -1,110 +0,0 @@
1
- /**
2
- * Jira Skill
3
- *
4
- * Provides Jira issue management via MCP.
5
- * Requires ATLASSIAN_ACCESS_TOKEN and ATLASSIAN_CLOUD_ID environment variables.
6
- *
7
- * Call resolve() to get a ready-to-use MCP server config with env vars injected.
8
- */
9
-
10
- import { createRequire } from 'module';
11
-
12
- const _require = createRequire(import.meta.url);
13
-
14
- function resolveJiraBin() {
15
- if (process.env.MCP_JIRA_PATH) return process.env.MCP_JIRA_PATH;
16
- try {
17
- return _require.resolve('@zibby/mcp-jira/index.js');
18
- } catch {
19
- return null;
20
- }
21
- }
22
-
23
- export const jiraSkill = {
24
- id: 'jira',
25
- serverName: 'jira',
26
- allowedTools: ['mcp__jira__*'],
27
- envKeys: ['ATLASSIAN_ACCESS_TOKEN', 'ATLASSIAN_CLOUD_ID'],
28
- description: 'Zibby Jira MCP Server (OAuth Bearer)',
29
-
30
- resolve() {
31
- const bin = resolveJiraBin();
32
- if (!bin) return null;
33
-
34
- const env = {};
35
- for (const key of this.envKeys) {
36
- if (process.env[key]) env[key] = process.env[key];
37
- }
38
- if (process.env.ATLASSIAN_INSTANCE_URL) {
39
- env.ATLASSIAN_INSTANCE_URL = process.env.ATLASSIAN_INSTANCE_URL;
40
- }
41
-
42
- return {
43
- command: 'node',
44
- args: [bin],
45
- env,
46
- description: this.description,
47
- };
48
- },
49
- tools: [
50
- {
51
- name: 'jira_search',
52
- description: 'Search Jira issues using JQL',
53
- input_schema: {
54
- type: 'object',
55
- properties: {
56
- jql: { type: 'string', description: 'JQL query string, e.g. "project = PROJ AND status = Open"' },
57
- maxResults: { type: 'number', description: 'Max results to return (default 20)' }
58
- },
59
- required: ['jql']
60
- }
61
- },
62
- {
63
- name: 'jira_get_issue',
64
- description: 'Get details of a specific Jira issue',
65
- input_schema: {
66
- type: 'object',
67
- properties: {
68
- issueKey: { type: 'string', description: 'Issue key, e.g. PROJ-123' }
69
- },
70
- required: ['issueKey']
71
- }
72
- },
73
- {
74
- name: 'jira_add_comment',
75
- description: 'Add a comment to a Jira issue',
76
- input_schema: {
77
- type: 'object',
78
- properties: {
79
- issueKey: { type: 'string', description: 'Issue key, e.g. PROJ-123' },
80
- body: { type: 'string', description: 'Comment text (plain text)' }
81
- },
82
- required: ['issueKey', 'body']
83
- }
84
- },
85
- {
86
- name: 'jira_edit_issue',
87
- description: 'Update fields on a Jira issue (summary, story points, labels, priority)',
88
- input_schema: {
89
- type: 'object',
90
- properties: {
91
- issueKey: { type: 'string', description: 'Issue key, e.g. PROJ-123' },
92
- fields: { type: 'object', description: 'Object of field names to values, e.g. {"summary": "New title", "customfield_10016": 5}', additionalProperties: true }
93
- },
94
- required: ['issueKey', 'fields']
95
- }
96
- },
97
- {
98
- name: 'jira_transition_issue',
99
- description: 'Move a Jira issue to a different status',
100
- input_schema: {
101
- type: 'object',
102
- properties: {
103
- issueKey: { type: 'string', description: 'Issue key, e.g. PROJ-123' },
104
- transitionId: { type: 'string', description: 'Transition ID to perform. Omit to list available transitions.' }
105
- },
106
- required: ['issueKey']
107
- }
108
- }
109
- ]
110
- };
package/src/memory.js DELETED
@@ -1,140 +0,0 @@
1
- /**
2
- * Memory Skill
3
- *
4
- * Provides test memory database tools via MCP (Dolt-backed).
5
- * The AI agent can query test history, selector stability, page model,
6
- * and navigation patterns from previous runs.
7
- *
8
- * Activated when SKILLS.MEMORY is included in node's skills array.
9
- * Throws clear errors if dolt or database not set up.
10
- */
11
-
12
- import { createRequire } from 'module';
13
- import { execFileSync } from 'child_process';
14
- import { join } from 'path';
15
- import { existsSync } from 'fs';
16
-
17
- const _require = createRequire(import.meta.url);
18
-
19
- function resolveMemoryBin() {
20
- if (process.env.MCP_MEMORY_PATH) return process.env.MCP_MEMORY_PATH;
21
- try {
22
- return _require.resolve('@zibby/mcp-memory/index.js');
23
- } catch {
24
- return null;
25
- }
26
- }
27
-
28
- export const memorySkill = {
29
- id: 'memory',
30
- serverName: 'memory',
31
- allowedTools: ['mcp__memory__*'],
32
- envKeys: [],
33
- description: 'Zibby Memory MCP Server (test history, selectors, page model)',
34
-
35
- resolve() {
36
- const bin = resolveMemoryBin();
37
- if (!bin) {
38
- throw new Error(
39
- '❌ Memory MCP server not found\n\n' +
40
- ' Install @zibby/memory:\n' +
41
- ' npm install @zibby/memory'
42
- );
43
- }
44
-
45
- const dbPath = join(process.cwd(), '.zibby', 'memory');
46
- if (!existsSync(join(dbPath, '.dolt'))) {
47
- throw new Error(
48
- '❌ Memory database not initialized\n\n' +
49
- ' Run:\n' +
50
- ' zibby memory init'
51
- );
52
- }
53
-
54
- try {
55
- const raw = execFileSync('dolt', ['sql', '-q', 'SELECT COUNT(*) AS cnt FROM test_runs', '-r', 'json'], {
56
- cwd: dbPath, encoding: 'utf-8', timeout: 5_000,
57
- });
58
- const rows = JSON.parse(raw.trim()).rows || [];
59
- if (!rows[0] || rows[0].cnt === 0) {
60
- console.log('[memory] Database empty — memory tools activate after first completed run');
61
- return null;
62
- }
63
- } catch (err) {
64
- throw new Error(
65
- '❌ Dolt not found or memory database error\n\n' +
66
- ' Install Dolt:\n' +
67
- ' https://docs.dolthub.com/introduction/installation\n\n' +
68
- ` Error: ${err.message}`,
69
- { cause: err }
70
- );
71
- }
72
-
73
- return {
74
- command: 'node',
75
- args: [bin, '--db-path', dbPath],
76
- description: this.description,
77
- };
78
- },
79
-
80
- tools: [
81
- {
82
- name: 'memory_get_test_history',
83
- description: 'Query recent test runs with pass/fail results and timing',
84
- input_schema: {
85
- type: 'object',
86
- properties: {
87
- specPath: { type: 'string', description: 'Filter by spec path (substring match)' },
88
- limit: { type: 'number', description: 'Max results (default 10)' },
89
- },
90
- },
91
- },
92
- {
93
- name: 'memory_get_selectors',
94
- description: 'Query known selectors for a page with stability metrics',
95
- input_schema: {
96
- type: 'object',
97
- properties: {
98
- pageUrl: { type: 'string', description: 'Filter by page URL (substring match)' },
99
- limit: { type: 'number', description: 'Max results (default 20)' },
100
- },
101
- },
102
- },
103
- {
104
- name: 'memory_get_page_model',
105
- description: 'Query page structure — elements, roles, selectors',
106
- input_schema: {
107
- type: 'object',
108
- properties: {
109
- url: { type: 'string', description: 'Filter by page URL (substring match)' },
110
- limit: { type: 'number', description: 'Max results (default 20)' },
111
- },
112
- },
113
- },
114
- {
115
- name: 'memory_get_navigation',
116
- description: 'Query known page-to-page transitions',
117
- input_schema: {
118
- type: 'object',
119
- properties: {
120
- fromUrl: { type: 'string', description: 'Filter by source URL (substring match)' },
121
- limit: { type: 'number', description: 'Max results (default 20)' },
122
- },
123
- },
124
- },
125
- {
126
- name: 'memory_save_insight',
127
- description: 'Save a useful observation for future runs (selector tips, timing, workarounds)',
128
- input_schema: {
129
- type: 'object',
130
- properties: {
131
- category: { type: 'string', enum: ['selector_tip', 'timing', 'navigation', 'workaround', 'flaky', 'general'], description: 'Type of insight' },
132
- content: { type: 'string', description: 'The insight text — be specific and actionable' },
133
- specPath: { type: 'string', description: 'Related spec path' },
134
- sessionId: { type: 'string', description: 'Current session ID' },
135
- },
136
- required: ['category', 'content'],
137
- },
138
- },
139
- ],
140
- };
package/src/slack.js DELETED
@@ -1,112 +0,0 @@
1
- /**
2
- * Slack Skill
3
- *
4
- * Provides Slack messaging and channel management via MCP.
5
- * Requires SLACK_BOT_TOKEN and SLACK_TEAM_ID environment variables.
6
- */
7
-
8
- export const slackSkill = {
9
- id: 'slack',
10
- serverName: 'slack',
11
- allowedTools: ['mcp__slack__*'],
12
- envKeys: ['SLACK_BOT_TOKEN', 'SLACK_TEAM_ID'],
13
- description: 'Slack MCP Server',
14
-
15
- resolve() {
16
- const env = {};
17
- for (const key of this.envKeys) {
18
- if (process.env[key]) env[key] = process.env[key];
19
- }
20
- return {
21
- command: 'npx',
22
- args: ['-y', '@modelcontextprotocol/server-slack@latest'],
23
- env,
24
- };
25
- },
26
-
27
- tools: [
28
- {
29
- name: 'slack_list_channels',
30
- description: 'List public channels in the workspace',
31
- input_schema: { type: 'object', properties: {}, required: [] }
32
- },
33
- {
34
- name: 'slack_post_message',
35
- description: 'Post a message to a Slack channel or DM',
36
- input_schema: {
37
- type: 'object',
38
- properties: {
39
- channel: { type: 'string', description: 'Channel ID or name' },
40
- text: { type: 'string', description: 'Message text' }
41
- },
42
- required: ['channel', 'text']
43
- }
44
- },
45
- {
46
- name: 'slack_reply_to_thread',
47
- description: 'Reply to a specific message thread',
48
- input_schema: {
49
- type: 'object',
50
- properties: {
51
- channel: { type: 'string', description: 'Channel ID' },
52
- thread_ts: { type: 'string', description: 'Thread timestamp to reply to' },
53
- text: { type: 'string', description: 'Reply text' }
54
- },
55
- required: ['channel', 'thread_ts', 'text']
56
- }
57
- },
58
- {
59
- name: 'slack_add_reaction',
60
- description: 'Add an emoji reaction to a message',
61
- input_schema: {
62
- type: 'object',
63
- properties: {
64
- channel: { type: 'string', description: 'Channel ID' },
65
- timestamp: { type: 'string', description: 'Message timestamp' },
66
- reaction: { type: 'string', description: 'Emoji name without colons' }
67
- },
68
- required: ['channel', 'timestamp', 'reaction']
69
- }
70
- },
71
- {
72
- name: 'slack_get_channel_history',
73
- description: 'Get recent messages from a channel',
74
- input_schema: {
75
- type: 'object',
76
- properties: {
77
- channel: { type: 'string', description: 'Channel ID' },
78
- limit: { type: 'number', description: 'Number of messages to return' }
79
- },
80
- required: ['channel']
81
- }
82
- },
83
- {
84
- name: 'slack_get_thread_replies',
85
- description: 'Get all replies in a message thread',
86
- input_schema: {
87
- type: 'object',
88
- properties: {
89
- channel: { type: 'string', description: 'Channel ID' },
90
- thread_ts: { type: 'string', description: 'Thread timestamp' }
91
- },
92
- required: ['channel', 'thread_ts']
93
- }
94
- },
95
- {
96
- name: 'slack_get_users',
97
- description: 'List workspace users with basic profiles',
98
- input_schema: { type: 'object', properties: {}, required: [] }
99
- },
100
- {
101
- name: 'slack_get_user_profile',
102
- description: 'Get detailed profile for a specific user',
103
- input_schema: {
104
- type: 'object',
105
- properties: {
106
- user_id: { type: 'string', description: 'Slack user ID' }
107
- },
108
- required: ['user_id']
109
- }
110
- }
111
- ]
112
- };