@tplog/pi-zendy 0.3.7 → 0.3.8

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 CHANGED
@@ -12,6 +12,7 @@ zendy is a single pi extension that provides:
12
12
 
13
13
  - **LLM Tools** — Direct API access to Zendesk, Helm Watchdog, and Knowledge Graph. No external CLI dependencies.
14
14
  - **Slash Commands** — `/zendy-config` to set up credentials, `/zendy-status` to check connectivity.
15
+ - **Skill** — a `zendy` skill (also `/skill:zendy`) that teaches the agent the ticket-analysis workflow, so "analyze ticket #1959" reliably uses the right tools in the right order.
15
16
  - **Session Safety** — Automatic workspace isolation and cleanup for source code analysis.
16
17
 
17
18
  Typical workflow:
package/dist/index.js CHANGED
@@ -16,6 +16,10 @@ const PKG_ROOT = join(__dirname, "..");
16
16
  // This is the same file pi loads via the `pi.extensions` manifest field, so the
17
17
  // `zendy` launcher and `pi install` behave identically — no separate extraction step.
18
18
  const EXT_ZENDY = join(PKG_ROOT, "extensions", "zendy.ts");
19
+ // Skill describing zendy and the ticket-analysis workflow. pi discovers it via
20
+ // the pi.skills manifest field when installed as a package; the launcher passes
21
+ // it explicitly so both load paths expose the same skill.
22
+ const SKILL_ZENDY = join(PKG_ROOT, "skills", "zendy");
19
23
  function findPi() {
20
24
  try {
21
25
  return execFileSync("which", ["pi"], { encoding: "utf-8" }).trim();
@@ -83,6 +87,8 @@ async function main() {
83
87
  const args = [
84
88
  "--extension",
85
89
  EXT_ZENDY,
90
+ "--skill",
91
+ SKILL_ZENDY,
86
92
  ];
87
93
  // Pass through all user arguments
88
94
  args.push(...filteredArgs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplog/pi-zendy",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Pi package for Dify Enterprise support ticket analysis",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,12 +19,16 @@
19
19
  "pi": {
20
20
  "extensions": [
21
21
  "./extensions/zendy.ts"
22
+ ],
23
+ "skills": [
24
+ "./skills"
22
25
  ]
23
26
  },
24
27
  "files": [
25
28
  "dist",
26
29
  "extensions",
27
- "prompts"
30
+ "prompts",
31
+ "skills"
28
32
  ],
29
33
  "publishConfig": {
30
34
  "access": "public"
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: zendy
3
+ description: >
4
+ Dify Enterprise support ticket analysis using the zendy tools. Use whenever the
5
+ user mentions a Zendesk ticket number or asks to analyze, investigate, or reply to
6
+ a support ticket (e.g. "analyze ticket #1959", "分析工单", "工单分析", "チケットを調査"),
7
+ asks about a customer's Dify Helm chart values or version defaults, wants to find
8
+ similar historical tickets, or needs a customer reply drafted. Covers the full
9
+ workflow: fetch ticket → identify Dify version → check Helm values → search
10
+ similar tickets → draft reply in the ticket's language.
11
+ ---
12
+
13
+ # zendy — Dify Enterprise Support Ticket Analysis
14
+
15
+ zendy is a support-engineering harness for Dify Enterprise. It registers tools for
16
+ Zendesk, the Dify Helm Watchdog, and a historical-ticket Knowledge Graph, so a
17
+ support engineer can analyze a ticket end-to-end without leaving the terminal.
18
+
19
+ ## Tools
20
+
21
+ | Tool | Use for |
22
+ |------|---------|
23
+ | `zendy_ticket_get` | Fetch one Zendesk ticket with comments, requester, assignee |
24
+ | `zendy_ticket_search` | Search live Zendesk tickets (Zendesk search syntax) |
25
+ | `zendy_whoami` | Verify which Zendesk account is authenticated |
26
+ | `zendy_helm_get` | Dify Helm chart data by exact version: values.yaml, images, validation, latest |
27
+ | `zendy_kg_search` | Semantic search over historical tickets; returns ticketIds |
28
+ | `zendy_source_status` | Check the source-analysis workspace path and authorization rules |
29
+
30
+ Use these tools for all data access. Do not use zcli, curl, or any external Zendesk
31
+ CLI. If credentials are missing, tell the user to run `/zendy-config`; check
32
+ connectivity with `/zendy-status`.
33
+
34
+ ## Ticket analysis workflow
35
+
36
+ 1. User gives a ticket number → `zendy_ticket_get` to pull ticket + comments.
37
+ 2. Identify the customer's exact Dify version from ticket fields or the thread.
38
+ 3. Pull the matching chart data with `zendy_helm_get` — always pass the exact
39
+ version. Defaults change between releases; never assume a config value from a
40
+ different version.
41
+ 4. Optionally `zendy_kg_search` for similar past tickets. Always cite the
42
+ `ticketId` values from results so the engineer can read the source tickets.
43
+ Empty results do not prove no similar issue exists.
44
+ 5. Synthesize findings and draft a reply.
45
+
46
+ ## Behavior rules
47
+
48
+ - **Never guess.** Base conclusions on actual data — ticket fields, values.yaml,
49
+ knowledge-graph results. State clearly what is fact vs. inference.
50
+ - **Don't recommend unverified solutions.** If something was not confirmed in
51
+ config or docs, say so explicitly.
52
+ - **Reply drafts match the ticket language.** Detect the thread language
53
+ (Japanese, Chinese, or English) and draft in that language with appropriate
54
+ business tone.
55
+ - **Source code analysis requires explicit user permission.** If config-level
56
+ analysis cannot settle the question, ask the user whether to check the source
57
+ (e.g. "需要我去源码确认吗?") — never clone without permission. Use
58
+ `zendy_source_status` to find the workspace.
59
+ - **Inspect before filtering.** On the first call to an unfamiliar response shape,
60
+ look at the structure before writing filter expressions; never assume field names.