@carllee1983/dbcli 7.0.0 → 8.0.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.
Files changed (44) hide show
  1. package/.agents/skills/story-development/SKILL.md +70 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.cursor/rules/dbcli.mdc +65 -2
  5. package/.cursor/skills/dbcli/reference.md +197 -5
  6. package/.cursor-plugin/plugin.json +1 -1
  7. package/.github/skills/dbcli/SKILL.md +65 -2
  8. package/.github/skills/dbcli/reference.md +197 -5
  9. package/CHANGELOG.md +299 -0
  10. package/assets/SKILL.md +65 -2
  11. package/assets/SKILL.zh-TW.md +60 -2
  12. package/assets/integration-kit/README.md +43 -0
  13. package/assets/integration-kit/external-consumers.ts +9 -0
  14. package/assets/integration-kit/skill-author-consumer.ts +77 -0
  15. package/assets/integration-kit/task-pack.md +18 -0
  16. package/assets/reference.md +197 -5
  17. package/assets/tasks/README.md +6 -0
  18. package/assets/tasks/analyze-table-perf.md +3 -3
  19. package/assets/tasks/audit-permissions.md +2 -2
  20. package/assets/tasks/connection-health.md +2 -2
  21. package/assets/tasks/design-review.md +3 -3
  22. package/assets/tasks/diagnose-slow-query.md +3 -3
  23. package/assets/tasks/migration-review.md +3 -3
  24. package/assets/tasks/mongo-safe-backfill.md +2 -2
  25. package/assets/tasks/mongo-schema-drift-review.md +2 -2
  26. package/assets/tasks/orm-drift-review.md +3 -3
  27. package/assets/tasks/pr-database-review.md +3 -3
  28. package/assets/tasks/safe-backfill-verify.md +3 -3
  29. package/assets/tasks/safe-backfill.md +3 -3
  30. package/assets/tasks/schema-drift-review.md +3 -3
  31. package/assets/tasks/slow-endpoint-investigation.md +19 -6
  32. package/assets/ui-template.html +18 -18
  33. package/dist/cli-runtime.mjs +25533 -22188
  34. package/dist/cli.mjs +7 -4
  35. package/dist/core.d.ts +297 -2
  36. package/dist/core.mjs +2075 -3
  37. package/dist/ui-style.css +1 -1
  38. package/gemini-extension.json +1 -1
  39. package/package.json +6 -3
  40. package/plugins/dbcli-agent/.codex-plugin/plugin.json +1 -1
  41. package/plugins/dbcli-agent/skills/dbcli/SKILL.md +65 -2
  42. package/plugins/dbcli-agent/skills/dbcli/reference.md +197 -5
  43. package/skills/dbcli/SKILL.md +65 -2
  44. package/skills/dbcli/reference.md +197 -5
@@ -2,7 +2,7 @@
2
2
  name: audit-permissions
3
3
  description: Audit the active permission tier and blacklist coverage before granting an agent write access.
