@zibby/skills 0.1.34 → 0.1.35
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 +2 -0
- package/dist/browser.d.ts +19 -0
- package/dist/chat-memory.d.ts +355 -0
- package/dist/chat-notify.d.ts +409 -0
- package/dist/core-tools.d.ts +131 -0
- package/dist/function-skill.d.ts +149 -0
- package/dist/git.d.ts +72 -0
- package/dist/github.d.ts +777 -0
- package/dist/gitlab.d.ts +396 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +43 -43
- package/dist/integrations.d.ts +110 -0
- package/dist/jira.d.ts +547 -0
- package/dist/lark.d.ts +161 -0
- package/dist/linear.d.ts +344 -0
- package/dist/llm-billing.d.ts +294 -0
- package/dist/memory.d.ts +137 -0
- package/dist/package.json +67 -19
- package/dist/plane.d.ts +24 -0
- package/dist/report.d.ts +354 -0
- package/dist/report.js +9 -9
- package/dist/sentry.d.ts +43 -0
- package/dist/skill-installer.d.ts +86 -0
- package/dist/slack.d.ts +284 -0
- package/dist/test-runner.d.ts +220 -0
- package/dist/trackers/github-adapter.d.ts +96 -0
- package/dist/trackers/index.d.ts +27 -0
- package/dist/trackers/jira-adapter.d.ts +90 -0
- package/dist/trackers/linear-adapter.d.ts +89 -0
- package/dist/trackers/plane-adapter.d.ts +101 -0
- package/dist/trackers/types.d.ts +335 -0
- package/dist/workflow-builder.d.ts +245 -0
- package/package.json +67 -19
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
export namespace workflowBuilderSkill {
|
|
2
|
+
export let id: string;
|
|
3
|
+
export let description: string;
|
|
4
|
+
export let envKeys: any[];
|
|
5
|
+
export { PROMPT_FRAGMENT as promptFragment };
|
|
6
|
+
export let tools: ({
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: {
|
|
10
|
+
type: string;
|
|
11
|
+
properties: {
|
|
12
|
+
name: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
description: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
nodes: {
|
|
21
|
+
type: string;
|
|
22
|
+
items: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: {
|
|
25
|
+
name: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
description: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
inputFields: {
|
|
34
|
+
type: string;
|
|
35
|
+
items: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
outputFields: {
|
|
41
|
+
type: string;
|
|
42
|
+
items: {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
required: string[];
|
|
49
|
+
};
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
edges: {
|
|
53
|
+
type: string;
|
|
54
|
+
items: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
from: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
to: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
condition: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
};
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
spec?: undefined;
|
|
75
|
+
workflowName?: undefined;
|
|
76
|
+
nodeName?: undefined;
|
|
77
|
+
inputFields?: undefined;
|
|
78
|
+
outputFields?: undefined;
|
|
79
|
+
projectId?: undefined;
|
|
80
|
+
topic?: undefined;
|
|
81
|
+
};
|
|
82
|
+
required: string[];
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
input_schema: {
|
|
88
|
+
type: string;
|
|
89
|
+
properties: {
|
|
90
|
+
name: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
spec: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
properties: {
|
|
98
|
+
name: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
description: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
nodes: {
|
|
105
|
+
type: string;
|
|
106
|
+
items: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
edges: {
|
|
111
|
+
type: string;
|
|
112
|
+
items: {
|
|
113
|
+
type: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
description?: undefined;
|
|
119
|
+
nodes?: undefined;
|
|
120
|
+
edges?: undefined;
|
|
121
|
+
workflowName?: undefined;
|
|
122
|
+
nodeName?: undefined;
|
|
123
|
+
inputFields?: undefined;
|
|
124
|
+
outputFields?: undefined;
|
|
125
|
+
projectId?: undefined;
|
|
126
|
+
topic?: undefined;
|
|
127
|
+
};
|
|
128
|
+
required: string[];
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
name: string;
|
|
132
|
+
description: string;
|
|
133
|
+
input_schema: {
|
|
134
|
+
type: string;
|
|
135
|
+
properties: {
|
|
136
|
+
workflowName: {
|
|
137
|
+
type: string;
|
|
138
|
+
description: string;
|
|
139
|
+
};
|
|
140
|
+
nodeName: {
|
|
141
|
+
type: string;
|
|
142
|
+
description: string;
|
|
143
|
+
};
|
|
144
|
+
description: {
|
|
145
|
+
type: string;
|
|
146
|
+
description: string;
|
|
147
|
+
};
|
|
148
|
+
inputFields: {
|
|
149
|
+
type: string;
|
|
150
|
+
items: {
|
|
151
|
+
type: string;
|
|
152
|
+
};
|
|
153
|
+
description: string;
|
|
154
|
+
};
|
|
155
|
+
outputFields: {
|
|
156
|
+
type: string;
|
|
157
|
+
items: {
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
name?: undefined;
|
|
163
|
+
nodes?: undefined;
|
|
164
|
+
edges?: undefined;
|
|
165
|
+
spec?: undefined;
|
|
166
|
+
projectId?: undefined;
|
|
167
|
+
topic?: undefined;
|
|
168
|
+
};
|
|
169
|
+
required: string[];
|
|
170
|
+
};
|
|
171
|
+
} | {
|
|
172
|
+
name: string;
|
|
173
|
+
description: string;
|
|
174
|
+
input_schema: {
|
|
175
|
+
type: string;
|
|
176
|
+
properties: {
|
|
177
|
+
name: {
|
|
178
|
+
type: string;
|
|
179
|
+
description: string;
|
|
180
|
+
};
|
|
181
|
+
projectId: {
|
|
182
|
+
type: string;
|
|
183
|
+
description: string;
|
|
184
|
+
};
|
|
185
|
+
description?: undefined;
|
|
186
|
+
nodes?: undefined;
|
|
187
|
+
edges?: undefined;
|
|
188
|
+
spec?: undefined;
|
|
189
|
+
workflowName?: undefined;
|
|
190
|
+
nodeName?: undefined;
|
|
191
|
+
inputFields?: undefined;
|
|
192
|
+
outputFields?: undefined;
|
|
193
|
+
topic?: undefined;
|
|
194
|
+
};
|
|
195
|
+
required: string[];
|
|
196
|
+
};
|
|
197
|
+
} | {
|
|
198
|
+
name: string;
|
|
199
|
+
description: string;
|
|
200
|
+
input_schema: {
|
|
201
|
+
type: string;
|
|
202
|
+
properties: {
|
|
203
|
+
name?: undefined;
|
|
204
|
+
description?: undefined;
|
|
205
|
+
nodes?: undefined;
|
|
206
|
+
edges?: undefined;
|
|
207
|
+
spec?: undefined;
|
|
208
|
+
workflowName?: undefined;
|
|
209
|
+
nodeName?: undefined;
|
|
210
|
+
inputFields?: undefined;
|
|
211
|
+
outputFields?: undefined;
|
|
212
|
+
projectId?: undefined;
|
|
213
|
+
topic?: undefined;
|
|
214
|
+
};
|
|
215
|
+
required?: undefined;
|
|
216
|
+
};
|
|
217
|
+
} | {
|
|
218
|
+
name: string;
|
|
219
|
+
description: string;
|
|
220
|
+
input_schema: {
|
|
221
|
+
type: string;
|
|
222
|
+
properties: {
|
|
223
|
+
topic: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
name?: undefined;
|
|
228
|
+
description?: undefined;
|
|
229
|
+
nodes?: undefined;
|
|
230
|
+
edges?: undefined;
|
|
231
|
+
spec?: undefined;
|
|
232
|
+
workflowName?: undefined;
|
|
233
|
+
nodeName?: undefined;
|
|
234
|
+
inputFields?: undefined;
|
|
235
|
+
outputFields?: undefined;
|
|
236
|
+
projectId?: undefined;
|
|
237
|
+
};
|
|
238
|
+
required?: undefined;
|
|
239
|
+
};
|
|
240
|
+
})[];
|
|
241
|
+
export function handleToolCall(name: any, args: any, context: any): Promise<string>;
|
|
242
|
+
export function resolve(): any;
|
|
243
|
+
}
|
|
244
|
+
declare const PROMPT_FRAGMENT: "## Workflow Builder\n\nYou can help users build custom AI workflows using the Zibby workflow framework.\n\n### What makes Zibby workflows different\nEach node invokes a **real AI agent** (Cursor, Claude, Codex, or Gemini) \u2014 not a thin LLM API wrapper.\nThat means every node has full agent capabilities: tool use, MCP servers (browser, GitHub, Jira, Slack),\nmulti-turn reasoning, and structured output validation via Zod schemas.\n\nKey differentiators:\n- **Agent-powered nodes** \u2014 each step runs a full AI agent (cursor-agent, claude, codex, gemini CLI) with tool access and MCP skills, not a simple chat completion call.\n- **Structured output** \u2014 every node declares a Zod schema; the framework validates and parses the agent's response automatically.\n- **Conditional routing** \u2014 edges can branch on agent-produced fields (e.g., `state.triage.priority === 'critical'`), enabling intelligent decision graphs.\n- **MCP skill injection** \u2014 nodes declare `skills: [SKILLS.BROWSER, SKILLS.GITHUB]` and the framework spins up the right MCP servers automatically.\n- **Deploy anywhere** \u2014 `zibby deploy` pushes to Zibby Cloud with an API trigger; or self-host with `zibby start`.\n- **State accumulation** \u2014 each node's validated output is stored under its name in `state` (e.g., `state.classify_ticket`), so downstream nodes can reference upstream results.\n\n### What is a workflow?\nA directed graph of nodes (AI agent steps) connected by edges. Each node has:\n- `name` \u2014 unique identifier (snake_case)\n- `prompt` \u2014 function that receives state and returns the prompt string sent to the agent\n- `outputSchema` \u2014 Zod schema defining the structured output the agent must return\n- `skills` (optional) \u2014 array of MCP skill IDs the node needs (e.g., `SKILLS.BROWSER`, `SKILLS.GITHUB`)\n- `timeout` (optional) \u2014 max execution time in ms (default: 300000)\n- `model` (optional) \u2014 override the model for this node (e.g., `'claude-opus-4'`)\n\n### File structure\n```\n.zibby/workflows/<name>/\n\u251C\u2500\u2500 graph.mjs \u2014 WorkflowAgent subclass with buildGraph()\n\u251C\u2500\u2500 nodes/\n\u2502 \u251C\u2500\u2500 index.mjs \u2014 barrel export for all nodes\n\u2502 \u2514\u2500\u2500 <node>.mjs \u2014 one file per node\n\u2514\u2500\u2500 workflow.json \u2014 manifest (name, description, triggers)\n```\n\n### Node pattern\n```javascript\nimport { z, SKILLS } from '@zibby/core';\n\nconst OutputSchema = z.object({\n summary: z.string().describe('Brief summary'),\n items: z.array(z.string()).describe('List of extracted items'),\n needsReview: z.boolean().describe('Whether a human should review this'),\n});\n\nexport const myNode = {\n name: 'my_node',\n skills: [SKILLS.GITHUB], // optional \u2014 framework injects MCP servers\n timeout: 120000, // optional \u2014 2 min timeout\n prompt: (state) => \\`You are analyzing a pull request.\n\nInput:\n\\${JSON.stringify(state.input || {}, null, 2)}\n\nReturn a JSON object matching the schema.\\`,\n outputSchema: OutputSchema,\n};\n```\n\n### Graph pattern\n```javascript\nimport { WorkflowAgent, WorkflowGraph } from '@zibby/core';\nimport { classifyNode, routeNode } from './nodes/index.mjs';\n\nexport class MyWorkflow extends WorkflowAgent {\n buildGraph() {\n const graph = new WorkflowGraph();\n graph.addNode('classify', classifyNode);\n graph.addNode('route', routeNode);\n graph.setEntryPoint('classify');\n graph.addEdge('classify', 'route');\n graph.addEdge('route', 'END');\n return graph;\n }\n\n async onComplete(result) {\n // Post-execution hook \u2014 save artifacts, notify, etc.\n console.log('Workflow complete:', result.success);\n }\n}\n```\n\nConditional edges: `graph.addConditionalEdges('node', (state) => state.node.priority === 'high' ? 'escalate' : 'notify')`\n\n### Available SKILLS constants\nImport from `@zibby/core`: `SKILLS.BROWSER`, `SKILLS.MEMORY`, `SKILLS.GITHUB`, `SKILLS.JIRA`, `SKILLS.SLACK`, `SKILLS.RUNNER`\n\n### Deep documentation\nCall `explore_framework_docs` to read detailed framework docs on demand. Use it for:\n- Advanced patterns (middleware, parallel nodes, state schemas)\n- Deployment & cloud triggers\n- CLI commands reference\n- Integration details (Jira, GitHub, etc.)\nCall with no arguments to see all available topics.\n\n### How to use the builder tools\n1. For complex workflows, call `explore_framework_docs(\"custom-workflows\")` first to learn advanced patterns.\n2. Ask the user what their workflow should do, what input it receives, and what steps are needed.\n3. Call `design_workflow` with the structured spec for the user to review.\n4. Once approved, call `build_workflow` to generate real code on disk (uses the configured agent for high-quality code generation).\n5. Remind the user: `zibby start <name>` to test locally, `zibby deploy <name> --project <id>` to deploy to cloud, `zibby logs --workflow <name>` to tail logs.\n\n### Important\n- Each node prompt should be detailed and specific \u2014 tell the AI agent exactly what to do and what format to return.\n- Zod schemas MUST use .describe() on every field so the agent knows what each field means.\n- Node names must be snake_case (e.g., classify_ticket, generate_report).\n- Workflow names must be kebab-case (e.g., ticket-triage, pr-review).\n- State flows through: each node's validated output is stored under its name in state (e.g., state.classify_ticket).\n- Downstream nodes reference upstream outputs in their prompt function (e.g., \\`\\${JSON.stringify(state.classify_ticket, null, 2)}\\`).\n- Nodes can declare skills to get MCP tool access \u2014 the framework handles server lifecycle automatically.";
|
|
245
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,31 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"description": "Built-in skill definitions for Zibby test automation framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
9
13
|
"./bin/mcp-sentry.mjs": "./bin/mcp-sentry.mjs",
|
|
10
14
|
"./bin/mcp-lark.mjs": "./bin/mcp-lark.mjs",
|
|
11
15
|
"./bin/mcp-slack.mjs": "./bin/mcp-slack.mjs",
|
|
12
|
-
"./browser":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"./
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"./
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"./
|
|
25
|
-
|
|
16
|
+
"./browser": {
|
|
17
|
+
"types": "./dist/browser.d.ts",
|
|
18
|
+
"default": "./dist/browser.js"
|
|
19
|
+
},
|
|
20
|
+
"./jira": {
|
|
21
|
+
"types": "./dist/jira.d.ts",
|
|
22
|
+
"default": "./dist/jira.js"
|
|
23
|
+
},
|
|
24
|
+
"./github": {
|
|
25
|
+
"types": "./dist/github.d.ts",
|
|
26
|
+
"default": "./dist/github.js"
|
|
27
|
+
},
|
|
28
|
+
"./gitlab": {
|
|
29
|
+
"types": "./dist/gitlab.d.ts",
|
|
30
|
+
"default": "./dist/gitlab.js"
|
|
31
|
+
},
|
|
32
|
+
"./linear": {
|
|
33
|
+
"types": "./dist/linear.d.ts",
|
|
34
|
+
"default": "./dist/linear.js"
|
|
35
|
+
},
|
|
36
|
+
"./plane": {
|
|
37
|
+
"types": "./dist/plane.d.ts",
|
|
38
|
+
"default": "./dist/plane.js"
|
|
39
|
+
},
|
|
40
|
+
"./slack": {
|
|
41
|
+
"types": "./dist/slack.d.ts",
|
|
42
|
+
"default": "./dist/slack.js"
|
|
43
|
+
},
|
|
44
|
+
"./lark": {
|
|
45
|
+
"types": "./dist/lark.d.ts",
|
|
46
|
+
"default": "./dist/lark.js"
|
|
47
|
+
},
|
|
48
|
+
"./memory": {
|
|
49
|
+
"types": "./dist/memory.d.ts",
|
|
50
|
+
"default": "./dist/memory.js"
|
|
51
|
+
},
|
|
52
|
+
"./function": {
|
|
53
|
+
"types": "./dist/function-skill.d.ts",
|
|
54
|
+
"default": "./dist/function-skill.js"
|
|
55
|
+
},
|
|
56
|
+
"./integrations": {
|
|
57
|
+
"types": "./dist/integrations.d.ts",
|
|
58
|
+
"default": "./dist/integrations.js"
|
|
59
|
+
},
|
|
60
|
+
"./report": {
|
|
61
|
+
"types": "./dist/report.d.ts",
|
|
62
|
+
"default": "./dist/report.js"
|
|
63
|
+
},
|
|
64
|
+
"./llm-billing": {
|
|
65
|
+
"types": "./dist/llm-billing.d.ts",
|
|
66
|
+
"default": "./dist/llm-billing.js"
|
|
67
|
+
},
|
|
68
|
+
"./sentry": {
|
|
69
|
+
"types": "./dist/sentry.d.ts",
|
|
70
|
+
"default": "./dist/sentry.js"
|
|
71
|
+
}
|
|
26
72
|
},
|
|
27
73
|
"scripts": {
|
|
28
|
-
"build": "node ../scripts/build.mjs",
|
|
74
|
+
"build": "node ../scripts/build.mjs && npm run build:types",
|
|
75
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
29
76
|
"prepack": "node scripts/copy-docs.mjs",
|
|
30
77
|
"lint": "eslint .",
|
|
31
78
|
"lint:fix": "eslint --fix ."
|
|
@@ -58,8 +105,8 @@
|
|
|
58
105
|
"node": ">=18.0.0"
|
|
59
106
|
},
|
|
60
107
|
"dependencies": {
|
|
61
|
-
"@zibby/agent-workflow": "^0.3.0",
|
|
62
108
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
109
|
+
"@zibby/agent-workflow": "^0.3.0",
|
|
63
110
|
"better-sqlite3": "^12.6.2",
|
|
64
111
|
"mem0ai": "npm:@zibby/mem0ai@^3.0.5",
|
|
65
112
|
"zod": "^3.23.0 || ^4.0.0"
|
|
@@ -75,6 +122,7 @@
|
|
|
75
122
|
"@eslint/js": "^10.0.1",
|
|
76
123
|
"esbuild": "^0.28.0",
|
|
77
124
|
"eslint": "^10.0.2",
|
|
78
|
-
"globals": "^17.4.0"
|
|
125
|
+
"globals": "^17.4.0",
|
|
126
|
+
"typescript": "^5.9.3"
|
|
79
127
|
}
|
|
80
128
|
}
|