4
4
  tags: [security, permissions, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  table:
8
8
  type: string
@@ -11,7 +11,7 @@ params:
11
11
  safety:
12
12
  mode: plan-only
13
13
  requires:
14
- - blacklist-list
14
+ - blacklist.manage
15
15
  steps:
16
16
  - type: command
17
17
  command: status
@@ -2,7 +2,7 @@
2
2
  name: connection-health
3
3
  description: Quick read-only health check of the active connection (reachability, config, capacity signals).
4
4
  tags: [diagnostics, health, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  section:
8
8
  type: string
@@ -13,7 +13,7 @@ params:
13
13
  safety:
14
14
  mode: plan-only
15
15
  requires:
16
- - blacklist-list
16
+ - blacklist.manage
17
17
  steps:
18
18
  - type: command
19
19
  command: status
@@ -2,12 +2,12 @@
2
2
  name: design-review
3
3
  description: Validate and render a version-controlled SQL database design before comparing it with the local schema cache and preparing review-only proposals.
4
4
  tags: [design, schema, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  safety:
7
7
  mode: plan-only
8
8
  requires:
9
- - blacklist-list
10
- - schema-check
9
+ - blacklist.manage
10
+ - schema.read
11
11
  steps:
12
12
  - type: command
13
13
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: diagnose-slow-query
3
3
  description: Diagnose slow query causes using safe read-only dbcli steps.
4
4
  tags: [diagnostics, performance, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  query:
8
8
  type: string
@@ -11,8 +11,8 @@ params:
11
11
  safety:
12
12
  mode: plan-only
13
13
  requires:
14
- - blacklist-list
15
- - schema-check
14
+ - blacklist.manage
15
+ - schema.read
16
16
  steps:
17
17
  - type: command
18
18
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: migration-review
3
3
  description: Capture pre-change schema evidence and preview a migration's DDL before it is applied.
4
4
  tags: [migration, schema, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  table:
8
8
  type: string
@@ -15,8 +15,8 @@ params:
15
15
  safety:
16
16
  mode: plan-only
17
17
  requires:
18
- - blacklist-list
19
- - schema-check
18
+ - blacklist.manage
19
+ - schema.read
20
20
  steps:
21
21
  - type: command
22
22
  command: blacklist list
@@ -19,8 +19,8 @@ params:
19
19
  safety:
20
20
  mode: plan-only
21
21
  requires:
22
- - blacklist-list
23
- - schema-check
22
+ - blacklist.manage
23
+ - schema.read
24
24
  steps:
25
25
  - type: command
26
26
  command: blacklist list
@@ -15,8 +15,8 @@ params:
15
15
  safety:
16
16
  mode: plan-only
17
17
  requires:
18
- - blacklist-list
19
- - schema-check
18
+ - blacklist.manage
19
+ - schema.read
20
20
  steps:
21
21
  - type: command
22
22
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: orm-drift-review
3
3
  description: Compare an ORM schema definition (Prisma / DDL / normalized JSON) against the live schema cache and review drift before any corrective migration.
4
4
  tags: [diagnostics, schema, orm, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  orm_path:
8
8
  type: string
@@ -11,8 +11,8 @@ params:
11
11
  safety:
12
12
  mode: plan-only
13
13
  requires:
14
- - blacklist-list
15
- - schema-check
14
+ - blacklist.manage
15
+ - schema.read
16
16
  steps:
17
17
  - type: command
18
18
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: pr-database-review
3
3
  description: Review a PR's changed persistence paths, queries and migrations for database risk before merge.
4
4
  tags: [review, safety, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  query:
8
8
  type: string
@@ -11,8 +11,8 @@ params:
11
11
  safety:
12
12
  mode: plan-only
13
13
  requires:
14
- - blacklist-list
15
- - schema-check
14
+ - blacklist.manage
15
+ - schema.read
16
16
  steps:
17
17
  - type: command
18
18
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: safe-backfill-verify
3
3
  description: Plan a safe backfill/UPDATE and a read-back assertion that verifies the write achieved its goal.
4
4
  tags: [data, write, safety, verification]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  table:
8
8
  type: string
@@ -23,8 +23,8 @@ params:
23
23
  safety:
24
24
  mode: plan-only
25
25
  requires:
26
- - blacklist-list
27
- - schema-check
26
+ - blacklist.manage
27
+ - schema.read
28
28
  steps:
29
29
  - type: command
30
30
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: safe-backfill
3
3
  description: Plan a safe data backfill/UPDATE with blacklist, schema and risk checks before any write.
4
4
  tags: [data, write, safety]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  table:
8
8
  type: string
@@ -15,8 +15,8 @@ params:
15
15
  safety:
16
16
  mode: plan-only
17
17
  requires:
18
- - blacklist-list
19
- - schema-check
18
+ - blacklist.manage
19
+ - schema.read
20
20
  steps:
21
21
  - type: command
22
22
  command: blacklist list
@@ -2,7 +2,7 @@
2
2
  name: schema-drift-review
3
3
  description: Detect drift between the cached/committed schema and the live database for one table.
4
4
  tags: [diagnostics, schema, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  table:
8
8
  type: string
@@ -11,8 +11,8 @@ params:
11
11
  safety:
12
12
  mode: plan-only
13
13
  requires:
14
- - blacklist-list
15
- - schema-check
14
+ - blacklist.manage
15
+ - schema.read
16
16
  steps:
17
17
  - type: command
18
18
  command: blacklist list
@@ -2,16 +2,20 @@
2
2
  name: slow-endpoint-investigation
3
3
  description: Connect proxy, explain and missing-index evidence to investigate a slow endpoint's query.
4
4
  tags: [diagnostics, performance, readonly]
5
- engines: [postgres, mysql]
5
+ engines: [postgresql, mysql]
6
6
  params:
7
7
  query:
8
8
  type: string
9
9
  required: true
10
10
  description: The suspected slow SQL statement behind the endpoint (not executed by this task).
11
+ table:
12
+ type: string
13
+ required: true
14
+ description: The exact table the local observation points at (confirm via `dbcli list`).
11
15
  safety:
12
16
  mode: plan-only
13
17
  requires:
14
- - blacklist-list
18
+ - blacklist.manage
15
19
  steps:
16
20
  - type: command
17
21
  command: blacklist list
@@ -21,6 +25,10 @@ steps:
21
25
  command: proxy analyze --format json
22
26
  reason: Aggregate observed slow queries and N+1 patterns from the local proxy event log.
23
27
  risk: readonly
28
+ - type: command
29
+ command: schema {{table}} --format json
30
+ reason: Confirm the selected table's live columns and indexes before reading a plan or index advice.
31
+ risk: readonly
24
32
  - type: command
25
33
  command: explain "{{query}}"
26
34
  reason: Inspect the query plan for the suspected statement without running it for effect.
@@ -34,7 +42,12 @@ steps:
34
42
 
35
43
  Use this task when an endpoint is slow and you want evidence, not guesses. Start from
36
44
  `proxy analyze` (requires that the local observability proxy has captured traffic) to
37
- find the hottest query/table, then `explain` that statement and review
38
- `guide missing-index-for` candidates. Index advice is ADVISORY: do not create indexes
39
- directly — route any proposed index through the `migration-review` pack first, then
40
- verify before/after with `snapshot`/`assert` or `report --section perf` deltas.
45
+ find the hottest query/table, confirm that table's live shape with `schema` before
46
+ reading anything into a plan, then `explain` the statement and review
47
+ `guide missing-index-for` candidates.
48
+
49
+ Everything here is a lead, not a cause. A proxy finding is what was observed locally,
50
+ not proof of what makes the endpoint slow, and an index candidate is not a fix that has
51
+ been shown to work. Index advice is ADVISORY: do not create indexes directly — route any
52
+ proposed index through the `migration-review` pack first, then verify before/after with
53
+ `snapshot`/`assert` or `report --section perf` deltas.